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

[zero zkEVM] - remove unnecessary smt logic #1191

Closed
krlosMata opened this issue Sep 18, 2024 · 2 comments
Closed

[zero zkEVM] - remove unnecessary smt logic #1191

krlosMata opened this issue Sep 18, 2024 · 2 comments
Assignees
Labels
zero zkEVM Ticket specific to Polygon Zero zkEVM

Comments

@krlosMata
Copy link

Rationale

Some storage slots in hermez SMT are specific to the hermez protocol. Therefore, some of them could be removed since zero protocol differs on how some variables are computed/loaded from the circuit perspective
This issue aims to summarize all storage slots that are not needed for Zero prover:

ADDRESS_SYSTEM address

  • ADDRESS_SYSTEM: BlockInfoTreeRoot
    • blockInfoTree is no longer needed
    • zero uses native blockhash validation (same as Ethereum)
    • No need to write in this storage slot
  • ADDRESS_SYSTEM: mapping stateRoot
    • mapping to store all state-roots which are the blockjhahes for each block in a mapping like mapping(uint256 blockNum => bytes32) blockToBlockHash;
    • zero gets previous 256 blockhahes from an input which a commitment to the previous 256 blockhashes
    • no need to store them
  • ADDRESS_SYSTEM: lastBlock
    • hermez protocol ensures contiguity on block numbers through this storage slot in the state-tree
    • zero ensures contiguity via the parentHash
    • no need to write this storage slot
  • ADDRESS_SYSTEM: timestamp
    • same as before, but this time related to the timestamp
@krlosMata krlosMata added the zero zkEVM Ticket specific to Polygon Zero zkEVM label Sep 18, 2024
@mandrigin mandrigin added this to the v2.61.x (zero prover) milestone Oct 30, 2024
@rachit77
Copy link

rachit77 commented Nov 14, 2024

This PR which is merged fixes this issue.

@Stefan-Ethernal
Copy link
Collaborator

Marking as done per #1191 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
zero zkEVM Ticket specific to Polygon Zero zkEVM
Projects
None yet
Development

No branches or pull requests

6 participants