Skip to content

feat(transaction-pool): enforce EIP-2681#16967

Merged
mattsse merged 7 commits intoparadigmxyz:mainfrom
0xMushow:add-eip-2681-enforcement
Jun 21, 2025
Merged

feat(transaction-pool): enforce EIP-2681#16967
mattsse merged 7 commits intoparadigmxyz:mainfrom
0xMushow:add-eip-2681-enforcement

Conversation

@0xMushow
Copy link
Copy Markdown
Contributor

closes #16966

Copy link
Copy Markdown
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smol nit


// 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 {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

= doesn't make sense we can just check for ==

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep realised afterwards, thanks!

/// Balance of account.
balance: U256,
},
/// EIP-2681 error thrown if the nonce is higher or equal than U64::max
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we link the eip here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done :)

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Jun 20, 2025
Copy link
Copy Markdown
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smol nit

Comment on lines +778 to +780
/// EIP-2681 related error
#[error("nonce is not valid")]
Eip2681,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 mattsse added this pull request to the merge queue Jun 21, 2025
@mattsse mattsse added the A-tx-pool Related to the transaction mempool label Jun 21, 2025
Merged via the queue into paradigmxyz:main with commit b786710 Jun 21, 2025
44 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Jun 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-tx-pool Related to the transaction mempool

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Missing EIP-2681 validation

2 participants