Skip to content

[dash][S4-pre] payout-credit foundation — advance block.m_txs (leaf, single-coin) - #114

Merged
frstrtr merged 2 commits into
masterfrom
dash/pr0-foundation-s4
Jun 16, 2026
Merged

[dash][S4-pre] payout-credit foundation — advance block.m_txs (leaf, single-coin)#114
frstrtr merged 2 commits into
masterfrom
dash/pr0-foundation-s4

Conversation

@frstrtr

@frstrtr frstrtr commented Jun 16, 2026

Copy link
Copy Markdown
Owner

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_block body, and the advanced block.m_txs member it consumes.

Decision context

Per integrator (advance-the-member): m_txs pulled forward from S5 into this foundation so apply_block lands as a coherent, testable slice rather than a dead stub. apply_block body unchanged from 27f2aaf0 (UID 942 closed — not re-authored).

Condition 1 — leaf accessor ✅

block.m_txs is a leaf over the block tx vector. src/impl/dash/coin/block.hpp includes only bitcoin_family/coin/base_block.hpp + dash/coin/transaction.hpp (coin-tx layer, part of this foundation) — no share_chain.hpp/share_check.hpp S5 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 in bitcoin_family/ or src/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, walks block.m_txs for PPLNS accounting) is kept strictly separate from Dash DIP-0027 asset-lock / CreditPool semantics. The credit_pool_binding.hpp seam that conflated the two is excluded from this PR (held as S4-pay WIP). The assetlock/cbtx changes here are the C2POOL_SERIALIZE_METHODS collision rename only — no asset-lock semantic change.

Commits

  • 27f2aaf0 foundation (share-chain + coin-tx headers, advance block.m_txs)
  • fadf44d7 build fix: C2POOL_SERIALIZE_METHODS collision rename (assetlock/cbtx/share_types) + <core/log.hpp> include

Local -fsyntax-only (gnu++20) clean on touched headers. Full Linux x86_64 dash smoke via CI on this PR.

frstrtr added 2 commits June 16, 2026 13:31
… 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
frstrtr marked this pull request as ready for review June 16, 2026 19:48
@frstrtr
frstrtr merged commit 1040ede into master Jun 16, 2026
16 checks passed
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>
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