Repository navigation
Support Dash Core v24 wire formats: CbTx v4, special tx types 10-12, ProRegTx v3, version 2 asset-unlock txid #302
Copy link
Copy link
Open
Description
What Core v24 changes on the wire
Dash Core develop (the v24 line; dashpay/dash#7437 and dashpay/dash#7639 merged Sep 18-21) introduces the following once DEPLOYMENT_V24 activates. None of it is live on mainnet or testnet yet; testnet activation is the next step, so parsers need to be ready before then.
- CbTx version 4 (
src/evo/cbtx.h:32-68). A new fieldmerkleRootAssetUnlocks(uint256) followscreditPoolBalance. From the activation block on, every coinbase must be version 4 (src/evo/cbtx.cpp:45-51: version ≥ 4 is required when v24 is active, rejected before). The field is the merkle root over the instance hashes of the block's version-2 asset unlocks, all-zero when there are none. - Version 2 Asset Unlock txid (
src/primitives/transaction.cpp:76-88,src/primitives/transaction.h:47-53). Payload version byte2, serialization identical to v1, buttxid = SHA256d(serialized tx with the trailing 132 bytes zeroed)—requestedHeight(4) +quorumHash(32) +quorumSig(96). The hash of the full serialization is the instance hash, used by the new inv typeMSG_ASSET_UNLOCK(34, protocol 70242) and by the CbTx root above. Re-signed instances of one withdrawal therefore share a txid and their outputs are spent by that stable txid. Platform emits v1 today and will switch to v2 after activation (Emit version 2 Asset Unlock transactions once Core v24 activates (stable txid + InstantSend-locked withdrawals) platform#4908). - Three new special transaction types (
src/primitives/transaction.h:39-41):TRANSACTION_PROVIDER_DISSOLVE = 10(ProDisTx),TRANSACTION_PROVIDER_UPDATE_SHARE = 11(ProUpShareTx),TRANSACTION_PROVIDER_UPDATE_SHARED_REGISTRAR = 12(ProUpSharedRegTx). Payloads insrc/evo/providertx.h(CProDisTx: nVersion u16, proTxHash, actorIndex, sig_count u8, sigs[];CProUpShareTx: nVersion, proTxHash, shareIndex, scriptReward, inputsHash, vchSig;CProUpSharedRegTx: nVersion, proTxHash, pubKeyOperator (basic BLS), keyIDVoting, inputsHash, sig_count u8, sigs[]). Spec: docs: add Decentralized Masternode Shares DIP dips#187. - ProRegTx version 3 (ExtAddr) becomes valid (
ProTxVersion::GetMax,src/evo/providertx.h). Its layout afternOperatorRewarddiffers from v1/v2 (src/evo/providertx.h:162-226): nestednetInfo(extended-address format instead of a single service address), thenpayouts_countu8 +payouts[]({scriptPayout, reward u16}, DIP-26 multi-party payouts),shares_countu8 +shares[]({amount i64, scriptRefund, scriptReward, keyIDOwner}),joinSigs[shares_count](var-bytes each),nEarlyPeriodBlocksu32,nEarlyPenaltyi64, theninputsHash; for Evo nodesplatformNodeIDfollows without the P2P/HTTP port fields.scriptPayoutis not serialized in v3. Same ExtAddr treatment applies to ProUpServTx/ProUpRegTx v3 where applicable.
What to check / fix in dashj (master @ 2026-09-22)
Transaction.Type(core/src/main/java/org/bitcoinj/core/Transaction.java:102-113) maps 10 toTRANSACTION_TYPE_MAX, and 11/12 have no mapping. A ProDisTx (type 10) will be classified asTYPE_MAX; verify the unmapped values resolve toTRANSACTION_UNKNOWNrather than throwing, and add real types for 10/11/12.CoinbaseTx.parse()(core/src/main/java/org/bitcoinj/evolution/CoinbaseTx.java) reads through the v3 fields only and setslength = cursor - offset.Transactionkeeps the rawextraPayloadbytes for serialization, so the txid should survive a v4 coinbase — please confirm with a v4 coinbase vector thatgetTxId()and themnlistdiffcoinbase merkle proof still verify, and addmerkleRootAssetUnlocks(32 bytes aftercreditPoolBalance) to the parser sobitcoinSerializeToStreamon a modified object cannot drop it.ProviderRegisterTxdoes not implement the v3 layout (nested extended addresses, DIP-26 payouts, collateral shares, no port fields for Evo nodes).Transaction.getTxId()hashes the full serialization, so v2 asset unlocks get a txid Core does not use. Once Platform emits v2 withdrawals (Emit version 2 Asset Unlock transactions once Core v24 activates (stable txid + InstantSend-locked withdrawals) platform#4908), withdrawals received by the Android wallet would be recorded under the wrong txid and their outputs could not be spent. Implement: for tx type 9 with payload version ≥ 2, hash with the trailing 132 payload bytes zeroed (Core vectors insrc/test/evo_assetlocks_tests.cpp).
Core references: src/evo/cbtx.h, src/evo/providertx.h, src/primitives/transaction.{h,cpp}, doc/release-notes-7437.md, doc/release-notes-7639.md.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity