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

Incorrect block header items used in prover.js generateRandaoProof() #84

Closed
alexbabits opened this issue May 7, 2024 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@alexbabits
Copy link

Location of Problem

async function generateRandaoProof(block) {

Problem

Block header items are not correct for current blocks (Cancun era), this would lead to incorrect block hash recreation.

Solution

See this post, scroll to bottom: https://ethereum.stackexchange.com/questions/163229/how-to-verify-block-hash-post-merge-block-15-5m.

My concern is that the generateRandaoProof() is incorrect, because it does not match what I found to be the correct block header items needed to recreate the block hash from a block header.

@alexbabits alexbabits added the bug Something isn't working label May 7, 2024
@qizhou
Copy link
Contributor

qizhou commented May 21, 2024

The block hash should be correct, and generateRandaoProof() misses some fields introduced in Cancun. A quick fix in #85 will add these field in the header.

@qizhou qizhou closed this as completed May 21, 2024
@qizhou qizhou reopened this May 21, 2024
@syntrust
Copy link
Contributor

Another fix #90 is merged to handle the zero number correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants