store: spent-range from RAM n_out only - #477
Closed
rearden-grok[bot] wants to merge 1 commit into
Closed
Conversation
Lookup was reconstructing spent.body (off,len) by preading txout.body to recover n_out. Class A already has n_out at append; keep that vec and make tx_spent_range* fail closed if it is missing instead of walking the body. Co-authored-by: Cursor <cursoragent@cursor.com>
4 tasks
Contributor
Author
|
Superseded by #484 (schema 22 restores |
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.
Summary
spent.idxand reconstructedspent.body(off,len)by preadingtxout.bodywindows forn_out. That is the IBDwave spent=blow-up vs 0.5.99.n_outat append. Keep it in RAM.tx_spent_range*prefix-sums that vec fromspent.offcheckpoints and never readstxout.body. Missingn_outisCorrupt("invariant: spent n_out missing").n_out). IBD lookup/write stay off the body.Test plan
spent_range_uses_append_n_out_not_txout_body— truncatetxout.bodyafter append; ranges still matchclass_a_append_does_not_write_spent_idx/open_unlinks_leftover_spent_idx(reopen hydrate)Made with Cursor