Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluate removal of the speculative shielded context #4074

Open
grarco opened this issue Nov 21, 2024 · 1 comment
Open

Evaluate removal of the speculative shielded context #4074

grarco opened this issue Nov 21, 2024 · 1 comment

Comments

@grarco
Copy link
Contributor

grarco commented Nov 21, 2024

Follows #4019.

We could consider removing the pre-caching mechanism of the shielded wallet (a.k.a. the speculative shielded context) and go back to calling shielded-sync in the client automatically before any masp-related command (balance query, shielded tx, unshielding tx). The reasons are:

  • Poor UX: in general both being in a speculative context or on an old confirmed context leads to a bad experience for the user who could see outdated balances or find themselves unable to produce valid transactions. The current solution based on warning messages and the need to manually call shielded-sync all the times is a bit tedious
  • Possible information leaks: being on a speculative (or in general, old state) can leak some information when spending a key
  • Performance of the shielded-sync command should be good now and should not be a concern in terms of UX

There's only one possible catch:

  • In the docs (https://docs.namada.net/users/fees#masp-fee-payment-gas-limit) we suggest a way to circumvent a limitation when paying fees via the MASP that would require building a batch of masp transactions. This is not currently supported by the client (since we only support batching from the SDK), but if we wanted it we'd need to apply some logic to invalidate spent notes just like we do in the speculative context: this could be done in a separate command though, without the need to have a special type of context that applies to all commands
@grarco
Copy link
Contributor Author

grarco commented Nov 21, 2024

cc: @sug0, @batconjurer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant