-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Sv2Transport #27
Conversation
Co-authored-by: Christopher Coverdale <[email protected]>
Co-Authored-By: Christopher Coverdale <[email protected]>
Co-Authored-By: Christopher Coverdale <[email protected]>
Co-authored-by: Christopher Coverdale <[email protected]>
Co-Authored-By: Christopher Coverdale <[email protected]>
The template provider will listen for a Job Declarator client. It can establish a connection and detect various protocol errors. Co-Authored-By: Christopher Coverdale <[email protected]> Co-Authored-By: Fi3
Co-Authored-By: Christopher Coverdale <[email protected]>
Co-Authored-By: Christopher Coverdale <[email protected]>
Co-Authored-By: Christopher Coverdale <[email protected]>
Co-Authored-By: Fi3
The proposed Stratum v2 integration introduces a new Transport subclass. This commit makes it easier in the future to move this integration to its own process. net.cpp is currently part of libbitcoin_node. Avoid a dependency on the node by moving the Transport abstract class to common.
CI on my fork can be ignored (I wonder if I can just turn it off). In terms of progress, I'm half-way the handshake phase. Next step is implement Act 2 of the handshake, which should be a simple call to The next challenge is actual message parsing / serialising. The Finally, the |
This helps reduce the size and scope net.h, as well as to make v1 and v2 transport usable outside libbitcoin_node. This is useful for utilities that need a one-shot p2p connection, e.g. to broadcast a transaction or fetch a specific block. This commit is not necessary for Stratum v2 process separation.
02bc9fd
to
624f0a5
Compare
Implemented starting from a copy of V2Transport and the V2TransportTester, modifying it to fit the Stratum v2 and Noise Protocol requirements. Currently unused.
624f0a5
to
7e89e1b
Compare
Currently broken
0b82b7c
to
5d47c5a
Compare
This PR introduces
Sv2Transport
, a new subclass ofTransport
.It's most similar to
V2Transport
, though with a simpler state machine.In order to make it easier in the future to move the Stratum v2 integration to its own process, this PR also moves
Transport
out ofnet.h
and makes it part ofbitcoin-common
.This also makes for a nice decluttering of net.{h,cpp}, and useful for utilities that need a one-shot p2p connection, e.g. to fetch a specific block.
It would also allow the wallet to make a one-shot tor connection to broadcast a transaction without going through the node mempool. Though this would require a lot more changes.
Once the
Sv2Transport
class in this PR works, and the Template Provider switched to use it, I plan to rewrite the history of the main PR bitcoin#28983. The move-only commits should not change in that process.