[dash][S4-pre] payout-credit foundation — advance block.m_txs (leaf, single-coin) - #114
Merged
Conversation
… advance block.m_txs
Foundation slice for S4 payout on dash/pr0-foundation-s4. Lands the single-coin
src/impl/dash/ header set that the four pay consumers (credit_pool,
credit_pool_db, coinbase_builder, pplns) transitively require: share /
share_chain / share_check / share_types, coin/{rpc_data,transaction},
coin/vendor/{assetlock,cbtx,shim}.
Advances the additive std::vector<MutableTransaction> m_txs member (and SetNull
clear) from S5 into block.hpp to close credit_pool.apply_block(), which walks
block.m_txs for asset-lock/unlock accounting. The member is the single canonical
declaration; S5 builds the transaction-aware (de)serialization on top. Wire
(de)serialization of m_txs stays deferred to S5; serialization here is header-only.
All 14 headers -fsyntax-only clean vs master core @ edf9cd2 (gnu++20).
…on rename (assetlock/cbtx/share_types) + coinbase log include
frstrtr
marked this pull request as ready for review
June 16, 2026 19:48
This was referenced Jun 16, 2026
Merged
frstrtr
added a commit
that referenced
this pull request
Jun 17, 2026
…ditive, single-coin) (#118) * feat(dash): S5 block-replay foundation — port vendor/blockencodings additive-only Port vendor/blockencodings.{hpp,cpp} into src/impl/dash/coin/vendor/ additive-only; SERIALIZE_METHODS->C2POOL_SERIALIZE_METHODS collision rename (4 sites). dash_block_replay static lib target wired in CMakeLists.txt. TX_WITH_WITNESS consumed read-only from bitcoin_family (no shared-layer touch). BlockDumper + rpc.hpp held out of smoke. Stacked on #114 (S4-pre) tip fadf44d — replay path needs block.hpp/transaction.hpp from #114 diff. * test(dash): S5 block-replay — BIP152 compact-block reassembly ctest Add test_dash_block_replay (10 cases) over the vendored blockencodings port (foundation bdecc5c): full round-trip with all txs missing, serialize/deserialize-then-reassemble wire round-trip, mempool- and extra_txn-satisfied short IDs, and the documented INVALID rejection paths (null header, empty body, too-few/too-many getblocktxn txs), plus BlockTransactionsRequest/BlockTransactions wire round-trips. Wires test_dash_block_replay into test/CMakeLists.txt linking the additive dash_block_replay static lib; no ltc/pool SCC dependency. ctest -R DashBlockReplay: 10/10 green on Linux x86_64. * ci(dash): build test_dash_block_replay in both --target lists test_dash_block_replay is registered via gtest_add_tests in test/CMakeLists.txt but was absent from the build.yml --target lists, so CI never built the binary and ctest reported all 10 DashBlockReplay cases as "Not Run" (10/592 fail). Add the target to both the Linux x86_64 and ASan+UBSan build lists, alongside the sibling test_dash_x11_kat / test_dash_header_chain dash targets. Additive, single-coin, no API change. --------- Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>
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.
S4-pre: payout-credit foundation (dash, single-coin)
Foundation slice for the DASH pay stage under seq(a): share-chain + coin-tx headers,
credit_pool.apply_blockbody, and the advancedblock.m_txsmember it consumes.Decision context
Per integrator (advance-the-member):
m_txspulled forward from S5 into this foundation soapply_blocklands as a coherent, testable slice rather than a dead stub.apply_blockbody unchanged from27f2aaf0(UID 942 closed — not re-authored).Condition 1 — leaf accessor ✅
block.m_txsis a leaf over the block tx vector.src/impl/dash/coin/block.hppincludes onlybitcoin_family/coin/base_block.hpp+dash/coin/transaction.hpp(coin-tx layer, part of this foundation) — noshare_chain.hpp/share_check.hppS5 share-chain consumer imports. No S5 types dragged in.Condition 2 — isolation ✅ single-coin
The advanced member is defined in
src/impl/dash/coin/block.hpp(single dash tree), not inbitcoin_family/orsrc/core/. → single dash smoke gate suffices; not a shared-scaffolding change, no four-coin sweep required.DIP-0027 separation ✅
Payout-credit path (
credit_pool.apply_block, walksblock.m_txsfor PPLNS accounting) is kept strictly separate from Dash DIP-0027 asset-lock / CreditPool semantics. Thecredit_pool_binding.hppseam that conflated the two is excluded from this PR (held as S4-pay WIP). The assetlock/cbtx changes here are theC2POOL_SERIALIZE_METHODScollision rename only — no asset-lock semantic change.Commits
27f2aaf0foundation (share-chain + coin-tx headers, advanceblock.m_txs)fadf44d7build fix:C2POOL_SERIALIZE_METHODScollision rename (assetlock/cbtx/share_types) +<core/log.hpp>includeLocal
-fsyntax-only(gnu++20) clean on touched headers. Full Linux x86_64 dash smoke via CI on this PR.