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

Use B256 instead of U256 in access list keys #966

Closed
DaniPopes opened this issue Jan 10, 2024 · 2 comments
Closed

Use B256 instead of U256 in access list keys #966

DaniPopes opened this issue Jan 10, 2024 · 2 comments

Comments

@DaniPopes
Copy link
Collaborator

DaniPopes commented Jan 10, 2024

Both Reth and Foundry use B256 and have to use utilities to convert to U256:

I think the bigger problem here is that Revm uses U256 for all storage slot key and values, which has a different memory layout than B256.

@rakita
Copy link
Member

rakita commented Jan 11, 2024

U256 is used as the stack in revm is U256 and most of the instructions are done easier on u256 so the storage keys are all in u256.

There is a possible discussion if we would like for storage keys to be B256 types, then we do transition from stack U256 to B256 when SLOT/STORE are used but I feel that there will be slight downsides than the benefits.

I think the very beneficial thing for this will be Generics over Transaction: #916
would make this a lot easier to do.

@rakita
Copy link
Member

rakita commented Jan 12, 2024

Will close this in favor of #916

@rakita rakita closed this as completed Jan 12, 2024
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

No branches or pull requests

2 participants