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

add: verkle proof aggregation for multiproof, and updated stateRoot #45

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

agnxsh
Copy link
Collaborator

@agnxsh agnxsh commented Oct 13, 2023

Fixes #42
Features for verkle state root proofs and verification:

  • wrapper functions for basic state root proofs
  • wrapper functions for replicating the same trie in rust and inserting key values
  • out of these operations
  • inserting sparse key-values
  • standard key-val insertion
  • inserting two different leaves under the same stem
  • inserting two different leaves under the 2 different stems
  • stateless updation of root
  • stateless updation of root using subtree

The idea of taking this approach is as follows:

  • Having different functions for different operational cases in the verkle trie
  • Preserving the Rust types, as according to rust-verkle almost every type has a ser/de
  • Dealing with only byte arrays in Java
  • Reconstructing the verkle trie in rust if needed, as the not preserving the types and manually trying to tweak the byte arrays before deserialize may cause data loss while porting over from the Java side.

Help Needed:

  • Rust uses something called MemoryDB, we need to study it's properties, as for most of the trie operations, values directly from the DB, either we mimic the properties of this DB.
  • Or, we figure out a way to enter values from Bonsai.

Note:
Contains unused imports, and maybe some logical bugs for edge cases, feel free to discuss.

@dragan2234
Copy link
Collaborator

Thanks for the PR @agnxsh

Rust uses something called MemoryDB, we need to study it's properties, as for most of the trie operations, values directly from the DB, either we mimic the properties of this DB.

I agree, and yes I think we need to mimic the properties of the DB since the DB is in the besu.

Reconstructing the verkle trie in rust if needed, as the not preserving the types and manually trying to tweak the byte arrays before deserialize may cause data loss while porting over from the Java side.

The idea is not to reconstruct the trie in rust, we are doing that in Java. But as a first step, while figuring out the problem, it's ok to do it. Feel free to experiment with the approach

@agnxsh
Copy link
Collaborator Author

agnxsh commented Oct 13, 2023

Yep

@agnxsh agnxsh changed the title add: verkle proof (rollup aggregation), needs further cleanup add: verkle proof aggregation for multiproof, and updated stateRoot Oct 13, 2023
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.

ENH: Rollup Pedersen Commitments
2 participants