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

Merkle handling in PagedDb #122

Open
5 tasks done
Scooletz opened this issue Aug 9, 2023 · 1 comment
Open
5 tasks done

Merkle handling in PagedDb #122

Scooletz opened this issue Aug 9, 2023 · 1 comment
Assignees
Labels
ethereum An Ethereum specific work item that requires a good understanding of Eth 🌴Merkle Merkle construct

Comments

@Scooletz
Copy link
Contributor

Scooletz commented Aug 9, 2023

Amend PageDb component so that it support Merkle construct.

  • revisit existing maps (NibbleBasedMap and HashingMap) to see whether they fit the nature of Merkle, that can have keys and values pretty small, when comparing with others Map unification into SlottedArray #131
  • leave some allowance on each internal Page to keep the MPT. Calculate how much memory will be needed and get it from the in-page cache component. This will limit the memory a bit, but will fix a blow up on truncating the path. Write-through cache reintroduced #134
  • allow applying deletes (set operation with value of Span<byte>.Empty) and propagate it in the tree DB deletes #138
  • Massive Storage Tree should search for Merkle keys as well, so that the Merkle information about the storage is also extracted DB deletes #138
  • apply Refactor RootPage to just point to DataPage #118 by allowing the root of MPT be held in the first DataPage

Additional notes, covered by the points above. Keys are much shorter than other keys used in the PagedDb. As PagedDb is path based, it uses full addresses of accounts and account+storage for storage. As it truncates one nibble per level of the page tree, it requires to leave some space for Merkle values as its keys will be much shorter, for example for the root, they will be of length of 0.

@Scooletz Scooletz added ethereum An Ethereum specific work item that requires a good understanding of Eth 🌴Merkle Merkle construct labels Aug 9, 2023
@Scooletz Scooletz mentioned this issue Aug 9, 2023
10 tasks
@Scooletz
Copy link
Contributor Author

It might require #118

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ethereum An Ethereum specific work item that requires a good understanding of Eth 🌴Merkle Merkle construct
Projects
Status: Done
Development

No branches or pull requests

1 participant