Skip to content

Create real-world test #7

Open
Open

Description

Verkle trees behave different than Hexary Merkle trees in terms of performance (both CPU and RAM).
We need to tune the performance to match our use cases, by choosing appropriate data structures and algorithms.
For that, it would be helpful to use real-world samples of access to the Merkle tree, and translate them to access to the Verkle tree.

Todo:

  • Take ~10000 consecutive blocks of ethereum (~1 day)
  • Execute the transactions and contracts
  • Whenever a transaction/contract depends on state from before our block range, dump that state into a binary file; this will be the "setup"
  • Whenever a transaction/contract reads or writes data, dump these operations into a binary file; this will be the "execution"
  • The data format should be translated from the merkle kvp structure to verkle kvp structure
  • Write this data in a dense binary format and push to repository (should be <50mb, or use less blocks)
  • The "setup" data can be used to pre-populate the sample tree
    • This will provide a real-world sample of how the full tree will look like
    • Compute some stats:
      • How many nodes have a single child?
      • What's the median number of children per node?
      • Make a histogram of # of children for internal nodes, as well as values leaf nodes
    • This will help understand what RAM optimizations can be done
  • The "execution" data can be used to:
    • Create a realistic benchmark, which we can use to asses how a certain change to the code affects performance
    • Profile the code to tune performance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions