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

Refactor bonsai in order to add verkle storage format #6627

Closed
matkt opened this issue Feb 28, 2024 · 1 comment
Closed

Refactor bonsai in order to add verkle storage format #6627

matkt opened this issue Feb 28, 2024 · 1 comment
Assignees
Labels
bonsai in-progress Epic being worked on by a workstream mainnet TeamChupa GH issues worked on by Chupacabara Team TeamGroot GH issues worked on by Groot Team verkle

Comments

@matkt
Copy link
Contributor

matkt commented Feb 28, 2024

Start a refactor to simplify the integration of Verkle into Besu. For this, I’ve made several PRs to facilitate the review, even though some are a bit more complicated to review than others.

  • The first one, which is already merged, added the prefix ‘forest’ to all the forest classes to improve code readability. ✔️

  • The second one, also already merged, was a refactor at the package level to have a package that groups forest and bonsai. ✔️

  • The third one will allow us to no longer have a single KeyValueStorage interface for all storage formats as this makes the code unreadable. I’ve made sure that each storage format has its own methods (for example, forest doesn’t have the ‘location’ field in its interface). I’ve also added a coordinator for the parts that need to call forest or bonsai without really knowing. It will allow for routing. But in most of the code, we know if we are in a bonsai or forest context, so having a generic interface is unnecessary. worldstate refactor #6209

  • The fourth one will allow for a refactor of bonsai to have common classes between Verkle and bonsai. A lot of things will be used, but we can’t use bonsai as it is. This refactor will therefore allow the addition of Verkle. Bonsai and Verkle will be a common package called ‘diffbased’, and inside it will have three packages (common, verkle, bonsai). Diffbased will be next to forest.

  • The last one will be the addition of Verkle trie log under a Verkle flag for now.

For example :

  • besu
    • ethereum
      • diffbased
        • common
        • verkle
        • bonsai
      • forest
@matkt matkt added the TeamChupa GH issues worked on by Chupacabara Team label Feb 28, 2024
@matkt matkt self-assigned this Feb 28, 2024
@matkt matkt added TeamGroot GH issues worked on by Groot Team mainnet verkle bonsai in-progress Epic being worked on by a workstream labels Feb 28, 2024
@matkt
Copy link
Contributor Author

matkt commented Feb 28, 2024

First PR #6209

@matkt matkt closed this as completed Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bonsai in-progress Epic being worked on by a workstream mainnet TeamChupa GH issues worked on by Chupacabara Team TeamGroot GH issues worked on by Groot Team verkle
Projects
None yet
Development

No branches or pull requests

1 participant