You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before sending a transaction, the node requests the sequence number from the state.
Problem
You can't send multiple transactions to be included in one block because they will have the same bounce.
One roundtrip latency to APP node before sending TX
Solution
Nounce/sequence management:
Fetch current nounce on StateModule start per each account registered the node(currently one only)
Maintain a local state of the nounces per account
Increment them every time a new tx is sent
Caveats
Doesn't support cases where multiple transactions are sent from the same account but from different wallets. (the only real solution here is a mempool connection between wallets)
Impl Details
Keyring.Signer, which is available on the CoreAccessor has QueryAccountNumber method that needs to be called on start only instead of per each TX to use the nounce node keeps and to avoid roundtrip problem
Before sending each transaction nounce has to be incremented on the node through SetSequence method
Current state
Before sending a transaction, the node requests the sequence number from the state.
Problem
Solution
Nounce/sequence management:
Caveats
Doesn't support cases where multiple transactions are sent from the same account but from different wallets. (the only real solution here is a mempool connection between wallets)
Impl Details
Keyring.Signer
, which is available on theCoreAccessor
hasQueryAccountNumber
method that needs to be called on start only instead of per each TX to use the nounce node keeps and to avoid roundtrip problemSetSequence
methodRefs
Further improvements to this workflow on the app side: celestiaorg/celestia-app#1910
The text was updated successfully, but these errors were encountered: