Skip to content
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

Sv2 noise #66

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Sv2 noise #66

wants to merge 3 commits into from

Conversation

Sjors
Copy link
Owner

@Sjors Sjors commented Oct 16, 2024

This is the first part of the Stratum v2 Template Provider, it introduces the Stratum v2 Noise protocol.

It introduces a CMake build flag -DWITH_SV2 that is ON by default.

The Noise Protocol Framework is defined here: https://noiseprotocol.org/noise.html

It's quite similar to BIP324. The main differences are explained here, including why Stratum v2 can't use BIP234 (yet): https://delvingbitcoin.org/t/stratum-v2-noise-protocol-bip324-nuggets/413

The implementation is based on revision 38, 2018-07-11 (most recent at the time of writing).

The Stratum v2 spec defines the specific choice of ciphers: https://github.com/stratum-mining/sv2-spec/blob/main/04-Protocol-Security.md

This protocol has been implemented in the Stratum Reference Implementation (SRI, using rust-bitcoin). https://github.com/stratum-mining/stratum

It has also been (independently) implemented in BraiinsOS. This part is currently not open source, and it's behind on some recent changes.

The classes in sv2_noise.h attempt to stay close to the paper, whereas the test and fuzzer code borrow heavily from BIP324.


Moved here from bitcoin#29346.

Followed by #67. 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 and applied @stratospher's feedback.

@Sjors Sjors force-pushed the sv2-noise branch 2 times, most recently from 3cd1505 to 349218c Compare December 19, 2024 01:48
Co-Authored-By: Christopher Coverdale <[email protected]>
@Sjors
Copy link
Owner Author

Sjors commented Dec 19, 2024

Added SeedRandomStateForTest(SeedRand::ZEROS);

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