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

Update block hash computation #3941

Closed
Tracked by #3533
benesjan opened this issue Jan 11, 2024 · 1 comment · Fixed by #4286
Closed
Tracked by #3533

Update block hash computation #3941

benesjan opened this issue Jan 11, 2024 · 1 comment · Fixed by #4286
Assignees

Comments

@benesjan
Copy link
Contributor

benesjan commented Jan 11, 2024

Look for TODO(#3941) in the codebase.

Note: When I was logging calls to computeBlockHash in 1 test the function was called with the same value 3 times. Make sure this value gets stored on the Header object as it is expensive to compute.

@LHerskind
Copy link
Contributor

This should be the hash of the header. See https://github.com/ethereum/go-ethereum/blob/f55a10b64d511b27beb02ff4978a6ed66d604cd8/core/types/block.go#L114 for geth code.

@LHerskind LHerskind changed the title Re-think what the block hash is and how it should be calculated. Update block hash computation Jan 28, 2024
@LHerskind LHerskind moved this from Todo to Blocked in A3 Jan 29, 2024
benesjan added a commit that referenced this issue Jan 30, 2024
@LHerskind LHerskind moved this from Blocked to Todo in A3 Jan 30, 2024
@benesjan benesjan moved this from Todo to In Progress in A3 Jan 30, 2024
benesjan added a commit that referenced this issue Jan 31, 2024
Fixes #3941
+ renamed AppendOnlyTreeSnapshot.empty() as
AppendOnlyTreeSnapshot.zero() to have it consistent with Noir

**Note**: I did a large refactor of `MerkleTrees` class because with
this change a lot of stuff there just didn't make sense anymore. Overall
I think it's much cleaner now.
@github-project-automation github-project-automation bot moved this from In Progress to Done in A3 Jan 31, 2024
michaelelliot pushed a commit to Swoir/noir_rs that referenced this issue Feb 28, 2024
Fixes AztecProtocol#3941
+ renamed AppendOnlyTreeSnapshot.empty() as
AppendOnlyTreeSnapshot.zero() to have it consistent with Noir

**Note**: I did a large refactor of `MerkleTrees` class because with
this change a lot of stuff there just didn't make sense anymore. Overall
I think it's much cleaner now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants