2

What would be a good design for federation servers in our deployment?

We have a production environment and a staging/QE environment. We'd like the production environment to have a federation server on the public net and the staging/QE environment to have a federation server on the testnet. Is this possible?

The only job of our federation servers is the translation of email-like addresses into account ids. We'd like user*product.com to live on the public net only and user*staging.product.com to live on the testnet only. Is that possible?

If not, what would be a good design to work around this? The federation server doesn't know if the request came from the public or the testnet. Should we simply return testnet account ids on staging and public account ids on production and not worry about any side effects (e.g. people on testnet sending to public account ids and vice versa)?

Thank you!

2

The federation server doesn't know if the request came from the public or the testnet.

From the technical point of view, there is no testnet or pubnet addresses. Federation server returns an account address (ED25519 public key), which is valid for any Stellar network. Two different accounts with the same address (and the same private key) can exist on both, testnet and pubnet.

Should we simply return testnet account ids on staging and public account ids on production and not worry about any side effects.

Yes, it's a preferable way. There will be no side effects at all if your end-users don't use your staging/QE environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.