dash(s7): mn_state_machine leaf — providertx + mn_state_db + mn_state_machine + KAT - #352
Merged
Conversation
frstrtr
marked this pull request as ready for review
June 23, 2026 10:03
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
Ports the DASH embedded GetBlockTemplate projection and its bit-parity cross-check against the dashd-RPC shadow. Closes the S7 absent-header set (mn_state_machine #352 is the last leaf this consumes). embedded_gbt.hpp builds the coinbase value, masternode payment payee projection, and packed_payments from the live mn_state_machine DMN list, then DashEmbeddedGbt KAT asserts bit-exact equality against the dashd getblocktemplate shadow and detects coinbase_value / payee / packed_payments-size drift. dashd-RPC fallback preserved. ctest DashEmbeddedGbt: 7/7 passed (non-hollow, Linux x86_64 GCC 13).
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
…_machine + KAT (#352) Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
frstrtr
added a commit
that referenced
this pull request
Jun 23, 2026
Ports the DASH embedded GetBlockTemplate projection and its bit-parity cross-check against the dashd-RPC shadow. Closes the S7 absent-header set (mn_state_machine #352 is the last leaf this consumes). embedded_gbt.hpp builds the coinbase value, masternode payment payee projection, and packed_payments from the live mn_state_machine DMN list, then DashEmbeddedGbt KAT asserts bit-exact equality against the dashd getblocktemplate shadow and detects coinbase_value / payee / packed_payments-size drift. dashd-RPC fallback preserved. ctest DashEmbeddedGbt: 7/7 passed (non-hollow, Linux x86_64 GCC 13).
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.
DASH S7 —
mn_state_machineleafThe last absent header before the
embedded_gbtcapstone. Ports the DASH masternode state-machine that turns the SimplifiedMNList leaf (#309) into a live, auto-maintained DMN list the embedded-GBT payee projection consumes.Files
src/impl/dash/coin/vendor/providertx.hpp— CProRegTx / CProUpServTx / CProUpRegTx / CProUpRevTx wire (de)serialization withnVersion/nTypefield gating +parse_protx_payloadfull-consume / trailing-garbage rejection.src/impl/dash/coin/mn_state_db.hpp—MNStateinternal persistence wire round-trip.src/impl/dash/coin/mn_state_machine.hpp—apply_blockRebuildListFromBlock semantics (register / update-service / update-registrar / revoke / collateral spend / payee resolution),find_expected_payee+pick_paid_mnmemcmp tiebreak,sync_validity_from_sml.test/test_dash_mn_state.cpp— KAT (23 cases).KAT philosophy
Mirrors
test_dash_simplifiedmns.cpp: every assertion is a structural round-trip (serialize -> deserialize -> EQ), a bit-exact wire-length preimage, or an algorithm self-consistency property. No fabricated "expected" hashes.Verification (Linux x86_64, GCC 13)
test_dash_mn_state: green.ctest -R DashMnStatefrombuild/: 100% tests passed, 0 tests failed out of 23 (non-hollow, real count).test/CMakeLists.txt(mirrors the simplifiedmns / quorum_root block incl. OBJECT-lib SCC direct-naming) and added to both--targetlists in.github/workflows/build.yml.Scope (honest)
The end-to-end cross-check —
apply_blockover a REAL Dash mainnet special-tx block matchingdashd protx list— requires a live Dash node oracle (mnlistdiff) and is deferred to theembedded_gbtintegration leaf. It is not claimed here. The dashd-RPC fallback is preserved.Draft — held for integrator verify + operator tap. Do not merge.