Skip to content

Sv2 noise #66

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 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ if(ENABLE_IPC AND WITH_EXTERNAL_LIBMULTIPROCESS)
)
endif()

option(WITH_SV2 "Enable Stratum v2 functionality." ON)

cmake_dependent_option(BUILD_GUI_TESTS "Build test_bitcoin-qt executable." ON "BUILD_GUI;BUILD_TESTS" OFF)
if(BUILD_GUI)
set(qt_components Core Gui Widgets LinguistTools)
Expand Down Expand Up @@ -686,6 +688,7 @@ message(" IPC ................................. ${ipc_status}")
message(" USDT tracing ........................ ${WITH_USDT}")
message(" QR code (GUI) ....................... ${WITH_QRENCODE}")
message(" DBus (GUI) .......................... ${WITH_DBUS}")
message(" Stratum v2 .......................... ${WITH_SV2}")
message("Tests:")
message(" test_bitcoin ........................ ${BUILD_TESTS}")
message(" test_bitcoin-qt ..................... ${BUILD_GUI_TESTS}")
Expand Down
1 change: 1 addition & 0 deletions doc/design/libraries.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
| *libbitcoin_wallet* | Wallet functionality used by *bitcoind* and *bitcoin-wallet* executables. |
| *libbitcoin_wallet_tool* | Lower-level wallet functionality used by *bitcoin-wallet* executable. |
| *libbitcoin_zmq* | [ZeroMQ](../zmq.md) functionality used by *bitcoind* and *bitcoin-qt* executables. |
| *libbitcoin_sv2* | Stratum v2 functionality (usage TBD) |

## Conventions

Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ add_subdirectory(util)
if(ENABLE_IPC)
add_subdirectory(ipc)
endif()
if(WITH_SV2)
add_subdirectory(sv2)
endif()

add_library(bitcoin_consensus STATIC EXCLUDE_FROM_ALL
arith_uint256.cpp
Expand Down
1 change: 1 addition & 0 deletions src/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ static const std::map<std::string, BCLog::LogFlags, std::less<>> LOG_CATEGORIES_
{"blockstorage", BCLog::BLOCKSTORAGE},
{"txreconciliation", BCLog::TXRECONCILIATION},
{"scan", BCLog::SCAN},
{"sv2", BCLog::SV2},
{"txpackages", BCLog::TXPACKAGES},
};

Expand Down
1 change: 1 addition & 0 deletions src/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ namespace BCLog {
TXRECONCILIATION = (CategoryMask{1} << 26),
SCAN = (CategoryMask{1} << 27),
TXPACKAGES = (CategoryMask{1} << 28),
SV2 = (CategoryMask{1} << 29),
ALL = ~NONE,
};
enum class Level {
Expand Down
2 changes: 1 addition & 1 deletion src/pubkey.h
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ struct EllSwiftPubKey
/** Construct a new ellswift public key from a given serialization. */
EllSwiftPubKey(std::span<const std::byte> ellswift) noexcept;

/** Decode to normal compressed CPubKey (for debugging purposes). */
/** Decode to normal compressed CPubKey. */
CPubKey Decode() const;

// Read-only access for serialization.
Expand Down
15 changes: 15 additions & 0 deletions src/sv2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2024-present The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.

add_library(bitcoin_sv2 STATIC EXCLUDE_FROM_ALL
noise.cpp
)

target_link_libraries(bitcoin_sv2
PRIVATE
core_interface
bitcoin_clientversion
bitcoin_crypto
$<$<PLATFORM_ID:Windows>:ws2_32>
)
Loading
Loading