Skip to content

store: load-batch parent skeleton; drop LiveUnion - #275

Merged
reardencode merged 3 commits into
masterfrom
store/batch-parent-ids
Aug 26, 2026
Merged

store: load-batch parent skeleton; drop LiveUnion#275
reardencode merged 3 commits into
masterfrom
store/batch-parent-ids

Conversation

@rearden-grok

@rearden-grok rearden-grok Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

PR2 of the batch-parent-skeleton plan. Rebased on master after #277 (lookup-wave drain+fence snapshot on the last load batch).

  • Lookup TipOnly-fills BatchParentIds (create_fk + body/spent ranges + per-chunk need-vouts) onto each LoadBatch.
  • Load bind order is same-batch → in-flight → skeleton → Corrupt. IBD load does not leftover-probe tx.head.
  • LiveUnion / PublishedIds / layer_chain are deleted. plan=None / S0 still leftover TipOnly.
  • Lookup wave= nests spent= (tx_spent_range_batch for TipOnly hits). union= / keep= are gone from ibd: perf / ibd: sizes.
  • In-flight prune is confirm: drop in-flight below lookup-wave drain+fence snapshot #277: lookup snapshots drain_and_fence_hi before TipOnly and passes it on the last load batch; load drops tagged layers with max_height below that after the in-flight read. Equality keeps. Not until = lookup_started_hi.

Live pause (do not merge until operator IBD)

  • leftover_n=0 / pin_txid%=100 on IBD load (no Class A identity hits on the load thread).
  • union= gone from ibd: sizes.
  • No parent create_fk unresolved.
  • iflight= drops when a later wave's pre-TipOnly drain+fence snapshot is below the pack height and that wave's last load batch has finished its in-flight read.

#277 already zeroed leftover occupancy on a 473k restart. This PR is still the leftover=0 bind path (skeleton, no load TipOnly). Dropping in-flight on the #277 snapshot is required so pin can use skeleton ranges after the layer is gone.

Test plan

  • cargo test -p rbitcoin-query --lib -- stamp skeleton id_map archive_plan in_flight
  • cargo test -p rbitcoin-consensus --lib -- bq_resolve same_wave skeleton parent_pin
  • cargo test -p rbitcoin-net --lib -- chunk_parent perf_log confirm
  • Required CI green
  • Operator IBD leftover=0

Made with Cursor

@rearden-grok

rearden-grok Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Retrigger Actions: pull_request workflow did not schedule after open.

rearden-grok Bot and others added 3 commits August 26, 2026 11:41
A later height in the lookup wave that spends an earlier create must
not probe tx.head. Load binds those via same-batch or in-flight.

Co-authored-by: Cursor <cursoragent@cursor.com>
Lookup TipOnly-fills BatchParentIds (fk + body/spent ranges) onto each
LoadBatch. Load binds same-batch → in-flight → skeleton → Corrupt with
no leftover tx.head probe on IBD. PublishedIds / LiveUnion / layer_chain
are gone; hashers live in id_map.

Co-authored-by: Cursor <cursoragent@cursor.com>
Owner docs and ibd: perf drop union=/keep=. Bind order is same-batch →
in-flight → skeleton → Corrupt. In-flight prune stays the lookup-wave
drain+fence snapshot on the last load batch (#277).

Co-authored-by: Cursor <cursoragent@cursor.com>
@rearden-grok
rearden-grok Bot force-pushed the store/batch-parent-ids branch from d531d81 to 61c2e7a Compare August 26, 2026 18:52
@reardencode
reardencode merged commit 329d4d4 into master Aug 26, 2026
13 checks passed
@rearden-grok rearden-grok Bot mentioned this pull request Aug 26, 2026
6 tasks
@rearden-grok
rearden-grok Bot deleted the store/batch-parent-ids branch August 26, 2026 19:37
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