Skip to content
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

Improve rpc error for nonce too low #10498

Closed
Tracked by #10464
mattsse opened this issue Aug 24, 2024 · 5 comments
Closed
Tracked by #10464

Improve rpc error for nonce too low #10498

mattsse opened this issue Aug 24, 2024 · 5 comments
Assignees
Labels
A-rpc Related to the RPC implementation C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Aug 24, 2024

Describe the feature

ref #10464

the current error isn't very helpful: nonce too low

ideally we want:

nonce too low: next nonce 72, tx nonce 71

the revm type even has this already:

    NonceTooLow {
        tx: u64,
        state: u64,
    },

so it's just a matter of integrating this in the rpc error:

/// returned if the nonce of a transaction is lower than the one present in the local chain.
#[error("nonce too low")]
NonceTooLow,

Additional context

cc @ShantelPeters

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Aug 24, 2024
@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started A-rpc Related to the RPC implementation and removed S-needs-triage This issue needs to be labelled labels Aug 24, 2024
@i-sangh
Copy link

i-sangh commented Aug 24, 2024

Hey mattsse!
Can I have a try solving this.
Would be my first time contribution, so looking for some guidance around!

@mattsse
Copy link
Collaborator Author

mattsse commented Aug 24, 2024

cool, assigned,

if you're stuck, please open a draft pr and we can take it from there

@i-sangh
Copy link

i-sangh commented Aug 25, 2024

Hey mattsse,
I have send a PR, I was receiving a message saying
"Merging is blocked
Merging can be performed automatically with 1 approving review."
Don't know much about it, but for the issue #10498 tried my best!

@PanGan21
Copy link
Contributor

PanGan21 commented Sep 5, 2024

Hi guys, I saw that this issue is still open and I thought to continue the work of #10464 since it is closed.
I added some part of it in #10711 pr. Please let me know what you think.

@mattsse mattsse closed this as completed Sep 6, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Reth Tracker Sep 6, 2024
@mattsse
Copy link
Collaborator Author

mattsse commented Sep 6, 2024

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-enhancement New feature or request D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants