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

perf(evm_arithmetization): Check for zero amount early in add_eth #322

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

Nashtare
Copy link
Collaborator

When calling add_eth, regardless if the target account already exists in the trie or not, sending a 0 amount will end-up being a no-op.
As such, we can skip trie access and journaling entries and exit early in such cases.

@Nashtare Nashtare added the performance Performance improvement related changes label Jun 24, 2024
@github-actions github-actions bot added the crate: evm_arithmetization Anything related to the evm_arithmetization crate. label Jun 24, 2024
Copy link
Contributor

@wborgeaud wborgeaud left a comment

Choose a reason for hiding this comment

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

LGTM

@Nashtare Nashtare merged commit a1880ce into develop Jun 25, 2024
11 checks passed
@Nashtare Nashtare deleted the add_eth_zero branch June 25, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crate: evm_arithmetization Anything related to the evm_arithmetization crate. performance Performance improvement related changes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants