-
Notifications
You must be signed in to change notification settings - Fork 391
feat(cli): add get-user-first-nonce + get-user-number-queued-proofs cli commands #1553
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
Conversation
c8fe0c4 to
f86cd63
Compare
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, we have to use get_nonce_from_ethereum in batcher/aligned-sdk/src/sdk.rs:633, which returns the next nonce from Ethereum for a given address. This will simplify the code a lot and we should update the docs explaining how this method can be useful.
f86cd63 to
3f61db1
Compare
JulianVentura
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got some unexpected behavior while testing it locally that should be discussed offline
This error was related to the usage of non paying addresses. It works as expected for paying addresses |
JulianVentura
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and works as expected locally
avilagaston9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good and works in my machine!
JuArce
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs is outdated
Add
get-user-first-nonceto cliDescription
Adds a function to the aligned-cli
get-user-first-nonceto retrieve the users nonce from ethereum. This is useful in scenarios where you need to replace your proofs with higher fees. For that, you'll need the first proof's nonce corresponding to the value in theBatcherPaymentServicecontract.Adds a function to the aligned-cli
get-user-number-queued-proofsto retrieve the number of proofs a user has in the batcher queue.To Test:
You should see it is 0.
You should see it is <BURST_SIZE>
nonceyou got from the Ethereum:Type of change
Please delete options that are not relevant.
Checklist
testnet, everything else tostaging