You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
key-wallet: typed builders for provider update transactions (ProUpRegTx, ProUpServTx) #1401
key-wallet's TransactionBuilder can carry any special payload (set_special_payload) and finish it once the inputs are selected (set_payload_finalizer), but it has no typed builder for the provider update transactions. Every consumer has to write the Dash Core recipe for them itself.
Platform now does this twice in rs-platform-wallet:
ProUpServTx (masternode/update_service.rs, merged on v5.1-dev): the placeholder payload, inputs_hash, the operator BLS signature over the base payload hash, and the Core v24 rules for payload version 2 or 3 and the version-3 address map.
Both builders had to learn the same rule separately: the transaction moves no value, so when the change is below the dust limit it ends up with no outputs and Core refuses it (bad-txns-vout-empty). The fix, a zero-value data output, was written once for each builder.
Proposal
Typed builders in key-wallet for ProUpRegTx and ProUpServTx that own what is Dash Core protocol knowledge:
assembling the payload from typed inputs, at the payload version Core accepts for the entry and the V24 state the caller passes in;
the finalizer: inputs_hash over the selected inputs, then the payload signature (owner ECDSA for ProUpRegTx, operator BLS for ProUpServTx);
the output invariant: the transaction always carries an output;
the version-3 address map for an evonode built from one address and the platform ports, with its purposes in the order Core re-serializes them, checked with ExtNetInfo::validate_ports_and_duplicates.
Preflight helpers that need only the payload and the masternode list (for example, whether an endpoint is already advertised by another entry) could live next to them.
Out of scope
What stays with the consumer: choosing which wallet keys to rotate to, reading the masternode list and the V24 state from the network, fetching the registration transaction, reservation lifecycle and broadcast.
Context
Raised in review of dashpay/platform#5889. When this lands, both Platform builders move onto it together.
Activity