Skip to content

Optimization and Refractor: UTXO index and database iterators. #814

Open
D-Stacks wants to merge 19 commits intokaspanet:masterfrom
D-Stacks:opt_utxo_resync_with_owend_iter
Open

Optimization and Refractor: UTXO index and database iterators. #814
D-Stacks wants to merge 19 commits intokaspanet:masterfrom
D-Stacks:opt_utxo_resync_with_owend_iter

Conversation

@D-Stacks
Copy link
Collaborator

@D-Stacks D-Stacks commented Jan 12, 2026

credit for the pretty awesome iterator_owned goes out to: @biryukovmaxim.

This is kind of a half optimization / half refractor PR.

Actual optimization is basically just in the usage of batch writes for utxo index resync and updates (which gives about 30-50% reduction in utxoindex resync duration, although this might be hardware dependent), but along the way I refactored a bunch of code regarding the utxoindex resync to be more optimal "in theory". Also increased readability of database iterators, these now supply the keys as actual TKey, so no manual deserialization is needed elsewhere, such as in the stores (which seems out-of-character), and it all happens under-the-hood. The Utxo Index also now gives log output to show progress.

Ready for Review

@D-Stacks D-Stacks changed the title Optimization and Refracor: Make utxo index resync more streamlined & faster, refractor of db access iterators, adopt batch writing in utxoinex. Optimization and Refractor: UTXO index and database iterators. Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant