Replies: 11 comments 4 replies
-
Having the additional role make sense also in this scenario, for example to allow public facing TPs. |
Beta Was this translation helpful? Give feedback.
-
Going this route was my original plan and then we/I ruled it out (I'm trying hard to remember why but I don't). Honestly to me seems that the advantages exceed the disadvantages. We don't even need to refactor the spec, and we will be much more flexible for example adding an extension that now need to be implemented in core will most likley be done in the TP (not core) role much faster |
Beta Was this translation helpful? Give feedback.
-
@TheBlueMatt what do you think? |
Beta Was this translation helpful? Give feedback.
-
Another advantage of separeted TP is that the JDS don't need anymore to talk bitcoind rpc |
Beta Was this translation helpful? Give feedback.
-
Having a public facing TP won't work in this design, or at least you'd have to pick one
Hopefully someone remembers... |
Beta Was this translation helpful? Give feedback.
-
I think it does. The protocol between the JDC and JDS wouldn't change, the latter still needs to check against its mempool. JDC, JDS and the pool (unless we keep the TP role) will need RPC access. |
Beta Was this translation helpful? Give feedback.
-
Is there (good) Rust support for ZMQ? |
Beta Was this translation helpful? Give feedback.
-
yep I mean with TP role. It will be easier to implement a JDS (I expect pools to implement custom JDS not using the SRI one). We can just add an extension that do what now we are doing with RPC in the JDS. |
Beta Was this translation helpful? Give feedback.
-
It seems so https://crates.io/search?q=zeromq&sort=downloads |
Beta Was this translation helpful? Give feedback.
-
In principle its okay because you can always just run a translator from ZMQ to a multi-TP listener, but...
making people run two pieces of software really sucks. Its more crap to debug when it goes wrong, and in general getting people to run one piece of software is hard, two is nearly impossible. Historically any time we've thought about some contrib script in Bitcoin Core or written something for people to run its been run exactly never. If its more than a config flag on software people are already running its generally hard to get people to do it.
IMO this is a major issue. Its a travesty that its not trivial to take an ASIC and point it at a Bitcoin Core node. Sure, Sv2 support on actual miners is a ways off, but I've heard from many people over the years that they have some home miner for heating or whatever and just want to solo mine, but they've tried two or three pieces of software and didn't get it to work. Instead, people end up paying a few-% fee to some "solo pool" which is ab absolutely absurd state - if people want to improve the decentralization in the Bitcoin network, why the hell don't we have software that lets them.
Not quite sure I understand why this is precluded? Or do you mean because it could be built into the proxy, which would preclude it? I think this is an issue and we should at least build a ZMQ -> template provider thing to support this.
Why? Bitcoin Core is designed to accept connections from untrusted parties and interact with them. The TP protocol is almost entirely send, so supporting untrusted connections to it safely should be rather trivial? |
Beta Was this translation helpful? Give feedback.
-
At this point I think the most likely alternative approach to bitcoin/bitcoin#29432 will use IPC, not ZMQ and RPC. I have a working prototype in Sjors/bitcoin#48. Closing this for now. Though if someone ends up implementing the approach here, please reopen. |
Beta Was this translation helpful? Give feedback.
-
An alternative approach for implementing the Template Provider was suggested during review.
Rather than having Bitcoin Core accept incoming network connections, deal with Noise encryption and stratum messages, an external tool would do this. This tool would get its information from the node via ZMQ and RPC:
updatetemplatepub
to configure the template publisher, e.g. for setting the coinbase output data sizesubmitsolution
The external tool should probably be part of SRI, e.g. by adding
roles/template_provider
.However, in this scenario it may not make sense to have that role in the first place. It just needs to be code shared by the The Job Declarator Client and the Pool roles.
It has similar implications as the idea of making bitcoind a Job Declarator Client, discussed in stratum-mining/sv2-spec#85. Except in that scenario we had to keep the Template Provider role around because the pool needs it, whereas here that role could disappear entirely.
I could look into adding those two things in a new Bitcoin Core branch. But someone else would have to take on the SRI side.
There are a few downsides to this approach:
The advantage is that it (significantly) decreases the complexity added to Bitcoin Core.
Not sure if we actually want to go this route, but we can the discuss the pros and cons here.
Beta Was this translation helpful? Give feedback.
All reactions