Skip to content

feat: pass evm config to pool components builder#8

Merged
rezzmah merged 1 commit intorezzmah:21018-configurable-evm-execution-limitsfrom
klkvr:klkvr/configure-evm-pool
Jan 26, 2026
Merged

feat: pass evm config to pool components builder#8
rezzmah merged 1 commit intorezzmah:21018-configurable-evm-execution-limitsfrom
klkvr:klkvr/configure-evm-pool

Conversation

@klkvr
Copy link

@klkvr klkvr commented Jan 24, 2026

This passes the EVM config to the pool components builder, allowing pool validation to use configurable EVM execution limits.

targets paradigmxyz#21088

+ FromRecoveredTx<TxTy<Self::Primitives>>
+ FromTxWithEncoded<TxTy<Self::Primitives>>,
Precompiles = PrecompilesMap,
Spec: Into<SpecId>,
Copy link
Author

Choose a reason for hiding this comment

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

this is enforced by revm's Cfg trait so practically any evm spec likely implements this

Copy link

@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.

while this changes some apis, I think this is the right deisgn because pool validation is kinda closely coupled with the evm now or at least we want to make this easy

Comment on lines +785 to +796
// Get EVM limits from evm_config.evm_env()
let evm_env = self
.evm_config
.evm_env(new_tip_block)
.expect("evm_env should not fail for executed block");

self.fork_tracker
.max_initcode_size
.store(evm_env.cfg_env.max_initcode_size(), std::sync::atomic::Ordering::Relaxed);
self.fork_tracker
.tx_gas_limit_cap
.store(evm_env.cfg_env.tx_gas_limit_cap(), std::sync::atomic::Ordering::Relaxed);
Copy link
Owner

Choose a reason for hiding this comment

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

nice 🔥

// Get EVM limits from evm_config.evm_env()
let evm_env = self
.evm_config
.evm_env(new_tip_block)
Copy link
Owner

@rezzmah rezzmah Jan 26, 2026

Choose a reason for hiding this comment

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

q: is there an off by 1 error on fork blocks?

if the next block after new_tip_block is the fork block with a new evm_env, then the mempool will not correctly reject transactions.
This is still fine if the reth builder correctly discards the invalid txs at a later stage and it's only 1 block of potentially excess work/suboptimal block.

No way around it without knowing/predicting next block timestamp
(this concern wasn't introduced in this PR)

@rezzmah rezzmah merged commit 565bd31 into rezzmah:21018-configurable-evm-execution-limits Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants