Skip to content

Conversation

@MatusKysel
Copy link

No description provided.

@davidtaikocha davidtaikocha changed the title feat: implement jumpdest limiter feat(evm): implement jumpdest limiter Nov 25, 2025
impl<CTX> Inspector<CTX, EthInterpreter> for JumpdestLimiter {
fn initialize_interp(&mut self, _interp: &mut Interpreter<EthInterpreter>, _ctx: &mut CTX) {
// Reset per top-level transaction.
self.count = 0;
Copy link
Member

Choose a reason for hiding this comment

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

resets count in initialize_interp, which revm calls for every frame (each CALL/CREATE). After the first call, the earlier JUMPDEST executions are forgotten, so the limiter effectively applies per frame, not per top-level transaction as the comment suggests; a contract can bypass the limit by recursing. Reset only when depth is 0 (e.g., via ctx.journaled_state.depth()) or reset once per tx outside the frame init path.

Copy link
Author

Choose a reason for hiding this comment

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

thanks, I found out when I was writing tests, next commit is fixing it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(consensus): research and PoC of zk gas filter implementation

4 participants