Skip to content

dash(S8): reception-wire leg 2 — interfaces::Node::new_tip → CoinStateMaintainer::on_new_tip - #686

Merged
frstrtr merged 1 commit into
masterfrom
dash/s8-reception-wire-tip-leg
Jul 13, 2026
Merged

dash(S8): reception-wire leg 2 — interfaces::Node::new_tip → CoinStateMaintainer::on_new_tip#686
frstrtr merged 1 commit into
masterfrom
dash/s8-reception-wire-tip-leg

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 13, 2026

Copy link
Copy Markdown
Owner

S8 reception-wire, leg 2 of 4 (off master, NOT stacked on #685)

Follows leg 1 (wire_mempool_ingest, already on master). Wires the header/think tip-advance event to the node-held embedded coin-state bundle so it can arm its tip-readiness prerequisite in a live node without a direct poke.

What

  • node_interface.hpp — additive TipAdvance payload + Event<TipAdvance> new_tip. Carries the build_embedded_workdata() inputs a bare best_block_hash cannot (height/hash to build ON, next-block bits, tip MTP, address versions). Leg 1s note flagged exactly this gap. Purely additive; dash interface only.
  • tip_ingest.hppwire_tip_ingest(node, maint) subscribes on_new_tip to new_tip, mirroring wire_mempool_ingest (by-ref capture, explicit-teardown disposable).
  • test_dash_node_reception_wire.cpp — leg-2 KAT (2 cases): a wired tip alone does NOT arm (MN absent → dashd fallback retained); tip + MN arms the embedded arm and the wired tip params reach the assembled template; dispose() stops ingest.

Scope / safety

  • Single-coin: src/impl/dash/ only, no bitcoin_family/src/core reach.
  • Additive: no existing signature changed.
  • dashd getblocktemplate fallback UNCHANGED — bundle still routes to dashd until BOTH tip + MN are seeded.
  • Interface-shape note: the TipAdvance payload is the one design decision here (leg 1 deferred it as its own slice); flagging for review on this rollup.

Remaining legs (own slices)

  • on_mn_list_update — no source event on interfaces::Node yet.
  • on_block_connectedfull_block carries no height.

Verify

  • KAT ctest -R DashReceptionWire: 5/5 (3 leg-1 unregressed + 2 leg-2).
  • Commit 4854d02a, GPG-signed (key 50AB1379285EFE76).

…ateMaintainer::on_new_tip

Leg 1 (#672..#685 + wire_mempool_ingest) subscribed the mempool-relay event
to the node-held embedded coin-state bundle; nothing yet wired the header/think
TIP-ADVANCE event, so in a live node the bundle could never arm its tip-
readiness prerequisite on its own. This leg closes that gap:

- interfaces::Node gains an additive TipAdvance payload + Event<TipAdvance>
  new_tip -- the height/hash/bits/mtp/address-version inputs build_embedded_
  workdata() needs that a bare best_block_hash cannot carry (leg 1 flagged
  exactly this). Purely additive, dash interface only (single-coin).
- tip_ingest.hpp::wire_tip_ingest subscribes on_new_tip to new_tip, mirroring
  wire_mempool_ingest contract (by-ref capture, explicit-teardown disposable).
- test_dash_node_reception_wire gains leg-2 KAT: a wired tip alone does NOT arm
  (MN list absent -> dashd fallback retained); tip + MN arms the embedded arm
  and the wired tip params reach the assembled template; dispose() stops ingest.

on_mn_list_update / on_block_connected legs remain their own slices (no source
event / missing block height). dashd getblocktemplate fallback UNCHANGED.
KAT 5/5 (3 leg-1 unregressed + 2 leg-2).
@frstrtr
frstrtr merged commit 0fbc143 into master Jul 13, 2026
26 checks passed
@frstrtr
frstrtr deleted the dash/s8-reception-wire-tip-leg branch July 13, 2026 03:46
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