soroban-cli icon indicating copy to clipboard operation
soroban-cli copied to clipboard

soroban-cli: Should warn if config network_passphrase mismatches server network_passphrase

Open paulbellamy opened this issue 1 year ago • 0 comments

What problem does your feature solve?

If you have your local config network_passphrase value set differently than the server you are talking to, you will get weird txBadAuth errors which are hard to debug.

What would you like to see?

We could either:

  • Check that your local matches the server and warn (abort?) if they do not match.
    • This allows the user to be more explicit about what they expect, so is slightly safer.
  • Deprecate the local network_passphrase setting and just always load it from the server.
    • This is probably much nicer UX, so we should do this.

Maybe a third path is:

  • Make local network_passphrase optional. If it is set, check it matches the server and abort if it doesn't. If not set, load from the server.

What alternatives are there?

paulbellamy avatar May 22 '23 09:05 paulbellamy