Skip to content
Merged
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
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ test_libbitcoin_system_test_SOURCES = \
test/chain/stripper.cpp \
test/chain/taproot.cpp \
test/chain/tapscript.cpp \
test/chain/threshold.cpp \
test/chain/transaction.cpp \
test/chain/witness.cpp \
test/chain/enums/opcode.cpp \
Expand Down Expand Up @@ -537,6 +538,7 @@ include_bitcoin_system_chain_HEADERS = \
include/bitcoin/system/chain/stripper.hpp \
include/bitcoin/system/chain/taproot.hpp \
include/bitcoin/system/chain/tapscript.hpp \
include/bitcoin/system/chain/threshold.hpp \
include/bitcoin/system/chain/transaction.hpp \
include/bitcoin/system/chain/witness.hpp

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
<ClCompile Include="..\..\..\..\test\chain\stripper.cpp" />
<ClCompile Include="..\..\..\..\test\chain\taproot.cpp" />
<ClCompile Include="..\..\..\..\test\chain\tapscript.cpp" />
<ClCompile Include="..\..\..\..\test\chain\threshold.cpp" />
<ClCompile Include="..\..\..\..\test\chain\transaction.cpp">
<ObjectFileName>$(IntDir)test_chain_transaction.obj</ObjectFileName>
</ClCompile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@
<ClCompile Include="..\..\..\..\test\chain\tapscript.cpp">
<Filter>src\chain</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\chain\threshold.cpp">
<Filter>src\chain</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\chain\transaction.cpp">
<Filter>src\chain</Filter>
</ClCompile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\stripper.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\taproot.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\tapscript.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\threshold.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\transaction.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\views\block_view.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\views\transaction_view.hpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,9 @@
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\tapscript.hpp">
<Filter>include\bitcoin\system\chain</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\threshold.hpp">
<Filter>include\bitcoin\system\chain</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\transaction.hpp">
<Filter>include\bitcoin\system\chain</Filter>
</ClInclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<Import Project="$(NuGetPackageRoot)libbitcoin-boost_thread-vc145.1.91.0\build\libbitcoin-boost_thread-vc145.targets" Condition="Exists('$(NuGetPackageRoot)libbitcoin-boost_thread-vc145.1.91.0\build\libbitcoin-boost_thread-vc145.targets')" />
<Import Project="$(NuGetPackageRoot)libbitcoin-boost_url-vc145.1.91.0\build\libbitcoin-boost_url-vc145.targets" Condition="Exists('$(NuGetPackageRoot)libbitcoin-boost_url-vc145.1.91.0\build\libbitcoin-boost_url-vc145.targets')" />
<Import Project="$(NuGetPackageRoot)secp256k1_vc145.0.6.1.2\build\native\secp256k1_vc145.targets" Condition="Exists('$(NuGetPackageRoot)secp256k1_vc145.0.6.1.2\build\native\secp256k1_vc145.targets')" />
<Import Project="$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets" Condition="Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets')" />
<Import Project="$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets" Condition="Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand All @@ -156,7 +156,7 @@
<Error Condition="!Exists('$(NuGetPackageRoot)libbitcoin-boost_thread-vc145.1.91.0\build\libbitcoin-boost_thread-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)libbitcoin-boost_thread-vc145.1.91.0\build\libbitcoin-boost_thread-vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)libbitcoin-boost_url-vc145.1.91.0\build\libbitcoin-boost_url-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)libbitcoin-boost_url-vc145.1.91.0\build\libbitcoin-boost_url-vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)secp256k1_vc145.0.6.1.2\build\native\secp256k1_vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)secp256k1_vc145.0.6.1.2\build\native\secp256k1_vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets'))" />
</Target>
<ItemGroup>
<ProjectReference Include="..\libbitcoin-system\libbitcoin-system.vcxproj">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
|
-->
<packages>
<package id="UltrafastSecp256k1-vc145" version="4.3.0.3" targetFramework="Native" />
<package id="UltrafastSecp256k1-vc145" version="4.4.0.1" targetFramework="Native" />
<package id="libbitcoin-boost" version="1.91.0" targetFramework="Native" />
<package id="libbitcoin-boost_container-vc145" version="1.91.0" targetFramework="Native" />
<package id="libbitcoin-boost_iostreams-vc145" version="1.91.0" targetFramework="Native" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@
<ClCompile Include="..\..\..\..\test\chain\stripper.cpp" />
<ClCompile Include="..\..\..\..\test\chain\taproot.cpp" />
<ClCompile Include="..\..\..\..\test\chain\tapscript.cpp" />
<ClCompile Include="..\..\..\..\test\chain\threshold.cpp" />
<ClCompile Include="..\..\..\..\test\chain\transaction.cpp">
<ObjectFileName>$(IntDir)test_chain_transaction.obj</ObjectFileName>
</ClCompile>
Expand Down Expand Up @@ -483,7 +484,7 @@
<Import Project="$(NuGetPackageRoot)libbitcoin-boost_unit_test_framework-vc145.1.91.0\build\libbitcoin-boost_unit_test_framework-vc145.targets" Condition="Exists('$(NuGetPackageRoot)libbitcoin-boost_unit_test_framework-vc145.1.91.0\build\libbitcoin-boost_unit_test_framework-vc145.targets')" />
<Import Project="$(NuGetPackageRoot)libbitcoin-boost_url-vc145.1.91.0\build\libbitcoin-boost_url-vc145.targets" Condition="Exists('$(NuGetPackageRoot)libbitcoin-boost_url-vc145.1.91.0\build\libbitcoin-boost_url-vc145.targets')" />
<Import Project="$(NuGetPackageRoot)secp256k1_vc145.0.6.1.2\build\native\secp256k1_vc145.targets" Condition="Exists('$(NuGetPackageRoot)secp256k1_vc145.0.6.1.2\build\native\secp256k1_vc145.targets')" />
<Import Project="$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets" Condition="Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets')" />
<Import Project="$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets" Condition="Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand All @@ -499,7 +500,7 @@
<Error Condition="!Exists('$(NuGetPackageRoot)libbitcoin-boost_unit_test_framework-vc145.1.91.0\build\libbitcoin-boost_unit_test_framework-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)libbitcoin-boost_unit_test_framework-vc145.1.91.0\build\libbitcoin-boost_unit_test_framework-vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)libbitcoin-boost_url-vc145.1.91.0\build\libbitcoin-boost_url-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)libbitcoin-boost_url-vc145.1.91.0\build\libbitcoin-boost_url-vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)secp256k1_vc145.0.6.1.2\build\native\secp256k1_vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)secp256k1_vc145.0.6.1.2\build\native\secp256k1_vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets'))" />
</Target>
<ItemGroup>
<ProjectReference Include="..\libbitcoin-system\libbitcoin-system.vcxproj">
Expand All @@ -509,4 +510,4 @@
<ItemGroup>
<Natvis Include="..\..\debug.natvis" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@
<ClCompile Include="..\..\..\..\test\chain\tapscript.cpp">
<Filter>src\chain</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\chain\threshold.cpp">
<Filter>src\chain</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\chain\transaction.cpp">
<Filter>src\chain</Filter>
</ClCompile>
Expand Down
2 changes: 1 addition & 1 deletion builds/msvc/vs2026/libbitcoin-system-test/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
|
-->
<packages>
<package id="UltrafastSecp256k1-vc145" version="4.3.0.3" targetFramework="Native" />
<package id="UltrafastSecp256k1-vc145" version="4.4.0.1" targetFramework="Native" />
<package id="libbitcoin-boost" version="1.91.0" targetFramework="Native" />
<package id="libbitcoin-boost_container-vc145" version="1.91.0" targetFramework="Native" />
<package id="libbitcoin-boost_iostreams-vc145" version="1.91.0" targetFramework="Native" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\stripper.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\taproot.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\tapscript.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\threshold.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\transaction.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\views\block_view.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\views\transaction_view.hpp" />
Expand Down Expand Up @@ -773,7 +774,7 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets" Condition="Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets')" />
<Import Project="$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets" Condition="Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets')" />
<Import Project="$(NuGetPackageRoot)libbitcoin-boost.1.91.0\build\libbitcoin-boost.targets" Condition="Exists('$(NuGetPackageRoot)libbitcoin-boost.1.91.0\build\libbitcoin-boost.targets')" />
<Import Project="$(NuGetPackageRoot)libbitcoin-boost_container-vc145.1.91.0\build\libbitcoin-boost_container-vc145.targets" Condition="Exists('$(NuGetPackageRoot)libbitcoin-boost_container-vc145.1.91.0\build\libbitcoin-boost_container-vc145.targets')" />
<Import Project="$(NuGetPackageRoot)libbitcoin-boost_iostreams-vc145.1.91.0\build\libbitcoin-boost_iostreams-vc145.targets" Condition="Exists('$(NuGetPackageRoot)libbitcoin-boost_iostreams-vc145.1.91.0\build\libbitcoin-boost_iostreams-vc145.targets')" />
Expand All @@ -797,9 +798,9 @@
<Error Condition="!Exists('$(NuGetPackageRoot)libbitcoin-boost_thread-vc145.1.91.0\build\libbitcoin-boost_thread-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)libbitcoin-boost_thread-vc145.1.91.0\build\libbitcoin-boost_thread-vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)libbitcoin-boost_url-vc145.1.91.0\build\libbitcoin-boost_url-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)libbitcoin-boost_url-vc145.1.91.0\build\libbitcoin-boost_url-vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)secp256k1_vc145.0.6.1.2\build\native\secp256k1_vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)secp256k1_vc145.0.6.1.2\build\native\secp256k1_vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.3.0.3\build\native\UltrafastSecp256k1-vc145.targets'))" />
<Error Condition="!Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.4.0.1\build\native\UltrafastSecp256k1-vc145.targets'))" />
</Target>
<ItemGroup>
<Natvis Include="..\..\debug.natvis" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,9 @@
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\tapscript.hpp">
<Filter>include\bitcoin\system\chain</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\threshold.hpp">
<Filter>include\bitcoin\system\chain</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\system\chain\transaction.hpp">
<Filter>include\bitcoin\system\chain</Filter>
</ClInclude>
Expand Down
2 changes: 1 addition & 1 deletion builds/msvc/vs2026/libbitcoin-system/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
|
-->
<packages>
<package id="UltrafastSecp256k1-vc145" version="4.3.0.3" targetFramework="Native" />
<package id="UltrafastSecp256k1-vc145" version="4.4.0.1" targetFramework="Native" />
<package id="libbitcoin-boost" version="1.91.0" targetFramework="Native" />
<package id="libbitcoin-boost_container-vc145" version="1.91.0" targetFramework="Native" />
<package id="libbitcoin-boost_iostreams-vc145" version="1.91.0" targetFramework="Native" />
Expand Down
1 change: 1 addition & 0 deletions include/bitcoin/system.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#include <bitcoin/system/chain/stripper.hpp>
#include <bitcoin/system/chain/taproot.hpp>
#include <bitcoin/system/chain/tapscript.hpp>
#include <bitcoin/system/chain/threshold.hpp>
#include <bitcoin/system/chain/transaction.hpp>
#include <bitcoin/system/chain/witness.hpp>
#include <bitcoin/system/chain/enums/coverage.hpp>
Expand Down
1 change: 1 addition & 0 deletions include/bitcoin/system/chain/chain.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <bitcoin/system/chain/stripper.hpp>
#include <bitcoin/system/chain/taproot.hpp>
#include <bitcoin/system/chain/tapscript.hpp>
#include <bitcoin/system/chain/threshold.hpp>
#include <bitcoin/system/chain/transaction.hpp>
#include <bitcoin/system/chain/views/block_view.hpp>
#include <bitcoin/system/chain/views/transaction_view.hpp>
Expand Down
2 changes: 1 addition & 1 deletion include/bitcoin/system/chain/enums/magic_numbers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ constexpr size_t max_unified_stack_size = 1'000;
constexpr size_t max_unified_script_size = 20'000;
constexpr size_t max_script_size = to_half(max_unified_script_size);
constexpr size_t max_push_data_size = 520;
constexpr size_t max_script_public_keys = 20;
constexpr size_t max_multisig_public_keys = 20;
constexpr size_t multisig_default_sigops = 20;
constexpr size_t max_number_size_four = 4;
constexpr size_t max_number_size_five = 5;
Expand Down
52 changes: 3 additions & 49 deletions include/bitcoin/system/chain/signatures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
#define LIBBITCOIN_SYSTEM_CHAIN_SIGNATURES_HPP

#include <atomic>
#include <bitcoin/system/chain/enums/opcode.hpp>
#include <bitcoin/system/chain/script.hpp>
#include <bitcoin/system/chain/threshold.hpp>
#include <bitcoin/system/crypto/crypto.hpp>
#include <bitcoin/system/data/data.hpp>
#include <bitcoin/system/define.hpp>
#include <bitcoin/system/hash/hash.hpp>

Expand Down Expand Up @@ -52,51 +51,6 @@ struct BC_API signatures
schnorr
};

/// Threshold category.
enum class category
{
single,
equal,
inequal,
lesser,
greater,
not_lesser,
not_greater,
between
};

struct threshold_group
{
struct entry
{
/// Digest is created in the sigop (sigop scope - must copy).
hash_digest digest;

/// Point is a stack element (script scope - use reference).
cref<ec_xonly> point;

/// Signature is a stack element (script scope - use reference).
cref<ec_signature> sig;
};

/// Scoping requires that capture_.threshold(threshold_group) does not
/// retain a reference to point or sig (must copy or dispose the refs).
inline bool push_entry(const hash_digest& digest,
const cref<ec_xonly>& point,
const cref<ec_signature>& sig) NOEXCEPT
{
BC_ASSERT(entries.size() == expected);
entries.emplace_back(digest, point, sig);
return entries.size() == expected;
}

std::vector<entry> entries{};
opcode condition{};
uint16_t minimum{};
uint16_t maximum{};
uint16_t expected{};
};

/// Reporting handlers.
using log_handler = std::function<void(const script&)>;
using fire_handler = std::function<void(miss, size_t)>;
Expand All @@ -108,7 +62,7 @@ struct BC_API signatures
const ec_xonly, const ec_signature&)>;
using multisig_handler = std::function<bool(const hash_digest&,
const ec_compresseds&, const ec_signatures&)>;
using threshold_handler = std::function<bool(const threshold_group&)>;
using threshold_handler = std::function<bool(const threshold&)>;

/// Default construction disables batching.
const bool enabled{};
Expand Down Expand Up @@ -151,7 +105,7 @@ struct BC_API signatures
};
const threshold_handler threshold
{
[] (const threshold_group&) NOEXCEPT
[] (const chain::threshold&) NOEXCEPT
{
return false;
}
Expand Down
Loading
Loading