Skip to content

dgb: wire faithful #82 reconstruct closure into the run-loop (replace nullopt stub) - #281

Merged
frstrtr merged 1 commit into
masterfrom
dgb/82-wire-faithful-reconstruct
Jun 20, 2026
Merged

dgb: wire faithful #82 reconstruct closure into the run-loop (replace nullopt stub)#281
frstrtr merged 1 commit into
masterfrom
dgb/82-wire-faithful-reconstruct

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 20, 2026

Copy link
Copy Markdown
Owner

What

main_dgb.cpp --run now binds tracker().m_on_block_found to the FAITHFUL make_reconstruct_closure_from_template (#280) in place of the interim return nullopt stub. Three version-agnostic won-block inputs, bound to the LIVE sharechain tracker:

Threading / safety

Fires on the COMPUTE thread already holding the tracker lock (attempt_verify -> m_on_block_found, share_tracker.hpp:537), so the fns read tracker().chain DIRECTLY and do NOT take read_tracker() (would self-deadlock — corrected consume-seam audit). Fail-closed end to end: any builder error -> nullopt (announce + audit; the RPC submitblock fallback still fires independently).

Scope / fence

… nullopt stub)

main_dgb.cpp --run binds tracker().m_on_block_found to the FAITHFUL
make_reconstruct_closure_from_template (#280) in place of the interim
nullopt stub. The three version-agnostic won-block inputs are bound to
the live sharechain tracker:
  - won_share_fields_fn: share.m_min_header + m_merkle_link (#279)
  - gentx_bytes_fn: generate_share_transaction(...).GentxCoinbase.bytes
    (#173 SSOT); v36_active re-derived from the share compile-time
    version inside GST, byte-identical to the verify-path invocation
  - template_other_txs_fn: captured-GBT non-coinbase set (#271), empty
    today (no per-job template retention + unfed embedded mempool =>
    coinbase-only), correct-and-empty, NOT fail-closed

Fires on the compute thread already holding the tracker lock, so the
fns read tracker().chain directly (no read_tracker(), no self-deadlock).
Fail-closed end to end: any builder error -> nullopt (announce + audit;
RPC submitblock fallback still fires). Fenced to main_dgb.cpp; build
EXIT=0; selftest OK. #82 OPEN pending a live UpdateTip won-block test.
@frstrtr
frstrtr merged commit c74bd4a into master Jun 20, 2026
29 checks passed
frstrtr added a commit that referenced this pull request Jun 23, 2026
dgb: wire faithful #82 reconstruct closure into the run-loop (replace nullopt stub)
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