btc: reconstructor slice 3/7 — template_capture FIFO GBT-tx store (btc::coin::TemplateCapture) - #837
Merged
Merged
Conversation
…onstructor slice 3/7) Add btc::coin::TemplateCapture: a bounded FIFO store keyed by share_hash that retains each handed-out GBT transactions[] so the won-block reconstructor replays the EXACT non-coinbase set the share committed to, not a live-mempool re-selection (merkle-consistent only on a static mempool -> daemon-rejected block -> lost reward in prod). Miss replays an empty array -> valid coinbase-only block, never fail-closed. Body-identical to src/impl/dgb/coin/template_capture.hpp (namespace + log tag swap only). Leaf slice: opaque to transactions[] content, so pinned WITHOUT the slice-5 make_template_other_txs_fn bridge. New template_capture_test.cpp (5 KATs) rides the allowlisted btc_share_test. Local btc_share_test 80/80. btc-tree-only.
frstrtr
force-pushed
the
btc/template-capture
branch
from
July 25, 2026 04:46
3e4430b to
ffd500c
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.
Reconstructor slice 3/7, stacked on #835 (btc/gentx-coinbase-ssot).
Adds btc::coin::TemplateCapture — a FIFO store of the GBT transactions used to build a template, so a share can be faithfully reconstructed back into a full block. Coin-agnostic behavior mirrors the DGB reconstructor arc.
Merge behind #835.