feat(transaction-pool): enforce EIP-2681#16967
Merged
mattsse merged 7 commits intoparadigmxyz:mainfrom Jun 21, 2025
Merged
Conversation
mattsse
requested changes
Jun 20, 2025
|
|
||
| // Reject transactions with a nonce higher or equal to U64::max according to EIP-2681 | ||
| let tx_nonce = transaction.nonce(); | ||
| if tx_nonce >= u64::MAX { |
Collaborator
There was a problem hiding this comment.
= doesn't make sense we can just check for ==
Contributor
Author
There was a problem hiding this comment.
yep realised afterwards, thanks!
crates/transaction-pool/src/error.rs
Outdated
| /// Balance of account. | ||
| balance: U256, | ||
| }, | ||
| /// EIP-2681 error thrown if the nonce is higher or equal than U64::max |
mattsse
requested changes
Jun 20, 2025
Comment on lines
+778
to
+780
| /// EIP-2681 related error | ||
| #[error("nonce is not valid")] | ||
| Eip2681, |
Collaborator
There was a problem hiding this comment.
we can get rid of this and instead simply map this to RpcInvalidTransactionError::NonceMaxValue
which is the variant that we already have for this
mattsse
approved these changes
Jun 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #16966