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
area:stateRelated to fetching state and state execution
1 participant
Converted from issue
This discussion was converted from issue #2389 on December 20, 2023 11:04.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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
Beta Was this translation helpful? Give feedback.
All reactions