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

trie/utils: remove useless SetZero for verkle #30472

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

zhiqiangxu
Copy link
Contributor

@zhiqiangxu zhiqiangxu commented Sep 20, 2024

The default value of fr.Element is already zero, you can see the evidence in go-verkle here:

  1. https://github.com/ethereum/go-verkle/blob/dffa7562dbe971a9776f43795d49177a18ecb5c8/tree.go#L273

  2. https://github.com/ethereum/go-verkle/blob/dffa7562dbe971a9776f43795d49177a18ecb5c8/tree.go#L294

It doesn't call SetZero for those already zeroed fr.Elements.

@zhiqiangxu zhiqiangxu changed the title remove useless SetZero trie/utils: remove useless SetZero for verkle Sep 20, 2024
Copy link
Member

@gballet gballet left a comment

Choose a reason for hiding this comment

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

probably fine, but I'm blocking this until I was able to check on a testnet

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM

@holiman
Copy link
Contributor

holiman commented Nov 8, 2024

probably fine, but I'm blocking this until I was able to check on a testnet

Nah, there is nothing to check. It is how go works.

@holiman holiman merged commit 896fc51 into ethereum:master Nov 8, 2024
2 checks passed
@holiman holiman added this to the 1.14.12 milestone Nov 8, 2024
zfy0701 pushed a commit to sentioxyz/go-ethereum that referenced this pull request Dec 3, 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

Successfully merging this pull request may close these issues.

4 participants