feat(state): Write performance improvements#10447
Draft
arya2 wants to merge 11 commits intosyncer-performancefrom
Draft
feat(state): Write performance improvements#10447arya2 wants to merge 11 commits intosyncer-performancefrom
arya2 wants to merge 11 commits intosyncer-performancefrom
Conversation
a38a7be to
e07c0ae
Compare
…ize for improved performance fix(sync): reduce fanout for peer requests and adjust download retry probability
…he tip block context without mutation fix(chain): expose treestate method for public access
…t in-memory block commits
…int processing - Implemented a mechanism to check if the last checkpoint block has been committed to either the finalized or non-finalized state before proceeding with block writes. - Added a new function `lookup_spent_utxos` in `ZebraDb` to retrieve spent UTXOs and output locations for finalized blocks, enhancing the efficiency of UTXO lookups. - Updated the `write_block` method to accept pre-fetched spent UTXOs, allowing for more efficient block writing. - Introduced a pipeline for processing checkpoint-verified blocks, separating the tasks of committing to the non-finalized state and writing to disk to improve performance. - Added tests to verify the behavior of the new UTXO lookup functionality and ensure correct block writing when provided with spent UTXOs. - Created a default configuration file for `zebrad`, providing a skeleton for user customization.
…ck, and peek_finalize_tip - Test commit_checkpoint_block with genesis and sequential blocks - Test finalize() correctly pops root blocks after checkpoint commits - Test peek_finalize_tip returns tip without mutating state - Test full pipeline: checkpoint commit to NFS then finalize to disk - Test lookup_spent_utxos and write_block with provided UTXOs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…y for block processing
c5c7a1a to
4aab170
Compare
2 tasks
Contributor
|
Related: #10447 We might want to add benchmarks to this instead or in addition of some of the tests. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based On: #10442
AI Disclosure