stratum-mining / stratum

stratum
https://stratumprotocol.org
Other
213 stars 124 forks source link

SRI Template Provider as a bitcoin p2p proxy #1034

Closed Sjors closed 3 months ago

Sjors commented 3 months ago

I suggested an alternative to the alternative in #1032... https://github.com/bitcoin/bitcoin/pull/29432#issuecomment-2210448369

In this alternative Bitcoin Core would have all the Template Provider functionality, but they would be implemented as p2p messages. The SRI TP would run on the same machine and make a p2p connection with a special mining permission so it can access these new message types. It then translates these p2p messages to native Stratum v2.

Just like #1032 this avoids the need to add Noise encryption and a new networking stack to Bitcoin Core. But the SRI side doesn't have to be very smart, it's more like a proxy.

Some downsides are listed in the comment. The main issue is that the Bitcoin p2p protocol is more difficult to use than RPC.

GitGab19 commented 3 months ago

What would be the real advantage of this solution (against the alternative here) in your opinion? Could a TP be used by multiple clients in this scenario?

pavlenex commented 3 months ago

Guys should we have discussions like this going forward in the https://github.com/stratum-mining/stratum/discussions? IMO issues should be a clearly specified to-do that can be resolved by a PR. Anything that requires input and should ideally go into a discussion.

GitGab19 commented 3 months ago

I agree. I will open a discussion for this soon