-
Notifications
You must be signed in to change notification settings - Fork 11
Stratum v2 Transport #67
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
Conversation
Rebased after a small merge conflict between 362d3d1 and probably bitcoin#31164. |
3cd1505
to
349218c
Compare
9f5de22
to
e8737e0
Compare
b627d33
to
0ddf522
Compare
1d53afb
to
78c95af
Compare
} | ||
|
||
// Payload | ||
std::span<const std::byte> payload_plain{MakeByteSpan(sv2_msg.m_msg)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fd1f277: after rebasing on bitcoin#31519 I had to add .m_msg
here or it wouldn't compile. I'm a bit surprised it worked before.
83d5002
to
b012142
Compare
This commit adds the simplest stratum v2 message. The remaining messages are introduced in later commits.
This avoids a circular dependency between bitcoin-sv2 and bitcoin-node.
This allows us to subclass Transport.
Implemented starting from a copy of V2Transport and the V2TransportTester, modifying it to fit Stratum v2 and Noise Protocol requirements. Co-Authored-By: Christopher Coverdale <chris.coverdale24@gmail.com>
Last rebase before I'm going to split off the sv2 functionality into a fresh codebase. |
This code is now part of https://github.com/Sjors/sv2-tp; feedback and pull requests are welcome there! |
Introduces
Sv2Transport::Transport
which is very similar toV2Transport
.This shoehorns
Sv2NetMsg
into aCSerializedNetMsg
inSetMessageToSend
, and into aCNetMessage
inGetReceivedMessage
.See discussion in bitcoin#30209.
Moved here from bitcoin#30315.
Builds on:
Followed by #50. Parent PR #68.
Note that this code will most likely not be upstreamed to Bitcoin Core, but instead used to create a standalone c++ application that connects to a running node via an IPC interface. See bitcoin#31098.