Skip to content

confirm: drop in-flight below lookup-wave drain+fence snapshot - #277

Merged
reardencode merged 1 commit into
masterfrom
confirm/inflight-wave-drop
Aug 26, 2026
Merged

confirm: drop in-flight below lookup-wave drain+fence snapshot#277
reardencode merged 1 commit into
masterfrom
confirm/inflight-wave-drop

Conversation

@rearden-grok

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

Copy link
Copy Markdown
Contributor

Summary

  • Lookup snapshots drain_and_fence_hi before each wave's TipOnly read and puts that height on the last load batch of the wave.
  • After load finishes the in-flight read for that marked batch, it drops in-flight layers with max_height below the snapshot (equality keeps). Unmarked earlier batches of the same wave do not prune.
  • Replaces the until = lookup_started_hi layer stamp / prune_if_drain_fence path. Intended to land before store: load-batch parent skeleton; drop LiveUnion #275 for additional testing.

Test plan

  • cargo test -p rbitcoin-query --lib -- in_flight inflight_binds leftover_tiponly prune_below
  • cargo test -p rbitcoin-consensus -- taken_hi_tracks stamp_uses_inflight
  • cargo test -p rbitcoin-net -- last_sent_load_batch marked_load_batch prune_inflight confirm_engine_pins
  • Required GitHub Actions green (fmt / deny / clippy / ast-grep / test / windows / macos / multinode / coverage)

Made with Cursor

Lookup notes drain_and_fence_hi before TipOnly and rides it on the last
load batch of the wave. After that batch finishes its in-flight read,
load drops layers with max_height below the snapshot so TipOnly-covered
heights leave RAM without waiting on lookup_started_hi.

Co-authored-by: Cursor <cursoragent@cursor.com>
@reardencode
reardencode merged commit 034a8e0 into master Aug 26, 2026
13 checks passed
@rearden-grok
rearden-grok Bot deleted the confirm/inflight-wave-drop branch August 26, 2026 18:32
rearden-grok Bot added a commit that referenced this pull request Aug 26, 2026
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>
RandyMcMillan pushed a commit to RandyMcMillan/rbitcoin that referenced this pull request Aug 27, 2026
Replace InFlightLog/Layer/View with one HashMap (txid→fk, fk→CreatePin)
plus a height index. prune_below_height still drops strictly below the
reardencode#277 drain+fence snapshot; equality keeps because that height may be a
partial drain. Snapshot isolation is gone: load notes after stamp.

Co-authored-by: Cursor <cursoragent@cursor.com>
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