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

EIP-compliant verkle tree #23563

Closed
wants to merge 33 commits into from

Conversation

gballet
Copy link
Member

@gballet gballet commented Sep 10, 2021

This PR adds a --verkle switch that makes geth use verkle trees instead of the MPT.

Summary of the changes:

  • Merges the storage and account trees (in a verkle context only)
  • Separate the tree root calculation from the actual storage of data
  • Keep track of code and storage chunks touched during the execution of a block
  • use only the snapshot for storage
  • change the block format to include proofs + witness
  • "stateless" block execution, solely based on the proof + witness
  • add proof verification for the pre- and post-states during stateless execution

Not included in this PR:

  • tree model switching: verkle trees must be used from the genesis block
  • fast/snap sync: only full sync works

Supersedes #23336

* test stateless block execution

* Force tree resolution before generating the proof

* increase coverage in stateless test execution
* Ensure stateless data is available when executing statelessly

* Actual execution of a statless block

* bugfixes in stateless block execution

* code cleanup

 - Reduce PR footprint by reverting NewEVM to its original signature
 - Move the access witness to the block context
 - prepare for a change in AW semantics
   Need to store the initial values.
 - Use the touch helper function, DRY

* revert the signature of MustCommit to its original form (#21)
* Fixes in witness pre-state

* Add the recipient's nonce to the witness

* reduce PR footprint and investigate issue in root state calculation

* quick build fix
@gballet gballet marked this pull request as ready for review September 22, 2021 17:58
@gballet gballet marked this pull request as draft September 22, 2021 17:59
@gballet
Copy link
Member Author

gballet commented Sep 24, 2021

Rebased at #23630

@gballet gballet closed this Sep 24, 2021
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.

None yet

1 participant