-
Notifications
You must be signed in to change notification settings - Fork 991
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
Handle MASP Transactions Across Epoch Boundaries #307
Comments
@karbyshev can you take this on as part of the wallet work? |
@karbyshev Looking at
Issue (1) could be solved by checking after a transaction has been rejected whether the cause was due to the epoch having changed. If the epoch did change, then an informative error message could be printed (or maybe a retry could be attempted). Issue (3) could be solved by just computing the transparent value balance by adding net transparent input to the MASP value balance and checking that the result is more than or equal to zero. Applied in conjunction with the conditions at https://github.com/anoma/namada/blob/main/documentation/specs/src/masp/ledger-integration.md#boundary-conditions , this would eliminate the need to inspect the components of |
@murisi Can this be closed now? |
Right now in the client, the epoch can change during the construction of a MASP transaction. And when this happens, the ledger simply rejects the submitted transaction, and then the client prints out an error. The client ought to detect when an epoch boundary is near enough to invalidate a transaction it would create, sleep till after the epoch changed, and then attempt to construct and submit a transaction.
@tzemanovic had suggested the following:
If there are any unexpected problems with the above approach, the client could instead attempt resubmitting the transaction at most once. This trick would work under the assumption that two consecutively submitted transactions cannot both be on epoch boundaries (for otherwise the epoch length for the network would be too short).
The text was updated successfully, but these errors were encountered: