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

Don't use U256 operation in EIP-2935 BLOCKHASH #1423

Open
DaniPopes opened this issue May 16, 2024 · 5 comments · May be fixed by #1505
Open

Don't use U256 operation in EIP-2935 BLOCKHASH #1423

DaniPopes opened this issue May 16, 2024 · 5 comments · May be fixed by #1505
Labels
good first issue Good for newcomers refactor Refactor of the code

Comments

@DaniPopes
Copy link
Collaborator

since the window is lower than u64::MAX we can use the lowest word and use u64 modulo operation instead of U256 for better performance.

@rakita rakita added good first issue Good for newcomers refactor Refactor of the code labels May 23, 2024
@ThreeHrSleep
Copy link

Hey! Can I take this?

@DaniPopes
Copy link
Collaborator Author

Sure! The relevant operation is in https://github.com/bluealloy/revm/blob/main/crates/revm/src/context.rs#L134

@ThreeHrSleep
Copy link

ThreeHrSleep commented May 25, 2024

Is this issue still relevant? as the operation has been removed in #1450 (sorry if the question sounds dumb)

@rakita
Copy link
Member

rakita commented May 25, 2024

Still is relevant, change Host and Database trait to use u64 and whatever breaks after it

@ThreeHrSleep
Copy link

Sorry for the delay,I somehow broke a lot of things ..still trying to fix those..will try to make the PR soon

@TropicalDog17 TropicalDog17 linked a pull request Jun 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactor Refactor of the code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants