Skip to content

Conversation

@silathdiir
Copy link
Contributor

@silathdiir silathdiir commented Feb 19, 2024

Summary

Close https://github.com/Lagrange-Labs/mapreduce-plonky2/issues/32

Implement this circuit according to Linking with Block Number.

  • Add a block-linking circuit, it's the main circuit composed by account-inputs, block-inputs and storage-proof gadgets.
  • The account-inputs gadget verifies the MPT sequential, and account node must contain the storage root hash.
  • The block-inputs gadget verifies the block header must contain the state root hash.
  • The storage-proof gadget is compatible for the previous storage proof (will be deleted after it's added in storage proof PR).
  • Add test cases to verify with generated random MPT and RPC eth_getProof.

@silathdiir silathdiir marked this pull request as draft February 19, 2024 11:30
@silathdiir silathdiir requested a review from nikkolasg February 21, 2024 04:00
Copy link
Collaborator

@nikkolasg nikkolasg left a comment

Choose a reason for hiding this comment

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

Looking good !!! Looking forward to see the tests !

@silathdiir silathdiir changed the title [WIP] feat: link state proof with block feat: link state proof with block Feb 23, 2024
@silathdiir silathdiir marked this pull request as ready for review February 23, 2024 12:47
@silathdiir silathdiir requested a review from nikkolasg February 23, 2024 12:47
Copy link
Collaborator

@nikkolasg nikkolasg left a comment

Choose a reason for hiding this comment

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

Well done ! A few nitpicks around organization and some comments, but should be good to merge soon imo !

Base automatically changed from feat/storage_mpt_key_derivation to feat/verify_contract_proof February 24, 2024 14:29
@silathdiir silathdiir changed the base branch from feat/verify_contract_proof to feat/storage_mpt_key_derivation February 24, 2024 14:38
@silathdiir silathdiir requested a review from nikkolasg February 24, 2024 14:48
Copy link
Contributor

@nicholas-mainardi nicholas-mainardi left a comment

Choose a reason for hiding this comment

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

LGTM now! Thanks for addressing all the issues. I did a commit with small changes to the block_header_decoding test

@nikkolasg nikkolasg merged commit 1c4b313 into main Mar 3, 2024
@silathdiir silathdiir deleted the feat/block-linking branch March 4, 2024 00:37
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.

Circuit: Bridge storage root -> contract -> state trie -> block header

4 participants