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
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,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.1.1.7\build\native\UltrafastSecp256k1-vc145.targets" Condition="Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.1.1.7\build\native\UltrafastSecp256k1-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')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand All @@ -177,7 +177,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.1.1.7\build\native\UltrafastSecp256k1-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.1.1.7\build\native\UltrafastSecp256k1-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'))" />
</Target>
<ItemGroup>
<ProjectReference Include="..\libbitcoin-node\libbitcoin-node.vcxproj">
Expand Down
2 changes: 1 addition & 1 deletion builds/msvc/vs2026/libbitcoin-node-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.1.1.7" targetFramework="Native" />
<package id="UltrafastSecp256k1-vc145" version="4.3.0.3" 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
4 changes: 2 additions & 2 deletions builds/msvc/vs2026/libbitcoin-node/libbitcoin-node.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,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.1.1.7\build\native\UltrafastSecp256k1-vc145.targets" Condition="Exists('$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.1.1.7\build\native\UltrafastSecp256k1-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')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
Expand All @@ -254,7 +254,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.1.1.7\build\native\UltrafastSecp256k1-vc145.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(NuGetPackageRoot)UltrafastSecp256k1-vc145.4.1.1.7\build\native\UltrafastSecp256k1-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'))" />
</Target>
<ItemGroup>
<Natvis Include="..\..\debug.natvis" />
Expand Down
2 changes: 1 addition & 1 deletion builds/msvc/vs2026/libbitcoin-node/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.1.1.7" targetFramework="Native" />
<package id="UltrafastSecp256k1-vc145" version="4.3.0.3" 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
4 changes: 0 additions & 4 deletions include/bitcoin/node/chase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ enum class chase
/// Issued by 'organize' and handled by 'check', 'validate', 'confirm'.
disorganized,

/// Download concurrency window completed, advancing to next (height_t).
/// Issued by 'check' and handled by 'validate'.
advanced,

/// Check/Identify.
/// -----------------------------------------------------------------------

Expand Down
12 changes: 7 additions & 5 deletions include/bitcoin/node/chasers/chaser_validate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class BCN_API chaser_validate
event_value value) NOEXCEPT;

virtual void do_regressed(height_t branch_point) NOEXCEPT;
virtual void do_advanced(height_t height) NOEXCEPT;
virtual void do_checked(height_t height) NOEXCEPT;
virtual void do_bumped(height_t height) NOEXCEPT;
virtual void do_bump(height_t height) NOEXCEPT;
Expand All @@ -81,8 +80,8 @@ class BCN_API chaser_validate

/// Batching.
virtual code start_batch() NOEXCEPT;
virtual void process_batch() NOEXCEPT;
virtual bool process_valids() NOEXCEPT;
virtual void process_batch(bool residual) NOEXCEPT;
virtual void push_batch(const header_link& link, size_t height) NOEXCEPT;
virtual bool process_invalids(const header_links& invalids) NOEXCEPT;
virtual signatures get_capture(const header_link& link) NOEXCEPT;
Expand Down Expand Up @@ -118,8 +117,10 @@ class BCN_API chaser_validate
const atomic_counter_ptr& sequence) NOEXCEPT;

// Capture helpers.
void log_capture(const std::string_view& name,
size_t captured, size_t missed) const NOEXCEPT;
std::string log_rate(const std::string& name, size_t numerator,
size_t denominator) const NOEXCEPT;
std::string log_ratio(const std::string& name, size_t numerator,
size_t denominator) const NOEXCEPT;
void log_captures() const NOEXCEPT;

// These are protected by strand.
Expand All @@ -146,7 +147,8 @@ class BCN_API chaser_validate
const uint32_t subsidy_interval_;
const uint64_t initial_subsidy_;
const size_t maximum_backlog_;
const bool batch_signatures_;
const uint64_t batch_target_;
const bool batch_enabled_;
const bool node_witness_;
const bool filter_;
};
Expand Down
4 changes: 2 additions & 2 deletions include/bitcoin/node/events.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ enum events : uint8_t
filter_msecs, // getfilter timespan in milliseconds.
filterhashes_msecs, // getfilterhashes timespan in milliseconds.
filterchecks_msecs, // getcfcheckpt timespan in milliseconds.
ecdsa_msecs, // process_batch ecdsa timespan in milliseconds.
schnorr_msecs, // process_batch schnorr timespan in milliseconds.
ecdsa_secs, // process_batch ecdsa timespan in seconds.
schnorr_secs, // process_batch schnorr timespan in seconds.

unknown
};
Expand Down
3 changes: 2 additions & 1 deletion include/bitcoin/node/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ class BCN_API settings
bool thread_priority;
bool memory_priority;
bool allow_overlapped;
bool batch_signatures;
float allowed_deviation;
float minimum_fee_rate;
float minimum_bump_rate;
uint64_t batch_signatures;
uint16_t announcement_cache;
uint16_t fee_estimate_horizon;
uint32_t maximum_height;
Expand All @@ -62,6 +62,7 @@ class BCN_API settings
virtual size_t maximum_concurrency_() const NOEXCEPT;
virtual size_t fee_estimate_horizon_() const NOEXCEPT;
virtual bool fee_estimate_enabled() const NOEXCEPT;
virtual bool batch_signatures_enabled() const NOEXCEPT;
virtual network::steady_clock::duration sample_period() const NOEXCEPT;
virtual network::wall_clock::duration currency_window() const NOEXCEPT;
virtual network::processing_priority thread_priority_() const NOEXCEPT;
Expand Down
3 changes: 0 additions & 3 deletions src/chasers/chaser_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,7 @@ void chaser_check::do_advanced(height_t) NOEXCEPT

// The full count of requested hashes has been validated.
if (advanced_ == requested_)
{
notify(error::success, chase::advanced, advanced_);
do_headers({});
}
}

void chaser_check::do_checked(height_t height) NOEXCEPT
Expand Down
26 changes: 9 additions & 17 deletions src/chasers/chaser_validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ chaser_validate::chaser_validate(full_node& node) NOEXCEPT
subsidy_interval_(node.system_settings().subsidy_interval_blocks),
initial_subsidy_(node.system_settings().initial_subsidy()),
maximum_backlog_(node.node_settings().maximum_concurrency_()),
batch_signatures_(node.node_settings().batch_signatures),
batch_target_(node.node_settings().batch_signatures),
batch_enabled_(node.node_settings().batch_signatures_enabled()),
node_witness_(node.network_settings().witness_node()),
filter_(node.archive().filter_enabled())
{
Expand Down Expand Up @@ -88,16 +89,6 @@ bool chaser_validate::handle_chase(const code&, chase event_,
POST(do_checked, std::get<height_t>(value));
break;
}
case chase::advanced:
{
if (!batch_signatures_)
break;

// value is checked block height.
BC_ASSERT(std::holds_alternative<height_t>(value));
POST(do_advanced, std::get<height_t>(value));
break;
}
case chase::regressed:
case chase::disorganized:
{
Expand Down Expand Up @@ -131,12 +122,6 @@ void chaser_validate::do_regressed(height_t branch_point) NOEXCEPT
set_position(branch_point);
}

void chaser_validate::do_advanced(height_t) NOEXCEPT
{
BC_ASSERT(stranded());
process_batch();
}

void chaser_validate::do_checked(height_t height) NOEXCEPT
{
BC_ASSERT(stranded());
Expand Down Expand Up @@ -386,6 +371,13 @@ void chaser_validate::complete_block(const code& ec, const header_link& link,

// Not failed/invalid/batched/faulted, so block is complete (maybe valid).
notify_block({}, height, link, bypass);

// Arriving here with batch enabled implies that the block is current and
// was not batched. Each such block triggers residual batch processing.
if (batch_enabled_)
{
POST(process_batch, true);
}
}

void chaser_validate::notify_block(const code& ec, size_t height,
Expand Down
Loading
Loading