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

Tree hook for persisting blocks #9235

Closed
Rjected opened this issue Jul 1, 2024 · 0 comments · Fixed by #9365
Closed

Tree hook for persisting blocks #9235

Rjected opened this issue Jul 1, 2024 · 0 comments · Fixed by #9365
Assignees
Labels
A-blockchain-tree Related to sidechains, reorgs and pending blocks C-enhancement New feature or request

Comments

@Rjected
Copy link
Member

Rjected commented Jul 1, 2024

In the new engine design (#8742) we have a persistence thread, which can persist blocks that are in-memory. The in-memory tree actually contains the blocks, and should be responsible for telling the persistence task to write some of those blocks.

A PersistenceHandle should be added to the new tree, and the tree should send an action when the current canonical chain exceeds a certain number of blocks. This will mean collecting and cloning a section of the tree, creating an action, and sending it using the handle. This will also require implementing a hook that determines when to do this, based on the length of the canonical chain.

@Rjected Rjected added C-enhancement New feature or request A-blockchain-tree Related to sidechains, reorgs and pending blocks labels Jul 1, 2024
@fgimenez fgimenez self-assigned this Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-blockchain-tree Related to sidechains, reorgs and pending blocks C-enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants