Skip to content

dash: sharechain pool-peer state (S8 pool-node leaf 1) - #580

Merged
frstrtr merged 3 commits into
masterfrom
dash/s8-poolnode-peer
Jul 2, 2026
Merged

dash: sharechain pool-peer state (S8 pool-node leaf 1)#580
frstrtr merged 3 commits into
masterfrom
dash/s8-poolnode-peer

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 27, 2026

Copy link
Copy Markdown
Owner

S8 pool-node leaf 1 — dash::Peer

DASH lacks the p2pool sharechain pool-node layer that btc and dgb both carry (node.hpp/peer.hpp/messages.hpp/share_tracker.hpp/share_messages.hpp). That gap is what blocks the full gate (b) bind/dial-crosses-shares path (the #575 launcher CLI shipped the dial surface; there is nothing on the pool-node side to dial). This is the first separable leaf: the per-peer state struct.

Change (fenced to src/impl/dash/ + test wiring)

  • src/impl/dash/peer.hppdash::Peer, analog of btc::Peer/dgb::Peer. Holds the version-handshake negotiated fields (version / subversion / services / nonce), connection timestamp, and the remembered-tx protocol sets (m_remote_txs dedup hash set + m_remembered_txs hash to coin::Transaction map). Pure header-only state, no socket/IO.
  • test/test_dash_peer.cpp — 5 KATs (defaults, version round-trip, remote-tx dedup, remembered-tx roundtrip+erase, monotonic timestamps). 5/5 green, non-hollow (built + run locally, Linux x86_64).
  • test/CMakeLists.txt + .github/workflows/build.yml — additive allowlist wiring only.

Fence / safety

  • Touches only src/impl/dash/ and test wiring — no bitcoin_family / src/core / other-coin edits. Per-coin isolation OK.
  • GPG-signed (sig=G, frstrtr 50AB1379), attribution clean.
  • Authored against the btc/dgb shape per integrator constraint (1); does not invent a new contract.

Held for integrator verify -> operator tap. Next leaves (separable): messages.hpp, share_messages.hpp, share_tracker.hpp, node.hpp bridge.

DASH lacked the p2pool sharechain pool-node layer that btc and dgb both
carry (node.hpp/peer.hpp/messages.hpp/share_tracker.hpp/share_messages.hpp),
which blocks the full gate (b) bind/dial-crosses-shares path. This is leaf 1:
the per-peer state struct.

src/impl/dash/peer.hpp — dash::Peer, analog of btc::Peer/dgb::Peer: negotiated
version/subversion/services/nonce from the version handshake, connection
timestamp, and the remembered-tx protocol sets (m_remote_txs hash set +
m_remembered_txs hash->coin::Transaction map). Pure header-only state, no IO.

test/test_dash_peer.cpp — 5 KATs: fresh-peer defaults, version-handshake
round-trip, remote-tx set dedup, remembered-tx map roundtrip+erase, monotonic
connection timestamps. 5/5 green, non-hollow.

Strictly fenced to src/impl/dash/ + test wiring (CMakeLists + build.yml
allowlist); no bitcoin_family/src/core/other-coin touch.
@frstrtr
frstrtr force-pushed the dash/s8-poolnode-peer branch from 54f5ba1 to fe4d734 Compare June 27, 2026 19:42
frstrtr added a commit that referenced this pull request Jun 27, 2026
DASH lacked the p2pool sharechain pool-node wire layer that btc/dgb/ltc
all carry. This is leaf 2 (after peer #580): the message envelope itself.

src/impl/dash/messages.hpp — namespace dash port of the shared p2pool-family
messages layer (src/impl/ltc/messages.hpp): version/ping/addrme/getaddrs/
addrs/shares/sharereq/sharereply/have_tx BEGIN_MESSAGE definitions + the
pool-node dispatch type-list. The envelope is byte-parity with the family
layer; share VERSION/transition (16->36) lives inside chain::RawShare, not
the message frame, so the pool-node wire contract is coin-uniform. Mirrors
the analog; no new contract invented.

test/test_dash_poolnode_messages.cpp — 10 KATs: per-message pack/make
round-trips (version field-by-field, ping empty, addrme LE-layout pin,
getaddrs, addrs, v16+v36 shares envelope, sharereq, sharereply enum,
have_tx) + Handler type-list instantiation. 10/10 green, non-hollow.

Strictly fenced to src/impl/dash/ + additive test wiring (CMakeLists
add_executable/link + build.yml allowlist x2); no bitcoin_family/src/core/
other-coin touch. peer.hpp coverage stays in #580 (test_dash_peer).
frstrtr added 2 commits July 1, 2026 21:54
/#592/#605 landings

ctest allowlist union: test_dash_poolnode_messages (from #582) + test_dash_peer.
Sources auto-merged; re-runs the stale (pre-runner-reset) CodeQL c-cpp.
@frstrtr
frstrtr merged commit 5a978f5 into master Jul 2, 2026
22 checks passed
frstrtr added a commit that referenced this pull request Jul 2, 2026
…esolve build.yml CI test-list vs #580 (test_dash_peer + test_dash_share_messages union)
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