dash(S8): reception-wire leg 2 — interfaces::Node::new_tip → CoinStateMaintainer::on_new_tip - #686
Merged
Merged
Conversation
…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).
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.
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— additiveTipAdvancepayload +Event<TipAdvance> new_tip. Carries thebuild_embedded_workdata()inputs a barebest_block_hashcannot (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.hpp—wire_tip_ingest(node, maint)subscribeson_new_tiptonew_tip, mirroringwire_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
src/impl/dash/only, no bitcoin_family/src/core reach.TipAdvancepayload 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 oninterfaces::Nodeyet.on_block_connected—full_blockcarries no height.Verify
ctest -R DashReceptionWire: 5/5 (3 leg-1 unregressed + 2 leg-2).4854d02a, GPG-signed (key 50AB1379285EFE76).