Skip to content

feat: add no-local-exemptions settings to MaintainPoolConfig #15651

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

Merged
merged 3 commits into from
Apr 10, 2025

Conversation

stevencartavia
Copy link
Contributor

closes #15638

Copy link
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.

nits, we also need to configure this when we create it

reth_transaction_pool::maintain::MaintainPoolConfig {

/// This includes:
/// - no price exemptions
/// - no eviction exemptions
pub no_exemptions: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
pub no_exemptions: bool,
pub no_local_exemptions: bool,

Comment on lines 268 to 275
// filter stale transactions based on config
if config.no_exemptions {
// if no exemptions, treat all transactions the same
tx.timestamp.elapsed() > config.max_tx_lifetime
} else {
// only evict external transactions
tx.origin.is_external() && tx.timestamp.elapsed() > config.max_tx_lifetime
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can simplify this a bit by combining the first tx.origin.is_external() with config.no_exemptions

(config.no_exemptions || tx.origin.is_external())

@github-project-automation github-project-automation bot moved this from Backlog to In Progress in Reth Tracker Apr 10, 2025
@mattsse mattsse added the A-tx-pool Related to the transaction mempool label Apr 10, 2025
@stevencartavia stevencartavia requested a review from Rjected as a code owner April 10, 2025 06:23
@mattsse mattsse requested a review from fgimenez as a code owner April 10, 2025 07:14
Copy link
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.

lgtm, ty

@mattsse mattsse added this pull request to the merge queue Apr 10, 2025
Merged via the queue into paradigmxyz:main with commit 3cf0d0d Apr 10, 2025
43 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Reth Tracker Apr 10, 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.

Add no-local-exemptions settings to MaintainPoolConfig
2 participants