Repository navigation
extensions: add 0x0004 Requested Payout Outputs - #249
CyberAshven wants to merge 1 commit into
Conversation
Some non-custodial pools pay miners from the coinbase with outputs that depend on the template being mined: its height, previous hash, target, revenue and the client's coinbase scriptSig. A share chain that commits to the previous share and to the client's scriptSig, and whose nodes rebuild every coinbase, is one example. A payout distribution published ahead of time cannot express such outputs. This extension lets a JDC send the JDS those template inputs and receive the exact output set. It keeps the RequestPayoutOutputs design proposed in stratum-mining#202, and adds: - the template fields; - an EXACT_OUTPUTS flag with the required coinbase version, input sequence and lock time; - a PayoutOutputsStale message. As suggested in stratum-mining#203, it is proposed as a separate extension rather than as a mode of 0x0003.
|
@CyberAshven I'll keep this short, because the problem is the premise rather than the message layout. Sv2 JDP exists so that a miner can select its own transactions while a Pool keeps share accounting and pays out. P2Poolv2 already gives a miner both without JDP: each node builds the template from its own bitcoind, and every node recomputes and validates every share's coinbase, which is the property the share chain exists for. A JDC that mines to someone else's share-chain node through this extension keeps the first property, which it already had, and gives up the second: §8 of your text says so, "the JDC trusts the JDS to compute the output set". Since a JDC needs a Template Provider, i.e. a full node, either way, running its own share-chain node costs it nothing extra and gives the validation back. There is no configuration in which a miner is better off with this extension than without it. The original P2Poolv2 project has no Sv2 JDP integration for a reason, and its docs position it as an alternative to Sv2 JDP rather than a consumer of it. We have had close interactions with the core P2PoolV2 developers and it's rough consensus amongst ourselves that there's no point in mixing Sv2 JDP with it, even if for "experimental" reasons. When it comes to protocol design you should be extremely careful with what sycophantic AI agents tell you, because I'm afraid you're wasting your time on a dead-end pursuit here. Whatever innovation you think you are achieving by mixing these two different protocols is a hallucinated mirage at best. Finally: this repository specifies Stratum V2 for Bitcoin, and an extension with no Bitcoin adopter, serving a use case the project it targets does not have, is out of scope for this repository. I'm sorry but I'll have to close this. |
|
Short answers to your points:
If that is what you prefer, this work will carry on as an experimental extension (0x5052) outside this repository. I strongly believe in it, and it is not AI-driven. |
Defines a Job Declaration extension for pools whose coinbase outputs depend on the template being mined. The JDC sends the JDS the template's height, previous hash, target, revenue and coinbase scriptSig prefix, and receives the exact output set.
As discussed in #203, such pools are outside 0x0003's design, which publishes one distribution per accounting window. This proposes the request/response shape on its own. It keeps #202's
RequestPayoutOutputs(#195 had the same shape) and adds:height,prev_hash,nbitsandcoinbase_prefixin the requestEXACT_OUTPUTSflagPayoutOutputsStalestale-payout-outputsis treated as an honest race, as 0x0003 treats its own stale code. The cost is one round trip per declared job; the JDC keeps hashing meanwhile and may request ahead.Implementation: a BCH P2Pool node serves this as a JDS under the experimental id 0x5052 (CyberAshven/BitcoinCash-p2poolv2#47). In a test against two BCHN regtest nodes, a client built on SRI's crates mined in both modes using only the outputs from the reply. In Coinbase-only mode, the block also carried a fee from a transaction the pool never saw.
0x0004 is the next free id after #203's 0x0003.