Skip to content

Commit

Permalink
Merge pull request #702 from evoskuil/master
Browse files Browse the repository at this point in the history
Remove node.prepopulate configuration setting (always on).
  • Loading branch information
evoskuil authored Dec 19, 2024
2 parents b4cb9cc + bfd4e38 commit d0e4cd2
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 15 deletions.
1 change: 0 additions & 1 deletion include/bitcoin/node/chasers/chaser_validate.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class BCN_API chaser_validate
const system::chain::block& block) NOEXCEPT;

// These are thread safe.
const bool prepopulate_;
const bool concurrent_;
const size_t maximum_backlog_;
const uint64_t initial_subsidy_;
Expand Down
1 change: 0 additions & 1 deletion include/bitcoin/node/settings.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ class BCN_API settings
uint16_t sample_period_seconds;
uint32_t currency_window_minutes;
uint32_t threads;
bool prepopulate;

/// Helpers.
virtual size_t maximum_height_() const NOEXCEPT;
Expand Down
6 changes: 1 addition & 5 deletions src/chasers/chaser_validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ BC_PUSH_WARNING(NO_THROW_IN_NOEXCEPT)
// Higher priority than downloader (net) ensures locality to downloader writes.
chaser_validate::chaser_validate(full_node& node) NOEXCEPT
: chaser(node),
prepopulate_(node.config().node.prepopulate),
concurrent_(node.config().node.concurrent_validation),
maximum_backlog_(node.config().node.maximum_concurrency_()),
initial_subsidy_(node.config().bitcoin.initial_subsidy()),
Expand Down Expand Up @@ -239,10 +238,7 @@ void chaser_validate::validate_block(const header_link& link) NOEXCEPT
return;
}

// TODO: hardwire after performance evaluation with and without.
if (prepopulate_)
block->populate();

block->populate();
if (!query.populate(*block))
{
// This could instead be a case of invalid milestone.
Expand Down
5 changes: 0 additions & 5 deletions src/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,11 +891,6 @@ options_metadata parser::load_settings() THROWS
value<uint32_t>(&configured.node.threads),
"The number of threads in the validation threadpool, defaults to 16."
)
(
"node.prepopulate",
value<bool>(&configured.node.prepopulate),
"Populate block prevous from self before query [testing], defaults to true."
)
(
"node.priority_validation",
value<bool>(&configured.node.priority_validation),
Expand Down
3 changes: 1 addition & 2 deletions src/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ settings::settings() NOEXCEPT
maximum_concurrency{ 50'000 },
sample_period_seconds{ 10 },
currency_window_minutes{ 60 },
threads{ 1 },
prepopulate{ true }
threads{ 1 }
{
}

Expand Down
1 change: 0 additions & 1 deletion test/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ BOOST_AUTO_TEST_CASE(settings__node__default_context__expected)
BOOST_REQUIRE_EQUAL(node.maximum_concurrency_(), 50000_size);
BOOST_REQUIRE_EQUAL(node.sample_period_seconds, 10_u16);
BOOST_REQUIRE_EQUAL(node.threads, 1_u32);
BOOST_REQUIRE_EQUAL(node.prepopulate, true);
BOOST_REQUIRE(node.sample_period() == steady_clock::duration(seconds(10)));
BOOST_REQUIRE_EQUAL(node.currency_window_minutes, 60_u32);
BOOST_REQUIRE(node.currency_window() == steady_clock::duration(minutes(60)));
Expand Down

0 comments on commit d0e4cd2

Please sign in to comment.