From 8ce24c928074f6bf105755dbb4b0843a29fe09dc Mon Sep 17 00:00:00 2001 From: evoskuil Date: Thu, 25 Jun 2026 16:31:57 -0400 Subject: [PATCH 1/5] Add events::silent_secs. --- include/bitcoin/node/events.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/bitcoin/node/events.hpp b/include/bitcoin/node/events.hpp index 8ef112ac..0daa81c2 100644 --- a/include/bitcoin/node/events.hpp +++ b/include/bitcoin/node/events.hpp @@ -62,8 +62,9 @@ enum events : uint8_t filter_msecs, // getfilter timespan in milliseconds. filterhashes_msecs, // getfilterhashes timespan in milliseconds. filterchecks_msecs, // getcfcheckpt timespan in milliseconds. - ecdsa_secs, // process_batch ecdsa timespan in seconds. - schnorr_secs, // process_batch schnorr timespan in seconds. + ecdsa_secs, // ecdsa batch verify timespan in seconds. + schnorr_secs, // schnorr batch verify timespan in seconds. + silent_secs, // silent payment scan timespan in seconds. unknown }; From f92e611c096bbd87a781c3374950ed851db4b5e1 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Thu, 25 Jun 2026 17:13:55 -0400 Subject: [PATCH 2/5] Add silent_start_height setting. --- include/bitcoin/node/settings.hpp | 1 + src/settings.cpp | 1 + test/settings.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/include/bitcoin/node/settings.hpp b/include/bitcoin/node/settings.hpp index 7dab0408..cb65dbb1 100644 --- a/include/bitcoin/node/settings.hpp +++ b/include/bitcoin/node/settings.hpp @@ -49,6 +49,7 @@ class BCN_API settings uint16_t fee_estimate_horizon; uint32_t maximum_height; uint32_t maximum_concurrency; + uint32_t silent_start_height; uint16_t sample_period_seconds; uint32_t currency_window_minutes; uint16_t warn_dirty_background_ratio; diff --git a/src/settings.cpp b/src/settings.cpp index 0eab52db..96414751 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -47,6 +47,7 @@ settings::settings() NOEXCEPT ////snapshot_valid{ 250'000 }, ////snapshot_confirm{ 500'000 }, maximum_height{ 0 }, + silent_start_height{ 0xffffffff_u32 }, maximum_concurrency{ 50'000 }, sample_period_seconds{ 10 }, currency_window_minutes{ 1440 }, diff --git a/test/settings.cpp b/test/settings.cpp index dc132a38..ef669b09 100644 --- a/test/settings.cpp +++ b/test/settings.cpp @@ -45,6 +45,7 @@ BOOST_AUTO_TEST_CASE(settings__node__default_context__expected) BOOST_REQUIRE_EQUAL(node.fee_estimate_horizon, 0u); BOOST_REQUIRE_EQUAL(node.maximum_height, 0_u32); BOOST_REQUIRE_EQUAL(node.maximum_height_(), max_size_t); + BOOST_REQUIRE_EQUAL(node.silent_start_height, 0xffffffff_u32); BOOST_REQUIRE_EQUAL(node.maximum_concurrency, 50000_u32); BOOST_REQUIRE_EQUAL(node.maximum_concurrency_(), 50000_size); BOOST_REQUIRE_EQUAL(node.sample_period_seconds, 10_u16); From 4248d2012e2bc398f4a2fb4b2b26e886ebf00d98 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Thu, 25 Jun 2026 17:14:33 -0400 Subject: [PATCH 3/5] Add error::validate9. --- include/bitcoin/node/error.hpp | 1 + src/error.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/include/bitcoin/node/error.hpp b/include/bitcoin/node/error.hpp index 93610678..a4eddf6c 100644 --- a/include/bitcoin/node/error.hpp +++ b/include/bitcoin/node/error.hpp @@ -91,6 +91,7 @@ enum error_t : uint8_t validate6, validate7, validate8, + validate9, confirm1, confirm2, confirm3, diff --git a/src/error.cpp b/src/error.cpp index b58a5c96..05c37c26 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -81,6 +81,7 @@ DEFINE_ERROR_T_MESSAGE_MAP(error) { validate6, "validate6" }, { validate7, "validate7" }, { validate8, "validate8" }, + { validate9, "validate9" }, { confirm1, "confirm1" }, { confirm2, "confirm2" }, { confirm3, "confirm3" }, From 432310f4dd46366af7fec412d8b02ac8c9574794 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Thu, 25 Jun 2026 17:14:53 -0400 Subject: [PATCH 4/5] Integrate silent_start_height. --- include/bitcoin/node/chasers/chaser_validate.hpp | 1 + src/chasers/chaser_validate.cpp | 1 + src/chasers/chaser_validate_parallel.cpp | 9 +++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/bitcoin/node/chasers/chaser_validate.hpp b/include/bitcoin/node/chasers/chaser_validate.hpp index 409e4cb1..84a1a00b 100644 --- a/include/bitcoin/node/chasers/chaser_validate.hpp +++ b/include/bitcoin/node/chasers/chaser_validate.hpp @@ -146,6 +146,7 @@ class BCN_API chaser_validate network::asio::strand validation_strand_; const uint32_t subsidy_interval_; const uint64_t initial_subsidy_; + const size_t silent_start_height_; const size_t maximum_backlog_; const size_t maximum_height_; const uint64_t batch_target_; diff --git a/src/chasers/chaser_validate.cpp b/src/chasers/chaser_validate.cpp index a31b4a89..b3818b3b 100644 --- a/src/chasers/chaser_validate.cpp +++ b/src/chasers/chaser_validate.cpp @@ -42,6 +42,7 @@ chaser_validate::chaser_validate(full_node& node) NOEXCEPT validation_strand_(validation_threadpool_.service().get_executor()), subsidy_interval_(node.system_settings().subsidy_interval_blocks), initial_subsidy_(node.system_settings().initial_subsidy()), + silent_start_height_(node.node_settings().silent_start_height), maximum_backlog_(node.node_settings().maximum_concurrency_()), maximum_height_(node.node_settings().maximum_height_()), batch_target_(node.node_settings().batch_signatures), diff --git a/src/chasers/chaser_validate_parallel.cpp b/src/chasers/chaser_validate_parallel.cpp index 199e52f2..f28578a7 100644 --- a/src/chasers/chaser_validate_parallel.cpp +++ b/src/chasers/chaser_validate_parallel.cpp @@ -151,10 +151,15 @@ code chaser_validate::validate(bool& batched, bool& faulted, bool& capturing, if (!faulted && !query.set_filter_body(link, block)) return error::validate7; + // Block will be retried if batch is faulted. + if (!faulted && (ctx.height >= silent_start_height_) && + !query.set_silent(link, block)) + return error::validate8; + // Defer block state change when batched (or faulted). - // Valid must be set after set_prevouts and set_filter_body. + // Valid must be set after set_prevouts, set_filter_body, and set_silent. if (!batched && !bypass && !query.set_block_valid(link)) - return error::validate8; + return error::validate9; return error::success; } From 0b9b2182b68ffd5ffbb90dd348ad5ca952a3c7f9 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Thu, 25 Jun 2026 17:58:26 -0400 Subject: [PATCH 5/5] Disable allow_batch_race_. --- include/bitcoin/node/chasers/chaser_validate.hpp | 2 +- src/chasers/chaser_validate.cpp | 2 +- src/chasers/chaser_validate_batch.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/bitcoin/node/chasers/chaser_validate.hpp b/include/bitcoin/node/chasers/chaser_validate.hpp index 84a1a00b..9e231478 100644 --- a/include/bitcoin/node/chasers/chaser_validate.hpp +++ b/include/bitcoin/node/chasers/chaser_validate.hpp @@ -150,7 +150,7 @@ class BCN_API chaser_validate const size_t maximum_backlog_; const size_t maximum_height_; const uint64_t batch_target_; - const bool allow_batch_race_; + ////const bool allow_batch_race_; const bool batch_enabled_; const bool node_witness_; const bool filter_; diff --git a/src/chasers/chaser_validate.cpp b/src/chasers/chaser_validate.cpp index b3818b3b..86ed2b9e 100644 --- a/src/chasers/chaser_validate.cpp +++ b/src/chasers/chaser_validate.cpp @@ -46,7 +46,7 @@ chaser_validate::chaser_validate(full_node& node) NOEXCEPT maximum_backlog_(node.node_settings().maximum_concurrency_()), maximum_height_(node.node_settings().maximum_height_()), batch_target_(node.node_settings().batch_signatures), - allow_batch_race_(node.node_settings().allow_batch_race), + ////allow_batch_race_(node.node_settings().allow_batch_race), batch_enabled_(node.node_settings().batch_signatures_enabled()), node_witness_(node.network_settings().witness_node()), filter_(node.archive().filter_enabled()) diff --git a/src/chasers/chaser_validate_batch.cpp b/src/chasers/chaser_validate_batch.cpp index 99e9de13..171e05d3 100644 --- a/src/chasers/chaser_validate_batch.cpp +++ b/src/chasers/chaser_validate_batch.cpp @@ -61,8 +61,8 @@ void chaser_validate::push_batch(const header_link& link, size_t height) NOEXCEP --batch_backlog_; // Unblocks check chaser for download while verifying. - if (allow_batch_race_) - notify({}, chase::prevalid, possible_wide_cast(height)); + ////if (allow_batch_race_) + notify({}, chase::prevalid, possible_wide_cast(height)); // Process both tables when one hits target, allowing batched_ clearance // and therefore forward confirmation progress. Drain batch if no backlogs