Skip to content

confirm: loadq=8 + IBD RAM meters (one RecentCreates Arc) - #134

Merged
reardencode merged 12 commits into
masterfrom
confirm/ibd-ram
Aug 18, 2026
Merged

confirm: loadq=8 + IBD RAM meters (one RecentCreates Arc)#134
reardencode merged 12 commits into
masterfrom
confirm/ibd-ram

Conversation

@rearden-grok

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

Copy link
Copy Markdown
Contributor

Why

Lookup is fat again (decode + precompute + TipOnly). Load was gated on BQ
ready= / promote-in-place. Process RSS meters were also a hole (residual
and a duplicate RecentCreates map).

What

RAM (#134 original):

  1. ibd: sizes names union= / h2h= / fence= / recent= live=/pub=/ov= fifo= (in accounted).
  2. One published RecentCreates Arc (no second live HashMap).

Lookup→load queue:
3. Lookup walks BQ in order from path_lo (stops at the first hole).
4. On emit, lookup dequeues raw and sends load-sized batches on loadq=8.
5. Load recvs; it does not pack or re-decode from BQ.
6. Densify / offer skip H <= lookup_taken_hi.
7. RecentCreates horizon is EWMA(lookup_taken_hi − tip)+25% (floor 32, cap 32×144).
8. Logs: loadq=n/8; ready= / bq_dec= are not queue tokens. LiveUnion stays.

Test

cargo test -p rbitcoin-store --lib unresolved_heights
cargo test -p rbitcoin-query --lib lookup_take recent_creates
cargo test -p rbitcoin-consensus --lib bq_resolve
cargo test -p rbitcoin-net --lib split_wave load_recv lookup_blocks format_sizes confirm_engine

Do not merge unless asked.

rearden-grok Bot added 2 commits August 18, 2026 11:37
residual≈1.7GiB on the host was a meter hole. Count PublishedIds
layers, hash→height, fence runs, and the duplicate RecentCreates
maps separately so accounted includes them. No behavior change.
Inner.live was a full clone of the 1.6M-key map beside ArcSwap
(~150–200MiB extra, plus a 680ms write memcpy). Overlay/tombstones
already hold unflushed notes. publish_if_dirty now builds one Arc
from published ⊕ overlay ⊖ dead. Steady-state recent RAM is one map
+ fifo. leftover get/stamp contract unchanged.
rearden-grok Bot added 7 commits August 18, 2026 11:39
unresolved_heights skipped missing path_lo and resolved later
heights. Lookup is in-order again: walk from path_lo and break on
the first height not on the queue. Complete / skip are not a gap.
Lookup will fill eight load-sized batches (same pack_stop_after
as 8000 inputs / 144 blocks). Claim-ahead includes the new cap.
The channel is not wired yet.
take_raw removes the row and returns the payload. lookup_taken_hi
is the contiguous consume water-mark (MAX = none). Densify and
offer skip H <= taken_hi so in-flight loadq bodies are not
re-getdata'd. Lookup still promotes until loadq is wired.
confirm_bq_resolve_wave takes raw rows on emit (hold leaves them)
and returns decoded items. Lookup slices those into load-sized
batches and blocking-sends onto loadq. Load recvs; it no longer
packs or re-decodes from BQ. Densify already skips taken_hi.
Drop 2×soft_win (floor 256). Horizon is clamp(ewma+ewma/4, 32,
32*144) so the ring matches the in-order pipeline, not the 1-min
BQ window. LiveUnion keep uses the same lead span.
progress/perf/sizes print the real lookup→load channel. accounted
includes loadq wire. #134 union=/h2h=/fence=/recent= tokens stay.
Owner docs match the shipped pipeline: lookup dequeues into loadq,
densify uses lookup_taken_hi, RecentCreates is no longer 2×soft_win.
@rearden-grok rearden-grok Bot changed the title confirm: meter IBD residual RAM; one RecentCreates Arc confirm: loadq=8 + IBD RAM meters (one RecentCreates Arc) Aug 18, 2026
reardencode and others added 3 commits August 18, 2026 12:03
CI -Dwarnings failed: take_raw used a single-arm match, and four
pack/claim helpers were test-only after loadq replaced BQ pack.
The DEBUG perf line uses format_conf_q. After loadq replaced the
fake ready= queue token the pin still looked for ready=0.
@reardencode
reardencode merged commit 03e728f into master Aug 18, 2026
13 checks passed
@rearden-grok
rearden-grok Bot deleted the confirm/ibd-ram branch August 18, 2026 19:27
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