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: 0 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ test_libbitcoin_database_test_SOURCES = \
test/tables/archives/txs.cpp \
test/tables/caches/duplicate.cpp \
test/tables/caches/ecdsa.cpp \
test/tables/caches/multisig.cpp \
test/tables/caches/prevout.cpp \
test/tables/caches/schnorr.cpp \
test/tables/caches/validated_bk.cpp \
Expand Down Expand Up @@ -331,7 +330,6 @@ include_bitcoin_database_tables_cachesdir = ${includedir}/bitcoin/database/table
include_bitcoin_database_tables_caches_HEADERS = \
include/bitcoin/database/tables/caches/duplicate.hpp \
include/bitcoin/database/tables/caches/ecdsa.hpp \
include/bitcoin/database/tables/caches/multisig.hpp \
include/bitcoin/database/tables/caches/prevout.hpp \
include/bitcoin/database/tables/caches/schnorr.hpp \
include/bitcoin/database/tables/caches/validated_bk.hpp \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@
<ClCompile Include="..\..\..\..\test\tables\archives\txs.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\duplicate.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\ecdsa.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\multisig.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\prevout.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\schnorr.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\validated_bk.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,6 @@
<ClCompile Include="..\..\..\..\test\tables\caches\ecdsa.cpp">
<Filter>src\tables\caches</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\tables\caches\multisig.cpp">
<Filter>src\tables\caches</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\tables\caches\prevout.cpp">
<Filter>src\tables\caches</Filter>
</ClCompile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\archives\txs.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\duplicate.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\ecdsa.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\multisig.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\prevout.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\schnorr.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\validated_bk.hpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,6 @@
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\ecdsa.hpp">
<Filter>include\bitcoin\database\tables\caches</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\multisig.hpp">
<Filter>include\bitcoin\database\tables\caches</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\prevout.hpp">
<Filter>include\bitcoin\database\tables\caches</Filter>
</ClInclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@
<ClCompile Include="..\..\..\..\test\tables\archives\txs.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\duplicate.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\ecdsa.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\multisig.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\prevout.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\schnorr.cpp" />
<ClCompile Include="..\..\..\..\test\tables\caches\validated_bk.cpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,6 @@
<ClCompile Include="..\..\..\..\test\tables\caches\ecdsa.cpp">
<Filter>src\tables\caches</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\tables\caches\multisig.cpp">
<Filter>src\tables\caches</Filter>
</ClCompile>
<ClCompile Include="..\..\..\..\test\tables\caches\prevout.cpp">
<Filter>src\tables\caches</Filter>
</ClCompile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\archives\txs.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\duplicate.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\ecdsa.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\multisig.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\prevout.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\schnorr.hpp" />
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\validated_bk.hpp" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,6 @@
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\ecdsa.hpp">
<Filter>include\bitcoin\database\tables\caches</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\multisig.hpp">
<Filter>include\bitcoin\database\tables\caches</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\bitcoin\database\tables\caches\prevout.hpp">
<Filter>include\bitcoin\database\tables\caches</Filter>
</ClInclude>
Expand Down
1 change: 0 additions & 1 deletion include/bitcoin/database.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
#include <bitcoin/database/tables/archives/txs.hpp>
#include <bitcoin/database/tables/caches/duplicate.hpp>
#include <bitcoin/database/tables/caches/ecdsa.hpp>
#include <bitcoin/database/tables/caches/multisig.hpp>
#include <bitcoin/database/tables/caches/prevout.hpp>
#include <bitcoin/database/tables/caches/schnorr.hpp>
#include <bitcoin/database/tables/caches/validated_bk.hpp>
Expand Down
19 changes: 15 additions & 4 deletions include/bitcoin/database/query.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -572,24 +572,35 @@ class query
bool set_tx_connected(const tx_link& link, const context& ctx,
uint64_t fee, size_t sigops) NOEXCEPT;

/// Set signature (ecdsa/schnorr/multisig) table entry.
/// Signature Batching.
/// -----------------------------------------------------------------------

/// Set single ecdsa signature row.
bool set_signature(const hash_digest& digest, const ec_compressed& point,
const ec_signature& signature, uint16_t id,
const header_link& link) NOEXCEPT;

/// Set single schnorr signature row.
bool set_signature(const hash_digest& digest, const ec_xonly& point,
const ec_signature& signature, uint16_t id,
const header_link& link) NOEXCEPT;

/// Set ecdsa multisig rows.
bool set_signatures(const hash_digest& digest, const ec_compresseds& keys,
const ec_signatures& sigs, uint16_t id,
const header_link& link) NOEXCEPT;

/// Set schnorr threshold signature rows.
bool set_signatures(const threshold& batch, uint16_t id,
const header_link& link) NOEXCEPT;

/// Signature verification.
/// Verify all signatures in table.
bool verify_ecdsa_signatures(const stopper& cancel, header_links&) NOEXCEPT;
bool verify_schnorr_signatures(const stopper& cancel, header_links&) NOEXCEPT;

/// Purge all signatures in table.
bool purge_ecdsa_signatures() NOEXCEPT;
bool purge_schnorr_signatures() NOEXCEPT;
bool verify_ecdsa_signatures(const stopper& cancel,header_links&) NOEXCEPT;
bool verify_schnorr_signatures(const stopper& cancel, header_links&) NOEXCEPT;

/// Confirmation.
/// -----------------------------------------------------------------------
Expand Down
144 changes: 0 additions & 144 deletions include/bitcoin/database/tables/caches/multisig.hpp

This file was deleted.

24 changes: 2 additions & 22 deletions include/bitcoin/database/tables/schema.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ struct ecdsa
system::hash_size +
system::ec_compressed_size +
system::ec_signature_size +
one + // [m|n] in one byte (m in first row, n in second).
one + // [m|n] packed 16x16 in one byte in first row.
count_ + // input (within block) correlation counter.
schema::header::pk;
static constexpr size_t minrow = minsize;
Expand All @@ -288,7 +288,7 @@ struct schnorr
system::hash_size +
system::ec_xonly_size +
system::ec_signature_size +
one + // category (see system::chain::signatures::category).
one + // to_value(system::chain::signatures::category).
two + // [min|max] in two bytes (min in first row, max in second).
count_ + // input (within block) correlation counter.
schema::header::pk;
Expand All @@ -300,26 +300,6 @@ struct schnorr
static_assert(link::size == 4u);
};

// array
struct multisig
{
static constexpr size_t pk = schema::outs::pk;
using link = schema::outs::link;
static constexpr size_t minsize =
system::hash_size +
system::ec_compressed_size +
system::ec_signature_size +
one + // [m|n] pairing merged to one byte (max 16).
count_ + // input (within block) correlation counter.
schema::header::pk;
static constexpr size_t minrow = minsize;
static constexpr size_t size = minsize;
static constexpr link count() NOEXCEPT { return 1; }
static_assert(minsize == 135u);
static_assert(minrow == 135u);
static_assert(link::size == 4u);
};

// record hashmap
struct duplicate
{
Expand Down
Loading
Loading