astriaorg / astria

A monorepo containing all the custom components of the Astria network, a decentralized system that replaces traditional sequencers, offering a shared, permissionless sequencer network.
https://www.astria.org/
Apache License 2.0
103 stars 67 forks source link

sequencer: have mempool expose highest nonce stored for account #1151

Open Lilyjjo opened 4 weeks ago

Lilyjjo commented 4 weeks ago

It'd be convenient for users if they could ask the sequencer for the next nonce to use for an account. This would aid composer services if they had to restart with transactions in flight. TODO if the endpoint returns the highest nonce stored or the next nonce to use if a nonce gap is present (maybe both?).

noot commented 3 weeks ago

this already exists in the pending nonce endpoint: https://github.com/astriaorg/astria/blob/main/crates/astria-sequencer/src/grpc/sequencer.rs#L166