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

[chainstate] defer trie root hash calculation until no more writes will occur on the trie #3041

Closed
jcnelson opened this issue Feb 10, 2022 · 1 comment
Assignees
Labels

Comments

@jcnelson
Copy link
Member

Right now, writing nodes to a trie in the MARF consumes in aggregate a lot of time, because each time a leaf is inserted, the trie root hash is recalculated. This is unnecessary; the root hash only needs to be calculated once we're done writing leaf nodes. To implement this, the MARF needs a seal() operation that (a) calculates the trie root hash and the MARF root hash in the uncommitted state and stores it there, and (b) prevents subsequent writes from happening on the uncommitted state. Reads and transaction abort/commit will continue to be permitted.

@blockstack-devops
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants