Repository navigation
Replies: 6 comments 12 replies
1 · The validation message (
|
2 · Solution propagation through TDPContext from the specSection 6.4.9 says that on TDP's Suggested design
Friction with existing text
Having a Open questions
|
3 · A validation-only TDP connectionContext from the specThe intro to chapter 7 says "after the initial common handshake, the client MUST immediately send a Suggested designA Trade-offsA JDS might still want Whether a TP supports Open questions
|
4 · Coinbase-only modeContext from the specUnder Coinbase-only mode (6.3.1) "JDC never reveals the tx data contained in the template", "the What could be validatedIn Coinbase-only mode there is no JDS-side validation to formalize, because there is nothing to validate against. The only party that could ask a TP anything is Pool, and the only material it has is what Why this matters for the message designIf Open questions
|
5 · Spec and implementation falloutSpec text that would change
Implementation impact
Open questions
|
0 · General Feedback
I agree it makes sense to spec out this important part of the protocol, rather than requiring implementers to study the JDS implementation. Additionally, it makes it easier to use alternative node software with the JDS. Its direct use of the Bitcoin Core IPC, especially once bitcoin/bitcoin#35671 lands, is currently not (easily) portable. As I mentioned in stratum-mining/sv2-tp#137 (comment) I'm happy to (review an) implement(ion of) these new messages in sv2-tp. |
Uh oh!
There was an error while loading. Please reload this page.
This discussion explores adding a Template Distribution Protocol (TDP) message that lets a Job Declarator Server (JDS) validate a Custom Job against a Template Provider (TP), so that the Pool side of the Job Declaration Protocol (JDP) no longer depends on mechanisms the spec leaves undefined.
It grew out of #217 and supersedes it.
Where the spec stands today
Section 6.1 says that "in order to fully implement the Server side of the Job Declaration Protocol, the JDS also needs to exchange RPCs (or similar) with a Bitcoin Node", and lists "maintaining an internal mempool (via RPCs (or similar) to a Bitcoin Node)" among the JDS responsibilities. The blue arrows in the diagram below are that loosely defined channel.
Two more JDS duties ride on the same undefined channel and are missing from the diagram: deciding whether a
DeclareMiningJobgets a.Successor an.Error, and propagating the block it reconstructs fromPushSolution(section 6.4.9).None of this has a wire format in the spec, so every JDS defines its own. Meanwhile TDP, the protocol that exists precisely so a node can serve mining software without RPC, plays no part on the Pool side of job declaration.
Suggested design
JDS opens a TDP connection to a TP. When a
DeclareMiningJobarrives, JDS forwards the declared job to the TP through a new TDP message:ProposeTemplateProposeTemplate.Errortells JDS what is wrong (for example which transactions the node does not know, which JDS turns into a JDPProvideMissingTransactions), andProposeTemplate.Successis the gate forDeclareMiningJob.Success.If
ProposeTemplate.Successalso carries atemplate_id, JDS can later relay aPushSolutionas a plain TDPSubmitSolution, so block propagation on the Pool side also goes through TDP and the JDS no longer needs any direct link to a node.ProposeTemplate.Successand.Errormeantemplate_idinProposeTemplate.Successso JDS can sendSubmitSolutionSetupConnectionflag that turns off the template streamProposeTemplatehas anything to validate when no tx data is revealedbitcoin_core_sv2Note: drafted with help from Claude Fable 5.1 with
sv2-specloaded into the context window, guided by SRI core contributor @plebhashNote: this Discussion is organized in threads, which should evolve around specific topics. Please avoid starting a new thread if your comment is directly related to a specific topic that already has a dedicated thread. Otherwise there's no point in using Github Discussions and this is just a Github Issue.
All reactions