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

Post capella block verification #710

Merged
merged 22 commits into from
Jan 22, 2025
Merged

Conversation

acolytec3
Copy link
Collaborator

@acolytec3 acolytec3 commented Jan 16, 2025

  • Adds parsing of blocks from era files and better error handling
  • Adds a new post capella bridge script for constructing block header proofs rooted in HistoricalSummaries
  • Allow verification of post-capella headers based on having the HistoricalSummaries present
  • Cleans up header verification logic in HistoryNetwork.validateHeader
    • Verify that header data constructs a header with the same hash as the provided block hash
    • Switch header proof verification utilities to return boolean values instead of throwing

Copy link
Collaborator

@ScottyPoi ScottyPoi left a comment

Choose a reason for hiding this comment

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

Approving with minimal feedback. Some comments in the code explaining what is happening would be helpful.

@@ -55,6 +56,26 @@ export const deserializeE2Store = (bytes: Uint8Array): e2StoreEntry[] => {
return entries
}


function littleEndianToBigInt(bytes: Uint8Array) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

does the ethjs bytesToBigInt function not work here? It has a littleEndian: boolean = false parameter

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

When I switch to bytesToBigInt, my tests start failing so something's awry. Will research a bit more.

@ScottyPoi ScottyPoi force-pushed the post-capella-block-verification branch from 60fbbef to e65ce17 Compare January 22, 2025 21:31
@ScottyPoi ScottyPoi merged commit 19f8946 into master Jan 22, 2025
5 checks passed
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.

2 participants