query: --prune-inwit watermark, NETWORK_LIMITED, Core -8 - #654
Open
rearden-grok[bot] wants to merge 12 commits into
Open
rearden-grok[bot] wants to merge 12 commits into
rearden-grok[bot] wants to merge 12 commits into
Conversation
rearden-grok
Bot
force-pushed
the
net/cjdns
branch
from
September 20, 2026 02:03
f092d40 to
9359caf
Compare
rearden-grok
Bot
force-pushed
the
store/inwit-prune
branch
from
September 20, 2026 02:03
bf82400 to
d0c3969
Compare
13 tasks
rearden-grok
Bot
force-pushed
the
net/cjdns
branch
from
September 20, 2026 21:15
9359caf to
9026ec5
Compare
rearden-grok
Bot
force-pushed
the
store/inwit-prune
branch
from
September 20, 2026 21:15
d34c0f5 to
dcc12d4
Compare
rearden-grok
Bot
force-pushed
the
net/cjdns
branch
from
September 20, 2026 21:37
9026ec5 to
d09f684
Compare
rearden-grok
Bot
force-pushed
the
store/inwit-prune
branch
from
September 20, 2026 21:38
dcc12d4 to
11d543b
Compare
rearden-grok
Bot
force-pushed
the
net/cjdns
branch
from
September 20, 2026 22:09
d09f684 to
8862500
Compare
rearden-grok
Bot
force-pushed
the
store/inwit-prune
branch
2 times, most recently
from
September 20, 2026 22:31
badd49c to
0cbf383
Compare
Wire reconstruct must not look like Corrupt when inwit was dropped on purpose. Query holds a stub pruneheight; rolling segments come next. Co-authored-by: Cursor <cursoragent@cursor.com>
A reorg through pruned inwit cannot rebuild vin from spent alone. Fail closed with StoreError::Pruned and leave the tip in place. Co-authored-by: Cursor <cursoragent@cursor.com>
`--prune-inwit` must survive reopen. File presence is prune mode; u32::MAX means nothing dropped yet. Confirm past 288 heights writes tip-288 so the last BIP159 window stays reconstructable. Co-authored-by: Cursor <cursoragent@cursor.com>
A pruned node is not NETWORK. VERSION, addrv2, and getaddr use the hub flag; getdata maps StoreError::Pruned to notfound instead of disconnect. Co-authored-by: Cursor <cursoragent@cursor.com>
getblock/getrawtransaction/getblockstats use the same -8 message Core prints for pruned data. Electrum transaction.get returns \"pruned\"; Esplora answers 404. Co-authored-by: Cursor <cursoragent@cursor.com>
Kebab CLI / snake conf / NixOS camelCase. Startup sets Query prune mode and PeerHub so IBD from genesis advertises NETWORK_LIMITED before the first 288-height watermark. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Prune mode no longer rewrites historical inwit.loc; recent witness lives in a 288-height RAM window with a byte threshold and store/inwit.window spill, and startup refuses a pruned datadir without --prune-inwit. Co-authored-by: Cursor <cursoragent@cursor.com>
confirm_blocks_run_with_create_pins scored CRAP 31.1 after the RAM-window hook; move that post-tip work to a named helper so coverage-crap stays under 30. Co-authored-by: Cursor <cursoragent@cursor.com>
Load by matching a dirent whose parsed height is the window slot, not by joining the path. Intermediate path-join and dirent-only steps are the same end state. Co-authored-by: Cursor <cursoragent@cursor.com>
open_inwit hit clippy cognitive_complexity 27/25 after prune-inwit branches; loc open and count-skew repair are named seams, not a silent allow. Co-authored-by: Cursor <cursoragent@cursor.com>
rearden-grok
Bot
force-pushed
the
store/inwit-prune
branch
from
September 21, 2026 06:23
0cbf383 to
f9d64c3
Compare
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
Plan 09 (
docs/personal-node-plans/09-inwit-prune.md). Own store stack onmaster(unstacked from the net overlay PRs). #659 (store/txfixed) sits on this branch.{store}/inwit.prunesidecar (4-byte LE). File presence is prune mode;u32::MAXmeans nothing dropped yet. Confirm past 288 heights writestip-288.StoreError::Prunedbelow the watermark instead ofCorrupt.--prune-inwitadvertisesNETWORK_LIMITED|WITNESS|P2P_V2(notNETWORK). getdata maps pruned blocks to notfound. RPC uses Core-8; Electrumtransaction.getreturns"pruned"; Esplora omits reconstructedvinfor pruned txs (vin: []).--prune-inwit-ram-threshold-bytes(default 256 MiB) and spill understore/inwit.window/. Historical per-txinwit.locis not stub-rewritten. Enabling prune on an existing archive seeds the window; a pruned datadir without--prune-inwitis a hard startup error.pruneInwit. NoSCHEMA_VERSIONbump (sidecar + spill files).Closes #589
Test plan
cargo test -p rbitcoin-query reconstruct_pruned_returns_pruned_not_corruptcargo test -p rbitcoin-query reorg_through_pruneheight_refusescargo test -p rbitcoin-query prune_watermark_survives_reopencargo test -p rbitcoin-query prune_cargo test -p rbitcoin-node prune_inwit_is_kebabcargo test -p rbitcoin-rpc getblock_pruned_minus8cargo test -p rbitcoin-net local_service_flags_pruned_are_limited_not_networkcargo test -p rbitcoin-esplora pruned_tx_jsoncargo clippy --workspace --all-targets -- -D warningsnix build .#checks.x86_64-linux.nixos-module-eval --no-linkDo not merge unless asked.