Skip to content

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

Open
wants to merge 4 commits into
base: sv2-noise
Choose a base branch
from
Open

Stratum v2 Transport #67

wants to merge 4 commits into from

Conversation

Sjors
Copy link
Owner

@Sjors Sjors commented Oct 16, 2024

Introduces Sv2Transport::Transport which is very similar to V2Transport.

This shoehorns Sv2NetMsg into a CSerializedNetMsg in SetMessageToSend, and into a CNetMessage in GetReceivedMessage.

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.

@Sjors
Copy link
Owner Author

Sjors commented Nov 14, 2024

Rebased after a small merge conflict between 362d3d1 and probably bitcoin#31164.

@Sjors Sjors force-pushed the sv2-noise branch 2 times, most recently from 3cd1505 to 349218c Compare December 19, 2024 01:48
@Sjors Sjors force-pushed the sv2-transport branch 2 times, most recently from 9f5de22 to e8737e0 Compare January 27, 2025 12:34
}

// Payload
std::span<const std::byte> payload_plain{MakeByteSpan(sv2_msg.m_msg)};
Copy link
Owner Author

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.

@Sjors Sjors force-pushed the sv2-noise branch 2 times, most recently from 83d5002 to b012142 Compare April 15, 2025 13:11
Sjors and others added 4 commits June 16, 2025 09:25
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 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant