Skip to content
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

feat: simplify AccessListInspector API #256

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

klkvr
Copy link
Contributor

@klkvr klkvr commented Jan 24, 2025

Right now caller is required to provide AccessListInspector with the list of precompiles which is unnecessary and requires caller to peek into EVM internals. Besides making API more complex this also results in reth not excluding p256 OP precompile when preparing access list https://github.com/paradigmxyz/reth/blob/890507a98adef94b3970312ef796eb40f87206df/crates/rpc/rpc-eth-api/src/helpers/call.rs#L430-L431

This PR changes AccessListInspector to obtain from, to and precompiles from the top-level frame and not requiring caller to provide anything

Copy link
Contributor

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

this makes a lot of sense, the overhead of checking depth 0 is negligible imo

src/access_list.rs Outdated Show resolved Hide resolved
src/access_list.rs Show resolved Hide resolved
src/access_list.rs Show resolved Hide resolved
@mattsse mattsse merged commit f7e6249 into paradigmxyz:main Jan 24, 2025
11 checks passed
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.

2 participants