juno
juno copied to clipboard
Address nonce
We need to support and maintain the nonce value for the addresses. This feature is required by the starknet_getNonce RPC endpoint.
nonce properties:
- Counts all the transactions made by an address
- Its value is relative to a block (or state root)
-
noncenever decreases. Thenoncefor addressXat blocki+1is always greater than or equal to thenonceat blocki
Solution proposal
We can store the nonce together with the storage root of the address, which means: in the Trie leaf resulting from traversing (following the address) the Trie from the block state root.
With the release of starknet 0.10.0 we have the nonce included on L1 and also fetchable from the Feeder Gateway