From adc76b014918b0d9c0fc763bf69844b4aa8dd500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 12 Dec 2024 08:24:49 +0100 Subject: [PATCH 01/48] evm: create txn receipt using results from evmone APIv2 (#2581) --- silkworm/core/execution/processor.cpp | 61 ++++++++------------------- 1 file changed, 18 insertions(+), 43 deletions(-) diff --git a/silkworm/core/execution/processor.cpp b/silkworm/core/execution/processor.cpp index 327c1eff07..9ff2c0801a 100644 --- a/silkworm/core/execution/processor.cpp +++ b/silkworm/core/execution/processor.cpp @@ -71,27 +71,7 @@ namespace { /// Checks the result of the transaction execution in evmone (APIv2) /// against the result produced by Silkworm. - void check_evm1_execution_result(const evmone::state::TransactionReceipt& evm1_receipt, - const Receipt& receipt, const CallResult& vm_res, - uint64_t gas_used, const IntraBlockState& state) { - if (static_cast(evm1_receipt.gas_used) != gas_used) { - std::cerr << "g: " << evm1_receipt.gas_used << ", silkworm: " << gas_used << "\n"; - SILKWORM_ASSERT(static_cast(evm1_receipt.gas_used) == gas_used); - } - - SILKWORM_ASSERT(receipt.logs.size() == evm1_receipt.logs.size()); - for (size_t i = 0; i < receipt.logs.size(); ++i) { - const auto& e1l = evm1_receipt.logs[i]; - const auto& exp = receipt.logs[i]; - SILKWORM_ASSERT(e1l.addr == exp.address); - SILKWORM_ASSERT(e1l.topics.size() == exp.topics.size()); - for (size_t j = 0; j < exp.topics.size(); ++j) { - SILKWORM_ASSERT(e1l.topics[j] == exp.topics[j]); - } - SILKWORM_ASSERT(e1l.data == exp.data); - } - - const auto& state_diff = evm1_receipt.state_diff; + void check_evm1_execution_result(const evmone::state::StateDiff& state_diff, const IntraBlockState& state) { for (const auto& entry : state_diff.modified_accounts) { if (std::ranges::find(state_diff.deleted_accounts, entry.addr) != state_diff.deleted_accounts.end()) { continue; @@ -121,15 +101,6 @@ namespace { SILKWORM_ASSERT(state.get_code(m.addr) == m.code); } } - - if (evm1_receipt.status == EVMC_FAILURE) { // imprecise error code - SILKWORM_ASSERT(!receipt.success); - } else if (evm1_receipt.status != EVMC_OUT_OF_GAS && vm_res.status != EVMC_PRECOMPILE_FAILURE) { - if (evm1_receipt.status != vm_res.status) { - std::cerr << "e1: " << evm1_receipt.status << ", silkworm: " << vm_res.status << "\n"; - } - SILKWORM_ASSERT(evm1_receipt.status == vm_res.status); - } } } // namespace @@ -193,11 +164,21 @@ void ExecutionProcessor::execute_transaction(const Transaction& txn, Receipt& re // This must be done before the Silkworm execution so that the state is unmodified. // evmone will not modify the state itself: state is read-only and the state modifications // are provided as the state diff in the returned receipt. - const auto evm1_receipt = evmone::state::transition( + auto evm1_receipt = evmone::state::transition( evm1_state_view, evm1_block_, evm1_block_hashes, evm1_txn, rev, evm_.vm(), static_cast(execution_gas_limit)); - // Optimization: since receipt.logs might have some capacity, let's reuse it. - std::swap(receipt.logs, state_.logs()); + const auto gas_used = static_cast(evm1_receipt.gas_used); + cumulative_gas_used_ += gas_used; + + // Prepare the receipt using the result from evmone. + receipt.type = txn.type; + receipt.success = evm1_receipt.status == EVMC_SUCCESS; + receipt.cumulative_gas_used = cumulative_gas_used_; + receipt.logs.clear(); // can be dirty + receipt.logs.reserve(evm1_receipt.logs.size()); + for (auto& [addr, data, topics] : evm1_receipt.logs) + receipt.logs.emplace_back(Log{addr, std::move(topics), std::move(data)}); + receipt.bloom = logs_bloom(receipt.logs); state_.clear_journal_and_substate(); @@ -226,8 +207,10 @@ void ExecutionProcessor::execute_transaction(const Transaction& txn, Receipt& re state_.subtract_from_balance(*sender, txn.total_blob_gas() * blob_gas_price); const CallResult vm_res = evm_.execute(txn, execution_gas_limit); + SILKWORM_ASSERT((vm_res.status == EVMC_SUCCESS) == receipt.success); + SILKWORM_ASSERT(state_.logs().size() == receipt.logs.size()); - const uint64_t gas_used{txn.gas_limit - refund_gas(txn, effective_gas_price, vm_res.gas_left, vm_res.gas_refund)}; + refund_gas(txn, effective_gas_price, vm_res.gas_left, vm_res.gas_refund); // award the fee recipient const intx::uint256 amount{txn.priority_fee_per_gas(base_fee_per_gas) * gas_used}; @@ -247,15 +230,7 @@ void ExecutionProcessor::execute_transaction(const Transaction& txn, Receipt& re state_.finalize_transaction(rev); - cumulative_gas_used_ += gas_used; - - receipt.type = txn.type; - receipt.success = vm_res.status == EVMC_SUCCESS; - receipt.cumulative_gas_used = cumulative_gas_used_; - receipt.bloom = logs_bloom(state_.logs()); - std::swap(receipt.logs, state_.logs()); - - check_evm1_execution_result(evm1_receipt, receipt, vm_res, gas_used, state_); + check_evm1_execution_result(evm1_receipt.state_diff, state_); } CallResult ExecutionProcessor::call(const Transaction& txn, const std::vector>& tracers, bool bailout, bool refund) noexcept { From b0bb7a05077b8cea07a9ded741ea2c48c58769d2 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Thu, 12 Dec 2024 09:12:43 +0100 Subject: [PATCH 02/48] cmd: move dev/snapshots and common to cli sublibraries (#2574) * support "cli" sublibraries in silkworm_library * reorg cmd/common as infra/cli * move module-specific options to db/cli, node/cli, rpc/cli and sentry/cli * move dev/snapshots sources to db/cli (executable is still defined in cmd) --- cmake/common/targets.cmake | 6 +++ cmd/CMakeLists.txt | 40 +++++++------------ cmd/capi/CMakeLists.txt | 2 +- cmd/capi/execute.cpp | 5 +-- cmd/dev/CMakeLists.txt | 24 ++++------- cmd/dev/backend_kv_server.cpp | 7 ++-- cmd/dev/check_log_indices.cpp | 4 +- cmd/dev/check_senders.cpp | 3 +- cmd/dev/db_toolbox.cpp | 3 +- cmd/dev/staged_pipeline.cpp | 5 +-- cmd/rpcdaemon.cpp | 5 +-- cmd/sentry.cpp | 8 ++-- cmd/silkworm.cpp | 13 +++--- cmd/test/CMakeLists.txt | 6 +-- cmd/test/backend_kv_test.cpp | 3 +- silkworm/db/CMakeLists.txt | 7 +++- .../common => silkworm/db/cli}/CMakeLists.txt | 35 ++++++++-------- .../db/cli}/db_max_readers_option.cpp | 0 .../db/cli}/db_max_readers_option.hpp | 0 .../db/cli}/snapshot_options.cpp | 0 .../db/cli}/snapshot_options.hpp | 0 {cmd/dev => silkworm/db/cli}/snapshots.cpp | 8 +--- silkworm/infra/CMakeLists.txt | 3 ++ silkworm/infra/cli/CMakeLists.txt | 34 ++++++++++++++++ {cmd/common => silkworm/infra/cli}/common.cpp | 0 {cmd/common => silkworm/infra/cli}/common.hpp | 0 .../infra/cli}/human_size_option.cpp | 0 .../infra/cli}/human_size_option.hpp | 0 .../infra/cli}/ip_endpoint_option.cpp | 0 .../infra/cli}/ip_endpoint_option.hpp | 0 .../infra/cli}/shutdown_signal.cpp | 0 .../infra/cli}/shutdown_signal.hpp | 0 silkworm/node/CMakeLists.txt | 7 +++- silkworm/node/cli/CMakeLists.txt | 23 +++++++++++ .../node/cli}/node_options.cpp | 5 +-- .../node/cli}/node_options.hpp | 0 silkworm/rpc/CMakeLists.txt | 8 +++- silkworm/rpc/cli/CMakeLists.txt | 31 ++++++++++++++ .../rpc/cli}/rpcdaemon_options.cpp | 3 +- .../rpc/cli}/rpcdaemon_options.hpp | 0 silkworm/sentry/CMakeLists.txt | 3 ++ silkworm/sentry/cli/CMakeLists.txt | 25 ++++++++++++ .../sentry/cli}/sentry_options.cpp | 4 +- .../sentry/cli}/sentry_options.hpp | 0 44 files changed, 215 insertions(+), 115 deletions(-) rename {cmd/common => silkworm/db/cli}/CMakeLists.txt (59%) rename {cmd/common => silkworm/db/cli}/db_max_readers_option.cpp (100%) rename {cmd/common => silkworm/db/cli}/db_max_readers_option.hpp (100%) rename {cmd/common => silkworm/db/cli}/snapshot_options.cpp (100%) rename {cmd/common => silkworm/db/cli}/snapshot_options.hpp (100%) rename {cmd/dev => silkworm/db/cli}/snapshots.cpp (99%) create mode 100644 silkworm/infra/cli/CMakeLists.txt rename {cmd/common => silkworm/infra/cli}/common.cpp (100%) rename {cmd/common => silkworm/infra/cli}/common.hpp (100%) rename {cmd/common => silkworm/infra/cli}/human_size_option.cpp (100%) rename {cmd/common => silkworm/infra/cli}/human_size_option.hpp (100%) rename {cmd/common => silkworm/infra/cli}/ip_endpoint_option.cpp (100%) rename {cmd/common => silkworm/infra/cli}/ip_endpoint_option.hpp (100%) rename {cmd/common => silkworm/infra/cli}/shutdown_signal.cpp (100%) rename {cmd/common => silkworm/infra/cli}/shutdown_signal.hpp (100%) create mode 100644 silkworm/node/cli/CMakeLists.txt rename {cmd/common => silkworm/node/cli}/node_options.cpp (97%) rename {cmd/common => silkworm/node/cli}/node_options.hpp (100%) create mode 100644 silkworm/rpc/cli/CMakeLists.txt rename {cmd/common => silkworm/rpc/cli}/rpcdaemon_options.cpp (99%) rename {cmd/common => silkworm/rpc/cli}/rpcdaemon_options.hpp (100%) create mode 100644 silkworm/sentry/cli/CMakeLists.txt rename {cmd/common => silkworm/sentry/cli}/sentry_options.cpp (98%) rename {cmd/common => silkworm/sentry/cli}/sentry_options.hpp (100%) diff --git a/cmake/common/targets.cmake b/cmake/common/targets.cmake index 95ed510eb1..97dd11ba58 100644 --- a/cmake/common/targets.cmake +++ b/cmake/common/targets.cmake @@ -46,6 +46,11 @@ function(silkworm_library TARGET) get_directory_property(SUB_LIBS SUBDIRECTORIES) list_filter_dirs(SRC SUB_LIBS) + # cli subdirectories with CMakeLists.txt belong only to silkworm_*_cli libraries + if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "/cli$") + list(FILTER SRC EXCLUDE REGEX "\/cli\/") + endif() + set(TEST_REGEX "_test\\.cpp$") # test_util subdirectories without CMakeLists.txt belong to TEST_SRC if(NOT "${CMAKE_CURRENT_SOURCE_DIR}" MATCHES "/test_util$") @@ -57,6 +62,7 @@ function(silkworm_library TARGET) list(FILTER SRC EXCLUDE REGEX "${TEST_REGEX}") list(FILTER SRC EXCLUDE REGEX "_benchmark\\.cpp$") + add_library(${TARGET} ${ARG_TYPE} ${SRC}) target_include_directories(${TARGET} PUBLIC "${SILKWORM_MAIN_DIR}") diff --git a/cmd/CMakeLists.txt b/cmd/CMakeLists.txt index c568ddca9b..58608ed098 100644 --- a/cmd/CMakeLists.txt +++ b/cmd/CMakeLists.txt @@ -24,16 +24,10 @@ if(NOT SILKWORM_CORE_ONLY) # Benchmarks add_subdirectory(benchmark) - find_package(absl REQUIRED) - find_package(CLI11 REQUIRED) - if(SILKWORM_USE_MIMALLOC) find_package(mimalloc REQUIRED) endif() - # Common modules for commands - add_subdirectory(common) - # State transition and fuzzy tests runner tool add_subdirectory(state-transition) @@ -43,37 +37,31 @@ if(NOT SILKWORM_CORE_ONLY) # Silkworm runnable components # [=] "all-in-one" Silkworm component - set(SILKWORM_CMD_SRC - silkworm.cpp - common/db_max_readers_option.cpp - common/db_max_readers_option.hpp - common/node_options.cpp - common/node_options.hpp - common/rpcdaemon_options.cpp - common/rpcdaemon_options.hpp - common/sentry_options.cpp - common/sentry_options.hpp - common/snapshot_options.cpp - common/snapshot_options.hpp + # cmake-format: off + set(SILKWORM_LIBRARIES + silkworm_node + silkworm_db_cli + silkworm_node_cli + silkworm_rpcdaemon_cli + silkworm_sentry_cli + $<$:Kernel32.lib> ) - set(SILKWORM_LIBRARIES silkworm_node cmd_common $<$:Kernel32.lib>) - add_executable(silkworm "${SILKWORM_CMD_SRC}") + # cmake-format: on + add_executable(silkworm silkworm.cpp) target_link_libraries(silkworm PRIVATE ${SILKWORM_LIBRARIES}) # [=] standalone RpcDaemon component - set(RPCDAEMON_CMD_SRC rpcdaemon.cpp common/rpcdaemon_options.cpp common/rpcdaemon_options.hpp) - set(RPCDAEMON_LIBRARIES silkworm_rpcdaemon absl::flags_parse cmd_common) + set(RPCDAEMON_LIBRARIES silkworm_rpcdaemon silkworm_rpcdaemon_cli) if(SILKWORM_USE_MIMALLOC) list(APPEND RPCDAEMON_LIBRARIES mimalloc-static) endif() - add_executable(rpcdaemon "${RPCDAEMON_CMD_SRC}") + add_executable(rpcdaemon rpcdaemon.cpp) target_include_directories(rpcdaemon PUBLIC ${CMAKE_SOURCE_DIR}) target_link_libraries(rpcdaemon PRIVATE ${RPCDAEMON_LIBRARIES}) # [=] standalone Sentry component - set(SENTRY_CMD_SRC sentry.cpp common/sentry_options.cpp common/sentry_options.hpp) - add_executable(sentry "${SENTRY_CMD_SRC}") - target_link_libraries(sentry PRIVATE silkworm_sentry cmd_common) + add_executable(sentry sentry.cpp) + target_link_libraries(sentry PRIVATE silkworm_sentry silkworm_sentry_cli) endif() diff --git a/cmd/capi/CMakeLists.txt b/cmd/capi/CMakeLists.txt index a75c4a225b..e8fa89ee4e 100644 --- a/cmd/capi/CMakeLists.txt +++ b/cmd/capi/CMakeLists.txt @@ -25,7 +25,7 @@ set(PRIVATE_LIBS silkworm_db silkworm_rpcdaemon silkworm_capi - cmd_common + silkworm_infra_cli ) target_link_libraries(execute PRIVATE ${PRIVATE_LIBS}) diff --git a/cmd/capi/execute.cpp b/cmd/capi/execute.cpp index 083bf606a6..4de9fea9e3 100644 --- a/cmd/capi/execute.cpp +++ b/cmd/capi/execute.cpp @@ -33,13 +33,12 @@ #include #include #include +#include +#include #include #include #include -#include "../common/common.hpp" -#include "../common/shutdown_signal.hpp" - using namespace silkworm; using namespace silkworm::snapshots; using namespace silkworm::cmd::common; diff --git a/cmd/dev/CMakeLists.txt b/cmd/dev/CMakeLists.txt index 5384e95542..c2dc365078 100644 --- a/cmd/dev/CMakeLists.txt +++ b/cmd/dev/CMakeLists.txt @@ -22,16 +22,8 @@ find_package(magic_enum REQUIRED) find_package(Protobuf REQUIRED) find_package(tomlplusplus REQUIRED) -# cmake-format: off -set(BACKEND_KV_SERVER_SRC - backend_kv_server.cpp - ../common/db_max_readers_option.cpp - ../common/db_max_readers_option.hpp - ) -# cmake-format: on - -add_executable(backend_kv_server "${BACKEND_KV_SERVER_SRC}") -target_link_libraries(backend_kv_server PRIVATE silkworm_node silkworm_sync cmd_common) +add_executable(backend_kv_server backend_kv_server.cpp) +target_link_libraries(backend_kv_server PRIVATE silkworm_db_cli silkworm_node silkworm_sync) add_executable(check_blockhashes check_blockhashes.cpp) target_link_libraries(check_blockhashes PRIVATE silkworm_node CLI11::CLI11) @@ -43,13 +35,13 @@ add_executable(check_hashstate check_hashstate.cpp) target_link_libraries(check_hashstate PRIVATE silkworm_node CLI11::CLI11) add_executable(check_log_indices check_log_indices.cpp) -target_link_libraries(check_log_indices PRIVATE silkworm_node cborcpp cmd_common CLI11::CLI11) +target_link_libraries(check_log_indices PRIVATE silkworm_infra_cli silkworm_node cborcpp CLI11::CLI11) add_executable(check_pow check_pow.cpp) target_link_libraries(check_pow PRIVATE silkworm_node CLI11::CLI11) add_executable(check_senders check_senders.cpp) -target_link_libraries(check_senders PRIVATE silkworm_node cmd_common) +target_link_libraries(check_senders PRIVATE silkworm_infra_cli silkworm_node) add_executable(check_tx_lookup check_tx_lookup.cpp) target_link_libraries(check_tx_lookup PRIVATE silkworm_node CLI11::CLI11) @@ -70,11 +62,11 @@ target_link_libraries(kzg_g2_uncompress silkworm_core blst::blst) add_executable(scan_txs scan_txs.cpp) target_link_libraries(scan_txs PRIVATE silkworm_node CLI11::CLI11 absl::time) -add_executable(snapshots snapshots.cpp) -target_link_libraries(snapshots PRIVATE absl::strings cmd_common magic_enum::magic_enum silkworm_node) +add_executable(snapshots "${SILKWORM_MAIN_DIR}/silkworm/db/cli/snapshots.cpp") +target_link_libraries(snapshots PRIVATE absl::strings silkworm_infra_cli magic_enum::magic_enum silkworm_node) add_executable(db_toolbox db_toolbox.cpp) -target_link_libraries(db_toolbox PRIVATE silkworm_node cmd_common CLI11::CLI11 magic_enum::magic_enum) +target_link_libraries(db_toolbox PRIVATE silkworm_node silkworm_infra_cli CLI11::CLI11 magic_enum::magic_enum) add_executable(staged_pipeline staged_pipeline.cpp) -target_link_libraries(staged_pipeline PRIVATE silkworm_node cmd_common CLI11::CLI11 magic_enum::magic_enum) +target_link_libraries(staged_pipeline PRIVATE silkworm_node silkworm_infra_cli CLI11::CLI11 magic_enum::magic_enum) diff --git a/cmd/dev/backend_kv_server.cpp b/cmd/dev/backend_kv_server.cpp index 22d0ed3a0e..bf23d2e016 100644 --- a/cmd/dev/backend_kv_server.cpp +++ b/cmd/dev/backend_kv_server.cpp @@ -33,7 +33,10 @@ #include #include #include +#include #include +#include +#include #include #include #include @@ -46,10 +49,6 @@ #include #include -#include "../common/common.hpp" -#include "../common/db_max_readers_option.hpp" -#include "../common/shutdown_signal.hpp" - using namespace silkworm; using namespace silkworm::cmd::common; diff --git a/cmd/dev/check_log_indices.cpp b/cmd/dev/check_log_indices.cpp index 417ff7c75c..51c2ad72f2 100644 --- a/cmd/dev/check_log_indices.cpp +++ b/cmd/dev/check_log_indices.cpp @@ -22,7 +22,6 @@ #include #include -#include #include #include @@ -34,13 +33,12 @@ #include #include #include +#include #include #include #include #include -#include "../common/common.hpp" - using Roaring = roaring::Roaring; using namespace silkworm; using namespace silkworm::db; diff --git a/cmd/dev/check_senders.cpp b/cmd/dev/check_senders.cpp index 36b0e59f7a..6e711bcb48 100644 --- a/cmd/dev/check_senders.cpp +++ b/cmd/dev/check_senders.cpp @@ -26,13 +26,12 @@ #include #include #include +#include #include #include #include #include -#include "../common/common.hpp" - using namespace silkworm; using namespace silkworm::db; using namespace silkworm::datastore::kvdb; diff --git a/cmd/dev/db_toolbox.cpp b/cmd/dev/db_toolbox.cpp index 4a37d739da..e7d9786854 100644 --- a/cmd/dev/db_toolbox.cpp +++ b/cmd/dev/db_toolbox.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -54,8 +55,6 @@ #include #include -#include "../common/common.hpp" - namespace fs = std::filesystem; using namespace silkworm; using namespace silkworm::db; diff --git a/cmd/dev/staged_pipeline.cpp b/cmd/dev/staged_pipeline.cpp index 9d7ffd4a60..b38eb90028 100644 --- a/cmd/dev/staged_pipeline.cpp +++ b/cmd/dev/staged_pipeline.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -54,8 +55,6 @@ #include #include -#include "../common/common.hpp" - namespace fs = std::filesystem; using namespace silkworm; using namespace silkworm::datastore::kvdb; @@ -255,7 +254,7 @@ static stagedsync::BodiesStageFactory make_bodies_stage_factory( data_model_factory, [] { return 0; }); }; -}; +} static stagedsync::StageContainerFactory make_stages_factory( const NodeSettings& node_settings, diff --git a/cmd/rpcdaemon.cpp b/cmd/rpcdaemon.cpp index e79b3daa85..0a15853604 100644 --- a/cmd/rpcdaemon.cpp +++ b/cmd/rpcdaemon.cpp @@ -17,11 +17,10 @@ #include #include +#include +#include #include -#include "common/common.hpp" -#include "common/rpcdaemon_options.hpp" - using namespace silkworm; using namespace silkworm::cmd::common; using namespace silkworm::rpc; diff --git a/cmd/sentry.cpp b/cmd/sentry.cpp index 4e64ddaeb2..bff604c4e0 100644 --- a/cmd/sentry.cpp +++ b/cmd/sentry.cpp @@ -20,20 +20,18 @@ #include #include #include -#include #include +#include +#include #include #include #include #include +#include #include #include -#include "common/common.hpp" -#include "common/sentry_options.hpp" -#include "common/shutdown_signal.hpp" - using namespace silkworm; using namespace silkworm::cmd::common; using namespace silkworm::sentry; diff --git a/cmd/silkworm.cpp b/cmd/silkworm.cpp index c4b8d47b55..bbe10ff445 100644 --- a/cmd/silkworm.cpp +++ b/cmd/silkworm.cpp @@ -29,18 +29,17 @@ #include #include +#include +#include +#include #include #include #include #include +#include #include - -#include "common/common.hpp" -#include "common/node_options.hpp" -#include "common/rpcdaemon_options.hpp" -#include "common/sentry_options.hpp" -#include "common/shutdown_signal.hpp" -#include "common/snapshot_options.hpp" +#include +#include using namespace silkworm; diff --git a/cmd/test/CMakeLists.txt b/cmd/test/CMakeLists.txt index fae948744e..e00ec2328a 100644 --- a/cmd/test/CMakeLists.txt +++ b/cmd/test/CMakeLists.txt @@ -59,9 +59,9 @@ if(NOT SILKWORM_CORE_ONLY) target_link_libraries(ethereum PRIVATE silkworm_infra evmc::loader CLI11::CLI11 magic_enum::magic_enum) # BE&KV Tests - add_executable(backend_kv_test "backend_kv_test.cpp" "../common/shutdown_signal.hpp" "../common/shutdown_signal.cpp") - target_link_libraries(backend_kv_test PRIVATE silkworm_node CLI11::CLI11 magic_enum::magic_enum) + add_executable(backend_kv_test backend_kv_test.cpp) + target_link_libraries(backend_kv_test PRIVATE silkworm_infra_cli silkworm_node CLI11::CLI11 magic_enum::magic_enum) - add_executable(sentry_client_test "sentry_client_test.cpp") + add_executable(sentry_client_test sentry_client_test.cpp) target_link_libraries(sentry_client_test PRIVATE silkworm_sentry) endif() diff --git a/cmd/test/backend_kv_test.cpp b/cmd/test/backend_kv_test.cpp index 6943c53103..fa916f7876 100644 --- a/cmd/test/backend_kv_test.cpp +++ b/cmd/test/backend_kv_test.cpp @@ -34,14 +34,13 @@ #include #include #include +#include #include #include #include #include #include -#include "../common/shutdown_signal.hpp" - using namespace std::literals; //! The callback to activate reading each event from the gRPC completion queue. diff --git a/silkworm/db/CMakeLists.txt b/silkworm/db/CMakeLists.txt index e8a66497e1..d010b9a980 100644 --- a/silkworm/db/CMakeLists.txt +++ b/silkworm/db/CMakeLists.txt @@ -17,7 +17,6 @@ include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake") add_subdirectory(datastore) -add_subdirectory(test_util) find_package(absl REQUIRED) find_package(asio-grpc REQUIRED) @@ -56,4 +55,10 @@ silkworm_library( PRIVATE ${LIBS_PRIVATE} ) +# silkworm_db_cli depends on silkworm_db +add_subdirectory(cli) + +# silkworm_db_test_util depends on silkworm_db +add_subdirectory(test_util) + target_link_libraries(silkworm_db_test PRIVATE silkworm_db_test_util silkworm_infra_test_util) diff --git a/cmd/common/CMakeLists.txt b/silkworm/db/cli/CMakeLists.txt similarity index 59% rename from cmd/common/CMakeLists.txt rename to silkworm/db/cli/CMakeLists.txt index 0142d33290..44ccc0d136 100644 --- a/cmd/common/CMakeLists.txt +++ b/silkworm/db/cli/CMakeLists.txt @@ -14,20 +14,21 @@ limitations under the License. ]] -if(NOT SILKWORM_CORE_ONLY) - find_package(CLI11 REQUIRED) - - set(COMMON_SRC - common.cpp - common.hpp - human_size_option.cpp - human_size_option.hpp - ip_endpoint_option.cpp - ip_endpoint_option.hpp - shutdown_signal.cpp - shutdown_signal.hpp - ) - add_library(cmd_common "${COMMON_SRC}") - target_link_libraries(cmd_common silkworm-buildinfo CLI11::CLI11 silkworm_infra) - -endif() +include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake") + +find_package(Boost REQUIRED COMPONENTS headers) +find_package(CLI11 REQUIRED) + +set(LIBS_PUBLIC silkworm_db silkworm_infra_cli Boost::headers CLI11::CLI11) + +# cmake-format: off +set(LIBS_PRIVATE + silkworm-buildinfo +) +# cmake-format: on + +silkworm_library( + silkworm_db_cli + PUBLIC ${LIBS_PUBLIC} + PRIVATE ${LIBS_PRIVATE} +) diff --git a/cmd/common/db_max_readers_option.cpp b/silkworm/db/cli/db_max_readers_option.cpp similarity index 100% rename from cmd/common/db_max_readers_option.cpp rename to silkworm/db/cli/db_max_readers_option.cpp diff --git a/cmd/common/db_max_readers_option.hpp b/silkworm/db/cli/db_max_readers_option.hpp similarity index 100% rename from cmd/common/db_max_readers_option.hpp rename to silkworm/db/cli/db_max_readers_option.hpp diff --git a/cmd/common/snapshot_options.cpp b/silkworm/db/cli/snapshot_options.cpp similarity index 100% rename from cmd/common/snapshot_options.cpp rename to silkworm/db/cli/snapshot_options.cpp diff --git a/cmd/common/snapshot_options.hpp b/silkworm/db/cli/snapshot_options.hpp similarity index 100% rename from cmd/common/snapshot_options.hpp rename to silkworm/db/cli/snapshot_options.hpp diff --git a/cmd/dev/snapshots.cpp b/silkworm/db/cli/snapshots.cpp similarity index 99% rename from cmd/dev/snapshots.cpp rename to silkworm/db/cli/snapshots.cpp index 8bbd5e9359..df8f9189b5 100644 --- a/cmd/dev/snapshots.cpp +++ b/silkworm/db/cli/snapshots.cpp @@ -34,14 +34,11 @@ #include #include #include -#include #include #include #include #include -#include #include -#include #include #include #include @@ -56,14 +53,13 @@ #include #include #include +#include +#include #include #include #include #include -#include "../common/common.hpp" -#include "../common/shutdown_signal.hpp" - using namespace silkworm; using namespace silkworm::cmd::common; using namespace silkworm::snapshots; diff --git a/silkworm/infra/CMakeLists.txt b/silkworm/infra/CMakeLists.txt index d1d79d030d..1cb534072d 100644 --- a/silkworm/infra/CMakeLists.txt +++ b/silkworm/infra/CMakeLists.txt @@ -52,6 +52,9 @@ silkworm_library( PRIVATE ${LIBS_PRIVATE} ) +# silkworm_infra_cli depends on silkworm_infra +add_subdirectory(cli) + # silkworm_infra_test_util depends on silkworm_infra add_subdirectory(test_util) diff --git a/silkworm/infra/cli/CMakeLists.txt b/silkworm/infra/cli/CMakeLists.txt new file mode 100644 index 0000000000..164ace2b0a --- /dev/null +++ b/silkworm/infra/cli/CMakeLists.txt @@ -0,0 +1,34 @@ +#[[ + Copyright 2022 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +]] + +include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake") + +find_package(Boost REQUIRED COMPONENTS headers) +find_package(CLI11 REQUIRED) + +set(LIBS_PUBLIC silkworm_core silkworm_infra Boost::headers CLI11::CLI11) + +# cmake-format: off +set(LIBS_PRIVATE + silkworm-buildinfo +) +# cmake-format: on + +silkworm_library( + silkworm_infra_cli + PUBLIC ${LIBS_PUBLIC} + PRIVATE ${LIBS_PRIVATE} +) diff --git a/cmd/common/common.cpp b/silkworm/infra/cli/common.cpp similarity index 100% rename from cmd/common/common.cpp rename to silkworm/infra/cli/common.cpp diff --git a/cmd/common/common.hpp b/silkworm/infra/cli/common.hpp similarity index 100% rename from cmd/common/common.hpp rename to silkworm/infra/cli/common.hpp diff --git a/cmd/common/human_size_option.cpp b/silkworm/infra/cli/human_size_option.cpp similarity index 100% rename from cmd/common/human_size_option.cpp rename to silkworm/infra/cli/human_size_option.cpp diff --git a/cmd/common/human_size_option.hpp b/silkworm/infra/cli/human_size_option.hpp similarity index 100% rename from cmd/common/human_size_option.hpp rename to silkworm/infra/cli/human_size_option.hpp diff --git a/cmd/common/ip_endpoint_option.cpp b/silkworm/infra/cli/ip_endpoint_option.cpp similarity index 100% rename from cmd/common/ip_endpoint_option.cpp rename to silkworm/infra/cli/ip_endpoint_option.cpp diff --git a/cmd/common/ip_endpoint_option.hpp b/silkworm/infra/cli/ip_endpoint_option.hpp similarity index 100% rename from cmd/common/ip_endpoint_option.hpp rename to silkworm/infra/cli/ip_endpoint_option.hpp diff --git a/cmd/common/shutdown_signal.cpp b/silkworm/infra/cli/shutdown_signal.cpp similarity index 100% rename from cmd/common/shutdown_signal.cpp rename to silkworm/infra/cli/shutdown_signal.cpp diff --git a/cmd/common/shutdown_signal.hpp b/silkworm/infra/cli/shutdown_signal.hpp similarity index 100% rename from cmd/common/shutdown_signal.hpp rename to silkworm/infra/cli/shutdown_signal.hpp diff --git a/silkworm/node/CMakeLists.txt b/silkworm/node/CMakeLists.txt index 987c8da405..3fe6abdd12 100644 --- a/silkworm/node/CMakeLists.txt +++ b/silkworm/node/CMakeLists.txt @@ -18,7 +18,6 @@ include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake") add_subdirectory(execution/block) add_subdirectory(stagedsync/stages) -add_subdirectory(test_util) find_package(absl REQUIRED COMPONENTS strings) find_package(asio-grpc REQUIRED) @@ -60,4 +59,10 @@ silkworm_library( PRIVATE ${SILKWORM_NODE_PRIVATE_LIBS} ) +# silkworm_node_cli depends on silkworm_node +add_subdirectory(cli) + +# silkworm_node_test_util depends on silkworm_node +add_subdirectory(test_util) + target_link_libraries(silkworm_node_test PRIVATE silkworm_node_test_util GTest::gmock) diff --git a/silkworm/node/cli/CMakeLists.txt b/silkworm/node/cli/CMakeLists.txt new file mode 100644 index 0000000000..9f7ca5e063 --- /dev/null +++ b/silkworm/node/cli/CMakeLists.txt @@ -0,0 +1,23 @@ +#[[ + Copyright 2022 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +]] + +include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake") + +find_package(CLI11 REQUIRED) + +set(LIBS_PUBLIC silkworm_core silkworm_node silkworm_infra_cli CLI11::CLI11) + +silkworm_library(silkworm_node_cli PUBLIC ${LIBS_PUBLIC}) diff --git a/cmd/common/node_options.cpp b/silkworm/node/cli/node_options.cpp similarity index 97% rename from cmd/common/node_options.cpp rename to silkworm/node/cli/node_options.cpp index 7b55c0e6ce..1ae89965b8 100644 --- a/cmd/common/node_options.cpp +++ b/silkworm/node/cli/node_options.cpp @@ -20,9 +20,8 @@ #include #include - -#include "common.hpp" -#include "human_size_option.hpp" +#include +#include namespace silkworm::cmd::common { diff --git a/cmd/common/node_options.hpp b/silkworm/node/cli/node_options.hpp similarity index 100% rename from cmd/common/node_options.hpp rename to silkworm/node/cli/node_options.hpp diff --git a/silkworm/rpc/CMakeLists.txt b/silkworm/rpc/CMakeLists.txt index 433d59d705..ebeff4b901 100644 --- a/silkworm/rpc/CMakeLists.txt +++ b/silkworm/rpc/CMakeLists.txt @@ -16,8 +16,6 @@ include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake") -add_subdirectory(test_util) - find_package(absl REQUIRED) find_package(asio-grpc REQUIRED) find_package(Boost REQUIRED COMPONENTS headers container) @@ -60,6 +58,12 @@ silkworm_library( PRIVATE ${SILKWORM_RPCDAEMON_PRIVATE_LIBRARIES} ) +# silkworm_rpcdaemon_cli depends on silkworm_rpcdaemon +add_subdirectory(cli) + +# silkworm_rpcdaemon_test_util depends on silkworm_rpcdaemon +add_subdirectory(test_util) + target_link_libraries( silkworm_rpcdaemon_test PRIVATE silkworm_infra_test_util silkworm_rpcdaemon_test_util GTest::gmock ) diff --git a/silkworm/rpc/cli/CMakeLists.txt b/silkworm/rpc/cli/CMakeLists.txt new file mode 100644 index 0000000000..c05bd8891b --- /dev/null +++ b/silkworm/rpc/cli/CMakeLists.txt @@ -0,0 +1,31 @@ +#[[ + Copyright 2022 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +]] + +include("${SILKWORM_MAIN_DIR}/cmake/common/targets.cmake") + +find_package(absl REQUIRED) +find_package(CLI11 REQUIRED) + +set(LIBS_PUBLIC + silkworm_core + silkworm_rpcdaemon + silkworm_infra_cli + Boost::headers + absl::strings + CLI11::CLI11 +) + +silkworm_library(silkworm_rpcdaemon_cli PUBLIC ${LIBS_PUBLIC}) diff --git a/cmd/common/rpcdaemon_options.cpp b/silkworm/rpc/cli/rpcdaemon_options.cpp similarity index 99% rename from cmd/common/rpcdaemon_options.cpp rename to silkworm/rpc/cli/rpcdaemon_options.cpp index 4cc18734c1..eb2be01344 100644 --- a/cmd/common/rpcdaemon_options.cpp +++ b/silkworm/rpc/cli/rpcdaemon_options.cpp @@ -21,10 +21,9 @@ #include +#include #include -#include "ip_endpoint_option.hpp" - namespace silkworm::cmd::common { //! All Ethereum EL JSON RPC API namespaces (standard + custom) diff --git a/cmd/common/rpcdaemon_options.hpp b/silkworm/rpc/cli/rpcdaemon_options.hpp similarity index 100% rename from cmd/common/rpcdaemon_options.hpp rename to silkworm/rpc/cli/rpcdaemon_options.hpp diff --git a/silkworm/sentry/CMakeLists.txt b/silkworm/sentry/CMakeLists.txt index a380048ffb..f4b373180d 100644 --- a/silkworm/sentry/CMakeLists.txt +++ b/silkworm/sentry/CMakeLists.txt @@ -69,3 +69,6 @@ silkworm_library( PUBLIC ${LIBS_PUBLIC} PRIVATE ${LIBS_PRIVATE} ) + +# silkworm_sentry_cli depends on silkworm_sentry +add_subdirectory(cli) diff --git a/silkworm/sentry/cli/CMakeLists.txt b/silkworm/sentry/cli/CMakeLists.txt new file mode 100644 index 0000000000..8d12f8ef3a --- /dev/null +++ b/silkworm/sentry/cli/CMakeLists.txt @@ -0,0 +1,25 @@ +#[[ + Copyright 2022 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +]] + +set(TARGET silkworm_sentry_cli) + +find_package(CLI11 REQUIRED) + +file(GLOB_RECURSE SRC CONFIGURE_DEPENDS "*.cpp" "*.hpp") + +add_library(${TARGET} ${SRC}) + +target_link_libraries(${TARGET} PUBLIC silkworm_core silkworm_infra silkworm_sentry silkworm_infra_cli CLI11::CLI11) diff --git a/cmd/common/sentry_options.cpp b/silkworm/sentry/cli/sentry_options.cpp similarity index 98% rename from cmd/common/sentry_options.cpp rename to silkworm/sentry/cli/sentry_options.cpp index 6ac007ba24..ba1384c9c2 100644 --- a/cmd/common/sentry_options.cpp +++ b/silkworm/sentry/cli/sentry_options.cpp @@ -22,11 +22,9 @@ #include #include +#include #include -#include "common.hpp" -#include "ip_endpoint_option.hpp" - namespace silkworm::cmd::common { template diff --git a/cmd/common/sentry_options.hpp b/silkworm/sentry/cli/sentry_options.hpp similarity index 100% rename from cmd/common/sentry_options.hpp rename to silkworm/sentry/cli/sentry_options.hpp From fa7a2e076c0d9a1402cd5d889d7d58b27b9a2f8c Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Thu, 12 Dec 2024 09:17:34 +0100 Subject: [PATCH 03/48] node: restore account code hash in HashState unwind (#2580) We need to restore the code hash into the account during the HashState unwind procedure when we encounter an account having non-zero incarnation and empty code hash. *Extras* - improve error logs - avoid some CLion warnings --- .../stagedsync/stages/stage_hashstate.cpp | 179 ++++++++---------- .../stagedsync/stages/stage_hashstate.hpp | 6 +- 2 files changed, 78 insertions(+), 107 deletions(-) diff --git a/silkworm/node/stagedsync/stages/stage_hashstate.cpp b/silkworm/node/stagedsync/stages/stage_hashstate.cpp index 826d6acbf2..de7472d5b1 100644 --- a/silkworm/node/stagedsync/stages/stage_hashstate.cpp +++ b/silkworm/node/stagedsync/stages/stage_hashstate.cpp @@ -36,6 +36,7 @@ using silkworm::datastore::etl::Entry; Stage::Result HashState::forward(RWTxn& txn) { Stage::Result ret{Stage::Result::kSuccess}; + operation_ = OperationType::kForward; try { throw_if_stopping(); @@ -98,20 +99,16 @@ Stage::Result HashState::forward(RWTxn& txn) { txn.commit_and_renew(); } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -123,6 +120,7 @@ Stage::Result HashState::forward(RWTxn& txn) { Stage::Result HashState::unwind(RWTxn& txn) { Stage::Result ret{Stage::Result::kSuccess}; + if (!sync_context_->unwind_point.has_value()) return ret; const BlockNum to{sync_context_->unwind_point.value()}; @@ -154,20 +152,16 @@ Stage::Result HashState::unwind(RWTxn& txn) { txn.commit_and_renew(); } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -182,6 +176,7 @@ Stage::Result HashState::prune(RWTxn&) { Stage::Result HashState::hash_from_plainstate(RWTxn& txn) { Stage::Result ret{Stage::Result::kSuccess}; + try { auto source = txn.ro_cursor_dup_sort(table::kPlainState); auto data{source->to_first(/*throw_notfound=*/true)}; @@ -233,7 +228,6 @@ Stage::Result HashState::hash_from_plainstate(RWTxn& txn) { Entry entry{Bytes(address_hash.bytes, kHashLength), Bytes{from_slice(data.value)}}; collector_->collect(std::move(entry)); - } else if (data.key.length() == kPlainStoragePrefixLength) { // Hash storage // data.key == Address + Incarnation @@ -246,7 +240,7 @@ Stage::Result HashState::hash_from_plainstate(RWTxn& txn) { // Iterate dupkeys only to avoid re-hashing of same address while (data) { - if (!(data.value.length() > kHashLength)) { + if (data.value.length() <= kHashLength) { const auto incarnation{endian::load_big_u64(&data_key_view[kAddressLength])}; const std::string what("Unexpected empty value in PlainState for Account " + current_key_ + " incarnation " + std::to_string(incarnation)); @@ -325,20 +319,16 @@ Stage::Result HashState::hash_from_plainstate(RWTxn& txn) { } } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -347,6 +337,7 @@ Stage::Result HashState::hash_from_plainstate(RWTxn& txn) { Stage::Result HashState::hash_from_plaincode(RWTxn& txn) { Stage::Result ret{Stage::Result::kSuccess}; + try { auto source = txn.ro_cursor(table::kPlainCodeHash); auto data{source->to_first(/*throw_notfound=*/false)}; @@ -402,20 +393,16 @@ Stage::Result HashState::hash_from_plaincode(RWTxn& txn) { } } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -424,6 +411,7 @@ Stage::Result HashState::hash_from_plaincode(RWTxn& txn) { Stage::Result HashState::hash_from_account_changeset(RWTxn& txn, BlockNum previous_progress, BlockNum to) { Stage::Result ret{Stage::Result::kSuccess}; + try { /* * 1) Read AccountChangeSet from previous_progress to 'to' @@ -431,7 +419,6 @@ Stage::Result HashState::hash_from_account_changeset(RWTxn& txn, BlockNum previo * 3) Process the collected list and write values into Hashed tables (Account and Code) */ - BlockNum reached_blocknum{0}; BlockNum expected_blocknum{previous_progress + 1}; ChangedAddresses changed_addresses{}; @@ -445,12 +432,11 @@ Stage::Result HashState::hash_from_account_changeset(RWTxn& txn, BlockNum previo auto source_initial_key{block_key(expected_blocknum)}; auto source_changeset = txn.ro_cursor_dup_sort(table::kAccountChangeSet); auto source_plainstate = txn.ro_cursor_dup_sort(table::kPlainState); - auto changeset_data{ - source_changeset->find(to_slice(source_initial_key), // Initial record MUST be found because - /*throw_notfound=*/true)}; // there is at least 1 change per block - // (the miner reward) + + // Initial record MUST be found because there is at least 1 change per block: the miner reward + auto changeset_data = source_changeset->find(to_slice(source_initial_key), /*throw_notfound=*/true); while (changeset_data.done) { - reached_blocknum = endian::load_big_u64(from_slice(changeset_data.key).data()); + const BlockNum reached_blocknum = endian::load_big_u64(from_slice(changeset_data.key).data()); check_block_sequence(reached_blocknum, expected_blocknum); if (reached_blocknum > to) { break; @@ -468,7 +454,7 @@ Stage::Result HashState::hash_from_account_changeset(RWTxn& txn, BlockNum previo evmc::address address{bytes_to_address(changeset_value_view)}; if (!changed_addresses.contains(address)) { auto address_hash{to_bytes32(keccak256(address.bytes).bytes)}; - auto plainstate_data{source_plainstate->find(db::to_slice(address), /*throw_notfound=*/false)}; + auto plainstate_data = source_plainstate->find(db::to_slice(address), /*throw_notfound=*/false); if (plainstate_data.done) { Bytes current_value{from_slice(plainstate_data.value)}; changed_addresses[address] = std::make_pair(address_hash, current_value); @@ -482,23 +468,18 @@ Stage::Result HashState::hash_from_account_changeset(RWTxn& txn, BlockNum previo changeset_data = source_changeset->to_next(/*throw_notfound=*/false); } - ret = write_changes_from_changed_addresses(txn, changed_addresses); - + write_changes_from_changed_addresses(txn, changed_addresses); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -507,6 +488,7 @@ Stage::Result HashState::hash_from_account_changeset(RWTxn& txn, BlockNum previo Stage::Result HashState::hash_from_storage_changeset(RWTxn& txn, BlockNum previous_progress, BlockNum to) { Stage::Result ret{Stage::Result::kSuccess}; + try { /* * 1) Read StorageChangeSet from previous_progress to 'to' @@ -514,8 +496,6 @@ Stage::Result HashState::hash_from_storage_changeset(RWTxn& txn, BlockNum previo * 3) Process the collected list and write values into HashedStorage */ - BlockNum reached_blocknum{0}; - StorageChanges storage_changes{}; absl::btree_map hashed_addresses{}; @@ -542,7 +522,7 @@ Stage::Result HashState::hash_from_storage_changeset(RWTxn& txn, BlockNum previo // process changes while (changeset_data.done) { auto changeset_key_view{from_slice(changeset_data.key)}; - reached_blocknum = endian::load_big_u64(changeset_key_view.data()); + const BlockNum reached_blocknum = endian::load_big_u64(changeset_key_view.data()); if (reached_blocknum > to) { break; } @@ -582,23 +562,18 @@ Stage::Result HashState::hash_from_storage_changeset(RWTxn& txn, BlockNum previo changeset_data = source_changeset->to_next(/*throw_notfound=*/false); } - ret = write_changes_from_changed_storage(txn, storage_changes, hashed_addresses); - + write_changes_from_changed_storage(txn, storage_changes, hashed_addresses); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -607,6 +582,7 @@ Stage::Result HashState::hash_from_storage_changeset(RWTxn& txn, BlockNum previo Stage::Result HashState::unwind_from_account_changeset(RWTxn& txn, BlockNum previous_progress, BlockNum to) { Stage::Result ret{Stage::Result::kSuccess}; + try { /* * This behaves pretty much similar to hash_from_account_changeset with one major difference: @@ -634,7 +610,7 @@ Stage::Result HashState::unwind_from_account_changeset(RWTxn& txn, BlockNum prev auto changeset_cursor = txn.ro_cursor_dup_sort(table::kAccountChangeSet); auto initial_key{block_key(expected_blocknum)}; - auto changeset_data{changeset_cursor->find(to_slice(initial_key), /*throw_notfound=*/true)}; + auto changeset_data = changeset_cursor->find(to_slice(initial_key), /*throw_notfound=*/true); while (changeset_data.done) { reached_blocknum = endian::load_big_u64(from_slice(changeset_data.key).data()); @@ -670,24 +646,19 @@ Stage::Result HashState::unwind_from_account_changeset(RWTxn& txn, BlockNum prev changeset_data = changeset_cursor->to_next(/*throw_notfound=*/false); } - ret = write_changes_from_changed_addresses(txn, changed_addresses); - + write_changes_from_changed_addresses(txn, changed_addresses); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); - return Stage::Result::kDbError; + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + ret = Stage::Result::kDbError; } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); - return Stage::Result::kUnexpectedError; + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "undefined"}); - return Stage::Result::kUnexpectedError; + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "undefined"}); + ret = Stage::Result::kUnexpectedError; } return ret; @@ -723,11 +694,13 @@ Stage::Result HashState::unwind_from_storage_changeset(RWTxn& txn, BlockNum prev auto changeset_cursor = txn.ro_cursor_dup_sort(table::kStorageChangeSet); auto initial_key_prefix{block_key(to + 1)}; - auto changeset_data{changeset_cursor->lower_bound(to_slice(initial_key_prefix), /*throw_notfound=*/false)}; + auto changeset_data = changeset_cursor->lower_bound(to_slice(initial_key_prefix), /*throw_notfound=*/false); if (!changeset_data.done) { - log::Warning(log_prefix_, - {"function", std::string(__FUNCTION__), "warning", "no storage changeset found", "description", "this should only happen during integration tests"}); + SILK_TRACE_M(log_prefix_, + {"function", std::string(__FUNCTION__), + "warning", "no storage changeset found", + "description", "this should only happen during integration tests"}); return ret; } @@ -775,30 +748,25 @@ Stage::Result HashState::unwind_from_storage_changeset(RWTxn& txn, BlockNum prev changeset_data = changeset_cursor->to_next(/*throw_notfound=*/false); } - ret = write_changes_from_changed_storage(txn, storage_changes, hashed_addresses); - + write_changes_from_changed_storage(txn, storage_changes, hashed_addresses); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "undefined"}); ret = Stage::Result::kUnexpectedError; } return ret; } -Stage::Result HashState::write_changes_from_changed_addresses(RWTxn& txn, const ChangedAddresses& changed_addresses) { +void HashState::write_changes_from_changed_addresses(RWTxn& txn, const ChangedAddresses& changed_addresses) { throw_if_stopping(); std::unique_lock log_lck(log_mtx_); @@ -831,16 +799,23 @@ Stage::Result HashState::write_changes_from_changed_addresses(RWTxn& txn, const target_hashed_accounts->upsert(db::to_slice(address_hash), to_slice(current_encoded_value)); // Lookup value in PlainCodeHash for Contract - const auto incarnation{Account::incarnation_from_encoded_storage(current_encoded_value)}; - success_or_throw(incarnation); - if (incarnation != 0) { + auto account = Account::from_encoded_storage(current_encoded_value); + success_or_throw(account); + if (account->incarnation != 0) { std::memcpy(&plain_code_key[0], address.bytes, kAddressLength); std::memcpy(&hashed_code_key[0], address_hash.bytes, kHashLength); - endian::store_big_u64(&hashed_code_key[kHashLength], *incarnation); - endian::store_big_u64(&plain_code_key[kAddressLength], *incarnation); - auto code_data{source_plaincode->find(to_slice(plain_code_key), - /*throw_notfound=*/false)}; + endian::store_big_u64(&hashed_code_key[kHashLength], account->incarnation); + endian::store_big_u64(&plain_code_key[kAddressLength], account->incarnation); + const auto code_data = source_plaincode->find(to_slice(plain_code_key), /*throw_notfound=*/false); if (code_data.done && !code_data.value.empty()) { + if (account->code_hash == kEmptyHash) { + SILK_TRACE_M(log_prefix_, {"function", std::string(__FUNCTION__), + "address", address_to_hex(address), + "address_hash", to_hex(address_hash), + "incarnation", std::to_string(account->incarnation)}); + std::memcpy(account->code_hash.bytes, code_data.value.data(), kHashLength); + target_hashed_accounts->upsert(db::to_slice(address_hash), to_slice(account->encode_for_storage())); + } target_hashed_code->upsert(to_slice(hashed_code_key), code_data.value); } else { target_hashed_code->erase(to_slice(hashed_code_key)); @@ -850,11 +825,9 @@ Stage::Result HashState::write_changes_from_changed_addresses(RWTxn& txn, const target_hashed_accounts->erase(db::to_slice(address_hash)); } } - - return Stage::Result::kSuccess; } -Stage::Result HashState::write_changes_from_changed_storage( +void HashState::write_changes_from_changed_storage( RWTxn& txn, StorageChanges& storage_changes, const absl::btree_map& hashed_addresses) { throw_if_stopping(); @@ -886,8 +859,6 @@ Stage::Result HashState::write_changes_from_changed_storage( } } } - - return Stage::Result::kSuccess; } std::vector HashState::get_log_progress() { diff --git a/silkworm/node/stagedsync/stages/stage_hashstate.hpp b/silkworm/node/stagedsync/stages/stage_hashstate.hpp index 4e8bb335cc..6a83974397 100644 --- a/silkworm/node/stagedsync/stages/stage_hashstate.hpp +++ b/silkworm/node/stagedsync/stages/stage_hashstate.hpp @@ -67,11 +67,11 @@ class HashState final : public Stage { Stage::Result unwind_from_storage_changeset(db::RWTxn& txn, BlockNum previous_progress, BlockNum to); //! \brief Writes to db the changes collected from account changeset scan either in forward or unwind mode - Stage::Result write_changes_from_changed_addresses(db::RWTxn& txn, const ChangedAddresses& changed_addresses); + void write_changes_from_changed_addresses(db::RWTxn& txn, const ChangedAddresses& changed_addresses); //! \brief Writes to db the changes collected from storage changeset scan either in forward or unwind mode - Stage::Result write_changes_from_changed_storage(db::RWTxn& txn, silkworm::db::StorageChanges& storage_changes, - const absl::btree_map& hashed_addresses); + void write_changes_from_changed_storage(db::RWTxn& txn, silkworm::db::StorageChanges& storage_changes, + const absl::btree_map& hashed_addresses); //! \brief Resets all fields related to log progress tracking void reset_log_progress(); From f7078cf2f183eeae852e94a17998fe4dfe96b950 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Thu, 12 Dec 2024 14:20:04 +0100 Subject: [PATCH 04/48] capi: fix capi_test with ASAN (#1881) (#2576) Problem: Linking silkworm_node.lib to both silkworm_capi.dll and silkworm_capi_test.exe produces 2 sets of global data (identical symbols), which is a conflict according to ASAN ODR: https://github.com/google/sanitizers/wiki/AddressSanitizerOneDefinitionRuleViolation Solution: Build silkworm_capi_static.lib separately, and use it with silkworm_capi_static_test.exe and capi/execute.exe so that the linker can resolve duplicate symbols. --- cmake/compiler_settings.cmake | 2 +- cmd/capi/CMakeLists.txt | 2 +- silkworm/capi/CMakeLists.txt | 30 +++++++++++++----------------- silkworm/capi/fork_validator.cpp | 1 + silkworm/capi/instance.hpp | 16 +++++++++++++--- silkworm/capi/rpcdaemon.cpp | 2 ++ silkworm/capi/silkworm.cpp | 2 ++ silkworm/capi/silkworm_test.cpp | 3 ++- 8 files changed, 35 insertions(+), 23 deletions(-) diff --git a/cmake/compiler_settings.cmake b/cmake/compiler_settings.cmake index 53a600aa4b..c6cf2395b5 100644 --- a/cmake/compiler_settings.cmake +++ b/cmake/compiler_settings.cmake @@ -16,7 +16,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/compiler_settings_sanitize.cmake) -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") +if(MSVC) message("MSVC_VERSION = ${MSVC_VERSION}") message("MSVC_CXX_ARCHITECTURE_ID = ${MSVC_CXX_ARCHITECTURE_ID}") diff --git a/cmd/capi/CMakeLists.txt b/cmd/capi/CMakeLists.txt index e8fa89ee4e..2431e8da76 100644 --- a/cmd/capi/CMakeLists.txt +++ b/cmd/capi/CMakeLists.txt @@ -24,7 +24,7 @@ set(PRIVATE_LIBS silkworm_infra silkworm_db silkworm_rpcdaemon - silkworm_capi + silkworm_capi_static silkworm_infra_cli ) diff --git a/silkworm/capi/CMakeLists.txt b/silkworm/capi/CMakeLists.txt index 17b13979c4..8e547b91b5 100644 --- a/silkworm/capi/CMakeLists.txt +++ b/silkworm/capi/CMakeLists.txt @@ -31,35 +31,31 @@ set(PRIVATE_LIBS silkworm_rpcdaemon ) -# Temporarily skip unit test runner for silkworm_capi target in ASAN build (failures after PR #1879) -if(SILKWORM_SANITIZE) - set(NO_TEST "NO_TEST") -endif() - # cmake-format: off silkworm_library( ${TARGET} PUBLIC ${PUBLIC_LIBS} PRIVATE ${PRIVATE_LIBS} TYPE SHARED - ${NO_TEST} + NO_TEST ) # cmake-format: on -if(NOT NO_TEST) - target_link_libraries( - silkworm_capi_test - PRIVATE silkworm_core - silkworm_db - silkworm_infra - silkworm_rpcdaemon - silkworm_node - silkworm_db_test_util - ) -endif() +# cmake-format: off +# unit tests and cmd will use a static library version +# to avoid ODR violations when identical symbols are mixed into both .dll and .exe +silkworm_library( + ${TARGET}_static + PUBLIC ${PUBLIC_LIBS} + PRIVATE ${PRIVATE_LIBS} + TYPE STATIC +) +# cmake-format: on # Remove custom stack_size linker option for this target get_target_property(LINK_OPTIONS ${TARGET} LINK_OPTIONS) list(REMOVE_ITEM LINK_OPTIONS "-Wl,-stack_size") list(REMOVE_ITEM LINK_OPTIONS "-Wl,${SILKWORM_STACK_SIZE}") set_target_properties(${TARGET} PROPERTIES LINK_OPTIONS "${LINK_OPTIONS}") + +target_link_libraries(silkworm_capi_static_test PRIVATE silkworm_db_test_util silkworm_node) diff --git a/silkworm/capi/fork_validator.cpp b/silkworm/capi/fork_validator.cpp index bfed95e6ec..356cbc4a34 100644 --- a/silkworm/capi/fork_validator.cpp +++ b/silkworm/capi/fork_validator.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include diff --git a/silkworm/capi/instance.hpp b/silkworm/capi/instance.hpp index 1469731615..77766714b5 100644 --- a/silkworm/capi/instance.hpp +++ b/silkworm/capi/instance.hpp @@ -22,11 +22,21 @@ #include -#include #include #include -#include -#include +#include + +namespace silkworm::snapshots { +class SnapshotRepository; +} // namespace silkworm::snapshots + +namespace silkworm::rpc { +class Daemon; +} // namespace silkworm::rpc + +namespace silkworm::stagedsync { +class ExecutionEngine; +} // namespace silkworm::stagedsync struct SilkwormInstance { silkworm::log::Settings log_settings; diff --git a/silkworm/capi/rpcdaemon.cpp b/silkworm/capi/rpcdaemon.cpp index 0d43c6222f..8c9d5d8a61 100644 --- a/silkworm/capi/rpcdaemon.cpp +++ b/silkworm/capi/rpcdaemon.cpp @@ -14,7 +14,9 @@ limitations under the License. */ +#include #include +#include #include #include "common.hpp" diff --git a/silkworm/capi/silkworm.cpp b/silkworm/capi/silkworm.cpp index 1cffbf57c7..a6ba5d2dde 100644 --- a/silkworm/capi/silkworm.cpp +++ b/silkworm/capi/silkworm.cpp @@ -51,6 +51,8 @@ #include #include #include +#include +#include #include "common.hpp" #include "instance.hpp" diff --git a/silkworm/capi/silkworm_test.cpp b/silkworm/capi/silkworm_test.cpp index 3e2e7744b8..da88dee52a 100644 --- a/silkworm/capi/silkworm_test.cpp +++ b/silkworm/capi/silkworm_test.cpp @@ -31,9 +31,10 @@ #include #include #include +#include #include #include -#include +#include #include "instance.hpp" From a1a08074ba8d70402ce126a511b4df52232dc110 Mon Sep 17 00:00:00 2001 From: Sixtysixter <20945591+Sixtysixter@users.noreply.github.com> Date: Thu, 12 Dec 2024 14:37:10 +0100 Subject: [PATCH 05/48] rpcdaemon: fix and improve perf in eth_getLogs (#2584) --- .github/workflows/rpc-integration-tests.yml | 2 +- .github/workflows/run_integration_tests.sh | 3 +-- silkworm/db/kv/txn_num.cpp | 12 +++++------- silkworm/db/kv/txn_num.hpp | 1 - silkworm/rpc/core/logs_walker.cpp | 14 +++++--------- 5 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/rpc-integration-tests.yml b/.github/workflows/rpc-integration-tests.yml index ea4e6e3e67..328d4e4590 100644 --- a/.github/workflows/rpc-integration-tests.yml +++ b/.github/workflows/rpc-integration-tests.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git -c advice.detachedHead=false clone --depth 1 --branch v1.24.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v1.25.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests pip3 install -r requirements.txt --break-system-packages diff --git a/.github/workflows/run_integration_tests.sh b/.github/workflows/run_integration_tests.sh index e42a7ba8e5..8d06af72be 100755 --- a/.github/workflows/run_integration_tests.sh +++ b/.github/workflows/run_integration_tests.sh @@ -43,8 +43,7 @@ debug_traceTransaction/test_92.tar,\ debug_traceTransaction/test_96.json,\ trace_replayBlockTransactions/test_29,\ engine_,\ -erigon_getLatestLogs,\ -eth_getLogs +erigon_getLatestLogs failed_test=$? diff --git a/silkworm/db/kv/txn_num.cpp b/silkworm/db/kv/txn_num.cpp index dee39d2830..0e1a07fcca 100644 --- a/silkworm/db/kv/txn_num.cpp +++ b/silkworm/db/kv/txn_num.cpp @@ -150,20 +150,18 @@ Task> PaginatedTransactionInfoIterator::next() { } const auto tnx_id = static_cast(next_id.value()); - if (min_txn_num_ == 0 || (ascending_ && next_id > max_txn_num_) || (!ascending_ && next_id < min_txn_num_)) { + bool block_changed{false}; + if (max_txn_num_ == 0 || (ascending_ && tnx_id > max_txn_num_) || (!ascending_ && tnx_id < min_txn_num_)) { const auto block_num_opt = co_await db::txn::block_num_from_tx_num(tx_, tnx_id, provider_); if (!block_num_opt) { SILK_DEBUG << "No block found for txn_id " << tnx_id; co_return std::nullopt; } block_num_ = block_num_opt.value(); - block_changed_ = true; - } - - if (block_changed_) { max_txn_num_ = co_await db::txn::max_tx_num(tx_, block_num_, provider_); min_txn_num_ = co_await db::txn::min_tx_num(tx_, block_num_, provider_); - block_changed_ = false; + + block_changed = true; } const TransactionNums txn_nums{ @@ -171,7 +169,7 @@ Task> PaginatedTransactionInfoIterator::next() { .block_num = block_num_, .txn_index = tnx_id - min_txn_num_ - 1, .final_txn = tnx_id == max_txn_num_, - .block_changed = block_changed_}; + .block_changed = block_changed}; SILK_DEBUG << "txn_id: " << txn_nums.txn_id << ", block_num: " << txn_nums.block_num diff --git a/silkworm/db/kv/txn_num.hpp b/silkworm/db/kv/txn_num.hpp index c59f8cccb9..bd872f4ad2 100644 --- a/silkworm/db/kv/txn_num.hpp +++ b/silkworm/db/kv/txn_num.hpp @@ -84,7 +84,6 @@ class PaginatedTransactionInfoIterator : public kv::api::PaginatedIterator make_txn_nums_stream(PaginatedTimestampStream stream, diff --git a/silkworm/rpc/core/logs_walker.cpp b/silkworm/rpc/core/logs_walker.cpp index bc161e1f7d..d9b1fc45a9 100644 --- a/silkworm/rpc/core/logs_walker.cpp +++ b/silkworm/rpc/core/logs_walker.cpp @@ -135,8 +135,7 @@ Task LogsWalker::get_logs(BlockNum start, paginated_stream = db::kv::api::make_range_stream(from_timestamp, to_timestamp); } - std::map receipts; - + Receipts receipts; uint64_t block_count{0}; uint64_t log_count{0}; Logs filtered_chunk_logs; @@ -154,12 +153,8 @@ Task LogsWalker::get_logs(BlockNum start, SILK_DEBUG << "Not found block no. " << tnx_nums->block_num; break; } - auto rr = co_await core::get_receipts(tx_, *block_with_hash, *chain_storage, workers_); - SILK_DEBUG << "Read #" << rr.size() << " receipts from block " << tnx_nums->block_num; - - std::for_each(rr.begin(), rr.end(), [&receipts](const auto& item) { - receipts[item.tx_hash] = std::move(item); - }); + receipts = co_await core::get_receipts(tx_, *block_with_hash, *chain_storage, workers_); + SILK_DEBUG << "Read #" << receipts.size() << " receipts from block " << tnx_nums->block_num; ++block_count; } @@ -171,7 +166,8 @@ Task LogsWalker::get_logs(BlockNum start, SILK_DEBUG << "Got transaction: block_num: " << tnx_nums->block_num << ", txn_index: " << tnx_nums->txn_index; - const auto& receipt = receipts.at(transaction.value().hash()); + SILKWORM_ASSERT(tnx_nums->txn_index < receipts.size()); + const auto& receipt = receipts.at(tnx_nums->txn_index); SILK_DEBUG << "#rawLogs: " << receipt.logs.size(); filtered_chunk_logs.clear(); From f7f7365ad581f1dee00285a44e36f7d080449bf6 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Thu, 12 Dec 2024 17:13:39 +0100 Subject: [PATCH 06/48] third_party: update erigon-snapshot to f64407a (#2586) --- .../snapshots/config/chains/amoy.hpp | 474 ++++++++---- .../snapshots/config/chains/holesky.hpp | 706 +++++++++++++----- .../snapshots/config/chains/mainnet.hpp | 698 +++++++++++------ .../snapshots/config/chains/sepolia.hpp | 668 +++++++++++++---- third_party/erigon-snapshot | 2 +- 5 files changed, 1791 insertions(+), 757 deletions(-) diff --git a/silkworm/db/datastore/snapshots/config/chains/amoy.hpp b/silkworm/db/datastore/snapshots/config/chains/amoy.hpp index 5423f75e4f..6dc8873624 100644 --- a/silkworm/db/datastore/snapshots/config/chains/amoy.hpp +++ b/silkworm/db/datastore/snapshots/config/chains/amoy.hpp @@ -16,119 +16,119 @@ inline constexpr std::array kAmoySnapshots{ Entry{"accessor/v1-accounts.0-16.vi"sv, "016c3a1927b2f12978fb285a5f3a6d0999165c6d"sv}, Entry{"accessor/v1-accounts.16-24.efi"sv, "3a3c48d86500eec06cc09843be187f1fb5943374"sv}, Entry{"accessor/v1-accounts.16-24.vi"sv, "e9d6af13d66750e5ecb9a7f64d5908270a5ac1d3"sv}, - Entry{"accessor/v1-accounts.24-26.efi"sv, "ea4bb8beb6c40642d8a82863b7f22b0d1224228b"sv}, - Entry{"accessor/v1-accounts.24-26.vi"sv, "a59869022f624cbb25ea604483001d54dbc11296"sv}, + Entry{"accessor/v1-accounts.24-28.efi"sv, "5c7dd9163b344b148fce8ddd2253d6f836209325"sv}, + Entry{"accessor/v1-accounts.24-28.vi"sv, "ec8b83f58402a165e8a6d3217b0ac979ebb782b8"sv}, Entry{"accessor/v1-code.0-16.efi"sv, "fc93ec0286e0c1838e79c20934ef2282bdd6f72e"sv}, Entry{"accessor/v1-code.0-16.vi"sv, "4e15af92f3ee418ca903e5922698e9e0517aa00e"sv}, Entry{"accessor/v1-code.16-24.efi"sv, "0cc7422b39db9a35a3b85de848383b4fff4d28dc"sv}, Entry{"accessor/v1-code.16-24.vi"sv, "b16f37fd73efebebf421c3c5bcb0ddf812fafe09"sv}, - Entry{"accessor/v1-code.24-26.efi"sv, "aa255b6d53ff9f66dd42a81a914b863549ab0d1a"sv}, - Entry{"accessor/v1-code.24-26.vi"sv, "65af1f39d09949f4abe6434a726afd60eabc4935"sv}, + Entry{"accessor/v1-code.24-28.efi"sv, "a7a8ec8026002c2d8ee14d30c529836302d7ce7e"sv}, + Entry{"accessor/v1-code.24-28.vi"sv, "1e3504fb6b8ffaf6dacd25098e8957255ef79c4c"sv}, Entry{"accessor/v1-logaddrs.0-16.efi"sv, "bd9320a826224c474ae28b613de8092cf828223e"sv}, Entry{"accessor/v1-logaddrs.16-24.efi"sv, "8c1d03fafd5b82878ca534d715690574c84b865c"sv}, - Entry{"accessor/v1-logaddrs.24-26.efi"sv, "dd9e1524baaf7e554eba907ef2a52a2bbfda7824"sv}, + Entry{"accessor/v1-logaddrs.24-28.efi"sv, "0327b108ceea590221b3f0e5e33bf13a121d0032"sv}, Entry{"accessor/v1-logtopics.0-16.efi"sv, "2200921d17bcec63df9b9f7ddf792ab8f99d8160"sv}, Entry{"accessor/v1-logtopics.16-24.efi"sv, "38693b8d6397b7685d41468ccd2ed32b7f06e88f"sv}, - Entry{"accessor/v1-logtopics.24-26.efi"sv, "c7658f9911c34f34390e3bb96d2ca353339febfa"sv}, + Entry{"accessor/v1-logtopics.24-28.efi"sv, "f58731420e6ecda4e9d2ebff87a8c874f34b6c41"sv}, Entry{"accessor/v1-receipt.0-16.efi"sv, "5547c0830a21af61c8eaca9eaeb27dc10ca3be12"sv}, Entry{"accessor/v1-receipt.0-16.vi"sv, "c86ce7ec8adca9df724d759a08a8066e4bcbeccd"sv}, Entry{"accessor/v1-receipt.16-24.efi"sv, "ded0a0d7b5e68ef1a0fca0b19ca12cc31f22c299"sv}, Entry{"accessor/v1-receipt.16-24.vi"sv, "114e95418035709581e9d3b14c3d77c18731e732"sv}, - Entry{"accessor/v1-receipt.24-26.efi"sv, "04884946d372cfc7a7732a7a04a0b57eb71f2563"sv}, - Entry{"accessor/v1-receipt.24-26.vi"sv, "2b65af11eea026007d0f4c492da8eecff49c62f5"sv}, + Entry{"accessor/v1-receipt.24-28.efi"sv, "fcd21e96a0abd9a4cf4cc27963b4510c262eefa8"sv}, + Entry{"accessor/v1-receipt.24-28.vi"sv, "5a4a10c3d1d6c1b0697890324480123c67ef5522"sv}, Entry{"accessor/v1-storage.0-16.efi"sv, "097cd25b3f2bc2e205342c7a86ad80a56c3881bf"sv}, Entry{"accessor/v1-storage.0-16.vi"sv, "1a6936c78f46d56ee855b6f1224350c5662a5812"sv}, Entry{"accessor/v1-storage.16-24.efi"sv, "044ec7f7ee6889e0b5398f8bad2a2c759e58c5f6"sv}, Entry{"accessor/v1-storage.16-24.vi"sv, "05679527f917b5c2cf4f55a518cd41a93c2bfae4"sv}, - Entry{"accessor/v1-storage.24-26.efi"sv, "eccae9e1396bb832809be36f946919100e9ebcc5"sv}, - Entry{"accessor/v1-storage.24-26.vi"sv, "cd1aef3fd21b11af4eb31c13beec09a927477d90"sv}, + Entry{"accessor/v1-storage.24-28.efi"sv, "a6e2e1a0b390d7d313f6111f18edf491c27e422d"sv}, + Entry{"accessor/v1-storage.24-28.vi"sv, "594b040b9432ba489f2257b11ed21aa812cc6c04"sv}, Entry{"accessor/v1-tracesfrom.0-16.efi"sv, "02460f8dc654c5fb90d848b832fb9e505f6b6e2e"sv}, Entry{"accessor/v1-tracesfrom.16-24.efi"sv, "0818fe3ee2c6be0532e50388ba5ae47f4a57a1f6"sv}, - Entry{"accessor/v1-tracesfrom.24-26.efi"sv, "b62ceb854b174e60f08d0d7ab3c75c3532d40fa3"sv}, + Entry{"accessor/v1-tracesfrom.24-28.efi"sv, "5d3a033a601441880ccd6210b189c3c77b723dff"sv}, Entry{"accessor/v1-tracesto.0-16.efi"sv, "3a26077a2899a0bcfa485242a40a41ba3227033f"sv}, Entry{"accessor/v1-tracesto.16-24.efi"sv, "e099882f035a9a8f9732e65b9257334448828342"sv}, - Entry{"accessor/v1-tracesto.24-26.efi"sv, "febc683cbadbe7a8312d2312f01a094b074f3389"sv}, + Entry{"accessor/v1-tracesto.24-28.efi"sv, "1cfe433489d640bc73dbcf4b80eb87087bbb9c39"sv}, Entry{"domain/v1-accounts.0-16.bt"sv, "cf250bde5400c87208a3b159a1a91d6374b34749"sv}, Entry{"domain/v1-accounts.0-16.kv"sv, "989ffe90f2a48604adc576ec88b117ed08587db8"sv}, Entry{"domain/v1-accounts.0-16.kvei"sv, "b34efb4bcc6638c81efb1b0aaee0838ee38d6091"sv}, Entry{"domain/v1-accounts.16-24.bt"sv, "96842d0acb7a86361b43fa93eee4422db786ae88"sv}, Entry{"domain/v1-accounts.16-24.kv"sv, "8bf25550857c8074fe45c8c1c34e13c3f6fa255a"sv}, Entry{"domain/v1-accounts.16-24.kvei"sv, "536f3e02f44478be7590471c07fbb454586a9906"sv}, - Entry{"domain/v1-accounts.24-26.bt"sv, "a36f292359e90aad9c4f2600dd24b6efdc1baedc"sv}, - Entry{"domain/v1-accounts.24-26.kv"sv, "2aeb0bfd49cce8183c4791d67cfb8115d357e363"sv}, - Entry{"domain/v1-accounts.24-26.kvei"sv, "311613247a7e418e2b7c6032a4125c3d7391e47a"sv}, + Entry{"domain/v1-accounts.24-28.bt"sv, "bb03a4d4e1a63fd3667429d5f255d92c676c404c"sv}, + Entry{"domain/v1-accounts.24-28.kv"sv, "744a66fd337b7b5daf42fd89de3fcd6606d0ee09"sv}, + Entry{"domain/v1-accounts.24-28.kvei"sv, "bb66efb225ba12995b7a5dd73b0b49f78a9f148d"sv}, Entry{"domain/v1-code.0-16.bt"sv, "e2818b8c3c25f074906632186d5faad5dbd81e46"sv}, Entry{"domain/v1-code.0-16.kv"sv, "3ecbf95513316abfc98672b54c5bf883162af83d"sv}, Entry{"domain/v1-code.0-16.kvei"sv, "bd0f34b8f745ab5e3bb6089bf0e1018cc9c9ba1f"sv}, Entry{"domain/v1-code.16-24.bt"sv, "4b1b2fd61a9d402612577ab6782edbcd59cbf1ed"sv}, Entry{"domain/v1-code.16-24.kv"sv, "f5f8ac328f6324d8a2932cf7683b4dd1690c86d7"sv}, Entry{"domain/v1-code.16-24.kvei"sv, "b35a8f58219d6952438c4fa10d314443088063b5"sv}, - Entry{"domain/v1-code.24-26.bt"sv, "d0475c1e53305aac5d0f6223055b89898f3da017"sv}, - Entry{"domain/v1-code.24-26.kv"sv, "13e068dc6152ebdc58fc50f46dbc23c2a78846e7"sv}, - Entry{"domain/v1-code.24-26.kvei"sv, "2c5247183d6eb0e2f1b021e51cad03a955c6f6b3"sv}, + Entry{"domain/v1-code.24-28.bt"sv, "83636a01bcb44f7c884258121dcd70241d15d847"sv}, + Entry{"domain/v1-code.24-28.kv"sv, "3e0b6d8c2af4637c3776bad95b87c20e4d7ee86f"sv}, + Entry{"domain/v1-code.24-28.kvei"sv, "5a8dd0fdb77b73ef8727bcdb375e18650da5a072"sv}, Entry{"domain/v1-commitment.0-16.bt"sv, "4de885f7cd1746ae70e824d1028efc450da8c9e0"sv}, Entry{"domain/v1-commitment.0-16.kv"sv, "e876790a399d919c038ff4da3d1984d2fc6a86a0"sv}, Entry{"domain/v1-commitment.0-16.kvei"sv, "faf248564862b7728a3118e1d461fa35dab8c586"sv}, Entry{"domain/v1-commitment.16-24.bt"sv, "8cff91d5562a224c9c89d2e2439443abc29129d0"sv}, Entry{"domain/v1-commitment.16-24.kv"sv, "5af246d13b057412502f2b0ac096fd05638a3659"sv}, Entry{"domain/v1-commitment.16-24.kvei"sv, "525458d95836b0f16388e755627f7955752d51f0"sv}, - Entry{"domain/v1-commitment.24-26.bt"sv, "ae53af00e38889d091e223e58e411c496aa944c3"sv}, - Entry{"domain/v1-commitment.24-26.kv"sv, "30b8aefd1278e92ab3d64e4107f40db8d994422c"sv}, - Entry{"domain/v1-commitment.24-26.kvei"sv, "36fca4c5d5f0d2acf012ed759d7e0227c07d7e2d"sv}, + Entry{"domain/v1-commitment.24-28.bt"sv, "9b8f2c5a61acef8f9c8d7499cc58dae54ead4fa9"sv}, + Entry{"domain/v1-commitment.24-28.kv"sv, "d02b2af7214a4bb6bfb03a42eb0ee5135999f4d9"sv}, + Entry{"domain/v1-commitment.24-28.kvei"sv, "41c234b94ac583005efb8568371d58c6b2ad4a7e"sv}, Entry{"domain/v1-receipt.0-16.bt"sv, "89bf2c789633bcebcd506f2126dccdaab0f41762"sv}, Entry{"domain/v1-receipt.0-16.kv"sv, "742b05e641b70f10cae023a982f0f7c54de43c3c"sv}, Entry{"domain/v1-receipt.0-16.kvei"sv, "704e6733c70986fa6962687f2f18e1de4779e7fd"sv}, Entry{"domain/v1-receipt.16-24.bt"sv, "7bb4a8eafdcbdfb8fe2a1ddf5cbc3073b17e7ec6"sv}, Entry{"domain/v1-receipt.16-24.kv"sv, "0df470324320ca833422ea1f2b9a7ca96834d292"sv}, Entry{"domain/v1-receipt.16-24.kvei"sv, "1fc38252cda5f553a7c8f914ce7f664cc7dd6a6d"sv}, - Entry{"domain/v1-receipt.24-26.bt"sv, "da855507d394e6e005143f0eb4c3dcf258e35abb"sv}, - Entry{"domain/v1-receipt.24-26.kv"sv, "23d53067a24a69c8eaf8cee3ef9b332ad3816d5a"sv}, - Entry{"domain/v1-receipt.24-26.kvei"sv, "dd70acc13a8adf020ea770bf4673e214fe36f046"sv}, + Entry{"domain/v1-receipt.24-28.bt"sv, "9ab3bce121d7d8d838a864d7fd812e11f1544e84"sv}, + Entry{"domain/v1-receipt.24-28.kv"sv, "12949c9b73525e45ea14795287a1cf96785ad3d4"sv}, + Entry{"domain/v1-receipt.24-28.kvei"sv, "097b56e50f1a9aa1af185b0b3cfc0a03bad0e6fb"sv}, Entry{"domain/v1-storage.0-16.bt"sv, "b7bf619d18ef1dac6de64faaf4d5871c44a7a766"sv}, Entry{"domain/v1-storage.0-16.kv"sv, "149d7da54efae7f1bc4e82880d9d344ddc7c772b"sv}, Entry{"domain/v1-storage.0-16.kvei"sv, "4b60d5e12299f89f8a8b4afda31867341c28780a"sv}, Entry{"domain/v1-storage.16-24.bt"sv, "e6812d6519e4f5307e589289149f5abbfc17f8d4"sv}, Entry{"domain/v1-storage.16-24.kv"sv, "810341b15a20ec6224ebbf941eb0dc353df344a0"sv}, Entry{"domain/v1-storage.16-24.kvei"sv, "8e79a1c8a4b64b403dd3094adcc8b94036cb828c"sv}, - Entry{"domain/v1-storage.24-26.bt"sv, "8c681044d92273379999c6461ae6c868cd8767c8"sv}, - Entry{"domain/v1-storage.24-26.kv"sv, "4a7ab746328ffd8e213e4542a2783048afccd73d"sv}, - Entry{"domain/v1-storage.24-26.kvei"sv, "5413ea724a1fdca3576fe5303170883d9c387d29"sv}, + Entry{"domain/v1-storage.24-28.bt"sv, "5c163eeff9c3564e774d41c02b3cd511a3e5ec61"sv}, + Entry{"domain/v1-storage.24-28.kv"sv, "1e194d39b61ed549fd717edb4233666ae4596d45"sv}, + Entry{"domain/v1-storage.24-28.kvei"sv, "9ae71acc639c32d1e20878c2f851f6b304aa4b80"sv}, Entry{"history/v1-accounts.0-16.v"sv, "950bfacbe354c818fc796b458e22203ba92ce328"sv}, Entry{"history/v1-accounts.16-24.v"sv, "753deb296542bc4129962a4201768c58ed65c991"sv}, - Entry{"history/v1-accounts.24-26.v"sv, "fd7c35d02a38522ae8e390157b62dee0512e28ee"sv}, + Entry{"history/v1-accounts.24-28.v"sv, "d90e89411a6fcc6c9ee9ddc2a977f9d5c788efa8"sv}, Entry{"history/v1-code.0-16.v"sv, "4eff27aa97e840672c0bce230b2a54e9000eea10"sv}, Entry{"history/v1-code.16-24.v"sv, "96057993315b58dd96c14075b7acac53bb19990c"sv}, - Entry{"history/v1-code.24-26.v"sv, "56f9d2d78b5727a2ba87256401f16e4bb2e94dd5"sv}, + Entry{"history/v1-code.24-28.v"sv, "61f51e7d44d0defe5369734fe15d681dadb8a83b"sv}, Entry{"history/v1-receipt.0-16.v"sv, "6771379dad89abe82f40e3aa3e5930c3b0a35f61"sv}, Entry{"history/v1-receipt.16-24.v"sv, "c312e44d229fbafec407eeb63c0306390185d2a4"sv}, - Entry{"history/v1-receipt.24-26.v"sv, "5a8398b0b9ddc1c2a52ba1a2ed7fa43cd5de6630"sv}, + Entry{"history/v1-receipt.24-28.v"sv, "079350564f93231ee1e03a8186d8c02a0a992e02"sv}, Entry{"history/v1-storage.0-16.v"sv, "fd16fb68241a6a049f711eec2500a05ff94f9113"sv}, Entry{"history/v1-storage.16-24.v"sv, "78334d5493a88288960c48076e826ade1fd9f206"sv}, - Entry{"history/v1-storage.24-26.v"sv, "57304634a9d8334bceebed126a13cfcdd9d1e167"sv}, + Entry{"history/v1-storage.24-28.v"sv, "63bacde0ff1b8d098dfc7d94099fdfc27dedb108"sv}, Entry{"idx/v1-accounts.0-16.ef"sv, "b3e89c406772db676a51d81dcfc0fab7c4584bc4"sv}, Entry{"idx/v1-accounts.16-24.ef"sv, "820d55cc81f38749ce06ff82d4eb89db8d48bbb2"sv}, - Entry{"idx/v1-accounts.24-26.ef"sv, "2d4f01ef1af04681c4c04a5bdcb09caf02a1e607"sv}, + Entry{"idx/v1-accounts.24-28.ef"sv, "fee1f9e3e8690f03a421fb1711f38eda6c33cc4b"sv}, Entry{"idx/v1-code.0-16.ef"sv, "426f3450dd718bd709fb32a75b44bfe9426c163c"sv}, Entry{"idx/v1-code.16-24.ef"sv, "baed48b4d48d9aa9689dbba6db79be08a7a1344a"sv}, - Entry{"idx/v1-code.24-26.ef"sv, "3e444acfd1565265806114571413cd5ccdc7d16f"sv}, + Entry{"idx/v1-code.24-28.ef"sv, "c076d98734bef89b81ebf3a3d40cd211b6586dce"sv}, Entry{"idx/v1-logaddrs.0-16.ef"sv, "75b2efd60ce11438473b34ca458c80b2da5a76f0"sv}, Entry{"idx/v1-logaddrs.16-24.ef"sv, "3f947a789bfbfa5c18549f3daf69c927417bf6e1"sv}, - Entry{"idx/v1-logaddrs.24-26.ef"sv, "6da6d7bf1b42b5933297cf89d0339c2138a8e43b"sv}, + Entry{"idx/v1-logaddrs.24-28.ef"sv, "e4e7b2056b97555f3414262d1e22825ae14281d8"sv}, Entry{"idx/v1-logtopics.0-16.ef"sv, "e8e47425f92b3425dd73914e9356fd8cafeb84ad"sv}, Entry{"idx/v1-logtopics.16-24.ef"sv, "81b5479d41a4cbfd939b669eaa3aa45204c26a08"sv}, - Entry{"idx/v1-logtopics.24-26.ef"sv, "6d9ec29a2e77e2f10cf835845ecfef9a385c6f02"sv}, + Entry{"idx/v1-logtopics.24-28.ef"sv, "773dbf5763ff999cdea929ca55242409ae911040"sv}, Entry{"idx/v1-receipt.0-16.ef"sv, "44d307870420a7c8635795e8ada059ec982c784f"sv}, Entry{"idx/v1-receipt.16-24.ef"sv, "50c5b7ac9a3d4c572860735eb3dd21703d7d4f5b"sv}, - Entry{"idx/v1-receipt.24-26.ef"sv, "bb7491287c5bfc869f6f5f0da9a57836c894ec85"sv}, + Entry{"idx/v1-receipt.24-28.ef"sv, "9cb120af389bd2055fe3d35fadef9d8b7fcb3d14"sv}, Entry{"idx/v1-storage.0-16.ef"sv, "b86190eccdd687667d8f8344826cbf26fe571c53"sv}, Entry{"idx/v1-storage.16-24.ef"sv, "a80e87896584b63de4621d9c5bb7ca37f5cfe6b3"sv}, - Entry{"idx/v1-storage.24-26.ef"sv, "5c8c45a259cea8a57e938a3efceb485d22eda5e7"sv}, + Entry{"idx/v1-storage.24-28.ef"sv, "385520e2d7e0488fcbf8cfda65fa527f7ccd98f9"sv}, Entry{"idx/v1-tracesfrom.0-16.ef"sv, "662cce614ec9e96914c86674774066635c927333"sv}, Entry{"idx/v1-tracesfrom.16-24.ef"sv, "d3a0c3454199f65e300ab2c7f5faf28790c2f9cf"sv}, - Entry{"idx/v1-tracesfrom.24-26.ef"sv, "33b392d7f8563b149f8032a8131cc87b99172446"sv}, + Entry{"idx/v1-tracesfrom.24-28.ef"sv, "b3d635a54a3e4320b8b2027cd09178e2a843662c"sv}, Entry{"idx/v1-tracesto.0-16.ef"sv, "49de6940aa53b384b6d50c3c67f575d1a63f5192"sv}, Entry{"idx/v1-tracesto.16-24.ef"sv, "21abbb4bd6bb2ff9fa2a66a7debf7229e5c3c937"sv}, - Entry{"idx/v1-tracesto.24-26.ef"sv, "a4de11e9d8378234c539d84a2a82ed4d30c74508"sv}, + Entry{"idx/v1-tracesto.24-28.ef"sv, "484bd9d21129a0344c8c4d9c654e44fc0f22348d"sv}, Entry{"salt-blocks.txt"sv, "ad8707b6e85f95d87a60558ab371b3543d3528e9"sv}, Entry{"salt-state.txt"sv, "0113ec56c7c0d72783dbb5738becffa9c4c43d69"sv}, Entry{"v1-000000-000100-bodies.idx"sv, "f5c7a1d285239d61845b2f79e587aa204d2b59fb"sv}, @@ -1495,127 +1495,281 @@ inline constexpr std::array kAmoySnapshots{ Entry{"v1-012300-012400-transactions-to-block.idx"sv, "20b54a4e00b24e86619e7f7e53585812908f61ba"sv}, Entry{"v1-012300-012400-transactions.idx"sv, "15edef49603013083a46b3c3f19487f380201512"sv}, Entry{"v1-012300-012400-transactions.seg"sv, "465b6df1ed9367774280cbe59575d68254fafa28"sv}, - Entry{"v1-012400-012410-bodies.idx"sv, "97543eedbf30eedc41ef2bb01b33dc418b580a4f"sv}, - Entry{"v1-012400-012410-bodies.seg"sv, "b60e5895417f2d064918197143797e90e50f13c9"sv}, - Entry{"v1-012400-012410-borevents.idx"sv, "cf963685b0c068b0896e5348cb7d1a0e12b9b881"sv}, - Entry{"v1-012400-012410-borevents.seg"sv, "765d543f3f5963bc856f57170134d0628a60bb59"sv}, - Entry{"v1-012400-012410-borspans.idx"sv, "94a3ef82716a95b712986afaa299edb4580449e6"sv}, - Entry{"v1-012400-012410-borspans.seg"sv, "4ac58aef94321a5af54d9b7e4962fe538f51e5ca"sv}, - Entry{"v1-012400-012410-headers.idx"sv, "214900f2d4a56247813ae3b0e1926267547fef2b"sv}, - Entry{"v1-012400-012410-headers.seg"sv, "e8f6ecaed6749284f08efb0f7497f542968cff87"sv}, - Entry{"v1-012400-012410-transactions-to-block.idx"sv, "4168246a7612fc8f7fc8cdd6259a72bf6cea6ce0"sv}, - Entry{"v1-012400-012410-transactions.idx"sv, "1255f6d2bae36683ef083e68e60e426feb8caa70"sv}, - Entry{"v1-012400-012410-transactions.seg"sv, "00c3d942b9c7d18e33ffaea72315d0c12d212021"sv}, - Entry{"v1-012410-012420-bodies.idx"sv, "38a383a195f2ad496e2a80220621b97a0f8bcdcd"sv}, - Entry{"v1-012410-012420-bodies.seg"sv, "503c098d1a546b5b9be662b9cf7146af1da18f15"sv}, - Entry{"v1-012410-012420-borevents.idx"sv, "9f92b482bf63f381a14ac0576c6721da982b2845"sv}, - Entry{"v1-012410-012420-borevents.seg"sv, "b36ec369cd6ba225c10244c6d2e840c0e0b598e7"sv}, - Entry{"v1-012410-012420-borspans.idx"sv, "40f015d48c4cd60f6ffb8ff986f32f1c3783766b"sv}, - Entry{"v1-012410-012420-borspans.seg"sv, "99605c3d2ce503b546891233658d3ede215402e0"sv}, - Entry{"v1-012410-012420-headers.idx"sv, "47716e81206faace480c1d6413cf7bf16471815a"sv}, - Entry{"v1-012410-012420-headers.seg"sv, "a71333e80b2aee5da0b8d394f34d174cbd1c1f57"sv}, - Entry{"v1-012410-012420-transactions-to-block.idx"sv, "0ba99e76a60f8808486aea257e0b73c6c1bcb65c"sv}, - Entry{"v1-012410-012420-transactions.idx"sv, "b8a62b2f4958f03e5ace3132b56b0102477cd5e7"sv}, - Entry{"v1-012410-012420-transactions.seg"sv, "f517ea113663ea9aff01c02cf73a585863324d16"sv}, - Entry{"v1-012420-012421-bodies.idx"sv, "2ad829b6877057a304382bb48ea73e905eacba95"sv}, - Entry{"v1-012420-012421-bodies.seg"sv, "6d7225636dc115c7f7854cc254daf7c50d87005d"sv}, - Entry{"v1-012420-012421-borevents.idx"sv, "d16eda7f2e30d8159569a4ad330e0bd630b7138c"sv}, - Entry{"v1-012420-012421-borevents.seg"sv, "523deec75ba627f3969b6b2953dcf7c7153286ce"sv}, - Entry{"v1-012420-012421-borspans.idx"sv, "6e49ea53bfe572ed8c3a01206b1da3f49069ebaf"sv}, - Entry{"v1-012420-012421-borspans.seg"sv, "3e98ae244f38238a990a99e5dc8cd2a6fa309b62"sv}, - Entry{"v1-012420-012421-headers.idx"sv, "edd96a0c3a89fe8dfd31660e0fb7bdd3a6e1aca8"sv}, - Entry{"v1-012420-012421-headers.seg"sv, "da1b035bca3f90f0b60b376eeb2d49dd51b090b1"sv}, - Entry{"v1-012420-012421-transactions-to-block.idx"sv, "f0f47d581535ddcd8053a10aec788eaeb8ca7eff"sv}, - Entry{"v1-012420-012421-transactions.idx"sv, "dc23696b245c716e82df3b2454a63b91519894db"sv}, - Entry{"v1-012420-012421-transactions.seg"sv, "1c2d0312af5900ca57a66dfb12909c3abf5b8cb6"sv}, - Entry{"v1-012421-012422-bodies.idx"sv, "085707914cc8a8f9db647d7d90087411ef4fddba"sv}, - Entry{"v1-012421-012422-bodies.seg"sv, "2e2d880854e2bad4774f3e6ca623d44b8d49d3ee"sv}, - Entry{"v1-012421-012422-borevents.idx"sv, "711b41b6d20010d8a420911c9280b236a6f5b996"sv}, - Entry{"v1-012421-012422-borevents.seg"sv, "a44a14b40177d49bb5535a5cca67e4c240a467e9"sv}, - Entry{"v1-012421-012422-borspans.idx"sv, "7a240bfa40a9a21216183ad539cb6affc05064f9"sv}, - Entry{"v1-012421-012422-borspans.seg"sv, "2925c33f2a81b1904766fba717d13c75b0dd406a"sv}, - Entry{"v1-012421-012422-headers.idx"sv, "564b3288c1e14bb4cd7e155bc158e7af03255205"sv}, - Entry{"v1-012421-012422-headers.seg"sv, "e5c98e3e1d11972ac63c721a12efeac4b7d7edb6"sv}, - Entry{"v1-012421-012422-transactions-to-block.idx"sv, "8fa33d072c0970a241b6a770b739693a0d9f2681"sv}, - Entry{"v1-012421-012422-transactions.idx"sv, "654bd11a74776c809196db045b37126f3fed2999"sv}, - Entry{"v1-012421-012422-transactions.seg"sv, "946029519fd218942ba56bfbee468acb790cd38f"sv}, - Entry{"v1-012422-012423-bodies.idx"sv, "d584ec0a65093069d2ce06295da329fb278c436b"sv}, - Entry{"v1-012422-012423-bodies.seg"sv, "a3002c755665087f6622c74fddaaea3daa9fbd63"sv}, - Entry{"v1-012422-012423-borevents.idx"sv, "1fd15cf8ecdd12a76300896d28bd3c34d0cb82c6"sv}, - Entry{"v1-012422-012423-borevents.seg"sv, "256b5fb3b23567daa6b7ae442f2b4003fd603ac2"sv}, - Entry{"v1-012422-012423-borspans.idx"sv, "931f95fcc79e59cbbc0bb01247c4136b009313be"sv}, - Entry{"v1-012422-012423-borspans.seg"sv, "14966d3c40c58ef9f4cb1ad1454d6d86e50174e4"sv}, - Entry{"v1-012422-012423-headers.idx"sv, "b14abe53b6385b19d7b17b7ed2660c36aadce2c2"sv}, - Entry{"v1-012422-012423-headers.seg"sv, "31e40d7f58674ab2c3741de5da9ac68403f5f4e3"sv}, - Entry{"v1-012422-012423-transactions-to-block.idx"sv, "16c2823daac377e1c730a370be651794005b253d"sv}, - Entry{"v1-012422-012423-transactions.idx"sv, "114a2c239ecb73741e72f44dc17de139f1d3c6bf"sv}, - Entry{"v1-012422-012423-transactions.seg"sv, "7ae97249c048ff4f75213ed5a9079235ba7450b4"sv}, - Entry{"v1-012423-012424-bodies.idx"sv, "b174d84c051961760e54b3e1e5257a0db3f75af0"sv}, - Entry{"v1-012423-012424-bodies.seg"sv, "645adb46480e07542ffb30d9056d5426a9202472"sv}, - Entry{"v1-012423-012424-borevents.idx"sv, "50567e943de4923a9e3058875cc5daf205d4fa69"sv}, - Entry{"v1-012423-012424-borevents.seg"sv, "0e8e96c066255ebaf483890cf4902af049d60dd3"sv}, - Entry{"v1-012423-012424-borspans.idx"sv, "ee838880256cc37902f8b729d523d45975ab974d"sv}, - Entry{"v1-012423-012424-borspans.seg"sv, "5f50aaab78c33043133a1b6583c5c370374bd288"sv}, - Entry{"v1-012423-012424-headers.idx"sv, "9894a614828d312ff78420287a24c07cd6cee6ea"sv}, - Entry{"v1-012423-012424-headers.seg"sv, "ac2b2640a5b8fea1a4ab51293cadfa52ce5a3b37"sv}, - Entry{"v1-012423-012424-transactions-to-block.idx"sv, "5f200149f1ac811c0cff4c0253a6d30866b5782f"sv}, - Entry{"v1-012423-012424-transactions.idx"sv, "feec7afed2e03aaffa83d2644f86a528eca2b2b4"sv}, - Entry{"v1-012423-012424-transactions.seg"sv, "1a4fb66bc1cf8d8f582c8a26846fdce6d79cf50a"sv}, - Entry{"v1-012424-012425-bodies.idx"sv, "2f1b390c4d4a77e573e6f7c100c3413fb11aa606"sv}, - Entry{"v1-012424-012425-bodies.seg"sv, "fc8be54382e0a63278aa41abb49b233dfd3376fd"sv}, - Entry{"v1-012424-012425-borevents.idx"sv, "68e21bb7f5ec698110c0b7378624c49f132fb1ef"sv}, - Entry{"v1-012424-012425-borevents.seg"sv, "302cb424df7dc8c02b562403f308ce337eccb1f2"sv}, - Entry{"v1-012424-012425-borspans.idx"sv, "a71e9c44339981dba76cde0c36c1a098dd3887d6"sv}, - Entry{"v1-012424-012425-borspans.seg"sv, "0f977f33a50e2ffa0565ee46f5c4df4401c7fa35"sv}, - Entry{"v1-012424-012425-headers.idx"sv, "943f3b6cfa6237ff77569f53585476f1a17ec069"sv}, - Entry{"v1-012424-012425-headers.seg"sv, "4bd3cc272beae6b8af777264d9d36a1d71ad5e7e"sv}, - Entry{"v1-012424-012425-transactions-to-block.idx"sv, "b5d6ef7cc3167cc095e89d56fd250c46f88bb4e2"sv}, - Entry{"v1-012424-012425-transactions.idx"sv, "25095ffe9fdcf5083efd7353502f7751c27afd46"sv}, - Entry{"v1-012424-012425-transactions.seg"sv, "5d041a3adceb58a38b275395afd8bb35a9849a35"sv}, - Entry{"v1-012425-012426-bodies.idx"sv, "e6f506519ff5eff4057ca416be62239254d36651"sv}, - Entry{"v1-012425-012426-bodies.seg"sv, "736a82268009559d48d38b79718f3b90421f84ca"sv}, - Entry{"v1-012425-012426-borevents.idx"sv, "3811c63a8b67a0831ad4cb13d22b4bf23843b860"sv}, - Entry{"v1-012425-012426-borevents.seg"sv, "b4a0e6dbc6af9b479e91da3a7f898edf177f5c52"sv}, - Entry{"v1-012425-012426-borspans.idx"sv, "022572732e795fbbdbee138531cb94e6daad3443"sv}, - Entry{"v1-012425-012426-borspans.seg"sv, "2aab7ce6174445d6ba38eb912925669df0e40277"sv}, - Entry{"v1-012425-012426-headers.idx"sv, "82d507bb7a67d545a9b62c70ee5e5ced08ce3b1c"sv}, - Entry{"v1-012425-012426-headers.seg"sv, "cdf3703251aa18e7e98c2e29ddc1f36ac6d67898"sv}, - Entry{"v1-012425-012426-transactions-to-block.idx"sv, "4ba4e3d5293218055f09404fda302f09e5017804"sv}, - Entry{"v1-012425-012426-transactions.idx"sv, "046c4fa2351b7a657f022f83b074d645c2ef3e14"sv}, - Entry{"v1-012425-012426-transactions.seg"sv, "7062455a85372ccf04d2159690f4831e2e0123cd"sv}, - Entry{"v1-012426-012427-bodies.idx"sv, "da29a5b924f24909f478678c7df94d82004bfb75"sv}, - Entry{"v1-012426-012427-bodies.seg"sv, "de6ffadd20d04f5e33bd6500ff6a4dc2b8c63683"sv}, - Entry{"v1-012426-012427-borevents.idx"sv, "3fef8d0c9d34dcc38e13e50a49cdcaf1906e93bf"sv}, - Entry{"v1-012426-012427-borevents.seg"sv, "d55faad19579e1f31de954e0477080a8ac2e225b"sv}, - Entry{"v1-012426-012427-borspans.idx"sv, "1efd7fcb8708299cd22300b3451f1a06503bcce1"sv}, - Entry{"v1-012426-012427-borspans.seg"sv, "941a0626d3931188174992271501703646995a7b"sv}, - Entry{"v1-012426-012427-headers.idx"sv, "8115bb1d4684e5b0b5d96d8f0c24df5f7cad802d"sv}, - Entry{"v1-012426-012427-headers.seg"sv, "e47ba404128cd8e8c08a0885564e68bb5ec69063"sv}, - Entry{"v1-012426-012427-transactions-to-block.idx"sv, "7eca32f0604b135490ee89ac84040fee8d19f901"sv}, - Entry{"v1-012426-012427-transactions.idx"sv, "034fe4916dcb23671f559d3219d47433d9002d9d"sv}, - Entry{"v1-012426-012427-transactions.seg"sv, "f33c763692f0583968bc23f9819ed251f0f17c0f"sv}, - Entry{"v1-012427-012428-bodies.idx"sv, "e36094a2f26a06666053dfcc6d87883a9782c6a1"sv}, - Entry{"v1-012427-012428-bodies.seg"sv, "8c09e21664483bc185fc1bcab35b574f631ba24d"sv}, - Entry{"v1-012427-012428-borevents.idx"sv, "3cef4119770e2c6976a322befb955c31ae8c5851"sv}, - Entry{"v1-012427-012428-borevents.seg"sv, "2aa8280e81a654f7741300a375487dda887c628b"sv}, - Entry{"v1-012427-012428-borspans.idx"sv, "0bf080ad091b8d75edd4db83fdea25b749bcbe2c"sv}, - Entry{"v1-012427-012428-borspans.seg"sv, "1985e2a45fdd584293d8138d47403c77c19bf940"sv}, - Entry{"v1-012427-012428-headers.idx"sv, "3b4809b003af07b720f1430969cf922e4120c83e"sv}, - Entry{"v1-012427-012428-headers.seg"sv, "7618e19f532782d40450a202a7649488a91249fb"sv}, - Entry{"v1-012427-012428-transactions-to-block.idx"sv, "ef8ce8b3efd3edb9bc2decc46e4d150c9ffbe76b"sv}, - Entry{"v1-012427-012428-transactions.idx"sv, "a41a73b34ddfce5437f64c9c585c4a58f4968b3a"sv}, - Entry{"v1-012427-012428-transactions.seg"sv, "cb22d05aab249cf3b31441c52cf89112171d4009"sv}, - Entry{"v1-012428-012429-bodies.idx"sv, "092907eee92924dbf871af54f62e59ab6250add5"sv}, - Entry{"v1-012428-012429-bodies.seg"sv, "d2553b701a58378ca54c72f7f91300b42d416e42"sv}, - Entry{"v1-012428-012429-borevents.idx"sv, "0695df4f790fb3e8599c1c3abe374ffde78cac1f"sv}, - Entry{"v1-012428-012429-borevents.seg"sv, "d13521d3bd8874983594a4034ad77f239970a7be"sv}, - Entry{"v1-012428-012429-borspans.idx"sv, "54b49626f692972da0a2cdb786b3f377a853a176"sv}, - Entry{"v1-012428-012429-borspans.seg"sv, "150e4a962bc915987926b894654573465fa0defd"sv}, - Entry{"v1-012428-012429-headers.idx"sv, "2169041c3aacd3f216ca8ee40504cc92e2658f00"sv}, - Entry{"v1-012428-012429-headers.seg"sv, "9d124faa91420347608aa7a629a0315bb33c2297"sv}, - Entry{"v1-012428-012429-transactions-to-block.idx"sv, "a5d3d5520a9f03603c1c400e4732a7c93ea113b0"sv}, - Entry{"v1-012428-012429-transactions.idx"sv, "29f30891c835835d02d0ecc53467c2f5118bae2e"sv}, - Entry{"v1-012428-012429-transactions.seg"sv, "29a209a866dbe35b164f7fdf18e2587c05a300a5"sv}, + Entry{"v1-012400-012410-bodies.idx"sv, "0defc4dd2ac0d4204ac8ee41292784359e0056c7"sv}, + Entry{"v1-012400-012410-borevents.idx"sv, "cd0072498a44531ff536583e52765a13def860fe"sv}, + Entry{"v1-012400-012410-borspans.idx"sv, "d598fbc3a3b74d7466e68f8939878dc712baad64"sv}, + Entry{"v1-012400-012410-headers.idx"sv, "ebcba439abb81fa2b099e62a6d42b1bb36b0b3aa"sv}, + Entry{"v1-012400-012410-transactions-to-block.idx"sv, "4a506f4f60730e20999e6e5cc6bac8676b0c79bb"sv}, + Entry{"v1-012400-012410-transactions.idx"sv, "d7bd783ebcd2835740162183c64fde1032c91ad2"sv}, + Entry{"v1-012400-012500-bodies.idx"sv, "39d15c6f2c1095b5d1424e4b5316de6c779123f8"sv}, + Entry{"v1-012400-012500-bodies.seg"sv, "38e6dc8191538be302b023adc5d0d4287b355544"sv}, + Entry{"v1-012400-012500-borevents.idx"sv, "0d91ee4320c30f48783adb8f48fc32f4c3b5017d"sv}, + Entry{"v1-012400-012500-borevents.seg"sv, "16caf2515d75638a8df2fefa499165b8cd57f281"sv}, + Entry{"v1-012400-012500-borspans.idx"sv, "068e9fe026f1ccd8cdb446c39d83e8a024aeb24f"sv}, + Entry{"v1-012400-012500-borspans.seg"sv, "e86dff614bfe0bd62cb7bd15337f3a341dfa437d"sv}, + Entry{"v1-012400-012500-headers.idx"sv, "7ee2c0693411fd61d3a86a0e9cc2cdb0d7e70d0e"sv}, + Entry{"v1-012400-012500-headers.seg"sv, "39c0eea16579aa0f612b8f7dfca5206e945c5315"sv}, + Entry{"v1-012400-012500-transactions-to-block.idx"sv, "ed27e50bfe0d7486308f5967f47029388aa1a5eb"sv}, + Entry{"v1-012400-012500-transactions.idx"sv, "9648a864b33c47f92c43c0b9de88478dcd727db8"sv}, + Entry{"v1-012400-012500-transactions.seg"sv, "6d03370b56f76ad8fc77b2a4918a214b7afeebf7"sv}, + Entry{"v1-012410-012420-bodies.idx"sv, "5641adaa4d738ae9b7d6f73fb3e77c2244e5f172"sv}, + Entry{"v1-012410-012420-borevents.idx"sv, "cfd5e922fce439bacf683860374f0fe54e8e5cc9"sv}, + Entry{"v1-012410-012420-borspans.idx"sv, "0e36c4908f1f4976f0853c8d5b6ccfaf538c969a"sv}, + Entry{"v1-012410-012420-headers.idx"sv, "43044fa708d8e72c888b51d59862a7b0ed74ae22"sv}, + Entry{"v1-012410-012420-transactions-to-block.idx"sv, "7f5c30e343481b60012f46876d12f7bb7801fdbb"sv}, + Entry{"v1-012410-012420-transactions.idx"sv, "e940aae5efaac27a6c09b9074957f259b79a74b7"sv}, + Entry{"v1-012420-012421-bodies.idx"sv, "0348209352514680a14e52544ab88592fca61a0d"sv}, + Entry{"v1-012420-012421-borevents.idx"sv, "012daf147baecc065750973786e1ea92ec252d38"sv}, + Entry{"v1-012420-012421-borspans.idx"sv, "d3a997f27da56698d7280b5bb5f9cfce26054558"sv}, + Entry{"v1-012420-012421-headers.idx"sv, "d8d9089a8b9bec1a54bf8596068f89c5fe14cf7c"sv}, + Entry{"v1-012420-012421-transactions-to-block.idx"sv, "91e61d870f238c22160602e7443001e0dba59b44"sv}, + Entry{"v1-012420-012421-transactions.idx"sv, "68745e0796510cbadae02aefe899bc5bd121b4b0"sv}, + Entry{"v1-012421-012422-bodies.idx"sv, "e46782a9812ddbeb90b8d1e5fb0a6b3efa9c8248"sv}, + Entry{"v1-012421-012422-borevents.idx"sv, "272904576c77418cb0bdd31951a713c8814d99ea"sv}, + Entry{"v1-012421-012422-borspans.idx"sv, "59cd30d21944cb2e46d39e644c74685b0628a075"sv}, + Entry{"v1-012421-012422-headers.idx"sv, "0b3de629085832f136fb355ea6fa868297a2dae9"sv}, + Entry{"v1-012421-012422-transactions-to-block.idx"sv, "0eb2e9c1d97d9a9eff1f75fd4a727a0ff0e04be9"sv}, + Entry{"v1-012421-012422-transactions.idx"sv, "e4a43e8519fc6bc8cf8c53f1c2b7d5d86134f91c"sv}, + Entry{"v1-012422-012423-bodies.idx"sv, "0d38dff733e95270b21590e838f6774d7f4cd9d0"sv}, + Entry{"v1-012422-012423-borevents.idx"sv, "973de86380221bc5f249f7ccdeaf99c8051eaf5f"sv}, + Entry{"v1-012422-012423-borspans.idx"sv, "324bbdd430f7fa471ed3d5acff6a656fc792e54a"sv}, + Entry{"v1-012422-012423-headers.idx"sv, "c2a5a2148be8ec70d7f5a16edae52721c31cee9c"sv}, + Entry{"v1-012422-012423-transactions-to-block.idx"sv, "d5e7719b09786a846403f581f5924190a835c9a0"sv}, + Entry{"v1-012422-012423-transactions.idx"sv, "4ea512d78aac44e309b41b55142aff2a5e392d34"sv}, + Entry{"v1-012423-012424-bodies.idx"sv, "c915e6b3d7eca2ff4de983bac3445d79f17d6687"sv}, + Entry{"v1-012423-012424-borevents.idx"sv, "84977426ae1a3c37dd0a6e90149d1682a21c1867"sv}, + Entry{"v1-012423-012424-borspans.idx"sv, "895603d85b5244a33162c109d2db412a06578c1c"sv}, + Entry{"v1-012423-012424-headers.idx"sv, "3f154a8c32269c542cb0c7368633a345a2622a3e"sv}, + Entry{"v1-012423-012424-transactions-to-block.idx"sv, "52014d441853f76b36ba89e37aeb2ef6cab17221"sv}, + Entry{"v1-012423-012424-transactions.idx"sv, "66df1d61bd1486830610d3cb424b84165322506f"sv}, + Entry{"v1-012424-012425-bodies.idx"sv, "34302e6f10472b375aacf52ff4a21fd4861b63e6"sv}, + Entry{"v1-012424-012425-borevents.idx"sv, "6508db605c8ca1ff2560798a6d4d99ec40b3eaed"sv}, + Entry{"v1-012424-012425-borspans.idx"sv, "f7730a2894a461a85d2d0a0d85db63dd9eb1caab"sv}, + Entry{"v1-012424-012425-headers.idx"sv, "94772de6b7f712860b187cc96a243966a78cf733"sv}, + Entry{"v1-012424-012425-transactions-to-block.idx"sv, "dd6930996b2289bd3864886d6dbb990e00877c10"sv}, + Entry{"v1-012424-012425-transactions.idx"sv, "89dcf4881fcfb2550d8d05a582049a1ca08a237f"sv}, + Entry{"v1-012425-012426-bodies.idx"sv, "8cda459c7b56c2e27135bf01d3a76e2c44ba5e75"sv}, + Entry{"v1-012425-012426-borevents.idx"sv, "80a0de79e1ccda73212aea95d9dba36704c1ea90"sv}, + Entry{"v1-012425-012426-borspans.idx"sv, "00aabc24266c991c4a86927a04dca4e6a4e6179e"sv}, + Entry{"v1-012425-012426-headers.idx"sv, "f293b9900a0e268bf441cdb455b3b6b164af46b8"sv}, + Entry{"v1-012425-012426-transactions-to-block.idx"sv, "7565f12399714c44d1027da464fe5613ca955ff7"sv}, + Entry{"v1-012425-012426-transactions.idx"sv, "446236bf18932ec2b62a46bec5c981f14fdf98a5"sv}, + Entry{"v1-012426-012427-bodies.idx"sv, "db4ee6c37906f2ba595c5795845c4ec1f48b2838"sv}, + Entry{"v1-012426-012427-borevents.idx"sv, "9cbeed0daf3e39755a5e4302478fb949e21a32a9"sv}, + Entry{"v1-012426-012427-borspans.idx"sv, "8d2d31eaae12acc657a051f553db125c0c34f3d2"sv}, + Entry{"v1-012426-012427-headers.idx"sv, "79ab2397eb0fe0fa78b09f8efc6c7bd491ed3429"sv}, + Entry{"v1-012426-012427-transactions-to-block.idx"sv, "a87f5bb8471e0870148be6493f952f7843bc06ca"sv}, + Entry{"v1-012426-012427-transactions.idx"sv, "131ab1b133d40f3dffc0eee199de0498d5711e5b"sv}, + Entry{"v1-012427-012428-bodies.idx"sv, "18e9a4bb2c0e4549f9b22384a339305f9edbe9c4"sv}, + Entry{"v1-012427-012428-borevents.idx"sv, "e4944fda985f782b3ff4357ec9ff96398e8f549e"sv}, + Entry{"v1-012427-012428-borspans.idx"sv, "ea89546d51aa75c082b81f75b5ee5814a457981f"sv}, + Entry{"v1-012427-012428-headers.idx"sv, "f0eab2bfe81067a837d925bd552d2c2efd43a32f"sv}, + Entry{"v1-012427-012428-transactions-to-block.idx"sv, "4f1bc42377c35f1fcbc72f37fe652262461f405e"sv}, + Entry{"v1-012427-012428-transactions.idx"sv, "90722dab6a7d894e23f0078531af5183944b6a0c"sv}, + Entry{"v1-012428-012429-bodies.idx"sv, "c32a72c257119a0c5d6ca10a11ab5a583726e40a"sv}, + Entry{"v1-012428-012429-borevents.idx"sv, "ea308bd9ba67bfbeffa057148b8d3bfcb225f957"sv}, + Entry{"v1-012428-012429-borspans.idx"sv, "37143d54259a7c48ba20d523b83112922718ecf6"sv}, + Entry{"v1-012428-012429-headers.idx"sv, "fecf6911b7cbfea70993bb0a65fe1acf1ba6b819"sv}, + Entry{"v1-012428-012429-transactions-to-block.idx"sv, "c66d0a47ac9263ff3363128c0cae3272747ec8ee"sv}, + Entry{"v1-012428-012429-transactions.idx"sv, "788d813794ede634400cf27539046ad424e41869"sv}, + Entry{"v1-012500-012600-bodies.idx"sv, "717ebb266e53ef1b9eef79edf321a8a323a7da34"sv}, + Entry{"v1-012500-012600-bodies.seg"sv, "3e7c220424af0ee23390dc74af0dfada319d8cfa"sv}, + Entry{"v1-012500-012600-borevents.idx"sv, "18b376142791e3129bc4d875b061571d41bc5ccb"sv}, + Entry{"v1-012500-012600-borevents.seg"sv, "117949fc3d751b9189f6e1ff42794031ece5a1dc"sv}, + Entry{"v1-012500-012600-borspans.idx"sv, "59676fe7e03aa51d35ad93fca78c3a18f88ea4e1"sv}, + Entry{"v1-012500-012600-borspans.seg"sv, "10e413d7530c0b83f09118b9e18670d3745ebadd"sv}, + Entry{"v1-012500-012600-headers.idx"sv, "c20a878ef5ebb837237230a56373fb740a51d4f9"sv}, + Entry{"v1-012500-012600-headers.seg"sv, "1105c641647e6eec4f5e0989591b3cf79cd40e07"sv}, + Entry{"v1-012500-012600-transactions-to-block.idx"sv, "666f2e9ff60ac1ce0745e7de42eefa210141ce83"sv}, + Entry{"v1-012500-012600-transactions.idx"sv, "e9488ce105be0d003a014348421209488706cf22"sv}, + Entry{"v1-012500-012600-transactions.seg"sv, "e203f1fb6e5e75bc65a191844a53e19171001a6f"sv}, + Entry{"v1-012600-012700-bodies.idx"sv, "4b6c4cf07408de0f2ff19e5d0c98c837756e8ee6"sv}, + Entry{"v1-012600-012700-bodies.seg"sv, "986c156d971f198d9962d7e4d1906e293d776aef"sv}, + Entry{"v1-012600-012700-borevents.idx"sv, "1e7c77fb46df0044ff73708b7b93399832139bae"sv}, + Entry{"v1-012600-012700-borevents.seg"sv, "d077633e12bcab56e26939adcb8329c7b3c427ec"sv}, + Entry{"v1-012600-012700-borspans.idx"sv, "eb191d0e41ba09ecbd1aa3c79238146fd2e90597"sv}, + Entry{"v1-012600-012700-borspans.seg"sv, "6ed978452b83004d7b0d105c293d6eb549a1db8b"sv}, + Entry{"v1-012600-012700-headers.idx"sv, "c66643ae2dfe58fd8bf21ca47c3639fd44534b47"sv}, + Entry{"v1-012600-012700-headers.seg"sv, "efe206a1b27597e92b703846a80536a56b1fa304"sv}, + Entry{"v1-012600-012700-transactions-to-block.idx"sv, "4d5b89b57b9090b7ee80ff39712e94d433a3032b"sv}, + Entry{"v1-012600-012700-transactions.idx"sv, "b20c19939995488e7bb2987a8edb68e470be5bb7"sv}, + Entry{"v1-012600-012700-transactions.seg"sv, "4a7f6d80f26db1ad450f816c1fc54b0a21ec73ce"sv}, + Entry{"v1-012700-012800-bodies.idx"sv, "5aea110afbcfd51243e7033441127bf8b0d44adf"sv}, + Entry{"v1-012700-012800-bodies.seg"sv, "b7e9a9777297f218ab14b9b40c263bad8d88ffc0"sv}, + Entry{"v1-012700-012800-borevents.idx"sv, "dc0fca51b32996ba11c12ff2f9aecce2c0fbcd24"sv}, + Entry{"v1-012700-012800-borevents.seg"sv, "36896659c9749d866e02c36a55311c58b453d25d"sv}, + Entry{"v1-012700-012800-borspans.idx"sv, "34eed8baeb292fe25c6a1250a8bb84b5fa032f6d"sv}, + Entry{"v1-012700-012800-borspans.seg"sv, "bc8ff01716105f3cefba9a9ab160477a520525df"sv}, + Entry{"v1-012700-012800-headers.idx"sv, "2ef23e3a853bd2d81abd6d1f95ec372b2936883d"sv}, + Entry{"v1-012700-012800-headers.seg"sv, "7b6aaa1b4e67e8cbf260eedccb38dd2d7e6810b2"sv}, + Entry{"v1-012700-012800-transactions-to-block.idx"sv, "59e978fde28c4afd16e333d5eccb498e8907e019"sv}, + Entry{"v1-012700-012800-transactions.idx"sv, "cdd77def220f51f8fee87b13c6c973e95e2be49f"sv}, + Entry{"v1-012700-012800-transactions.seg"sv, "ea72b1742be6404eb161057d8e780444274068f9"sv}, + Entry{"v1-012800-012900-bodies.idx"sv, "46e3946278e0ae1f4de774558d3d4e40c2c474be"sv}, + Entry{"v1-012800-012900-bodies.seg"sv, "0a721b59a59dcd573ad2e542a939cb9f10f0856a"sv}, + Entry{"v1-012800-012900-borevents.idx"sv, "a00d8d5abaa5b7100b35dc3a6c4a3f5ee35c3ee1"sv}, + Entry{"v1-012800-012900-borevents.seg"sv, "8a61c58a4c3046aa3bf3c0c64eb063ccd45585f4"sv}, + Entry{"v1-012800-012900-borspans.idx"sv, "78be7c4656b6c415f7966d0cd34759096f6126e2"sv}, + Entry{"v1-012800-012900-borspans.seg"sv, "2cc19155a6c8b4b149ec1d57b6941f61fe28948a"sv}, + Entry{"v1-012800-012900-headers.idx"sv, "96870d2ab2631d7d97f305aca8dc560018e1a0b7"sv}, + Entry{"v1-012800-012900-headers.seg"sv, "44b0048465f57bf2599027192eea409ab23d6f78"sv}, + Entry{"v1-012800-012900-transactions-to-block.idx"sv, "a6437fa2c7d958f86cf44669f127d89df15155e0"sv}, + Entry{"v1-012800-012900-transactions.idx"sv, "0ed33aa174fb3c70e286a9d736c0d38ffc33b60a"sv}, + Entry{"v1-012800-012900-transactions.seg"sv, "6014076e03d3b31af2a575a20ecbab4f2ac8bf6c"sv}, + Entry{"v1-012900-013000-bodies.idx"sv, "462565f801bcc0551cec757e5cbc518f88c221d9"sv}, + Entry{"v1-012900-013000-bodies.seg"sv, "29825544fcc9c3d2ecaed85b99b842f2559ac6dd"sv}, + Entry{"v1-012900-013000-borevents.idx"sv, "b49141588459508e5e152a68fdf1b2728a46182d"sv}, + Entry{"v1-012900-013000-borevents.seg"sv, "6f1f5175e50b6d246161ccea613b5372afc9e205"sv}, + Entry{"v1-012900-013000-borspans.idx"sv, "b0bb09023a5714053ebac80a8ae1f887ced93d15"sv}, + Entry{"v1-012900-013000-borspans.seg"sv, "554c489746bab4992292161d2e9c799390a76a09"sv}, + Entry{"v1-012900-013000-headers.idx"sv, "c2ea00b61783da4fd89b28243749e2544a29c072"sv}, + Entry{"v1-012900-013000-headers.seg"sv, "d5e51935adb18c1889eefc436e0ba3db212103c2"sv}, + Entry{"v1-012900-013000-transactions-to-block.idx"sv, "702b4bfc716d5331cf94727f8e74e44fcbf95ccb"sv}, + Entry{"v1-012900-013000-transactions.idx"sv, "39a7185cb1a1286f14233e1bff8bb29ed1fab8b9"sv}, + Entry{"v1-012900-013000-transactions.seg"sv, "6461b30824ad5c6f0a66a82073fbd62e696704e9"sv}, + Entry{"v1-013000-013100-bodies.idx"sv, "0372fef48659c72bd792f9da3da1c7b14bb21c76"sv}, + Entry{"v1-013000-013100-bodies.seg"sv, "4d6190664e6f6fc13a0c7f29793b9c12c970f551"sv}, + Entry{"v1-013000-013100-borevents.idx"sv, "71dedb2755993c3378e450326bf0d749d524bbb9"sv}, + Entry{"v1-013000-013100-borevents.seg"sv, "9b0e08871c6630783eb03efec9cf5e200d25556c"sv}, + Entry{"v1-013000-013100-borspans.idx"sv, "772bd49afb52bb68b16036ce57b3b63e9cac4bc3"sv}, + Entry{"v1-013000-013100-borspans.seg"sv, "def6b622bc282f277dc7e3c48a6f3822c114552a"sv}, + Entry{"v1-013000-013100-headers.idx"sv, "47c2b1f20b6ec1f4a78493f0aa73f55375741b1c"sv}, + Entry{"v1-013000-013100-headers.seg"sv, "aab34d4d10482c2c07e8ad66f0b0eca5b8a4b758"sv}, + Entry{"v1-013000-013100-transactions-to-block.idx"sv, "bc23e2017012330da7c8136202cf0961ec62d263"sv}, + Entry{"v1-013000-013100-transactions.idx"sv, "6f71d1560f92038e5f533a90f67f5dbd9e915b20"sv}, + Entry{"v1-013000-013100-transactions.seg"sv, "c401177338a287dce25dd138a423d81520555168"sv}, + Entry{"v1-013100-013200-bodies.idx"sv, "2fcd5b71cd0df8e496965a32cf8bb6739b9b9f40"sv}, + Entry{"v1-013100-013200-bodies.seg"sv, "012557ced7152c58f71122d5d3f21cf1f74bfe5c"sv}, + Entry{"v1-013100-013200-borevents.idx"sv, "6be70f2c7d88492b0bb3f8d9e823f1e17227567f"sv}, + Entry{"v1-013100-013200-borevents.seg"sv, "0d1e1b492aec9239462c3bc777b19c497ca904c0"sv}, + Entry{"v1-013100-013200-borspans.idx"sv, "55b765714840c4b475efa7a557aa4d1e34d1c9ef"sv}, + Entry{"v1-013100-013200-borspans.seg"sv, "645d1c09b99a8c3f6fc7f4edc6fec779e2ef1bb6"sv}, + Entry{"v1-013100-013200-headers.idx"sv, "ce0177fd7959e819f3dedecfbcb6529564c29a99"sv}, + Entry{"v1-013100-013200-headers.seg"sv, "65b457784378be6135eac95dba0605d2af25031f"sv}, + Entry{"v1-013100-013200-transactions-to-block.idx"sv, "022b1dec516e06dd8c7fcfd85f3028ee7da96431"sv}, + Entry{"v1-013100-013200-transactions.idx"sv, "d00a6f03d0f614f64f6ab033ed4e28bc4cc6e42b"sv}, + Entry{"v1-013100-013200-transactions.seg"sv, "9af73798af01923cba80fbd09675b43d7d3364bf"sv}, + Entry{"v1-013200-013300-bodies.idx"sv, "d095af86aa394e162369b6277e8ea15697c81bd1"sv}, + Entry{"v1-013200-013300-bodies.seg"sv, "ab87123f3cddb3d41e809f6431638349e535e7e7"sv}, + Entry{"v1-013200-013300-borevents.idx"sv, "e0d39876e11cadda0500ebf044c60a4134771292"sv}, + Entry{"v1-013200-013300-borevents.seg"sv, "05ec824e8a56911050f5298022e500f9de76a9e4"sv}, + Entry{"v1-013200-013300-borspans.idx"sv, "79ee70f73d376286cb43f3cfa2ac9d5bb3962261"sv}, + Entry{"v1-013200-013300-borspans.seg"sv, "3c6999a98664f6dce1bec91641e9f15f0412ae18"sv}, + Entry{"v1-013200-013300-headers.idx"sv, "c5ab4b86c1e6eced0fde73f1bd9539222e6e252d"sv}, + Entry{"v1-013200-013300-headers.seg"sv, "98884eb2f2bd72b1730cfbc089356c43f53a8f83"sv}, + Entry{"v1-013200-013300-transactions-to-block.idx"sv, "f2b9fbfaa445dd2ace299a596b419b0379d2b67c"sv}, + Entry{"v1-013200-013300-transactions.idx"sv, "d68e23fceaa0c14a9127c1dd2e6890f784ec8d82"sv}, + Entry{"v1-013200-013300-transactions.seg"sv, "63ac214f3cc4238423c713c26c8e96ece96d57b5"sv}, + Entry{"v1-013300-013400-bodies.idx"sv, "00555b4fa20a4ab3cad3d9be5d81b168cd5623b5"sv}, + Entry{"v1-013300-013400-bodies.seg"sv, "f72797b76fbe3748079d7e3ff806c10c8c26b381"sv}, + Entry{"v1-013300-013400-borevents.idx"sv, "1b64ffbf0b46284b3d3baf29a5e1795334eb9d6b"sv}, + Entry{"v1-013300-013400-borevents.seg"sv, "af86e56eddc49d692c405d0260a1c75bd12236f6"sv}, + Entry{"v1-013300-013400-borspans.idx"sv, "c07b32241f4656f75debf6c399c4843120809454"sv}, + Entry{"v1-013300-013400-borspans.seg"sv, "8ca895c7ac729e51ed49fcb1063e4bdf22223b63"sv}, + Entry{"v1-013300-013400-headers.idx"sv, "5ac66cb7d2addd5d7c7fce900f9537935d6d9108"sv}, + Entry{"v1-013300-013400-headers.seg"sv, "eb5bf27ff2f557ae53cd024cbe04bbcb0c6219ac"sv}, + Entry{"v1-013300-013400-transactions-to-block.idx"sv, "64fead5e217f8257fe313814ccb632ac225fd4a8"sv}, + Entry{"v1-013300-013400-transactions.idx"sv, "6d6fcae12fe33053a0238fa1b69a62072ce29522"sv}, + Entry{"v1-013300-013400-transactions.seg"sv, "1c739fa98444c96419fa65a2b10c7a25906ef80a"sv}, + Entry{"v1-013400-013410-bodies.idx"sv, "329d4618bd5e514597554b0d8e485d892ce47e91"sv}, + Entry{"v1-013400-013410-bodies.seg"sv, "0160ff53f7353738eb1d8afc799d9957c5a48515"sv}, + Entry{"v1-013400-013410-borevents.idx"sv, "4d33e45ddd5f3d72f52eeea3b34c00502e97674d"sv}, + Entry{"v1-013400-013410-borevents.seg"sv, "0d4be47535ea5bd37fae8384538292b9b897330e"sv}, + Entry{"v1-013400-013410-borspans.idx"sv, "7a672de15968538031ceb11fbfe380c760aceb43"sv}, + Entry{"v1-013400-013410-borspans.seg"sv, "31a3dc107dbd6508c71bec09ec6fd661a97d625c"sv}, + Entry{"v1-013400-013410-headers.idx"sv, "ef84804ff95a5d649ca936012c91de7f86e87f95"sv}, + Entry{"v1-013400-013410-headers.seg"sv, "e1a8a5f1fc372fb25cda1054e6e839b6aa8d85de"sv}, + Entry{"v1-013400-013410-transactions-to-block.idx"sv, "181a2a7993033c11698eea8a9820f7eba59c1c0c"sv}, + Entry{"v1-013400-013410-transactions.idx"sv, "f14baa0647ce8ad891291901ebac8f60d5a565ea"sv}, + Entry{"v1-013400-013410-transactions.seg"sv, "b0bc93cc35774fe08169e95f9f5d17729616f8c5"sv}, + Entry{"v1-013410-013420-bodies.idx"sv, "41ae00222d747cf35b577db7028667bc9816a630"sv}, + Entry{"v1-013410-013420-bodies.seg"sv, "5680ce6cf256607da92112dccc7d2364da4d310d"sv}, + Entry{"v1-013410-013420-borevents.idx"sv, "11cea9df5f45cd37526fd3cb4b645926c7b83c09"sv}, + Entry{"v1-013410-013420-borevents.seg"sv, "1404bc8f4c80e0c9f409a268153f7aca3aa9955f"sv}, + Entry{"v1-013410-013420-borspans.idx"sv, "894d5ec674245cf8d975c01adc8df1ec51c7fc35"sv}, + Entry{"v1-013410-013420-borspans.seg"sv, "5fed0aefe37dab9b25e6ffcfd99a9836a893250e"sv}, + Entry{"v1-013410-013420-headers.idx"sv, "981c69caac24508e874dc4786be1557514f0a319"sv}, + Entry{"v1-013410-013420-headers.seg"sv, "67a300cefcc25b654373022cd6d0e0a283f7394e"sv}, + Entry{"v1-013410-013420-transactions-to-block.idx"sv, "b30aad5580fd8a4bacff19133d304b5628978336"sv}, + Entry{"v1-013410-013420-transactions.idx"sv, "b747f9073e273bae25afe2af2ced80d916695766"sv}, + Entry{"v1-013410-013420-transactions.seg"sv, "e9a3526dd903a498a4abf025666b7413104f55c4"sv}, + Entry{"v1-013420-013430-bodies.idx"sv, "aced89fc0f954524e968482b4593ace62cd630df"sv}, + Entry{"v1-013420-013430-bodies.seg"sv, "cbd284989e8573f7d2e34d42fcc72310f8f23c5b"sv}, + Entry{"v1-013420-013430-borevents.idx"sv, "f7663592b9a21f06cb50ff0e8345e78fa0d03581"sv}, + Entry{"v1-013420-013430-borevents.seg"sv, "4ca4cc05a721c93da85d7759a9b691b2e4f84d34"sv}, + Entry{"v1-013420-013430-borspans.idx"sv, "08cde78ccfcc4558d3f66561e42bf60ce2408310"sv}, + Entry{"v1-013420-013430-borspans.seg"sv, "d9f25f7971e5af3b46a50512f20e8b6d0e1fb586"sv}, + Entry{"v1-013420-013430-headers.idx"sv, "90e1e5a941995bd654cd65d4ae307ec73c019b5a"sv}, + Entry{"v1-013420-013430-headers.seg"sv, "46614480cca433baef9fb5554b6b33f045697140"sv}, + Entry{"v1-013420-013430-transactions-to-block.idx"sv, "fc8bc89194f7f601a3eb573239adf5821639a12c"sv}, + Entry{"v1-013420-013430-transactions.idx"sv, "16d18c27a2d856f6e0bc1b9127c44772ea0e6af6"sv}, + Entry{"v1-013420-013430-transactions.seg"sv, "55116e2a1f96dc6801448ca9aa9db18d71728810"sv}, + Entry{"v1-013430-013440-bodies.idx"sv, "6d4babc841b445a69c755e002a0665e7dac38165"sv}, + Entry{"v1-013430-013440-bodies.seg"sv, "dad78782569ea14cf7fb04b84853254045bc90c2"sv}, + Entry{"v1-013430-013440-borevents.idx"sv, "7feb6147e2bc4fa5ed1f6dca7593e77374091032"sv}, + Entry{"v1-013430-013440-borevents.seg"sv, "d3163ad4d15c7463d10ccbbd3a0a59dfce16e7cb"sv}, + Entry{"v1-013430-013440-borspans.idx"sv, "8088b5b6b44adf722093dc1e6af7a4a7036116c0"sv}, + Entry{"v1-013430-013440-borspans.seg"sv, "3900fc14de2b420471b2066b2310ad7f3bcef1c6"sv}, + Entry{"v1-013430-013440-headers.idx"sv, "55ad997c96b86aa241b6c193f293d42e8735709c"sv}, + Entry{"v1-013430-013440-headers.seg"sv, "448384ab5c05f771360dde25fb4e6311ab33a080"sv}, + Entry{"v1-013430-013440-transactions-to-block.idx"sv, "d912a44c22644d908760d27f3592cdb98fe3f9f6"sv}, + Entry{"v1-013430-013440-transactions.idx"sv, "f3382b4d8facc9ecb253480fa803149d819dafbc"sv}, + Entry{"v1-013430-013440-transactions.seg"sv, "575857ea88da35ee11685051e78e27c3898c12ad"sv}, + Entry{"v1-013440-013441-bodies.idx"sv, "2a164331504c6085f6124ff10434e08b9e05de31"sv}, + Entry{"v1-013440-013441-bodies.seg"sv, "ee6e3d4f4da1e33ae9ff08d9847f1fb5b425dd36"sv}, + Entry{"v1-013440-013441-borevents.idx"sv, "2fc94c2313e4c157a8b660dfda6956f1cdfdc345"sv}, + Entry{"v1-013440-013441-borevents.seg"sv, "7b1e78385f28139fbe0a6bcadfbf70fc56b95eeb"sv}, + Entry{"v1-013440-013441-borspans.idx"sv, "065d2571247772f9b9766f5323c70d6e2341c1ed"sv}, + Entry{"v1-013440-013441-borspans.seg"sv, "40e36815520217be118aba3669ce0adb536602a4"sv}, + Entry{"v1-013440-013441-headers.idx"sv, "fc95d3c062af72e7929bc19f2d1a033bf9e6ad38"sv}, + Entry{"v1-013440-013441-headers.seg"sv, "4738ee6511020d3115589172ce10c5e6fda8f923"sv}, + Entry{"v1-013440-013441-transactions-to-block.idx"sv, "83121044a6e3625ae4aed38e06b52047468094ef"sv}, + Entry{"v1-013440-013441-transactions.idx"sv, "805999acc018e86c8d3aee6923a7cf2fe80dda80"sv}, + Entry{"v1-013440-013441-transactions.seg"sv, "47491a8646a79fe80f16c2f6c82a23074f244829"sv}, + Entry{"v1-013441-013442-bodies.idx"sv, "87723c53c84a0acd6010ba9319492fc8855c0011"sv}, + Entry{"v1-013441-013442-bodies.seg"sv, "d907b2d7361b6e022ceaa6c3c0ad3c979a33fcbc"sv}, + Entry{"v1-013441-013442-borevents.idx"sv, "4262257005ab59dc535c5fd5912ae0b1d8bcfa73"sv}, + Entry{"v1-013441-013442-borevents.seg"sv, "e1c2877476ea219957c59feb27e7972a0debe691"sv}, + Entry{"v1-013441-013442-borspans.idx"sv, "077947841baf26d61345945b4b23f645c053d801"sv}, + Entry{"v1-013441-013442-borspans.seg"sv, "404fc69d11e5f897f86637f4f91a837d680ad435"sv}, + Entry{"v1-013441-013442-headers.idx"sv, "e1fddda8adbad31b8a0d556341d3fc48039a556c"sv}, + Entry{"v1-013441-013442-headers.seg"sv, "b73bf663085adbb3462b6a567f51b1789fb10784"sv}, + Entry{"v1-013441-013442-transactions-to-block.idx"sv, "94bc1a067bc988c0ee54bdb035d7420762022add"sv}, + Entry{"v1-013441-013442-transactions.idx"sv, "7ed80b4399bfaadfa1b0e95701a55edf3776accd"sv}, + Entry{"v1-013441-013442-transactions.seg"sv, "5c9b323fb8b3e082ad8779510b14f380e2714106"sv}, + Entry{"v1-013442-013443-bodies.idx"sv, "59027d25d6b0ed95fd3277230b52eb48fc656a23"sv}, + Entry{"v1-013442-013443-bodies.seg"sv, "d5f94647e67c47b756195d0b8ffc186a3fe7ba18"sv}, + Entry{"v1-013442-013443-borevents.idx"sv, "b555f643437cb3f57cd45f584a6ccb0c5f1dd20b"sv}, + Entry{"v1-013442-013443-borevents.seg"sv, "269e3f567fbf08474e22c49555b8b379d3360dd6"sv}, + Entry{"v1-013442-013443-borspans.idx"sv, "e62d45b80c6dc592a0462d1e08edbfecfca72a75"sv}, + Entry{"v1-013442-013443-borspans.seg"sv, "13c6ea436cf80f07c0c7d9a10e5578a14b5490d5"sv}, + Entry{"v1-013442-013443-headers.idx"sv, "bf70cc27daacb44279215bad8d9b4d71e8f8278b"sv}, + Entry{"v1-013442-013443-headers.seg"sv, "55f34ca1cafc2dcded141a811b0c9fe278b5468b"sv}, + Entry{"v1-013442-013443-transactions-to-block.idx"sv, "14e526b82361abfacfe845bf7e43e3f265b5680b"sv}, + Entry{"v1-013442-013443-transactions.idx"sv, "7b857e50abccd64c182b8ff8954ff580deab4834"sv}, + Entry{"v1-013442-013443-transactions.seg"sv, "e6a73788e9eb362c4ef601cc8354e3ff54b41ff8"sv}, + Entry{"v1-013443-013444-bodies.idx"sv, "c8654c8761de765707e4d2eb069c4b80bb8e1475"sv}, + Entry{"v1-013443-013444-bodies.seg"sv, "ea1989971b3177004a46d4cece07bc02d09fbf89"sv}, + Entry{"v1-013443-013444-borevents.idx"sv, "9498f78d6cfb93aa27fb9e73158b6829b1c7d56f"sv}, + Entry{"v1-013443-013444-borevents.seg"sv, "4fcedc7fdba5b398c147c86f2f852c881372ab93"sv}, + Entry{"v1-013443-013444-borspans.idx"sv, "1f8467ae762fbbdca7558788cde33110ba35519c"sv}, + Entry{"v1-013443-013444-borspans.seg"sv, "a5d486aa1dbcf79aceedea0972b8d0ba47e45695"sv}, + Entry{"v1-013443-013444-headers.idx"sv, "3eac9eb3b53e5f084e24c5db7b67e5ffc223ce14"sv}, + Entry{"v1-013443-013444-headers.seg"sv, "613c5843d37246cdea9ace2a0d2fb2cdf618304e"sv}, + Entry{"v1-013443-013444-transactions-to-block.idx"sv, "2fede24fa23fb14434522b9bd84a8cecd5d623a0"sv}, + Entry{"v1-013443-013444-transactions.idx"sv, "90549bca8a0ed166c7851455db513fc54daf421a"sv}, + Entry{"v1-013443-013444-transactions.seg"sv, "4851295fdbf1745cabb34bbc931cb75c8095f2a1"sv}, + Entry{"v1-013444-013445-bodies.idx"sv, "5a5174791f7435c306c5131c623063bb03359859"sv}, + Entry{"v1-013444-013445-bodies.seg"sv, "a375cef2bb68f4f300c6176c293f8b13c38a2ac3"sv}, + Entry{"v1-013444-013445-borevents.idx"sv, "d59e493c222b3363e3ff2a1fbec0bdd6185e3e09"sv}, + Entry{"v1-013444-013445-borevents.seg"sv, "6065b2975ceb7fbdc0334af66d09cf984aa34424"sv}, + Entry{"v1-013444-013445-borspans.idx"sv, "3d2ce5804901a0bee2f3fead345e4112b1d2c6ee"sv}, + Entry{"v1-013444-013445-borspans.seg"sv, "3b4e873a0d4b68ccfadeb5734bc686b80702bed4"sv}, + Entry{"v1-013444-013445-headers.idx"sv, "fb5f8cadd2e179fe6a946a18a03ccbdd65a2e0fc"sv}, + Entry{"v1-013444-013445-headers.seg"sv, "444c6ea9a0e0825bc0b250e42a1753a2760e0d18"sv}, + Entry{"v1-013444-013445-transactions-to-block.idx"sv, "1e6261979327ce5a75108ed725fc4b19ee63eec0"sv}, + Entry{"v1-013444-013445-transactions.idx"sv, "077ec7b172fa40ffb6a85a6825332a0f1c6e2dd7"sv}, + Entry{"v1-013444-013445-transactions.seg"sv, "e23a54a380485c707485b7b5c8084d2b665b1a98"sv}, }; } // namespace silkworm::snapshots diff --git a/silkworm/db/datastore/snapshots/config/chains/holesky.hpp b/silkworm/db/datastore/snapshots/config/chains/holesky.hpp index 322c4de492..73825c1495 100644 --- a/silkworm/db/datastore/snapshots/config/chains/holesky.hpp +++ b/silkworm/db/datastore/snapshots/config/chains/holesky.hpp @@ -12,156 +12,46 @@ namespace silkworm::snapshots { using namespace std::literals; inline constexpr std::array kHoleskySnapshots{ - Entry{"accessor/v1-accounts.0-32.efi"sv, "d5f3ade5d6c0bdab2cd3065a3cf4c1e68dce5072"sv}, - Entry{"accessor/v1-accounts.0-32.vi"sv, "6f87ddf0c414665f2cc775bb88a35e66f345769b"sv}, - Entry{"accessor/v1-accounts.32-48.efi"sv, "620a7fc3461d5359e079c6ea62d3b6dc6a00669f"sv}, - Entry{"accessor/v1-accounts.32-48.vi"sv, "6d9f8bc494cddd05e2fbcb85b221049c7b038be8"sv}, - Entry{"accessor/v1-accounts.48-56.efi"sv, "72384078fc60a4931e71770a0d145568b05b84d0"sv}, - Entry{"accessor/v1-accounts.48-56.vi"sv, "85ba8485dca96687bfe00ae152e8b6d0caec7c54"sv}, - Entry{"accessor/v1-accounts.56-60.efi"sv, "6f5a7362f66c6f4ac6873129e0c692998f102647"sv}, - Entry{"accessor/v1-accounts.56-60.vi"sv, "c886bc5b80fbd835c8b3fac14eb08e46ff533a5b"sv}, - Entry{"accessor/v1-code.0-32.efi"sv, "c3042879023b539ae152d676bc78e00e958a8f7e"sv}, - Entry{"accessor/v1-code.0-32.vi"sv, "b2464e55dc0eb5941e7180e42626d983c25ee790"sv}, - Entry{"accessor/v1-code.32-48.efi"sv, "0770eea01d615783f11eb3b7d3cbc1a4be2e3bd0"sv}, - Entry{"accessor/v1-code.32-48.vi"sv, "918accebd88b25c22eefb4ab2fe6dfc20f8e9979"sv}, - Entry{"accessor/v1-code.48-56.efi"sv, "3e25d260a19c239df2bfb32622fa43430f3c2b01"sv}, - Entry{"accessor/v1-code.48-56.vi"sv, "0576b3618367d2151bb3bc70502a659acd726d1a"sv}, - Entry{"accessor/v1-code.56-60.efi"sv, "7b03a84829773ac0815d283e541657b6fa739a2e"sv}, - Entry{"accessor/v1-code.56-60.vi"sv, "ba123a1f1c33a6ac6c3dad2ca8a1c6664744f062"sv}, - Entry{"accessor/v1-logaddrs.0-32.efi"sv, "4cb8cf05851b5b3377f8e2022cd582aae4fc98b3"sv}, - Entry{"accessor/v1-logaddrs.32-48.efi"sv, "cea17c261522f118280e9191468b2920bdf4bbd8"sv}, - Entry{"accessor/v1-logaddrs.48-56.efi"sv, "6fdd25981eaf331c90cf4b168cd48d2f18842c24"sv}, - Entry{"accessor/v1-logaddrs.56-60.efi"sv, "ac7823450eb83d300385c3827faba69f0df2aaad"sv}, - Entry{"accessor/v1-logtopics.0-32.efi"sv, "37f24c7d7431a9e6abcf31696cf815b8df070929"sv}, - Entry{"accessor/v1-logtopics.32-48.efi"sv, "edbfba5a335c63ad397fa46be74ec8d577e88ff1"sv}, - Entry{"accessor/v1-logtopics.48-56.efi"sv, "bb274685ebd28fda57ac31f5f3bd312a74893630"sv}, - Entry{"accessor/v1-logtopics.56-60.efi"sv, "4ede4dff3e6420e25144ebae8e065b5dc8d69c0b"sv}, - Entry{"accessor/v1-receipt.0-32.efi"sv, "b0795e169af0ebd6fd0ff1116a093af0a686cb3e"sv}, - Entry{"accessor/v1-receipt.0-32.vi"sv, "03eae3fa4e711f7c81c15a9b08f60a141f38692c"sv}, - Entry{"accessor/v1-receipt.32-40.efi"sv, "0e6f0c37ae3356758fb5834cc2981e552b42d80a"sv}, - Entry{"accessor/v1-receipt.32-40.vi"sv, "3f4ab9c11f709c7ab9398c3a393f8131424b4cc8"sv}, - Entry{"accessor/v1-receipt.56-60.efi"sv, "e33d677234cc80a2f07fcb07675c820c63381502"sv}, - Entry{"accessor/v1-receipt.56-60.vi"sv, "6fc0f5f47ea8b34dbe55ade60d206ef9e38e1ed6"sv}, - Entry{"accessor/v1-storage.0-32.efi"sv, "d7a6a739c2924498ed90f8593938916e54ca9e01"sv}, - Entry{"accessor/v1-storage.0-32.vi"sv, "6aa2ecea6351c864bd8f1d7a1fb06c8b69581c05"sv}, - Entry{"accessor/v1-storage.32-48.efi"sv, "acefe61e12baa9f72d172653dbbe4ce0faa174c5"sv}, - Entry{"accessor/v1-storage.32-48.vi"sv, "b61a291d2831a2e86856fcc0b6e4269f4e4ae313"sv}, - Entry{"accessor/v1-storage.48-56.efi"sv, "6d40d0cb8fe695bfb10329e5880ba844a9b5c380"sv}, - Entry{"accessor/v1-storage.48-56.vi"sv, "9d47cdaf785c10e8ff6cbfc983f09e2603d82f8c"sv}, - Entry{"accessor/v1-storage.56-60.efi"sv, "e8150a2ce5c105f972e3c3fff889700d9334c17c"sv}, - Entry{"accessor/v1-storage.56-60.vi"sv, "785ad95e0f5cb5132f7126d0d2c110520f05cfde"sv}, - Entry{"accessor/v1-tracesfrom.0-32.efi"sv, "704053078ad23b8054a263fda4de8b7c4cd14985"sv}, - Entry{"accessor/v1-tracesfrom.32-48.efi"sv, "312086fb0aabf569a1bd58bdfa17f82efe69170d"sv}, - Entry{"accessor/v1-tracesfrom.48-56.efi"sv, "6e00028b444793781422ca4a1690c344c2ab0f02"sv}, - Entry{"accessor/v1-tracesfrom.56-60.efi"sv, "d24cc532284f3022e728cabc9c1ec9e38ae77d2a"sv}, - Entry{"accessor/v1-tracesto.0-32.efi"sv, "d81b5743b5911337b4a4a4d90fda93391285137c"sv}, - Entry{"accessor/v1-tracesto.32-48.efi"sv, "79d21e9443158d6a97f8fcd8524b2737f5f19483"sv}, - Entry{"accessor/v1-tracesto.48-56.efi"sv, "b582cb6849a64eed8f6b8ef1273cbf55eeece118"sv}, - Entry{"accessor/v1-tracesto.56-60.efi"sv, "0f9fe0c7bb0dddf049fd98800f8518a4b565fca8"sv}, - Entry{"domain/v1-accounts.0-32.bt"sv, "e85bd6e4b933e112b4f3342e60e00f819065e97f"sv}, - Entry{"domain/v1-accounts.0-32.kv"sv, "a05686dae6d76090314e7f8b42a0c1cf629be995"sv}, - Entry{"domain/v1-accounts.0-32.kvei"sv, "dbde296a248dce9accee7a286d0b0fb8a596061d"sv}, - Entry{"domain/v1-accounts.32-48.bt"sv, "26f38867599e9547aef41b1086b9c876d98d266c"sv}, - Entry{"domain/v1-accounts.32-48.kv"sv, "78339391de25990673d01b6515c742a3ae27bc47"sv}, - Entry{"domain/v1-accounts.32-48.kvei"sv, "9d08ab8d3da85c9428c6d448bcc9728729363b25"sv}, - Entry{"domain/v1-accounts.48-56.bt"sv, "257c996b6a028f46ba3dda98544c51f834e20525"sv}, - Entry{"domain/v1-accounts.48-56.kv"sv, "aa66817d00941ab7bc805fc7c22b2cefdc1cc963"sv}, - Entry{"domain/v1-accounts.48-56.kvei"sv, "8ee3dc290a93dc0551b6b5f99d32e62b0df49eb2"sv}, - Entry{"domain/v1-accounts.56-60.bt"sv, "5c99229b76c917f20d218972183558bb42265695"sv}, - Entry{"domain/v1-accounts.56-60.kv"sv, "b4031cd27e606c5aa43ad19b6917e5d4b5d51312"sv}, - Entry{"domain/v1-accounts.56-60.kvei"sv, "7fcf471720daf7d9ca1a70e31e51876ccad628a5"sv}, - Entry{"domain/v1-code.0-32.bt"sv, "9eaaf7ab8d01ac50b21bec2559dd041d8edbf7af"sv}, - Entry{"domain/v1-code.0-32.kv"sv, "eec9910531ccd000fd49a08d7464e33b43190cf7"sv}, - Entry{"domain/v1-code.0-32.kvei"sv, "434785331d646768a895dbb70ad5f0a029cc1ce6"sv}, - Entry{"domain/v1-code.32-48.bt"sv, "eb6c9571eb2765b6d8299f8522002a02bfa805b2"sv}, - Entry{"domain/v1-code.32-48.kv"sv, "f720866ee8ececc8d535dc0dcd539c6a040e1d84"sv}, - Entry{"domain/v1-code.32-48.kvei"sv, "f45f36f4603acd4f470a446fd7ee608642e7893f"sv}, - Entry{"domain/v1-code.48-56.bt"sv, "692064b6316bb52e0b39462032a5d3e1b51c16e2"sv}, - Entry{"domain/v1-code.48-56.kv"sv, "582f22e2fb7234b4a9ec6fe43d96ee1d03086118"sv}, - Entry{"domain/v1-code.48-56.kvei"sv, "f59c984ed472e90ec4eb728f27ef0645b268ceae"sv}, - Entry{"domain/v1-code.56-60.bt"sv, "49748338c57a948fd006ebbc8471ad099f62e1c4"sv}, - Entry{"domain/v1-code.56-60.kv"sv, "1b3e796ba13f79799121c6fc96a8da7f40c3eccb"sv}, - Entry{"domain/v1-code.56-60.kvei"sv, "fa4e84ebe8e26d4535bd46357bbf68420eccd7be"sv}, - Entry{"domain/v1-commitment.0-32.bt"sv, "b287d209b9ad70c54907b187c775ad2e1990add4"sv}, - Entry{"domain/v1-commitment.0-32.kv"sv, "ef3e6eb11c2cc45b65171be36d9b6989c749034e"sv}, - Entry{"domain/v1-commitment.0-32.kvei"sv, "955e8dc8ef6d741ed773448b807c227f1163a909"sv}, - Entry{"domain/v1-commitment.32-48.bt"sv, "009253df9292f62870fa965d97cd16d7922d3719"sv}, - Entry{"domain/v1-commitment.32-48.kv"sv, "544012379f4917e12682e0de64a9f4ae806b005b"sv}, - Entry{"domain/v1-commitment.32-48.kvei"sv, "3954e4993562795df4072275b9ede62664d51b0f"sv}, - Entry{"domain/v1-commitment.48-56.bt"sv, "d97c13a7d3dc71b8798db3c6cd2a2ca4bc816e93"sv}, - Entry{"domain/v1-commitment.48-56.kv"sv, "f07c038816b4304172f75ccd5b72ecd272380075"sv}, - Entry{"domain/v1-commitment.48-56.kvei"sv, "15897824af92baa10e1148d7d260ca4f86381d10"sv}, - Entry{"domain/v1-commitment.56-60.bt"sv, "b985225de2557bc1b38e5c01e23dccfd30ea122e"sv}, - Entry{"domain/v1-commitment.56-60.kv"sv, "f874badec779dde2bde62bee5e532cc8fe45e56c"sv}, - Entry{"domain/v1-commitment.56-60.kvei"sv, "a9a9304c26f0a8b561214e1f354033dc26b0b0a9"sv}, - Entry{"domain/v1-receipt.0-32.bt"sv, "fd1d2ce7c01bcc4d8f83b5f4b7324dcff6effb26"sv}, - Entry{"domain/v1-receipt.0-32.kv"sv, "cebb6e03a5abb8ed9392df39a8e1e0c84d9a6a8b"sv}, - Entry{"domain/v1-receipt.0-32.kvei"sv, "0fb05457c39fff70a18d72e2542e7462c7ca224c"sv}, - Entry{"domain/v1-receipt.32-40.bt"sv, "ddcd27a9ce57ea395fdb59a3f4baabe5191d5eed"sv}, - Entry{"domain/v1-receipt.32-40.kv"sv, "393c80794d1bbd5afebf732a84c70b45f9128326"sv}, - Entry{"domain/v1-receipt.32-40.kvei"sv, "33211e69b815d960d72c3eebda6f8570df7be5d5"sv}, - Entry{"domain/v1-receipt.56-60.bt"sv, "1491a7ba0dbe65e1d596fba5e734062e5ee38209"sv}, - Entry{"domain/v1-receipt.56-60.kv"sv, "8180f0c42c7bce7789c756c5a325951c658841a9"sv}, - Entry{"domain/v1-receipt.56-60.kvei"sv, "f8fa1b2a1419339b4175111d3320da31a1c4191b"sv}, - Entry{"domain/v1-storage.0-32.bt"sv, "fcce709c09739b3b58a5ea325c297ef841faf7ad"sv}, - Entry{"domain/v1-storage.0-32.kv"sv, "1654f8be31e52d8300a7114bacc8ce0f74d34d26"sv}, - Entry{"domain/v1-storage.0-32.kvei"sv, "ee8fa3442acd3879abce92db2644183ab23c2da9"sv}, - Entry{"domain/v1-storage.32-48.bt"sv, "bda31ff3645bc02f7c3859603f2c1211b10a0b9e"sv}, - Entry{"domain/v1-storage.32-48.kv"sv, "0cdcfd65a9a749d56ec3c8d14cc0a583787eab8a"sv}, - Entry{"domain/v1-storage.32-48.kvei"sv, "cbfe33530cad1c2081065a735b22fa41a7216970"sv}, - Entry{"domain/v1-storage.48-56.bt"sv, "543cd1694202d17e198bfa8460ba69cf29ed707d"sv}, - Entry{"domain/v1-storage.48-56.kv"sv, "020271e9c11320d7a4b5e2ee74b72b0c6142df91"sv}, - Entry{"domain/v1-storage.48-56.kvei"sv, "294e3b4b1c99de7def6b01b82e00b366efc3e0a0"sv}, - Entry{"domain/v1-storage.56-60.bt"sv, "baa23edcd2128f8b2423904068eedd84600930e2"sv}, - Entry{"domain/v1-storage.56-60.kv"sv, "b6c4154552ec0f6745957fbe21b0d703f6431732"sv}, - Entry{"domain/v1-storage.56-60.kvei"sv, "e054c33a23b539536952d7201217f7d1afd8b000"sv}, - Entry{"history/v1-accounts.0-32.v"sv, "e58ef7939482719fe8c1fe5c81c2c3164663e7df"sv}, - Entry{"history/v1-accounts.32-48.v"sv, "bb7ff16a0898d076d8abbd962d1b383b5e0c2e2f"sv}, - Entry{"history/v1-accounts.48-56.v"sv, "e9b6633794a1aa24ebe19a5a5f545ad8e5a42de5"sv}, - Entry{"history/v1-accounts.56-60.v"sv, "8fb9b38afb41e1f3703840cbccbcf0130c32ced6"sv}, - Entry{"history/v1-code.0-32.v"sv, "5100b4e1cb77a9a29c0cdf9f7f3e7276bc165edc"sv}, - Entry{"history/v1-code.32-48.v"sv, "6576a13980a969f79f26431dc14d99dcad625173"sv}, - Entry{"history/v1-code.48-56.v"sv, "4bcb893d057ff328dd18fabce7d9e98696b2a668"sv}, - Entry{"history/v1-code.56-60.v"sv, "3f0b7bdceaa5acf8c1adbb3cb8a5f0b65bc8b849"sv}, - Entry{"history/v1-receipt.0-32.v"sv, "a7c2443d758e1b80b575739d43a3d638c3a78a33"sv}, - Entry{"history/v1-receipt.32-40.v"sv, "0ec4c060bbda822684fd0bfaa51e9f89eb639960"sv}, - Entry{"history/v1-receipt.56-60.v"sv, "380a66243eb2ad4711c4eaabd91eebe24896539c"sv}, - Entry{"history/v1-storage.0-32.v"sv, "917f950fcf3978639f5c507c25461eaf5d048e11"sv}, - Entry{"history/v1-storage.32-48.v"sv, "920e68bb2fd3eac486f46603074668154b3b08ab"sv}, - Entry{"history/v1-storage.48-56.v"sv, "a92db08104d8081f79da87a4712af73309a67f8a"sv}, - Entry{"history/v1-storage.56-60.v"sv, "1a9a0ad1d405199a9d81ed0a59e91bd89bd19c9b"sv}, - Entry{"idx/v1-accounts.0-32.ef"sv, "5ec3f96b2f1d9bfe426ee98ba94229c85f3e9a9a"sv}, - Entry{"idx/v1-accounts.32-48.ef"sv, "70077fd9379cda34780130f7314ce41bbe21dbe3"sv}, - Entry{"idx/v1-accounts.48-56.ef"sv, "f50ddbbcfc0770347b03afa30b254cb8abcdfdde"sv}, - Entry{"idx/v1-accounts.56-60.ef"sv, "ec882ac81ce8f2885e3cbf87a5560780608458b9"sv}, - Entry{"idx/v1-code.0-32.ef"sv, "2b7b552954d9ff67bc6933c1799e00026bd25d75"sv}, - Entry{"idx/v1-code.32-48.ef"sv, "7251af93828d862dc0910d5bdce153fcd7c3373a"sv}, - Entry{"idx/v1-code.48-56.ef"sv, "cb3684744e3dffc6adc804d7a3a1e476e3776c39"sv}, - Entry{"idx/v1-code.56-60.ef"sv, "3ef05293f06821749fd41c1e404adc14a230db17"sv}, - Entry{"idx/v1-logaddrs.0-32.ef"sv, "7e854795d964847c6e125f1f7f7c86bb647c2dac"sv}, - Entry{"idx/v1-logaddrs.32-48.ef"sv, "68b3388617c0ca698ad8ef0fe7b0baa2460e2228"sv}, - Entry{"idx/v1-logaddrs.48-56.ef"sv, "5767edbbfc2e015da3d44ba935d775e376f83e15"sv}, - Entry{"idx/v1-logaddrs.56-60.ef"sv, "92a116452abcc9d0859da42221764add82a177e2"sv}, - Entry{"idx/v1-logtopics.0-32.ef"sv, "7b46db868266372c07d9653424f10bc3bf7c10f5"sv}, - Entry{"idx/v1-logtopics.32-48.ef"sv, "696076ea1d8baee5bb05d5abe10c5b770e9757a8"sv}, - Entry{"idx/v1-logtopics.48-56.ef"sv, "07ef43ce2befafd47a1f5b19390c40d8f60d4e3e"sv}, - Entry{"idx/v1-logtopics.56-60.ef"sv, "b0a3a52fc32c449117d6f604a4d5bb0fe92a4cc6"sv}, - Entry{"idx/v1-receipt.0-32.ef"sv, "112c62aad53858f1de858fa4a84bbc5d146f5460"sv}, - Entry{"idx/v1-receipt.32-40.ef"sv, "20ac8cee960496a3b7fd9d5bef7a18840a1accd0"sv}, + Entry{"accessor/v1-accounts.0-64.efi"sv, "49a676185187acbaeb78fc9eff08a781b8086baf"sv}, + Entry{"accessor/v1-accounts.0-64.vi"sv, "b80ddbc31871c358f72de107ba3321eb4faa1f02"sv}, + Entry{"accessor/v1-code.0-64.efi"sv, "19075e972a09c48c90d1c61587b038b6eaa7896d"sv}, + Entry{"accessor/v1-code.0-64.vi"sv, "48acf0d21bfca12fb391690725eec60b87c92f8a"sv}, + Entry{"accessor/v1-logaddrs.0-64.efi"sv, "389bced28d01929aa4339bcb965a0170e01c2b82"sv}, + Entry{"accessor/v1-logtopics.0-64.efi"sv, "cbfe6839a716e5f3195d770cd127574b997441bb"sv}, + Entry{"accessor/v1-receipt.0-64.efi"sv, "a210c217353f7507ce6fdae113330812eedcec53"sv}, + Entry{"accessor/v1-receipt.0-64.vi"sv, "114fc95bc4c33a24bd12f2f21d74ad01bd337aeb"sv}, + Entry{"accessor/v1-storage.0-64.efi"sv, "681514f318e12003ac785b4569043a7c307ba2eb"sv}, + Entry{"accessor/v1-storage.0-64.vi"sv, "142bf3068339f81dc95b57ef77ecce20464eab18"sv}, + Entry{"accessor/v1-tracesfrom.0-64.efi"sv, "6ce8597a924f44924310d53558221481a947d8ba"sv}, + Entry{"accessor/v1-tracesto.0-64.efi"sv, "4cc37f4f026f691270b126a1fb0dc66086aa41c1"sv}, + Entry{"domain/v1-accounts.0-64.bt"sv, "920c183ba941a26b159dcd356ab51f35a7f586fb"sv}, + Entry{"domain/v1-accounts.0-64.kv"sv, "74436bdac97ea7728e89ba0ee338e06b5468760b"sv}, + Entry{"domain/v1-accounts.0-64.kvei"sv, "e3500f0334e7841c59c9faac663b86c2cd4b58ce"sv}, + Entry{"domain/v1-code.0-64.bt"sv, "5d8c5f333add8f9346b8dcb91dafedc080d4bcb2"sv}, + Entry{"domain/v1-code.0-64.kv"sv, "f60be7ff12fecef80b1e8026136224c46adf562a"sv}, + Entry{"domain/v1-code.0-64.kvei"sv, "128cbfedc3a7e260fa74d7d82231a60a97ffd4f2"sv}, + Entry{"domain/v1-commitment.0-64.bt"sv, "6dea7ec4ba93a25a7330c66522f4d130a579258d"sv}, + Entry{"domain/v1-commitment.0-64.kv"sv, "d6ae56146fd720c8b33943d683d338405d6b66ff"sv}, + Entry{"domain/v1-commitment.0-64.kvei"sv, "976826f7b507cd38249d7a5d106d02a9024ddfd8"sv}, + Entry{"domain/v1-receipt.0-64.bt"sv, "f81e5d9d8a1c2a8703c56f38ab568189be4ace1c"sv}, + Entry{"domain/v1-receipt.0-64.kv"sv, "87f38d7d6dff1a2eff5edd737e2b74c09b335610"sv}, + Entry{"domain/v1-receipt.0-64.kvei"sv, "55d2a00d13f5a931500a79cc7e7989ec1c1a632c"sv}, + Entry{"domain/v1-storage.0-64.bt"sv, "f1f7cf95eb57a5d88dd37d3681ab046ee9ac6415"sv}, + Entry{"domain/v1-storage.0-64.kv"sv, "57a297b3a7c8e5d06151bf37e673fc22b9190dec"sv}, + Entry{"domain/v1-storage.0-64.kvei"sv, "77f5532392458db7e919ab4b0e4c20aed58f3e2e"sv}, + Entry{"history/v1-accounts.0-64.v"sv, "fddb2f72952dcfa2cb385b03192b336eee1b3cb5"sv}, + Entry{"history/v1-code.0-64.v"sv, "c4aaca5a20a1b7d79bd0aea213b40cc704b8046a"sv}, + Entry{"history/v1-receipt.0-64.v"sv, "e85ded3919849b95db3c14715603471970bb1952"sv}, + Entry{"history/v1-storage.0-64.v"sv, "973aec1f89deb6b6a21efa6459aeaed178411783"sv}, + Entry{"idx/v1-accounts.0-64.ef"sv, "d12a8cb302482c356067c43da329aec11a8440d4"sv}, + Entry{"idx/v1-code.0-64.ef"sv, "5d6649a4c94b42651f49d1aeb10784ffa6c138cf"sv}, + Entry{"idx/v1-logaddrs.0-64.ef"sv, "35484e8595323974f2b73114bcd9ec8a17ba7e11"sv}, + Entry{"idx/v1-logtopics.0-64.ef"sv, "cfa462c85cfb9ad2bae6f5d467600b818f5e6c55"sv}, + Entry{"idx/v1-receipt.0-64.ef"sv, "5f1ebda8a93d81eae2055128c4a6a96622331a04"sv}, Entry{"idx/v1-receipt.40-41.ef"sv, "4d06e7a825b5560fc95f6cd94ed326b2bc8991bf"sv}, - Entry{"idx/v1-receipt.56-60.ef"sv, "628499c123ba26110be3b4d31523385fa662d457"sv}, - Entry{"idx/v1-storage.0-32.ef"sv, "c2a1a6b0a2acd151b9a01e4ddf8d7433cffba102"sv}, - Entry{"idx/v1-storage.32-48.ef"sv, "5bbadba458ce17e683cdab26f680f2d4ad51ccb4"sv}, - Entry{"idx/v1-storage.48-56.ef"sv, "a06fbd5f412769516e0ed22fa9126185dc945446"sv}, - Entry{"idx/v1-storage.56-60.ef"sv, "902c45b17f37b45ccf0a8aae1b60c99b2dc7ec19"sv}, - Entry{"idx/v1-tracesfrom.0-32.ef"sv, "d40c3124638f39b90c1d03eabc206c6ccbc6742e"sv}, - Entry{"idx/v1-tracesfrom.32-48.ef"sv, "72adf69598f4da60c9180b80d80b719b585f5c90"sv}, - Entry{"idx/v1-tracesfrom.48-56.ef"sv, "a2163387955de104f50a5942746ebc10b9c691f8"sv}, - Entry{"idx/v1-tracesfrom.56-60.ef"sv, "351450261a84883ae5358321645f09e33cb8db93"sv}, - Entry{"idx/v1-tracesto.0-32.ef"sv, "3e862015cd88152098a03b7c329aabed8390c3e9"sv}, - Entry{"idx/v1-tracesto.32-48.ef"sv, "46b44b4301c2e63ae48de6c7de07f87c63d94381"sv}, - Entry{"idx/v1-tracesto.48-56.ef"sv, "efb5b9fe8b134126900f6ca65a94a40351e4683e"sv}, - Entry{"idx/v1-tracesto.56-60.ef"sv, "588f4c239186e7d762138cfc5bd9d081d27fad23"sv}, + Entry{"idx/v1-storage.0-64.ef"sv, "1d5acb9ff64fb7721581479e457d32ce87b9d3f2"sv}, + Entry{"idx/v1-tracesfrom.0-64.ef"sv, "00803ec9c6eb333d632fb6716fc35e99c8b85a1a"sv}, + Entry{"idx/v1-tracesto.0-64.ef"sv, "0f4961104b97f48ddc94ee381524eeca43054c15"sv}, Entry{"salt-blocks.txt"sv, "de6d558e79c68a43d54eadd0456473ce8dd864f6"sv}, Entry{"salt-state.txt"sv, "0113ec56c7c0d72783dbb5738becffa9c4c43d69"sv}, Entry{"v1-000000-000100-bodies.idx"sv, "cbd1d0d89809f19535e6e95d6432aa024dcd1a19"sv}, @@ -234,6 +124,18 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-000900-001000-transactions-to-block.idx"sv, "e6112b74dd3ded0fc41c84dea9f76ce710ac34c3"sv}, Entry{"v1-000900-001000-transactions.idx"sv, "025fe9d8d91f988e372008fc262c06e1daa13120"sv}, Entry{"v1-000900-001000-transactions.seg"sv, "97ecc39af0ec1ae3f659f3cb9fe9d7b2fc8167b6"sv}, + Entry{"v1-000950-000960-blobsidecars.seg"sv, "3245acf6de1575d223de71686ba3b44400d9eb95"sv}, + Entry{"v1-000950-000960-blocksidecars.idx"sv, "c88f08e1807712fb39ac8e543c9e15ffdcae437d"sv}, + Entry{"v1-000960-000970-blobsidecars.seg"sv, "07a540fa91a7a16207cc74330262c9c011bf7b01"sv}, + Entry{"v1-000960-000970-blocksidecars.idx"sv, "2e790a62f6ec4b60694cb73b711deb904000e320"sv}, + Entry{"v1-000970-000980-blobsidecars.seg"sv, "07d4aaf2de70d7eefaadbe74a1bdbe917809be9b"sv}, + Entry{"v1-000970-000980-blocksidecars.idx"sv, "b7b6e4923ee164c136687d2816f01314527827b3"sv}, + Entry{"v1-000980-000990-blobsidecars.seg"sv, "8d6c14703ea0bff30691bf14fbd1c475b4614cf1"sv}, + Entry{"v1-000980-000990-blocksidecars.idx"sv, "ab34d7ee7b93ffab2f4f006c1f1294f307610774"sv}, + Entry{"v1-000990-001000-blobsidecars.seg"sv, "ae5a9c150ae7d5a1f06730576cd221deac030437"sv}, + Entry{"v1-000990-001000-blocksidecars.idx"sv, "9305765a823ec9888b311c04b24070f644fbd210"sv}, + Entry{"v1-001000-001010-blobsidecars.seg"sv, "bff304a50230f3ae2527bf1d3e1b26c477149067"sv}, + Entry{"v1-001000-001010-blocksidecars.idx"sv, "4148f86d2f3034ed607d46b28aa4b300b6429c13"sv}, Entry{"v1-001000-001100-bodies.idx"sv, "d484e5f8b4d43ca93a77931d59fa6edf5723342f"sv}, Entry{"v1-001000-001100-bodies.seg"sv, "5e90a7367e039cf78083a1995829c3c420268c14"sv}, Entry{"v1-001000-001100-headers.idx"sv, "e026a2cb6326d32a0a2a4dc718e5ecb06ada0e45"sv}, @@ -241,6 +143,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-001000-001100-transactions-to-block.idx"sv, "f253187f304bc5a4cb697775918ab4c5ddaebd8c"sv}, Entry{"v1-001000-001100-transactions.idx"sv, "522c214d230f17f858a1ac3a9eb11642bcfb49d8"sv}, Entry{"v1-001000-001100-transactions.seg"sv, "a3c0ab1e28b87ad763051366422281b283fbead1"sv}, + Entry{"v1-001010-001020-blobsidecars.seg"sv, "0a220011969d7455493fa8c735e528857f8772cc"sv}, + Entry{"v1-001010-001020-blocksidecars.idx"sv, "35820d6334d77c1c84240124e7f8c3b84e50d042"sv}, + Entry{"v1-001020-001030-blobsidecars.seg"sv, "3928f4de0a14497d1ca51c1d3b9c0a712172e7c6"sv}, + Entry{"v1-001020-001030-blocksidecars.idx"sv, "54686c432d8f9690befa9852f5fac253460b0985"sv}, + Entry{"v1-001030-001040-blobsidecars.seg"sv, "df53b528d89a3da3d910c043d6ad0a52ed2240eb"sv}, + Entry{"v1-001030-001040-blocksidecars.idx"sv, "daf127fdd5d3714571083e2abd57ee1a39b11989"sv}, + Entry{"v1-001040-001050-blobsidecars.seg"sv, "fef46dc087263da54485716147ca32154698e209"sv}, + Entry{"v1-001040-001050-blocksidecars.idx"sv, "adf0e14dacd5a0e10b26f4d15d3ea939933f31ed"sv}, + Entry{"v1-001050-001060-blobsidecars.seg"sv, "06cc467b812027e9e481e4c27f3b87f192374c0d"sv}, + Entry{"v1-001050-001060-blocksidecars.idx"sv, "54be1b1fbc1d995e7592950e0e2ae86cdd45d928"sv}, + Entry{"v1-001060-001070-blobsidecars.seg"sv, "03f08de66d3503ecaaeb735bcd387da3d2c314db"sv}, + Entry{"v1-001060-001070-blocksidecars.idx"sv, "56709cb1d19ee49b29e1631d0999c115b145f953"sv}, + Entry{"v1-001070-001080-blobsidecars.seg"sv, "9b8dbcf4a17375b45f4d2a98db04f5ae08c906b8"sv}, + Entry{"v1-001070-001080-blocksidecars.idx"sv, "4526d4aaa3e0c4ef82e961fa9c790fdc6392b277"sv}, + Entry{"v1-001080-001090-blobsidecars.seg"sv, "e574e25eb76635eae5c52e992402a2f5a5803a0c"sv}, + Entry{"v1-001080-001090-blocksidecars.idx"sv, "a0ee4f7bf662126d69ee5db7415a1cca5056517d"sv}, + Entry{"v1-001090-001100-blobsidecars.seg"sv, "7e9b465400875c872f3f09e1b6a1f0181e0dded7"sv}, + Entry{"v1-001090-001100-blocksidecars.idx"sv, "1e66d7dee3ca8a506ba35631020a36fd26418d1c"sv}, + Entry{"v1-001100-001110-blobsidecars.seg"sv, "bd7f27b036b453ba05dbcff1d99ea6403f6fba59"sv}, + Entry{"v1-001100-001110-blocksidecars.idx"sv, "4a8f8de57e8fabe7e389542edadc471dd191e4b0"sv}, Entry{"v1-001100-001200-bodies.idx"sv, "1b80bd9697e5eda094a4b538cbf913a09cf54e2a"sv}, Entry{"v1-001100-001200-bodies.seg"sv, "0507b34158db060c0fc5b3d305cc83a0efe486fd"sv}, Entry{"v1-001100-001200-headers.idx"sv, "49755c8458dd93ffd6c21c155f91de4a1d1ada40"sv}, @@ -248,6 +170,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-001100-001200-transactions-to-block.idx"sv, "cb5c4bbb7e3d208922029a52ae07363ec7437738"sv}, Entry{"v1-001100-001200-transactions.idx"sv, "613d390962ae07493e86deb3d3d46aee527ae0fc"sv}, Entry{"v1-001100-001200-transactions.seg"sv, "733e456da820bcd7cf0549eb77204f63fd1fe5ad"sv}, + Entry{"v1-001110-001120-blobsidecars.seg"sv, "1ec2c31f6a1df3bd1e53d7fbad1a79d168b6692c"sv}, + Entry{"v1-001110-001120-blocksidecars.idx"sv, "e5dee863034c467323df75882876cf5332ae8b59"sv}, + Entry{"v1-001120-001130-blobsidecars.seg"sv, "898afc5259735635bbdd7430d29ee978d5493933"sv}, + Entry{"v1-001120-001130-blocksidecars.idx"sv, "9bf30e4d366900a16ccc9a95f5d0c1f31b882ed6"sv}, + Entry{"v1-001130-001140-blobsidecars.seg"sv, "cc188588da835622dd2537376079ddfbfba8d16e"sv}, + Entry{"v1-001130-001140-blocksidecars.idx"sv, "89d86ae1bf4e70f67dbed3f9c0df32c675de3ccb"sv}, + Entry{"v1-001140-001150-blobsidecars.seg"sv, "158f28b0636442ff00e6950d104f8b31d4cb35a6"sv}, + Entry{"v1-001140-001150-blocksidecars.idx"sv, "949eac6d27ff4c751bd30198e41874ad5b030984"sv}, + Entry{"v1-001150-001160-blobsidecars.seg"sv, "0c652b5c50429cfa59a1afa240eaee646bdc13c6"sv}, + Entry{"v1-001150-001160-blocksidecars.idx"sv, "4ecc47bf2de361024da106c288bbd390a59e7318"sv}, + Entry{"v1-001160-001170-blobsidecars.seg"sv, "2e3e453e874676873ac7795e0e5d1caea286bcf1"sv}, + Entry{"v1-001160-001170-blocksidecars.idx"sv, "af061498f9a7a7fb98f7b509afe38e990d1f322c"sv}, + Entry{"v1-001170-001180-blobsidecars.seg"sv, "6671835ca7e6acea83a06355b4b2472ea3b8572b"sv}, + Entry{"v1-001170-001180-blocksidecars.idx"sv, "ba72dce9d8e98c071ebd0847cb5ef38cb538f83c"sv}, + Entry{"v1-001180-001190-blobsidecars.seg"sv, "39f12ef10bbc104f5ea6ebb287e295b0860d2424"sv}, + Entry{"v1-001180-001190-blocksidecars.idx"sv, "1d318e1b0fc24076e683c1ab379f3c41316797a4"sv}, + Entry{"v1-001190-001200-blobsidecars.seg"sv, "c9c00aed38c15a81e32369c7c1781c7970691d9c"sv}, + Entry{"v1-001190-001200-blocksidecars.idx"sv, "0d92f262b79446624fac9073d6adb9a0d96da763"sv}, + Entry{"v1-001200-001210-blobsidecars.seg"sv, "4401428054b5b846f9af592760ee3f4fd6273064"sv}, + Entry{"v1-001200-001210-blocksidecars.idx"sv, "41647b72b8038983290d3dc8d06651950d49dac2"sv}, Entry{"v1-001200-001300-bodies.idx"sv, "beb953f5f6818275d58bffc66ba52557069aa775"sv}, Entry{"v1-001200-001300-bodies.seg"sv, "35099ff69ff5844d182cec6aa382480f38e6313f"sv}, Entry{"v1-001200-001300-headers.idx"sv, "499008f76d3a974da06279ff698509c5a2f792bc"sv}, @@ -255,6 +197,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-001200-001300-transactions-to-block.idx"sv, "cde14ab5bcb9bd0610a0d8d36f0b44e5940eeea3"sv}, Entry{"v1-001200-001300-transactions.idx"sv, "7b5728ed87399ea210c9aefb759a5e485f031daa"sv}, Entry{"v1-001200-001300-transactions.seg"sv, "dc018f1493254b0376292dd7cdc23c23ae8123f7"sv}, + Entry{"v1-001210-001220-blobsidecars.seg"sv, "6e175b70e203c924fd87803948e4306f2a6ff0f6"sv}, + Entry{"v1-001210-001220-blocksidecars.idx"sv, "bddb107daf1d188234f428844c6084eaf4bbd14c"sv}, + Entry{"v1-001220-001230-blobsidecars.seg"sv, "c12ff1508637e6d6716113daf0a3f255cc562e18"sv}, + Entry{"v1-001220-001230-blocksidecars.idx"sv, "8453e12bee7bad1d7f1da87102c18a845040d520"sv}, + Entry{"v1-001230-001240-blobsidecars.seg"sv, "59985d91e7f4a38f66866a6296ac03feca40b476"sv}, + Entry{"v1-001230-001240-blocksidecars.idx"sv, "6f1edcdd7dd751ca6d763d1289fc404d8c58c554"sv}, + Entry{"v1-001240-001250-blobsidecars.seg"sv, "ffedae1df522f2b7f8023b990bae9803d36e89a3"sv}, + Entry{"v1-001240-001250-blocksidecars.idx"sv, "714fd4f75a8e5db05e842976f2813bb2a45c1c8b"sv}, + Entry{"v1-001250-001260-blobsidecars.seg"sv, "0aa3aa55b4be190e6f4ce51c88c9d5f7edd24c62"sv}, + Entry{"v1-001250-001260-blocksidecars.idx"sv, "c41621e2b79dc88686a25265d1479e0714f94622"sv}, + Entry{"v1-001260-001270-blobsidecars.seg"sv, "31c709a5cc0ee725fa484c85ac0df39f3222cc07"sv}, + Entry{"v1-001260-001270-blocksidecars.idx"sv, "ed64132ded52d45bba6d4cdfd6480d5316fa00b8"sv}, + Entry{"v1-001270-001280-blobsidecars.seg"sv, "33d10a0fc7149e8591b38fc2c8a295995b669fdd"sv}, + Entry{"v1-001270-001280-blocksidecars.idx"sv, "659b8769b562ec77afda647abd30a26f6d13f1a9"sv}, + Entry{"v1-001280-001290-blobsidecars.seg"sv, "1b998d433064b6cec9359b52aa1ab901f4a09b9f"sv}, + Entry{"v1-001280-001290-blocksidecars.idx"sv, "efb80b8b3072c3f64a0f4fa63bc4f3c67cb693c2"sv}, + Entry{"v1-001290-001300-blobsidecars.seg"sv, "21a7b06ac44296691963380de942b498e0c9ceb8"sv}, + Entry{"v1-001290-001300-blocksidecars.idx"sv, "9f122218c13a81edd34605a95b02b65868e8c8d7"sv}, + Entry{"v1-001300-001310-blobsidecars.seg"sv, "20ade2c21d6e7b222f4f049e17023e28c5ee9920"sv}, + Entry{"v1-001300-001310-blocksidecars.idx"sv, "d9845ec804276a60ed833508adb66f78754f90f9"sv}, Entry{"v1-001300-001400-bodies.idx"sv, "67bcd6280c407872052f3ff167ab412e9b5413ad"sv}, Entry{"v1-001300-001400-bodies.seg"sv, "3e4e2dd1b7e3e336d69b716e0d11e292623d2f0e"sv}, Entry{"v1-001300-001400-headers.idx"sv, "7b8c5ee9fb02a9392f0ac6cd4f71f336b629f12d"sv}, @@ -262,6 +224,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-001300-001400-transactions-to-block.idx"sv, "9a6db0e64345f30aa960567368c6fd44f69e786d"sv}, Entry{"v1-001300-001400-transactions.idx"sv, "767cd11a4aad3214634a9015431462ac4c82523b"sv}, Entry{"v1-001300-001400-transactions.seg"sv, "f5a81bfb552501975047859ffc47992be6ae0089"sv}, + Entry{"v1-001310-001320-blobsidecars.seg"sv, "1899da9f4051d7482b51f1bedf8a1b58467c99dd"sv}, + Entry{"v1-001310-001320-blocksidecars.idx"sv, "6ef5ccd2d7eaac9d48dcbedde786913de60e6358"sv}, + Entry{"v1-001320-001330-blobsidecars.seg"sv, "9ecd1df2e8b860237ce77d28001d013d2a2e8d5d"sv}, + Entry{"v1-001320-001330-blocksidecars.idx"sv, "a2c33e5b69cb468849cc61afd43f8a2fe5619ee4"sv}, + Entry{"v1-001330-001340-blobsidecars.seg"sv, "1634d0a747e2854ee237f03968dd5d1d72d3c9b4"sv}, + Entry{"v1-001330-001340-blocksidecars.idx"sv, "16dc5412d5f7727131f2f011e13daae3b6517464"sv}, + Entry{"v1-001340-001350-blobsidecars.seg"sv, "e2e957962a1794a2c321e437bbee81b99e3f70d6"sv}, + Entry{"v1-001340-001350-blocksidecars.idx"sv, "47049f850bd43508f23b89ed20ed406c8a2090c3"sv}, + Entry{"v1-001350-001360-blobsidecars.seg"sv, "77fbf361cf615f1c3975fa60876d36b376893b1f"sv}, + Entry{"v1-001350-001360-blocksidecars.idx"sv, "64cc4db56a0f2acc4908641418f958cdbdd93ec9"sv}, + Entry{"v1-001360-001370-blobsidecars.seg"sv, "182bc4e93b96628cb8acef8f9a581191a662e9ab"sv}, + Entry{"v1-001360-001370-blocksidecars.idx"sv, "a6239e96ccde1e7c4c0559a8b42b583ad1aed39d"sv}, + Entry{"v1-001370-001380-blobsidecars.seg"sv, "efc0ccb98dccade3ec3a215aaad4009810ca6455"sv}, + Entry{"v1-001370-001380-blocksidecars.idx"sv, "9ef98fd1bf85d835857611c6cf0619a76fdd103f"sv}, + Entry{"v1-001380-001390-blobsidecars.seg"sv, "faf8dea5b0c4259383dfb5f7df58c5c776b32f40"sv}, + Entry{"v1-001380-001390-blocksidecars.idx"sv, "1b4efa692083017ad046e3559e6b7233551d402e"sv}, + Entry{"v1-001390-001400-blobsidecars.seg"sv, "8fd98a6e55eefb46f3bb329be97604224adc6908"sv}, + Entry{"v1-001390-001400-blocksidecars.idx"sv, "b34308a184a0ad3e43869ee80035ddad0a61b63a"sv}, + Entry{"v1-001400-001410-blobsidecars.seg"sv, "a057046f8bb0a7ffc574f185a65da6d41f9cc24b"sv}, + Entry{"v1-001400-001410-blocksidecars.idx"sv, "65d03e37f171b79a568bfed97215e32951231981"sv}, Entry{"v1-001400-001500-bodies.idx"sv, "00e795b2ed7b1a178860b28fcf6e0811fb78f18e"sv}, Entry{"v1-001400-001500-bodies.seg"sv, "c9745722091016f28806c69343b2dfaa936a4e44"sv}, Entry{"v1-001400-001500-headers.idx"sv, "cba0d434cd0b2dc286e81e33ab33a0592890cfe8"sv}, @@ -269,6 +251,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-001400-001500-transactions-to-block.idx"sv, "3c15492c868196b8b9811f083636f0ebcd93bd45"sv}, Entry{"v1-001400-001500-transactions.idx"sv, "7559fad3c74ac634a0dfec8190759560e66b53ec"sv}, Entry{"v1-001400-001500-transactions.seg"sv, "26487c4fca2eb8626cff875c00c24c64f7760c26"sv}, + Entry{"v1-001410-001420-blobsidecars.seg"sv, "98aa777767b47a6bc104628db2934301312c5c55"sv}, + Entry{"v1-001410-001420-blocksidecars.idx"sv, "8acf515f27e79ac98b8bea25c800e70523ac0e2d"sv}, + Entry{"v1-001420-001430-blobsidecars.seg"sv, "c64547caeeb2e58180d4576af6335f09c010681b"sv}, + Entry{"v1-001420-001430-blocksidecars.idx"sv, "d0ae1e0d1a42fb9c65eff9c550f4ce5f94a5d1cc"sv}, + Entry{"v1-001430-001440-blobsidecars.seg"sv, "e2e3b40981aea29642deb894e5cf36291d6398af"sv}, + Entry{"v1-001430-001440-blocksidecars.idx"sv, "299feef716c5415cc8862605a42dd4b165e6d878"sv}, + Entry{"v1-001440-001450-blobsidecars.seg"sv, "5d7e801a2b82914b1bea84b53ba35f1fd0cb4f23"sv}, + Entry{"v1-001440-001450-blocksidecars.idx"sv, "3c4668e62d15eb4493097199bfec1a4fb27f53bc"sv}, + Entry{"v1-001450-001460-blobsidecars.seg"sv, "566b3b85268c15223c257722ac98c7d38bd8b8f5"sv}, + Entry{"v1-001450-001460-blocksidecars.idx"sv, "c2d9160e19db064393ac8441e607ad6dc30f82b8"sv}, + Entry{"v1-001460-001470-blobsidecars.seg"sv, "fcd6d556d05baaac91a0fa1cb55e635911fa2a43"sv}, + Entry{"v1-001460-001470-blocksidecars.idx"sv, "2a692ac8e040dda7e085bd82d39df43b74cf2eac"sv}, + Entry{"v1-001470-001480-blobsidecars.seg"sv, "6eb122b33484583a98af8236cb3a798b0918f588"sv}, + Entry{"v1-001470-001480-blocksidecars.idx"sv, "c7ea92ef4b33526563d73b4b9ce0e7ce684ae037"sv}, + Entry{"v1-001480-001490-blobsidecars.seg"sv, "04fd3b2e5e1215c26b0c37088690d9c1966aaf42"sv}, + Entry{"v1-001480-001490-blocksidecars.idx"sv, "c2ace1b5d18cd2392bf71aa614a534473fa2d8ce"sv}, + Entry{"v1-001490-001500-blobsidecars.seg"sv, "61121a4b8d6dfb989012ea95d71ef5115803b90b"sv}, + Entry{"v1-001490-001500-blocksidecars.idx"sv, "675aad14f78765f236c423893c0f58d91955a8b6"sv}, + Entry{"v1-001500-001510-blobsidecars.seg"sv, "f3366ba67f9756e877b01274bb0d756c1d19289d"sv}, + Entry{"v1-001500-001510-blocksidecars.idx"sv, "529100b5a4681d34e24c5e59865abac46286426d"sv}, Entry{"v1-001500-001600-bodies.idx"sv, "c37f5320391a39f6d6abe4ab35a43ffa313caa28"sv}, Entry{"v1-001500-001600-bodies.seg"sv, "4628113073bf631798db28f30a0b88f3b11ed88f"sv}, Entry{"v1-001500-001600-headers.idx"sv, "b5e65f3d597b834d2cfe1e1481388c9a7346e40f"sv}, @@ -276,6 +278,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-001500-001600-transactions-to-block.idx"sv, "002bd18956948c57e728bb3f005e80d33cbc04a6"sv}, Entry{"v1-001500-001600-transactions.idx"sv, "2216508b58f8f271f9a6255525954e03b8ba9067"sv}, Entry{"v1-001500-001600-transactions.seg"sv, "8bba6b32f480c6565eefcece81121fc63499dd5b"sv}, + Entry{"v1-001510-001520-blobsidecars.seg"sv, "70a72d30a7d4cf253358040c54de53248d06280d"sv}, + Entry{"v1-001510-001520-blocksidecars.idx"sv, "31a4258429cbc8186afefbaf7f5b6c57dec4421d"sv}, + Entry{"v1-001520-001530-blobsidecars.seg"sv, "803b972cdf8d13a7143ca6f5610b218cddc8f1fb"sv}, + Entry{"v1-001520-001530-blocksidecars.idx"sv, "63a938a6031778263ebc0bca34291b403e6c315b"sv}, + Entry{"v1-001530-001540-blobsidecars.seg"sv, "48106016825142eacc8512a13a22e144eb9b50c7"sv}, + Entry{"v1-001530-001540-blocksidecars.idx"sv, "e9f8c6cc2e70b4757d39a69351886e071753336d"sv}, + Entry{"v1-001540-001550-blobsidecars.seg"sv, "081196b276c7d9e8f7ae0a9445e546d4e4bc27ae"sv}, + Entry{"v1-001540-001550-blocksidecars.idx"sv, "6466e7a46031ed8b3e65c26d19fc30fe47b7aae0"sv}, + Entry{"v1-001550-001560-blobsidecars.seg"sv, "4acfe7bcd4e34a3a2060dca06444f9567a2219f2"sv}, + Entry{"v1-001550-001560-blocksidecars.idx"sv, "842b9558437c031daced7b9dfd36eb5ec825db24"sv}, + Entry{"v1-001560-001570-blobsidecars.seg"sv, "854a122722d15b9ed6331bd8f49e778e75bf0da7"sv}, + Entry{"v1-001560-001570-blocksidecars.idx"sv, "09288f775c73ffc7234e019b3f9c000090f74b96"sv}, + Entry{"v1-001570-001580-blobsidecars.seg"sv, "5aa37325fb1eddd1915bd13fc755ac1e09844594"sv}, + Entry{"v1-001570-001580-blocksidecars.idx"sv, "f0c27f63406b7cc7eda5428264c69e7bee6a3527"sv}, + Entry{"v1-001580-001590-blobsidecars.seg"sv, "751bae1b80755495997dc346115a567d4a297171"sv}, + Entry{"v1-001580-001590-blocksidecars.idx"sv, "987f6469691b5aec99e27bbaecea88e1b3956f91"sv}, + Entry{"v1-001590-001600-blobsidecars.seg"sv, "b8d2b662aba32362c1482c1ee7345170bee1056c"sv}, + Entry{"v1-001590-001600-blocksidecars.idx"sv, "015de4b10c498ffb91ecfb5a1138945382d3358a"sv}, + Entry{"v1-001600-001610-blobsidecars.seg"sv, "65e811744df0859e5ad26124a51f89a73e52f64f"sv}, + Entry{"v1-001600-001610-blocksidecars.idx"sv, "b8c3df47ca4e5dbd24b2c37352404c5a7b3dd8cd"sv}, Entry{"v1-001600-001700-bodies.idx"sv, "a9203fd627e0adaec89f0f4b47f0dd7291940831"sv}, Entry{"v1-001600-001700-bodies.seg"sv, "03ec457b8dabe3b55cba1b52d15f91c248f26040"sv}, Entry{"v1-001600-001700-headers.idx"sv, "cc8396cd38ae6528fad28f70b39e9b8651a359f3"sv}, @@ -283,6 +305,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-001600-001700-transactions-to-block.idx"sv, "7790b80e5a6b3727b024f39a2cccabc127cb68b8"sv}, Entry{"v1-001600-001700-transactions.idx"sv, "95783f2d0a424c2e2ff2b7dc2879205ef8b82b3f"sv}, Entry{"v1-001600-001700-transactions.seg"sv, "d5d935c112f29f3f3219a0b66f78e81c49d41796"sv}, + Entry{"v1-001610-001620-blobsidecars.seg"sv, "ac22ea2ab04faf520ee9c4de02a52eb7fd9bcaae"sv}, + Entry{"v1-001610-001620-blocksidecars.idx"sv, "402857fbfe7ac9bd5758969ab12234d9269f1844"sv}, + Entry{"v1-001620-001630-blobsidecars.seg"sv, "12f5bf9da79587fa33979f7ba3e198a3177544d7"sv}, + Entry{"v1-001620-001630-blocksidecars.idx"sv, "0feaf4534be894cb1467a7afe965866a3f4d8225"sv}, + Entry{"v1-001630-001640-blobsidecars.seg"sv, "bf5ab1e9d3d662b2bb8cb89e8f278a4fd974cca4"sv}, + Entry{"v1-001630-001640-blocksidecars.idx"sv, "000f4010810013fe5868f306e52fca548c40de8b"sv}, + Entry{"v1-001640-001650-blobsidecars.seg"sv, "2fd6b78c81c0b0c360a753d2039ae4fe88d520e2"sv}, + Entry{"v1-001640-001650-blocksidecars.idx"sv, "f051a61539c1539f91df3cefa2ed48d210eb93fe"sv}, + Entry{"v1-001650-001660-blobsidecars.seg"sv, "f508a5c450910d65b5593e7b1cafb97092d50af9"sv}, + Entry{"v1-001650-001660-blocksidecars.idx"sv, "c075abb6785032f23b30e6080c75d195248242e4"sv}, + Entry{"v1-001660-001670-blobsidecars.seg"sv, "4abdc600caa380beaf62e0096a35e0b5162e6a7c"sv}, + Entry{"v1-001660-001670-blocksidecars.idx"sv, "78543c0721cce32a1648e4aeb4dff8cb7f078003"sv}, + Entry{"v1-001670-001680-blobsidecars.seg"sv, "e328fc047bafe4ddfa2e1030aee1023518a98b72"sv}, + Entry{"v1-001670-001680-blocksidecars.idx"sv, "f9ce3aca1ce19340fcbed6ec9150b02075978d0b"sv}, + Entry{"v1-001680-001690-blobsidecars.seg"sv, "2a1170a41c8490fe8373a8c4ecdbcbe2760f6fab"sv}, + Entry{"v1-001680-001690-blocksidecars.idx"sv, "2587d51de3f801f37678f4acc618d528c9d6d13d"sv}, + Entry{"v1-001690-001700-blobsidecars.seg"sv, "f73258e54a1f20c57239ab96ce1ab2450b73127f"sv}, + Entry{"v1-001690-001700-blocksidecars.idx"sv, "63b5f8695efbb68a7df183ac5a1cc7a7c3228fcd"sv}, + Entry{"v1-001700-001710-blobsidecars.seg"sv, "22429d41323038ce5016e3311fd1088bb4d79657"sv}, + Entry{"v1-001700-001710-blocksidecars.idx"sv, "90b652a70405ebe1f65687273a46fb6e4ffece27"sv}, Entry{"v1-001700-001800-bodies.idx"sv, "5f7e3fc20cca4fc4f529b3172baed0bbb8997c9d"sv}, Entry{"v1-001700-001800-bodies.seg"sv, "a60706480aebeb074067c364d537ef4c3f12b8c8"sv}, Entry{"v1-001700-001800-headers.idx"sv, "64ed787317371b8435db8cc7e130daf44bdfa6d2"sv}, @@ -290,6 +332,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-001700-001800-transactions-to-block.idx"sv, "9299c9f5a71840f1878c06851b572abcf0746b1b"sv}, Entry{"v1-001700-001800-transactions.idx"sv, "524e573ee482e578218e2e42f70356e637a96707"sv}, Entry{"v1-001700-001800-transactions.seg"sv, "00c0b965c4c572b8175e40bc0435d2226adc329f"sv}, + Entry{"v1-001710-001720-blobsidecars.seg"sv, "407120866f674a61d519db35bc594da9d9bf2c13"sv}, + Entry{"v1-001710-001720-blocksidecars.idx"sv, "1cd7e9114bd5304f2abb30a106577ee5950c30ed"sv}, + Entry{"v1-001720-001730-blobsidecars.seg"sv, "557b8c72ef855853be889992c1ce78292b967234"sv}, + Entry{"v1-001720-001730-blocksidecars.idx"sv, "2fe3615f053fe121864ecb045495d1636c3fdc64"sv}, + Entry{"v1-001730-001740-blobsidecars.seg"sv, "a47c9203eadec742307ba1c802c9e37ff81ea1e3"sv}, + Entry{"v1-001730-001740-blocksidecars.idx"sv, "8307ab45dfc4b8ec881d246309dcbd82da280086"sv}, + Entry{"v1-001740-001750-blobsidecars.seg"sv, "d0b7b0dc966742bee9139b72eb97701cf291e83c"sv}, + Entry{"v1-001740-001750-blocksidecars.idx"sv, "342d8acb3d607953f735017e6f19f0af46e66823"sv}, + Entry{"v1-001750-001760-blobsidecars.seg"sv, "77a01604a79bd75ca7223cc82a7a5e297eb04d36"sv}, + Entry{"v1-001750-001760-blocksidecars.idx"sv, "a6e5db54e4d07ee4ce6d70523373355c6c27e687"sv}, + Entry{"v1-001760-001770-blobsidecars.seg"sv, "27e8d751a3899be11cfb6febeda00bc8b44805ca"sv}, + Entry{"v1-001760-001770-blocksidecars.idx"sv, "2f3b643e2c475abad3dcc31921f4ce7f51eb82eb"sv}, + Entry{"v1-001770-001780-blobsidecars.seg"sv, "0aba172b0d9d8e55372ad6bae0a3c108f164ee7e"sv}, + Entry{"v1-001770-001780-blocksidecars.idx"sv, "a5cbefb346432f047cedc72fb0610d050dc318e1"sv}, + Entry{"v1-001780-001790-blobsidecars.seg"sv, "6e4b99b00aa70bf87ab78b4b36a3af1f493e31bc"sv}, + Entry{"v1-001780-001790-blocksidecars.idx"sv, "25ccab354aa4dfcdd92fdc9d70bbe52d1836ae8c"sv}, + Entry{"v1-001790-001800-blobsidecars.seg"sv, "07dfdb0aa00fd67c30ce7096a6811b682d45fa8d"sv}, + Entry{"v1-001790-001800-blocksidecars.idx"sv, "22598a3afaa0e38e4bdb8a6e79a46236b96c947f"sv}, + Entry{"v1-001800-001810-blobsidecars.seg"sv, "d568ceb44b4969dce2d48d5b92ab4f1f8e41f944"sv}, + Entry{"v1-001800-001810-blocksidecars.idx"sv, "24749414093b65d3bfeaf3a3c0e7ba087fb603d0"sv}, Entry{"v1-001800-001900-bodies.idx"sv, "52ffe04e152c6ffdbc7f45f2eafd508d6244f034"sv}, Entry{"v1-001800-001900-bodies.seg"sv, "248aa2abb567edcd88efe57427be32142da10b81"sv}, Entry{"v1-001800-001900-headers.idx"sv, "e237a4505db28200235461bbc12b6498f2b75c55"sv}, @@ -297,6 +359,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-001800-001900-transactions-to-block.idx"sv, "0865307e512b15d93a8364bf61513c6e1168c1c3"sv}, Entry{"v1-001800-001900-transactions.idx"sv, "3d1bf9c627abc704742752dccda422be8282ef0b"sv}, Entry{"v1-001800-001900-transactions.seg"sv, "f957645610b6a0b8848a292f26c6862224638f01"sv}, + Entry{"v1-001810-001820-blobsidecars.seg"sv, "5c7ee12991ee47280dc859d9dcb854909ce87a6e"sv}, + Entry{"v1-001810-001820-blocksidecars.idx"sv, "e52014d32736f76b0b2b25bd8993b2f2651faff0"sv}, + Entry{"v1-001820-001830-blobsidecars.seg"sv, "f376ebc2c93af1e16501ce6c01e882020646d0fb"sv}, + Entry{"v1-001820-001830-blocksidecars.idx"sv, "8b8572c8e6a7822d1f365a9ca6cea0fd0cc915f4"sv}, + Entry{"v1-001830-001840-blobsidecars.seg"sv, "0553b6880ae898ce57388c1f1971760cd36cfbd1"sv}, + Entry{"v1-001830-001840-blocksidecars.idx"sv, "41462e6542ae4630cdad290c3983a027d92fa8d5"sv}, + Entry{"v1-001840-001850-blobsidecars.seg"sv, "87ce6ced26660c83970ff87bc2bfce457314f1e7"sv}, + Entry{"v1-001840-001850-blocksidecars.idx"sv, "60fcc5e559d02ab09200a6e6a13aa7d637b7b7de"sv}, + Entry{"v1-001850-001860-blobsidecars.seg"sv, "85ebd95b1e3e048163d6efc6fe92cad33db1d5c7"sv}, + Entry{"v1-001850-001860-blocksidecars.idx"sv, "22ef90247dde6469a831893e162819ef62dab32b"sv}, + Entry{"v1-001860-001870-blobsidecars.seg"sv, "4507d4a3e84e7433af538095988788345471d334"sv}, + Entry{"v1-001860-001870-blocksidecars.idx"sv, "350a50dac241419a7432166d3858d54cc9cb8af5"sv}, + Entry{"v1-001870-001880-blobsidecars.seg"sv, "b15ae59f13794adf627211b4bdba44dd51fd519f"sv}, + Entry{"v1-001870-001880-blocksidecars.idx"sv, "42c3a52ac717658c4cb97b9674b9bcc205e25b59"sv}, + Entry{"v1-001880-001890-blobsidecars.seg"sv, "3c5cb389234e1e352bf02004b0a58793e688a111"sv}, + Entry{"v1-001880-001890-blocksidecars.idx"sv, "9c6b9e78b327274eeaa403a05a51edc27378bea1"sv}, + Entry{"v1-001890-001900-blobsidecars.seg"sv, "8c3a48eb8fce67dba5b8d9c6baacf5a9ccd1c649"sv}, + Entry{"v1-001890-001900-blocksidecars.idx"sv, "99a689f104b4595072dbecf2661f8f18f00cd489"sv}, + Entry{"v1-001900-001910-blobsidecars.seg"sv, "0db6e4301483fedc4cbe3d4451eb604c7802396b"sv}, + Entry{"v1-001900-001910-blocksidecars.idx"sv, "f974a17ef0b1b1533abc807b9a560c3bd8ac0796"sv}, Entry{"v1-001900-002000-bodies.idx"sv, "93ec4ba41ff56a3ca750609e0043e5e731ae1eb6"sv}, Entry{"v1-001900-002000-bodies.seg"sv, "74115971a97963f322b9d08251d86c27080ab021"sv}, Entry{"v1-001900-002000-headers.idx"sv, "eb9c38a6e4e94cfdef22b0b20ac08ad15edae154"sv}, @@ -304,6 +386,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-001900-002000-transactions-to-block.idx"sv, "96497400be1ab6254269c1480f9b99c14de2a424"sv}, Entry{"v1-001900-002000-transactions.idx"sv, "ca22939c98f92e3026e477b723d4cb17dcf16346"sv}, Entry{"v1-001900-002000-transactions.seg"sv, "4980897c027d56009b072892a35a8eafe34b6e76"sv}, + Entry{"v1-001910-001920-blobsidecars.seg"sv, "d0141bfbc0401c6c65bd9c8c48d8c36e05cdfcdd"sv}, + Entry{"v1-001910-001920-blocksidecars.idx"sv, "e74b16ad9979bd083eb2f7397d923188a61ef6e4"sv}, + Entry{"v1-001920-001930-blobsidecars.seg"sv, "f951c9238832bf9283e042b2c4cb91b22bda8056"sv}, + Entry{"v1-001920-001930-blocksidecars.idx"sv, "ae36364e6a82e43116ecd20123fea27e5155fd3e"sv}, + Entry{"v1-001930-001940-blobsidecars.seg"sv, "c2f59d7d9667a2b2b069fce937f645af6d6ce7a7"sv}, + Entry{"v1-001930-001940-blocksidecars.idx"sv, "d3cf1470590696e6bc8fbb8a86934446512a04e5"sv}, + Entry{"v1-001940-001950-blobsidecars.seg"sv, "28632e4ea84e7113f7673171e88f45ce6e8fb55b"sv}, + Entry{"v1-001940-001950-blocksidecars.idx"sv, "96c2361b589adbbb9fe5682834948548a8021323"sv}, + Entry{"v1-001950-001960-blobsidecars.seg"sv, "ed1e977473552d1c227856bcc9ac9c610386ad86"sv}, + Entry{"v1-001950-001960-blocksidecars.idx"sv, "4e229d412a61b176086b33edd6d614869e13f06d"sv}, + Entry{"v1-001960-001970-blobsidecars.seg"sv, "726394f5a9c3b53a8d38ebf49eca3f366adf0ce0"sv}, + Entry{"v1-001960-001970-blocksidecars.idx"sv, "c00ae191725dbd75dbfa1c987eab84ef9a9566c6"sv}, + Entry{"v1-001970-001980-blobsidecars.seg"sv, "137a114e532f0e5c1b3c0886a46c7ca267cd948c"sv}, + Entry{"v1-001970-001980-blocksidecars.idx"sv, "5cc18a7873b4e4b3f0b94a093ce6fcdf75bac490"sv}, + Entry{"v1-001980-001990-blobsidecars.seg"sv, "ba4cd1713ed8555cd37dab2a153ff22b57565ce9"sv}, + Entry{"v1-001980-001990-blocksidecars.idx"sv, "49d7f037d4a51a89e6ad745d58955dfb1b6e9f73"sv}, + Entry{"v1-001990-002000-blobsidecars.seg"sv, "9135274139ce6075eeac2e82491569bcd328851f"sv}, + Entry{"v1-001990-002000-blocksidecars.idx"sv, "b97e68cb4dfa6f6f31895d780bf29a7cf25fef32"sv}, + Entry{"v1-002000-002010-blobsidecars.seg"sv, "b2d4453a84bde583691dee97ad6eecdbbd7d2661"sv}, + Entry{"v1-002000-002010-blocksidecars.idx"sv, "e6862c62b7c134860944b51fc419207ea83cbca8"sv}, Entry{"v1-002000-002100-bodies.idx"sv, "3be3d3b83b59b0219ff0d23b6811c252d0145783"sv}, Entry{"v1-002000-002100-bodies.seg"sv, "c915fe040e44ef9fc5bd59e8af19341100607b46"sv}, Entry{"v1-002000-002100-headers.idx"sv, "b24e5d482fa26e97224a277f545121709ae31c87"sv}, @@ -311,6 +413,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-002000-002100-transactions-to-block.idx"sv, "491f80c3e7e68eb585d11944d14e670f37b3d09c"sv}, Entry{"v1-002000-002100-transactions.idx"sv, "f977d3faa1527adfc0b264f832f19d2f786ce88b"sv}, Entry{"v1-002000-002100-transactions.seg"sv, "f4e3acee1c0cd1d9836a11ae2e2bf1e4eeedc220"sv}, + Entry{"v1-002010-002020-blobsidecars.seg"sv, "9236334db56c8c279c374a461a8863c001fe7584"sv}, + Entry{"v1-002010-002020-blocksidecars.idx"sv, "222807c2725c2a629d67939e58a422bf98f4095d"sv}, + Entry{"v1-002020-002030-blobsidecars.seg"sv, "c9aee6e8ef2d3e54002bd8688ee4c691e75b9d78"sv}, + Entry{"v1-002020-002030-blocksidecars.idx"sv, "5d7ec2aebd9ef5e90cba024ef1271d8ddc2d0730"sv}, + Entry{"v1-002030-002040-blobsidecars.seg"sv, "94cc08ca2d2d46814174cf5ade4092e21264ed0e"sv}, + Entry{"v1-002030-002040-blocksidecars.idx"sv, "654075f996632e8aaa2dea7e1ecf6e389b184324"sv}, + Entry{"v1-002040-002050-blobsidecars.seg"sv, "432bc86f89c413184fc7956a5722d56d3f76921f"sv}, + Entry{"v1-002040-002050-blocksidecars.idx"sv, "95be00122506c03676b86d034671256eab785e52"sv}, + Entry{"v1-002050-002060-blobsidecars.seg"sv, "fa099f704efc48c5ee983eca9c8f6293bfc2dfee"sv}, + Entry{"v1-002050-002060-blocksidecars.idx"sv, "ba1d9ee32c9bdca1a11cd9df984b133ebcb630c3"sv}, + Entry{"v1-002060-002070-blobsidecars.seg"sv, "170b1e8f983f9caee89527ad57e132d0d50c0dc2"sv}, + Entry{"v1-002060-002070-blocksidecars.idx"sv, "80ff041373188bec5f8a839290631a0b7fdf4500"sv}, + Entry{"v1-002070-002080-blobsidecars.seg"sv, "01beb4eaf4f3aaa9bac88833be1a5a14b7a8b752"sv}, + Entry{"v1-002070-002080-blocksidecars.idx"sv, "240600cf2e4076cfef7af09fafde37a2f676ec8a"sv}, + Entry{"v1-002080-002090-blobsidecars.seg"sv, "ac748e70cd6954c600404c9f4799621e64234355"sv}, + Entry{"v1-002080-002090-blocksidecars.idx"sv, "f7ea161ec14e7106df8fd7b8d996bf1c4178bfca"sv}, + Entry{"v1-002090-002100-blobsidecars.seg"sv, "acaaeda3796853cc2d238eaeae51eec081fb4747"sv}, + Entry{"v1-002090-002100-blocksidecars.idx"sv, "dc54f1c0661b782eee1b84f9f7e19a09a1f21aea"sv}, + Entry{"v1-002100-002110-blobsidecars.seg"sv, "09576cbd93c06bcaf3cf5dbb347be083d7109232"sv}, + Entry{"v1-002100-002110-blocksidecars.idx"sv, "0405c22ca155529c201dea1f0b2e1f2f3199cafc"sv}, Entry{"v1-002100-002200-bodies.idx"sv, "90d8ae16d05aee3da7aa9c949cc02c0b63ad5eeb"sv}, Entry{"v1-002100-002200-bodies.seg"sv, "cc96d5b937daf3f770399315948c38816fc6efd6"sv}, Entry{"v1-002100-002200-headers.idx"sv, "f38dfd4ede41ccb5adc7a514c9dbeae69bcae5d0"sv}, @@ -318,6 +440,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-002100-002200-transactions-to-block.idx"sv, "a80892ea568ecfb0a1dd8651ed1e06b69f2047f1"sv}, Entry{"v1-002100-002200-transactions.idx"sv, "15a5d42c9ad7886ec83172bae46f628ba6d51d5a"sv}, Entry{"v1-002100-002200-transactions.seg"sv, "67ca397b63625ba1685f1684644fc8ac0b6af4f2"sv}, + Entry{"v1-002110-002120-blobsidecars.seg"sv, "cdaa0b5ee3584dd98ca14f1ad2d17c563729c754"sv}, + Entry{"v1-002110-002120-blocksidecars.idx"sv, "657a0a68120c3852ab9f95dd78beb609c866e370"sv}, + Entry{"v1-002120-002130-blobsidecars.seg"sv, "ee9b14bb602cd76825ac283b13fe64f4f7dd8642"sv}, + Entry{"v1-002120-002130-blocksidecars.idx"sv, "feca894fd9fd1d306a88a4a7f90b5c83c3fb110e"sv}, + Entry{"v1-002130-002140-blobsidecars.seg"sv, "d41c3ed21ede5fb45d248c3e42113a7e3db2fea4"sv}, + Entry{"v1-002130-002140-blocksidecars.idx"sv, "e278302d5dc5b77964d273cb81a2eb6d87043f8a"sv}, + Entry{"v1-002140-002150-blobsidecars.seg"sv, "d53ef4ffb5d3ade7c00ea8caf53060bfe5cc4649"sv}, + Entry{"v1-002140-002150-blocksidecars.idx"sv, "578b763e65798ec9bd9eb3ed33ae4519eb77c03f"sv}, + Entry{"v1-002150-002160-blobsidecars.seg"sv, "b154bf2230289c3de1aecb067cb55b25694bcf55"sv}, + Entry{"v1-002150-002160-blocksidecars.idx"sv, "8e29d4cad01dcd6b5ad6502b6765dedf2284dd18"sv}, + Entry{"v1-002160-002170-blobsidecars.seg"sv, "90837d459f03a927cf9118969745d32bc792b5b3"sv}, + Entry{"v1-002160-002170-blocksidecars.idx"sv, "5029e394fa772f5a8e601cd83b3bfe3b2f99704f"sv}, + Entry{"v1-002170-002180-blobsidecars.seg"sv, "95b28e89da60575c0a8049fafee6da4bc64a4812"sv}, + Entry{"v1-002170-002180-blocksidecars.idx"sv, "2619ab145c73ade9071d896f054db7bc5937fdbe"sv}, + Entry{"v1-002180-002190-blobsidecars.seg"sv, "21bf0b844d01818bbc8730ca56e78c12099657d0"sv}, + Entry{"v1-002180-002190-blocksidecars.idx"sv, "3634c88fcb8d2c7126df913eb75bcd40e636d461"sv}, + Entry{"v1-002190-002200-blobsidecars.seg"sv, "4671a741598aa7d472df2c6097bde0ee8f476bcd"sv}, + Entry{"v1-002190-002200-blocksidecars.idx"sv, "2d7c0da60a4790d581a55129052a95a13554e80e"sv}, + Entry{"v1-002200-002210-blobsidecars.seg"sv, "72f77cc0d25b97fbd5e3423465215cff088c6293"sv}, + Entry{"v1-002200-002210-blocksidecars.idx"sv, "e073e8b2dec39fd47d332bfaf1fca6003ad2cb31"sv}, Entry{"v1-002200-002300-bodies.idx"sv, "52b6912e0b60b5aa3ed65baea3ded11ecfd1488c"sv}, Entry{"v1-002200-002300-bodies.seg"sv, "01fdf3da7f39a6ae076c21f0dcd70a8bbd3c347c"sv}, Entry{"v1-002200-002300-headers.idx"sv, "25873d71ee17f6a9558a9aaa820e07fd3fc88714"sv}, @@ -325,6 +467,26 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-002200-002300-transactions-to-block.idx"sv, "93289fce1dccdda409152050f59cb40f6f1930b4"sv}, Entry{"v1-002200-002300-transactions.idx"sv, "a0f58cc64785f9efa5b03cd05444f4add7da1f5d"sv}, Entry{"v1-002200-002300-transactions.seg"sv, "447de75e05547a7e8b72327da4414f3cbe903c36"sv}, + Entry{"v1-002210-002220-blobsidecars.seg"sv, "dccf62ae4cb7b7d7869ae71829bf526bd3f3dbb4"sv}, + Entry{"v1-002210-002220-blocksidecars.idx"sv, "71ae81d6ae2498ac48036f28b3bdf82cde2bd8d2"sv}, + Entry{"v1-002220-002230-blobsidecars.seg"sv, "b242d24fabb8bc8ba3186a157e36ecb37321e7f3"sv}, + Entry{"v1-002220-002230-blocksidecars.idx"sv, "8c38c5439288def68809309573d6a9563347e75b"sv}, + Entry{"v1-002230-002240-blobsidecars.seg"sv, "01579458e5c96c59a835458f74f53e22f81ffbc3"sv}, + Entry{"v1-002230-002240-blocksidecars.idx"sv, "a6d2aa2f2feb6c5e8199e2b3dd287ef81c4ab882"sv}, + Entry{"v1-002240-002250-blobsidecars.seg"sv, "89466afe95e55b25b4bbc32ffff97c04937f36f4"sv}, + Entry{"v1-002240-002250-blocksidecars.idx"sv, "9f85b6d80175f65d9358c22202beba272866d34b"sv}, + Entry{"v1-002250-002260-blobsidecars.seg"sv, "bfff6ca2b1c6e16c65bd72e0d96f382a28c56780"sv}, + Entry{"v1-002250-002260-blocksidecars.idx"sv, "443d2df24456b7642dfcf56da74da1efaee31d4f"sv}, + Entry{"v1-002260-002270-blobsidecars.seg"sv, "23f4d107492686b5a71df5963a19ba6b872100e6"sv}, + Entry{"v1-002260-002270-blocksidecars.idx"sv, "ebe25401e3c8e9cf8a26def4646db71efa8b572e"sv}, + Entry{"v1-002270-002280-blobsidecars.seg"sv, "dc240a0321fb194e101bad625973cf5f7606d0f0"sv}, + Entry{"v1-002270-002280-blocksidecars.idx"sv, "c086166db76235d511eabc85e88d6d7e5386ab46"sv}, + Entry{"v1-002280-002290-blobsidecars.seg"sv, "04af18182894eda39f95935f9693d3ce387670bb"sv}, + Entry{"v1-002280-002290-blocksidecars.idx"sv, "619c59f9dccec52b027b299d985036040fe57eb3"sv}, + Entry{"v1-002290-002300-blobsidecars.seg"sv, "da0683dc29a1fd725f3d28c4451d54a95466bfbd"sv}, + Entry{"v1-002290-002300-blocksidecars.idx"sv, "2f0608e7dedcd22a8fbdbfa2e8c5ea82012ea57e"sv}, + Entry{"v1-002300-002310-blobsidecars.seg"sv, "43ba028b3c2bfc2206cfffa34fbd1d088354a167"sv}, + Entry{"v1-002300-002310-blocksidecars.idx"sv, "5de42e8cfb1d6bb06e6e08a625f67aa2fef05cf1"sv}, Entry{"v1-002300-002400-bodies.idx"sv, "5a295bbe7a857c3ba95b178cb48d9e9936de9a1b"sv}, Entry{"v1-002300-002400-bodies.seg"sv, "6284ec7fde8f9cf83a2df4e2171637e273fe348c"sv}, Entry{"v1-002300-002400-headers.idx"sv, "d3488eb2c31f973c74c45e09a4a6a7f3581bc348"sv}, @@ -332,55 +494,203 @@ inline constexpr std::array kHoleskySnapshots{ Entry{"v1-002300-002400-transactions-to-block.idx"sv, "d000890ed04c693ab672e27885527f080873d0bb"sv}, Entry{"v1-002300-002400-transactions.idx"sv, "5890c3c8ecca5f8d26b44ca97e51dc79e1a3dae5"sv}, Entry{"v1-002300-002400-transactions.seg"sv, "6eeebadecd08c30bec95784c3433cfeacda85068"sv}, - Entry{"v1-002400-002410-bodies.idx"sv, "1fdddf4c67554687e155db02fe7fbce304988793"sv}, - Entry{"v1-002400-002410-bodies.seg"sv, "e9b6ff3ef6de43eb08353902bae7b97407837731"sv}, - Entry{"v1-002400-002410-headers.idx"sv, "f74bdf2ed089cd9f54fa77d3bf81639620c3e927"sv}, - Entry{"v1-002400-002410-headers.seg"sv, "7b7186befb505289f0bcca0b4a57cffef8239424"sv}, - Entry{"v1-002400-002410-transactions-to-block.idx"sv, "13d847122bd86b995eba9a74a9ae5ae4b9d1fe70"sv}, - Entry{"v1-002400-002410-transactions.idx"sv, "8c119c872cec16d74615db682f5427ec71af8b77"sv}, - Entry{"v1-002400-002410-transactions.seg"sv, "534527232573bc893dd2cbb48240c0976cdccfd0"sv}, - Entry{"v1-002410-002420-bodies.idx"sv, "1fb74634ac31492afdeb1090c711a939ec08650a"sv}, - Entry{"v1-002410-002420-bodies.seg"sv, "b1de72c6167885bb4793bacb826b80c7c8c89396"sv}, - Entry{"v1-002410-002420-headers.idx"sv, "bc6f2bbc0ad9acf9e5c2c6bc13a14a54b9d8207f"sv}, - Entry{"v1-002410-002420-headers.seg"sv, "53ae811c3fda2782afd8c8ae67e1e147504e1313"sv}, - Entry{"v1-002410-002420-transactions-to-block.idx"sv, "fa285268ebd686b1bdce69520518b0d44164cb1d"sv}, - Entry{"v1-002410-002420-transactions.idx"sv, "c630126553057c593f843ba66f14d8638af3aeb8"sv}, - Entry{"v1-002410-002420-transactions.seg"sv, "1626fdc9bab850b7d4189fa07b1d0834eae7f7be"sv}, - Entry{"v1-002420-002421-bodies.idx"sv, "9cb26e3e938df825b315ae6083efdafedfb6bf9e"sv}, - Entry{"v1-002420-002421-bodies.seg"sv, "0c09f4990ce14474ea8d2b592b04f4a1e5ca46c8"sv}, - Entry{"v1-002420-002421-headers.idx"sv, "61499b412846ed608cbbf84929596f23cca2866d"sv}, - Entry{"v1-002420-002421-headers.seg"sv, "13575b942458bfd6f4cf7c49d6e55fecc4039608"sv}, - Entry{"v1-002420-002421-transactions-to-block.idx"sv, "a3be0d8b5ba87b2d127b029e27f47ca9574419f1"sv}, - Entry{"v1-002420-002421-transactions.idx"sv, "d15ca069c6451b71dc881169b4ac2bdd49823f3a"sv}, - Entry{"v1-002420-002421-transactions.seg"sv, "28fa263be619fc1899b0f6fa6a12bb288e0aa35c"sv}, - Entry{"v1-002421-002422-bodies.idx"sv, "aa2ffc25b8110dff3dd16d0f985b278679a93900"sv}, - Entry{"v1-002421-002422-bodies.seg"sv, "d3b4a3fea070ac31cae86ceb4de49a9df56984ce"sv}, - Entry{"v1-002421-002422-headers.idx"sv, "8300881c0d771eb896e38579bc069cb4acd02b51"sv}, - Entry{"v1-002421-002422-headers.seg"sv, "30c6829430e9a175ae74ba5b75d2fd0242b43a19"sv}, - Entry{"v1-002421-002422-transactions-to-block.idx"sv, "68a02092608bbdda14477434396aeeda2e334239"sv}, - Entry{"v1-002421-002422-transactions.idx"sv, "8c0e57872a949e2bd9c26a0279674bda8fe22aea"sv}, - Entry{"v1-002421-002422-transactions.seg"sv, "c76e0e987b0ed502cd3190e327a7dff177e0a9fb"sv}, - Entry{"v1-002422-002423-bodies.idx"sv, "e55031fd1a199f7c2c833ecbb6e1cf42bf380f63"sv}, - Entry{"v1-002422-002423-bodies.seg"sv, "118ee92ca92060565149ea03604748b86f202127"sv}, - Entry{"v1-002422-002423-headers.idx"sv, "cc18878edb638d766b6aaaea0d50ce88db83ab21"sv}, - Entry{"v1-002422-002423-headers.seg"sv, "37e8415e08544f5a5b393ec1ccbb9273bb4795aa"sv}, - Entry{"v1-002422-002423-transactions-to-block.idx"sv, "195933b34a01fb5dbe95110b61b50476584f6c10"sv}, - Entry{"v1-002422-002423-transactions.idx"sv, "752d85d35ec433860edc50046277193cf033bc93"sv}, - Entry{"v1-002422-002423-transactions.seg"sv, "f4f27a2483590ca74ee8396fe44a643c660e5644"sv}, - Entry{"v1-002423-002424-bodies.idx"sv, "488fa4f9e0160ab97b4cb107a7e9e1568ea79c24"sv}, - Entry{"v1-002423-002424-bodies.seg"sv, "2eae918e5b0b68d6e815d26e40ff1c352b2c44a8"sv}, - Entry{"v1-002423-002424-headers.idx"sv, "e8247cef5fa3255abaaa9b2105bc9b95b8b53eba"sv}, - Entry{"v1-002423-002424-headers.seg"sv, "9fcc3f283de000e439f233d915778c4058c247ef"sv}, - Entry{"v1-002423-002424-transactions-to-block.idx"sv, "99ec24df74b21c65a8a64b3f7c606244e187aa5e"sv}, - Entry{"v1-002423-002424-transactions.idx"sv, "8d8f156230538022d466ea4041e24e8724c7e0b6"sv}, - Entry{"v1-002423-002424-transactions.seg"sv, "a8c4b6a899d1fa2c06a8c3b8d24783e67b28dfdf"sv}, - Entry{"v1-002424-002425-bodies.idx"sv, "d9cef3f72e2f01e088bd300c89700b73dc892eed"sv}, - Entry{"v1-002424-002425-bodies.seg"sv, "8d51ba6af052855063fcbe5d29cec47d79b1e128"sv}, - Entry{"v1-002424-002425-headers.idx"sv, "b41c11fc2c28144c8da324e2535eed16681c9047"sv}, - Entry{"v1-002424-002425-headers.seg"sv, "1b3cdff7896fdf03a49a24d583cf5dd12c632fe4"sv}, - Entry{"v1-002424-002425-transactions-to-block.idx"sv, "8ae2c7c84f3fe98847b757cd8b94fb70ebd00782"sv}, - Entry{"v1-002424-002425-transactions.idx"sv, "c4f12086bd0970d38ebc052a654dd2f2e1752cd8"sv}, - Entry{"v1-002424-002425-transactions.seg"sv, "9cada76af1675b39fc2df6459c9733070e542955"sv}, + Entry{"v1-002310-002320-blobsidecars.seg"sv, "5a0a6c7d24d00aca9f9a64f61059b053846afa01"sv}, + Entry{"v1-002310-002320-blocksidecars.idx"sv, "5350cf907d05ec77345a1ff16c6e9bea7fda117d"sv}, + Entry{"v1-002320-002330-blobsidecars.seg"sv, "e2f1cbd29843b75bc8f742b47284e37ad044857f"sv}, + Entry{"v1-002320-002330-blocksidecars.idx"sv, "83e721a5209d8041bf1a813d70954da53443186e"sv}, + Entry{"v1-002330-002340-blobsidecars.seg"sv, "9ebb2b545ea1bd0dd08419e1f96a48541b744b3d"sv}, + Entry{"v1-002330-002340-blocksidecars.idx"sv, "b7f3b4f7b06af14d2c563f05033a322b6f764ce0"sv}, + Entry{"v1-002340-002350-blobsidecars.seg"sv, "d18a75315d196775a3f5dce4b6aff79ed48a74cb"sv}, + Entry{"v1-002340-002350-blocksidecars.idx"sv, "3b5837de91047c3a42ec1989e126882431cf2c40"sv}, + Entry{"v1-002350-002360-blobsidecars.seg"sv, "1ce062d14906dd4d024ede6d217ca47cc6fbd6e7"sv}, + Entry{"v1-002350-002360-blocksidecars.idx"sv, "0b60c9188c4fb4accc782d2552976412b6bb856e"sv}, + Entry{"v1-002360-002370-blobsidecars.seg"sv, "f471ae10546db3606d9f706f45c888665b6bdb21"sv}, + Entry{"v1-002360-002370-blocksidecars.idx"sv, "78a73b116b8abfd228c0fb24b97b897dff982651"sv}, + Entry{"v1-002370-002380-blobsidecars.seg"sv, "f87d0468bad88a9a6258cee794f1e68584f7c9de"sv}, + Entry{"v1-002370-002380-blocksidecars.idx"sv, "d4e61a5331b696dbe166bc3171b754456ee8324f"sv}, + Entry{"v1-002380-002390-blobsidecars.seg"sv, "3f608b830cf46218b75e6c50cac0a26e5a40218a"sv}, + Entry{"v1-002380-002390-blocksidecars.idx"sv, "c2029cb335ee7d25cee385e762f82d089eb35709"sv}, + Entry{"v1-002390-002400-blobsidecars.seg"sv, "21b25b62713b260fc73f4a50e3a1428625d53722"sv}, + Entry{"v1-002390-002400-blocksidecars.idx"sv, "d8aadd3c8271d7484187ea2b37bc3c9dd985a95a"sv}, + Entry{"v1-002400-002410-blobsidecars.seg"sv, "b68d063a8fa15e9f8c5ba2645303b02802cfd4cd"sv}, + Entry{"v1-002400-002410-blocksidecars.idx"sv, "e3146a4c56f4323c1082d5f8e630fb3d9fb8b081"sv}, + Entry{"v1-002400-002500-bodies.idx"sv, "0b1c6bb94fab95a667a4391d1521d70f0f731ffd"sv}, + Entry{"v1-002400-002500-bodies.seg"sv, "c5072b8e44ca755ce58cbd5045e374160be69218"sv}, + Entry{"v1-002400-002500-headers.idx"sv, "39a5f5cc66f52a1d97b7af1c731bcc0bd8dee605"sv}, + Entry{"v1-002400-002500-headers.seg"sv, "96c17ee413b6330f7d248d711e7bd87050fa3194"sv}, + Entry{"v1-002400-002500-transactions-to-block.idx"sv, "c9f14df60a95dabc88ba91c9c4ab3719c5b6a57b"sv}, + Entry{"v1-002400-002500-transactions.idx"sv, "04322269a2e3b00695e64bf896a1b6ef1a058e73"sv}, + Entry{"v1-002400-002500-transactions.seg"sv, "d1f996f389ef93881f1a5d749addda42c03cce28"sv}, + Entry{"v1-002410-002420-blobsidecars.seg"sv, "a6bb077a7988928a4287c02cea0b6f396bc6c269"sv}, + Entry{"v1-002410-002420-blocksidecars.idx"sv, "5234656ac34090921bc1e0a968b122f5d08dfa97"sv}, + Entry{"v1-002420-002430-blobsidecars.seg"sv, "c8dc8eae7869bf7ec07c4349e4d07e9a31645c82"sv}, + Entry{"v1-002420-002430-blocksidecars.idx"sv, "7e55641c167fe0c067cc85e89e43fbb605e9f890"sv}, + Entry{"v1-002430-002440-blobsidecars.seg"sv, "5008d8b14c4e3aa7e2058e2b18167f1fac7d6113"sv}, + Entry{"v1-002430-002440-blocksidecars.idx"sv, "dc44d8905fa6f5e46a177757bbae7f4104364e15"sv}, + Entry{"v1-002440-002450-blobsidecars.seg"sv, "9bcb30bca5b85881b5a49e9727d479f9c6b0fbeb"sv}, + Entry{"v1-002440-002450-blocksidecars.idx"sv, "7203fec0101cd57e69e061d985771c96c4da90e9"sv}, + Entry{"v1-002450-002460-blobsidecars.seg"sv, "6a8444b00e31adcdb2f8d208cf3113ec5a4950f2"sv}, + Entry{"v1-002450-002460-blocksidecars.idx"sv, "1b34fe7418451dee77d9d8ce1e97cd04458af130"sv}, + Entry{"v1-002460-002470-blobsidecars.seg"sv, "bd0e440697c61de7d376fed41be710ea7a803c26"sv}, + Entry{"v1-002460-002470-blocksidecars.idx"sv, "bf4132f1c7ed4880c3109a229ab4ab06e20ff8af"sv}, + Entry{"v1-002470-002480-blobsidecars.seg"sv, "eb383cb8b605996877a28497c636e14a12fdfab5"sv}, + Entry{"v1-002470-002480-blocksidecars.idx"sv, "cbad90ccf04347a2824b3425da39d8a39dc23868"sv}, + Entry{"v1-002480-002490-blobsidecars.seg"sv, "bb66b9b9ec52b1aa82f138469ee48c3c370af2e6"sv}, + Entry{"v1-002480-002490-blocksidecars.idx"sv, "74f93473e3508f71939903ab0972efd208f52df1"sv}, + Entry{"v1-002490-002500-blobsidecars.seg"sv, "982361e2c68c99f55fb7702a550ce00fecee977a"sv}, + Entry{"v1-002490-002500-blocksidecars.idx"sv, "cc842fa9e37976fd639a44c02ae8d6a3e218f777"sv}, + Entry{"v1-002500-002510-blobsidecars.seg"sv, "d88a048ec8f005461fde6864c169303d1a0abca4"sv}, + Entry{"v1-002500-002510-blocksidecars.idx"sv, "8b30ed6c2d4cf2d74c54e7808db840c64730c72f"sv}, + Entry{"v1-002500-002510-bodies.idx"sv, "2e0123477f74f27618478ffa286effa1e3d3891d"sv}, + Entry{"v1-002500-002510-bodies.seg"sv, "c299ade944d81cd4dd11d5dbad55674292417865"sv}, + Entry{"v1-002500-002510-headers.idx"sv, "e1a1e9852d520448a7dea25dc4182b34307466a8"sv}, + Entry{"v1-002500-002510-headers.seg"sv, "b362ac0b3ef19f8e1f70473d269c507b545253d4"sv}, + Entry{"v1-002500-002510-transactions-to-block.idx"sv, "a4445f233534a5e5494f67f134bf23659373aff2"sv}, + Entry{"v1-002500-002510-transactions.idx"sv, "380be592ea95ff5cf8d310ef62dd84901fc2d392"sv}, + Entry{"v1-002500-002510-transactions.seg"sv, "1a736c0349b85358a9c1fae4b822c8dfa41c4608"sv}, + Entry{"v1-002510-002520-blobsidecars.seg"sv, "6cf083801c7adebdbf9c08bbde7e00d923b59d41"sv}, + Entry{"v1-002510-002520-blocksidecars.idx"sv, "9de27a2d9365026c0b97b1fc1379cd5595ff092f"sv}, + Entry{"v1-002510-002520-bodies.idx"sv, "7c281600a7408e063302b51293f983e2dd4f6b64"sv}, + Entry{"v1-002510-002520-bodies.seg"sv, "97eebd91c3b92731e29880db60cdf259e382073f"sv}, + Entry{"v1-002510-002520-headers.idx"sv, "237bd53b45e650897edef98aeda0dbf7a22ff26c"sv}, + Entry{"v1-002510-002520-headers.seg"sv, "edd6269ed39e02a8ea24f85f65dc959bd749eb86"sv}, + Entry{"v1-002510-002520-transactions-to-block.idx"sv, "292b0f4eea441af15c198ff2e154bb83afca6d4b"sv}, + Entry{"v1-002510-002520-transactions.idx"sv, "97c8318ce84040b198b341cb075c1738f65870dc"sv}, + Entry{"v1-002510-002520-transactions.seg"sv, "f5a2585b6d78e987b2e7698488d42387d55ea917"sv}, + Entry{"v1-002520-002530-blobsidecars.seg"sv, "5fc55a086972a7948cd8b6b95f888e3229f8de42"sv}, + Entry{"v1-002520-002530-blocksidecars.idx"sv, "e7d2edd40158dd1d35b7da21ba2ae5524ae353cd"sv}, + Entry{"v1-002520-002530-bodies.idx"sv, "af74eb86f4cd773df77792bf07fe2ce987c90322"sv}, + Entry{"v1-002520-002530-bodies.seg"sv, "42a0c97ee749080f07d4c053ef11599b1f656bc6"sv}, + Entry{"v1-002520-002530-headers.idx"sv, "240b22956b43b00deb03d293dc89b765b18ab85a"sv}, + Entry{"v1-002520-002530-headers.seg"sv, "57ce0a46cce3f5bab3a07beda1be2a29f626f26a"sv}, + Entry{"v1-002520-002530-transactions-to-block.idx"sv, "317be7887ac1a2632eb80dec36db71d558503939"sv}, + Entry{"v1-002520-002530-transactions.idx"sv, "aeec2207a3cf83af97049e1631a5991e8d94b028"sv}, + Entry{"v1-002520-002530-transactions.seg"sv, "abb144ed8d37ad1211a271b97a8b64642541a3b6"sv}, + Entry{"v1-002530-002540-blobsidecars.seg"sv, "c7a2e96ebb0f147fbe47e6e0bab54dfc90d89f4a"sv}, + Entry{"v1-002530-002540-blocksidecars.idx"sv, "bb2966a8ab95d83f4cd405d3c39be95807f5e951"sv}, + Entry{"v1-002530-002540-bodies.idx"sv, "e1da1f3b94c5e7c1e3532cc117a25305c6c04dc6"sv}, + Entry{"v1-002530-002540-bodies.seg"sv, "9a68049531cb6e14f30213bafbcd16a4681eb64f"sv}, + Entry{"v1-002530-002540-headers.idx"sv, "38a51f11d9c72ce009964d794a0b2beb66252a92"sv}, + Entry{"v1-002530-002540-headers.seg"sv, "f2e224a57e27e093e47285df13309b46ef7289ed"sv}, + Entry{"v1-002530-002540-transactions-to-block.idx"sv, "842709befb5525ba6f07a6260706b69bca61ed0b"sv}, + Entry{"v1-002530-002540-transactions.idx"sv, "c0b3b03e315d117e1ad0d710c16289e786e39596"sv}, + Entry{"v1-002530-002540-transactions.seg"sv, "67248816cc443554046c9d161652dc1ec68a8a8b"sv}, + Entry{"v1-002540-002550-blobsidecars.seg"sv, "025d980f366b4912e1599afcc04a655564d1b83f"sv}, + Entry{"v1-002540-002550-blocksidecars.idx"sv, "74ee3ba7a40fa9ff6291a57dcccbf03997ce1730"sv}, + Entry{"v1-002540-002550-bodies.idx"sv, "6e8ed12acdf843a682af4daf33b48daf044eccf2"sv}, + Entry{"v1-002540-002550-bodies.seg"sv, "a5cd3f10eae9ffd2226e52ce999b736dcdec641d"sv}, + Entry{"v1-002540-002550-headers.idx"sv, "1654bb965e9ca213049f618127c3bf25cb44b106"sv}, + Entry{"v1-002540-002550-headers.seg"sv, "3e3b714c5948c4af24193474e2de05e333ed0027"sv}, + Entry{"v1-002540-002550-transactions-to-block.idx"sv, "923ed3fc54223e77d197b077b5bef556f4619d0b"sv}, + Entry{"v1-002540-002550-transactions.idx"sv, "9abb3b44ea2fb4eb634751ecf117fd80bad21693"sv}, + Entry{"v1-002540-002550-transactions.seg"sv, "78eb8dca6343581b9986ea169f218a4aee3435f6"sv}, + Entry{"v1-002550-002560-blobsidecars.seg"sv, "1023c7381fd569ad901ce564727435ba2e535687"sv}, + Entry{"v1-002550-002560-blocksidecars.idx"sv, "ddda9e5f607cebe29a555015c219ad131f5471b5"sv}, + Entry{"v1-002550-002560-bodies.idx"sv, "e9ff6ef989522faebfe7ca0ef1df3acc1670e219"sv}, + Entry{"v1-002550-002560-bodies.seg"sv, "30a8204cdc4c82235e88fb733a64e6eb4fd8d0d2"sv}, + Entry{"v1-002550-002560-headers.idx"sv, "6425640bdfa90b3afc3b88ee0279783083556601"sv}, + Entry{"v1-002550-002560-headers.seg"sv, "302b1690c48090e7f18afa80286bca11499ffdf2"sv}, + Entry{"v1-002550-002560-transactions-to-block.idx"sv, "e091cac58ad39c2e8331d4dedbd459a32a5fc40f"sv}, + Entry{"v1-002550-002560-transactions.idx"sv, "20b671ccba0d9da70f47ed1fdde0202fa1a84812"sv}, + Entry{"v1-002550-002560-transactions.seg"sv, "ea25c2505a24cee28aaf4cd26f8b602088d6a8e4"sv}, + Entry{"v1-002560-002570-blobsidecars.seg"sv, "072ce51b161a6f5889c1851e703caf9d0364c0a7"sv}, + Entry{"v1-002560-002570-blocksidecars.idx"sv, "bd30890effd4dc696a8a4ccd5193dd6ce72f4349"sv}, + Entry{"v1-002560-002570-bodies.idx"sv, "725f3d4da51d41cfdb9384d97e90a8071d6cffdb"sv}, + Entry{"v1-002560-002570-bodies.seg"sv, "3265bbd2873ad0bf1ca7509144dd321c1890c2a0"sv}, + Entry{"v1-002560-002570-headers.idx"sv, "3915deec631df7851c85a2ac5bc4913062de115c"sv}, + Entry{"v1-002560-002570-headers.seg"sv, "edb5c7b1b9d133af2f1d8129cc9e6539f5a11e85"sv}, + Entry{"v1-002560-002570-transactions-to-block.idx"sv, "3adcf24ecc43dde8e53d64fe5c489f16d21e4725"sv}, + Entry{"v1-002560-002570-transactions.idx"sv, "e6626f7f812872d7df7cfdc57f8127570d0daec4"sv}, + Entry{"v1-002560-002570-transactions.seg"sv, "f153f3c33c529f2a5bab37ab21c915664dc85bfb"sv}, + Entry{"v1-002570-002571-bodies.idx"sv, "050d52a0e04e5f7164e70a72c6ebcba343bdef29"sv}, + Entry{"v1-002570-002571-bodies.seg"sv, "2aa0755764e96e213389c79f53497ac704189214"sv}, + Entry{"v1-002570-002571-headers.idx"sv, "9107f591ade0e3761451c87f696d635fbe0bcde3"sv}, + Entry{"v1-002570-002571-headers.seg"sv, "3c3ea8a2a9728826d7d129f5b3f485389a6208a7"sv}, + Entry{"v1-002570-002571-transactions-to-block.idx"sv, "6cde163c77b73d8fa407883d37b229e0a91b5715"sv}, + Entry{"v1-002570-002571-transactions.idx"sv, "adfaf554b06c4643ac355ff1f35cff6f842e4367"sv}, + Entry{"v1-002570-002571-transactions.seg"sv, "32405e5a10d6c08ff734f634e328c42c5f9ed2e4"sv}, + Entry{"v1-002570-002580-blobsidecars.seg"sv, "c9139f2b36d623441bb0fb3052e80353937a044d"sv}, + Entry{"v1-002570-002580-blocksidecars.idx"sv, "110914af8da26827801eba79b2bf3e30a9ce2262"sv}, + Entry{"v1-002571-002572-bodies.idx"sv, "daf0278161ff67bce377be704aa0f692d13cac0e"sv}, + Entry{"v1-002571-002572-bodies.seg"sv, "a2bf677bb7d672ed0092081607061a62c9e2910e"sv}, + Entry{"v1-002571-002572-headers.idx"sv, "cfb3c1fff73dc23ac2a0330e2c526edc5389283f"sv}, + Entry{"v1-002571-002572-headers.seg"sv, "4f35bd9752a237bc7f5afae2231c6494e2705906"sv}, + Entry{"v1-002571-002572-transactions-to-block.idx"sv, "a61b0b18f37c96c6a867dbf1134e3ba0d9c0a873"sv}, + Entry{"v1-002571-002572-transactions.idx"sv, "8cb830190d86038f5b27f9045c53b20a3a1d15a6"sv}, + Entry{"v1-002571-002572-transactions.seg"sv, "cbc7e0fb750c9887f415a5848b490cab66d0de90"sv}, + Entry{"v1-002572-002573-bodies.idx"sv, "c9bf49d45334965afbac786604ea83d39c71ce5a"sv}, + Entry{"v1-002572-002573-bodies.seg"sv, "dfbd1be2813579d59cf76da98bbc73a2610d8154"sv}, + Entry{"v1-002572-002573-headers.idx"sv, "6cbee892a675159ef1c4f4d2f8baca4e81c4c53a"sv}, + Entry{"v1-002572-002573-headers.seg"sv, "e9c467bc614d75d9bfe1c714049f2f50fe567beb"sv}, + Entry{"v1-002572-002573-transactions-to-block.idx"sv, "1341a378f0f7d6daa7f75be7bf3cdf27e158dcfd"sv}, + Entry{"v1-002572-002573-transactions.idx"sv, "a7ea1b4befe4651ec59dd8434e5a2f4fd37f7cac"sv}, + Entry{"v1-002572-002573-transactions.seg"sv, "7267a785415859ed7e492f521fc3476dcc34ea88"sv}, + Entry{"v1-002573-002574-bodies.idx"sv, "d0cb3410fd2c9ffe05a1b2457ec7173dc69849d9"sv}, + Entry{"v1-002573-002574-bodies.seg"sv, "36ff49ad2d171499082d34786fec26dd4d03e747"sv}, + Entry{"v1-002573-002574-headers.idx"sv, "37065ff9eaa5931fabd60dfb74447e3964876b12"sv}, + Entry{"v1-002573-002574-headers.seg"sv, "a1374974d08cdc0d138ae8a8cd83a29e1e7bd5e5"sv}, + Entry{"v1-002573-002574-transactions-to-block.idx"sv, "6d13aadc89ffc0f09b6cfcdce0bfab23a9154b00"sv}, + Entry{"v1-002573-002574-transactions.idx"sv, "e97476e183d9269539129a4abfb65ecf0294b5c7"sv}, + Entry{"v1-002573-002574-transactions.seg"sv, "2858ff5236b046beae222234acbbdfe940e24fc8"sv}, + Entry{"v1-002574-002575-bodies.idx"sv, "a077fbf7d63a5b077f9b4e0d4720b9024c9b93ed"sv}, + Entry{"v1-002574-002575-bodies.seg"sv, "26c6c2910f57ba86ccd202e63416dea6f5b3a1e7"sv}, + Entry{"v1-002574-002575-headers.idx"sv, "50e56e39d2fb22d040876730c72255e69ec19525"sv}, + Entry{"v1-002574-002575-headers.seg"sv, "3be771e9d0b56846dd388ea8c52727d75c517689"sv}, + Entry{"v1-002574-002575-transactions-to-block.idx"sv, "f42abf9d5e078f1f3f3aaedd413e6f1a41f3747d"sv}, + Entry{"v1-002574-002575-transactions.idx"sv, "0d0d7ed609b2b04f138fbf56ddb498b532e1d59f"sv}, + Entry{"v1-002574-002575-transactions.seg"sv, "93a8a8a928771fa9b1e068afb3fd98b05c53c316"sv}, + Entry{"v1-002575-002576-bodies.idx"sv, "57ed0b0efde0cf4d229d56d7007fc63de9e98321"sv}, + Entry{"v1-002575-002576-bodies.seg"sv, "9fecec97245ef87bbeaaca37b1daa98b77389704"sv}, + Entry{"v1-002575-002576-headers.idx"sv, "5747b777763ef055fff41922b2137103b675a8c8"sv}, + Entry{"v1-002575-002576-headers.seg"sv, "ac21a4bd80ee944c34569ffcafbdf3978fe28ce7"sv}, + Entry{"v1-002575-002576-transactions-to-block.idx"sv, "9ddaaab8421570fa990208735a51d3a426fcebc2"sv}, + Entry{"v1-002575-002576-transactions.idx"sv, "7e9f5e2eb27f72a018625afb8ea9022b190d53a1"sv}, + Entry{"v1-002575-002576-transactions.seg"sv, "8b92058681aa572ffa1862272b546339f96cd643"sv}, + Entry{"v1-002576-002577-bodies.idx"sv, "97b6d24eddaba6ba799929cd6fff815f86a324c7"sv}, + Entry{"v1-002576-002577-bodies.seg"sv, "d026a01fa05c909dbffce4cc8ec2b53b7d7e56eb"sv}, + Entry{"v1-002576-002577-headers.idx"sv, "b8383baa18119d0c85f4a6b28ec73b3b4b2c678a"sv}, + Entry{"v1-002576-002577-headers.seg"sv, "184b04b16e0d4e2d71a2c84aae98391defc3d999"sv}, + Entry{"v1-002576-002577-transactions-to-block.idx"sv, "16852f2476d6f7dbde58a5dcf0b38d5a466bf789"sv}, + Entry{"v1-002576-002577-transactions.idx"sv, "da0136e5f526f381357c461c2bc0f8613c8cc5e1"sv}, + Entry{"v1-002576-002577-transactions.seg"sv, "9bdc93d660b6dbdee5c05727b918356a2fe9883c"sv}, + Entry{"v1-002580-002590-blobsidecars.seg"sv, "d55e727653d7dec01c48b19dce7316d9bf704e96"sv}, + Entry{"v1-002580-002590-blocksidecars.idx"sv, "4bf8655882470bb49c0288b5da33d191e1849efd"sv}, + Entry{"v1-002590-002600-blobsidecars.seg"sv, "f624ce8e0617372e4c20a1e7d774b97410d41a0f"sv}, + Entry{"v1-002590-002600-blocksidecars.idx"sv, "41f61c376f58f3acacbbb7525ecfe839d93a784b"sv}, + Entry{"v1-002600-002610-blobsidecars.seg"sv, "b962b80a353c09b32ed816a2d280e18b0a641e26"sv}, + Entry{"v1-002600-002610-blocksidecars.idx"sv, "e94feeef9291722898500b6963b7dd165e6aa9b9"sv}, + Entry{"v1-002610-002620-blobsidecars.seg"sv, "4720439c2de3a7a1259949a8355f8b8673a361f6"sv}, + Entry{"v1-002610-002620-blocksidecars.idx"sv, "30e00db4db7d92f3a98686f7d9c7ee0c8f791b9d"sv}, + Entry{"v1-002620-002630-blobsidecars.seg"sv, "09666839bb4038150f3623bff2dfc57e337177dd"sv}, + Entry{"v1-002620-002630-blocksidecars.idx"sv, "9791b4bbfd89a7c79367da82ba79e62a0bd76b87"sv}, + Entry{"v1-002630-002640-blobsidecars.seg"sv, "e023b5cbc1ea204fbaf07ac8863236f13b5f3052"sv}, + Entry{"v1-002630-002640-blocksidecars.idx"sv, "e6d94799b9317bda73b410d82130fd4524b372c9"sv}, + Entry{"v1-002640-002650-blobsidecars.seg"sv, "b71e45c40b0a8818f5390867119fdce2079c12e9"sv}, + Entry{"v1-002640-002650-blocksidecars.idx"sv, "a1910885a7ad60a1086230889b7ae3bb0d8bf68c"sv}, + Entry{"v1-002650-002660-blobsidecars.seg"sv, "3e336c87c0eab07d6b5e0e051f3415317aa5c710"sv}, + Entry{"v1-002650-002660-blocksidecars.idx"sv, "b58675d5f47713b5daf00c0cad044008c029879b"sv}, + Entry{"v1-002660-002670-blobsidecars.seg"sv, "8f076ea9e00ba7f0fffbce6a2d75a8fcebd7a559"sv}, + Entry{"v1-002660-002670-blocksidecars.idx"sv, "5702cb0694921ef0fff527de4edfe71bb27b9cb0"sv}, + Entry{"v1-002670-002680-blobsidecars.seg"sv, "bd86d7969b5453a27921c3337388e2eab8a3b672"sv}, + Entry{"v1-002670-002680-blocksidecars.idx"sv, "509164b43ce2ff90525a09318bb12f3df430599f"sv}, + Entry{"v1-002680-002690-blobsidecars.seg"sv, "f4ad4e066b10d7e0207f84ce8ad32328e2e4ce7d"sv}, + Entry{"v1-002680-002690-blocksidecars.idx"sv, "1833d0e19e6a7f469ff38a54ccebe54ad9ff4ee8"sv}, + Entry{"v1-002690-002700-blobsidecars.seg"sv, "987db287aa326db555edc8e7c4ec6b75c06edeb3"sv}, + Entry{"v1-002690-002700-blocksidecars.idx"sv, "a47a2168c65fd7037813b214f77b44ee1c6d8f4c"sv}, + Entry{"v1-002700-002710-blobsidecars.seg"sv, "db1caf088faad6055edef48202fdf07dbbf694d9"sv}, + Entry{"v1-002700-002710-blocksidecars.idx"sv, "8e259f2fef0b0613db333d04e0e7cb55d876a48b"sv}, + Entry{"v1-002710-002720-blobsidecars.seg"sv, "b8078eef892430408c78c406be12086f44535076"sv}, + Entry{"v1-002710-002720-blocksidecars.idx"sv, "684d7386a7b21e9054e1481394a94f39c8d1fa1a"sv}, + Entry{"v1-002720-002730-blobsidecars.seg"sv, "858750dd454f29351d647867eb3f206e6a092435"sv}, + Entry{"v1-002720-002730-blocksidecars.idx"sv, "c0c18429efebea56b2c1277967ca12980cbb238d"sv}, + Entry{"v1-002730-002740-blobsidecars.seg"sv, "a8a28e0420d400ca720dfc7b3da201d0703ed0fc"sv}, + Entry{"v1-002730-002740-blocksidecars.idx"sv, "5089ab3b2835d575fd066e07ac5e756e9ee17103"sv}, + Entry{"v1-002740-002750-blobsidecars.seg"sv, "9c2ae965aa2393bd1d6574c35d9f0ea7f6d5960a"sv}, + Entry{"v1-002740-002750-blocksidecars.idx"sv, "1f4607aadcaaca6622667c77d3fc3f971f2b24c8"sv}, + Entry{"v1-002750-002760-blobsidecars.seg"sv, "326d0aba65b7d5a1ac16949a1e338791d8f0bf77"sv}, + Entry{"v1-002750-002760-blocksidecars.idx"sv, "e9db3bf44ec6a9fddc08a851e3234e2fb768fc3f"sv}, + Entry{"v1-002760-002770-blobsidecars.seg"sv, "819f26885c9a27b4bcda5b27e5585d64b273ca91"sv}, + Entry{"v1-002760-002770-blocksidecars.idx"sv, "759df5bb0ef5f181b5cb4b8e3bc23fa8229ceb60"sv}, }; } // namespace silkworm::snapshots diff --git a/silkworm/db/datastore/snapshots/config/chains/mainnet.hpp b/silkworm/db/datastore/snapshots/config/chains/mainnet.hpp index 8ce296cf38..e0f69c1b80 100644 --- a/silkworm/db/datastore/snapshots/config/chains/mainnet.hpp +++ b/silkworm/db/datastore/snapshots/config/chains/mainnet.hpp @@ -36,12 +36,12 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"accessor/v1-accounts.1536-1600.vi"sv, "814ca9c16c602d80aeaf3ae1c7747ad3d8923132"sv}, Entry{"accessor/v1-accounts.1600-1632.efi"sv, "371002b4a4121c604d9c0374cb295861b185fd8f"sv}, Entry{"accessor/v1-accounts.1600-1632.vi"sv, "904499be1097f88638be41ff6bcd46eda3cb4dee"sv}, - Entry{"accessor/v1-accounts.1632-1640.efi"sv, "27cc6047f282d39398be9f321b9cb704ddea872f"sv}, - Entry{"accessor/v1-accounts.1632-1640.vi"sv, "048f998a66a280521509e715264756b43f198c67"sv}, - Entry{"accessor/v1-accounts.1640-1642.efi"sv, "e47fb05b455cbeb5c3509cf02dc739d1fc9fb0a0"sv}, - Entry{"accessor/v1-accounts.1640-1642.vi"sv, "cdbeb043ebc69b89aed0d1e12791de4b60324e4f"sv}, - Entry{"accessor/v1-accounts.1642-1643.efi"sv, "f2d614079899e3cdd2c1d7bf436190d2f100384b"sv}, - Entry{"accessor/v1-accounts.1642-1643.vi"sv, "6a7e6b9e2e040bbf6a388bf876e5626306b3c780"sv}, + Entry{"accessor/v1-accounts.1632-1648.efi"sv, "dbd0980f173e0bc0daa683cd15f3d76643910ec2"sv}, + Entry{"accessor/v1-accounts.1632-1648.vi"sv, "8fda67d418d971b267e40be96e3c7218f2a9983d"sv}, + Entry{"accessor/v1-accounts.1648-1656.efi"sv, "31e8da609731d9ed6068cf8156547a3438edbc53"sv}, + Entry{"accessor/v1-accounts.1648-1656.vi"sv, "edd209624dc7ac91e812e8e3a635f3796f80c19a"sv}, + Entry{"accessor/v1-accounts.1656-1660.efi"sv, "3a6de37102309c84757901c1dcb4d316596651c1"sv}, + Entry{"accessor/v1-accounts.1656-1660.vi"sv, "596b98067809f02c87ce7cc8845ffa2d2101141a"sv}, Entry{"accessor/v1-accounts.192-256.efi"sv, "5250b74e25dcb35ca3736e1dcc5bd7bf5b9da18f"sv}, Entry{"accessor/v1-accounts.192-256.vi"sv, "6e0c55335783922581fbca009a1e08cde7e4f30f"sv}, Entry{"accessor/v1-accounts.256-320.efi"sv, "7d91415757edbe0c397bea22a69d9a327052db0c"sv}, @@ -94,12 +94,12 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"accessor/v1-code.1536-1600.vi"sv, "d781adb4081dd8dd63a2a6a604d55b5fda02f1bd"sv}, Entry{"accessor/v1-code.1600-1632.efi"sv, "d6e65ed778d7193a7a0194e06b57d80feb991bdd"sv}, Entry{"accessor/v1-code.1600-1632.vi"sv, "b314def014ceb33b6c589cea0fadb09e417f6f85"sv}, - Entry{"accessor/v1-code.1632-1640.efi"sv, "8e4cc45d0a412896598f31a4a7c9b95c5722e2bf"sv}, - Entry{"accessor/v1-code.1632-1640.vi"sv, "c61a5740147b5b57d92b14bbafce7e9510f85a30"sv}, - Entry{"accessor/v1-code.1640-1642.efi"sv, "a6094b048d7451c1eac5aa13f035e0061bc80ded"sv}, - Entry{"accessor/v1-code.1640-1642.vi"sv, "76ef699261e0d79293d9164f3a3211e4dd4c8030"sv}, - Entry{"accessor/v1-code.1642-1643.efi"sv, "b319f88cbe82759113d62094cd8a4fc917fbba22"sv}, - Entry{"accessor/v1-code.1642-1643.vi"sv, "3050f6974354e05f5310ccfb2d4153476b99dacb"sv}, + Entry{"accessor/v1-code.1632-1648.efi"sv, "6eb1d905c961032bdc1f8f42a42548dce99622aa"sv}, + Entry{"accessor/v1-code.1632-1648.vi"sv, "45c391094db828503cf5085ee7566d2fc7c5a197"sv}, + Entry{"accessor/v1-code.1648-1656.efi"sv, "5094307228243c5d79670889bb7ba9426c65e4c4"sv}, + Entry{"accessor/v1-code.1648-1656.vi"sv, "478ad82a95ea06eb6ecd7dd249db4277bd49d0f8"sv}, + Entry{"accessor/v1-code.1656-1660.efi"sv, "33a7e79c906a12da2213de9895ea737012cd967d"sv}, + Entry{"accessor/v1-code.1656-1660.vi"sv, "677fd51d9132b95e62bd187b1677355f5d826f65"sv}, Entry{"accessor/v1-code.192-256.efi"sv, "f0368a0cc391ec006ea6d9c91b5fecfeecb53d59"sv}, Entry{"accessor/v1-code.192-256.vi"sv, "a0423fb43b7298d3cdcefb76d848ada5a159a1d3"sv}, Entry{"accessor/v1-code.256-320.efi"sv, "d0b42fd0bb429d8c9c3c988464a69ecc23267230"sv}, @@ -140,9 +140,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"accessor/v1-logaddrs.1472-1536.efi"sv, "21ca2e88f9038553ef92fd61c062ce9cb197e251"sv}, Entry{"accessor/v1-logaddrs.1536-1600.efi"sv, "468996833ab9e9627eaf47e64c53a53bede91b38"sv}, Entry{"accessor/v1-logaddrs.1600-1632.efi"sv, "810c71e31dd4b22695e402debe7c6b5b36ceea08"sv}, - Entry{"accessor/v1-logaddrs.1632-1640.efi"sv, "1e6f4b71668b65ade51d1295d70dc3da4acf94ae"sv}, - Entry{"accessor/v1-logaddrs.1640-1642.efi"sv, "173d49df79fed9cfbc55ee82fec147c3da56bf19"sv}, - Entry{"accessor/v1-logaddrs.1642-1643.efi"sv, "978849f162cbc0bd1841b52814f6741c423ab00e"sv}, + Entry{"accessor/v1-logaddrs.1632-1648.efi"sv, "b4eaed11d4a3b00a46246668f4cc285d1c947beb"sv}, + Entry{"accessor/v1-logaddrs.1648-1656.efi"sv, "c9267d4b209e1cb5c5f8d7f940c2e6bdbab9a86f"sv}, + Entry{"accessor/v1-logaddrs.1656-1660.efi"sv, "a9ea4f7079b528a212412818720e9410fb193775"sv}, Entry{"accessor/v1-logaddrs.192-256.efi"sv, "2b36adb4912fb7a5cc154337edd5cd29627ad1bd"sv}, Entry{"accessor/v1-logaddrs.256-320.efi"sv, "d47283216568422ca67bcc5da38600e2ebd1f744"sv}, Entry{"accessor/v1-logaddrs.320-384.efi"sv, "b79f2902cb3a163dc326a9aa02f369c289169672"sv}, @@ -169,9 +169,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"accessor/v1-logtopics.1472-1536.efi"sv, "9863974ca68cbf7f484d2aad83773489e1c2b061"sv}, Entry{"accessor/v1-logtopics.1536-1600.efi"sv, "d14597fdac304eb48468638eaa78c21e0e6e6088"sv}, Entry{"accessor/v1-logtopics.1600-1632.efi"sv, "37adee9b80d72f497b4a93ee8f645fef03d1527c"sv}, - Entry{"accessor/v1-logtopics.1632-1640.efi"sv, "006c8109dff03eb288688bec8f12e6c292434bd3"sv}, - Entry{"accessor/v1-logtopics.1640-1642.efi"sv, "2a6034e7426039336610a6615c6fad3b447cd418"sv}, - Entry{"accessor/v1-logtopics.1642-1643.efi"sv, "05bade934efb9f995e05e904c92f2ebf8a897769"sv}, + Entry{"accessor/v1-logtopics.1632-1648.efi"sv, "1e38e0f36332ea9a9b46cdfc0cc1a47cf244cd39"sv}, + Entry{"accessor/v1-logtopics.1648-1656.efi"sv, "7f164db3e43353c416749c336655c3f9e9700b88"sv}, + Entry{"accessor/v1-logtopics.1656-1660.efi"sv, "c6c0fee272ff9b26c99762358b78139cb75bf690"sv}, Entry{"accessor/v1-logtopics.192-256.efi"sv, "28db865ab28d0a993405b28db5de2ae71a109459"sv}, Entry{"accessor/v1-logtopics.256-320.efi"sv, "54bb195f553743f11fa4dd1963eafcb3a699e653"sv}, Entry{"accessor/v1-logtopics.320-384.efi"sv, "2904dfee33b3a44910fcb70cfe65f42f17e88706"sv}, @@ -212,12 +212,12 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"accessor/v1-receipt.1552-1554.vi"sv, "a6e92a677963cc608d174cb3e87b9f5b0df1921b"sv}, Entry{"accessor/v1-receipt.1554-1555.efi"sv, "296d10fdb3d5738a655e7eee2cd068210e80f1bb"sv}, Entry{"accessor/v1-receipt.1554-1555.vi"sv, "ba55184346a98fb3fd03488fb89ba7e36632140b"sv}, - Entry{"accessor/v1-receipt.1632-1640.efi"sv, "a8a4ab95fdf0f7bb3668725eab3acc17e2c1a41a"sv}, - Entry{"accessor/v1-receipt.1632-1640.vi"sv, "ba3b6e018c7ba7454424b1180176d4b4f19699bf"sv}, - Entry{"accessor/v1-receipt.1640-1642.efi"sv, "f66c75e9bbe0e9e47334d2870e9a6023f15f14fe"sv}, - Entry{"accessor/v1-receipt.1640-1642.vi"sv, "2f01f8248ab39c783567fb4528e94794ce2d60fb"sv}, - Entry{"accessor/v1-receipt.1642-1643.efi"sv, "1d6da1ee3f9f981a9d0b9c2efb60f910e12d4ce2"sv}, - Entry{"accessor/v1-receipt.1642-1643.vi"sv, "985196540efe24c6b19fb24b3db0f65e3cdf6210"sv}, + Entry{"accessor/v1-receipt.1632-1648.efi"sv, "a0af74cdfe69a55beee6ea29b6eed7c2ba1d2f89"sv}, + Entry{"accessor/v1-receipt.1632-1648.vi"sv, "a081b17f12df87c70de4a017963b337933d7e284"sv}, + Entry{"accessor/v1-receipt.1648-1656.efi"sv, "78c0daf50d63f51d2f499bfb34f475c27c97e8b0"sv}, + Entry{"accessor/v1-receipt.1648-1656.vi"sv, "575942fceb32cdb6036f5e466544ea12b88bf63d"sv}, + Entry{"accessor/v1-receipt.1656-1660.efi"sv, "a244660965e45e39deaf89ad6d2b4e03d5d4d56c"sv}, + Entry{"accessor/v1-receipt.1656-1660.vi"sv, "fe1f3c76dd3d0eb6b5a3e12c99d30903ad8b303d"sv}, Entry{"accessor/v1-receipt.192-256.efi"sv, "427ec825c785c7955c998eb2df3a0a422a935333"sv}, Entry{"accessor/v1-receipt.192-256.vi"sv, "5cd000abc04d82119c6491142f81dde7e65a1a47"sv}, Entry{"accessor/v1-receipt.256-320.efi"sv, "c8b7701caa801f2ce0c73eda7e3a8b609ef0458f"sv}, @@ -270,12 +270,12 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"accessor/v1-storage.1536-1600.vi"sv, "cc64a2e9a8c40601263009da22229680b205ecbf"sv}, Entry{"accessor/v1-storage.1600-1632.efi"sv, "470157497c9b191e1627814c8df539d0445c0732"sv}, Entry{"accessor/v1-storage.1600-1632.vi"sv, "f6853b90c4147007f923b0a579d75237c5cda75e"sv}, - Entry{"accessor/v1-storage.1632-1640.efi"sv, "6237e3eb305d776386bb6dbb6acc935bf205306f"sv}, - Entry{"accessor/v1-storage.1632-1640.vi"sv, "1cf814e84f05a1305d3b2f58a2426d2269e03020"sv}, - Entry{"accessor/v1-storage.1640-1642.efi"sv, "c051995e166e920e8cf4b9f17a3326cb19727df2"sv}, - Entry{"accessor/v1-storage.1640-1642.vi"sv, "8948812928455169af4d452bf85b7fd5b2745390"sv}, - Entry{"accessor/v1-storage.1642-1643.efi"sv, "f79f365f58a2f1738047750291d7bd545f018575"sv}, - Entry{"accessor/v1-storage.1642-1643.vi"sv, "326dc0b75462b53845c5f6c0bbd5d5f67042b170"sv}, + Entry{"accessor/v1-storage.1632-1648.efi"sv, "e9a82ea9b0274b474b81a21a89aa242ea66aebc8"sv}, + Entry{"accessor/v1-storage.1632-1648.vi"sv, "92654ddf6c4eeb9f8c1960a81933bb312a721309"sv}, + Entry{"accessor/v1-storage.1648-1656.efi"sv, "1818ff1341d3bd4372f2e7d7f8ad2518b592350e"sv}, + Entry{"accessor/v1-storage.1648-1656.vi"sv, "8642b4923965caf9365a75c15c328877ce44399e"sv}, + Entry{"accessor/v1-storage.1656-1660.efi"sv, "b917ea4e9e8e1779b94b8f6794090b62607eaf10"sv}, + Entry{"accessor/v1-storage.1656-1660.vi"sv, "ec4f3f9585b98cebf7be8ca679c21d168acf71ae"sv}, Entry{"accessor/v1-storage.192-256.efi"sv, "778dab2a9e2a64d360e3e77506026605c2130a2e"sv}, Entry{"accessor/v1-storage.192-256.vi"sv, "05046abbd3579a2cc0911d9c8ed86ff49853dc40"sv}, Entry{"accessor/v1-storage.256-320.efi"sv, "32984c33db94b1c0bcde9f2f61f44ffbee7376b3"sv}, @@ -316,9 +316,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"accessor/v1-tracesfrom.1472-1536.efi"sv, "45b68794d3ef18406904e2597493a2f1e373b34a"sv}, Entry{"accessor/v1-tracesfrom.1536-1600.efi"sv, "af2f43e107c4182a41f72173647633719da227a5"sv}, Entry{"accessor/v1-tracesfrom.1600-1632.efi"sv, "707e146639048ad6dfe61c19f2c750c80f775dde"sv}, - Entry{"accessor/v1-tracesfrom.1632-1640.efi"sv, "32b290827f30e68b2fdd28b1ba8c87faad690833"sv}, - Entry{"accessor/v1-tracesfrom.1640-1642.efi"sv, "103d0345b69bc7cd7f52293b2fa45ade7f1fd6cb"sv}, - Entry{"accessor/v1-tracesfrom.1642-1643.efi"sv, "95342ee46ac3d683a98a54669160e69918ce3c78"sv}, + Entry{"accessor/v1-tracesfrom.1632-1648.efi"sv, "8c39e69d1d0f904dfdb76287f775cab8e940d8a8"sv}, + Entry{"accessor/v1-tracesfrom.1648-1656.efi"sv, "99e0862994ae65a2cf7012e6b062f17851fc71bb"sv}, + Entry{"accessor/v1-tracesfrom.1656-1660.efi"sv, "dd81e7b7cc3fcd56e16fc2afbb8f79d59bbdbd1d"sv}, Entry{"accessor/v1-tracesfrom.192-256.efi"sv, "13b875cf4c0d166c66c9528c9011339500275924"sv}, Entry{"accessor/v1-tracesfrom.256-320.efi"sv, "f4f0b1e2af1142bded6bff1d180b1c85320b8eb6"sv}, Entry{"accessor/v1-tracesfrom.320-384.efi"sv, "6b374a197038bf5571d046d079c57d587dd84a83"sv}, @@ -345,9 +345,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"accessor/v1-tracesto.1472-1536.efi"sv, "d0fcd1573ded7d34092df3d736fa4134f9691f88"sv}, Entry{"accessor/v1-tracesto.1536-1600.efi"sv, "97d01359e10c8ae0e711d1b46eed31084da9e446"sv}, Entry{"accessor/v1-tracesto.1600-1632.efi"sv, "91094ba0a011b4bfbebadfa1f1058d1d695d4036"sv}, - Entry{"accessor/v1-tracesto.1632-1640.efi"sv, "5857783bfb88e3428d5c4ca5d4387f39ce48cb1c"sv}, - Entry{"accessor/v1-tracesto.1640-1642.efi"sv, "f91ede0ce741baa7ae2bf7dfe7d5fd25a50b4b37"sv}, - Entry{"accessor/v1-tracesto.1642-1643.efi"sv, "79759f06aa561f466026cdafa8271ac9b6d48a04"sv}, + Entry{"accessor/v1-tracesto.1632-1648.efi"sv, "7656ff04b4b35157c80dd2f50f9b25d9e65a881c"sv}, + Entry{"accessor/v1-tracesto.1648-1656.efi"sv, "ce8a70b71247b6dc73f621dc3d9275c50b6b7eb5"sv}, + Entry{"accessor/v1-tracesto.1656-1660.efi"sv, "0581a374525d4ccc6858f29c7bfc4fa75dae2b97"sv}, Entry{"accessor/v1-tracesto.192-256.efi"sv, "77c4e74375841574c142bac6aaff9935eaa0c84b"sv}, Entry{"accessor/v1-tracesto.256-320.efi"sv, "5f90765a393e398bf18001ca69f0bab7300e127d"sv}, Entry{"accessor/v1-tracesto.320-384.efi"sv, "6b44aea6ea7d9f9039a1f261a240e2e2ac4b6078"sv}, @@ -374,15 +374,15 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"domain/v1-accounts.1600-1632.bt"sv, "0454cf29f2e4f527c76aab0b058e5c79713c2ed7"sv}, Entry{"domain/v1-accounts.1600-1632.kv"sv, "86577963be8756c9e040e42af1356a9d8725d16b"sv}, Entry{"domain/v1-accounts.1600-1632.kvei"sv, "f60e43b8a14aa1f594cd42a1a70e9d1bc13ee39c"sv}, - Entry{"domain/v1-accounts.1632-1640.bt"sv, "aa9c9f58cc4da19de9c937b897bf6efb5238d0ff"sv}, - Entry{"domain/v1-accounts.1632-1640.kv"sv, "329ec9e0bf6ee2f6f246ad0badd965d4a7f99105"sv}, - Entry{"domain/v1-accounts.1632-1640.kvei"sv, "ca9c79a73167b6742dc6f8e43612229331c3737c"sv}, - Entry{"domain/v1-accounts.1640-1642.bt"sv, "0a44c4f53c5a91f22cb84c8fe513b653de0577ad"sv}, - Entry{"domain/v1-accounts.1640-1642.kv"sv, "50a07f0114347db898d4b9e1150ef4ab4dc030f3"sv}, - Entry{"domain/v1-accounts.1640-1642.kvei"sv, "b97a50fdedda442f8c69cb76e343b4cb46d63c78"sv}, - Entry{"domain/v1-accounts.1642-1643.bt"sv, "1e0e99402da4895342e63c61c55f6ebe164de593"sv}, - Entry{"domain/v1-accounts.1642-1643.kv"sv, "9cf8e6627e1f533714ba02e0fdfb608d508d7ca9"sv}, - Entry{"domain/v1-accounts.1642-1643.kvei"sv, "fa1a948d66feddf78b00deb4cc4a878cefa4115e"sv}, + Entry{"domain/v1-accounts.1632-1648.bt"sv, "ff4792a9cc4abea47a0501b64556093962b112d6"sv}, + Entry{"domain/v1-accounts.1632-1648.kv"sv, "445ef98d4a0614e304bc9303d7b8cf43e3bc2215"sv}, + Entry{"domain/v1-accounts.1632-1648.kvei"sv, "1bf64a9f5b6ef4382c4a463a4115cbd1fdbc6826"sv}, + Entry{"domain/v1-accounts.1648-1656.bt"sv, "5746fac19a32961f8fb37b129d06bc52c8f5698f"sv}, + Entry{"domain/v1-accounts.1648-1656.kv"sv, "f9c9e150ea82d42fe9b4d65c6363aef7bb65045a"sv}, + Entry{"domain/v1-accounts.1648-1656.kvei"sv, "34e38f43e12200999df875d996f374a3f45d8615"sv}, + Entry{"domain/v1-accounts.1656-1660.bt"sv, "f76879f4860a92d3a414d5909749952523f206fc"sv}, + Entry{"domain/v1-accounts.1656-1660.kv"sv, "ea2016ebe1a810893ed6c81e77976245fcbf60e8"sv}, + Entry{"domain/v1-accounts.1656-1660.kvei"sv, "3dd2d9d07e0d6fa84850d9b04645d7f78f4488bc"sv}, Entry{"domain/v1-code.0-1024.bt"sv, "144163f30b34bbdb56d4cca09406064874413faa"sv}, Entry{"domain/v1-code.0-1024.kv"sv, "4db69e01336545ac6384fe5c94240af610d65783"sv}, Entry{"domain/v1-code.0-1024.kvei"sv, "6087473d01eecf346435a94e692ecc6cb6639628"sv}, @@ -395,36 +395,36 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"domain/v1-code.1600-1632.bt"sv, "2dd856c6afff576dd336794abbc1f92a82f3efe3"sv}, Entry{"domain/v1-code.1600-1632.kv"sv, "a9ecd059cde2d235bb629dc58efd65fce615a010"sv}, Entry{"domain/v1-code.1600-1632.kvei"sv, "19711e32ec1be51694cdbef374aaf2502d741d42"sv}, - Entry{"domain/v1-code.1632-1640.bt"sv, "a9e0875e6b73c6caf40df681d58ea4f96821f7b9"sv}, - Entry{"domain/v1-code.1632-1640.kv"sv, "b542e46b21289473cef0573ad53741a13b884192"sv}, - Entry{"domain/v1-code.1632-1640.kvei"sv, "43f092a474c0caa8aa90ce5af4358a1d3ff4f05a"sv}, - Entry{"domain/v1-code.1640-1642.bt"sv, "7dfe2a18acccad630ac69c0cc7fc0783abe2fcc0"sv}, - Entry{"domain/v1-code.1640-1642.kv"sv, "d0496ea1be1dc6285686ab809baeb2d1d454d62d"sv}, - Entry{"domain/v1-code.1640-1642.kvei"sv, "cf064406d28e7eed93c7a12e96131a601793a3fa"sv}, - Entry{"domain/v1-code.1642-1643.bt"sv, "0e42eff16c2c79c8d947ab77fc21a72c657f56cb"sv}, - Entry{"domain/v1-code.1642-1643.kv"sv, "884285c3b3787f2e6b47b27fb4f5ed9d381e27f8"sv}, - Entry{"domain/v1-code.1642-1643.kvei"sv, "52c5a99e3f357cfd5725731c1fbcf06674a8a4fd"sv}, - Entry{"domain/v1-commitment.0-1024.bt"sv, "b9afc40f9c4f3fce3c75e8ad2cb41ab822c1de87"sv}, - Entry{"domain/v1-commitment.0-1024.kv"sv, "8686360e3dad9bdda9738dd8dcb2529baf10002e"sv}, - Entry{"domain/v1-commitment.0-1024.kvei"sv, "25fc505c74dce2b16049c84f190c462906d36ad3"sv}, - Entry{"domain/v1-commitment.1024-1536.bt"sv, "0b97555905d0ce121aea52717bd20f87cc28524f"sv}, - Entry{"domain/v1-commitment.1024-1536.kv"sv, "fb79c40fa929ea049e84a29d391444b42df61ae3"sv}, - Entry{"domain/v1-commitment.1024-1536.kvei"sv, "c2b27095a868cf05917385cf805f032988dbbd1e"sv}, - Entry{"domain/v1-commitment.1536-1600.bt"sv, "dc46c34d98d1708490b9f893dca1e8229c37ffce"sv}, - Entry{"domain/v1-commitment.1536-1600.kv"sv, "8a5bdfe2ca434001c5600450acf14b61ed2338e2"sv}, - Entry{"domain/v1-commitment.1536-1600.kvei"sv, "f3fd97bc07e668f16106a614b9f1b4c2bd1ab1e3"sv}, - Entry{"domain/v1-commitment.1600-1632.bt"sv, "c9e0bc21467477e8bec62ecf5680d7c6aa3944b6"sv}, - Entry{"domain/v1-commitment.1600-1632.kv"sv, "da1160771b87d5da2d2f6413aa3c57cafe71c05a"sv}, - Entry{"domain/v1-commitment.1600-1632.kvei"sv, "1907b284f3cba743432f18a3eb17101052133702"sv}, - Entry{"domain/v1-commitment.1632-1640.bt"sv, "47d62b17e020efa80490b8a9aedbb678596c95dd"sv}, - Entry{"domain/v1-commitment.1632-1640.kv"sv, "74b7db3d3e1be70af677f7f03d520e6396b6ecea"sv}, - Entry{"domain/v1-commitment.1632-1640.kvei"sv, "06eb9013c9b2c4418ab8e50b1133196ac604be7b"sv}, - Entry{"domain/v1-commitment.1640-1642.bt"sv, "fac49ac49f35a28118e038577952fbd73e9a0e8b"sv}, - Entry{"domain/v1-commitment.1640-1642.kv"sv, "4bcc6ae14af1d9e5bbe1083dd5a70256f89cc676"sv}, - Entry{"domain/v1-commitment.1640-1642.kvei"sv, "3703e2d2cc18186e539a158c2c0153309fd3dc73"sv}, - Entry{"domain/v1-commitment.1642-1643.bt"sv, "734e2b8e4f029a8eed31be012627eea40543a0f0"sv}, - Entry{"domain/v1-commitment.1642-1643.kv"sv, "f9041724280a237838a7e1c3159c3c05037649b7"sv}, - Entry{"domain/v1-commitment.1642-1643.kvei"sv, "f3956c56b47cd4240975895cfb04d0bfe7cb13fb"sv}, + Entry{"domain/v1-code.1632-1648.bt"sv, "8a65867001c5f6a19a131c8a032bd616ff830520"sv}, + Entry{"domain/v1-code.1632-1648.kv"sv, "a5cac685cd437efcce0d7900bf694749426d11b4"sv}, + Entry{"domain/v1-code.1632-1648.kvei"sv, "fa0145bca97a02b1704eb2030eea37745943164a"sv}, + Entry{"domain/v1-code.1648-1656.bt"sv, "c527e20920ee6f1b72c1ac9ac507421990e13781"sv}, + Entry{"domain/v1-code.1648-1656.kv"sv, "95cc864713e65c8ad78d323f2444a59148936d97"sv}, + Entry{"domain/v1-code.1648-1656.kvei"sv, "0062b6a1658b0719ad298d394e7fe03000c3d576"sv}, + Entry{"domain/v1-code.1656-1660.bt"sv, "6816cbba872dc07ba5b70a48f2738be1d7e02ed6"sv}, + Entry{"domain/v1-code.1656-1660.kv"sv, "c2b59079a758f031634c2e0cc498924b2cfcaa1c"sv}, + Entry{"domain/v1-code.1656-1660.kvei"sv, "0721c8b6c14ededdfff73ea676577540ba97a165"sv}, + Entry{"domain/v1-commitment.0-1024.bt"sv, "42bc266fbd927f590ce46734da4f8ba07cf50f8d"sv}, + Entry{"domain/v1-commitment.0-1024.kv"sv, "c2193bde00469b9e910f1e3e2b8e19f271e4d134"sv}, + Entry{"domain/v1-commitment.0-1024.kvei"sv, "c297f35863e4f94df2f667fc205105b345078fc5"sv}, + Entry{"domain/v1-commitment.1024-1536.bt"sv, "850559907a34b40c2d40813439153f5a2c2a9a5c"sv}, + Entry{"domain/v1-commitment.1024-1536.kv"sv, "010a283bca95f2210041166633856db5148c9999"sv}, + Entry{"domain/v1-commitment.1024-1536.kvei"sv, "add1f634380ffa97f1f9e497e9baa3afcc227008"sv}, + Entry{"domain/v1-commitment.1536-1600.bt"sv, "0aaee09251800828a210e839cc66cb534d345146"sv}, + Entry{"domain/v1-commitment.1536-1600.kv"sv, "b784e42c325026aaf5aaa929bb8aa25fcf912d6e"sv}, + Entry{"domain/v1-commitment.1536-1600.kvei"sv, "8e89da1957edf81fedcf6ef5d71ac045d7da6372"sv}, + Entry{"domain/v1-commitment.1600-1632.bt"sv, "2f90e0e7340bc3bb71b2b7121700ca4097a04eae"sv}, + Entry{"domain/v1-commitment.1600-1632.kv"sv, "af8a762f704ae9f5fb18aa2c69614a86f32fadb0"sv}, + Entry{"domain/v1-commitment.1600-1632.kvei"sv, "33146b424ccf91e3a86b4a20bd976c093c8a8d66"sv}, + Entry{"domain/v1-commitment.1632-1648.bt"sv, "872f0f3b60c7496bc631e94e1d0439dce7ee23c9"sv}, + Entry{"domain/v1-commitment.1632-1648.kv"sv, "84db7d3a7124296822efcd59832c8d8db82a4aa1"sv}, + Entry{"domain/v1-commitment.1632-1648.kvei"sv, "2e5f72db8659943cf6e303ecb83c4e09fff3fee0"sv}, + Entry{"domain/v1-commitment.1648-1656.bt"sv, "b87907ef205b301eb6d59b0a720f76dcf0523959"sv}, + Entry{"domain/v1-commitment.1648-1656.kv"sv, "4eac8bdfd9f38ba5f49347c14d83192b5cfc4aee"sv}, + Entry{"domain/v1-commitment.1648-1656.kvei"sv, "8ee77c37219e2ac8261489a54bd952f1fbb1ab59"sv}, + Entry{"domain/v1-commitment.1656-1660.bt"sv, "78ee8bfeb00ddf41ba517053195be070c4ab791a"sv}, + Entry{"domain/v1-commitment.1656-1660.kv"sv, "d6f0069822d37a078c509e6cec945838cb40814d"sv}, + Entry{"domain/v1-commitment.1656-1660.kvei"sv, "4e82eb152e7282e9ff0f8e2ef959ba790c6b71a1"sv}, Entry{"domain/v1-receipt.0-1024.bt"sv, "5c3a0627b9f1517aa998c3e8c126e5e6b3ce7665"sv}, Entry{"domain/v1-receipt.0-1024.kv"sv, "5eed351ef984645049e6cdbfe5c83503db3ac3f4"sv}, Entry{"domain/v1-receipt.0-1024.kvei"sv, "5d442031fc6909c53c2da69531e00a810840c12a"sv}, @@ -440,15 +440,15 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"domain/v1-receipt.1554-1555.bt"sv, "d8fd32231004b15c3e45341fc248b664a12aacea"sv}, Entry{"domain/v1-receipt.1554-1555.kv"sv, "6631abd1309a03c4aa58823eb80f3b2e2442233b"sv}, Entry{"domain/v1-receipt.1554-1555.kvei"sv, "418843d2c1388df50602b7c3808e0d8124ce60d5"sv}, - Entry{"domain/v1-receipt.1632-1640.bt"sv, "45a0673828b1545c45d59c7d5c3463fdc63b557b"sv}, - Entry{"domain/v1-receipt.1632-1640.kv"sv, "6f25de48e204a144041722fbc425b04235cdb043"sv}, - Entry{"domain/v1-receipt.1632-1640.kvei"sv, "cd73f1fc86532a03528d7ab6e8efcfc681df5164"sv}, - Entry{"domain/v1-receipt.1640-1642.bt"sv, "a921eccc47dd0196623af013d0753d3319ae7cf1"sv}, - Entry{"domain/v1-receipt.1640-1642.kv"sv, "9e12dd5f8c1d4490512c1bff3d737b6e138db44f"sv}, - Entry{"domain/v1-receipt.1640-1642.kvei"sv, "530e2dadbf94855653bee84ecfad0ef6fcc43104"sv}, - Entry{"domain/v1-receipt.1642-1643.bt"sv, "c41a4b0734a6a777662c218f6a30acd3fef41917"sv}, - Entry{"domain/v1-receipt.1642-1643.kv"sv, "45b845d9d83149209826495d7d3e2419cec20eef"sv}, - Entry{"domain/v1-receipt.1642-1643.kvei"sv, "231f383e6e5b10d1d561d7a563f34ceb69029c81"sv}, + Entry{"domain/v1-receipt.1632-1648.bt"sv, "07f13134df8c75808685617207dcf70a84789503"sv}, + Entry{"domain/v1-receipt.1632-1648.kv"sv, "5deac15de85943b5c5b1872bd0e823d37728f91e"sv}, + Entry{"domain/v1-receipt.1632-1648.kvei"sv, "92adc1ee5c0266e431b8849c60ae7448d5bb8780"sv}, + Entry{"domain/v1-receipt.1648-1656.bt"sv, "80719a7c4f5ec98ba8906daa875cd33634f5a8bf"sv}, + Entry{"domain/v1-receipt.1648-1656.kv"sv, "41db8669ef4078e9d58f7e6bcb955472490d4d60"sv}, + Entry{"domain/v1-receipt.1648-1656.kvei"sv, "fece440226e44cc0ee631c1b9d73d698f472e24f"sv}, + Entry{"domain/v1-receipt.1656-1660.bt"sv, "1cc566cd4da1447fa42ab52987effa72f21340bc"sv}, + Entry{"domain/v1-receipt.1656-1660.kv"sv, "660dc419136ed5b89cb2340be465fdaefc98bb12"sv}, + Entry{"domain/v1-receipt.1656-1660.kvei"sv, "5f91fead7b3bb2b4ba4de8297848853cc8858967"sv}, Entry{"domain/v1-storage.0-1024.bt"sv, "84b3cd2ab0be41179fb92d94a573311e34d996e8"sv}, Entry{"domain/v1-storage.0-1024.kv"sv, "b01fd2c9bdfbe1ffa16db0f4871ed3eea85816b3"sv}, Entry{"domain/v1-storage.0-1024.kvei"sv, "f62ec238ff307a2c54b52411bc0bb95a85b67a62"sv}, @@ -461,15 +461,15 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"domain/v1-storage.1600-1632.bt"sv, "d2bf9e96b3589f5642742b0bf40b1d674318cbcb"sv}, Entry{"domain/v1-storage.1600-1632.kv"sv, "27a1bc4fda6f75beb7e384cd29e9eee3598b517e"sv}, Entry{"domain/v1-storage.1600-1632.kvei"sv, "5fe4b9b60753ea0012cfa3b49bd60eb6f339533f"sv}, - Entry{"domain/v1-storage.1632-1640.bt"sv, "f3449e6115e0d7f2b0bfd95f27a405cc2f8df071"sv}, - Entry{"domain/v1-storage.1632-1640.kv"sv, "842a567d0a6f602048b37584b46da341ce8019f0"sv}, - Entry{"domain/v1-storage.1632-1640.kvei"sv, "6f0320637d416250af7eef8b3d871e6910a6927c"sv}, - Entry{"domain/v1-storage.1640-1642.bt"sv, "ea0f7fae58ea821af280a96e38ffb712955d1096"sv}, - Entry{"domain/v1-storage.1640-1642.kv"sv, "7714d98e172d000b921ab6beab13ec0f292b0392"sv}, - Entry{"domain/v1-storage.1640-1642.kvei"sv, "ad2c1872e715c652009ada306a66d30353b664f4"sv}, - Entry{"domain/v1-storage.1642-1643.bt"sv, "e823e49384e6b4f7b1f7544a9faad277624177ec"sv}, - Entry{"domain/v1-storage.1642-1643.kv"sv, "8b34d528e837f7192af71cce422ad9fc08abe38e"sv}, - Entry{"domain/v1-storage.1642-1643.kvei"sv, "6238c2ae09956532508519ee4898d343b8cc1174"sv}, + Entry{"domain/v1-storage.1632-1648.bt"sv, "7e735a2617bc9abf4bfe97cbcdd1280a282da791"sv}, + Entry{"domain/v1-storage.1632-1648.kv"sv, "59e2523d5e146c0a0439120b083349d9ef411442"sv}, + Entry{"domain/v1-storage.1632-1648.kvei"sv, "078f29afb17be19375dc86ed71f90c311742b587"sv}, + Entry{"domain/v1-storage.1648-1656.bt"sv, "9afe9972b5bb424d298031aafe319bf3e9df34a9"sv}, + Entry{"domain/v1-storage.1648-1656.kv"sv, "915c9e5435e728168a31614851a52a7edbf3e158"sv}, + Entry{"domain/v1-storage.1648-1656.kvei"sv, "1633ca0b3e134cc72146362709cca6bdc70b9cae"sv}, + Entry{"domain/v1-storage.1656-1660.bt"sv, "eb9f95c0941216d881ff59acda8fa0f750a67323"sv}, + Entry{"domain/v1-storage.1656-1660.kv"sv, "8638004750f6266e400447e087ac0673cb9c3e8c"sv}, + Entry{"domain/v1-storage.1656-1660.kvei"sv, "378b89eddab3501acad066f475c1d742b3be3f71"sv}, Entry{"history/v1-accounts.0-64.v"sv, "238eb7b044f929d76957bc09e969ee20082cbb5a"sv}, Entry{"history/v1-accounts.1024-1088.v"sv, "689f9920430f39bf038de812b828914139d77e9d"sv}, Entry{"history/v1-accounts.1088-1152.v"sv, "d560fed1b26a82c4dccc4fcae20ea16b873d1018"sv}, @@ -482,9 +482,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"history/v1-accounts.1472-1536.v"sv, "65ee1a574c475466cf1c4c26a1f73a02d36c590d"sv}, Entry{"history/v1-accounts.1536-1600.v"sv, "8ed5a46bc24dde168dd1c1f01b1d5eb589466597"sv}, Entry{"history/v1-accounts.1600-1632.v"sv, "57b900836b5a9848d84e79874e4f4694a7b0f40a"sv}, - Entry{"history/v1-accounts.1632-1640.v"sv, "99a79b10308caa30ccd530e6e0e8efa6bb80dd4c"sv}, - Entry{"history/v1-accounts.1640-1642.v"sv, "d26fb2ffad55baa084a48ea7af2873ced3b13b2c"sv}, - Entry{"history/v1-accounts.1642-1643.v"sv, "12bb9b00c04d49bdfe270414c978e1a8b3bee518"sv}, + Entry{"history/v1-accounts.1632-1648.v"sv, "1c849c0f0f84cd4cb0251f8357279ef3d4f43409"sv}, + Entry{"history/v1-accounts.1648-1656.v"sv, "66cf318545308b7b5ddae4bfc885a4b4dbc49c73"sv}, + Entry{"history/v1-accounts.1656-1660.v"sv, "3dea74ae3d63c94ae9f8d43679cd53b53ba28b2e"sv}, Entry{"history/v1-accounts.192-256.v"sv, "7f79d974e236f0cfb3f325e2a007256e6e2f16af"sv}, Entry{"history/v1-accounts.256-320.v"sv, "6c7eba40888ed6e86eb1dd611b139a7eea24a5c1"sv}, Entry{"history/v1-accounts.320-384.v"sv, "73ced8c3c2baf0f050d688c643fe6dfe36043841"sv}, @@ -511,9 +511,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"history/v1-code.1472-1536.v"sv, "13deac039e87cbef09714cc452ca843d5cc34477"sv}, Entry{"history/v1-code.1536-1600.v"sv, "53a9953733c3698c43948b5da38351021513b64d"sv}, Entry{"history/v1-code.1600-1632.v"sv, "97bd49bc25aec70713fbb2e44d90b22bc58bb627"sv}, - Entry{"history/v1-code.1632-1640.v"sv, "1e4c24b6544adb733d8cfc6147f3e6bcd1a0c189"sv}, - Entry{"history/v1-code.1640-1642.v"sv, "8953cb62acbcbab66a7da54117b1898f3acc945c"sv}, - Entry{"history/v1-code.1642-1643.v"sv, "b5619893110cee807a5898f44948ec7ef91916e5"sv}, + Entry{"history/v1-code.1632-1648.v"sv, "41855c4c8b30bbeebcea9e30123441056f869b60"sv}, + Entry{"history/v1-code.1648-1656.v"sv, "75deed36da11418533cd52affd7081e249b0163f"sv}, + Entry{"history/v1-code.1656-1660.v"sv, "71f93ec6145b108d4b8eecc5908a9850ab2418e4"sv}, Entry{"history/v1-code.192-256.v"sv, "b3643c80d6549a3e6096ab076f91084c4abeec92"sv}, Entry{"history/v1-code.256-320.v"sv, "cd33eddafb456ec8b0f484359fa298fd51cbd6ce"sv}, Entry{"history/v1-code.320-384.v"sv, "9b0048617155a6b56801fb0b7454c22a2ebd76fe"sv}, @@ -541,9 +541,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"history/v1-receipt.1536-1552.v"sv, "0bfee7865f9d62e411c3cd9f942ea19a3d0854b5"sv}, Entry{"history/v1-receipt.1552-1554.v"sv, "675155f1efe30548537a253a6dd3ce48a7f6407e"sv}, Entry{"history/v1-receipt.1554-1555.v"sv, "ed90a85a8a25c9d8a5fc69a682e7e67c5fcad157"sv}, - Entry{"history/v1-receipt.1632-1640.v"sv, "ac9312a191c0281428262e4709694a1d44728fbc"sv}, - Entry{"history/v1-receipt.1640-1642.v"sv, "e919e84e538ce229fc8b11cd548b0be77834fa52"sv}, - Entry{"history/v1-receipt.1642-1643.v"sv, "96bd9a7c01c746a538c647195790266f2ec329f3"sv}, + Entry{"history/v1-receipt.1632-1648.v"sv, "af64ddc97f1dc00b494073631e9a101fd78afeb3"sv}, + Entry{"history/v1-receipt.1648-1656.v"sv, "8b984bd2ac74db3cdb6a34dd156510ad8baa6350"sv}, + Entry{"history/v1-receipt.1656-1660.v"sv, "7bd05a2fadeaf6382d5d5f6553f075da1022604e"sv}, Entry{"history/v1-receipt.192-256.v"sv, "53e382b9e81706476bc3604ffdcac2e0c8d1cdf4"sv}, Entry{"history/v1-receipt.256-320.v"sv, "f29677bf406757031f2d4b2ef9d71d57cf0b2933"sv}, Entry{"history/v1-receipt.320-384.v"sv, "f5d4e7e91de27362343061781151ebc015da6396"sv}, @@ -570,9 +570,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"history/v1-storage.1472-1536.v"sv, "784cf9fbdaa12b3c2ac497aa78f18bb11e54f614"sv}, Entry{"history/v1-storage.1536-1600.v"sv, "eae544eb5b9a6bb9369f9bcddc0e3216a2fee32f"sv}, Entry{"history/v1-storage.1600-1632.v"sv, "3e148dced8f6e58a40a75f9ba43ed7f43a0befe3"sv}, - Entry{"history/v1-storage.1632-1640.v"sv, "616209b25c6c56f5a9b294039fd8e9141fa72dc9"sv}, - Entry{"history/v1-storage.1640-1642.v"sv, "b5a4d77eb62b4f22ff672ebd2e28f8462d91edea"sv}, - Entry{"history/v1-storage.1642-1643.v"sv, "98ae0f7f93f8170fa6b4531ab12f2cd8d3bdfe91"sv}, + Entry{"history/v1-storage.1632-1648.v"sv, "371a6e221a216fbc8f28f0115d0d477a566020be"sv}, + Entry{"history/v1-storage.1648-1656.v"sv, "dbf42578e40902763a04a7c6e4d0f593e0e75a6a"sv}, + Entry{"history/v1-storage.1656-1660.v"sv, "509635edd6bb68c3c139b4f18db7ba3317e96963"sv}, Entry{"history/v1-storage.192-256.v"sv, "63cd68b6e772eeb1e92c8c3abed55a2ac3e96d0b"sv}, Entry{"history/v1-storage.256-320.v"sv, "4499c3cebdb95a72f134c6237170e8a2d1dc24b0"sv}, Entry{"history/v1-storage.320-384.v"sv, "5638a6eae0cee599beb08cbad394ada84cb04cca"sv}, @@ -599,9 +599,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"idx/v1-accounts.1472-1536.ef"sv, "49e0c6224229be5dfcbbb6f9d39f8e58f5d2b395"sv}, Entry{"idx/v1-accounts.1536-1600.ef"sv, "b58ae91fc504f0829f7a468ce49eb4c06a801078"sv}, Entry{"idx/v1-accounts.1600-1632.ef"sv, "f7712fc9f00988fe173370f8b89b26363b30b4cd"sv}, - Entry{"idx/v1-accounts.1632-1640.ef"sv, "ff601b595f883f87c50a6c6287fdc458739be0c8"sv}, - Entry{"idx/v1-accounts.1640-1642.ef"sv, "e22ff2ea982b592c8cd9d985b3a5563a9b51f275"sv}, - Entry{"idx/v1-accounts.1642-1643.ef"sv, "163c5cdad43bc614d3a0c1ac3cb2f1a7815a9b4c"sv}, + Entry{"idx/v1-accounts.1632-1648.ef"sv, "0a939c97c062f7d3f508bbbc21db07478a7100d7"sv}, + Entry{"idx/v1-accounts.1648-1656.ef"sv, "73c26043c045f054881761a5822c32c86ec014b0"sv}, + Entry{"idx/v1-accounts.1656-1660.ef"sv, "835db78ed37358859729ae8880f71f40b036b4b7"sv}, Entry{"idx/v1-accounts.192-256.ef"sv, "6d56558aa79bc82874b24c9f03748accdedb7b2e"sv}, Entry{"idx/v1-accounts.256-320.ef"sv, "c536fe08e46979ba16c3b03501a25b7d9e73d71b"sv}, Entry{"idx/v1-accounts.320-384.ef"sv, "449d7da06dfd9fe49a9e8b1e08352730236b3fc7"sv}, @@ -628,9 +628,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"idx/v1-code.1472-1536.ef"sv, "5d537ea2e0232035b4d05ab52d6310fa339f74af"sv}, Entry{"idx/v1-code.1536-1600.ef"sv, "1c849b74a67bf1d70bc5ebfeeb6a3909b56fee21"sv}, Entry{"idx/v1-code.1600-1632.ef"sv, "6ff114b55211fa1216d2705192bb3e48315b09ea"sv}, - Entry{"idx/v1-code.1632-1640.ef"sv, "fe623528f262bf690d8636ef71a24f8ce7eaa120"sv}, - Entry{"idx/v1-code.1640-1642.ef"sv, "3534a0e58c99e69e44dcd24f42a6ad87344d8cac"sv}, - Entry{"idx/v1-code.1642-1643.ef"sv, "aaa76a5b6404c7ae0af96d8cf40fb17b280661f3"sv}, + Entry{"idx/v1-code.1632-1648.ef"sv, "cf2da9562e7d5d94830a40c908839bb6da623d8a"sv}, + Entry{"idx/v1-code.1648-1656.ef"sv, "947cbc2cae7192b4caec4f367b629a28ec10fb71"sv}, + Entry{"idx/v1-code.1656-1660.ef"sv, "b0a525921b42c3a76cc344a8da7f86b707639d04"sv}, Entry{"idx/v1-code.192-256.ef"sv, "eeb5b609ef006d06d160290d37763c6cf16ce672"sv}, Entry{"idx/v1-code.256-320.ef"sv, "38d851385e57ec017d86abe85234e7fd31de8a90"sv}, Entry{"idx/v1-code.320-384.ef"sv, "ba7c28eaa2bd16fd1b033f67f811a0e81a57d27f"sv}, @@ -657,9 +657,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"idx/v1-logaddrs.1472-1536.ef"sv, "274e40abebf0f49716c52a0f2ded55e3d28bb878"sv}, Entry{"idx/v1-logaddrs.1536-1600.ef"sv, "bc63cee0a4929a30b5aedb57bfa4eb7f37428dfb"sv}, Entry{"idx/v1-logaddrs.1600-1632.ef"sv, "52aff1796a43b221722cbdb368f2c9793537c00a"sv}, - Entry{"idx/v1-logaddrs.1632-1640.ef"sv, "c514a4547c423f455f280f4e90ae8e80ad48e81b"sv}, - Entry{"idx/v1-logaddrs.1640-1642.ef"sv, "0296cdbedf9d31125c6de8fdbcb1450516d1c137"sv}, - Entry{"idx/v1-logaddrs.1642-1643.ef"sv, "2554e56a6c6805168e310a63c9b32c426ba60bf1"sv}, + Entry{"idx/v1-logaddrs.1632-1648.ef"sv, "a2d3e599e84306e9241634d03821025e007bc76c"sv}, + Entry{"idx/v1-logaddrs.1648-1656.ef"sv, "14a8cfc66ecbb07f9bcdcfa3b89532d06d577d77"sv}, + Entry{"idx/v1-logaddrs.1656-1660.ef"sv, "63baa208fb6e3b91281cae2d8caad2eb6fb87b93"sv}, Entry{"idx/v1-logaddrs.192-256.ef"sv, "efae338bada835fc624861fc1292535700ed2404"sv}, Entry{"idx/v1-logaddrs.256-320.ef"sv, "940b438e43547792b60bff2bdda1bb10985913e6"sv}, Entry{"idx/v1-logaddrs.320-384.ef"sv, "3f9f7257e37320c37c796c723f3a63151e9d7239"sv}, @@ -686,9 +686,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"idx/v1-logtopics.1472-1536.ef"sv, "f9eba80ef4a2af721a0dd70b7b525aca9d70d6f4"sv}, Entry{"idx/v1-logtopics.1536-1600.ef"sv, "2407f5e821cd3dda3a4e9f3a87e21b4a6b8f3389"sv}, Entry{"idx/v1-logtopics.1600-1632.ef"sv, "97f61f1989b5d892ee61bab3134d7e9af71bfe1f"sv}, - Entry{"idx/v1-logtopics.1632-1640.ef"sv, "d58cf4c33695b9737e3c9c9e0474ec7a8efd25c2"sv}, - Entry{"idx/v1-logtopics.1640-1642.ef"sv, "8fd419ac133e2fd5479d7a7e8007f75d1d71a8c0"sv}, - Entry{"idx/v1-logtopics.1642-1643.ef"sv, "a3af0f4461e1bd9ee053bace24bc18c3d6f4c304"sv}, + Entry{"idx/v1-logtopics.1632-1648.ef"sv, "b4ee369425adc930759b949c17f0100fa03b2823"sv}, + Entry{"idx/v1-logtopics.1648-1656.ef"sv, "7f548356d2ba86c5839499295345b4b1b5570383"sv}, + Entry{"idx/v1-logtopics.1656-1660.ef"sv, "b4809a9edb6c2df29a1c007f2ea95d39758ab11d"sv}, Entry{"idx/v1-logtopics.192-256.ef"sv, "ed322f6e270e7c6a5e61afd5e7ba2420ecafe88d"sv}, Entry{"idx/v1-logtopics.256-320.ef"sv, "c80196a17151eb6d0873bf471ad11bd7630904e6"sv}, Entry{"idx/v1-logtopics.320-384.ef"sv, "74b28b77953b37d109ab59028876e8ede09bf1f7"sv}, @@ -716,9 +716,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"idx/v1-receipt.1536-1552.ef"sv, "78ab02f8776cc18d0eb6c40c9cf33c197e53186e"sv}, Entry{"idx/v1-receipt.1552-1554.ef"sv, "50679cc78e88a6c472cce8cf726b61896fb164cb"sv}, Entry{"idx/v1-receipt.1554-1555.ef"sv, "b930d6bc23a18a0bc46c545e9aa9c7b3f428a7cc"sv}, - Entry{"idx/v1-receipt.1632-1640.ef"sv, "e2268553a35fefb4c0ac042a86b21d6b6be26d49"sv}, - Entry{"idx/v1-receipt.1640-1642.ef"sv, "8f7fa20447f443a7ae8bbc5b7e9cf3298f66fde6"sv}, - Entry{"idx/v1-receipt.1642-1643.ef"sv, "58f5a9265e4e866d04520fadb6b183acffac4e17"sv}, + Entry{"idx/v1-receipt.1632-1648.ef"sv, "a73dd96a1539375c03e7d9a44e1b033e9dc9e2c2"sv}, + Entry{"idx/v1-receipt.1648-1656.ef"sv, "62f884188157a51bec337c1f1cf3f86f97e29ec1"sv}, + Entry{"idx/v1-receipt.1656-1660.ef"sv, "cbe1fd3f8909c85b801468c86dcaa679f46dae00"sv}, Entry{"idx/v1-receipt.192-256.ef"sv, "c468d8a2c8a89d1e800fa9f76c3ce6930b8db2a0"sv}, Entry{"idx/v1-receipt.256-320.ef"sv, "461e4b563f54001a913cc503a86d0ef250c90701"sv}, Entry{"idx/v1-receipt.320-384.ef"sv, "78be3474a94af20e317098f058efc06964824d67"sv}, @@ -745,9 +745,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"idx/v1-storage.1472-1536.ef"sv, "8352ee24ba2347c452b1723e97333161814bbb46"sv}, Entry{"idx/v1-storage.1536-1600.ef"sv, "17f59d7762122487289ba2f7f6bfa913ea9c2063"sv}, Entry{"idx/v1-storage.1600-1632.ef"sv, "7b9efd403f7b1c61e3cd35284f285399289cb3a7"sv}, - Entry{"idx/v1-storage.1632-1640.ef"sv, "991e021f2d8a55ebb3c59daf6cd864fb9173565e"sv}, - Entry{"idx/v1-storage.1640-1642.ef"sv, "3b8522f9a44bda002d1652895d339349b3e3b73b"sv}, - Entry{"idx/v1-storage.1642-1643.ef"sv, "7a393f12757352b959d31cbac3f61eba3bd0d676"sv}, + Entry{"idx/v1-storage.1632-1648.ef"sv, "bcfd1f27501c11ae9ec8dc7c253320f3b9fabb0e"sv}, + Entry{"idx/v1-storage.1648-1656.ef"sv, "5c7fcc04741b19f5c0681ab85eec49615b24b597"sv}, + Entry{"idx/v1-storage.1656-1660.ef"sv, "42b23f668d159e637989935675fa3f0685fed201"sv}, Entry{"idx/v1-storage.192-256.ef"sv, "61923d98e59442057361c44790b426e064427051"sv}, Entry{"idx/v1-storage.256-320.ef"sv, "91b652dec0ab3395a9c1ea5633986cc596098ba5"sv}, Entry{"idx/v1-storage.320-384.ef"sv, "a2e37e0253798b45eb13ad29c00222d0d07d15a5"sv}, @@ -774,9 +774,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"idx/v1-tracesfrom.1472-1536.ef"sv, "84ac6cb794944223834543f980342b640db1ae7d"sv}, Entry{"idx/v1-tracesfrom.1536-1600.ef"sv, "89620978c874ed92046538bee4a9a15588e6eb7c"sv}, Entry{"idx/v1-tracesfrom.1600-1632.ef"sv, "4ed1013055589e0bcd61b95ea310d080577bbd20"sv}, - Entry{"idx/v1-tracesfrom.1632-1640.ef"sv, "b49c743413c1a3d74b1da650cdb23b7115c42d38"sv}, - Entry{"idx/v1-tracesfrom.1640-1642.ef"sv, "eb5333266415ae54629623d27f650ba0ef79db34"sv}, - Entry{"idx/v1-tracesfrom.1642-1643.ef"sv, "d350aacba9b0c7d6d627e3db48f669699deab84e"sv}, + Entry{"idx/v1-tracesfrom.1632-1648.ef"sv, "2c7bece99bbdf682465cfbb603e54d96f46128a2"sv}, + Entry{"idx/v1-tracesfrom.1648-1656.ef"sv, "4e458fdec2e22a29550806ee6b1768857b85d9c7"sv}, + Entry{"idx/v1-tracesfrom.1656-1660.ef"sv, "240ae99744caced38d39347c157b8c97109a839f"sv}, Entry{"idx/v1-tracesfrom.192-256.ef"sv, "4a1f76209185e0cbded04fd37e2fefffaaf88c18"sv}, Entry{"idx/v1-tracesfrom.256-320.ef"sv, "e3fd93feb085edd29a6627f01d100cba9b82bde9"sv}, Entry{"idx/v1-tracesfrom.320-384.ef"sv, "45ff076be364fd1c10ce7cc439652941eeb85e6e"sv}, @@ -803,9 +803,9 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"idx/v1-tracesto.1472-1536.ef"sv, "495a1e16cb1bf2e9858ab7e4c2562a96c2f823d1"sv}, Entry{"idx/v1-tracesto.1536-1600.ef"sv, "cb95c0fcdcbd65a78c9feb501b0b32beda5912bb"sv}, Entry{"idx/v1-tracesto.1600-1632.ef"sv, "3cc8c2d1a8b02048094679be7ab802d598f3879c"sv}, - Entry{"idx/v1-tracesto.1632-1640.ef"sv, "9b82d31983e399d3c1c2ea66e3eb1b976eb0cd8d"sv}, - Entry{"idx/v1-tracesto.1640-1642.ef"sv, "ec620b3ad8688d79a0ab76fbb374099f29fc69a3"sv}, - Entry{"idx/v1-tracesto.1642-1643.ef"sv, "d533fdf8cde359452501faa6d9eabd51eaedc5bb"sv}, + Entry{"idx/v1-tracesto.1632-1648.ef"sv, "ef552d3cc4ffce1d93287c2b0772f57e24f59632"sv}, + Entry{"idx/v1-tracesto.1648-1656.ef"sv, "a417b7e009bbb9febc745e273ea7673e1cb05b2a"sv}, + Entry{"idx/v1-tracesto.1656-1660.ef"sv, "585218688e4e92befd77eba2d153053a76b90d7a"sv}, Entry{"idx/v1-tracesto.192-256.ef"sv, "21f6a7a79bebd2adea446ca880d06391fcc7899e"sv}, Entry{"idx/v1-tracesto.256-320.ef"sv, "66c91f6111d04dc512328a530a9a50aa3a4b4102"sv}, Entry{"idx/v1-tracesto.320-384.ef"sv, "74d4382f9c23fdd36cb3524e19a45cf6308db794"sv}, @@ -820,8 +820,7 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"idx/v1-tracesto.832-896.ef"sv, "e10287ef08c0ecceccd511866efa5abde7f046a9"sv}, Entry{"idx/v1-tracesto.896-960.ef"sv, "96ab89b6f25478798105cebac85caccb41de8048"sv}, Entry{"idx/v1-tracesto.960-1024.ef"sv, "c71f8cab4614843025c7df1f7314cec045230406"sv}, - Entry{"manifest.txt"sv, "afab7cf6b9bfc36202835db4737f38a0aca313f6"sv}, - Entry{"salt-blocks.txt"sv, "c780cba3cffe17d0e6235e56c12ddd876ce23b7b"sv}, + Entry{"salt-blocks.txt"sv, "90eb3df952f2d604d27656b0b60494cd26bfd6f8"sv}, Entry{"salt-state.txt"sv, "0113ec56c7c0d72783dbb5738becffa9c4c43d69"sv}, Entry{"v1-000000-000500-bodies.idx"sv, "2ee5a6d2692fbec47830fa25890ee7c0c98e8ab4"sv}, Entry{"v1-000000-000500-bodies.seg"sv, "e9b5c5d1885ee3c6ab6005919e511e1e04c7e34e"sv}, @@ -949,16 +948,84 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"v1-008500-009000-transactions-to-block.idx"sv, "7adbc586b8f3115610d6e8db7b2c23f1106c7c2f"sv}, Entry{"v1-008500-009000-transactions.idx"sv, "e170f526c46a55b81182f841361ea2d1740582bf"sv}, Entry{"v1-008500-009000-transactions.seg"sv, "57ec9fcd24a94d6c10bb1c691e051c125d0ea80a"sv}, - Entry{"v1-008600-008700-blobsidecars.seg"sv, "1cfdef2b42ba74a0cd8a117bb41913bff896520f"sv}, - Entry{"v1-008600-008700-blocksidecars.idx"sv, "f6a3f2727e3ed52686949d91185f7835e59c1833"sv}, - Entry{"v1-008700-008800-blobsidecars.seg"sv, "c6741d1d5bd468851f258a3d221d42478f11635d"sv}, - Entry{"v1-008700-008800-blocksidecars.idx"sv, "87d1b358f6e98fb136c8c53c6941aff9c3c3f9d7"sv}, - Entry{"v1-008800-008900-blobsidecars.seg"sv, "99940333bd1a57e4667148336f6f314e69031a57"sv}, - Entry{"v1-008800-008900-blocksidecars.idx"sv, "3b493f0f7313bfeb6495a187b83e615553055b19"sv}, - Entry{"v1-008900-009000-blobsidecars.seg"sv, "7fab3d5e19a30e8e44aaece33627370b7dc9dfab"sv}, - Entry{"v1-008900-009000-blocksidecars.idx"sv, "50c24ec815ff4e996637bde8621bf7bb8058d5b2"sv}, - Entry{"v1-009000-009100-blobsidecars.seg"sv, "0cc8a715f3831ad4aa8d2fa05a016c5b0c880d93"sv}, - Entry{"v1-009000-009100-blocksidecars.idx"sv, "0735bd2d3ffd58cd4f336a1abc53bdaaf5fd8016"sv}, + Entry{"v1-008620-008630-blobsidecars.seg"sv, "51be6aab2fc9ec68806cd06c4e756ff69a2b20a0"sv}, + Entry{"v1-008620-008630-blocksidecars.idx"sv, "6cfa58eb60e6f5006acdad50f62c6e50113fcf51"sv}, + Entry{"v1-008630-008640-blobsidecars.seg"sv, "33bfd902acc83fc2aed7aeed13efa06e5a362a1a"sv}, + Entry{"v1-008630-008640-blocksidecars.idx"sv, "eed3659040a1b379891fd74d4d43e2f3908609c9"sv}, + Entry{"v1-008640-008650-blobsidecars.seg"sv, "ab6907436c45513aa22bf7b93247095e0947b33e"sv}, + Entry{"v1-008640-008650-blocksidecars.idx"sv, "5e159cc412f170612dea682c0f4bc159967082b6"sv}, + Entry{"v1-008650-008660-blobsidecars.seg"sv, "8c47da4e4b7fbb08ce5b4dd95d21ab3a84438cda"sv}, + Entry{"v1-008650-008660-blocksidecars.idx"sv, "330d8d1f42aa4073b2b32393ec1ddd3c2f72ac7e"sv}, + Entry{"v1-008660-008670-blobsidecars.seg"sv, "02bcc59eb2b332bef57ca857fa2e60a7bcd6456f"sv}, + Entry{"v1-008660-008670-blocksidecars.idx"sv, "23270f7525004b22735be74c72deba55fe04af48"sv}, + Entry{"v1-008670-008680-blobsidecars.seg"sv, "920ffdda6f5e7eccd783456a34a764f5e7b731aa"sv}, + Entry{"v1-008670-008680-blocksidecars.idx"sv, "72f05a402b71bf210887178e2df283eefc208d85"sv}, + Entry{"v1-008680-008690-blobsidecars.seg"sv, "eec03ef575eb0e18a5020496c385e169b931d26c"sv}, + Entry{"v1-008680-008690-blocksidecars.idx"sv, "0f76c2736c0bfafc448f38597682dfb0883fb803"sv}, + Entry{"v1-008690-008700-blobsidecars.seg"sv, "1ae43c27cad87b976295c714d9b4f8a53320ac25"sv}, + Entry{"v1-008690-008700-blocksidecars.idx"sv, "8583f5cd00f1b31b8c4cd30735e8fbb7dc812cb0"sv}, + Entry{"v1-008700-008710-blobsidecars.seg"sv, "03bd217d795c63a5876fc742d5c313b0473089c2"sv}, + Entry{"v1-008700-008710-blocksidecars.idx"sv, "c07a4f2f9ef1df6a2fb77e3127b39f7dd933c0c1"sv}, + Entry{"v1-008710-008720-blobsidecars.seg"sv, "7eb81213deb4e5ada90cf307017b7e2146763d4e"sv}, + Entry{"v1-008710-008720-blocksidecars.idx"sv, "8c3554a1999bdabcaae5f8f356976f457b93cac6"sv}, + Entry{"v1-008720-008730-blobsidecars.seg"sv, "f9ef739ac14ed1da1cc3e38394e4c7b9876820cf"sv}, + Entry{"v1-008720-008730-blocksidecars.idx"sv, "3636170abddac5a1fc19a08b05594cbb7a5c753e"sv}, + Entry{"v1-008730-008740-blobsidecars.seg"sv, "0a7b94c13eadd20b02055aa5e9aee39e0988fb90"sv}, + Entry{"v1-008730-008740-blocksidecars.idx"sv, "65861d60fe88db79dcc92a9139f256ecf9435979"sv}, + Entry{"v1-008740-008750-blobsidecars.seg"sv, "80865ee92934668d7357f835eab75b2a9f62b3a8"sv}, + Entry{"v1-008740-008750-blocksidecars.idx"sv, "56c0b4f9ea4a92d6856cdd7bfc26a843cd2844f3"sv}, + Entry{"v1-008750-008760-blobsidecars.seg"sv, "15935572acdcd212df94c545a21491ac9e9ef9f2"sv}, + Entry{"v1-008750-008760-blocksidecars.idx"sv, "a5466b0f806264b9c5cfcb39e232dc7b625f5f6d"sv}, + Entry{"v1-008760-008770-blobsidecars.seg"sv, "bebb4f50db0efaf729cf024bac3676b53fe17f0e"sv}, + Entry{"v1-008760-008770-blocksidecars.idx"sv, "82407d30ec5725afd7d8748d4d0006eb284c808b"sv}, + Entry{"v1-008770-008780-blobsidecars.seg"sv, "c28595b803f2613a400ddf43d7733f95a147bc64"sv}, + Entry{"v1-008770-008780-blocksidecars.idx"sv, "e95cd9a1caab7098aff63fdf00b4adc1adc81352"sv}, + Entry{"v1-008780-008790-blobsidecars.seg"sv, "b632e9b62b38e47de1519372ec1e6a510600d1ad"sv}, + Entry{"v1-008780-008790-blocksidecars.idx"sv, "0f6adf77da313c39749429ed68cfc16098b80463"sv}, + Entry{"v1-008790-008800-blobsidecars.seg"sv, "c14c96dc2efad51ae77276488e327c4b9da53c38"sv}, + Entry{"v1-008790-008800-blocksidecars.idx"sv, "305e4f581f68271ba0d51c553283c91a865c45e1"sv}, + Entry{"v1-008800-008810-blobsidecars.seg"sv, "5b50eb6373e9c1d6637b9a95088dbc47410c50ee"sv}, + Entry{"v1-008800-008810-blocksidecars.idx"sv, "6d75831e3244dff64cc1317a4d577bc3cd5436d2"sv}, + Entry{"v1-008810-008820-blobsidecars.seg"sv, "46814ecfd3e5927807047af35bb488c9dcc5f779"sv}, + Entry{"v1-008810-008820-blocksidecars.idx"sv, "e396078bac9477946090c77702c2729a3ca2fd3f"sv}, + Entry{"v1-008820-008830-blobsidecars.seg"sv, "5862b4a9757dd1bbf7e7f277bba93ed5151344e9"sv}, + Entry{"v1-008820-008830-blocksidecars.idx"sv, "36ed2711c7be8d182b4d5efe3752a678720f74a7"sv}, + Entry{"v1-008830-008840-blobsidecars.seg"sv, "0301ede1e44bc6fd6e6db2f4fd18789a96afd2d8"sv}, + Entry{"v1-008830-008840-blocksidecars.idx"sv, "caafdd52d44e38cdb6e07809a6a54878cc5a75c2"sv}, + Entry{"v1-008840-008850-blobsidecars.seg"sv, "effa2792e9a17ccc40bed3318fc1c3fd72fce95e"sv}, + Entry{"v1-008840-008850-blocksidecars.idx"sv, "49e35c0a80fa659a734f495a414eeb282bde3080"sv}, + Entry{"v1-008850-008860-blobsidecars.seg"sv, "033429a1eff85c9080fca96341ae68cf999d2127"sv}, + Entry{"v1-008850-008860-blocksidecars.idx"sv, "581d8c68b485e10e27ae1bfca0e093cfa8d85533"sv}, + Entry{"v1-008860-008870-blobsidecars.seg"sv, "bf83f68c0cc44c4cab0a504df05178dc7e79b1d3"sv}, + Entry{"v1-008860-008870-blocksidecars.idx"sv, "8f04d0cc58464f5d41129fddcef52a4501a330f6"sv}, + Entry{"v1-008870-008880-blobsidecars.seg"sv, "cdac865926a028d5df56c791fe00c0e14095eb9a"sv}, + Entry{"v1-008870-008880-blocksidecars.idx"sv, "acb4b64df58b649215a53b4486d1ac75c281e94b"sv}, + Entry{"v1-008880-008890-blobsidecars.seg"sv, "a1aecf6f8c18d3d0271c16f733282e5ba748ae08"sv}, + Entry{"v1-008880-008890-blocksidecars.idx"sv, "dac7904bf96465912a03c1b2812acde5467f0e9e"sv}, + Entry{"v1-008890-008900-blobsidecars.seg"sv, "d33297f9a382178498eecedd14b8bb9a22d00cc2"sv}, + Entry{"v1-008890-008900-blocksidecars.idx"sv, "9ffac4c48976ee5d34e03959f7b6eeaaca08b56c"sv}, + Entry{"v1-008900-008910-blobsidecars.seg"sv, "79a4f580b02b67e03db09c08466a44b0e9b964ad"sv}, + Entry{"v1-008900-008910-blocksidecars.idx"sv, "05a0dbf5d9f9c9c3a7dd43d9cd4c82b977a9873d"sv}, + Entry{"v1-008910-008920-blobsidecars.seg"sv, "7571546582ef5760eaf4945859cd744cbf7fb27a"sv}, + Entry{"v1-008910-008920-blocksidecars.idx"sv, "7a83e5994625368c96514508d2419409428cea1e"sv}, + Entry{"v1-008920-008930-blobsidecars.seg"sv, "82cd56be2350e3b9f82c175c86b69e1e98ca0a0f"sv}, + Entry{"v1-008920-008930-blocksidecars.idx"sv, "8116114acd34e4f7e505ea16815a30c2260befbb"sv}, + Entry{"v1-008930-008940-blobsidecars.seg"sv, "e103de0475747b34e6a7389d25190caee8ee693a"sv}, + Entry{"v1-008930-008940-blocksidecars.idx"sv, "a4f7463fbeac1f4757c3bf71d2f37b4d9d02ba75"sv}, + Entry{"v1-008940-008950-blobsidecars.seg"sv, "01e39faeea5c8b0d5b4d65242f3787c8e6313be7"sv}, + Entry{"v1-008940-008950-blocksidecars.idx"sv, "e9a1bb860c7424f1d22fc7fcb0214a1ddd04b85f"sv}, + Entry{"v1-008950-008960-blobsidecars.seg"sv, "ef98b79580ec0bc379f768e8d0da2595814e5323"sv}, + Entry{"v1-008950-008960-blocksidecars.idx"sv, "b5811db6c60b5b1105b18692b8b7713411fd148c"sv}, + Entry{"v1-008960-008970-blobsidecars.seg"sv, "5013ab80695adac8b62a861e769cbd51ff49046c"sv}, + Entry{"v1-008960-008970-blocksidecars.idx"sv, "56e6529625a3aaabfd57a532df236d3c3605df12"sv}, + Entry{"v1-008970-008980-blobsidecars.seg"sv, "6ccaf294c9b5fe2c5bae77fdf52e26e3b7224fee"sv}, + Entry{"v1-008970-008980-blocksidecars.idx"sv, "922800533575e73c5757a5f7a07b8eaab8b5fe31"sv}, + Entry{"v1-008980-008990-blobsidecars.seg"sv, "f7c21fd1bb81d28c2f37a1275d2d77989234be7a"sv}, + Entry{"v1-008980-008990-blocksidecars.idx"sv, "927e15f8e90a2ea8f44634c7efff55408694d501"sv}, + Entry{"v1-008990-009000-blobsidecars.seg"sv, "8d4647d1a6f96144e026d3b5107f61e72d106867"sv}, + Entry{"v1-008990-009000-blocksidecars.idx"sv, "98db43fc23a7563d68bb0daa1168ca17f1f1b16c"sv}, + Entry{"v1-009000-009010-blobsidecars.seg"sv, "3d46a95efc214528e3d9b53c8dab125703f787d0"sv}, + Entry{"v1-009000-009010-blocksidecars.idx"sv, "0ea2a860917bdde97360f6c8c47d6a7127a2396c"sv}, Entry{"v1-009000-009500-bodies.idx"sv, "64604a9795b73020faa845c2e8a030f3ac8b8926"sv}, Entry{"v1-009000-009500-bodies.seg"sv, "5eb8f215c2d356d413fa882c7f8dd4cad5c3c981"sv}, Entry{"v1-009000-009500-headers.idx"sv, "642bb5774161aaf4204d3b6437c5395b9cb0f33e"sv}, @@ -966,16 +1033,106 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"v1-009000-009500-transactions-to-block.idx"sv, "7e56ee19ad1323df353b928ec5a5c4703f2cb679"sv}, Entry{"v1-009000-009500-transactions.idx"sv, "bda490eb25126064f0b82c25d74c1e2b833eb795"sv}, Entry{"v1-009000-009500-transactions.seg"sv, "ae1c52bb5af403f55acf24e07cef7b4eca553e5c"sv}, - Entry{"v1-009100-009200-blobsidecars.seg"sv, "2826b0a65bb29696c9c3ec269665100cd3a6f342"sv}, - Entry{"v1-009100-009200-blocksidecars.idx"sv, "079cf42f308777dc8b876eb9663cac0237c6820f"sv}, - Entry{"v1-009200-009300-blobsidecars.seg"sv, "19a54cde57d6722197f37e183847de9ef3088f3c"sv}, - Entry{"v1-009200-009300-blocksidecars.idx"sv, "258c0ac189c713220658f07f5719f1c2e6a1fd3a"sv}, - Entry{"v1-009300-009400-blobsidecars.seg"sv, "573e9e8968b8c65c2eda2e4703fa7e80bf76cff0"sv}, - Entry{"v1-009300-009400-blocksidecars.idx"sv, "6b410d70078ebffa5e0c2501d45885a0bd204c34"sv}, - Entry{"v1-009400-009500-blobsidecars.seg"sv, "2f11398f45286d21979f850ee2767f7718fb0726"sv}, - Entry{"v1-009400-009500-blocksidecars.idx"sv, "522c0fe9f972176cc99c2b7188ec813537db8833"sv}, - Entry{"v1-009500-009600-blobsidecars.seg"sv, "a918113f8ca1562e1ec021a1084bb11439036865"sv}, - Entry{"v1-009500-009600-blocksidecars.idx"sv, "89ee19d76d58ed2f1564e2dccdbf882073281eba"sv}, + Entry{"v1-009010-009020-blobsidecars.seg"sv, "3d102674161a73957c37ac5488232c878b7be397"sv}, + Entry{"v1-009010-009020-blocksidecars.idx"sv, "e03260ff0dc91368789aab4214c57f233edac695"sv}, + Entry{"v1-009020-009030-blobsidecars.seg"sv, "41ba13afa27d08840d2317926bc020d58fac3b49"sv}, + Entry{"v1-009020-009030-blocksidecars.idx"sv, "95dec37e06eb07fd41ded0b0d329723df3aea883"sv}, + Entry{"v1-009030-009040-blobsidecars.seg"sv, "25161eb5c854e2ddcf61811a788131a245d2b88e"sv}, + Entry{"v1-009030-009040-blocksidecars.idx"sv, "d8d5e7c884efd0e0cf1e3cdc22e1a0b83cfe34b8"sv}, + Entry{"v1-009040-009050-blobsidecars.seg"sv, "e7117c3025827803dc36e3bf52ed38b0774884a8"sv}, + Entry{"v1-009040-009050-blocksidecars.idx"sv, "54fe8b08613d84b947b2048a493c72d134406c1a"sv}, + Entry{"v1-009050-009060-blobsidecars.seg"sv, "e3c4eed153c1794cb148e69b34a3a15ea707d59a"sv}, + Entry{"v1-009050-009060-blocksidecars.idx"sv, "f24a71ff40e0f2a4521becbfe9b4e1ad8f73a56a"sv}, + Entry{"v1-009060-009070-blobsidecars.seg"sv, "cc5e57b3a77a47ead7d6f73a2e7a7a943d188468"sv}, + Entry{"v1-009060-009070-blocksidecars.idx"sv, "5ea8f478269ca8c455c5556a344187ccb790121f"sv}, + Entry{"v1-009070-009080-blobsidecars.seg"sv, "3565be1b6ec7a8a25bb57d5a0d6fc842430844e2"sv}, + Entry{"v1-009070-009080-blocksidecars.idx"sv, "2ec3a1057ff50837e5476c7716b962293919c8ba"sv}, + Entry{"v1-009080-009090-blobsidecars.seg"sv, "b2069bce2a967667c839a01425f379d75b6a48da"sv}, + Entry{"v1-009080-009090-blocksidecars.idx"sv, "279d3b17656cb79bd5a419518b4289979c1caf53"sv}, + Entry{"v1-009090-009100-blobsidecars.seg"sv, "7d376602d51caf0d29ad36e0cabddf6b1ba7333c"sv}, + Entry{"v1-009090-009100-blocksidecars.idx"sv, "ee3261975b64ee87392c9c303f1a387ee5136d8b"sv}, + Entry{"v1-009100-009110-blobsidecars.seg"sv, "3abc26a589a8afba10a62493ac076e3c4fe7c8e7"sv}, + Entry{"v1-009100-009110-blocksidecars.idx"sv, "c743a13d6462ea898501ff66443ac9af6c2df1f6"sv}, + Entry{"v1-009110-009120-blobsidecars.seg"sv, "91eb8ddaa7ffec1cb7aa4c010dcd0ce5d991fef8"sv}, + Entry{"v1-009110-009120-blocksidecars.idx"sv, "b46ceba23e8dea1997ad84ef5535a5bf980b0926"sv}, + Entry{"v1-009120-009130-blobsidecars.seg"sv, "bd7d90dc380793f5f864f91f8e53ac6a09341cf9"sv}, + Entry{"v1-009120-009130-blocksidecars.idx"sv, "6dd985e455ee12b759f722a6231855180b9fa1e3"sv}, + Entry{"v1-009130-009140-blobsidecars.seg"sv, "4e7849d6b9ee820881c7bdc9499097a078b5ff88"sv}, + Entry{"v1-009130-009140-blocksidecars.idx"sv, "62c455e382db553c82234c54a232d530f5b7977e"sv}, + Entry{"v1-009140-009150-blobsidecars.seg"sv, "77514bd42cd3c7156cd4d5d6571f20746cf0d466"sv}, + Entry{"v1-009140-009150-blocksidecars.idx"sv, "142d267095e5af8ba0e90deb3696ee049ba68918"sv}, + Entry{"v1-009150-009160-blobsidecars.seg"sv, "4b09777421571c494f8b1f8ff80eb7d053663148"sv}, + Entry{"v1-009150-009160-blocksidecars.idx"sv, "f881aab6c2d2f84fc62b24737bc3608a9b85405d"sv}, + Entry{"v1-009160-009170-blobsidecars.seg"sv, "b8641dfe4e0a122edc4b6cf6695fac0be4936b7b"sv}, + Entry{"v1-009160-009170-blocksidecars.idx"sv, "2c77d32e19762a420f367acb3a6a0e6e5d33c7ef"sv}, + Entry{"v1-009170-009180-blobsidecars.seg"sv, "746a7e38026b47083a500b8b8aad00c6678fbf13"sv}, + Entry{"v1-009170-009180-blocksidecars.idx"sv, "69fbaf394593cb832d20d5f4528fc22585391d73"sv}, + Entry{"v1-009180-009190-blobsidecars.seg"sv, "1fd4011724f9014e368bf92f2394762a6cce78db"sv}, + Entry{"v1-009180-009190-blocksidecars.idx"sv, "bef28c7afd6f71210503116715f9637212c03ddb"sv}, + Entry{"v1-009190-009200-blobsidecars.seg"sv, "d0424b58d3053eb1f322bcdd7cbe1254be8640d2"sv}, + Entry{"v1-009190-009200-blocksidecars.idx"sv, "2707fe89241c58e27c9590b00c4f9deb4b1da811"sv}, + Entry{"v1-009200-009210-blobsidecars.seg"sv, "8be8f88b2c3a373199844d48bdad7bafdd79f839"sv}, + Entry{"v1-009200-009210-blocksidecars.idx"sv, "7c1183481c27e334680d9311b1fe7d198994901a"sv}, + Entry{"v1-009210-009220-blobsidecars.seg"sv, "61ffb13b43908544bcde196c12f8eea64bb5e194"sv}, + Entry{"v1-009210-009220-blocksidecars.idx"sv, "0fb5766efa95e6d61247108a0c91279eb5fbb1d4"sv}, + Entry{"v1-009220-009230-blobsidecars.seg"sv, "7d0b049588bec1af8f072b010ba1ba44a7f27c0a"sv}, + Entry{"v1-009220-009230-blocksidecars.idx"sv, "f909fcc313d755daddf79c95a177607b8f438aad"sv}, + Entry{"v1-009230-009240-blobsidecars.seg"sv, "21109009eccbac97e7aeacf335e6905ae9f5706a"sv}, + Entry{"v1-009230-009240-blocksidecars.idx"sv, "d8592423b0f2e11e5de715f9a4e027d90250d0c5"sv}, + Entry{"v1-009240-009250-blobsidecars.seg"sv, "99d0264f4926b39e56f5afecbe2554d2463abf2d"sv}, + Entry{"v1-009240-009250-blocksidecars.idx"sv, "17a2e5b5d8b8506f487fe99240ba0fbc62a9a152"sv}, + Entry{"v1-009250-009260-blobsidecars.seg"sv, "a0cd3558955d775014a4a696b0b41730238a7eeb"sv}, + Entry{"v1-009250-009260-blocksidecars.idx"sv, "e346050696670b3b40f6cf2e9c0516f986fd553f"sv}, + Entry{"v1-009260-009270-blobsidecars.seg"sv, "aaa5370081e1a23f5eef863c8dd87d60782d3710"sv}, + Entry{"v1-009260-009270-blocksidecars.idx"sv, "7c3ab9a6371a4bb4ecf1b2a2605779234669eefb"sv}, + Entry{"v1-009270-009280-blobsidecars.seg"sv, "c05491ea1f7ff7921e0836e04ecf63280d3f5848"sv}, + Entry{"v1-009270-009280-blocksidecars.idx"sv, "8f9a134c30e46444207ab9d88ffb0b212dfb0407"sv}, + Entry{"v1-009280-009290-blobsidecars.seg"sv, "3b0e2930d19375aef49c5acfb390a08660de9940"sv}, + Entry{"v1-009280-009290-blocksidecars.idx"sv, "3cb6589dd7bdedb3c825d149e1d50f0152cf8780"sv}, + Entry{"v1-009290-009300-blobsidecars.seg"sv, "c55f025bc50510afc09778863a033a68450144a1"sv}, + Entry{"v1-009290-009300-blocksidecars.idx"sv, "278a577e8a87cf344048777adf336f620b8d1a1d"sv}, + Entry{"v1-009300-009310-blobsidecars.seg"sv, "534b6d53c8c81994c37ac870483ace6d584ca3ab"sv}, + Entry{"v1-009300-009310-blocksidecars.idx"sv, "8a6da343d4f1081d051a433bcf416f522ce8e4c7"sv}, + Entry{"v1-009310-009320-blobsidecars.seg"sv, "5b10bfc15a7c46425f28d7b03a806593ff8be0e6"sv}, + Entry{"v1-009310-009320-blocksidecars.idx"sv, "92b6ec405d20d663095212036afbee451b486446"sv}, + Entry{"v1-009320-009330-blobsidecars.seg"sv, "3646a62e1d5d4132c0ef5c2813ba620e38cedd09"sv}, + Entry{"v1-009320-009330-blocksidecars.idx"sv, "f8f18fdf0251481e00dc1bf097e611e6eafe538f"sv}, + Entry{"v1-009330-009340-blobsidecars.seg"sv, "48c8c781c16717ee7dcb7268faf80d72cdc75929"sv}, + Entry{"v1-009330-009340-blocksidecars.idx"sv, "580bf7b32cf2e63bf00fc6de0ce19d2e396c6b3e"sv}, + Entry{"v1-009340-009350-blobsidecars.seg"sv, "539f1abe9b44c6ece35a212aa4fe92a4e57d89fa"sv}, + Entry{"v1-009340-009350-blocksidecars.idx"sv, "a4f452d6ec98bce98f6275fcc771562433fe0c61"sv}, + Entry{"v1-009350-009360-blobsidecars.seg"sv, "33249967c09dcfe614c09bb24c0493b95f8f5b2e"sv}, + Entry{"v1-009350-009360-blocksidecars.idx"sv, "972953187c0a81b0998602436d3e987e5fe890ba"sv}, + Entry{"v1-009360-009370-blobsidecars.seg"sv, "596accf82dba2ccca68d5d61c27da9b6ddc3b4a6"sv}, + Entry{"v1-009360-009370-blocksidecars.idx"sv, "5c2cf273da316f87ff4da270cb302bd17e448c82"sv}, + Entry{"v1-009370-009380-blobsidecars.seg"sv, "2d4836098e95a00e17eac5f5ed89f422928d7fc1"sv}, + Entry{"v1-009370-009380-blocksidecars.idx"sv, "047981e6106870da8b087e819ab7c79056b808a7"sv}, + Entry{"v1-009380-009390-blobsidecars.seg"sv, "0b90beab6837f36df3dfa3570a1f55769d0aebea"sv}, + Entry{"v1-009380-009390-blocksidecars.idx"sv, "b1e467b86eca765a4744812da9c4881ada001113"sv}, + Entry{"v1-009390-009400-blobsidecars.seg"sv, "d53650cddb01a7a5398250abed504ae520a32be2"sv}, + Entry{"v1-009390-009400-blocksidecars.idx"sv, "71b0ed755e0f511416f1f685d7c2ff1310080c50"sv}, + Entry{"v1-009400-009410-blobsidecars.seg"sv, "17df29f83d2d8e5243fa958a699406ec41c23a5a"sv}, + Entry{"v1-009400-009410-blocksidecars.idx"sv, "7c811b9885015a77ec2084c4fa90a80cf8cb4f3b"sv}, + Entry{"v1-009410-009420-blobsidecars.seg"sv, "6a435ed533d8ade4faffbc2447081077cf0808f9"sv}, + Entry{"v1-009410-009420-blocksidecars.idx"sv, "ecf7659df03b90ca7f2ee5aee99f2c3ad114073d"sv}, + Entry{"v1-009420-009430-blobsidecars.seg"sv, "cdd724fad687ca6106929d7e68be61f62fedeb3d"sv}, + Entry{"v1-009420-009430-blocksidecars.idx"sv, "fa8899bb208cf77566939c46cfd27e2a8e5f4cc2"sv}, + Entry{"v1-009430-009440-blobsidecars.seg"sv, "51e18ca2184892b666e977f4b517c997c97f0bdb"sv}, + Entry{"v1-009430-009440-blocksidecars.idx"sv, "a5b494184c5e53487c770cfefbea3bc1b0f7094f"sv}, + Entry{"v1-009440-009450-blobsidecars.seg"sv, "e4033c913259c96e47a28ad4777861a81a8ec610"sv}, + Entry{"v1-009440-009450-blocksidecars.idx"sv, "9ad7d02ded9a5ccf20215b4bb469944bd8667551"sv}, + Entry{"v1-009450-009460-blobsidecars.seg"sv, "ae4cd8561715ff93496b1ae24d88bdc9a51ce2f2"sv}, + Entry{"v1-009450-009460-blocksidecars.idx"sv, "21139aaa9f84a96c2ea12245b73a00a572bd4786"sv}, + Entry{"v1-009460-009470-blobsidecars.seg"sv, "23551655fc9a89b3936c470ba3990d859169a7ec"sv}, + Entry{"v1-009460-009470-blocksidecars.idx"sv, "e108fedd15869755d3439af257f0d5199b5455b0"sv}, + Entry{"v1-009470-009480-blobsidecars.seg"sv, "c4874edb283c895ec30f7f8e89de5aca0800dc10"sv}, + Entry{"v1-009470-009480-blocksidecars.idx"sv, "5950e1873a9bd6c84e519f5042c57ab364ca331c"sv}, + Entry{"v1-009480-009490-blobsidecars.seg"sv, "075085a45b245f5036999a291b904cf36fdae6f7"sv}, + Entry{"v1-009480-009490-blocksidecars.idx"sv, "7be98a80936255eb8c256c54bb9825b85a7491c5"sv}, + Entry{"v1-009490-009500-blobsidecars.seg"sv, "2fe930695b816af56e17ada8809070cbfabd2d01"sv}, + Entry{"v1-009490-009500-blocksidecars.idx"sv, "297f4bf70d9014008df3ac61bea4d384452f295a"sv}, + Entry{"v1-009500-009510-blobsidecars.seg"sv, "8eaeddeb9428e6cb143876f0dc6d984e8b1b4daf"sv}, + Entry{"v1-009500-009510-blocksidecars.idx"sv, "36d44de7dc95b5f7e9b5bfc825b12e67c7ff5e23"sv}, Entry{"v1-009500-010000-bodies.idx"sv, "597dad663287413ea4d1fea23ab00a9a20dcdb8a"sv}, Entry{"v1-009500-010000-bodies.seg"sv, "906304871357a0ab3964a03958124102a26630ad"sv}, Entry{"v1-009500-010000-headers.idx"sv, "e322ec0d6c99d3eaaccf1857d7fb054594cb8a37"sv}, @@ -983,8 +1140,44 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"v1-009500-010000-transactions-to-block.idx"sv, "2a0df72dcc9c6bff6da7db05002a58f9bbd921db"sv}, Entry{"v1-009500-010000-transactions.idx"sv, "8d994affdbe3fa5e238b62dfc245f9edba325a2e"sv}, Entry{"v1-009500-010000-transactions.seg"sv, "195ff94c642a9144ae6d550880d8884830b555e4"sv}, - Entry{"v1-009600-009700-blobsidecars.seg"sv, "dae68b975a949016d207186a2ed47a148ee93074"sv}, - Entry{"v1-009600-009700-blocksidecars.idx"sv, "82c5d6c343a96be2994647dd974ee39b6f09229f"sv}, + Entry{"v1-009510-009520-blobsidecars.seg"sv, "27509022ec8eca13c778e6e277a9204db94be6b1"sv}, + Entry{"v1-009510-009520-blocksidecars.idx"sv, "abe8d1700cd6122e3313dbd1e2b04b160e99c0e0"sv}, + Entry{"v1-009520-009530-blobsidecars.seg"sv, "fb113f7d3640c4354042331b6973136ee0eef6e3"sv}, + Entry{"v1-009520-009530-blocksidecars.idx"sv, "6a667133c8dae0672d855461e0006f53b605ac47"sv}, + Entry{"v1-009530-009540-blobsidecars.seg"sv, "d1d281798bcaeea7a4d840d54112f0e45eba6dd1"sv}, + Entry{"v1-009530-009540-blocksidecars.idx"sv, "bdebafa00e63eed2976c090416a9497c4a021f2e"sv}, + Entry{"v1-009540-009550-blobsidecars.seg"sv, "06a679b1aea474ee933e786fa705bd99d1b30c77"sv}, + Entry{"v1-009540-009550-blocksidecars.idx"sv, "9cecc77fb5efe78347d011258eeb46a711f36910"sv}, + Entry{"v1-009550-009560-blobsidecars.seg"sv, "8e368e123348bdb151e0714e7d6471cb01ac7a84"sv}, + Entry{"v1-009550-009560-blocksidecars.idx"sv, "346e685917944b57c65813a0a3981dd9f18569f0"sv}, + Entry{"v1-009560-009570-blobsidecars.seg"sv, "841ff92d84b0dee951e7edae2f21e6369d5107f1"sv}, + Entry{"v1-009560-009570-blocksidecars.idx"sv, "980a792312e7d70e0d78e38c6f1b79e266f91a52"sv}, + Entry{"v1-009570-009580-blobsidecars.seg"sv, "84292b7adb084cf940e3cc28672b08538d7b09a1"sv}, + Entry{"v1-009570-009580-blocksidecars.idx"sv, "888c7dc7f5ebbd2293493f516116591fca5f0558"sv}, + Entry{"v1-009580-009590-blobsidecars.seg"sv, "94f0abdaf7783cd97802fa553c66d7a4490cd3f2"sv}, + Entry{"v1-009580-009590-blocksidecars.idx"sv, "e6a9d0b250d13896f726cdac55b1384e8e97bc3d"sv}, + Entry{"v1-009590-009600-blobsidecars.seg"sv, "37b3f81251ff28c0babfdc45682a70c280fef840"sv}, + Entry{"v1-009590-009600-blocksidecars.idx"sv, "e32506dc4f30733835eae31c91b88dc0486d917e"sv}, + Entry{"v1-009600-009610-blobsidecars.seg"sv, "51e9b899a540a3a95a0a248648bd3aa75430f34a"sv}, + Entry{"v1-009600-009610-blocksidecars.idx"sv, "864959cf74e0292b3924dd52d72d41535a6c1414"sv}, + Entry{"v1-009610-009620-blobsidecars.seg"sv, "2c1146f0733feb6753e3f817f802942012754a37"sv}, + Entry{"v1-009610-009620-blocksidecars.idx"sv, "d5e2b65ef88c2582ec612e0728e7599f06539894"sv}, + Entry{"v1-009620-009630-blobsidecars.seg"sv, "446728d012950154ec7c0696f963770c4b1890c3"sv}, + Entry{"v1-009620-009630-blocksidecars.idx"sv, "a8d9eeae2334ab3efdbde35ab793c3e04bb8be36"sv}, + Entry{"v1-009630-009640-blobsidecars.seg"sv, "2d1401d483652a0c2e44fff28ccfdb6704a99d73"sv}, + Entry{"v1-009630-009640-blocksidecars.idx"sv, "5012d046148554f21f6b351700b1b8dfe68ff67b"sv}, + Entry{"v1-009640-009650-blobsidecars.seg"sv, "a380d27d175cae7faba4eda2494105466e43eb90"sv}, + Entry{"v1-009640-009650-blocksidecars.idx"sv, "84b10cae5d5cb1c469cc47555a8d3bc83fe17c08"sv}, + Entry{"v1-009650-009660-blobsidecars.seg"sv, "8201cbce918715adb7b83aa3bbb633c3cdc3cf90"sv}, + Entry{"v1-009650-009660-blocksidecars.idx"sv, "04c611ab169562da3704e58d271c5234ec261506"sv}, + Entry{"v1-009660-009670-blobsidecars.seg"sv, "6991d0e2ce3c808830a0ace4d53ad34e36bec415"sv}, + Entry{"v1-009660-009670-blocksidecars.idx"sv, "8f696d06be256a63f68ba625f1b557c71c6352c5"sv}, + Entry{"v1-009670-009680-blobsidecars.seg"sv, "305be944c0e1f60195a6eef11bab536dee19c54d"sv}, + Entry{"v1-009670-009680-blocksidecars.idx"sv, "c1554177218430f3b4f50ba452fe8e6ef9668555"sv}, + Entry{"v1-009680-009690-blobsidecars.seg"sv, "21cecf98ad13f55ac1f2a8ec11353c6dbf1543bd"sv}, + Entry{"v1-009680-009690-blocksidecars.idx"sv, "1522f4224f1d3aeb7cdabc10aedd8bc548c949aa"sv}, + Entry{"v1-009690-009700-blobsidecars.seg"sv, "2d5b84aea7b08d785f8e5bce5213b8d6a0fcece6"sv}, + Entry{"v1-009690-009700-blocksidecars.idx"sv, "43964147d8f0c4a3559c2c9d067a3f8ea49dc922"sv}, Entry{"v1-009700-009710-blobsidecars.seg"sv, "057f6040dc84f103afee6d508036b4eed82dc443"sv}, Entry{"v1-009700-009710-blocksidecars.idx"sv, "fd0bd8d6284d93e10e795edea19ab31aab798d7b"sv}, Entry{"v1-009710-009720-blobsidecars.seg"sv, "cbfc9e6980132a6c3866b0434216972197eaae5c"sv}, @@ -1017,6 +1210,36 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"v1-009840-009850-blocksidecars.idx"sv, "022b521e88577cfe9652f30b35e6cec04f5449ce"sv}, Entry{"v1-009850-009860-blobsidecars.seg"sv, "0091620ed26005a9a37f412909af848718da7eee"sv}, Entry{"v1-009850-009860-blocksidecars.idx"sv, "8f6426d9aa112e4b649160fd611dc33b284b0462"sv}, + Entry{"v1-009860-009870-blobsidecars.seg"sv, "52166fe9b2c4013c3a6d67769f35aa24e36fa12f"sv}, + Entry{"v1-009860-009870-blocksidecars.idx"sv, "2513206e1042b104946ea6c32d774dc92d353d7e"sv}, + Entry{"v1-009870-009880-blobsidecars.seg"sv, "35bb4acf22bcf09839425ef966e81f43fcb65ee3"sv}, + Entry{"v1-009870-009880-blocksidecars.idx"sv, "adc3d728e4042493618ef34d45d94651004a1a1e"sv}, + Entry{"v1-009880-009890-blobsidecars.seg"sv, "a9134452fe5a78639a825b20a113f7f56e260562"sv}, + Entry{"v1-009880-009890-blocksidecars.idx"sv, "0987cd96799edec4b90c9d6607c613ae627831af"sv}, + Entry{"v1-009890-009900-blobsidecars.seg"sv, "65685ea9cd845b0bd8807a8796cb6ddfedffbc1d"sv}, + Entry{"v1-009890-009900-blocksidecars.idx"sv, "89d148c0e1229bf83a8edd8b6d7799b3159790e8"sv}, + Entry{"v1-009900-009910-blobsidecars.seg"sv, "19d90b7b4cc58b3a2c75efe49a9af0d8872334df"sv}, + Entry{"v1-009900-009910-blocksidecars.idx"sv, "ea1754683bf8aaf4738b0ada92c4ec5adf7fb8f5"sv}, + Entry{"v1-009910-009920-blobsidecars.seg"sv, "453844059c9002fbaa159ee8a5cc13b7d8844091"sv}, + Entry{"v1-009910-009920-blocksidecars.idx"sv, "bfd51f577b5ca5f6119f57ecaafad03597e634fa"sv}, + Entry{"v1-009920-009930-blobsidecars.seg"sv, "9adcc2c7073ad4a034aab56bc57b93177b421e8a"sv}, + Entry{"v1-009920-009930-blocksidecars.idx"sv, "42bb7051c0c5707ac3862a8b2cee65ad2426a283"sv}, + Entry{"v1-009930-009940-blobsidecars.seg"sv, "cf4cd07553c985c5dea2354017804c395353c989"sv}, + Entry{"v1-009930-009940-blocksidecars.idx"sv, "cfe0cd76e0de2e9895de810093deae0e3fa710a1"sv}, + Entry{"v1-009940-009950-blobsidecars.seg"sv, "e7f5f3e6ad73fd1b94c9cd400ded37cf92aa4718"sv}, + Entry{"v1-009940-009950-blocksidecars.idx"sv, "0a41c61172c432cdefdcad01fd88ac42666bad24"sv}, + Entry{"v1-009950-009960-blobsidecars.seg"sv, "061a0d7781cb52cdf7e073a728d4c76c401c8df0"sv}, + Entry{"v1-009950-009960-blocksidecars.idx"sv, "d7052eed38edc7acffd5b26e351d45b176577ef5"sv}, + Entry{"v1-009960-009970-blobsidecars.seg"sv, "fcd93bffdda33bb9c837384a06d8c09ec4f99932"sv}, + Entry{"v1-009960-009970-blocksidecars.idx"sv, "cb9fcfa272957965e7d8c2d18a5f644948bf0f7c"sv}, + Entry{"v1-009970-009980-blobsidecars.seg"sv, "6820436ce2aa8fd2797e6c48a0de89040c1d45b5"sv}, + Entry{"v1-009970-009980-blocksidecars.idx"sv, "3688c20bba020b29d02f9702a3128dbb36c366f3"sv}, + Entry{"v1-009980-009990-blobsidecars.seg"sv, "70274aef77c24022fe3a5cb7478d9d5a877815c0"sv}, + Entry{"v1-009980-009990-blocksidecars.idx"sv, "81055e4f548cfcdbef073e22fb748b0f535b2121"sv}, + Entry{"v1-009990-010000-blobsidecars.seg"sv, "b66496c6c8255b7fa32a9a176e6dc3e04ea3ea3f"sv}, + Entry{"v1-009990-010000-blocksidecars.idx"sv, "a4fa54ba8a768847f00bf6bcea3cac2d9fcf2aff"sv}, + Entry{"v1-010000-010010-blobsidecars.seg"sv, "51c11187b8ef781e94b0926adc2ee807745111b9"sv}, + Entry{"v1-010000-010010-blocksidecars.idx"sv, "e5ee12cf40c5e44b043ee15ebc018d9ed206534e"sv}, Entry{"v1-010000-010500-bodies.idx"sv, "c5b5c69801a81f09be4414bc785693b82e2d9c24"sv}, Entry{"v1-010000-010500-bodies.seg"sv, "542b3f77a2f3c4b9d8a4085d838bdd1b14043f3b"sv}, Entry{"v1-010000-010500-headers.idx"sv, "3e8eb31d2a84fdbaed9eb438efe2f94125c2c215"sv}, @@ -1024,6 +1247,42 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"v1-010000-010500-transactions-to-block.idx"sv, "b5164e95945a5b9a7b9ad267986af5e3ac4fa21f"sv}, Entry{"v1-010000-010500-transactions.idx"sv, "90fc68a4a9275ed4d1e68e771cde18922db0234e"sv}, Entry{"v1-010000-010500-transactions.seg"sv, "8151bbc8b6635465760af6ebcfd630c9679b31a5"sv}, + Entry{"v1-010010-010020-blobsidecars.seg"sv, "e9c7573b98153ac2bf30700aa175cee27a4daced"sv}, + Entry{"v1-010010-010020-blocksidecars.idx"sv, "0430a88c173ebd1950de44e83d3079ec77f9c556"sv}, + Entry{"v1-010020-010030-blobsidecars.seg"sv, "f4ef19d2bc99070de1c5d8a12d13514ff03056f5"sv}, + Entry{"v1-010020-010030-blocksidecars.idx"sv, "7518468d26e659e344c594db4cd03f3f96eaa97f"sv}, + Entry{"v1-010030-010040-blobsidecars.seg"sv, "a5974c97486fa50a48a708a16d266c5395ee4dff"sv}, + Entry{"v1-010030-010040-blocksidecars.idx"sv, "7efe86634c1b4f2878cfc7f733e5ed3f8c1ad0bb"sv}, + Entry{"v1-010040-010050-blobsidecars.seg"sv, "17dab88ab78b4356e37b71c6f9f3e7a7ead0153c"sv}, + Entry{"v1-010040-010050-blocksidecars.idx"sv, "e8ea0433c595b417936938343c4fcae07b2cd38d"sv}, + Entry{"v1-010050-010060-blobsidecars.seg"sv, "12fa7d9759903763d8d9ed0f2a652bbc28e23a59"sv}, + Entry{"v1-010050-010060-blocksidecars.idx"sv, "40cf743a5036beef00650a80dea16d1c0b1c3a60"sv}, + Entry{"v1-010060-010070-blobsidecars.seg"sv, "15e36a76138e871a956962f156d2cef164eecea7"sv}, + Entry{"v1-010060-010070-blocksidecars.idx"sv, "3eb5f45fe886f20a7df35589e9b3a80b8b314597"sv}, + Entry{"v1-010070-010080-blobsidecars.seg"sv, "8ee0745ed938033db09a850091819fa238c40c90"sv}, + Entry{"v1-010070-010080-blocksidecars.idx"sv, "4a5a9fc8253d889e6b931f3a16f130d82d1924fc"sv}, + Entry{"v1-010080-010090-blobsidecars.seg"sv, "4cdc51d96dc48dee011a58db3e560753b9b14927"sv}, + Entry{"v1-010080-010090-blocksidecars.idx"sv, "b816f31eb8897780f057d996171f15164fc045e3"sv}, + Entry{"v1-010090-010100-blobsidecars.seg"sv, "34f035f3eb97dad08c6ee0b19901c532d49acf70"sv}, + Entry{"v1-010090-010100-blocksidecars.idx"sv, "8cd47f6881095ae3f928a4f158defc5dd0fdb5f0"sv}, + Entry{"v1-010100-010110-blobsidecars.seg"sv, "9519ae32a90c20f95439a881ddcfffd1ad56436b"sv}, + Entry{"v1-010100-010110-blocksidecars.idx"sv, "aa98da28a274a4462bcdd779e0bba45aeb8ab000"sv}, + Entry{"v1-010110-010120-blobsidecars.seg"sv, "573b63420fc22fc6d2913493f66443cf6841cb91"sv}, + Entry{"v1-010110-010120-blocksidecars.idx"sv, "6ac5492255ed56b802ae78f500e598ab260cc1c8"sv}, + Entry{"v1-010120-010130-blobsidecars.seg"sv, "d2b673f78a64f3014040e1e26ebd0914085ba54a"sv}, + Entry{"v1-010120-010130-blocksidecars.idx"sv, "beacfcaf77ba8c9881949bbcb4525fb18a3cb7ff"sv}, + Entry{"v1-010130-010140-blobsidecars.seg"sv, "0dd944e6fa121939063e4a481543498145fca0d0"sv}, + Entry{"v1-010130-010140-blocksidecars.idx"sv, "8eab96b2fae44c3d749e6a2b5d9c0fe1db2cfb81"sv}, + Entry{"v1-010140-010150-blobsidecars.seg"sv, "318cc3cf324bf1dabac0dc481021852801e6dc95"sv}, + Entry{"v1-010140-010150-blocksidecars.idx"sv, "d0bed06e981cc3601a7b0934ff27176a9618e9f3"sv}, + Entry{"v1-010150-010160-blobsidecars.seg"sv, "dfa1e03207174386d53ec27f8b72af05f9b92ca0"sv}, + Entry{"v1-010150-010160-blocksidecars.idx"sv, "77000d6c8f42ce16b107348681dc2c0d4f2e2151"sv}, + Entry{"v1-010160-010170-blobsidecars.seg"sv, "464a654947909326c3845b295506034d9b28bbe5"sv}, + Entry{"v1-010160-010170-blocksidecars.idx"sv, "12aacd80f6b50d09fd09dc3c21beff88a956e5b5"sv}, + Entry{"v1-010170-010180-blobsidecars.seg"sv, "3bd8a011fbb560937113622a78f2d82477a96fb1"sv}, + Entry{"v1-010170-010180-blocksidecars.idx"sv, "3a9ba5cca6b7854b02e9b1e49c129718780e1234"sv}, + Entry{"v1-010180-010190-blobsidecars.seg"sv, "365cbfd303ce331d36d60459ecf18b1d2b2db4a9"sv}, + Entry{"v1-010180-010190-blocksidecars.idx"sv, "a8185d58a9c00c863338f430cdc026d70fb7eb30"sv}, Entry{"v1-010500-011000-bodies.idx"sv, "356b9d3947b135f1f86771e0c1aeea4deffbdab9"sv}, Entry{"v1-010500-011000-bodies.seg"sv, "cb3baf683df08747eb02b270f57d594851928f4e"sv}, Entry{"v1-010500-011000-headers.idx"sv, "4c075729af495a1760405be1e6eab0af6ed54d69"sv}, @@ -1325,97 +1584,48 @@ inline constexpr std::array kMainnetSnapshots{ Entry{"v1-020700-020800-transactions-to-block.idx"sv, "d214d91355f1474a643a5cac9c4316d787ddd241"sv}, Entry{"v1-020700-020800-transactions.idx"sv, "bda365b36ef84b116c9544d9c87072bb705cd692"sv}, Entry{"v1-020700-020800-transactions.seg"sv, "f0820e9d091a5fe448033ea6b1401fed82324a21"sv}, - Entry{"v1-020800-020810-bodies.idx"sv, "32ce8563ec64b2a9254ae1cc2aa76c5676bd2692"sv}, - Entry{"v1-020800-020810-bodies.seg"sv, "723dfadaec283c3fb80d4786727cb0e25897c9e1"sv}, - Entry{"v1-020800-020810-headers.idx"sv, "88bfb583652f331feca3c705a4af205576479862"sv}, - Entry{"v1-020800-020810-headers.seg"sv, "906a948c4df1f8c72e6230bdf754d2380fd73f56"sv}, - Entry{"v1-020800-020810-transactions-to-block.idx"sv, "90120fe8dc148a3aefd3df7d93c06d99c389072d"sv}, - Entry{"v1-020800-020810-transactions.idx"sv, "e18e5348b7b4d131984dba2a60cc9b4748c6259a"sv}, - Entry{"v1-020800-020810-transactions.seg"sv, "789822699f138a0ffaf429efa89fd208c2c14f5e"sv}, - Entry{"v1-020810-020820-bodies.idx"sv, "434cc560772075b9fef4945d52d75cf9acd6ea04"sv}, - Entry{"v1-020810-020820-bodies.seg"sv, "5d636df1644b864d39f772c0ef82fc5f0ca16df5"sv}, - Entry{"v1-020810-020820-headers.idx"sv, "d2314831ac2b0498da127afb11c46e370cd38f9b"sv}, - Entry{"v1-020810-020820-headers.seg"sv, "5ae50f28ec2568c00891b322d0c7b7cfdc1b632f"sv}, - Entry{"v1-020810-020820-transactions-to-block.idx"sv, "873ec5891d8495bc1cb3697ad8cad6dd6883d218"sv}, - Entry{"v1-020810-020820-transactions.idx"sv, "989127d8c15c39af16c3765c3646c3265458a3fa"sv}, - Entry{"v1-020810-020820-transactions.seg"sv, "2c9eb9ea3f329ab0827740b5991848a2feeee354"sv}, - Entry{"v1-020820-020830-bodies.idx"sv, "71e56fafd374327b5de2aefc0c5e85aae0da7a13"sv}, - Entry{"v1-020820-020830-bodies.seg"sv, "be441d3db433ab2ae73e06e033a7333da8ec88e2"sv}, - Entry{"v1-020820-020830-headers.idx"sv, "048dfc4e240c2df3ebc7c539734092a733a91a0b"sv}, - Entry{"v1-020820-020830-headers.seg"sv, "97fb025e7673c9dc43d0af994b136b801fb82e71"sv}, - Entry{"v1-020820-020830-transactions-to-block.idx"sv, "1a42e66e14330abe058acd5feabbdb37bf01d163"sv}, - Entry{"v1-020820-020830-transactions.idx"sv, "33257d5922113235843d4ab656669ef4c2c31393"sv}, - Entry{"v1-020820-020830-transactions.seg"sv, "17ebd799e9534cfbf3e36d46f3f8cc4c647c062c"sv}, - Entry{"v1-020830-020840-bodies.idx"sv, "8bf0045467b3ccd83f1b360655e603c7011dd76b"sv}, - Entry{"v1-020830-020840-bodies.seg"sv, "bc857b9906329d1815dff31f383b40d956776584"sv}, - Entry{"v1-020830-020840-headers.idx"sv, "4c26d8102f08ac6ed2d57bed3ab43b0f8942baf4"sv}, - Entry{"v1-020830-020840-headers.seg"sv, "c6da41d62b1bb18ec5174400ad0de3ccb0e78c97"sv}, - Entry{"v1-020830-020840-transactions-to-block.idx"sv, "e21310d5b2132ee413ed26d9b7e26cde6d803c62"sv}, - Entry{"v1-020830-020840-transactions.idx"sv, "a16e36d882678c77d6f70414e8d4c42fd1e39745"sv}, - Entry{"v1-020830-020840-transactions.seg"sv, "4ac6e756b666c109a65ac582e4e37996e5ab7b79"sv}, - Entry{"v1-020840-020850-bodies.idx"sv, "361e710826cd4c2f00afd26297c682f6ae5519a7"sv}, - Entry{"v1-020840-020850-bodies.seg"sv, "80fd8df260ecbe8bfff719a7e759c6941d7e8994"sv}, - Entry{"v1-020840-020850-headers.idx"sv, "2694a8263bfc37173fe7e15d3e6965aef5fa0aad"sv}, - Entry{"v1-020840-020850-headers.seg"sv, "bb9c98abbd6e0de4fa1bb6ea703d15c23bcae62d"sv}, - Entry{"v1-020840-020850-transactions-to-block.idx"sv, "2f9c913b1016b16b7fc0a6fc3a6c2450e26f30f2"sv}, - Entry{"v1-020840-020850-transactions.idx"sv, "e5293a5224bdcd8152e6e5b1f6252dae0313d366"sv}, - Entry{"v1-020840-020850-transactions.seg"sv, "38471fcd8419a7749100123cd04a1559d7023591"sv}, - Entry{"v1-020850-020851-bodies.idx"sv, "3e0508f3ad91131f6212c2649ecc8855768102f7"sv}, - Entry{"v1-020850-020851-bodies.seg"sv, "bb78b627c9d9203cfabce99f504e06e1d0c99f3a"sv}, - Entry{"v1-020850-020851-headers.idx"sv, "baa38cc366b1014a85c2deebac05de468c6b14eb"sv}, - Entry{"v1-020850-020851-headers.seg"sv, "e049def0d553f805cdd1c44d01de0e10961f7bcf"sv}, - Entry{"v1-020850-020851-transactions-to-block.idx"sv, "d048229d42ee937663accc21c0566006ceef00e2"sv}, - Entry{"v1-020850-020851-transactions.idx"sv, "9a592d4f667f69fcd401e9edb727c1ab59cbfe0f"sv}, - Entry{"v1-020850-020851-transactions.seg"sv, "cfded4fe1f59c50be171a210f23f3fab38dbf378"sv}, - Entry{"v1-020851-020852-bodies.idx"sv, "5f16b371b999ee74ed8f32abe9311f8fe9877d01"sv}, - Entry{"v1-020851-020852-bodies.seg"sv, "39f8fd208c337f7354f2626625fb429d789e2969"sv}, - Entry{"v1-020851-020852-headers.idx"sv, "80042487321864a9970c965813e21799f4f42bf4"sv}, - Entry{"v1-020851-020852-headers.seg"sv, "642a422f10cbac32a61cd08a3b2fbf9adda60e41"sv}, - Entry{"v1-020851-020852-transactions-to-block.idx"sv, "4f9da92babbf8c568a6b966739c80702feb480b0"sv}, - Entry{"v1-020851-020852-transactions.idx"sv, "2903caffa987cf69011ca335dfcff8e9bee35272"sv}, - Entry{"v1-020851-020852-transactions.seg"sv, "eb0382e5836243186a1dd09627575cf2c248bf62"sv}, - Entry{"v1-020852-020853-bodies.idx"sv, "3a9aebf8f3a3ab1418e70393bbbfab4024341471"sv}, - Entry{"v1-020852-020853-bodies.seg"sv, "61ae9c8d910fef1d2cfba51a1b9a5d9e5d24e47a"sv}, - Entry{"v1-020852-020853-headers.idx"sv, "1b745842fdbe05752f5ca8388c336c9e8e44873d"sv}, - Entry{"v1-020852-020853-headers.seg"sv, "06cdfdeb9df8c51eeead9ac5acbe5c19f2dbc854"sv}, - Entry{"v1-020852-020853-transactions-to-block.idx"sv, "940a99b3c8874b6f4b6d90e578c271eb7d840c18"sv}, - Entry{"v1-020852-020853-transactions.idx"sv, "c166d17b8b89361b4abd23eca0f43fe5733b4d51"sv}, - Entry{"v1-020852-020853-transactions.seg"sv, "413306ebb70794f1b84d6d2de52c25d04f30313f"sv}, - Entry{"v1-020853-020854-bodies.idx"sv, "f0574309f99ada776754ed4c95f7ff815d3fb819"sv}, - Entry{"v1-020853-020854-bodies.seg"sv, "5bb8a1b000b2a6c4eca2e5c7a00ff5bd36de1420"sv}, - Entry{"v1-020853-020854-headers.idx"sv, "e8bfa9efa249b08075227e13e46205fcbe97ee93"sv}, - Entry{"v1-020853-020854-headers.seg"sv, "676377a796aa7426e17318524e1053d183cb6b72"sv}, - Entry{"v1-020853-020854-transactions-to-block.idx"sv, "b9a4f1a5bdd70ee16503af25de3d61787133ee42"sv}, - Entry{"v1-020853-020854-transactions.idx"sv, "c11da191c2ee42da171ee0cb31b180dd076a54db"sv}, - Entry{"v1-020853-020854-transactions.seg"sv, "f1c18c128253ef7a90d0bd5233d4673b78ed6ce6"sv}, - Entry{"v1-020854-020855-bodies.idx"sv, "07142acd2bd9a82b021a9613621528b1c01e9d5c"sv}, - Entry{"v1-020854-020855-bodies.seg"sv, "17b3323f6846aef99917b6bb4383ac1329b192e6"sv}, - Entry{"v1-020854-020855-headers.idx"sv, "a868db69e5231deaf812989cdfee10b2d1262c75"sv}, - Entry{"v1-020854-020855-headers.seg"sv, "bd45b65df77b8aebf6eff645f87d50121cff8f36"sv}, - Entry{"v1-020854-020855-transactions-to-block.idx"sv, "5c08f2d018f87654617ea324710ee0b2afb21986"sv}, - Entry{"v1-020854-020855-transactions.idx"sv, "22dddf4dedc51c9f0bf879c66c303366fbe2d06e"sv}, - Entry{"v1-020854-020855-transactions.seg"sv, "edcb57a1664cf6450dd47f082abf92fddd11df75"sv}, - Entry{"v1-020855-020856-bodies.idx"sv, "0d896ddd883e0fa9ea3951841fc147a602329f86"sv}, - Entry{"v1-020855-020856-bodies.seg"sv, "f705e9f216ef81f247f2c500576a9fc0d2606e43"sv}, - Entry{"v1-020855-020856-headers.idx"sv, "d9932633f6b592f636bdb8efaf669c38f8bf4d23"sv}, - Entry{"v1-020855-020856-headers.seg"sv, "b6194a693c3d66311afdcdac7c824df66d1c3732"sv}, - Entry{"v1-020855-020856-transactions-to-block.idx"sv, "b36caa29ee9127050a4efa6ec8890f226a56aa27"sv}, - Entry{"v1-020855-020856-transactions.idx"sv, "568487311bb645209853f419fe1dbc15d3374ffe"sv}, - Entry{"v1-020855-020856-transactions.seg"sv, "ecaa64eccad51a5c3c0da2456167bb9b73f2e356"sv}, - Entry{"v1-020856-020857-bodies.idx"sv, "673cb2f758b2446d1bbab5242cfc4d4ac5137dc0"sv}, - Entry{"v1-020856-020857-bodies.seg"sv, "2af25c4a923b4ca5a9b23e483bbaa5b5d8961c20"sv}, - Entry{"v1-020856-020857-headers.idx"sv, "5afb5fb02cd82ef2bc7714d3698442ace91de027"sv}, - Entry{"v1-020856-020857-headers.seg"sv, "ec45c168eabb1b1158dc230967f8fa5dcf9c574e"sv}, - Entry{"v1-020856-020857-transactions-to-block.idx"sv, "22d7d027071c15f55bbe406516d8b8abdf545b07"sv}, - Entry{"v1-020856-020857-transactions.idx"sv, "10eaf5325e16aadcf4fb59a59999f008c7857181"sv}, - Entry{"v1-020856-020857-transactions.seg"sv, "e1e9630dd220e1752bacd60e384207b65fe2aee6"sv}, - Entry{"v1-020857-020858-bodies.idx"sv, "030a975c0d21be63b6cc4d8a35a61f491c472312"sv}, - Entry{"v1-020857-020858-bodies.seg"sv, "ad6e358a9f181c0cb516cd06e4d4854ee55991c6"sv}, - Entry{"v1-020857-020858-headers.idx"sv, "de2419cdda676c86f2ccd1a2747befc1fb56ba62"sv}, - Entry{"v1-020857-020858-headers.seg"sv, "5a05d71f3a8d444db60392375853642da1a012e5"sv}, - Entry{"v1-020857-020858-transactions-to-block.idx"sv, "ef62d1b3f94fe709bebcacef09375eafd36134de"sv}, - Entry{"v1-020857-020858-transactions.idx"sv, "6a61ec9360f59b555fb7023e63cb212827a5d592"sv}, - Entry{"v1-020857-020858-transactions.seg"sv, "2e202c1389f7144a6c53dca5b6cac3fb07f3599a"sv}, + Entry{"v1-020800-020900-bodies.idx"sv, "8d00c0b6ba0d312739f62d75a8500ac346021b01"sv}, + Entry{"v1-020800-020900-bodies.seg"sv, "ae9b32a6b12bd9746397d3b7db60dee5a05d9430"sv}, + Entry{"v1-020800-020900-headers.idx"sv, "a1d211d231fe303bda9c229c8607f1ba6bf85c84"sv}, + Entry{"v1-020800-020900-headers.seg"sv, "4f521cea74950541108cbf0479fcee7336a79b82"sv}, + Entry{"v1-020800-020900-transactions-to-block.idx"sv, "fc1b9fa9f1872a509072444ff0e05732eec4a30c"sv}, + Entry{"v1-020800-020900-transactions.idx"sv, "6bfcc5339ed727f42789cf4793153a1d8b185044"sv}, + Entry{"v1-020800-020900-transactions.seg"sv, "4216041a3f0321d109ee449018d94a8a5ee2ddb7"sv}, + Entry{"v1-020900-021000-bodies.idx"sv, "f983fd78345da39050416a2d37ce779beca3743c"sv}, + Entry{"v1-020900-021000-bodies.seg"sv, "82cecc2d10dcef3360f0e7f3e2f02c49ec39edd8"sv}, + Entry{"v1-020900-021000-headers.idx"sv, "b05cbc6a9faa9ef8eff1e1922d1daea1f341160f"sv}, + Entry{"v1-020900-021000-headers.seg"sv, "3a66fda9d69a7e6d6f35021f17b1535d92605c0b"sv}, + Entry{"v1-020900-021000-transactions-to-block.idx"sv, "68eaf2c4f456d9869a9955670fd3522f8f739994"sv}, + Entry{"v1-020900-021000-transactions.idx"sv, "f8184f6a7634314ee08f769100fc3c4cff5d17ce"sv}, + Entry{"v1-020900-021000-transactions.seg"sv, "4374725519920a20d9e18f3ad6a8e0aa75561a0a"sv}, + Entry{"v1-021000-021010-bodies.idx"sv, "808fd02eeb0b6376edb5e923cc8c0a59a669e87b"sv}, + Entry{"v1-021000-021010-bodies.seg"sv, "c39b010db9a6d491948f6d083b60bf4c371c5a5a"sv}, + Entry{"v1-021000-021010-headers.idx"sv, "3e1a87317dedf987a8092dda6dd7b73cb13553ce"sv}, + Entry{"v1-021000-021010-headers.seg"sv, "03360353987fb1d06dfd0678368b16d0b18bc983"sv}, + Entry{"v1-021000-021010-transactions-to-block.idx"sv, "8022f832ff03713566a2d9cf0490a2f49dcf950a"sv}, + Entry{"v1-021000-021010-transactions.idx"sv, "16426b40985ff3564def26bc7af6044219851f74"sv}, + Entry{"v1-021000-021010-transactions.seg"sv, "e013a24c5ade0e0773f2cfdfbd21fe5876870199"sv}, + Entry{"v1-021010-021011-bodies.idx"sv, "2678fd40e39bcee36ec457dd496317b0827cd561"sv}, + Entry{"v1-021010-021011-bodies.seg"sv, "6dd51b30f7fdd3e39fa0f7be3d82412d28a72196"sv}, + Entry{"v1-021010-021011-headers.idx"sv, "e4e1ad95bd508e0c31b8bb804ccfbf22a88bdaeb"sv}, + Entry{"v1-021010-021011-headers.seg"sv, "2a2f021846eca0b33171bc64a2ca7cc1ec07d621"sv}, + Entry{"v1-021010-021011-transactions-to-block.idx"sv, "5628ac21e58a244e5af64b68e9c80f3ebd18a42a"sv}, + Entry{"v1-021010-021011-transactions.idx"sv, "5fd3f2dd536195e482cd8a54c220dae71e421d89"sv}, + Entry{"v1-021010-021011-transactions.seg"sv, "b991fda3362ebd15d91f76a563f479caa1b3b6e8"sv}, + Entry{"v1-021011-021012-bodies.idx"sv, "90c70e95115b19bdd50e53366d536414a31914fa"sv}, + Entry{"v1-021011-021012-bodies.seg"sv, "6a415c5d0da739a5d8f60b1c4558c7c8191866a3"sv}, + Entry{"v1-021011-021012-headers.idx"sv, "2f34b6d28515f62b1c248c5a1b9aa028304e458d"sv}, + Entry{"v1-021011-021012-headers.seg"sv, "2b73a5b8d0e23105dd02b3bbd61e850ff93a7210"sv}, + Entry{"v1-021011-021012-transactions-to-block.idx"sv, "38ccbb139f0131ea5a566b09fd57e5c2e07db999"sv}, + Entry{"v1-021011-021012-transactions.idx"sv, "2ea45edcd1436425bafe8b6d545ee9e18d3d2ac4"sv}, + Entry{"v1-021011-021012-transactions.seg"sv, "7c1e4ac2e5846060d3f4bd6f14dbf6fd1904f6d1"sv}, + Entry{"v1-021012-021013-bodies.idx"sv, "4a08705983fef7821b9111c9a73b604036bbc9e2"sv}, + Entry{"v1-021012-021013-bodies.seg"sv, "62d7b5f376c7be2fabb64240e28997d10322c5e8"sv}, + Entry{"v1-021012-021013-headers.idx"sv, "ddaec80beb3fc2cc7d707d0c001b5d8a5d7f819d"sv}, + Entry{"v1-021012-021013-headers.seg"sv, "70659317d14e3c165d6aa32dc0f1bd77f870612e"sv}, + Entry{"v1-021012-021013-transactions-to-block.idx"sv, "e3d5c49784a91262e25606879b9d01d8039da180"sv}, + Entry{"v1-021012-021013-transactions.idx"sv, "c35b083850170a9a7ea7140ba5fca5dbf67d41e8"sv}, + Entry{"v1-021012-021013-transactions.seg"sv, "01a5c1a35698fa2726a8be3aaa8002a63568dc1b"sv}, }; } // namespace silkworm::snapshots diff --git a/silkworm/db/datastore/snapshots/config/chains/sepolia.hpp b/silkworm/db/datastore/snapshots/config/chains/sepolia.hpp index 4a3a00c52c..56f4633a5a 100644 --- a/silkworm/db/datastore/snapshots/config/chains/sepolia.hpp +++ b/silkworm/db/datastore/snapshots/config/chains/sepolia.hpp @@ -16,31 +16,31 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"accessor/v1-accounts.0-64.vi"sv, "4a0a5b3175b473ec62e4d648576dc46e03c37c46"sv}, Entry{"accessor/v1-accounts.128-192.efi"sv, "5ef169dd8415cd035597d29405df4f693243c62d"sv}, Entry{"accessor/v1-accounts.128-192.vi"sv, "379f36d58cf99d75d73328ef154ca375cfdf73c7"sv}, - Entry{"accessor/v1-accounts.192-200.efi"sv, "160556b9b5deb7a5ffc9407a9a59c16e5afb134b"sv}, - Entry{"accessor/v1-accounts.192-200.vi"sv, "feb254e4b66c1ed5521843ab1448c7c79e2abcf8"sv}, - Entry{"accessor/v1-accounts.200-202.efi"sv, "4841cd0c798052778851c1058ce6305bd20590a8"sv}, - Entry{"accessor/v1-accounts.200-202.vi"sv, "a0cf580ae01b4585e5507b6fa5fe74ed675c5312"sv}, + Entry{"accessor/v1-accounts.192-208.efi"sv, "0ae1fb2f45c2071548891ae299521352dd614f19"sv}, + Entry{"accessor/v1-accounts.192-208.vi"sv, "29f849fc0e0fbe303794f1190fb5fe40bd5e0142"sv}, + Entry{"accessor/v1-accounts.208-209.efi"sv, "47737a0fd90d77d2cd7eb89d11cba53856b592f5"sv}, + Entry{"accessor/v1-accounts.208-209.vi"sv, "d142fc8cff6ee916239e9b0307a55d56b05fb6e8"sv}, Entry{"accessor/v1-accounts.64-128.efi"sv, "a53229ca7ec9b6db6376d8b85197bcd9c53daaa5"sv}, Entry{"accessor/v1-accounts.64-128.vi"sv, "c979e2b9bbed46ed8b41cfbb8f290841ac2e09dd"sv}, Entry{"accessor/v1-code.0-64.efi"sv, "28ddea8c270898fa8588cfa5f222c76e5602e895"sv}, Entry{"accessor/v1-code.0-64.vi"sv, "dce0937597f2997d42de48d8dd354069a02f46c6"sv}, Entry{"accessor/v1-code.128-192.efi"sv, "02b37286a48a4d8ce75e719b5478d34e226a29e2"sv}, Entry{"accessor/v1-code.128-192.vi"sv, "0ab5fe774c7b2264d9870477cd33ef385eff095e"sv}, - Entry{"accessor/v1-code.192-200.efi"sv, "e7f3343d71c8f0a354ea3dc18ad846457d9b1e6e"sv}, - Entry{"accessor/v1-code.192-200.vi"sv, "b40163f7080ea0bd0f6e45fef72f19611914603b"sv}, - Entry{"accessor/v1-code.200-202.efi"sv, "bef0e0e4a5d7a5f28c738621ae622d4f19093d2d"sv}, - Entry{"accessor/v1-code.200-202.vi"sv, "977647f2d6a9cda6fd135439bd28b3e2f51ee77b"sv}, + Entry{"accessor/v1-code.192-208.efi"sv, "e0497466b14eafed864265ec3f4ab3087ac44fef"sv}, + Entry{"accessor/v1-code.192-208.vi"sv, "5282583c683c3c36821f5e50fb2e41b451fb775a"sv}, + Entry{"accessor/v1-code.208-209.efi"sv, "1bdc1dc6b8c479167670bbaaeee341c6ff2d6ad1"sv}, + Entry{"accessor/v1-code.208-209.vi"sv, "a4c4248578c62b9caa890da05512d90344142f80"sv}, Entry{"accessor/v1-code.64-128.efi"sv, "91efabed02d48e786a0df6c4272d46f2e144b743"sv}, Entry{"accessor/v1-code.64-128.vi"sv, "2b1e7ef62762e584c893dede43bc2fa81bddf1f5"sv}, Entry{"accessor/v1-logaddrs.0-64.efi"sv, "5bbf9fa85e546d554b8d921e0912958a1793cf54"sv}, Entry{"accessor/v1-logaddrs.128-192.efi"sv, "1dc6513d2f3410fe8c58f41de39c09b2c2e98f67"sv}, - Entry{"accessor/v1-logaddrs.192-200.efi"sv, "eab249ac0716400a12c0f97412a363ab8213af63"sv}, - Entry{"accessor/v1-logaddrs.200-202.efi"sv, "51be94c92573fbbb691f5a4558851fecde1f75da"sv}, + Entry{"accessor/v1-logaddrs.192-208.efi"sv, "60212435de03041b2c3d7ba2a312fbbe2d139d87"sv}, + Entry{"accessor/v1-logaddrs.208-209.efi"sv, "2f197e352075153790dc3f8ccfe2168f08840fd2"sv}, Entry{"accessor/v1-logaddrs.64-128.efi"sv, "a154e7791c341f1f89d2f0f0c2b010df79a77aeb"sv}, Entry{"accessor/v1-logtopics.0-64.efi"sv, "a8cc203775ad1406ceaed58f5a1ab4f6c1880681"sv}, Entry{"accessor/v1-logtopics.128-192.efi"sv, "11515f388b895dc75ea2f5973c930113b532ff8d"sv}, - Entry{"accessor/v1-logtopics.192-200.efi"sv, "4a021f0decbff09372c9a839c941be2f224cb228"sv}, - Entry{"accessor/v1-logtopics.200-202.efi"sv, "4107808ac42074bcf2279cfc6ba41918cd443b53"sv}, + Entry{"accessor/v1-logtopics.192-208.efi"sv, "6fca549e9ecb798c8ccbb0d4e78714a15fdebb15"sv}, + Entry{"accessor/v1-logtopics.208-209.efi"sv, "39bb4ada7e5b76d834b8c9cd9151e7bd4a9071f4"sv}, Entry{"accessor/v1-logtopics.64-128.efi"sv, "623a7d6d87c9f98629d394beafd14d364e063241"sv}, Entry{"accessor/v1-receipt.0-64.efi"sv, "40535bc2a15259edb1332922e7054e4d3d513bb6"sv}, Entry{"accessor/v1-receipt.0-64.vi"sv, "61b868921f354009c80afdec2d5031157ef8fe68"sv}, @@ -52,31 +52,31 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"accessor/v1-receipt.148-150.vi"sv, "102b4b7c44f6ab4e1ee58264e6fd0516fba60ba6"sv}, Entry{"accessor/v1-receipt.150-151.efi"sv, "d882c6a78690814fc0e0ae89172098ab40873a45"sv}, Entry{"accessor/v1-receipt.150-151.vi"sv, "cfe500c241bfbfbb4e22a6a8680a0f1a91b904d0"sv}, - Entry{"accessor/v1-receipt.192-200.efi"sv, "4ab2ddece465b1dd1443d22b71d8f09296180cfe"sv}, - Entry{"accessor/v1-receipt.192-200.vi"sv, "c678d80beeee0168a005943f5f9e990dd7bb7a08"sv}, - Entry{"accessor/v1-receipt.200-202.efi"sv, "aa68dec7f0f7c3af4770b45d5d5ebe66960061d0"sv}, - Entry{"accessor/v1-receipt.200-202.vi"sv, "2174dea51370d9eb39faabe864355e0b6cb6e134"sv}, + Entry{"accessor/v1-receipt.192-208.efi"sv, "be866876cb23339fc2f7a2e4f04cd9418d903157"sv}, + Entry{"accessor/v1-receipt.192-208.vi"sv, "be0603a70c62d820c73cf8c1b2eeba4e4eac406c"sv}, + Entry{"accessor/v1-receipt.208-209.efi"sv, "6f308d357c55b0757acce34e7284df0315eb4d24"sv}, + Entry{"accessor/v1-receipt.208-209.vi"sv, "5205c99b26d44b93e75652a6c5612104260a1b48"sv}, Entry{"accessor/v1-receipt.64-128.efi"sv, "63f92b1cc979abc4788dece35d2972d513e93b94"sv}, Entry{"accessor/v1-receipt.64-128.vi"sv, "ddc72fe23640cebe0369d9e75bf67f58a2ae16de"sv}, Entry{"accessor/v1-storage.0-64.efi"sv, "d7728bced602d33298b3f6e80f55de24802acac0"sv}, Entry{"accessor/v1-storage.0-64.vi"sv, "a290170dcef3b8e25a48dc1f143a27f274d78a8c"sv}, Entry{"accessor/v1-storage.128-192.efi"sv, "ffa75cc4c3b387cc4d7066485f3d0bed8170e91a"sv}, Entry{"accessor/v1-storage.128-192.vi"sv, "0922cc9d8aff262220326ce391e89c77a159eac6"sv}, - Entry{"accessor/v1-storage.192-200.efi"sv, "c2d80fc92ebc86c7e62ab57c7fef6e5fd303b48a"sv}, - Entry{"accessor/v1-storage.192-200.vi"sv, "360abb44cc565d0048185f1aa168532731a27f2c"sv}, - Entry{"accessor/v1-storage.200-202.efi"sv, "66daafec42b9fc87b0755374f725d76406e0a259"sv}, - Entry{"accessor/v1-storage.200-202.vi"sv, "07f23c2ba473bc65af2ecefc2ebb0fc087848aa8"sv}, + Entry{"accessor/v1-storage.192-208.efi"sv, "8c991b57a6f522dd6d153d37bf61b513e3bd87ac"sv}, + Entry{"accessor/v1-storage.192-208.vi"sv, "6e3faa721e2118e7f7a1bf4fc9da4656aa0f10b7"sv}, + Entry{"accessor/v1-storage.208-209.efi"sv, "115fe66792a97b79e1d1d1a74de7de99b6665298"sv}, + Entry{"accessor/v1-storage.208-209.vi"sv, "2aed2ed07d8006d4dd10110fc133a503ec582846"sv}, Entry{"accessor/v1-storage.64-128.efi"sv, "cd5333fd5f9d986762088f82a3c323139a4d6d50"sv}, Entry{"accessor/v1-storage.64-128.vi"sv, "80d2fcacab75a8abbde695ed9ea7d254e59fb20d"sv}, Entry{"accessor/v1-tracesfrom.0-64.efi"sv, "3dcf74d9b123cda38e3f45cb8adf9aed24c4b5b7"sv}, Entry{"accessor/v1-tracesfrom.128-192.efi"sv, "f1ee549ae5218268b3ddccd5d21d269c7ea41091"sv}, - Entry{"accessor/v1-tracesfrom.192-200.efi"sv, "148c5367c2bc482f161788a72b655fefedb67f3c"sv}, - Entry{"accessor/v1-tracesfrom.200-202.efi"sv, "76c03b913f3a3947007e2806d42b3b61e5351635"sv}, + Entry{"accessor/v1-tracesfrom.192-208.efi"sv, "337339476140ac9742aa9dbd5e9902e1360d6ebe"sv}, + Entry{"accessor/v1-tracesfrom.208-209.efi"sv, "d85f429ac7bf46cb57704c58c84af64e99fd7501"sv}, Entry{"accessor/v1-tracesfrom.64-128.efi"sv, "92f528d860a99bf78f0423eac06b6ad2a3fd2f60"sv}, Entry{"accessor/v1-tracesto.0-64.efi"sv, "6dda6d95257d4c32831190bd3afb276d8f7faf0f"sv}, Entry{"accessor/v1-tracesto.128-192.efi"sv, "d3a0e3e0d590c52dacb236e77396eb453eec5f39"sv}, - Entry{"accessor/v1-tracesto.192-200.efi"sv, "d858e4e6da48f86472be7cfb23cc0f8f4ed60d10"sv}, - Entry{"accessor/v1-tracesto.200-202.efi"sv, "b461c2715db5e4cd3df7d1c355319359c8250acb"sv}, + Entry{"accessor/v1-tracesto.192-208.efi"sv, "98fe8b94826d5620c6dd2211b888c529cd488201"sv}, + Entry{"accessor/v1-tracesto.208-209.efi"sv, "acab4293276e46797d82e5636c86b2e9d3740de9"sv}, Entry{"accessor/v1-tracesto.64-128.efi"sv, "a9580725e3b528bdf0243118fcb0585cbacd9763"sv}, Entry{"domain/v1-accounts.0-128.bt"sv, "ffea2bf2f107ba518a6d321cd3384d507b4ac0f6"sv}, Entry{"domain/v1-accounts.0-128.kv"sv, "91d3c4da59971be9ed13b2ce7178d6936a386073"sv}, @@ -84,36 +84,36 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"domain/v1-accounts.128-192.bt"sv, "66165b72aa68448ffe16a11dac874a2432b3bb20"sv}, Entry{"domain/v1-accounts.128-192.kv"sv, "f12afeef74979ee48d0bbc7058a59cef22282b68"sv}, Entry{"domain/v1-accounts.128-192.kvei"sv, "2b0c26f5b25d4c080e8f50828c25928a7ea66571"sv}, - Entry{"domain/v1-accounts.192-200.bt"sv, "3a8a0ee160110bc2ca37f7da829fa3757fd80527"sv}, - Entry{"domain/v1-accounts.192-200.kv"sv, "79bdaab76bdf706edf0e75c9d91326c54ad6e27f"sv}, - Entry{"domain/v1-accounts.192-200.kvei"sv, "d9286eb5a2b7ce6134568a9d95940de21892c711"sv}, - Entry{"domain/v1-accounts.200-202.bt"sv, "1991cd29b26725ebd64c13fa3206324cc12a3d43"sv}, - Entry{"domain/v1-accounts.200-202.kv"sv, "d808028120fd4f7ebae5fd9473ecf68c4d3d7ab1"sv}, - Entry{"domain/v1-accounts.200-202.kvei"sv, "64b52798688d2c63968b6f7584d19a03c8152d59"sv}, + Entry{"domain/v1-accounts.192-208.bt"sv, "0f7300bf27484436d6b6b3cf260db1273f4aff45"sv}, + Entry{"domain/v1-accounts.192-208.kv"sv, "6d3203952faf0f2c37d1eff79f24bc040a787c8f"sv}, + Entry{"domain/v1-accounts.192-208.kvei"sv, "6c8782162742ab859baa565bb8ddf5b336f8f896"sv}, + Entry{"domain/v1-accounts.208-209.bt"sv, "d3faf208429e84e7154aba066a2aeb87ad5a3f2e"sv}, + Entry{"domain/v1-accounts.208-209.kv"sv, "12c51f61b27f8b61f552bcc382bb6a7c9122abd2"sv}, + Entry{"domain/v1-accounts.208-209.kvei"sv, "dac303fa16abe879d45ddcd5d8420d0b4d60f067"sv}, Entry{"domain/v1-code.0-128.bt"sv, "972d2e6c5d1f535311c9c2fdeea288d9dd6e56a6"sv}, Entry{"domain/v1-code.0-128.kv"sv, "acec4c4c338589691ea2d72dc48e29336bb8dc65"sv}, Entry{"domain/v1-code.0-128.kvei"sv, "9c037ac849e2e07b503102ef7f9abadb0c5d9eac"sv}, Entry{"domain/v1-code.128-192.bt"sv, "9b40492f239fc62d2c2b6b18d34eac848ca6b88c"sv}, Entry{"domain/v1-code.128-192.kv"sv, "006d829d172514da4676ebe5d71d63e51b8a9534"sv}, Entry{"domain/v1-code.128-192.kvei"sv, "eb2ee34e56d21d0ba6bde670aeb2650046830d15"sv}, - Entry{"domain/v1-code.192-200.bt"sv, "d416861a4c893fccfe151902bd754d91f7d17883"sv}, - Entry{"domain/v1-code.192-200.kv"sv, "91d5c56b1d2737352bd633a4420724f67693ebd2"sv}, - Entry{"domain/v1-code.192-200.kvei"sv, "2a8ffff50db63baa98c3eb38ccd9913ba40fa24d"sv}, - Entry{"domain/v1-code.200-202.bt"sv, "b87ea68f3df74684aa451e5897192875621a586d"sv}, - Entry{"domain/v1-code.200-202.kv"sv, "ac563bf28c69c4c1b4da6ca92d873f74c75da06b"sv}, - Entry{"domain/v1-code.200-202.kvei"sv, "6555e6b832abe7e8a846285e98c38017d88a6e96"sv}, - Entry{"domain/v1-commitment.0-128.bt"sv, "71b659cbb4175f00b06e400ee4cd50e36ef7dd39"sv}, - Entry{"domain/v1-commitment.0-128.kv"sv, "383ae5e9ec7f82b7964a1ad6c4f25f65b9a372dc"sv}, - Entry{"domain/v1-commitment.0-128.kvei"sv, "f20bb06d299fd648dd641be5ad745b1be8829f6c"sv}, - Entry{"domain/v1-commitment.128-192.bt"sv, "c8d13c44e4ac48d35c3289e70a192aff9a5d6bbc"sv}, - Entry{"domain/v1-commitment.128-192.kv"sv, "3f833275a0dee92bdf5474189a5b35182961fa14"sv}, - Entry{"domain/v1-commitment.128-192.kvei"sv, "80f48eb1fb6f4acfb196d12a37bffd277c818580"sv}, - Entry{"domain/v1-commitment.192-200.bt"sv, "0a6f9ed00f9cd2fe4a2881c37da2b649fdf0b297"sv}, - Entry{"domain/v1-commitment.192-200.kv"sv, "5bd6e11b8c6f74ae83d79a464c8f5f1b279b3095"sv}, - Entry{"domain/v1-commitment.192-200.kvei"sv, "f1dc25b5102cbb7d3592db4196254ea84118e8f0"sv}, - Entry{"domain/v1-commitment.200-202.bt"sv, "23de9ad48de302d2fc835f889f82ed60dfa4d3a9"sv}, - Entry{"domain/v1-commitment.200-202.kv"sv, "67ac95411080a1e04d174d978dff98292876e0de"sv}, - Entry{"domain/v1-commitment.200-202.kvei"sv, "7ef97c6fedc1941d0150c9e291bae9b3c4faa0b0"sv}, + Entry{"domain/v1-code.192-208.bt"sv, "47747d6f13f36bc6f185d5aacae2b670d3386ce6"sv}, + Entry{"domain/v1-code.192-208.kv"sv, "8559fda64bd0f42feb039d69da15b3e7451ca1a9"sv}, + Entry{"domain/v1-code.192-208.kvei"sv, "c2b811507f38afc70083f2c599d05ea7518126af"sv}, + Entry{"domain/v1-code.208-209.bt"sv, "a7afa37547dd244ebc6f323cdc01f38a55bf3ccc"sv}, + Entry{"domain/v1-code.208-209.kv"sv, "3d12754ac22df00625b7d55d56d0f8dac9584b8c"sv}, + Entry{"domain/v1-code.208-209.kvei"sv, "e3d511045a398d57438a2d594dc9b22dae791a74"sv}, + Entry{"domain/v1-commitment.0-128.bt"sv, "889da94ccd2f85c66bdfdc9c7a1558dc7a15c404"sv}, + Entry{"domain/v1-commitment.0-128.kv"sv, "a91d2f63cf41706208429833e53c56e4b2bfea61"sv}, + Entry{"domain/v1-commitment.0-128.kvei"sv, "b1a397e29f2a5476de2600360b5780b0f8b919b5"sv}, + Entry{"domain/v1-commitment.128-192.bt"sv, "2352250db136151048dd9a08ac3aa83d69ee4038"sv}, + Entry{"domain/v1-commitment.128-192.kv"sv, "36804837e2220afeb28c6c479049633aac8ff585"sv}, + Entry{"domain/v1-commitment.128-192.kvei"sv, "fa1d375a90970c0d69ee63319d2572707e2d7ffd"sv}, + Entry{"domain/v1-commitment.192-208.bt"sv, "c77ca641f3573ca2808c48d83fee47c38ee9c1ab"sv}, + Entry{"domain/v1-commitment.192-208.kv"sv, "02584a73915c0e5606f469dcad29fdb10126535e"sv}, + Entry{"domain/v1-commitment.192-208.kvei"sv, "7509c83eb578ada458a3c915e0544514826c4eb5"sv}, + Entry{"domain/v1-commitment.208-209.bt"sv, "4d1056b63b63f98fe9ffff1c401f45bae349e3ce"sv}, + Entry{"domain/v1-commitment.208-209.kv"sv, "c624c6133f3b66108cd911ca7323ea9f1229404b"sv}, + Entry{"domain/v1-commitment.208-209.kvei"sv, "43907dc41a4bb7f161d4a031f68668eed2f39caa"sv}, Entry{"domain/v1-receipt.0-128.bt"sv, "ea916431aa4b8776dca4402cc2b1f5bd715399da"sv}, Entry{"domain/v1-receipt.0-128.kv"sv, "21aa470862f9756cdd44a9854ba19c750008d490"sv}, Entry{"domain/v1-receipt.0-128.kvei"sv, "0257137eb098393ce8e600a2f5946afc24ade297"sv}, @@ -129,89 +129,89 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"domain/v1-receipt.150-151.bt"sv, "17e0fa9138c0e6d35bf773caadd64669d310a171"sv}, Entry{"domain/v1-receipt.150-151.kv"sv, "2e08d1b844b614a602b026031a7270bcdbb955b3"sv}, Entry{"domain/v1-receipt.150-151.kvei"sv, "9ff2e6ec37e3c03a0cfa02e855fbcfc6dc2a1db3"sv}, - Entry{"domain/v1-receipt.192-200.bt"sv, "4e5f1f791c9b609a0f24375abeaf1c678c535525"sv}, - Entry{"domain/v1-receipt.192-200.kv"sv, "7565128eb3f3f7c0fd3af943e3c26d3eb1a5f0bd"sv}, - Entry{"domain/v1-receipt.192-200.kvei"sv, "cb65cc2e51b50f032abcf605a1716de9bb6a08e4"sv}, - Entry{"domain/v1-receipt.200-202.bt"sv, "9e327e1f755f2dde17e7b44817117049c4b69383"sv}, - Entry{"domain/v1-receipt.200-202.kv"sv, "4b8ea5e48e420d01f8b15d3512c02f440fa25d61"sv}, - Entry{"domain/v1-receipt.200-202.kvei"sv, "18534e2d53874753c97b168e0b458147618c32f5"sv}, + Entry{"domain/v1-receipt.192-208.bt"sv, "315e8ecf2b2ec23b2998b60772241c92e7b5dd3b"sv}, + Entry{"domain/v1-receipt.192-208.kv"sv, "70164d16d4f1636e881f869f4592982079868c0e"sv}, + Entry{"domain/v1-receipt.192-208.kvei"sv, "a00f948cd58ac641ad17e9263c7337fa59a4ca7c"sv}, + Entry{"domain/v1-receipt.208-209.bt"sv, "6eb5b3c3db932772674f55bb94ca6651407d3743"sv}, + Entry{"domain/v1-receipt.208-209.kv"sv, "91ea79b3e5967cf092691a6d4556f75209426e52"sv}, + Entry{"domain/v1-receipt.208-209.kvei"sv, "46f641eecb9659958772d4b7dcd5e914b28acb7d"sv}, Entry{"domain/v1-storage.0-128.bt"sv, "3d5909b8e7fbfa32560646ee269a338a6e3dd5bb"sv}, Entry{"domain/v1-storage.0-128.kv"sv, "a610d253849c89ce1b399c5a582d00f0e20c0826"sv}, Entry{"domain/v1-storage.0-128.kvei"sv, "c8843acf94f379852ac6affdfc10de64ce900703"sv}, Entry{"domain/v1-storage.128-192.bt"sv, "e325fadda8e7b8cd3cd21af6072dc2c5bee9a754"sv}, Entry{"domain/v1-storage.128-192.kv"sv, "e2d6a40f35b1e2bc1665cf3f416cc498d3cdd6c3"sv}, Entry{"domain/v1-storage.128-192.kvei"sv, "66af97ae522d9e984a84377542b500fdad574a3c"sv}, - Entry{"domain/v1-storage.192-200.bt"sv, "01ebdfd4423f0a67a1cf2df843cc3a33e64fcf96"sv}, - Entry{"domain/v1-storage.192-200.kv"sv, "d69238d36229bf99f380387040fbcfacd8725955"sv}, - Entry{"domain/v1-storage.192-200.kvei"sv, "77a248aeeda1c0f36aeafa75a0d9dcb2ce9add88"sv}, - Entry{"domain/v1-storage.200-202.bt"sv, "5274a2420e42bab72a4946ad2564a972507258b2"sv}, - Entry{"domain/v1-storage.200-202.kv"sv, "14420fd67f26438157494f05fa547bd345760dd4"sv}, - Entry{"domain/v1-storage.200-202.kvei"sv, "f62e77a64e7d93d7521f293cc8102bb6293f680d"sv}, + Entry{"domain/v1-storage.192-208.bt"sv, "fba860b058be9fc6b632904ccf5589c5784f6623"sv}, + Entry{"domain/v1-storage.192-208.kv"sv, "13e5f0fe0151388727f09188a9ab61bea7594512"sv}, + Entry{"domain/v1-storage.192-208.kvei"sv, "8fdc3da05d3638e3b41eefa4a806f037e561c199"sv}, + Entry{"domain/v1-storage.208-209.bt"sv, "7db133b8c32432b07ccf692bf897565b248ea1c7"sv}, + Entry{"domain/v1-storage.208-209.kv"sv, "be8a6537fbfde6e65f09ec8d7f809febd07667e2"sv}, + Entry{"domain/v1-storage.208-209.kvei"sv, "5deed3ea3873da9ba2833c9d80647ff779519ac4"sv}, Entry{"history/v1-accounts.0-64.v"sv, "c6c4c734ad14942c0d74960693629c9b519631b8"sv}, Entry{"history/v1-accounts.128-192.v"sv, "ed25f822a421898c08fd6a10df3296d52be8a3f0"sv}, - Entry{"history/v1-accounts.192-200.v"sv, "05ee44d5ffde12c3d87d2dec4afd09fb7e90895c"sv}, - Entry{"history/v1-accounts.200-202.v"sv, "a7d3c6dc5a91a207c9f45fb7474cac83ef534109"sv}, + Entry{"history/v1-accounts.192-208.v"sv, "12c42305ae1e6cc3db2937d5a728831ab6b92ea7"sv}, + Entry{"history/v1-accounts.208-209.v"sv, "2ea3115cd37a7600782c3ff3e5940cf904957aaf"sv}, Entry{"history/v1-accounts.64-128.v"sv, "978c1545f5e61e2b401787cc74e89f6b99f909fa"sv}, Entry{"history/v1-code.0-64.v"sv, "dad552cff411d1b77b67411b5be17af6debc64d6"sv}, Entry{"history/v1-code.128-192.v"sv, "4b2f867ecdf9da5e7cd6fff04750745710e707d8"sv}, - Entry{"history/v1-code.192-200.v"sv, "06ffb0bad69d2f4a828ad9a45bd8d232c2cad98f"sv}, - Entry{"history/v1-code.200-202.v"sv, "17bf8a478f56bb68e4636675f8423e4e180cda46"sv}, + Entry{"history/v1-code.192-208.v"sv, "8f0ed2171640d52212b2fcaced0b605a1790a18d"sv}, + Entry{"history/v1-code.208-209.v"sv, "01fad8e4db226da39832b8774a9c8cf06ca84846"sv}, Entry{"history/v1-code.64-128.v"sv, "b6ce720f321bbdf023c0945d946c582d8291de41"sv}, Entry{"history/v1-receipt.0-64.v"sv, "4dd6c9b4996a8a145002d0e74a510486a563560a"sv}, Entry{"history/v1-receipt.128-144.v"sv, "9348b1dc7a7d2bbd1018bc2d47be2cb7a60632f3"sv}, Entry{"history/v1-receipt.144-148.v"sv, "461622c38d908451228849aeebbc12ada1500f11"sv}, Entry{"history/v1-receipt.148-150.v"sv, "47eb7e07e4ff709821a81027f31ecabad00b378e"sv}, Entry{"history/v1-receipt.150-151.v"sv, "97c098980739c1e261ee8e0eca33fc9bb7a447ed"sv}, - Entry{"history/v1-receipt.192-200.v"sv, "b651565f405e775cc28b2daae76369d8229c11da"sv}, - Entry{"history/v1-receipt.200-202.v"sv, "0f8ba51a813cd58e658c731b217f8214c4c21915"sv}, + Entry{"history/v1-receipt.192-208.v"sv, "6fb69e9d49256aaf674a1ff40b7e8de6b24e282c"sv}, + Entry{"history/v1-receipt.208-209.v"sv, "838e7578e157f69d9384af55941beabaca18d003"sv}, Entry{"history/v1-receipt.64-128.v"sv, "51c2fa52257a28e8d78bbd2d2684f0024ae138f3"sv}, Entry{"history/v1-storage.0-64.v"sv, "8278e9f6f6e8da717e0a63b2ab4755a6ff5e64a8"sv}, Entry{"history/v1-storage.128-192.v"sv, "79299fd366d48be3e719955019f01ca3f75c769d"sv}, - Entry{"history/v1-storage.192-200.v"sv, "d1e97a26050729f747a09556aa2d8f214663f323"sv}, - Entry{"history/v1-storage.200-202.v"sv, "723efe49f9df3d977cbc330dbc621234573a0d64"sv}, + Entry{"history/v1-storage.192-208.v"sv, "1ebe0f250bd56abfbdb3a2970955f86324e8766c"sv}, + Entry{"history/v1-storage.208-209.v"sv, "76948f8074ee2e858f906934cbb8650ddf56250d"sv}, Entry{"history/v1-storage.64-128.v"sv, "b1a51dc8062ad7994f65c820b213f1e8aa183674"sv}, Entry{"idx/v1-accounts.0-64.ef"sv, "69d91d090a3d4fdbffe46298dda0d659f6318c58"sv}, Entry{"idx/v1-accounts.128-192.ef"sv, "a9f6a98a2cd8f989cf100cdcdd9b9d10a3dfd089"sv}, - Entry{"idx/v1-accounts.192-200.ef"sv, "5e0a0e06230ff8a096a0e00f465066c9499583e3"sv}, - Entry{"idx/v1-accounts.200-202.ef"sv, "6ddbd3c145c3d3bfcc1f092e0504a16c7cf89393"sv}, + Entry{"idx/v1-accounts.192-208.ef"sv, "af7425373780b27a8531dc6e9aa0b0773bdcfa99"sv}, + Entry{"idx/v1-accounts.208-209.ef"sv, "55c42b592fa7d49300e0621d7047ece7a02d1367"sv}, Entry{"idx/v1-accounts.64-128.ef"sv, "76f9997b845d98c8e70c60559a1184ccb6103379"sv}, Entry{"idx/v1-code.0-64.ef"sv, "0be7b238c4f4ec875e3592814e70ed96b828ae4d"sv}, Entry{"idx/v1-code.128-192.ef"sv, "e723ac2efc3080a09e653ce7b6c1c926c76f7c46"sv}, - Entry{"idx/v1-code.192-200.ef"sv, "65f34c4b32ce9bc70b34f603c52cfc3fe65e41d9"sv}, - Entry{"idx/v1-code.200-202.ef"sv, "997bd46a269f5af3187fd154b2b743f6d44add32"sv}, + Entry{"idx/v1-code.192-208.ef"sv, "2537aee0d38454ad418baf6ee59b4b8f2ba00b22"sv}, + Entry{"idx/v1-code.208-209.ef"sv, "42d2e50cea584cffd5d7ec2825903b34dffe6b96"sv}, Entry{"idx/v1-code.64-128.ef"sv, "05ca760941d749f5f6173b51453ac3db6eac9967"sv}, Entry{"idx/v1-logaddrs.0-64.ef"sv, "4d1c8a0f19eef678ec5018cdbd5b0001e7eb8736"sv}, Entry{"idx/v1-logaddrs.128-192.ef"sv, "09b4b15c84ccd053f822cfa0a7ca1bca4725d42e"sv}, - Entry{"idx/v1-logaddrs.192-200.ef"sv, "2864ccc5afeb0d6b71dd618306a44589c5cd88cb"sv}, - Entry{"idx/v1-logaddrs.200-202.ef"sv, "104a7f3a1f63dca0d5fb5b95fcb0c232c1f23267"sv}, + Entry{"idx/v1-logaddrs.192-208.ef"sv, "1bf64d7289d5d572bdba7f8d012fc724d3bbf8e3"sv}, + Entry{"idx/v1-logaddrs.208-209.ef"sv, "01477811948a6b0c7b72fd0deeb4ade4f6eada0d"sv}, Entry{"idx/v1-logaddrs.64-128.ef"sv, "07690af318c9d060b698ebc82aec7fdfd263c71b"sv}, Entry{"idx/v1-logtopics.0-64.ef"sv, "7272dcf283cdb22eba5d172b20a892438135f2ae"sv}, Entry{"idx/v1-logtopics.128-192.ef"sv, "211df368c6f817a28c0adc90ca1a58e1f242c3de"sv}, - Entry{"idx/v1-logtopics.192-200.ef"sv, "57b1d3474abb5fea037dd2e733e568046e7e99aa"sv}, - Entry{"idx/v1-logtopics.200-202.ef"sv, "1984c2acfa1cb4b2da14cd305a9401f8292c17f4"sv}, + Entry{"idx/v1-logtopics.192-208.ef"sv, "2557d60ee7d0d0aabc369163381836d4fc64e276"sv}, + Entry{"idx/v1-logtopics.208-209.ef"sv, "70b8e372382f5ddd23e156ccf31a169f6218c3cd"sv}, Entry{"idx/v1-logtopics.64-128.ef"sv, "c941ba45db9dbec6ffa6559f69802d2b00e7dbaf"sv}, Entry{"idx/v1-receipt.0-64.ef"sv, "76dd2f24458bfcb1deac00598837e08a0692f7df"sv}, Entry{"idx/v1-receipt.128-144.ef"sv, "2386e41c6332255a4f528618172d7be1c6cdd051"sv}, Entry{"idx/v1-receipt.144-148.ef"sv, "a717047aeae49c1b428dd910667a6c520346fc72"sv}, Entry{"idx/v1-receipt.148-150.ef"sv, "1f2e881abb50f72a5e7066efc3d9ac3f05ffc4eb"sv}, Entry{"idx/v1-receipt.150-151.ef"sv, "676166afd5e2622cb62d57ace992f4d7881be1b7"sv}, - Entry{"idx/v1-receipt.192-200.ef"sv, "b414803ac37493c54f390b3e7cf728a59acc2c46"sv}, - Entry{"idx/v1-receipt.200-202.ef"sv, "babc484772680b26c118a61344cce7982aa8593f"sv}, + Entry{"idx/v1-receipt.192-208.ef"sv, "adb802094ce8037b37dd1db7fccd1fabff0ac094"sv}, + Entry{"idx/v1-receipt.208-209.ef"sv, "091d76fc98b037aad7d3a0e089b23e3846d3d1b8"sv}, Entry{"idx/v1-receipt.64-128.ef"sv, "4dbfb1b7f6c8fe3b071c97fa19ef48f5a09c3847"sv}, Entry{"idx/v1-storage.0-64.ef"sv, "b4ee6b4d97c79e4aabf08f63834936bf819ad636"sv}, Entry{"idx/v1-storage.128-192.ef"sv, "4005815008efddd4b85d79ae943011a613f03477"sv}, - Entry{"idx/v1-storage.192-200.ef"sv, "fd0991cee10b98af610553621a58273cb7fafa9b"sv}, - Entry{"idx/v1-storage.200-202.ef"sv, "9c03554705b46e26fe48374b4bf174cce433c4a8"sv}, + Entry{"idx/v1-storage.192-208.ef"sv, "9b8d5b056fe0d68ea1effc27023eba9a7d2f0670"sv}, + Entry{"idx/v1-storage.208-209.ef"sv, "dafc9182f123c26c04ad930c9c5787a075f197e8"sv}, Entry{"idx/v1-storage.64-128.ef"sv, "cf324031e46f69f40223d9152bb4baa18e1a019d"sv}, Entry{"idx/v1-tracesfrom.0-64.ef"sv, "b7e1a1063450b2612f41e2c13534cfb88ca13856"sv}, Entry{"idx/v1-tracesfrom.128-192.ef"sv, "0861508205acd54fee4a1ef4cbe4bfa405d51e46"sv}, - Entry{"idx/v1-tracesfrom.192-200.ef"sv, "8f52180a0bbc4bbcb7a1eef1f5afc4f4450df8b8"sv}, - Entry{"idx/v1-tracesfrom.200-202.ef"sv, "c3b2f3262470c3483efca7122afd00baf6c35429"sv}, + Entry{"idx/v1-tracesfrom.192-208.ef"sv, "8aa9f1f34d2fb288a7ed5236de241b2f975e6f27"sv}, + Entry{"idx/v1-tracesfrom.208-209.ef"sv, "74b92a2083355ef0b76592a7549471680b0d8963"sv}, Entry{"idx/v1-tracesfrom.64-128.ef"sv, "089d047b8825184136b68eb0b3b31797d8acd331"sv}, Entry{"idx/v1-tracesto.0-64.ef"sv, "46c469b50213dbd5509818dc338b20fa615be90e"sv}, Entry{"idx/v1-tracesto.128-192.ef"sv, "9b80909adf1440ca6482e255453daf9caeb064c1"sv}, - Entry{"idx/v1-tracesto.192-200.ef"sv, "2c1d527cf2c3d88cebe133255f706200cb97bf23"sv}, - Entry{"idx/v1-tracesto.200-202.ef"sv, "504976ab7a2147517c70bf0725c066a34be7c9b6"sv}, + Entry{"idx/v1-tracesto.192-208.ef"sv, "388327457fe40b1bccc4af5e732675cd28877f70"sv}, + Entry{"idx/v1-tracesto.208-209.ef"sv, "6a3009c2e66d6420829f1833bd6a098a95dfe926"sv}, Entry{"idx/v1-tracesto.64-128.ef"sv, "c905e993eb4ad910f95c54c07880633ccb2c86fb"sv}, Entry{"salt-blocks.txt"sv, "51f5e036ffe71e573dfc75f74d839be921c0b90c"sv}, Entry{"salt-state.txt"sv, "0113ec56c7c0d72783dbb5738becffa9c4c43d69"sv}, @@ -285,8 +285,6 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-004100-004200-transactions-to-block.idx"sv, "4a90fe99e37deb9f2bcfc950fe2044c17b3de213"sv}, Entry{"v1-004100-004200-transactions.idx"sv, "479c6765a242ea4191fdfed02897f136f41a4858"sv}, Entry{"v1-004100-004200-transactions.seg"sv, "aa6bdc801179a54d7c3fa355f914711fd66737c9"sv}, - Entry{"v1-004200-004300-blobsidecars.seg"sv, "460230cbd00d95f202c0fbe2c0fdc51500ceb3eb"sv}, - Entry{"v1-004200-004300-blocksidecars.idx"sv, "0bdc2e2240e9af46de48f8bc01488d306bc6b484"sv}, Entry{"v1-004200-004300-bodies.idx"sv, "65131728b6ada80c7d04835ef598730533094d2f"sv}, Entry{"v1-004200-004300-bodies.seg"sv, "a369c0a9f2c7de78ac6b2d40cac31422d76551b1"sv}, Entry{"v1-004200-004300-headers.idx"sv, "8963afb9fe25ad84cf07bf24588550638f53d8aa"sv}, @@ -294,8 +292,20 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-004200-004300-transactions-to-block.idx"sv, "339f9477fc29c6bc3df529da07a74012e6b17808"sv}, Entry{"v1-004200-004300-transactions.idx"sv, "52cdabbb14b60378d18a091260a25ddd2c8495fb"sv}, Entry{"v1-004200-004300-transactions.seg"sv, "505e90c03d6c101027eedf96dcc76a05bbdfbf8d"sv}, - Entry{"v1-004300-004400-blobsidecars.seg"sv, "9542704452986a3a99e2369ff7953bab1a62eafc"sv}, - Entry{"v1-004300-004400-blocksidecars.idx"sv, "d347cb9708e6850711fb247958a28ac162ed01bf"sv}, + Entry{"v1-004240-004250-blobsidecars.seg"sv, "932565c11e6f1aec5512c024a630c4074fcba778"sv}, + Entry{"v1-004240-004250-blocksidecars.idx"sv, "93864946ae26d98d78fdc649011ac770b2e8a50c"sv}, + Entry{"v1-004250-004260-blobsidecars.seg"sv, "3a3037e15d6cd6a899879d878a3e0dc13ac53944"sv}, + Entry{"v1-004250-004260-blocksidecars.idx"sv, "08b93f3f8b06470b7249742482e3c42bf2dec7e1"sv}, + Entry{"v1-004260-004270-blobsidecars.seg"sv, "295bd34fd8951b7f39df2eda6451847508e6700b"sv}, + Entry{"v1-004260-004270-blocksidecars.idx"sv, "0ef6593fe4ec24fa6895467cd4674d94c5879ee3"sv}, + Entry{"v1-004270-004280-blobsidecars.seg"sv, "f1c9870e78f47f3b8387e2b533f2ab23cce64444"sv}, + Entry{"v1-004270-004280-blocksidecars.idx"sv, "d9999f92bb7878a67477e8bfb9833bc658a9f382"sv}, + Entry{"v1-004280-004290-blobsidecars.seg"sv, "330426fe350f3b171bba9b409e4544402f7f4ffe"sv}, + Entry{"v1-004280-004290-blocksidecars.idx"sv, "d98a9eb10c715fee2871fa9e64a0dd1c9c6df62b"sv}, + Entry{"v1-004290-004300-blobsidecars.seg"sv, "370bb4a67b3f346999b6068b2a2613f316566dae"sv}, + Entry{"v1-004290-004300-blocksidecars.idx"sv, "5ba0fb575fcff8bacc706b9ce964b64034b1fff6"sv}, + Entry{"v1-004300-004310-blobsidecars.seg"sv, "96e16985496bf8884e9b1698d86f2cc482cba82f"sv}, + Entry{"v1-004300-004310-blocksidecars.idx"sv, "ace123366bf7840ab13466c338a09156ea45fc44"sv}, Entry{"v1-004300-004400-bodies.idx"sv, "c4abc7f40239157b0b38154f057d845be076916e"sv}, Entry{"v1-004300-004400-bodies.seg"sv, "d5c5c578daee8fc936cf70fce13f77a1d1050e6f"sv}, Entry{"v1-004300-004400-headers.idx"sv, "f9e3b493d0bfdf3b8fe44e37c364f4d589e26410"sv}, @@ -303,8 +313,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-004300-004400-transactions-to-block.idx"sv, "26361b740924c3020179d91a434d96d9ae8c6cb0"sv}, Entry{"v1-004300-004400-transactions.idx"sv, "6ef53a828e71c788953068cfff9607a7729b3c21"sv}, Entry{"v1-004300-004400-transactions.seg"sv, "e8c2c2b0d4e3c2f997241f6bbc9fef19a8d42a40"sv}, - Entry{"v1-004400-004500-blobsidecars.seg"sv, "2cbd605848a347da786475f92f9cb546a704e292"sv}, - Entry{"v1-004400-004500-blocksidecars.idx"sv, "9e77ad58d1e8e9c664e6327794d8ac0d5ad34492"sv}, + Entry{"v1-004310-004320-blobsidecars.seg"sv, "f5d09e7d58b1003928adfb42af74c97abaedef9d"sv}, + Entry{"v1-004310-004320-blocksidecars.idx"sv, "b77264f58062bc3efeeb984b5a2e5b495cf20ce1"sv}, + Entry{"v1-004320-004330-blobsidecars.seg"sv, "27090f24065acd45db3f11c1b1913e900d0a83fb"sv}, + Entry{"v1-004320-004330-blocksidecars.idx"sv, "7a6ddb3d6ab3fbf00de14f9388664995cc556d1c"sv}, + Entry{"v1-004330-004340-blobsidecars.seg"sv, "38a536d326956897482fdae3f83f57c4c983ad66"sv}, + Entry{"v1-004330-004340-blocksidecars.idx"sv, "1251270fd2d51230c4a271f30d840ecd6c5a3a9e"sv}, + Entry{"v1-004340-004350-blobsidecars.seg"sv, "81bd0b8d9256c59165d5ebfb82adc8a9fff1101b"sv}, + Entry{"v1-004340-004350-blocksidecars.idx"sv, "454301da7210afde6c83d2aebadee2d8bdcd81d3"sv}, + Entry{"v1-004350-004360-blobsidecars.seg"sv, "4d121c87d938ce0acbeadaabcb88b7656f226f4f"sv}, + Entry{"v1-004350-004360-blocksidecars.idx"sv, "ec524c4e0e1c5ed9accb28d2a0acfb7fb599bd06"sv}, + Entry{"v1-004360-004370-blobsidecars.seg"sv, "950a1eddd8df4a0129793eb006551a97d4a95841"sv}, + Entry{"v1-004360-004370-blocksidecars.idx"sv, "a80e94d7210bf2fedaa627856eb03cc5f73f6aca"sv}, + Entry{"v1-004370-004380-blobsidecars.seg"sv, "94796ad9dde5aa051b558e1996467ddbe03b6120"sv}, + Entry{"v1-004370-004380-blocksidecars.idx"sv, "16aa0c7af63db164ff7656ebb45162d14494f1b1"sv}, + Entry{"v1-004380-004390-blobsidecars.seg"sv, "f5b723f395c23813f01939117274a19838e059ba"sv}, + Entry{"v1-004380-004390-blocksidecars.idx"sv, "31e091ed782469da06d212a84da90a11414171b7"sv}, + Entry{"v1-004390-004400-blobsidecars.seg"sv, "28301540240702edd3975db4a174bbe5085227c6"sv}, + Entry{"v1-004390-004400-blocksidecars.idx"sv, "9924876b468c4ae3a1692d03786f2130e8787e58"sv}, + Entry{"v1-004400-004410-blobsidecars.seg"sv, "ad531a5124ec39c3a69db1b7eef15aaa5abadd4b"sv}, + Entry{"v1-004400-004410-blocksidecars.idx"sv, "51a1346e30ce256dec1d05cae438444568368b85"sv}, Entry{"v1-004400-004500-bodies.idx"sv, "7a2b11ce1bb2a072ab83862ee196103a746ffd7c"sv}, Entry{"v1-004400-004500-bodies.seg"sv, "687bdf10d04411c1a382bb64cc7e55c7d3152da0"sv}, Entry{"v1-004400-004500-headers.idx"sv, "6799485e7c6fd7f00d42436944c14250860a82f1"sv}, @@ -312,8 +340,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-004400-004500-transactions-to-block.idx"sv, "b146ef2a21e6e5dc316ccdfcba47eafd4d673371"sv}, Entry{"v1-004400-004500-transactions.idx"sv, "b2d25a1c7314c7f85a8284a51356a805423367e9"sv}, Entry{"v1-004400-004500-transactions.seg"sv, "dbc42a8cd7dd7940b94ba23d24170c05b70ee208"sv}, - Entry{"v1-004500-004600-blobsidecars.seg"sv, "e3e8f948273af2297471b4eac02db87c51f595f4"sv}, - Entry{"v1-004500-004600-blocksidecars.idx"sv, "c387fcf63a096c2213234dd68e0dcd085f47c347"sv}, + Entry{"v1-004410-004420-blobsidecars.seg"sv, "c339294ad4cc3ffeb3954b047f37dffd3618d9bd"sv}, + Entry{"v1-004410-004420-blocksidecars.idx"sv, "97ee64d77df95359ef9559dddb9aa2542c1e42e8"sv}, + Entry{"v1-004420-004430-blobsidecars.seg"sv, "406ad71e8087c8768b7e30903040ef92a7ecc19a"sv}, + Entry{"v1-004420-004430-blocksidecars.idx"sv, "0db5cb63b49c3350e745c00935f36b3ae83df3bf"sv}, + Entry{"v1-004430-004440-blobsidecars.seg"sv, "361856512c650c7cdf811a7c352e006a3a326034"sv}, + Entry{"v1-004430-004440-blocksidecars.idx"sv, "4ceb262a69716793e223e4f0b8e90437810b7527"sv}, + Entry{"v1-004440-004450-blobsidecars.seg"sv, "e283c696a20e38ca7632fb106c6eae30576fbb12"sv}, + Entry{"v1-004440-004450-blocksidecars.idx"sv, "d5cc5701308645613e8831c390268829666276b2"sv}, + Entry{"v1-004450-004460-blobsidecars.seg"sv, "ad12d384923b5e597eaa55a8786879cd3b2ab5af"sv}, + Entry{"v1-004450-004460-blocksidecars.idx"sv, "c65308a7fe43b9a184f94c38152dbf92ff98149a"sv}, + Entry{"v1-004460-004470-blobsidecars.seg"sv, "8a96aafe31838380da944b1a0cea496480a40f94"sv}, + Entry{"v1-004460-004470-blocksidecars.idx"sv, "85cdaacb79a599b3ff9c36f8512211d330ea7c44"sv}, + Entry{"v1-004470-004480-blobsidecars.seg"sv, "7f2333a5c9f6e8a3ab9a73474703f37bb5cb3df1"sv}, + Entry{"v1-004470-004480-blocksidecars.idx"sv, "3b3a868fcdf0f5505ea1f5f2fabce22301719a86"sv}, + Entry{"v1-004480-004490-blobsidecars.seg"sv, "4a4fbbe6440b6bed08cc414853ed923133ea649b"sv}, + Entry{"v1-004480-004490-blocksidecars.idx"sv, "c3ff01892a0e94d1364f64155cc8dd937f3ff374"sv}, + Entry{"v1-004490-004500-blobsidecars.seg"sv, "ede78e02abf6ce0987034e1d4b7ed9135bab42eb"sv}, + Entry{"v1-004490-004500-blocksidecars.idx"sv, "2347bd3bf2af21759f7ecb074b30cba53b714a84"sv}, + Entry{"v1-004500-004510-blobsidecars.seg"sv, "bc800b60cf75180b801f93879dc9f9ea192f3ac6"sv}, + Entry{"v1-004500-004510-blocksidecars.idx"sv, "94e853739ba074b23e7b77135de9bd15f4defcb5"sv}, Entry{"v1-004500-004600-bodies.idx"sv, "1f644d4d3eb4c099e8ed49b7f65131c449022cd0"sv}, Entry{"v1-004500-004600-bodies.seg"sv, "582cbf228966ffc9ce49fbf7a1e377d154f1488d"sv}, Entry{"v1-004500-004600-headers.idx"sv, "74223d628610a077e578d4838daa2a4848fcabe8"sv}, @@ -321,8 +367,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-004500-004600-transactions-to-block.idx"sv, "cc5f69a9b85f09fb24da0f6d79928f7d1750b55f"sv}, Entry{"v1-004500-004600-transactions.idx"sv, "4a9d3a22c0007e482e0a6104a979987b88aae593"sv}, Entry{"v1-004500-004600-transactions.seg"sv, "2995e2ef297ae670de2c28736823444c8fd4182e"sv}, - Entry{"v1-004600-004700-blobsidecars.seg"sv, "22e3a587b93e4478808a643ea015e5ae248c398a"sv}, - Entry{"v1-004600-004700-blocksidecars.idx"sv, "066a0a9986a9111ad5bcc9b113dcb5699f5f79b6"sv}, + Entry{"v1-004510-004520-blobsidecars.seg"sv, "57e4bbc1fcdce855cd545198b59cb47f4b066b3d"sv}, + Entry{"v1-004510-004520-blocksidecars.idx"sv, "b5bdb1e6224135b7e0020e7f30fe7ca9780880d0"sv}, + Entry{"v1-004520-004530-blobsidecars.seg"sv, "4f1927e9b6aee07c88db9071ac1aa44d5918ff16"sv}, + Entry{"v1-004520-004530-blocksidecars.idx"sv, "c7bf84fa991c8bb471ca82d8435ffec680e03207"sv}, + Entry{"v1-004530-004540-blobsidecars.seg"sv, "ca335da69ba0f14293741c4b04c0dd3f9a27a80f"sv}, + Entry{"v1-004530-004540-blocksidecars.idx"sv, "1bb59fae7f3f035b3bc74bd920b901eec4f81219"sv}, + Entry{"v1-004540-004550-blobsidecars.seg"sv, "3fde582e123a5671b87897bfbd0bea3875957132"sv}, + Entry{"v1-004540-004550-blocksidecars.idx"sv, "3c3e4fdb80dfdf3f29270c07636907e89962fc72"sv}, + Entry{"v1-004550-004560-blobsidecars.seg"sv, "1d4a9cd3069f218d3a3ea434b49f81177893ae96"sv}, + Entry{"v1-004550-004560-blocksidecars.idx"sv, "c7c6b0c051180292bb137af1cf6d30c88b13aaf1"sv}, + Entry{"v1-004560-004570-blobsidecars.seg"sv, "ed795204deabfbda553b35ac92d9641fb4e0069d"sv}, + Entry{"v1-004560-004570-blocksidecars.idx"sv, "24903759ef5b631f8450a97867732e6aad51bbfe"sv}, + Entry{"v1-004570-004580-blobsidecars.seg"sv, "9e584f5ed9443ad243b0c211537488f5ab827477"sv}, + Entry{"v1-004570-004580-blocksidecars.idx"sv, "56c94b154a4fbed29cc500312ffc2c3c66e8653f"sv}, + Entry{"v1-004580-004590-blobsidecars.seg"sv, "991e20f24093976c1d5ca2ea17a5b223f927f975"sv}, + Entry{"v1-004580-004590-blocksidecars.idx"sv, "d330ff913de7ce471a8863dcffaddb7773c0965a"sv}, + Entry{"v1-004590-004600-blobsidecars.seg"sv, "fd65084c3e744d25bc83c7a5ab8a5502d290105a"sv}, + Entry{"v1-004590-004600-blocksidecars.idx"sv, "8778ee252e3bda6face3d162e1863d69b81d6051"sv}, + Entry{"v1-004600-004610-blobsidecars.seg"sv, "28aba447c1f5a69213ef6730235cd8d509907aef"sv}, + Entry{"v1-004600-004610-blocksidecars.idx"sv, "504ce285e4b56f5555abaa6b3a5bdedaff906bc8"sv}, Entry{"v1-004600-004700-bodies.idx"sv, "f310d261c1e6336e3225657008154b498ff185ec"sv}, Entry{"v1-004600-004700-bodies.seg"sv, "d7744bba4e6db9e321aa30b1896877a15e771891"sv}, Entry{"v1-004600-004700-headers.idx"sv, "a4f5a84d5715f97b20b5672cea0bc36fa49bf945"sv}, @@ -330,8 +394,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-004600-004700-transactions-to-block.idx"sv, "50f80bfc231c67165bfe13841368c18f2a0aefe7"sv}, Entry{"v1-004600-004700-transactions.idx"sv, "91080fbdf35d8fe4e99ab70c14c7a400886699f6"sv}, Entry{"v1-004600-004700-transactions.seg"sv, "6b2bec9f25e99987be9efccbaf89f5467d216b6c"sv}, - Entry{"v1-004700-004800-blobsidecars.seg"sv, "b24f5807d18d4f8b4bc47f16f66380ef92d89efe"sv}, - Entry{"v1-004700-004800-blocksidecars.idx"sv, "962405abfb90f5447b763e54f3380391871bbfdb"sv}, + Entry{"v1-004610-004620-blobsidecars.seg"sv, "c6f4fead6665c59123ed575eff83fac3835a4ae9"sv}, + Entry{"v1-004610-004620-blocksidecars.idx"sv, "43d122bcca7bc08d5f15a15bcb57301f9e7356b2"sv}, + Entry{"v1-004620-004630-blobsidecars.seg"sv, "3bc3002651ec92fe42a2020944228bf8bd49845c"sv}, + Entry{"v1-004620-004630-blocksidecars.idx"sv, "4e1afbd08be98e56affe14f4699816503ad1e72e"sv}, + Entry{"v1-004630-004640-blobsidecars.seg"sv, "e28762597aca5fe11c87507f30c9164f54bb0432"sv}, + Entry{"v1-004630-004640-blocksidecars.idx"sv, "e1fa45dda2795a8bb23d8a2c8c811017dec0db14"sv}, + Entry{"v1-004640-004650-blobsidecars.seg"sv, "5f2dbe6f2e8b227c59c2d2661ad4d50ccc2f3ebd"sv}, + Entry{"v1-004640-004650-blocksidecars.idx"sv, "0cd635d5aac31452930312dae10247123f88eafa"sv}, + Entry{"v1-004650-004660-blobsidecars.seg"sv, "a616f0556d7cf1677e9c5f3d72a57666d7d6d15a"sv}, + Entry{"v1-004650-004660-blocksidecars.idx"sv, "c46c6535f6c64e68b31b9702d2a592709cc21f1b"sv}, + Entry{"v1-004660-004670-blobsidecars.seg"sv, "7da01253aa2e2ed2f7c48bb4b864f4febaaac332"sv}, + Entry{"v1-004660-004670-blocksidecars.idx"sv, "34d7781b0bfaa3d8bff0b25d166a3a6d325f4743"sv}, + Entry{"v1-004670-004680-blobsidecars.seg"sv, "a13a44fef41d8b04f891a4b8a0e8d55c4a8c3bc4"sv}, + Entry{"v1-004670-004680-blocksidecars.idx"sv, "cc89938c9f7c8e553bc8dd10b2b0159b72e42472"sv}, + Entry{"v1-004680-004690-blobsidecars.seg"sv, "36abffd3f53d8b332b5b865eec09d62391086664"sv}, + Entry{"v1-004680-004690-blocksidecars.idx"sv, "ddd3583c74143d14fbba3cbd5378c6a6fa646f19"sv}, + Entry{"v1-004690-004700-blobsidecars.seg"sv, "e63422077e7c913a6fc444cf4d1223cc3f80a71c"sv}, + Entry{"v1-004690-004700-blocksidecars.idx"sv, "6c8a7f1c7f9d35bc2c879a6212f1d5569809c7eb"sv}, + Entry{"v1-004700-004710-blobsidecars.seg"sv, "a73a477f1b8c82613d0c74aaff64c5b6fa32702b"sv}, + Entry{"v1-004700-004710-blocksidecars.idx"sv, "d608b61a187898d8ac6748c12904c7cb57792c2e"sv}, Entry{"v1-004700-004800-bodies.idx"sv, "3d751c7c7721292a92364c07d429e616486aaf9f"sv}, Entry{"v1-004700-004800-bodies.seg"sv, "cc5eb7b85874ea849c1801b5f8872960e10d44c3"sv}, Entry{"v1-004700-004800-headers.idx"sv, "c83380a5548c0ec027bad2a776ea12c3570095d2"sv}, @@ -339,8 +421,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-004700-004800-transactions-to-block.idx"sv, "174dad4271c220ab2df37da0b971e3f5524af78c"sv}, Entry{"v1-004700-004800-transactions.idx"sv, "50f95f69fefa23d79fe77ff693fc7543f5cde201"sv}, Entry{"v1-004700-004800-transactions.seg"sv, "238a6d5db83cfb3bcb6181d84045618653e5033b"sv}, - Entry{"v1-004800-004900-blobsidecars.seg"sv, "a50490716413795e2df54d369ff95f170ad4123c"sv}, - Entry{"v1-004800-004900-blocksidecars.idx"sv, "86313ef87a12ec38e2df75553001e67d4fc5281e"sv}, + Entry{"v1-004710-004720-blobsidecars.seg"sv, "d5e80e5f0c4951aa1c9a4e569e430d446ce5ca75"sv}, + Entry{"v1-004710-004720-blocksidecars.idx"sv, "ca626dfeef86068d5dfec4680733283887b2ac87"sv}, + Entry{"v1-004720-004730-blobsidecars.seg"sv, "320884e90da237d74b4844babbbc11c6292b91df"sv}, + Entry{"v1-004720-004730-blocksidecars.idx"sv, "2266f85c4020bbc4c69d5e407e179cd215700e26"sv}, + Entry{"v1-004730-004740-blobsidecars.seg"sv, "454c27dfcc0bb58c01c908811996d363bf5882fe"sv}, + Entry{"v1-004730-004740-blocksidecars.idx"sv, "e0cd0ed1fbf463cc9c4c253d70d909cfb721ed3d"sv}, + Entry{"v1-004740-004750-blobsidecars.seg"sv, "0d7b161c8665adee4cab3d2e043338c6b7c6b1b7"sv}, + Entry{"v1-004740-004750-blocksidecars.idx"sv, "32fc5da15300401ab4d3e099c564db63620222c2"sv}, + Entry{"v1-004750-004760-blobsidecars.seg"sv, "6c56fefa9cb6172919a4c1c7c75aa9f14b6edf37"sv}, + Entry{"v1-004750-004760-blocksidecars.idx"sv, "a2a1a340edc709755f35aa9434a7a27500bbad84"sv}, + Entry{"v1-004760-004770-blobsidecars.seg"sv, "11bf885db76d4a0483422fea597df34258905fad"sv}, + Entry{"v1-004760-004770-blocksidecars.idx"sv, "ad581f6a87e283f9d06878a08acc68375c3d15af"sv}, + Entry{"v1-004770-004780-blobsidecars.seg"sv, "e31e317987ba4ca35a293cdfd1fcfcef2aa28019"sv}, + Entry{"v1-004770-004780-blocksidecars.idx"sv, "a36f6af8c72b2db9571b4bda6a0a88afb2000e1b"sv}, + Entry{"v1-004780-004790-blobsidecars.seg"sv, "2a22a47076b5cc8fb032452d6162b9452d4b50d0"sv}, + Entry{"v1-004780-004790-blocksidecars.idx"sv, "e688d7b6f518378f87389c2d6aa0371ec907c2de"sv}, + Entry{"v1-004790-004800-blobsidecars.seg"sv, "de4943abc39a0327d2fdabb35b7c7bb61fba1544"sv}, + Entry{"v1-004790-004800-blocksidecars.idx"sv, "ac909a7c6e535660f8cd6d1ce3e6ebc807b06702"sv}, + Entry{"v1-004800-004810-blobsidecars.seg"sv, "b839e601eb0e77472081c45f18ba939fc3f2b58a"sv}, + Entry{"v1-004800-004810-blocksidecars.idx"sv, "1d54b3f1cca928c1cd575bf9de5cbca6c471b175"sv}, Entry{"v1-004800-004900-bodies.idx"sv, "7589ea816a744eb4d7401c8bdf4a18ba2476e612"sv}, Entry{"v1-004800-004900-bodies.seg"sv, "e29c713d4b9f22dd06b5400bb0f9725b79d02b42"sv}, Entry{"v1-004800-004900-headers.idx"sv, "4b704d77f16c6089223692560b4a08fdc1c51a73"sv}, @@ -348,8 +448,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-004800-004900-transactions-to-block.idx"sv, "bc14946a0cd34e8d6105c5c25ba87db89192d3d4"sv}, Entry{"v1-004800-004900-transactions.idx"sv, "fe6131afe8a2f3c1dbd6c76c85e3664f64a00a69"sv}, Entry{"v1-004800-004900-transactions.seg"sv, "7aac99eea22cf393cc426cf80cd107a79d7258b1"sv}, - Entry{"v1-004900-005000-blobsidecars.seg"sv, "17559972b39ec6602da40965ba6692751b51e9af"sv}, - Entry{"v1-004900-005000-blocksidecars.idx"sv, "f9a1e07e1da1110a6d003085f6511af5681d54b3"sv}, + Entry{"v1-004810-004820-blobsidecars.seg"sv, "bb74aa1ae28bfbb1cfa8b2614c7deafd5f5306e2"sv}, + Entry{"v1-004810-004820-blocksidecars.idx"sv, "b28b1a1e8b86149f071e09865addd573d4738bca"sv}, + Entry{"v1-004820-004830-blobsidecars.seg"sv, "c56f13f261848a69df0dccf34d620735b6b626ac"sv}, + Entry{"v1-004820-004830-blocksidecars.idx"sv, "07c7761e4ae4546b1134cce034bfeb17511a4068"sv}, + Entry{"v1-004830-004840-blobsidecars.seg"sv, "4c2c2ac9f08f1d413481999b6202ae1b7c6fd06a"sv}, + Entry{"v1-004830-004840-blocksidecars.idx"sv, "d74f6a768ff922e32723607d4a973a228a703dce"sv}, + Entry{"v1-004840-004850-blobsidecars.seg"sv, "7242b3a94b3114f83dbd7c63f5bc10a8d0960b5f"sv}, + Entry{"v1-004840-004850-blocksidecars.idx"sv, "938e09f36f4a6fa4ceb936dd9171f23023081c42"sv}, + Entry{"v1-004850-004860-blobsidecars.seg"sv, "0162cb2646f9ff094ae76f9bc5b6d8125f9b06d9"sv}, + Entry{"v1-004850-004860-blocksidecars.idx"sv, "f66861c35c5b079f156036bc0bc297a241f222f9"sv}, + Entry{"v1-004860-004870-blobsidecars.seg"sv, "37e9c3ba369465d4bb73853b8c20d938803165d0"sv}, + Entry{"v1-004860-004870-blocksidecars.idx"sv, "c4797b5f8da150674e1af3a9d40befead9d8e8e9"sv}, + Entry{"v1-004870-004880-blobsidecars.seg"sv, "d27b06926c86e568b7ef5ef7b16d57ba4b763283"sv}, + Entry{"v1-004870-004880-blocksidecars.idx"sv, "f7a8689ca3b19d72a85773f9683ec3eb6b753527"sv}, + Entry{"v1-004880-004890-blobsidecars.seg"sv, "c487684198e00383ac63d6badc9a9aaf9d8eafe1"sv}, + Entry{"v1-004880-004890-blocksidecars.idx"sv, "ab252c8adbe2697c75f02043e9426c1d874eb738"sv}, + Entry{"v1-004890-004900-blobsidecars.seg"sv, "145393f460bdc199cc009406d0a8f515858a4f37"sv}, + Entry{"v1-004890-004900-blocksidecars.idx"sv, "285a3b758132ee82402dc2c027fcbddfe7ddb7af"sv}, + Entry{"v1-004900-004910-blobsidecars.seg"sv, "52a85f17d7e53699f0e929597a4a1cdf7a5c22fa"sv}, + Entry{"v1-004900-004910-blocksidecars.idx"sv, "0aaadbfc46f167ff98e5458dcdd0f12e8dded320"sv}, Entry{"v1-004900-005000-bodies.idx"sv, "2355c693bdb3a0e1dc2b4e418e89a987164849ae"sv}, Entry{"v1-004900-005000-bodies.seg"sv, "dbfff071b837d4410fa890ffc716b78a95a775ea"sv}, Entry{"v1-004900-005000-headers.idx"sv, "9d7d815a30991f9e94b060945f5a234305c312c4"sv}, @@ -357,8 +475,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-004900-005000-transactions-to-block.idx"sv, "aeff16dbc1843d950a04975309a6fd076eef3541"sv}, Entry{"v1-004900-005000-transactions.idx"sv, "5a292b2e5904ae21440672d000832c0bf6f3805d"sv}, Entry{"v1-004900-005000-transactions.seg"sv, "06c1bd87f228a671948122a4c7284d909cb13542"sv}, - Entry{"v1-005000-005100-blobsidecars.seg"sv, "8a5a70bf1f7f4f0f6a12c263ef05652a043bc941"sv}, - Entry{"v1-005000-005100-blocksidecars.idx"sv, "6267bc73aa57c73b37f3f89933138b1a6f16082c"sv}, + Entry{"v1-004910-004920-blobsidecars.seg"sv, "a828da786e1a5da3c158f3a4fb295a7caaf1403c"sv}, + Entry{"v1-004910-004920-blocksidecars.idx"sv, "cee85abcda0af763daebacb8bc907e420261e5d5"sv}, + Entry{"v1-004920-004930-blobsidecars.seg"sv, "7bb44c0ccd3d89d0ac5eacfcce347200d8e55ea6"sv}, + Entry{"v1-004920-004930-blocksidecars.idx"sv, "7d212e4b08ae49b2ebaa6b9fda400391384d48a0"sv}, + Entry{"v1-004930-004940-blobsidecars.seg"sv, "859ee0e55f9f68c6ff603f252c1fc47a8720576f"sv}, + Entry{"v1-004930-004940-blocksidecars.idx"sv, "afffeb119680b696fecd93a56c8b623b8b40bd95"sv}, + Entry{"v1-004940-004950-blobsidecars.seg"sv, "d676d48c1cba4491172fa5a7bd78e807fb5adc60"sv}, + Entry{"v1-004940-004950-blocksidecars.idx"sv, "c142f25a30839419ceca2e2af3d1b10bfd04e7aa"sv}, + Entry{"v1-004950-004960-blobsidecars.seg"sv, "fe1639b93c2de13990b9eb510de70d8ac56d1368"sv}, + Entry{"v1-004950-004960-blocksidecars.idx"sv, "5bc58f98af409142c99c0c8498dd45c41be293f8"sv}, + Entry{"v1-004960-004970-blobsidecars.seg"sv, "072180011f2e62d70e4e540b0f494df7071404b2"sv}, + Entry{"v1-004960-004970-blocksidecars.idx"sv, "b15610c9cad54caea94bac56c066e744ca9e8add"sv}, + Entry{"v1-004970-004980-blobsidecars.seg"sv, "997caf2a7050e21e2186b16e14e17c4dd73f2514"sv}, + Entry{"v1-004970-004980-blocksidecars.idx"sv, "021953b31aea48582cfec92382040310e729a13f"sv}, + Entry{"v1-004980-004990-blobsidecars.seg"sv, "1731187a900b85aa9a8401067ac0f70fe95cbf6f"sv}, + Entry{"v1-004980-004990-blocksidecars.idx"sv, "45c3f37b40b573f9326c587fbcbc2a55269fca1b"sv}, + Entry{"v1-004990-005000-blobsidecars.seg"sv, "edf866fd062902eb61e0f3c12f8a3db79c9b7adf"sv}, + Entry{"v1-004990-005000-blocksidecars.idx"sv, "5d628ea29dc238d866669895c201dddf580f60ba"sv}, + Entry{"v1-005000-005010-blobsidecars.seg"sv, "fccc093fc094c503763b6c85433ce033ee30a98b"sv}, + Entry{"v1-005000-005010-blocksidecars.idx"sv, "e2dbb8e0cd789009f842bb484039c9a6ec7c9240"sv}, Entry{"v1-005000-005100-bodies.idx"sv, "06b951204ef4b3002ffa91185c34228fe875ea66"sv}, Entry{"v1-005000-005100-bodies.seg"sv, "2f100cb72e878aa78081ffbff9e21552b1d29070"sv}, Entry{"v1-005000-005100-headers.idx"sv, "fe14e4e15384d839d9dd36fffd02201c4e511dd0"sv}, @@ -366,8 +502,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-005000-005100-transactions-to-block.idx"sv, "2d97c887d0e9ca9f4e481953c6d717aaf405fb6e"sv}, Entry{"v1-005000-005100-transactions.idx"sv, "8ad2bf49a37cf8fedf6c123bdfb613c58be40dde"sv}, Entry{"v1-005000-005100-transactions.seg"sv, "9f755c43a73e87ff34c205502457c4ad4088f3c7"sv}, - Entry{"v1-005100-005200-blobsidecars.seg"sv, "52ffd8599ab9ebb9865e203d2f4dfd3684262666"sv}, - Entry{"v1-005100-005200-blocksidecars.idx"sv, "e94011de92226e6ca8132e7dde9ac2c82339e1f9"sv}, + Entry{"v1-005010-005020-blobsidecars.seg"sv, "d242896ef69ab11ca872adbcf65d8da291996181"sv}, + Entry{"v1-005010-005020-blocksidecars.idx"sv, "d97413fe825008c69cbc124895d5ae303353b479"sv}, + Entry{"v1-005020-005030-blobsidecars.seg"sv, "07798cfceb94c4588f856d857dc5ee071961462e"sv}, + Entry{"v1-005020-005030-blocksidecars.idx"sv, "801dc419744c8ab72852a6d9c017cbbda07381cf"sv}, + Entry{"v1-005030-005040-blobsidecars.seg"sv, "1a32e84ff514461680c04f24e94cea96d5f155bc"sv}, + Entry{"v1-005030-005040-blocksidecars.idx"sv, "81dc4bc9d0a47dffff151def1a766a225579d8eb"sv}, + Entry{"v1-005040-005050-blobsidecars.seg"sv, "6d2d0e97cce4e87babecca6c3c4082c749cf7f0a"sv}, + Entry{"v1-005040-005050-blocksidecars.idx"sv, "b1c58c42c9c9fb81ef48fc12d7f4679fede8b8fb"sv}, + Entry{"v1-005050-005060-blobsidecars.seg"sv, "8601c715ef2347d564a081b45d9b1b8c413e4d57"sv}, + Entry{"v1-005050-005060-blocksidecars.idx"sv, "0b822071819f20a504a31ec2f3c3af58a5d5a725"sv}, + Entry{"v1-005060-005070-blobsidecars.seg"sv, "6ca9d25ddc36ac840800bff636fc08a921fda3ec"sv}, + Entry{"v1-005060-005070-blocksidecars.idx"sv, "eb6e1361e2c5e192d04c9a01b46736d4225d45d7"sv}, + Entry{"v1-005070-005080-blobsidecars.seg"sv, "78c2c16ce90bd784e061e5f8f69e5a5df7994d73"sv}, + Entry{"v1-005070-005080-blocksidecars.idx"sv, "e5b3dc49815ef21d1515eb2d845a0aac2c62c23d"sv}, + Entry{"v1-005080-005090-blobsidecars.seg"sv, "8a0e8cc4508f37bb8675dd527fb3428ff74dc160"sv}, + Entry{"v1-005080-005090-blocksidecars.idx"sv, "97f4ef34e50429a29a05321cc1d4dd9d35fd715a"sv}, + Entry{"v1-005090-005100-blobsidecars.seg"sv, "edf09dbf45ed4e299d8870feabfdfb8869855c43"sv}, + Entry{"v1-005090-005100-blocksidecars.idx"sv, "fc166a08fdc997784672b9826f11e98955620807"sv}, + Entry{"v1-005100-005110-blobsidecars.seg"sv, "48380d2369f44e6fec608e50d016e9043bdc3e87"sv}, + Entry{"v1-005100-005110-blocksidecars.idx"sv, "4505448cb1253bcbcd81ce68d46cc0e08ca06c7f"sv}, Entry{"v1-005100-005200-bodies.idx"sv, "7fb92371264d8b70f1edb408e99108010e7fc99c"sv}, Entry{"v1-005100-005200-bodies.seg"sv, "b3cc6a07e2bf564ffc7c74fa5f0691a744604bad"sv}, Entry{"v1-005100-005200-headers.idx"sv, "c870cc1ae68afeb2d7e9cf005be667fcc3dca806"sv}, @@ -375,8 +529,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-005100-005200-transactions-to-block.idx"sv, "97cf2b0111314a07e4aad1e8cebbc88356a6a725"sv}, Entry{"v1-005100-005200-transactions.idx"sv, "463517b99718817a4b2e91ebbe1c58e82b675a3b"sv}, Entry{"v1-005100-005200-transactions.seg"sv, "313b5fa0319e2198dd11df0139434fc6c537d9d6"sv}, - Entry{"v1-005200-005300-blobsidecars.seg"sv, "982e6310b9cef57e0216c012b5f5fa499487cef1"sv}, - Entry{"v1-005200-005300-blocksidecars.idx"sv, "9c2b55e480c76966e29cece9e59284fe6db23011"sv}, + Entry{"v1-005110-005120-blobsidecars.seg"sv, "77628903f58c1a511967f3291a7f83870aba4104"sv}, + Entry{"v1-005110-005120-blocksidecars.idx"sv, "2d9c7ba34c55ed6b4a262d2c2cd088e9461a2032"sv}, + Entry{"v1-005120-005130-blobsidecars.seg"sv, "855c84def10b957fd64999107b23898759fd41aa"sv}, + Entry{"v1-005120-005130-blocksidecars.idx"sv, "673f705a221c10ba6065aa2b18ef656c49dc2733"sv}, + Entry{"v1-005130-005140-blobsidecars.seg"sv, "79ca7f87216efe3122ac394722576514a83ba3dc"sv}, + Entry{"v1-005130-005140-blocksidecars.idx"sv, "dafc662fcc9e96dca2ce7b0844b0bb7362df9543"sv}, + Entry{"v1-005140-005150-blobsidecars.seg"sv, "be199a2c89a221062f06891555422a87134fc41a"sv}, + Entry{"v1-005140-005150-blocksidecars.idx"sv, "608dbce83d1d36ee20147df73512fcbb75ac092a"sv}, + Entry{"v1-005150-005160-blobsidecars.seg"sv, "89fe347715a4ba3ec3d958d3027e9b8d68c81b4e"sv}, + Entry{"v1-005150-005160-blocksidecars.idx"sv, "a17f18d25a769a99e63e24609f8c62c988f73ca5"sv}, + Entry{"v1-005160-005170-blobsidecars.seg"sv, "4d877dc3789bbb74000f8ba8fe4d95ce708070d6"sv}, + Entry{"v1-005160-005170-blocksidecars.idx"sv, "1594fcd08e8155d48e5dd8da96ff927522ffc797"sv}, + Entry{"v1-005170-005180-blobsidecars.seg"sv, "67933a4e6ad8f68694ce473deb6765bbcc1b4339"sv}, + Entry{"v1-005170-005180-blocksidecars.idx"sv, "a828d929262398e0a1b49a3e7ccdaf9392c8f076"sv}, + Entry{"v1-005180-005190-blobsidecars.seg"sv, "fd6346a10dba2c2250be0ae8cb40b7efd6f95714"sv}, + Entry{"v1-005180-005190-blocksidecars.idx"sv, "8605f672014800c96ec4c9d91c45cc1befc8d3ec"sv}, + Entry{"v1-005190-005200-blobsidecars.seg"sv, "1bc5719b7741ab8b1568bee8554019350b93fdcd"sv}, + Entry{"v1-005190-005200-blocksidecars.idx"sv, "66c0b4f10f998fe835759aa699703837a560b511"sv}, + Entry{"v1-005200-005210-blobsidecars.seg"sv, "f633eb93e0884c9290382c64168695acf797321c"sv}, + Entry{"v1-005200-005210-blocksidecars.idx"sv, "7fde510545df77c6cc8e4b6093f8df8065f3f66d"sv}, Entry{"v1-005200-005300-bodies.idx"sv, "735833bc998a889ec9f5928cb24a54a0975dc5be"sv}, Entry{"v1-005200-005300-bodies.seg"sv, "540958e1f624fa61d657c74d7532362d25dabced"sv}, Entry{"v1-005200-005300-headers.idx"sv, "0b1a8552e3a96f29d4b90489c975a017d4862e6e"sv}, @@ -384,8 +556,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-005200-005300-transactions-to-block.idx"sv, "3879511c3f226845f3943666a9dc110ee7f8d423"sv}, Entry{"v1-005200-005300-transactions.idx"sv, "d42f0dddce3ed06e04324035597638ce92821778"sv}, Entry{"v1-005200-005300-transactions.seg"sv, "df8fdf11cc166ab20b08d73ea0fc44e0f9719129"sv}, - Entry{"v1-005300-005400-blobsidecars.seg"sv, "c7aac107f7e9a5bc2791a34c670ab652c870d244"sv}, - Entry{"v1-005300-005400-blocksidecars.idx"sv, "4dbff44d1d50864ed6bc629aa7db74bc2f14c6db"sv}, + Entry{"v1-005210-005220-blobsidecars.seg"sv, "c168dbde0b00e4bfd833e013eb808d68f9e12a65"sv}, + Entry{"v1-005210-005220-blocksidecars.idx"sv, "f756acde0e643fe0473efa9f84dcb3913c180a16"sv}, + Entry{"v1-005220-005230-blobsidecars.seg"sv, "c70395412435d7cf6079cc51d2af93876e20305f"sv}, + Entry{"v1-005220-005230-blocksidecars.idx"sv, "1a8e9c58e06364c081006a8db5224c5c459b17f0"sv}, + Entry{"v1-005230-005240-blobsidecars.seg"sv, "d2560564cea48158d56dc59fe4ef384f187b29df"sv}, + Entry{"v1-005230-005240-blocksidecars.idx"sv, "13c5ba9e39325eeeff3b298d0afa287a0198fdc5"sv}, + Entry{"v1-005240-005250-blobsidecars.seg"sv, "8b8c7ad1ec1b68da1a73e8a453e542cdba8334ce"sv}, + Entry{"v1-005240-005250-blocksidecars.idx"sv, "e9e3b5a079aaa732b3074904efaa59c2732afe91"sv}, + Entry{"v1-005250-005260-blobsidecars.seg"sv, "1821aacc01a68fc2a75a3af04a43c321e5dd0adb"sv}, + Entry{"v1-005250-005260-blocksidecars.idx"sv, "ab569057526a5e2c1e502c466f6d52e2c9abb67c"sv}, + Entry{"v1-005260-005270-blobsidecars.seg"sv, "7868b3b2afa61432122ce82213eebf63db76e5a9"sv}, + Entry{"v1-005260-005270-blocksidecars.idx"sv, "5639668591a0620aced0d3aaf00214237d2007a9"sv}, + Entry{"v1-005270-005280-blobsidecars.seg"sv, "ebedccb5c74d3574a348e4807b0159125f945907"sv}, + Entry{"v1-005270-005280-blocksidecars.idx"sv, "0656c67c2c6cb728bd6836d7b3367324e78fbf6a"sv}, + Entry{"v1-005280-005290-blobsidecars.seg"sv, "104b40fd0bb0ac811d6d2a62acb789cb64364053"sv}, + Entry{"v1-005280-005290-blocksidecars.idx"sv, "779195b55264ddc5c9363c6ce314d75ee301744e"sv}, + Entry{"v1-005290-005300-blobsidecars.seg"sv, "437e432c0e2b79c3752815fe929ed1690f1a2bb4"sv}, + Entry{"v1-005290-005300-blocksidecars.idx"sv, "3110477a4a41b5a507ba63c6852b4a59d9ebeefc"sv}, + Entry{"v1-005300-005310-blobsidecars.seg"sv, "fcb6d88f7529fda07bf1d3dc95eafb6824eef61d"sv}, + Entry{"v1-005300-005310-blocksidecars.idx"sv, "9ce273ac149da4a94c390995c3b37bf81cccc042"sv}, Entry{"v1-005300-005400-bodies.idx"sv, "ca34b287dca9d59f9eb261df0a4be63c521c3a95"sv}, Entry{"v1-005300-005400-bodies.seg"sv, "5da90b2d1a4570af43361f7e6097701a2beb4356"sv}, Entry{"v1-005300-005400-headers.idx"sv, "ed3727804c69bf349a6cbff667ca243b194ac36c"sv}, @@ -393,8 +583,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-005300-005400-transactions-to-block.idx"sv, "a786f4730a39c3c6a8f7578c9039c5cb38d37850"sv}, Entry{"v1-005300-005400-transactions.idx"sv, "23459bc76450ff9d8e534a8f7e636e711c059c4c"sv}, Entry{"v1-005300-005400-transactions.seg"sv, "31381d60552f269d088b77c9a86926c8d04e0f17"sv}, - Entry{"v1-005400-005500-blobsidecars.seg"sv, "cbe917ebedfe1aca583231d6c448b3617d89916f"sv}, - Entry{"v1-005400-005500-blocksidecars.idx"sv, "c2bd34aaccbfa1cbfcf33a0969a4f9dd139d1c17"sv}, + Entry{"v1-005310-005320-blobsidecars.seg"sv, "aba5a104500ad5bbace3fb2604d4fc60df80032c"sv}, + Entry{"v1-005310-005320-blocksidecars.idx"sv, "17723bff6cdb04e737a5c50a40843e230965130a"sv}, + Entry{"v1-005320-005330-blobsidecars.seg"sv, "8f7960c5a79b0a4919376ad916aac15ab1918b12"sv}, + Entry{"v1-005320-005330-blocksidecars.idx"sv, "d994218332b8eaf1edfeb5f089de59c6321bcdeb"sv}, + Entry{"v1-005330-005340-blobsidecars.seg"sv, "23033f9d46dfca2057271ba945d163c8e30d6bf8"sv}, + Entry{"v1-005330-005340-blocksidecars.idx"sv, "766667b00b72bb3507349f7dfdd3331838e065ee"sv}, + Entry{"v1-005340-005350-blobsidecars.seg"sv, "70b15da5eaddd40ba75f5932975d9dd56671732e"sv}, + Entry{"v1-005340-005350-blocksidecars.idx"sv, "3c0a4e27e44913cf14d17d1db5ea8d91f8d6b28f"sv}, + Entry{"v1-005350-005360-blobsidecars.seg"sv, "109e95a5b635d6673ec272a35244f126e82741a4"sv}, + Entry{"v1-005350-005360-blocksidecars.idx"sv, "bea1fd914360daab434d59333a1ca021286b7225"sv}, + Entry{"v1-005360-005370-blobsidecars.seg"sv, "b46a677ce42a65cb359374adcf8f5f0358d7b4d2"sv}, + Entry{"v1-005360-005370-blocksidecars.idx"sv, "c88e7ccfdeb07dcfe05247e6f590530390a45809"sv}, + Entry{"v1-005370-005380-blobsidecars.seg"sv, "0193fb5a2d6e85857246d92e77eb8075c472a186"sv}, + Entry{"v1-005370-005380-blocksidecars.idx"sv, "f7861d2b948b526f0acc9849e27c00358a28bd6c"sv}, + Entry{"v1-005380-005390-blobsidecars.seg"sv, "3f96d54642f5e8ae3cf7f9c9998b9914b8e54581"sv}, + Entry{"v1-005380-005390-blocksidecars.idx"sv, "518c4aed1ccaac9d9af78eb975aa74b7d52fe6b1"sv}, + Entry{"v1-005390-005400-blobsidecars.seg"sv, "97e708dc29acc31aced3e20388113e40db7334e3"sv}, + Entry{"v1-005390-005400-blocksidecars.idx"sv, "129b492ee7d80eea71da5c03351ae0381d104c80"sv}, + Entry{"v1-005400-005410-blobsidecars.seg"sv, "03c303778712f257e5fb13ad0c4deb84405aae7b"sv}, + Entry{"v1-005400-005410-blocksidecars.idx"sv, "6444f740dc1002a2b07667a23d64e52222275f9b"sv}, Entry{"v1-005400-005500-bodies.idx"sv, "c34639f486edc49126fbfdcb90f9ad630e61c3c6"sv}, Entry{"v1-005400-005500-bodies.seg"sv, "bb33aa41ba08a3a4d5c02411f30f6d32ac597fe7"sv}, Entry{"v1-005400-005500-headers.idx"sv, "0286c60be3804a69df9aa613eb901c4bca9461bd"sv}, @@ -402,8 +610,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-005400-005500-transactions-to-block.idx"sv, "9438da849b24882587362206a784e2452c57cbc1"sv}, Entry{"v1-005400-005500-transactions.idx"sv, "b7a743e9cd875075f7c21ee4aba34a09ec2b815e"sv}, Entry{"v1-005400-005500-transactions.seg"sv, "6146d197a9f757ca93fe9feb0a5eb6e16d35cc38"sv}, - Entry{"v1-005500-005600-blobsidecars.seg"sv, "f8439394800e80a64a54958f7e0a0d7822d3cf2c"sv}, - Entry{"v1-005500-005600-blocksidecars.idx"sv, "4c3b3c382646b95539d42491cd39886a93445190"sv}, + Entry{"v1-005410-005420-blobsidecars.seg"sv, "0c5ca935edd9d33701e1ac4d69ef5f7bda954d0a"sv}, + Entry{"v1-005410-005420-blocksidecars.idx"sv, "4e73a0f2326db0d92fedb5074ff6e36b5c356b83"sv}, + Entry{"v1-005420-005430-blobsidecars.seg"sv, "ae625d1ed89c1b7560fb2195c48a6330ccedd0f1"sv}, + Entry{"v1-005420-005430-blocksidecars.idx"sv, "d08f6a44f9c256e95e836859bf550a84c98efe1c"sv}, + Entry{"v1-005430-005440-blobsidecars.seg"sv, "58163d65dcc94affecde7570a2eaceeb67be2490"sv}, + Entry{"v1-005430-005440-blocksidecars.idx"sv, "1851ae6f0cd4b84f0cdaf5a8286c9406ccdd8d0a"sv}, + Entry{"v1-005440-005450-blobsidecars.seg"sv, "1b6f8ac5b382edd074832bfbd41817c7b7c75c63"sv}, + Entry{"v1-005440-005450-blocksidecars.idx"sv, "45ea3ff378487f1a226398fa82fbffb98101bdba"sv}, + Entry{"v1-005450-005460-blobsidecars.seg"sv, "06c69ca5680e3a25d57ec80ac0ba911254d27025"sv}, + Entry{"v1-005450-005460-blocksidecars.idx"sv, "954ba2b672168d561783b4145f8a11720b600b04"sv}, + Entry{"v1-005460-005470-blobsidecars.seg"sv, "9144006437ab5ddd3f61c159963e000589c5fa0d"sv}, + Entry{"v1-005460-005470-blocksidecars.idx"sv, "43fba5924d892f040d55b397ed13cd5703c22cdf"sv}, + Entry{"v1-005470-005480-blobsidecars.seg"sv, "adc80792677ae79f42948b6280e7d0b4970875f2"sv}, + Entry{"v1-005470-005480-blocksidecars.idx"sv, "f359f407dc8007da25a2935d0bdb013c0788396d"sv}, + Entry{"v1-005480-005490-blobsidecars.seg"sv, "44ea32769b585a0ecd6fb916fcaa72bc2215f37e"sv}, + Entry{"v1-005480-005490-blocksidecars.idx"sv, "08491d92bdcbd49288607603eeef0dfc66aa9465"sv}, + Entry{"v1-005490-005500-blobsidecars.seg"sv, "6dcf83529ba10ef7177aef824cadeb26360ff5e1"sv}, + Entry{"v1-005490-005500-blocksidecars.idx"sv, "32d3ab061de4cc75d2dd2d08973dee26eebde333"sv}, + Entry{"v1-005500-005510-blobsidecars.seg"sv, "a943873cbeeb0a08e65cb111288ed9ee023445f4"sv}, + Entry{"v1-005500-005510-blocksidecars.idx"sv, "44f558509d8bc41a0840489ed0c4615f67f657d1"sv}, Entry{"v1-005500-005600-bodies.idx"sv, "6eeaea644b874db51bbd0a55043a4f8287ddfc13"sv}, Entry{"v1-005500-005600-bodies.seg"sv, "d283cbf5762b8d89c939f9d84269eca30db8ec6e"sv}, Entry{"v1-005500-005600-headers.idx"sv, "eff790085c0fe9a65f4ed675221a8175c96f2896"sv}, @@ -411,6 +637,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-005500-005600-transactions-to-block.idx"sv, "6bf9f8eeaa7adfe8d13503ef1dbd893b15e24d95"sv}, Entry{"v1-005500-005600-transactions.idx"sv, "68064fdb62be575ce23eedf7d0395aac82eb0a1d"sv}, Entry{"v1-005500-005600-transactions.seg"sv, "26529cee6b067529521e3bca6113fb2116a0ce40"sv}, + Entry{"v1-005510-005520-blobsidecars.seg"sv, "115ba8db7868461541fac87e0a93ba57f7d0b77f"sv}, + Entry{"v1-005510-005520-blocksidecars.idx"sv, "acfca00dac4090aada3a2c451be40c019a0ddabe"sv}, + Entry{"v1-005520-005530-blobsidecars.seg"sv, "af4bf828e9999044eb4f08a6cebb6efb1092a554"sv}, + Entry{"v1-005520-005530-blocksidecars.idx"sv, "b125abbb8cc0d5b824fb1d35ab7881c74fac2eb8"sv}, + Entry{"v1-005530-005540-blobsidecars.seg"sv, "a8f8b172776f02242cce4cb3ec66b7fd4bde391b"sv}, + Entry{"v1-005530-005540-blocksidecars.idx"sv, "6ab4c8cc758db621e7ede4bfc0422a97fa5cb24c"sv}, + Entry{"v1-005540-005550-blobsidecars.seg"sv, "c60120c3d01af84b1a785844d345375495d6ed80"sv}, + Entry{"v1-005540-005550-blocksidecars.idx"sv, "fd79426081db990bed8f8325f0d8810779d33055"sv}, + Entry{"v1-005550-005560-blobsidecars.seg"sv, "9811e4c019590671dca38dd15ed7b219f6a8652e"sv}, + Entry{"v1-005550-005560-blocksidecars.idx"sv, "28e2a1ca0fbd62e161f5e5c8a288916d8d91c0f7"sv}, + Entry{"v1-005560-005570-blobsidecars.seg"sv, "fc6f785f4087c6b5449bc49d8471644c12b3c213"sv}, + Entry{"v1-005560-005570-blocksidecars.idx"sv, "65427a7b5a3e5067a65156ecc8604d5e9bfce33c"sv}, + Entry{"v1-005570-005580-blobsidecars.seg"sv, "52d871c022aebfec6269e002574106e1456304f8"sv}, + Entry{"v1-005570-005580-blocksidecars.idx"sv, "b03422bfd39def6309034b383068fb1334304db3"sv}, + Entry{"v1-005580-005590-blobsidecars.seg"sv, "01ee8dbac6b60a89020259e53a9180279dfee1dc"sv}, + Entry{"v1-005580-005590-blocksidecars.idx"sv, "23e5de590178544a8b35d890cf1c88bc062294f8"sv}, + Entry{"v1-005590-005600-blobsidecars.seg"sv, "981b6d653413eb77d56976fa223d90d5f5600a0f"sv}, + Entry{"v1-005590-005600-blocksidecars.idx"sv, "17c9deaebc237a96678142891a089f5d6ffea990"sv}, + Entry{"v1-005600-005610-blobsidecars.seg"sv, "f4154de990cbd7be939994f2208dc9660a051a29"sv}, + Entry{"v1-005600-005610-blocksidecars.idx"sv, "1ad0160c28d4e03f6bee61444814376c9449a4cd"sv}, Entry{"v1-005600-005700-bodies.idx"sv, "e43086ce0dc928be6089b0c3dc0badff93a7c8ce"sv}, Entry{"v1-005600-005700-bodies.seg"sv, "f409ed08f159dc0701a2b6a1602a8f2ba042e2df"sv}, Entry{"v1-005600-005700-headers.idx"sv, "0cf8a65c89f246acaa2f62ce19d9b82b524e69f2"sv}, @@ -418,6 +664,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-005600-005700-transactions-to-block.idx"sv, "b9a3f727f99cfcbf59b62a433c8b0c56d199de77"sv}, Entry{"v1-005600-005700-transactions.idx"sv, "e00ea7e201fc6fe08d2d644a63b50cc48723cdec"sv}, Entry{"v1-005600-005700-transactions.seg"sv, "9a26c1a919798532b6023f00f6f14a353992342e"sv}, + Entry{"v1-005610-005620-blobsidecars.seg"sv, "0966661664b2dbb0c2056014e9188d038da27fcb"sv}, + Entry{"v1-005610-005620-blocksidecars.idx"sv, "5b3e23e66a52b7a26fd8c5b04b00bd7b9ba2344c"sv}, + Entry{"v1-005620-005630-blobsidecars.seg"sv, "82f261c0b7b5303d25d68f5bbe290e48cb4f3d29"sv}, + Entry{"v1-005620-005630-blocksidecars.idx"sv, "fbd37b04245d6fa540f44b058f11a7c66805033a"sv}, + Entry{"v1-005630-005640-blobsidecars.seg"sv, "21adbd9fa8045579722bfd225e93a08cf234fab7"sv}, + Entry{"v1-005630-005640-blocksidecars.idx"sv, "99d72fdc2771a17ccde209c34600a05619efcd76"sv}, + Entry{"v1-005640-005650-blobsidecars.seg"sv, "240a10da42dd87acd2cf704f92adee312e33696d"sv}, + Entry{"v1-005640-005650-blocksidecars.idx"sv, "555627a232fc47d81180268960dea3af2ffeb599"sv}, + Entry{"v1-005650-005660-blobsidecars.seg"sv, "5bb8c020fa7c594133d7baf9bbe26ea66dc6e070"sv}, + Entry{"v1-005650-005660-blocksidecars.idx"sv, "d9ca05ebd73fa5a9d2619166201e40d421010b62"sv}, + Entry{"v1-005660-005670-blobsidecars.seg"sv, "4a255853704c89ac41c0d717e6fd4543e2573ab9"sv}, + Entry{"v1-005660-005670-blocksidecars.idx"sv, "221b34cf3672527785272dbb9e4156d650910143"sv}, + Entry{"v1-005670-005680-blobsidecars.seg"sv, "a29b367beccfc60da763ea981847ea92cf84fed3"sv}, + Entry{"v1-005670-005680-blocksidecars.idx"sv, "d0eab0be1d91af3346b20df873f888a9fea50c75"sv}, + Entry{"v1-005680-005690-blobsidecars.seg"sv, "70b3d86d192907e31f05fbe50a47a928da2eefca"sv}, + Entry{"v1-005680-005690-blocksidecars.idx"sv, "c68d82812ba72dc8b20e9ad87ac552bd08403c9c"sv}, + Entry{"v1-005690-005700-blobsidecars.seg"sv, "760b909dd7b7dfda66a288baf7d94ee576713ba8"sv}, + Entry{"v1-005690-005700-blocksidecars.idx"sv, "45d2a03dd54a650121c0d0441820b63061e6a468"sv}, + Entry{"v1-005700-005710-blobsidecars.seg"sv, "92d521ed3b77ab29678f5a84cbfb5e59372c2e3e"sv}, + Entry{"v1-005700-005710-blocksidecars.idx"sv, "7ebd2782623729f46cde0b7d4353be2f9ce7c7a3"sv}, Entry{"v1-005700-005800-bodies.idx"sv, "94377392ce2529f374359ccefa5348b544d9dfa8"sv}, Entry{"v1-005700-005800-bodies.seg"sv, "c9779e0f0763e421779f3b9dd157bda70f4421ae"sv}, Entry{"v1-005700-005800-headers.idx"sv, "d99466e94c762a7688dbdc58bd7934cbe284664f"sv}, @@ -425,6 +691,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-005700-005800-transactions-to-block.idx"sv, "9a2512e5512f3b5c3e14bcfbd8ee0d91f28d098b"sv}, Entry{"v1-005700-005800-transactions.idx"sv, "c5927d4030fb120f0527516f1595808360ca336b"sv}, Entry{"v1-005700-005800-transactions.seg"sv, "a48b442d0f6001bf78e5fd4b575172e79b9b904a"sv}, + Entry{"v1-005710-005720-blobsidecars.seg"sv, "69abae604c4f8dbee0818c6e4f06e20d34e1107c"sv}, + Entry{"v1-005710-005720-blocksidecars.idx"sv, "d49c98c12a2a67f4f7edc4876c85822411014c55"sv}, + Entry{"v1-005720-005730-blobsidecars.seg"sv, "78e559cb1397b87453bf7e81584fd3d72318337a"sv}, + Entry{"v1-005720-005730-blocksidecars.idx"sv, "2f8d1db585c1e5e23ffbc6c518254d21a5cc536c"sv}, + Entry{"v1-005730-005740-blobsidecars.seg"sv, "aee3fc2576fc4abe17041cbcef7ebdbdc5ebab63"sv}, + Entry{"v1-005730-005740-blocksidecars.idx"sv, "e36a55a13be50638202d16958193ede4cd3e09df"sv}, + Entry{"v1-005740-005750-blobsidecars.seg"sv, "fd4ea51f9e2efc17a7bccb86c0ef99742c5f53df"sv}, + Entry{"v1-005740-005750-blocksidecars.idx"sv, "fe1ed985c027216d03dc76f233ccd8652a6cc9f9"sv}, + Entry{"v1-005750-005760-blobsidecars.seg"sv, "c3dd86ae3e24aff758e362dcdbaeb93651cdba82"sv}, + Entry{"v1-005750-005760-blocksidecars.idx"sv, "404682916a2220bc124ab860f88f2f242a9ea9ab"sv}, + Entry{"v1-005760-005770-blobsidecars.seg"sv, "73b4c450961adc043ee0f06a59777583b3a68158"sv}, + Entry{"v1-005760-005770-blocksidecars.idx"sv, "85290a2bb3be9b694c02edd81b8d54938f038c21"sv}, + Entry{"v1-005770-005780-blobsidecars.seg"sv, "1f5d1dbae720b8e01a46b1af2ef922a987a1a133"sv}, + Entry{"v1-005770-005780-blocksidecars.idx"sv, "57bcc500b1e976cd32d0fc43f845d0dd8579fea5"sv}, + Entry{"v1-005780-005790-blobsidecars.seg"sv, "4c5ca181a5456b05ca1c0a3b44a775809de42b56"sv}, + Entry{"v1-005780-005790-blocksidecars.idx"sv, "576f0f7050874c77ea65dfc29f69bcd244825420"sv}, + Entry{"v1-005790-005800-blobsidecars.seg"sv, "499532cce90fa9d3dc79369de82593c3be4a8f0b"sv}, + Entry{"v1-005790-005800-blocksidecars.idx"sv, "b9d5bb3ca8596d289b3457243c8148f1c1021897"sv}, + Entry{"v1-005800-005810-blobsidecars.seg"sv, "114ee61009a375acd65ab4d382c01b590c1c4e73"sv}, + Entry{"v1-005800-005810-blocksidecars.idx"sv, "879980068e043987d062534bfb953350626bba3a"sv}, Entry{"v1-005800-005900-bodies.idx"sv, "41b15de34c5c9d50a07fe62abbf29bcb930b6d91"sv}, Entry{"v1-005800-005900-bodies.seg"sv, "b1232c6d509f0aef35de6ae23c52d66815f137e2"sv}, Entry{"v1-005800-005900-headers.idx"sv, "e42cace1cf486604e0915c4eaaa19f4ac96ed130"sv}, @@ -432,6 +718,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-005800-005900-transactions-to-block.idx"sv, "7d52efbbdefe13df90ef57244bcc5d90361ccd4f"sv}, Entry{"v1-005800-005900-transactions.idx"sv, "bd8425379b3e01f762e2d4f61827077f38dc9105"sv}, Entry{"v1-005800-005900-transactions.seg"sv, "7364a6e77cc075395ff47dd00c47c517463c302b"sv}, + Entry{"v1-005810-005820-blobsidecars.seg"sv, "296ab9d2dec09784dbbf609ee4d3e0fa67809a0d"sv}, + Entry{"v1-005810-005820-blocksidecars.idx"sv, "5b1db99b702701c1e170b02d1b20a8a6047ffbf8"sv}, + Entry{"v1-005820-005830-blobsidecars.seg"sv, "506a8346bcd51e5b27e10af453aa73f299693ba7"sv}, + Entry{"v1-005820-005830-blocksidecars.idx"sv, "c75faee42e61b2ef6a34ccce59ac0db14f26c6bc"sv}, + Entry{"v1-005830-005840-blobsidecars.seg"sv, "42c7cf3b679178feee3b23ce56927a5f8cb3d50f"sv}, + Entry{"v1-005830-005840-blocksidecars.idx"sv, "d3c60929a98e38a09d253987c92c6d81233af601"sv}, + Entry{"v1-005840-005850-blobsidecars.seg"sv, "ab5b55bfd82c47dfd4f48fac4d6b6f003f5513f3"sv}, + Entry{"v1-005840-005850-blocksidecars.idx"sv, "7f27ffd5dc39af6f18d4b5f2138e73676b595cf1"sv}, + Entry{"v1-005850-005860-blobsidecars.seg"sv, "9da0f7e1bffcd20b6e7e5e2639845114fb22a208"sv}, + Entry{"v1-005850-005860-blocksidecars.idx"sv, "38be6928bfa3ee95e505b025ceb1e507ad78ed88"sv}, + Entry{"v1-005860-005870-blobsidecars.seg"sv, "19b65fb172903b65768ea77778c2b22443962605"sv}, + Entry{"v1-005860-005870-blocksidecars.idx"sv, "1a2d8ca43191289e6f1db9788f66c02626a9bad9"sv}, + Entry{"v1-005870-005880-blobsidecars.seg"sv, "c5a3e829a6f5ba55090e919ad68c9c63a1ea68f5"sv}, + Entry{"v1-005870-005880-blocksidecars.idx"sv, "4082c8c0636424aa2faaa646bdb1cc1805e15568"sv}, + Entry{"v1-005880-005890-blobsidecars.seg"sv, "a04494b662d966636b38bb230592fc87b62c344b"sv}, + Entry{"v1-005880-005890-blocksidecars.idx"sv, "17065e90e4ea417d6fe16a37536624debcaf772e"sv}, + Entry{"v1-005890-005900-blobsidecars.seg"sv, "04b74fd02fe767529767681556c0d7e5dd466405"sv}, + Entry{"v1-005890-005900-blocksidecars.idx"sv, "2d3b41e03bdbd3f7cdb4cc993e6a48bc4f0beceb"sv}, + Entry{"v1-005900-005910-blobsidecars.seg"sv, "d36c36a566497d26db3383019908196424eb6c8b"sv}, + Entry{"v1-005900-005910-blocksidecars.idx"sv, "741cefcf8e064e57310837d125d7e4507f659171"sv}, Entry{"v1-005900-006000-bodies.idx"sv, "444a6b7b4a2606b10da45c0861dd27a1e4587f5e"sv}, Entry{"v1-005900-006000-bodies.seg"sv, "d8d0fd31c9c01a896699e3dd29c727e0299608f4"sv}, Entry{"v1-005900-006000-headers.idx"sv, "06ab6ca36ed608d28324a0c787e992326d5d08ad"sv}, @@ -439,6 +745,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-005900-006000-transactions-to-block.idx"sv, "e63e676d7fb5ee925e0f90e9383335b4b56ef72a"sv}, Entry{"v1-005900-006000-transactions.idx"sv, "275575db31fadd1954ad68b457adb9acee1e009a"sv}, Entry{"v1-005900-006000-transactions.seg"sv, "09e70163e8db9f4596bfff1c6c896081ec9832cc"sv}, + Entry{"v1-005910-005920-blobsidecars.seg"sv, "9569fcfe9fc9b32ee00c88dc545171d5924e2a2e"sv}, + Entry{"v1-005910-005920-blocksidecars.idx"sv, "0f829967108367a3e467c5d469c07dbea3c079c8"sv}, + Entry{"v1-005920-005930-blobsidecars.seg"sv, "2fa376b7ebdbb8e11b996b1a0d3be0b4522d6a11"sv}, + Entry{"v1-005920-005930-blocksidecars.idx"sv, "4fa363fc577cfcae5dd2b04ffca057e937b58660"sv}, + Entry{"v1-005930-005940-blobsidecars.seg"sv, "cb6de5c4b95b956de623761dcb4b1d38f6349d54"sv}, + Entry{"v1-005930-005940-blocksidecars.idx"sv, "5d2139387c4495ef196f55357ddb5b607c464745"sv}, + Entry{"v1-005940-005950-blobsidecars.seg"sv, "0176b312601ded64a4965728e86af1f28ff40e43"sv}, + Entry{"v1-005940-005950-blocksidecars.idx"sv, "14d81a2aab8c7f824c6473dcef7199f362b8daf4"sv}, + Entry{"v1-005950-005960-blobsidecars.seg"sv, "6524493209cd04daa208fd056d04b59a04dbb090"sv}, + Entry{"v1-005950-005960-blocksidecars.idx"sv, "8d85fbc3bfedcb5f62560f00e5f1a25be1854f46"sv}, + Entry{"v1-005960-005970-blobsidecars.seg"sv, "c4015a92490beebed3e19349b650b25d36ae6eff"sv}, + Entry{"v1-005960-005970-blocksidecars.idx"sv, "f70d087599de7291f1793a876cb21c9081d68733"sv}, + Entry{"v1-005970-005980-blobsidecars.seg"sv, "cfc30d5a51965acbc5ac7033ab086ca153b9b002"sv}, + Entry{"v1-005970-005980-blocksidecars.idx"sv, "98d8732578f7a8d62cdd63ea7f53abb8921f56f1"sv}, + Entry{"v1-005980-005990-blobsidecars.seg"sv, "22e181f397c1447221dcbe5377edfc19f8fc4276"sv}, + Entry{"v1-005980-005990-blocksidecars.idx"sv, "0048ecd71da2368664dd67ea3545eaab42ccb111"sv}, + Entry{"v1-005990-006000-blobsidecars.seg"sv, "f54296e5cb570ff68e88aab0c68a13ce84398774"sv}, + Entry{"v1-005990-006000-blocksidecars.idx"sv, "e2935893074065cc37d2efd5b478ed7b6bc36323"sv}, + Entry{"v1-006000-006010-blobsidecars.seg"sv, "0a51c7bf00c3d394a3417ba1d2dc5a2cc55ef3a7"sv}, + Entry{"v1-006000-006010-blocksidecars.idx"sv, "2b10ac63a184a271ddb87adec3811f8e4843c302"sv}, Entry{"v1-006000-006100-bodies.idx"sv, "5d90d6baf896c4b9dbfa0544ad62f192b79b3689"sv}, Entry{"v1-006000-006100-bodies.seg"sv, "981972a5c6109879b8190b5eaab15266203290c7"sv}, Entry{"v1-006000-006100-headers.idx"sv, "568bc8fb46f40673f8b279b15335d48cd2ccd87c"sv}, @@ -446,6 +772,26 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-006000-006100-transactions-to-block.idx"sv, "f06e505936e0974dee16e10e3f8731dbf55386c6"sv}, Entry{"v1-006000-006100-transactions.idx"sv, "3792c57a0cf1d34ce34c25efbcfde667144cd353"sv}, Entry{"v1-006000-006100-transactions.seg"sv, "47077c05ac0c2a2754d464ac7621fa6715256c72"sv}, + Entry{"v1-006010-006020-blobsidecars.seg"sv, "9d5ea52bd169c22889baa58b530cd868142cf0f8"sv}, + Entry{"v1-006010-006020-blocksidecars.idx"sv, "e69891bf9ee46349b38010017781320672ae76bd"sv}, + Entry{"v1-006020-006030-blobsidecars.seg"sv, "23c0a9886b65ab3e9bff269659435fbcfb9111ed"sv}, + Entry{"v1-006020-006030-blocksidecars.idx"sv, "157f46be96f87ca0cd6bab6e135a2bd06ddff6cd"sv}, + Entry{"v1-006030-006040-blobsidecars.seg"sv, "384f1cb2f3d3e8aa2a72ecf049037c47136f0496"sv}, + Entry{"v1-006030-006040-blocksidecars.idx"sv, "befa606ac017d255d2cbded8ee06fc7fb2dd22ee"sv}, + Entry{"v1-006040-006050-blobsidecars.seg"sv, "490325b7cad1ff630b21f4cfa9ff174d612d56f3"sv}, + Entry{"v1-006040-006050-blocksidecars.idx"sv, "a6a344fd5c217796814542050d20b72790e7f862"sv}, + Entry{"v1-006050-006060-blobsidecars.seg"sv, "6b3dec2c16dbb4771386570ada9c03262d7d6c6e"sv}, + Entry{"v1-006050-006060-blocksidecars.idx"sv, "53fcedf052660aa6b8c8697309e405e039a89b5a"sv}, + Entry{"v1-006060-006070-blobsidecars.seg"sv, "273241b249a9d2980e24f230b42f788da29ea284"sv}, + Entry{"v1-006060-006070-blocksidecars.idx"sv, "424821df4a55f15af38d170e8af8dbf53f06d478"sv}, + Entry{"v1-006070-006080-blobsidecars.seg"sv, "d322d5e8b7c9136daa5e83208dd1523e7cf6f3e3"sv}, + Entry{"v1-006070-006080-blocksidecars.idx"sv, "9c0afa155f9c28703d3937b4dbb748f052338956"sv}, + Entry{"v1-006080-006090-blobsidecars.seg"sv, "9b9e280776d70a5a284a6c0a16f6351d04d137d2"sv}, + Entry{"v1-006080-006090-blocksidecars.idx"sv, "d5b4ca7f37017fb54f10bf65e833dcbe80dd67d9"sv}, + Entry{"v1-006090-006100-blobsidecars.seg"sv, "e1c63a4a311240fb1e28cc7acbb62ed1aba3b9d1"sv}, + Entry{"v1-006090-006100-blocksidecars.idx"sv, "79244b7e1325bd4c0d0339c25780ca7b0fbfda8d"sv}, + Entry{"v1-006100-006110-blobsidecars.seg"sv, "1b2a6b5a6f1c5b5bd5ec9b4ba4ada0d461a8d3b2"sv}, + Entry{"v1-006100-006110-blocksidecars.idx"sv, "5540991ac23c9f0ad675db207368684c0c29f717"sv}, Entry{"v1-006100-006200-bodies.idx"sv, "407759d97e2c2168dd1e004924885384eec4e5f9"sv}, Entry{"v1-006100-006200-bodies.seg"sv, "6b34bb98ef00ef28a750420021b3d3e635eade21"sv}, Entry{"v1-006100-006200-headers.idx"sv, "81c50337013b27ccfcb313f5149822d98fd386ff"sv}, @@ -488,48 +834,62 @@ inline constexpr std::array kSepoliaSnapshots{ Entry{"v1-006600-006700-transactions-to-block.idx"sv, "40ad3c183307c632eb84e8012392293defabf7a8"sv}, Entry{"v1-006600-006700-transactions.idx"sv, "fbf848fd162dc4ce3a4cdddc80f829dbed74f4c4"sv}, Entry{"v1-006600-006700-transactions.seg"sv, "2fd2b362a3969eb614fd720f4f5b22d96d03b76a"sv}, - Entry{"v1-006700-006710-bodies.idx"sv, "76153cc99e59d6d173a428109aa184817e9c609e"sv}, - Entry{"v1-006700-006710-bodies.seg"sv, "031364e9f1e4771fcd97f109a15123a0aec3f499"sv}, - Entry{"v1-006700-006710-headers.idx"sv, "eb7f18fda9a6e262a979d70b740b164c4559ecfd"sv}, - Entry{"v1-006700-006710-headers.seg"sv, "d2473f5abe39abb52658ca788b3c318c77d13b89"sv}, - Entry{"v1-006700-006710-transactions-to-block.idx"sv, "e56b26ec81150436738903fd6bb6ee3f70ab7789"sv}, - Entry{"v1-006700-006710-transactions.idx"sv, "0ed4250f35c762b0f217440874b14791cc05d253"sv}, - Entry{"v1-006700-006710-transactions.seg"sv, "ecfef1ca45b35f5d77a3cf8c1d4bb135dee735e0"sv}, - Entry{"v1-006710-006720-bodies.idx"sv, "0987affedb2b672598b7f5b811578b416feff72d"sv}, - Entry{"v1-006710-006720-bodies.seg"sv, "944bb871eb6fc030f3993b53ab684b98c26e498e"sv}, - Entry{"v1-006710-006720-headers.idx"sv, "c62c0a0343d42e3a188d54752a21012301c4a146"sv}, - Entry{"v1-006710-006720-headers.seg"sv, "e47b164ee9f38043f94cf2c70119d854fc23de1f"sv}, - Entry{"v1-006710-006720-transactions-to-block.idx"sv, "394f5664ebd019d97dbbbb1562e7181bad07c73f"sv}, - Entry{"v1-006710-006720-transactions.idx"sv, "7d169a675d757194108c929006eb1bfb3e250d73"sv}, - Entry{"v1-006710-006720-transactions.seg"sv, "6c86a062326153d629aa7d6ec945c3e6add7cc6c"sv}, - Entry{"v1-006720-006730-bodies.idx"sv, "0a64ff2c87c4e162952e323c23fa80a1613d0d26"sv}, - Entry{"v1-006720-006730-bodies.seg"sv, "0eb27749f857e2179c3ce9b6ee61df99c4aaaf60"sv}, - Entry{"v1-006720-006730-headers.idx"sv, "6cb083d827e3686aeecd9006ec21cac224021c49"sv}, - Entry{"v1-006720-006730-headers.seg"sv, "d810bd7446993dda17c94970687e66cdd12dcb92"sv}, - Entry{"v1-006720-006730-transactions-to-block.idx"sv, "4bc77c931e0ceceedcc9876301f8e35bb2818d1d"sv}, - Entry{"v1-006720-006730-transactions.idx"sv, "1cba42efb478da71af2f2e425337d690e1b5ada5"sv}, - Entry{"v1-006720-006730-transactions.seg"sv, "77d9d34cd6cf94e1b31661901613ecc4cb3f79f6"sv}, - Entry{"v1-006730-006740-bodies.idx"sv, "a24f1bbc2eb50402a17c72bad53571f4b6da9089"sv}, - Entry{"v1-006730-006740-bodies.seg"sv, "9332f34e93f9d0faabcfd35b491776e8e0153da6"sv}, - Entry{"v1-006730-006740-headers.idx"sv, "e877734cc57f956524cf359d13d952b2e8c65c73"sv}, - Entry{"v1-006730-006740-headers.seg"sv, "22e60eddd5a68cc68003f50ab7a0d10f23a44a3c"sv}, - Entry{"v1-006730-006740-transactions-to-block.idx"sv, "a35eaef11b12dfc76e16193743bd9f4c39c3f2e5"sv}, - Entry{"v1-006730-006740-transactions.idx"sv, "9e235dd25af938b3bb1be2173930cacb72512ae7"sv}, - Entry{"v1-006730-006740-transactions.seg"sv, "cd1f10b619d149496b2118de9bccbd92fce64e75"sv}, - Entry{"v1-006740-006750-bodies.idx"sv, "38867ec887b9feb79ab10f74bedfbe6f211f97c7"sv}, - Entry{"v1-006740-006750-bodies.seg"sv, "35bad9bd968147d0643bd1e9fd65d5bbbd890eef"sv}, - Entry{"v1-006740-006750-headers.idx"sv, "8457b8ba05309c8eca87f941541f8b26fb3f1bd7"sv}, - Entry{"v1-006740-006750-headers.seg"sv, "c0a8c9b74e8b710bdd193f9cb50845f87007fd3c"sv}, - Entry{"v1-006740-006750-transactions-to-block.idx"sv, "00027cdbac0a2868be84af5e8c0db914734022b5"sv}, - Entry{"v1-006740-006750-transactions.idx"sv, "95b5dcb6f5e74612b2541faaaec6dde0701c6872"sv}, - Entry{"v1-006740-006750-transactions.seg"sv, "60c1107b4ded9100a33c925d4df5ec2bc8f9921a"sv}, - Entry{"v1-006750-006760-bodies.idx"sv, "a73d1f9c2416158d5bc1c800d2c643915189eb2b"sv}, - Entry{"v1-006750-006760-bodies.seg"sv, "8ea9f6e9fba7197a9c6725e45a97d5d978c5e9bb"sv}, - Entry{"v1-006750-006760-headers.idx"sv, "481ff5b1fe18b8d8073f1bacf092408f3b609def"sv}, - Entry{"v1-006750-006760-headers.seg"sv, "c2656bbe8a2f31de4ef92acc4c1cf50c04fe807c"sv}, - Entry{"v1-006750-006760-transactions-to-block.idx"sv, "42abe50adbe8ed7c344c2a676cc486b8fa097bed"sv}, - Entry{"v1-006750-006760-transactions.idx"sv, "200b553631842a70c1df4b0b67e5df8042185a3d"sv}, - Entry{"v1-006750-006760-transactions.seg"sv, "c1396ea76f8f03e68be1dc4391e029df2a5bccad"sv}, + Entry{"v1-006700-006800-bodies.idx"sv, "c50d88dd2074f82d2d1b505a67287d2c9bfe0ee0"sv}, + Entry{"v1-006700-006800-bodies.seg"sv, "985ec76af3e9cc06fa75c5d7c01b95c8d3e12b6c"sv}, + Entry{"v1-006700-006800-headers.idx"sv, "3efee50a8ff4ba41246caace4a2d82663ceaea51"sv}, + Entry{"v1-006700-006800-headers.seg"sv, "0ff347950039fa7891a64a770e7df873e4ff976d"sv}, + Entry{"v1-006700-006800-transactions-to-block.idx"sv, "a9754b519587a7f52719b27ddcc8134450c5249a"sv}, + Entry{"v1-006700-006800-transactions.idx"sv, "3e20b458ec6bdfb2b464388379e5b3905966edc4"sv}, + Entry{"v1-006700-006800-transactions.seg"sv, "b2405156649f6bbc529741d166fa4b4e12af665f"sv}, + Entry{"v1-006800-006900-bodies.idx"sv, "572ec278b8eceef6653674c6d17ce6497455467c"sv}, + Entry{"v1-006800-006900-bodies.seg"sv, "b943b7a72d20cdc67b9d7657251da43b0e61588b"sv}, + Entry{"v1-006800-006900-headers.idx"sv, "acdfffa1f772d8a24c7d78d17bb928842896852a"sv}, + Entry{"v1-006800-006900-headers.seg"sv, "b53a2ae9bd055070cde10a7c2fcc4a05beafe2bd"sv}, + Entry{"v1-006800-006900-transactions-to-block.idx"sv, "7d570005d62b6ae3094276d7bd285f0379444837"sv}, + Entry{"v1-006800-006900-transactions.idx"sv, "85d92a68f91b1c655f48c173b340ea046975f2ea"sv}, + Entry{"v1-006800-006900-transactions.seg"sv, "dfd273dfcf893c2e57ee11337d3fc563112fa65e"sv}, + Entry{"v1-006900-006910-bodies.idx"sv, "da85a8442a78eb339e30b0e3b89a54be65eca3cd"sv}, + Entry{"v1-006900-006910-bodies.seg"sv, "09ccdb6985e94248cbd41d77cc22165b970ea86f"sv}, + Entry{"v1-006900-006910-headers.idx"sv, "ada385b40968203f177f0f50161944cab52d953a"sv}, + Entry{"v1-006900-006910-headers.seg"sv, "99e2007c8c857f262ed89a7e5d4e62aa98c56b6c"sv}, + Entry{"v1-006900-006910-transactions-to-block.idx"sv, "59c7627968cd3167336c66c91f4cad2d49d47b3c"sv}, + Entry{"v1-006900-006910-transactions.idx"sv, "fc4147bd9b0f04b8073761a3e8fc5ff8fe28ab70"sv}, + Entry{"v1-006900-006910-transactions.seg"sv, "800afc79802033ff29d33d66a1f53f1ebc69f3b7"sv}, + Entry{"v1-006910-006911-bodies.idx"sv, "442f3679da40e4321344a62e47bcbeefea82e2d1"sv}, + Entry{"v1-006910-006911-bodies.seg"sv, "f1dd5ed12064803664bf22cb556a522eec36e03a"sv}, + Entry{"v1-006910-006911-headers.idx"sv, "13f6b00a3125a0cf62213f4bf9d5a080c57b61fb"sv}, + Entry{"v1-006910-006911-headers.seg"sv, "1cf84303bf8914c3077fc06edc3fd7b5f862162a"sv}, + Entry{"v1-006910-006911-transactions-to-block.idx"sv, "1d22ca065b56811fd9fa260e6779532f78783c0d"sv}, + Entry{"v1-006910-006911-transactions.idx"sv, "118e2dfd6ba5d5a5b802afb2a05eadeb25ef6068"sv}, + Entry{"v1-006910-006911-transactions.seg"sv, "e3c37d2fa8ce17f50a1ecda9c06fe1925deb9ce3"sv}, + Entry{"v1-006911-006912-bodies.idx"sv, "84042f2aa6119fd5a3b26b2636b76562f726d8d1"sv}, + Entry{"v1-006911-006912-bodies.seg"sv, "dce00b79a5b9cb77f358a04dc5fba01c1c146593"sv}, + Entry{"v1-006911-006912-headers.idx"sv, "9dafaaf8316fe0b1534def0fd1524f8fe2e4ae2c"sv}, + Entry{"v1-006911-006912-headers.seg"sv, "69442533e1ae9ad61ab6aab804640844772c684b"sv}, + Entry{"v1-006911-006912-transactions-to-block.idx"sv, "a5e5b00c4a2839af91bf68d6c7e410e48f850c72"sv}, + Entry{"v1-006911-006912-transactions.idx"sv, "c33f6228a4c237ee8e2d0a567d46de1829e97c7e"sv}, + Entry{"v1-006911-006912-transactions.seg"sv, "11637717e1b5d06e58a48bf8113a1ef83ce42b55"sv}, + Entry{"v1-006912-006913-bodies.idx"sv, "f258b6daffdb4f5627e643d88df3e06c793db5aa"sv}, + Entry{"v1-006912-006913-bodies.seg"sv, "d1ef71b6e5088438b86be51bed5254bedf377de3"sv}, + Entry{"v1-006912-006913-headers.idx"sv, "5d019333b019dec7302031af9ef487681c40903d"sv}, + Entry{"v1-006912-006913-headers.seg"sv, "712ce8d01bc24e562dce89e57dd7c4d2d97bed79"sv}, + Entry{"v1-006912-006913-transactions-to-block.idx"sv, "9acfae0a91ea2355db5c740a239c2dec9c3767b8"sv}, + Entry{"v1-006912-006913-transactions.idx"sv, "070bf21079908d56213963220fb4a6935bc3ede9"sv}, + Entry{"v1-006912-006913-transactions.seg"sv, "2b4e208320b308c688548e85d67367b4e2689c8c"sv}, + Entry{"v1-006913-006914-bodies.idx"sv, "4d3fae3f0c76cb49d3fc2f2788526d6ca2819252"sv}, + Entry{"v1-006913-006914-bodies.seg"sv, "1923af9fec6288b35104a6da4f87b4e3bf9f1bc1"sv}, + Entry{"v1-006913-006914-headers.idx"sv, "efedc6860cc084a8e0514e244dfb841f8b1b3418"sv}, + Entry{"v1-006913-006914-headers.seg"sv, "7a127bd45a1dde9cdd562d55c656c69e3b1b549e"sv}, + Entry{"v1-006913-006914-transactions-to-block.idx"sv, "1eaf88db4471b184751160f1daef939eb66ef83b"sv}, + Entry{"v1-006913-006914-transactions.idx"sv, "903db37fbfb9d2d7447c7a8edea6702228a4ddb7"sv}, + Entry{"v1-006913-006914-transactions.seg"sv, "d20b217f9c259be75701ae122cbf952301f363c4"sv}, + Entry{"v1-006914-006915-bodies.idx"sv, "0943e6e2655f155791059eec2abeccce764b24f2"sv}, + Entry{"v1-006914-006915-bodies.seg"sv, "69c8fa656ab974997f4c424517dfff5fcbbb3973"sv}, + Entry{"v1-006914-006915-headers.idx"sv, "1fc51d46c3cfb7285c2fcd233dfc7a223b4b8411"sv}, + Entry{"v1-006914-006915-headers.seg"sv, "c91d4e3bdc14fe488fbf0f6692a0af194c2bef85"sv}, + Entry{"v1-006914-006915-transactions-to-block.idx"sv, "150167720e4264665c8551063833486b59010743"sv}, + Entry{"v1-006914-006915-transactions.idx"sv, "639762cf258869afe88482f0c39e9f3fd5a8471b"sv}, + Entry{"v1-006914-006915-transactions.seg"sv, "42b6ad71ee2af8462d5550bb945ed6564df06936"sv}, }; } // namespace silkworm::snapshots diff --git a/third_party/erigon-snapshot b/third_party/erigon-snapshot index 1c6166f07a..f64407a77e 160000 --- a/third_party/erigon-snapshot +++ b/third_party/erigon-snapshot @@ -1 +1 @@ -Subproject commit 1c6166f07a21d367a558da64c265ba2b14fdbeab +Subproject commit f64407a77e8e0c3a84d51ff3f9f2ee4d654bb252 From 90f1d5e6c8a4de15ce123badb9e0a29c31fbd8a9 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Fri, 13 Dec 2024 09:01:58 +0100 Subject: [PATCH 07/48] datastore: kvdb schema and DHII entities (#2582) --- cmd/capi/execute.cpp | 4 +- cmd/dev/check_changes.cpp | 2 +- cmd/dev/db_toolbox.cpp | 4 +- cmd/dev/staged_pipeline.cpp | 52 +++---- silkworm/capi/fork_validator.cpp | 10 +- silkworm/capi/instance.hpp | 5 + silkworm/capi/rpcdaemon.cpp | 5 +- silkworm/capi/silkworm.cpp | 12 +- silkworm/db/data_store.cpp | 29 ++++ silkworm/db/data_store.hpp | 48 ++++-- silkworm/db/datastore/data_store.hpp | 18 +-- silkworm/db/datastore/kvdb/database.cpp | 70 +++++++++ silkworm/db/datastore/kvdb/database.hpp | 104 +++++++++++++ silkworm/db/datastore/{ => kvdb}/domain.hpp | 12 +- silkworm/db/datastore/{ => kvdb}/history.hpp | 10 +- .../datastore/{ => kvdb}/inverted_index.hpp | 9 +- silkworm/db/datastore/kvdb/schema.cpp | 75 ++++++++++ silkworm/db/datastore/kvdb/schema.hpp | 141 ++++++++++++++++++ silkworm/db/datastore/schema.hpp | 2 + .../datastore/snapshots/snapshot_bundle.cpp | 10 +- .../snapshots/snapshot_repository.cpp | 6 - .../snapshots/snapshot_repository.hpp | 1 - silkworm/db/kv/api/local_transaction.hpp | 2 +- silkworm/db/snapshot_sync.cpp | 4 +- silkworm/db/state/schema_config.cpp | 19 +++ silkworm/db/state/schema_config.hpp | 42 ++++-- silkworm/db/test_util/temp_chain_data.hpp | 9 +- .../db/test_util/test_database_context.hpp | 9 +- silkworm/execution/local_state.hpp | 2 +- silkworm/node/node.cpp | 6 +- silkworm/node/stagedsync/stages_test.cpp | 2 +- silkworm/rpc/daemon.cpp | 4 +- .../sync/internals/header_retrieval_test.cpp | 2 +- .../messages/inbound_get_block_bodies.cpp | 2 +- .../messages/inbound_get_block_headers.cpp | 2 +- 35 files changed, 602 insertions(+), 132 deletions(-) create mode 100644 silkworm/db/datastore/kvdb/database.cpp create mode 100644 silkworm/db/datastore/kvdb/database.hpp rename silkworm/db/datastore/{ => kvdb}/domain.hpp (74%) rename silkworm/db/datastore/{ => kvdb}/history.hpp (76%) rename silkworm/db/datastore/{ => kvdb}/inverted_index.hpp (79%) create mode 100644 silkworm/db/datastore/kvdb/schema.cpp create mode 100644 silkworm/db/datastore/kvdb/schema.hpp diff --git a/cmd/capi/execute.cpp b/cmd/capi/execute.cpp index 4de9fea9e3..ca6b83e4e4 100644 --- a/cmd/capi/execute.cpp +++ b/cmd/capi/execute.cpp @@ -315,9 +315,9 @@ int execute_blocks(SilkwormHandle handle, ExecuteBlocksSettings settings, const // Execute blocks if (settings.use_internal_txn) { - return execute_with_internal_txn(handle, settings, data_store.chaindata_rw()); + return execute_with_internal_txn(handle, settings, data_store.chaindata().access_rw()); } - return execute_with_external_txn(handle, settings, data_store.chaindata_rw().start_rw_tx()); + return execute_with_external_txn(handle, settings, data_store.chaindata().access_rw().start_rw_tx()); } int build_indexes(SilkwormHandle handle, const BuildIndexesSettings& settings, const DataDirectory& data_dir) { diff --git a/cmd/dev/check_changes.cpp b/cmd/dev/check_changes.cpp index 2330d64b83..7243ba489b 100644 --- a/cmd/dev/check_changes.cpp +++ b/cmd/dev/check_changes.cpp @@ -109,7 +109,7 @@ int main(int argc, char* argv[]) { data_dir.snapshots().path(), }; - auto txn = data_store.chaindata_rw().start_rw_tx(); + auto txn = data_store.chaindata().access_rw().start_rw_tx(); auto chain_config{db::read_chain_config(txn)}; if (!chain_config) { throw std::runtime_error("Unable to retrieve chain config"); diff --git a/cmd/dev/db_toolbox.cpp b/cmd/dev/db_toolbox.cpp index e7d9786854..0cca88635d 100644 --- a/cmd/dev/db_toolbox.cpp +++ b/cmd/dev/db_toolbox.cpp @@ -1460,10 +1460,10 @@ void do_freeze(EnvConfig& config, const DataDirectory& data_dir, bool keep_block config, data_dir.snapshots().path(), }; - StageSchedulerAdapter stage_scheduler{data_store.chaindata_rw()}; + StageSchedulerAdapter stage_scheduler{data_store.chaindata().access_rw()}; Freezer freezer{ - data_store.chaindata(), + data_store.chaindata().access_ro(), data_store.ref().blocks_repository, stage_scheduler, data_dir.temp().path(), diff --git a/cmd/dev/staged_pipeline.cpp b/cmd/dev/staged_pipeline.cpp index b38eb90028..a47944fcfb 100644 --- a/cmd/dev/staged_pipeline.cpp +++ b/cmd/dev/staged_pipeline.cpp @@ -281,18 +281,15 @@ void debug_unwind(datastore::kvdb::EnvConfig& config, BlockNum height, uint32_t Environment::set_start_at_stage(start_at_stage); Environment::set_stop_before_stage(stop_before_stage); - auto env = silkworm::datastore::kvdb::open_env(config); + auto data_directory = std::make_unique(datadir_path); + db::DataStore data_store{config, data_directory->snapshots().path()}; - datastore::kvdb::ROTxnManaged ro_txn{env}; + datastore::kvdb::ROTxnManaged ro_txn = data_store.chaindata().access_ro().start_ro_tx(); const auto chain_config = db::read_chain_config(ro_txn); ensure(chain_config.has_value(), "Uninitialized Silkworm db or unknown/custom chain"); ro_txn.abort(); - auto data_directory = std::make_unique(datadir_path); - auto blocks_repository = db::blocks::make_blocks_repository(data_directory->snapshots().path(), /*open=*/false); - auto state_repository = db::state::make_state_repository(data_directory->snapshots().path(), /*open=*/false); - db::DataStoreRef data_store{datastore::kvdb::RWAccess{env}, blocks_repository, state_repository}; - db::DataModelFactory data_model_factory{data_store}; + db::DataModelFactory data_model_factory{data_store.ref()}; // We need full snapshot sync to take place to have database tables properly updated snapshots::SnapshotSettings snapshot_settings{ @@ -307,7 +304,7 @@ void debug_unwind(datastore::kvdb::EnvConfig& config, BlockNum height, uint32_t db::SnapshotSync snapshot_sync{ std::move(snapshot_settings), chain_config->chain_id, - data_store, + data_store.ref(), std::filesystem::path{}, empty_scheduler}; @@ -324,7 +321,7 @@ void debug_unwind(datastore::kvdb::EnvConfig& config, BlockNum height, uint32_t snap_sync_future.get(); // Commit is enabled by default in RWTxn(Managed), so we need to check here - RWTxnManaged txn{env}; + RWTxnManaged txn = data_store.chaindata().access_rw().start_rw_tx(); if (dry) { txn.disable_commit(); } else { @@ -373,6 +370,7 @@ void debug_unwind(datastore::kvdb::EnvConfig& config, BlockNum height, uint32_t // Unwind has just set progress for pre-Execution stages back to unwind_point even if it is within the snapshots // We need to reset progress for such stages to the max block in snapshots to avoid database update on next start + auto& blocks_repository = data_store.blocks_repository(); db::stages::write_stage_progress(txn, db::stages::kHeadersKey, blocks_repository.max_block_available()); db::stages::write_stage_progress(txn, db::stages::kBlockBodiesKey, blocks_repository.max_block_available()); db::stages::write_stage_progress(txn, db::stages::kBlockHashesKey, blocks_repository.max_block_available()); @@ -386,8 +384,10 @@ void unwind(datastore::kvdb::EnvConfig& config, BlockNum unwind_point, const boo config.readonly = false; - auto env{silkworm::datastore::kvdb::open_env(config)}; - RWTxnManaged txn{env}; + auto data_directory = std::make_unique(); + db::DataStore data_store{config, data_directory->snapshots().path()}; + + RWTxnManaged txn = data_store.chaindata().access_rw().start_rw_tx(); // Commit is enabled by default in RWTxn(Managed), so we need to check here if (dry) { @@ -402,11 +402,7 @@ void unwind(datastore::kvdb::EnvConfig& config, BlockNum unwind_point, const boo const auto chain_config = db::read_chain_config(txn); ensure(chain_config.has_value(), "Not an initialized Silkworm db or unknown/custom chain"); - auto data_directory = std::make_unique(); - auto blocks_repository = db::blocks::make_blocks_repository(data_directory->snapshots().path(), /*open=*/true); - auto state_repository = db::state::make_state_repository(data_directory->path(), /*open=*/true); - db::DataStoreRef data_store{datastore::kvdb::RWAccess{env}, blocks_repository, state_repository}; - db::DataModelFactory data_model_factory{data_store}; + db::DataModelFactory data_model_factory{data_store.ref()}; boost::asio::io_context io_context; @@ -491,8 +487,10 @@ void forward(datastore::kvdb::EnvConfig& config, BlockNum forward_point, const b Environment::set_start_at_stage(start_at_stage); Environment::set_stop_before_stage(stop_before_stage); - auto env = silkworm::datastore::kvdb::open_env(config); - RWTxnManaged txn{env}; + auto data_directory = std::make_unique(); + db::DataStore data_store{config, data_directory->snapshots().path()}; + + RWTxnManaged txn = data_store.chaindata().access_rw().start_rw_tx(); // Commit is enabled by default in RWTxn(Managed), so we need to check here if (dry) { @@ -510,11 +508,7 @@ void forward(datastore::kvdb::EnvConfig& config, BlockNum forward_point, const b const auto datadir_path = std::filesystem::path{config.path}.parent_path(); SILK_INFO << "Forward: datadir=" << datadir_path.string(); - auto data_directory = std::make_unique(); - auto blocks_repository = db::blocks::make_blocks_repository(data_directory->snapshots().path(), /*open=*/true); - auto state_repository = db::state::make_state_repository(data_directory->path(), /*open=*/true); - db::DataStoreRef data_store{datastore::kvdb::RWAccess{env}, blocks_repository, state_repository}; - db::DataModelFactory data_model_factory{data_store}; + db::DataModelFactory data_model_factory{data_store.ref()}; boost::asio::io_context io_context; @@ -561,8 +555,10 @@ void bisect_pipeline(datastore::kvdb::EnvConfig& config, BlockNum start, BlockNu Environment::set_start_at_stage(start_at_stage); Environment::set_stop_before_stage(stop_before_stage); - auto env = silkworm::datastore::kvdb::open_env(config); - RWTxnManaged txn{env}; + auto data_directory = std::make_unique(); + db::DataStore data_store{config, data_directory->snapshots().path()}; + + RWTxnManaged txn = data_store.chaindata().access_rw().start_rw_tx(); // Commit is enabled by default in RWTxn(Managed), so we need to check here if (dry) { @@ -580,11 +576,7 @@ void bisect_pipeline(datastore::kvdb::EnvConfig& config, BlockNum start, BlockNu const auto datadir_path = std::filesystem::path{config.path}.parent_path(); SILK_INFO << "Bisect: datadir=" << datadir_path.string(); - auto data_directory = std::make_unique(); - auto blocks_repository = db::blocks::make_blocks_repository(data_directory->snapshots().path(), /*open=*/true); - auto state_repository = db::state::make_state_repository(data_directory->path(), /*open=*/true); - db::DataStoreRef data_store{datastore::kvdb::RWAccess{env}, blocks_repository, state_repository}; - db::DataModelFactory data_model_factory{data_store}; + db::DataModelFactory data_model_factory{data_store.ref()}; boost::asio::io_context io_context; diff --git a/silkworm/capi/fork_validator.cpp b/silkworm/capi/fork_validator.cpp index 356cbc4a34..96b1519d56 100644 --- a/silkworm/capi/fork_validator.cpp +++ b/silkworm/capi/fork_validator.cpp @@ -125,10 +125,12 @@ SILKWORM_EXPORT int silkworm_start_fork_validator(SilkwormHandle handle, MDBX_en SILK_INFO << "Starting fork validator"; set_node_settings(handle, *settings, mdbx_env); - silkworm::datastore::kvdb::EnvUnmanaged unmanaged_env{mdbx_env}; - silkworm::datastore::kvdb::RWAccess rw_access{unmanaged_env}; + handle->chaindata = std::make_unique( + silkworm::db::DataStore::make_chaindata_database(silkworm::datastore::kvdb::EnvUnmanaged{mdbx_env})); + auto& chaindata = *handle->chaindata; + silkworm::db::DataStoreRef data_store{ - rw_access, + chaindata.ref(), *handle->blocks_repository, *handle->state_repository, }; @@ -140,7 +142,7 @@ SILKWORM_EXPORT int silkworm_start_fork_validator(SilkwormHandle handle, MDBX_en data_model_factory, /* log_timer_factory = */ std::nullopt, make_stages_factory(handle->node_settings, data_model_factory), - rw_access); + chaindata.access_rw()); SILK_DEBUG << "Execution engine created"; diff --git a/silkworm/capi/instance.hpp b/silkworm/capi/instance.hpp index 77766714b5..59b0c5fb02 100644 --- a/silkworm/capi/instance.hpp +++ b/silkworm/capi/instance.hpp @@ -38,11 +38,16 @@ namespace silkworm::stagedsync { class ExecutionEngine; } // namespace silkworm::stagedsync +namespace silkworm::datastore::kvdb { +class DatabaseUnmanaged; +} // namespace silkworm::datastore::kvdb + struct SilkwormInstance { silkworm::log::Settings log_settings; silkworm::concurrency::ContextPoolSettings context_pool_settings; std::filesystem::path data_dir_path; silkworm::NodeSettings node_settings; + std::unique_ptr chaindata; std::unique_ptr blocks_repository; std::unique_ptr state_repository; std::unique_ptr rpcdaemon; diff --git a/silkworm/capi/rpcdaemon.cpp b/silkworm/capi/rpcdaemon.cpp index 8c9d5d8a61..93c4b00209 100644 --- a/silkworm/capi/rpcdaemon.cpp +++ b/silkworm/capi/rpcdaemon.cpp @@ -103,8 +103,11 @@ SILKWORM_EXPORT int silkworm_start_rpcdaemon(SilkwormHandle handle, MDBX_env* en } auto daemon_settings = make_daemon_settings(handle, *settings); + handle->chaindata = std::make_unique( + db::DataStore::make_chaindata_database(datastore::kvdb::EnvUnmanaged{env})); + db::DataStoreRef data_store{ - datastore::kvdb::RWAccess{datastore::kvdb::EnvUnmanaged{env}}, + handle->chaindata->ref(), *handle->blocks_repository, *handle->state_repository, }; diff --git a/silkworm/capi/silkworm.cpp b/silkworm/capi/silkworm.cpp index a6ba5d2dde..432cfa8bf5 100644 --- a/silkworm/capi/silkworm.cpp +++ b/silkworm/capi/silkworm.cpp @@ -618,9 +618,13 @@ int silkworm_execute_blocks_perpetual(SilkwormHandle handle, MDBX_env* mdbx_env, try { // Wrap MDBX env into an internal *unmanaged* env, i.e. MDBX env is only used but its lifecycle is untouched datastore::kvdb::EnvUnmanaged unmanaged_env{mdbx_env}; - datastore::kvdb::RWAccess rw_access{unmanaged_env}; - auto txn = rw_access.start_rw_tx(); const auto env_path = unmanaged_env.get_path(); + handle->chaindata = std::make_unique( + db::DataStore::make_chaindata_database(std::move(unmanaged_env))); + auto& chaindata = *handle->chaindata; + + datastore::kvdb::RWAccess rw_access = chaindata.access_rw(); + auto txn = rw_access.start_rw_tx(); db::Buffer state_buffer{txn, std::make_unique(db::DataModel{txn, *handle->blocks_repository})}; state_buffer.set_memory_limit(batch_size); @@ -629,7 +633,7 @@ int silkworm_execute_blocks_perpetual(SilkwormHandle handle, MDBX_env* mdbx_env, [[maybe_unused]] auto _ = gsl::finally([&block_buffer] { block_buffer.terminate_and_release_all(); }); db::DataStoreRef data_store{ - rw_access, + chaindata.ref(), *handle->blocks_repository, *handle->state_repository, }; @@ -637,7 +641,7 @@ int silkworm_execute_blocks_perpetual(SilkwormHandle handle, MDBX_env* mdbx_env, BlockProvider block_provider{ &block_buffer, - datastore::kvdb::ROAccess{unmanaged_env}, + chaindata.access_ro(), std::move(data_model_factory), start_block, max_block, diff --git a/silkworm/db/data_store.cpp b/silkworm/db/data_store.cpp index e3d8180177..a6c106740b 100644 --- a/silkworm/db/data_store.cpp +++ b/silkworm/db/data_store.cpp @@ -19,15 +19,44 @@ namespace silkworm::db { datastore::Schema DataStore::make_schema() { + datastore::kvdb::Schema kvdb; + kvdb.default_database() = make_chaindata_database_schema(); + snapshots::Schema snapshots; snapshots.repository(blocks::kBlocksRepositoryName) = blocks::make_blocks_repository_schema(); snapshots.repository(state::kStateRepositoryName) = state::make_state_repository_schema(); return { + std::move(kvdb), std::move(snapshots), }; } +datastore::kvdb::Schema::DatabaseDef DataStore::make_chaindata_database_schema() { + return state::make_state_database_schema(); +} + +datastore::kvdb::Database DataStore::make_chaindata_database(mdbx::env_managed chaindata_env) { + return { + std::move(chaindata_env), + make_chaindata_database_schema(), + }; +} + +datastore::kvdb::DatabaseUnmanaged DataStore::make_chaindata_database(datastore::kvdb::EnvUnmanaged chaindata_env) { + return { + std::move(chaindata_env), + make_chaindata_database_schema(), + }; +} + +std::map> DataStore::make_databases_map( + datastore::kvdb::Database chaindata_database) { + std::map> databases; + databases.emplace(datastore::kvdb::Schema::kDefaultEntityName, std::make_unique(std::move(chaindata_database))); + return databases; +} + std::map> DataStore::make_repositories_map( snapshots::SnapshotRepository blocks_repository, snapshots::SnapshotRepository state_repository) { diff --git a/silkworm/db/data_store.hpp b/silkworm/db/data_store.hpp index eddffdd3e9..442649dde2 100644 --- a/silkworm/db/data_store.hpp +++ b/silkworm/db/data_store.hpp @@ -25,51 +25,69 @@ namespace silkworm::db { struct DataStoreRef { - datastore::kvdb::RWAccess chaindata; + datastore::kvdb::DatabaseRef chaindata; + state::StateDatabaseRef state_db() const { return {chaindata}; } snapshots::SnapshotRepository& blocks_repository; snapshots::SnapshotRepository& state_repository; }; class DataStore { - public: - explicit DataStore(datastore::DataStore store) : store_{std::move(store)} {} DataStore( - mdbx::env_managed chaindata_env, + datastore::kvdb::Database chaindata_database, snapshots::SnapshotRepository blocks_repository, snapshots::SnapshotRepository state_repository) : store_{ make_schema(), - std::move(chaindata_env), + make_databases_map(std::move(chaindata_database)), make_repositories_map(std::move(blocks_repository), std::move(state_repository)), } {} + public: + explicit DataStore(datastore::DataStore store) : store_{std::move(store)} {} + DataStore( - const datastore::kvdb::EnvConfig& chaindata_env_config, + mdbx::env_managed chaindata_env, const std::filesystem::path& repository_path) : DataStore{ - datastore::kvdb::open_env(chaindata_env_config), + make_chaindata_database(std::move(chaindata_env)), blocks::make_blocks_repository(repository_path), state::make_state_repository(repository_path), } {} - void close() { - store_.close(); - } + DataStore( + const datastore::kvdb::EnvConfig& chaindata_env_config, + const std::filesystem::path& repository_path) + : DataStore{ + datastore::kvdb::open_env(chaindata_env_config), + repository_path, + } {} DataStoreRef ref() const { return { - store_.chaindata_rw(), - store_.repository(blocks::kBlocksRepositoryName), - store_.repository(state::kStateRepositoryName), + chaindata().ref(), + blocks_repository(), + state_repository(), }; } - datastore::kvdb::ROAccess chaindata() const { return store_.chaindata(); } - datastore::kvdb::RWAccess chaindata_rw() const { return store_.chaindata_rw(); } + datastore::kvdb::Database& chaindata() const { return store_.default_database(); } + + snapshots::SnapshotRepository& blocks_repository() const { + return store_.repository(blocks::kBlocksRepositoryName); + } + snapshots::SnapshotRepository& state_repository() const { + return store_.repository(state::kStateRepositoryName); + } + + static datastore::kvdb::Schema::DatabaseDef make_chaindata_database_schema(); + static datastore::kvdb::Database make_chaindata_database(mdbx::env_managed chaindata_env); + static datastore::kvdb::DatabaseUnmanaged make_chaindata_database(datastore::kvdb::EnvUnmanaged chaindata_env); private: static datastore::Schema make_schema(); + static std::map> make_databases_map( + datastore::kvdb::Database chaindata_database); static std::map> make_repositories_map( snapshots::SnapshotRepository blocks_repository, snapshots::SnapshotRepository state_repository); diff --git a/silkworm/db/datastore/data_store.hpp b/silkworm/db/datastore/data_store.hpp index 74b56d3c61..2592e17b2d 100644 --- a/silkworm/db/datastore/data_store.hpp +++ b/silkworm/db/datastore/data_store.hpp @@ -20,7 +20,7 @@ #include #include "common/entity_name.hpp" -#include "kvdb/mdbx.hpp" +#include "kvdb/database.hpp" #include "schema.hpp" #include "snapshots/snapshot_repository.hpp" @@ -30,27 +30,21 @@ class DataStore { public: DataStore( Schema schema, - mdbx::env_managed chaindata_env, + std::map> databases, std::map> repositories) : schema_{std::move(schema)}, - chaindata_env_{std::move(chaindata_env)}, + databases_{std::move(databases)}, repositories_{std::move(repositories)} {} - void close() { - chaindata_env_.close(); - for (auto& entry : repositories_) - entry.second->close(); - } - const Schema& schema() const { return schema_; } - datastore::kvdb::ROAccess chaindata() const { return datastore::kvdb::ROAccess{chaindata_env_}; } - datastore::kvdb::RWAccess chaindata_rw() const { return datastore::kvdb::RWAccess{chaindata_env_}; } + kvdb::Database& default_database() const { return database(kvdb::Schema::kDefaultEntityName); } + kvdb::Database& database(const EntityName& name) const { return *databases_.at(name); } snapshots::SnapshotRepository& repository(const EntityName& name) const { return *repositories_.at(name); } private: Schema schema_; - mdbx::env_managed chaindata_env_; + std::map> databases_; std::map> repositories_; }; diff --git a/silkworm/db/datastore/kvdb/database.cpp b/silkworm/db/datastore/kvdb/database.cpp new file mode 100644 index 0000000000..19f1cd551b --- /dev/null +++ b/silkworm/db/datastore/kvdb/database.cpp @@ -0,0 +1,70 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "database.hpp" + +namespace silkworm::datastore::kvdb { + +static MapConfig make_table_config(const Schema::TableDef& table) { + return MapConfig{ + table.name().c_str(), + mdbx::key_mode::usual, + table.is_multi_value() ? mdbx::value_mode::multi : mdbx::value_mode::single, + }; +} + +static std::map make_table_configs( + const Schema::EntityDef& entity) { + std::map results; + for (auto& [name, def] : entity.tables()) { + results.emplace(name, make_table_config(def)); + } + return results; +} + +DatabaseRef::EntitiesMap make_entities( + const Schema::DatabaseDef& schema) { + DatabaseRef::EntitiesMap results; + for (auto& [name, def] : schema.entities()) { + results.emplace(name, make_table_configs(*def)); + } + return results; +} + +Domain DatabaseRef::domain(datastore::EntityName name) const { + auto& entity = entities_.at(name); + Domain domain{ + entity.at(Schema::kDomainValuesName), + std::nullopt, + }; + if (entity.contains(Schema::kHistoryValuesName)) { + domain.history.emplace(History{ + entity.at(Schema::kHistoryValuesName), + inverted_index(name), + }); + } + return domain; +} + +InvertedIndex DatabaseRef::inverted_index(datastore::EntityName name) const { + auto& entity = entities_.at(name); + return InvertedIndex{ + entity.at(Schema::kInvIdxKeysName), + entity.at(Schema::kInvIdxIndexName), + }; +} + +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/kvdb/database.hpp b/silkworm/db/datastore/kvdb/database.hpp new file mode 100644 index 0000000000..dc67719e3f --- /dev/null +++ b/silkworm/db/datastore/kvdb/database.hpp @@ -0,0 +1,104 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include + +#include "domain.hpp" +#include "inverted_index.hpp" +#include "mdbx.hpp" +#include "schema.hpp" + +namespace silkworm::datastore::kvdb { + +class Database; +class DatabaseUnmanaged; + +class DatabaseRef { + public: + using EntitiesMap = std::map>; + + ROAccess access_ro() const { return ROAccess{env_}; } + RWAccess access_rw() const { return RWAccess{env_}; } + + Domain domain(datastore::EntityName name) const; + InvertedIndex inverted_index(datastore::EntityName name) const; + + private: + // this is private, use Database.ref() or DatabaseUnmanaged.ref() to create + DatabaseRef( + mdbx::env env, + const EntitiesMap& entities) + : env_{env}, + entities_{entities} {} + + friend class Database; + friend class DatabaseUnmanaged; + + mdbx::env env_; + const EntitiesMap& entities_; +}; + +DatabaseRef::EntitiesMap make_entities(const Schema::DatabaseDef& schema); + +class Database { + public: + Database( + mdbx::env_managed env, + Schema::DatabaseDef schema) + : env_{std::move(env)}, + schema_{std::move(schema)}, + entities_{make_entities(schema_)} {} + + ROAccess access_ro() const { return ref().access_ro(); } + RWAccess access_rw() const { return ref().access_rw(); } + + Domain domain(datastore::EntityName name) const { return ref().domain(name); } + InvertedIndex inverted_index(datastore::EntityName name) { return ref().inverted_index(name); } + + DatabaseRef ref() const { return {env_, entities_}; } // NOLINT(cppcoreguidelines-slicing) + + private: + mdbx::env_managed env_; + Schema::DatabaseDef schema_; + std::map> entities_; +}; + +class DatabaseUnmanaged { + public: + DatabaseUnmanaged( + EnvUnmanaged env, + Schema::DatabaseDef schema) + : env_{std::move(env)}, + schema_{std::move(schema)}, + entities_{make_entities(schema_)} {} + + ROAccess access_ro() const { return ref().access_ro(); } + RWAccess access_rw() const { return ref().access_rw(); } + + Domain domain(datastore::EntityName name) const { return ref().domain(name); } + InvertedIndex inverted_index(datastore::EntityName name) { return ref().inverted_index(name); } + + DatabaseRef ref() const { return {env_, entities_}; } // NOLINT(cppcoreguidelines-slicing) + + private: + EnvUnmanaged env_; + Schema::DatabaseDef schema_; + std::map> entities_; +}; + +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/domain.hpp b/silkworm/db/datastore/kvdb/domain.hpp similarity index 74% rename from silkworm/db/datastore/domain.hpp rename to silkworm/db/datastore/kvdb/domain.hpp index b8b6216cbe..18ff378fbf 100644 --- a/silkworm/db/datastore/domain.hpp +++ b/silkworm/db/datastore/kvdb/domain.hpp @@ -16,12 +16,16 @@ #pragma once -#include "snapshots/domain.hpp" +#include -namespace silkworm::datastore { +#include "history.hpp" +#include "mdbx.hpp" + +namespace silkworm::datastore::kvdb { struct Domain { - snapshots::Domain snapshots; + const MapConfig& values_table; + std::optional history; }; -} // namespace silkworm::datastore +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/history.hpp b/silkworm/db/datastore/kvdb/history.hpp similarity index 76% rename from silkworm/db/datastore/history.hpp rename to silkworm/db/datastore/kvdb/history.hpp index a4e36fd4ec..7f684545e2 100644 --- a/silkworm/db/datastore/history.hpp +++ b/silkworm/db/datastore/kvdb/history.hpp @@ -16,12 +16,14 @@ #pragma once -#include "snapshots/history.hpp" +#include "inverted_index.hpp" +#include "mdbx.hpp" -namespace silkworm::datastore { +namespace silkworm::datastore::kvdb { struct History { - snapshots::History snapshots; + const MapConfig& values_table; + InvertedIndex inverted_index; }; -} // namespace silkworm::datastore +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/inverted_index.hpp b/silkworm/db/datastore/kvdb/inverted_index.hpp similarity index 79% rename from silkworm/db/datastore/inverted_index.hpp rename to silkworm/db/datastore/kvdb/inverted_index.hpp index 6a0adfa5f8..363c794f0e 100644 --- a/silkworm/db/datastore/inverted_index.hpp +++ b/silkworm/db/datastore/kvdb/inverted_index.hpp @@ -16,12 +16,13 @@ #pragma once -#include "snapshots/inverted_index.hpp" +#include "mdbx.hpp" -namespace silkworm::datastore { +namespace silkworm::datastore::kvdb { struct InvertedIndex { - snapshots::InvertedIndex snapshots; + const MapConfig& keys_table; + const MapConfig& index_table; }; -} // namespace silkworm::datastore +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/kvdb/schema.cpp b/silkworm/db/datastore/kvdb/schema.cpp new file mode 100644 index 0000000000..c30d841db3 --- /dev/null +++ b/silkworm/db/datastore/kvdb/schema.cpp @@ -0,0 +1,75 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "schema.hpp" + +namespace silkworm::datastore::kvdb { + +static std::string make_table_name(datastore::EntityName base_name, std::string_view suffix) { + return base_name.to_string() + std::string{suffix}; +} + +Schema::DomainDef Schema::DatabaseDef::make_domain_schema(datastore::EntityName name) { + Schema::DomainDef schema; + schema.table(kDomainValuesName) + .name(make_table_name(name, "Vals")) + .enable_multi_value(); + define_history_schema(name, schema); + return schema; +} + +Schema::EntityDef Schema::DatabaseDef::make_history_schema(datastore::EntityName name) { + Schema::EntityDef schema; + define_history_schema(name, schema); + return schema; +} + +void Schema::DatabaseDef::define_history_schema(datastore::EntityName name, EntityDef& schema) { + schema.table(kHistoryValuesName) + .name(make_table_name(name, "HistoryVals")) + .enable_multi_value(); + define_inverted_index_schema(name, schema); + // update the inverted index table name to have a "HistoryKeys" suffix + schema.table(kInvIdxKeysName) + .name(make_table_name(name, "HistoryKeys")); +} + +void Schema::DatabaseDef::undefine_history_schema(EntityDef& schema) { + schema.undefine(kHistoryValuesName); + undefine_inverted_index_schema(schema); +} + +Schema::EntityDef Schema::DatabaseDef::make_inverted_index_schema(datastore::EntityName name) { + Schema::EntityDef schema; + define_inverted_index_schema(name, schema); + return schema; +} + +void Schema::DatabaseDef::define_inverted_index_schema(datastore::EntityName name, EntityDef& schema) { + schema.table(kInvIdxKeysName) + .name(make_table_name(name, "Keys")) + .enable_multi_value(); + schema.table(kInvIdxIndexName) + .name(make_table_name(name, "Idx")) + .enable_multi_value(); +} + +void Schema::DatabaseDef::undefine_inverted_index_schema(EntityDef& schema) { + schema.undefine(kInvIdxKeysName); + schema.undefine(kInvIdxIndexName); +} + +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/kvdb/schema.hpp b/silkworm/db/datastore/kvdb/schema.hpp new file mode 100644 index 0000000000..d1ef39e58b --- /dev/null +++ b/silkworm/db/datastore/kvdb/schema.hpp @@ -0,0 +1,141 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +#include "../common/entity_name.hpp" + +namespace silkworm::datastore::kvdb { + +class Schema { + public: + class TableDef { + public: + TableDef& name(std::string_view name) { + name_ = name; + return *this; + } + + TableDef& enable_multi_value() { + is_multi_value_ = true; + return *this; + } + + TableDef& disable_multi_value() { + is_multi_value_ = false; + return *this; + } + + const std::string& name() const { return name_.value(); } + bool is_multi_value() const { return is_multi_value_; } + + private: + std::optional name_; + bool is_multi_value_{false}; + }; + + class EntityDef { + public: + virtual ~EntityDef() = default; + + TableDef& table(datastore::EntityName name) { + return table_defs_[name]; + } + + EntityDef& undefine(datastore::EntityName name) { + table_defs_.erase(name); + return *this; + } + + const std::map& tables() const { return table_defs_; } + + private: + std::map table_defs_; + }; + + class DomainDef : public EntityDef { + public: + ~DomainDef() override = default; + + DomainDef& values_disable_multi_value() { + table(kDomainValuesName).disable_multi_value(); + table(kHistoryValuesName).disable_multi_value(); + return *this; + } + + DomainDef& without_history() { + DatabaseDef::undefine_history_schema(*this); + return *this; + } + }; + + class DatabaseDef { + public: + EntityDef& default_entity() { + entity_defs_.try_emplace(kDefaultEntityName, std::make_shared()); + return *entity_defs_.at(kDefaultEntityName); + } + + DomainDef& domain(datastore::EntityName name) { + entity_defs_.try_emplace(name, std::make_shared(make_domain_schema(name))); + return dynamic_cast(*entity_defs_.at(name)); + } + + EntityDef& inverted_index(datastore::EntityName name) { + entity_defs_.try_emplace(name, std::make_shared(make_inverted_index_schema(name))); + return *entity_defs_.at(name); + } + + const std::map>& entities() const { return entity_defs_; } + + private: + friend DomainDef; + static DomainDef make_domain_schema(datastore::EntityName name); + static EntityDef make_history_schema(datastore::EntityName name); + static void define_history_schema(datastore::EntityName name, EntityDef& schema); + static void undefine_history_schema(EntityDef& schema); + static EntityDef make_inverted_index_schema(datastore::EntityName name); + static void define_inverted_index_schema(datastore::EntityName name, EntityDef& schema); + static void undefine_inverted_index_schema(EntityDef& schema); + + std::map> entity_defs_; + }; + + DatabaseDef& database(datastore::EntityName name) { + return database_defs_[name]; + } + + DatabaseDef& default_database() { + return database(kDefaultEntityName); + } + + static constexpr datastore::EntityName kDefaultEntityName{"_"}; + + static constexpr datastore::EntityName kDomainValuesName{"DomainValues"}; + static constexpr datastore::EntityName kHistoryValuesName{"HistoryValues"}; + static constexpr datastore::EntityName kInvIdxKeysName{"InvIdxKeys"}; + static constexpr datastore::EntityName kInvIdxIndexName{"InvIdxIndex"}; + + private: + std::map database_defs_; +}; + +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/schema.hpp b/silkworm/db/datastore/schema.hpp index 5cf37cf8bb..3e4d35e115 100644 --- a/silkworm/db/datastore/schema.hpp +++ b/silkworm/db/datastore/schema.hpp @@ -16,11 +16,13 @@ #pragma once +#include "kvdb/schema.hpp" #include "snapshots/schema.hpp" namespace silkworm::datastore { struct Schema { + kvdb::Schema kvdb; snapshots::Schema snapshots; }; diff --git a/silkworm/db/datastore/snapshots/snapshot_bundle.cpp b/silkworm/db/datastore/snapshots/snapshot_bundle.cpp index a3ba6b93ca..01521d00fd 100644 --- a/silkworm/db/datastore/snapshots/snapshot_bundle.cpp +++ b/silkworm/db/datastore/snapshots/snapshot_bundle.cpp @@ -117,7 +117,7 @@ SnapshotBundleData open_bundle_data( open_existence_indexes(entity_schema, dir_path, step_range), open_btree_indexes(entity_schema, dir_path, step_range), }); - }; + } return data; } @@ -153,15 +153,13 @@ Domain SnapshotBundle::domain(datastore::EntityName name) const { data.accessor_indexes.at(Schema::kDomainAccessorIndexName), data.existence_indexes.at(Schema::kDomainExistenceIndexName), data.btree_indexes.at(Schema::kDomainBTreeIndexName), + std::nullopt, }; if (data.segments.contains(Schema::kHistorySegmentName)) { domain.history.emplace(History{ data.segments.at(Schema::kHistorySegmentName), data.accessor_indexes.at(Schema::kHistoryAccessorIndexName), - InvertedIndex{ - data.kv_segments.at(Schema::kInvIdxKVSegmentName), - data.accessor_indexes.at(Schema::kInvIdxAccessorIndexName), - }, + inverted_index(name), }); } return domain; @@ -169,7 +167,7 @@ Domain SnapshotBundle::domain(datastore::EntityName name) const { InvertedIndex SnapshotBundle::inverted_index(datastore::EntityName name) const { auto& data = data_.entities.at(name); - return { + return InvertedIndex{ data.kv_segments.at(Schema::kInvIdxKVSegmentName), data.accessor_indexes.at(Schema::kInvIdxAccessorIndexName), }; diff --git a/silkworm/db/datastore/snapshots/snapshot_repository.cpp b/silkworm/db/datastore/snapshots/snapshot_repository.cpp index 0743c084c0..00db030b9f 100644 --- a/silkworm/db/datastore/snapshots/snapshot_repository.cpp +++ b/silkworm/db/datastore/snapshots/snapshot_repository.cpp @@ -67,12 +67,6 @@ size_t SnapshotRepository::bundles_count() const { return bundles_->size(); } -void SnapshotRepository::close() { - SILK_TRACE << "Close snapshot repository folder: " << dir_path_.string(); - std::scoped_lock lock(*bundles_mutex_); - bundles_ = std::make_shared(); -} - BlockNum SnapshotRepository::max_block_available() const { Step end_step = max_end_step(); if (end_step.value == 0) return 0; diff --git a/silkworm/db/datastore/snapshots/snapshot_repository.hpp b/silkworm/db/datastore/snapshots/snapshot_repository.hpp index f56794b705..3ade1d7815 100644 --- a/silkworm/db/datastore/snapshots/snapshot_repository.hpp +++ b/silkworm/db/datastore/snapshots/snapshot_repository.hpp @@ -60,7 +60,6 @@ class SnapshotRepository { const Schema::RepositoryDef& schema() const { return schema_; }; void reopen_folder(); - void close(); void add_snapshot_bundle(SnapshotBundle bundle); diff --git a/silkworm/db/kv/api/local_transaction.hpp b/silkworm/db/kv/api/local_transaction.hpp index 0de9c8bb70..8b518a4184 100644 --- a/silkworm/db/kv/api/local_transaction.hpp +++ b/silkworm/db/kv/api/local_transaction.hpp @@ -40,7 +40,7 @@ class LocalTransaction : public BaseTransaction { StateCache* state_cache) : BaseTransaction(state_cache), data_store_{std::move(data_store)}, - txn_{data_store_.chaindata.start_ro_tx()} {} + txn_{data_store_.chaindata.access_ro().start_ro_tx()} {} ~LocalTransaction() override = default; diff --git a/silkworm/db/snapshot_sync.cpp b/silkworm/db/snapshot_sync.cpp index 1ee392eed7..3943b54b63 100644 --- a/silkworm/db/snapshot_sync.cpp +++ b/silkworm/db/snapshot_sync.cpp @@ -71,7 +71,7 @@ SnapshotSync::SnapshotSync( data_store_{std::move(data_store)}, client_{settings_.bittorrent_settings}, snapshot_freezer_{ - data_store_.chaindata, + data_store_.chaindata.access_ro(), data_store_.blocks_repository, stage_scheduler, tmp_dir_path, @@ -138,7 +138,7 @@ Task SnapshotSync::setup() { blocks_repository().reopen_folder(); // Update chain and stage progresses in database according to available snapshots - datastore::kvdb::RWTxnManaged rw_txn = data_store_.chaindata.start_rw_tx(); + datastore::kvdb::RWTxnManaged rw_txn = data_store_.chaindata.access_rw().start_rw_tx(); update_database(rw_txn, blocks_repository().max_block_available(), [this] { return is_stopping_latch_.try_wait(); }); rw_txn.commit_and_stop(); diff --git a/silkworm/db/state/schema_config.cpp b/silkworm/db/state/schema_config.cpp index bf15944ad2..867405f4f2 100644 --- a/silkworm/db/state/schema_config.cpp +++ b/silkworm/db/state/schema_config.cpp @@ -44,6 +44,25 @@ snapshots::Schema::RepositoryDef make_state_repository_schema() { return schema; } +datastore::kvdb::Schema::DatabaseDef make_state_database_schema() { + datastore::kvdb::Schema::DatabaseDef schema; + + schema.domain(kDomainNameAccounts); + schema.domain(kDomainNameStorage); + schema.domain(kDomainNameCode) + .values_disable_multi_value(); + schema.domain(kDomainNameCommitment) + .without_history(); + schema.domain(kDomainNameReceipts); + + schema.inverted_index(kInvIdxNameLogAddress); + schema.inverted_index(kInvIdxNameLogTopics); + schema.inverted_index(kInvIdxNameTracesFrom); + schema.inverted_index(kInvIdxNameTracesTo); + + return schema; +} + std::unique_ptr make_state_index_builders_factory() { return std::make_unique(make_state_repository_schema()); } diff --git a/silkworm/db/state/schema_config.hpp b/silkworm/db/state/schema_config.hpp index ebde80f523..44aceea977 100644 --- a/silkworm/db/state/schema_config.hpp +++ b/silkworm/db/state/schema_config.hpp @@ -17,9 +17,13 @@ #pragma once #include "../datastore/common/entity_name.hpp" -#include "../datastore/domain.hpp" -#include "../datastore/inverted_index.hpp" +#include "../datastore/kvdb/database.hpp" +#include "../datastore/kvdb/domain.hpp" +#include "../datastore/kvdb/inverted_index.hpp" +#include "../datastore/kvdb/schema.hpp" +#include "../datastore/snapshots/domain.hpp" #include "../datastore/snapshots/index_builders_factory.hpp" +#include "../datastore/snapshots/inverted_index.hpp" #include "../datastore/snapshots/schema.hpp" #include "../datastore/snapshots/snapshot_repository.hpp" @@ -28,6 +32,7 @@ namespace silkworm::db::state { inline constexpr datastore::EntityName kStateRepositoryName{"State"}; snapshots::Schema::RepositoryDef make_state_repository_schema(); +datastore::kvdb::Schema::DatabaseDef make_state_database_schema(); std::unique_ptr make_state_index_builders_factory(); @@ -52,16 +57,31 @@ inline constexpr std::string_view kInvIdxLogAddressTag{"logaddrs"}; struct BundleDataRef { const snapshots::SnapshotBundle& bundle; - datastore::Domain accounts_domain() const { return {bundle.domain(kDomainNameAccounts)}; } - datastore::Domain storage_domain() const { return {bundle.domain(kDomainNameStorage)}; } - datastore::Domain code_domain() const { return {bundle.domain(kDomainNameCode)}; } - datastore::Domain commitment_domain() const { return {bundle.domain(kDomainNameCommitment)}; } - datastore::Domain receipts_domain() const { return {bundle.domain(kDomainNameReceipts)}; } + snapshots::Domain accounts_domain() const { return {bundle.domain(kDomainNameAccounts)}; } + snapshots::Domain storage_domain() const { return {bundle.domain(kDomainNameStorage)}; } + snapshots::Domain code_domain() const { return {bundle.domain(kDomainNameCode)}; } + snapshots::Domain commitment_domain() const { return {bundle.domain(kDomainNameCommitment)}; } + snapshots::Domain receipts_domain() const { return {bundle.domain(kDomainNameReceipts)}; } - datastore::InvertedIndex log_address_inverted_index() const { return {bundle.inverted_index(kInvIdxNameLogAddress)}; } - datastore::InvertedIndex log_topics_inverted_index() const { return {bundle.inverted_index(kInvIdxNameLogTopics)}; } - datastore::InvertedIndex traces_from_inverted_index() const { return {bundle.inverted_index(kInvIdxNameTracesFrom)}; } - datastore::InvertedIndex traces_to_inverted_index() const { return {bundle.inverted_index(kInvIdxNameTracesTo)}; } + snapshots::InvertedIndex log_address_inverted_index() const { return {bundle.inverted_index(kInvIdxNameLogAddress)}; } + snapshots::InvertedIndex log_topics_inverted_index() const { return {bundle.inverted_index(kInvIdxNameLogTopics)}; } + snapshots::InvertedIndex traces_from_inverted_index() const { return {bundle.inverted_index(kInvIdxNameTracesFrom)}; } + snapshots::InvertedIndex traces_to_inverted_index() const { return {bundle.inverted_index(kInvIdxNameTracesTo)}; } +}; + +struct StateDatabaseRef { + const datastore::kvdb::DatabaseRef& database; + + datastore::kvdb::Domain accounts_domain() const { return {database.domain(kDomainNameAccounts)}; } + datastore::kvdb::Domain storage_domain() const { return {database.domain(kDomainNameStorage)}; } + datastore::kvdb::Domain code_domain() const { return {database.domain(kDomainNameCode)}; } + datastore::kvdb::Domain commitment_domain() const { return {database.domain(kDomainNameCommitment)}; } + datastore::kvdb::Domain receipts_domain() const { return {database.domain(kDomainNameReceipts)}; } + + datastore::kvdb::InvertedIndex log_address_inverted_index() const { return {database.inverted_index(kInvIdxNameLogAddress)}; } + datastore::kvdb::InvertedIndex log_topics_inverted_index() const { return {database.inverted_index(kInvIdxNameLogTopics)}; } + datastore::kvdb::InvertedIndex traces_from_inverted_index() const { return {database.inverted_index(kInvIdxNameTracesFrom)}; } + datastore::kvdb::InvertedIndex traces_to_inverted_index() const { return {database.inverted_index(kInvIdxNameTracesTo)}; } }; } // namespace silkworm::db::state diff --git a/silkworm/db/test_util/temp_chain_data.hpp b/silkworm/db/test_util/temp_chain_data.hpp index 2923e8bc42..ac1dcf465a 100644 --- a/silkworm/db/test_util/temp_chain_data.hpp +++ b/silkworm/db/test_util/temp_chain_data.hpp @@ -88,10 +88,7 @@ class TempChainDataStore : public TempChainData { TempChainDataStore() : data_store_{ move_env(), - blocks::make_blocks_repository( - data_dir_.snapshots().path()), - state::make_state_repository( - data_dir_.snapshots().path()), + data_dir_.snapshots().path(), } {} ~TempChainDataStore() override { // need to destroy a started RWTxn in the base class before destroying env_managed inside the data_store_ @@ -102,10 +99,10 @@ class TempChainDataStore : public TempChainData { db::DataStore* operator->() { return &data_store_; } datastore::kvdb::ROAccess chaindata() const override { - return data_store_.chaindata(); + return data_store_.chaindata().access_ro(); } datastore::kvdb::RWAccess chaindata_rw() const override { - return data_store_.chaindata_rw(); + return data_store_.chaindata().access_rw(); } db::DataModelFactory data_model_factory() { diff --git a/silkworm/db/test_util/test_database_context.hpp b/silkworm/db/test_util/test_database_context.hpp index 8ae9257527..7ff763280a 100644 --- a/silkworm/db/test_util/test_database_context.hpp +++ b/silkworm/db/test_util/test_database_context.hpp @@ -66,10 +66,7 @@ class TestDataStore : public TestDatabaseContext { : TestDatabaseContext{tmp_dir}, data_store_{ move_env(), - blocks::make_blocks_repository( - DataDirectory{tmp_dir.path(), true}.snapshots().path()), - state::make_state_repository( - DataDirectory{tmp_dir.path(), false}.snapshots().path()), + DataDirectory{tmp_dir.path(), true}.snapshots().path(), } {} ~TestDataStore() override = default; @@ -77,10 +74,10 @@ class TestDataStore : public TestDatabaseContext { db::DataStore* operator->() { return &data_store_; } datastore::kvdb::ROAccess chaindata() const override { - return data_store_.chaindata(); + return data_store_.chaindata().access_ro(); } datastore::kvdb::RWAccess chaindata_rw() const override { - return data_store_.chaindata_rw(); + return data_store_.chaindata().access_rw(); } db::DataModelFactory data_model_factory() { diff --git a/silkworm/execution/local_state.hpp b/silkworm/execution/local_state.hpp index a17126ee02..2d84f6806f 100644 --- a/silkworm/execution/local_state.hpp +++ b/silkworm/execution/local_state.hpp @@ -36,7 +36,7 @@ class LocalState : public State { explicit LocalState(std::optional block_num, std::optional txn_id, db::DataStoreRef data_store) : block_num_{block_num}, txnid_{txn_id}, - txn_{data_store.chaindata.start_ro_tx()}, + txn_{data_store.chaindata.access_ro().start_ro_tx()}, data_model_{txn_, data_store.blocks_repository} {} std::optional read_account(const evmc::address& address) const noexcept override; diff --git a/silkworm/node/node.cpp b/silkworm/node/node.cpp index 54509b65a9..73ddcbd196 100644 --- a/silkworm/node/node.cpp +++ b/silkworm/node/node.cpp @@ -197,7 +197,7 @@ NodeImpl::NodeImpl( data_model_factory(), make_log_timer_factory(context_pool.any_executor(), settings_.node_settings.sync_loop_log_interval_seconds), make_stages_factory(settings_.node_settings, data_model_factory(), *this), - data_store_.chaindata_rw(), + data_store_.chaindata().access_rw(), }, execution_service_{std::make_shared(execution_engine_, execution_ioc_)}, execution_server_{make_execution_server_settings(settings_.node_settings.exec_api_address), execution_service_}, @@ -215,7 +215,7 @@ NodeImpl::NodeImpl( settings.node_settings.remote_sentry_addresses, context_pool.as_executor_pool(), context_pool, - make_sentry_eth_status_data_provider(data_store_.chaindata(), chain_config()))}, + make_sentry_eth_status_data_provider(data_store_.chaindata().access_ro(), chain_config()))}, chain_sync_{ context_pool.any_executor(), data_store(), @@ -226,7 +226,7 @@ NodeImpl::NodeImpl( make_sync_engine_rpc_settings(settings.rpcdaemon_settings, settings.log_settings.log_verbosity), }, resource_usage_log_{*settings_.node_settings.data_directory} { - backend_ = std::make_unique(settings_.node_settings, data_store_.chaindata(), std::get<0>(sentry_)); + backend_ = std::make_unique(settings_.node_settings, data_store_.chaindata().access_ro(), std::get<0>(sentry_)); backend_->set_node_name(settings_.node_settings.build_info.node_name); backend_kv_rpc_server_ = std::make_unique(settings_.server_settings, *backend_); bittorrent_client_ = std::make_unique(settings_.snapshot_settings.bittorrent_settings); diff --git a/silkworm/node/stagedsync/stages_test.cpp b/silkworm/node/stagedsync/stages_test.cpp index 1b58190b17..91a8d4fc2b 100644 --- a/silkworm/node/stagedsync/stages_test.cpp +++ b/silkworm/node/stagedsync/stages_test.cpp @@ -91,7 +91,7 @@ TEST_CASE("Sync Stages") { node_settings.data_directory->snapshots().path(), }; - auto txn = data_store.chaindata_rw().start_rw_tx(); + auto txn = data_store.chaindata().access_rw().start_rw_tx(); table::check_or_create_chaindata_tables(txn); txn.commit_and_renew(); const auto initial_tx_sequence{read_map_sequence(txn, table::kBlockTransactions.name)}; diff --git a/silkworm/rpc/daemon.cpp b/silkworm/rpc/daemon.cpp index 11af1d059f..ae70d0d106 100644 --- a/silkworm/rpc/daemon.cpp +++ b/silkworm/rpc/daemon.cpp @@ -138,7 +138,7 @@ int Daemon::run(const DaemonSettings& settings) { }); // At startup check that chain configuration is valid - datastore::kvdb::ROTxnManaged ro_txn = data_store->chaindata().start_ro_tx(); + datastore::kvdb::ROTxnManaged ro_txn = data_store->chaindata().access_ro().start_ro_tx(); db::DataModel data_access = db::DataModelFactory{data_store->ref()}(ro_txn); if (const auto chain_config{data_access.read_chain_config()}; !chain_config) { throw std::runtime_error{"invalid chain configuration"}; @@ -353,7 +353,7 @@ void Daemon::start() { // Put the interface logs into the data folder std::filesystem::path data_folder{}; if (data_store_) { - datastore::kvdb::RWAccess& chaindata = data_store_->chaindata; + datastore::kvdb::RWAccess chaindata = data_store_->chaindata.access_rw(); mdbx::env& chaindata_env = *chaindata; auto chaindata_path = chaindata_env.get_path(); // Trick to remove any empty filename because MDBX chaindata path ends with '/' diff --git a/silkworm/sync/internals/header_retrieval_test.cpp b/silkworm/sync/internals/header_retrieval_test.cpp index b3657228f1..e23a9fa166 100644 --- a/silkworm/sync/internals/header_retrieval_test.cpp +++ b/silkworm/sync/internals/header_retrieval_test.cpp @@ -28,7 +28,7 @@ TEST_CASE("HeaderRetrieval") { context.add_genesis_data(); context.commit_txn(); - datastore::kvdb::ROTxnManaged tx = context->chaindata().start_ro_tx(); + datastore::kvdb::ROTxnManaged tx = context->chaindata().access_ro().start_ro_tx(); db::DataModel data_model = context.data_model_factory()(tx); HeaderRetrieval header_retrieval{data_model}; diff --git a/silkworm/sync/messages/inbound_get_block_bodies.cpp b/silkworm/sync/messages/inbound_get_block_bodies.cpp index 5a3235c2c1..233b5a51ac 100644 --- a/silkworm/sync/messages/inbound_get_block_bodies.cpp +++ b/silkworm/sync/messages/inbound_get_block_bodies.cpp @@ -40,7 +40,7 @@ void InboundGetBlockBodies::execute(db::DataStoreRef db, HeaderChain&, BodySeque if (bs.max_block_in_output() == 0) return; - datastore::kvdb::ROTxnManaged tx = db.chaindata.start_ro_tx(); + datastore::kvdb::ROTxnManaged tx = db.chaindata.access_ro().start_ro_tx(); BodyRetrieval body_retrieval{tx}; BlockBodiesPacket66 reply; diff --git a/silkworm/sync/messages/inbound_get_block_headers.cpp b/silkworm/sync/messages/inbound_get_block_headers.cpp index eaedbe277e..b6b951d6d9 100644 --- a/silkworm/sync/messages/inbound_get_block_headers.cpp +++ b/silkworm/sync/messages/inbound_get_block_headers.cpp @@ -40,7 +40,7 @@ void InboundGetBlockHeaders::execute(db::DataStoreRef db, HeaderChain&, BodySequ if (bs.max_block_in_output() == 0) // skip requests in the first sync even if we already saved some headers return; - datastore::kvdb::ROTxnManaged tx = db.chaindata.start_ro_tx(); + datastore::kvdb::ROTxnManaged tx = db.chaindata.access_ro().start_ro_tx(); db::DataModel data_model{tx, db.blocks_repository}; HeaderRetrieval header_retrieval(data_model); From 6e9e13e5a73965e6b7e51077f25e8bd4e44823ce Mon Sep 17 00:00:00 2001 From: Sixtysixter <20945591+Sixtysixter@users.noreply.github.com> Date: Fri, 13 Dec 2024 10:57:09 +0100 Subject: [PATCH 08/48] rpcdaemon: refactor OtsRpcApi::collect_transactions_with_receipts (#2588) --- silkworm/rpc/commands/ots_api.cpp | 49 +++++++++++-------------------- 1 file changed, 17 insertions(+), 32 deletions(-) diff --git a/silkworm/rpc/commands/ots_api.cpp b/silkworm/rpc/commands/ots_api.cpp index 2946e377dc..a539695daa 100644 --- a/silkworm/rpc/commands/ots_api.cpp +++ b/silkworm/rpc/commands/ots_api.cpp @@ -862,49 +862,36 @@ Task OtsRpcApi::collect_transactions_with_receipts( std::map receipts; std::optional block_info; - auto block_num_changed = false; - auto it = db::kv::api::set_union(std::move(it_from), std::move(it_to), ascending); + auto paginated_stream = db::kv::api::set_union(std::move(it_from), std::move(it_to), ascending); + auto txn_nums_it = db::txn::make_txn_nums_stream(std::move(paginated_stream), ascending, tx, provider); const auto chain_storage = tx.create_storage(); - while (const auto value = co_await it->next()) { - const auto txn_id = static_cast(*value); - const auto block_num_opt = co_await db::txn::block_num_from_tx_num(tx, txn_id, provider); - if (!block_num_opt) { - SILK_DEBUG << "No block found for txn_id " << txn_id; - break; - } - const auto block_num = block_num_opt.value(); - const auto max_txn_id = co_await db::txn::max_tx_num(tx, block_num, provider); - const auto min_txn_id = co_await db::txn::min_tx_num(tx, block_num, provider); - const auto txn_index = txn_id - min_txn_id - 1; + while (const auto tnx_nums = co_await txn_nums_it->next()) { SILK_DEBUG - << "txn_id: " << txn_id - << " block_num: " << block_num - << ", txn_index: " << txn_index - << ", max_txn_id: " << max_txn_id - << ", min_txn_id: " << min_txn_id - << ", final txn: " << (txn_id == max_txn_id) - << ", ascending: " << ascending; - - if (txn_id == max_txn_id) { + << "txn_id: " << tnx_nums->txn_id + << " block_num: " << tnx_nums->block_num + << ", txn_index: " << tnx_nums->txn_index + << ", final txn: " << tnx_nums->final_txn + << ", ascending: " << std::boolalpha << ascending; + + if (tnx_nums->final_txn) { continue; } - block_num_changed = false; - if (block_info && (block_info->block_num != block_num)) { + if (tnx_nums->block_changed) { block_info.reset(); } if (!block_info) { - const auto block_with_hash = co_await rpc::core::read_block_by_number(*block_cache_, *chain_storage, block_num); + const auto block_with_hash = co_await rpc::core::read_block_by_number(*block_cache_, *chain_storage, tnx_nums->block_num); if (!block_with_hash) { - SILK_DEBUG << "Not found block no. " << block_num; + SILK_DEBUG << "Not found block no. " << tnx_nums->block_num; co_return results; } auto rr = co_await core::get_receipts(tx, *block_with_hash, *chain_storage, workers_); - SILK_DEBUG << "Read #" << rr.size() << " receipts from block " << block_num; + SILK_DEBUG << "Read #" << rr.size() << " receipts from block " << tnx_nums->block_num; std::for_each(rr.begin(), rr.end(), [&receipts](const auto& item) { receipts[silkworm::to_hex(item.tx_hash, false)] = std::move(item); @@ -916,10 +903,8 @@ Task OtsRpcApi::collect_transactions_with_receipts( block_with_hash->block.transactions.size(), block_with_hash->block.ommers, block_with_hash->block.withdrawals}; block_info = BlockInfo{block_with_hash->block.header.number, block_details}; - block_num_changed = true; } - - if (results.transactions.size() >= page_size && block_num_changed) { + if (results.transactions.size() >= page_size && tnx_nums->block_changed) { if (ascending) { results.first_page = false; } else { @@ -928,9 +913,9 @@ Task OtsRpcApi::collect_transactions_with_receipts( break; } - auto transaction = co_await chain_storage->read_transaction_by_idx_in_block(block_num, txn_index); + const auto transaction = co_await chain_storage->read_transaction_by_idx_in_block(tnx_nums->block_num, tnx_nums->txn_index); if (!transaction) { - SILK_DEBUG << "No transaction found in block " << block_num << " for index " << txn_index; + SILK_DEBUG << "No transaction found in block " << tnx_nums->block_num << " for index " << tnx_nums->txn_index; co_return results; } results.receipts.push_back(std::move(receipts.at(silkworm::to_hex(transaction.value().hash(), false)))); From 94b52fbd0d465c934c4bf209aad2c7c5311b5281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 13 Dec 2024 14:30:43 +0100 Subject: [PATCH 09/48] evm: add flag to execute in evmone APIv2 (#2589) --- cmd/dev/check_changes.cpp | 2 +- cmd/dev/scan_txs.cpp | 2 +- cmd/state-transition/state_transition.cpp | 2 +- silkworm/core/execution/execution.hpp | 2 +- silkworm/core/execution/execution_test.cpp | 2 +- silkworm/core/execution/processor.cpp | 4 ++-- silkworm/core/execution/processor.hpp | 6 +++++- silkworm/core/execution/processor_test.cpp | 10 +++++----- silkworm/core/protocol/blockchain.cpp | 2 +- silkworm/db/test_util/test_database_context.cpp | 2 +- silkworm/node/execution/block/block_executor.cpp | 2 +- silkworm/rpc/core/evm_executor.hpp | 2 +- 12 files changed, 21 insertions(+), 17 deletions(-) diff --git a/cmd/dev/check_changes.cpp b/cmd/dev/check_changes.cpp index 7243ba489b..8c58ca8778 100644 --- a/cmd/dev/check_changes.cpp +++ b/cmd/dev/check_changes.cpp @@ -131,7 +131,7 @@ int main(int argc, char* argv[]) { db::Buffer buffer{txn, std::make_unique(access_layer)}; buffer.set_historical_block(block_num); - ExecutionProcessor processor{block, *rule_set, buffer, *chain_config}; + ExecutionProcessor processor{block, *rule_set, buffer, *chain_config, false}; processor.evm().analysis_cache = &analysis_cache; if (const ValidationResult res = processor.execute_block(receipts); res != ValidationResult::kOk) { diff --git a/cmd/dev/scan_txs.cpp b/cmd/dev/scan_txs.cpp index a56e86f07b..e527ec6448 100644 --- a/cmd/dev/scan_txs.cpp +++ b/cmd/dev/scan_txs.cpp @@ -91,7 +91,7 @@ int main(int argc, char* argv[]) { db::Buffer buffer{txn, std::make_unique(txn)}; buffer.set_historical_block(block_num); - ExecutionProcessor processor{block, *rule_set, buffer, *chain_config}; + ExecutionProcessor processor{block, *rule_set, buffer, *chain_config, false}; processor.evm().analysis_cache = &analysis_cache; // Execute the block and retrieve the receipts diff --git a/cmd/state-transition/state_transition.cpp b/cmd/state-transition/state_transition.cpp index 8fd7a39884..648ea83702 100644 --- a/cmd/state-transition/state_transition.cpp +++ b/cmd/state-transition/state_transition.cpp @@ -290,7 +290,7 @@ void StateTransition::run() { auto block = get_block(state, config); auto txn = get_transaction(expected_sub_state); - ExecutionProcessor processor{block, *rule_set, state, config}; + ExecutionProcessor processor{block, *rule_set, state, config, false}; Receipt receipt; const evmc_revision rev{config.revision(block.header.number, block.header.timestamp)}; diff --git a/silkworm/core/execution/execution.hpp b/silkworm/core/execution/execution.hpp index 7c7ec5733e..a73c3f52a6 100644 --- a/silkworm/core/execution/execution.hpp +++ b/silkworm/core/execution/execution.hpp @@ -47,7 +47,7 @@ inline ValidationResult execute_block( if (!rule_set) { return ValidationResult::kUnknownProtocolRuleSet; } - ExecutionProcessor processor{block, *rule_set, state, chain_config}; + ExecutionProcessor processor{block, *rule_set, state, chain_config, false}; if (const ValidationResult res = processor.execute_block(receipts); res != ValidationResult::kOk) { return res; diff --git a/silkworm/core/execution/execution_test.cpp b/silkworm/core/execution/execution_test.cpp index 446871015c..5d8abda898 100644 --- a/silkworm/core/execution/execution_test.cpp +++ b/silkworm/core/execution/execution_test.cpp @@ -165,7 +165,7 @@ TEST_CASE("Execute block with tracing") { std::vector receipts; const auto rule_set{protocol::rule_set_factory(chain_config)}; REQUIRE(rule_set); - ExecutionProcessor processor{block, *rule_set, state, chain_config}; + ExecutionProcessor processor{block, *rule_set, state, chain_config, false}; BlockTracer block_tracer{}; processor.evm().add_tracer(block_tracer); diff --git a/silkworm/core/execution/processor.cpp b/silkworm/core/execution/processor.cpp index 9ff2c0801a..4b69d45d89 100644 --- a/silkworm/core/execution/processor.cpp +++ b/silkworm/core/execution/processor.cpp @@ -105,8 +105,8 @@ namespace { } // namespace ExecutionProcessor::ExecutionProcessor(const Block& block, protocol::RuleSet& rule_set, State& state, - const ChainConfig& config) - : state_{state}, rule_set_{rule_set}, evm_{block, state_, config} { + const ChainConfig& config, bool evm1_v2) + : state_{state}, rule_set_{rule_set}, evm_{block, state_, config}, evm1_v2_{evm1_v2} { evm_.beneficiary = rule_set.get_beneficiary(block.header); evm_.transfer = rule_set.transfer_func(); diff --git a/silkworm/core/execution/processor.hpp b/silkworm/core/execution/processor.hpp index 3a7e27265b..29d28ce286 100644 --- a/silkworm/core/execution/processor.hpp +++ b/silkworm/core/execution/processor.hpp @@ -35,7 +35,7 @@ class ExecutionProcessor { ExecutionProcessor(const ExecutionProcessor&) = delete; ExecutionProcessor& operator=(const ExecutionProcessor&) = delete; - ExecutionProcessor(const Block& block, protocol::RuleSet& rule_set, State& state, const ChainConfig& config); + ExecutionProcessor(const Block& block, protocol::RuleSet& rule_set, State& state, const ChainConfig& config, bool evm1_v2); /** * Execute a transaction, but do not write to the DB yet. @@ -86,6 +86,10 @@ class ExecutionProcessor { protocol::RuleSet& rule_set_; EVM evm_; evmone::state::BlockInfo evm1_block_; + + //! Execute transactions using evmone APIv2 only and apply the result state diff to the state. + //! TODO: This flag currently has no effect. + bool evm1_v2_ = false; }; } // namespace silkworm diff --git a/silkworm/core/execution/processor_test.cpp b/silkworm/core/execution/processor_test.cpp index 27453644cb..dee0a19ae2 100644 --- a/silkworm/core/execution/processor_test.cpp +++ b/silkworm/core/execution/processor_test.cpp @@ -45,7 +45,7 @@ TEST_CASE("Zero gas price") { InMemoryState state; auto rule_set{protocol::rule_set_factory(kMainnetConfig)}; - ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig}; + ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, false}; Receipt receipt; processor.execute_transaction(txn, receipt); @@ -85,7 +85,7 @@ TEST_CASE("No refund on error") { InMemoryState state; auto rule_set{protocol::rule_set_factory(kMainnetConfig)}; - ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig}; + ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, false}; Transaction txn{}; txn.nonce = nonce; @@ -179,7 +179,7 @@ TEST_CASE("Self-destruct") { InMemoryState state; auto rule_set{protocol::rule_set_factory(kMainnetConfig)}; - ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig}; + ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, false}; processor.evm().state().add_to_balance(originator, kEther); processor.evm().state().set_code(caller_address, caller_code); @@ -327,7 +327,7 @@ TEST_CASE("Out of Gas during account re-creation") { txn.set_sender(caller); auto rule_set{protocol::rule_set_factory(kMainnetConfig)}; - ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig}; + ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, false}; processor.evm().state().add_to_balance(caller, kEther); Receipt receipt; @@ -370,7 +370,7 @@ TEST_CASE("Empty suicide beneficiary") { InMemoryState state; auto rule_set{protocol::rule_set_factory(kMainnetConfig)}; - ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig}; + ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, false}; processor.evm().state().add_to_balance(caller, kEther); Receipt receipt; diff --git a/silkworm/core/protocol/blockchain.cpp b/silkworm/core/protocol/blockchain.cpp index 90a574e090..7452c22afa 100644 --- a/silkworm/core/protocol/blockchain.cpp +++ b/silkworm/core/protocol/blockchain.cpp @@ -89,7 +89,7 @@ ValidationResult Blockchain::insert_block(Block& block, bool check_state_root) { } ValidationResult Blockchain::execute_block(const Block& block, bool check_state_root) { - ExecutionProcessor processor{block, *rule_set_, state_, config_}; + ExecutionProcessor processor{block, *rule_set_, state_, config_, false}; processor.evm().exo_evm = exo_evm; if (const ValidationResult res = processor.execute_block(receipts_); res != ValidationResult::kOk) { diff --git a/silkworm/db/test_util/test_database_context.cpp b/silkworm/db/test_util/test_database_context.cpp index f832d46cb9..3a9fa80136 100644 --- a/silkworm/db/test_util/test_database_context.cpp +++ b/silkworm/db/test_util/test_database_context.cpp @@ -128,7 +128,7 @@ void populate_blocks(RWTxn& txn, const std::filesystem::path& tests_dir, InMemor // FIX 4b: populate receipts and logs table std::vector receipts; - ExecutionProcessor processor{block, *rule_set, state_buffer, *chain_config}; + ExecutionProcessor processor{block, *rule_set, state_buffer, *chain_config, false}; Buffer db_buffer{txn, std::make_unique(txn)}; for (auto& block_txn : block.transactions) { silkworm::Receipt receipt{}; diff --git a/silkworm/node/execution/block/block_executor.cpp b/silkworm/node/execution/block/block_executor.cpp index d043209282..e2cd5f1ce1 100644 --- a/silkworm/node/execution/block/block_executor.cpp +++ b/silkworm/node/execution/block/block_executor.cpp @@ -32,7 +32,7 @@ BlockExecutor::BlockExecutor(const ChainConfig* chain_config, bool write_receipt write_change_sets_{write_change_sets} {} ValidationResult BlockExecutor::execute_single(const Block& block, db::Buffer& state_buffer, AnalysisCache& analysis_cache) { - ExecutionProcessor processor{block, *protocol_rule_set_, state_buffer, *chain_config_}; + ExecutionProcessor processor{block, *protocol_rule_set_, state_buffer, *chain_config_, false}; processor.evm().analysis_cache = &analysis_cache; CallTraces traces; diff --git a/silkworm/rpc/core/evm_executor.hpp b/silkworm/rpc/core/evm_executor.hpp index 5bca1a63d5..b40944e2b4 100644 --- a/silkworm/rpc/core/evm_executor.hpp +++ b/silkworm/rpc/core/evm_executor.hpp @@ -103,7 +103,7 @@ class EVMExecutor { workers_{workers}, state_{std::move(state)}, rule_set_{protocol::rule_set_factory(config)}, - execution_processor_{block, *rule_set_, *state_, config} { + execution_processor_{block, *rule_set_, *state_, config, false} { SILKWORM_ASSERT(rule_set_); if (!has_service(workers_)) { make_service(workers_); From c20c94906763750474a0c791902774d764f6e476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 13 Dec 2024 16:51:14 +0100 Subject: [PATCH 10/48] evm: apply state diff from evmone APIv2 if enabled (#2590) --- silkworm/core/execution/execution_test.cpp | 2 +- silkworm/core/execution/processor.cpp | 25 ++++++++++++++++++++++ silkworm/core/execution/processor_test.cpp | 10 ++++----- silkworm/core/state/intra_block_state.hpp | 1 + 4 files changed, 32 insertions(+), 6 deletions(-) diff --git a/silkworm/core/execution/execution_test.cpp b/silkworm/core/execution/execution_test.cpp index 5d8abda898..638f7a5559 100644 --- a/silkworm/core/execution/execution_test.cpp +++ b/silkworm/core/execution/execution_test.cpp @@ -165,7 +165,7 @@ TEST_CASE("Execute block with tracing") { std::vector receipts; const auto rule_set{protocol::rule_set_factory(chain_config)}; REQUIRE(rule_set); - ExecutionProcessor processor{block, *rule_set, state, chain_config, false}; + ExecutionProcessor processor{block, *rule_set, state, chain_config, true}; BlockTracer block_tracer{}; processor.evm().add_tracer(block_tracer); diff --git a/silkworm/core/execution/processor.cpp b/silkworm/core/execution/processor.cpp index 4b69d45d89..168c5c5445 100644 --- a/silkworm/core/execution/processor.cpp +++ b/silkworm/core/execution/processor.cpp @@ -180,6 +180,31 @@ void ExecutionProcessor::execute_transaction(const Transaction& txn, Receipt& re receipt.logs.emplace_back(Log{addr, std::move(topics), std::move(data)}); receipt.bloom = logs_bloom(receipt.logs); + if (evm1_v2_) { + // Apply the state diff produced by evmone APIv2 to the state and skip the Silkworm execution. + const auto& state_diff = evm1_receipt.state_diff; + for (const auto& m : state_diff.modified_accounts) { + if (!m.code.empty()) { + state_.create_contract(m.addr); + state_.set_code(m.addr, m.code); + } + + auto& acc = state_.get_or_create_object(m.addr); + acc.current->nonce = m.nonce; + acc.current->balance = m.balance; + + auto& storage = state_.storage_[m.addr]; + for (const auto& [k, v] : m.modified_storage) { + storage.committed[k].original = v; + } + } + + for (const auto& a : state_diff.deleted_accounts) { + state_.destruct(a); + } + return; + } + state_.clear_journal_and_substate(); const std::optional sender{txn.sender()}; diff --git a/silkworm/core/execution/processor_test.cpp b/silkworm/core/execution/processor_test.cpp index dee0a19ae2..6d7929adb1 100644 --- a/silkworm/core/execution/processor_test.cpp +++ b/silkworm/core/execution/processor_test.cpp @@ -45,7 +45,7 @@ TEST_CASE("Zero gas price") { InMemoryState state; auto rule_set{protocol::rule_set_factory(kMainnetConfig)}; - ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, false}; + ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, true}; Receipt receipt; processor.execute_transaction(txn, receipt); @@ -85,7 +85,7 @@ TEST_CASE("No refund on error") { InMemoryState state; auto rule_set{protocol::rule_set_factory(kMainnetConfig)}; - ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, false}; + ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, true}; Transaction txn{}; txn.nonce = nonce; @@ -179,7 +179,7 @@ TEST_CASE("Self-destruct") { InMemoryState state; auto rule_set{protocol::rule_set_factory(kMainnetConfig)}; - ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, false}; + ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, true}; processor.evm().state().add_to_balance(originator, kEther); processor.evm().state().set_code(caller_address, caller_code); @@ -327,7 +327,7 @@ TEST_CASE("Out of Gas during account re-creation") { txn.set_sender(caller); auto rule_set{protocol::rule_set_factory(kMainnetConfig)}; - ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, false}; + ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, true}; processor.evm().state().add_to_balance(caller, kEther); Receipt receipt; @@ -370,7 +370,7 @@ TEST_CASE("Empty suicide beneficiary") { InMemoryState state; auto rule_set{protocol::rule_set_factory(kMainnetConfig)}; - ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, false}; + ExecutionProcessor processor{block, *rule_set, state, kMainnetConfig, true}; processor.evm().state().add_to_balance(caller, kEther); Receipt receipt; diff --git a/silkworm/core/state/intra_block_state.hpp b/silkworm/core/state/intra_block_state.hpp index 8d4fd80cec..c413fba86a 100644 --- a/silkworm/core/state/intra_block_state.hpp +++ b/silkworm/core/state/intra_block_state.hpp @@ -133,6 +133,7 @@ class IntraBlockState { friend class state::AccountAccessDelta; friend class state::TransientStorageChangeDelta; friend class StateView; + friend class ExecutionProcessor; evmc::bytes32 get_storage(const evmc::address& address, const evmc::bytes32& key, bool original) const noexcept; From 338fd894dc505656a6934e8021ff1d9dae6ebece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 13 Dec 2024 19:48:58 +0100 Subject: [PATCH 11/48] test: enable evmone APIv2 for cmd/test/ethereum (#2591) --- cmd/test/ethereum.cpp | 2 ++ silkworm/core/protocol/blockchain.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/test/ethereum.cpp b/cmd/test/ethereum.cpp index c548387253..03a243aa88 100644 --- a/cmd/test/ethereum.cpp +++ b/cmd/test/ethereum.cpp @@ -69,6 +69,8 @@ static const std::array kFailingTests{ // in the result the non-empty storage remains unchanged. // This scenarion don't happen in real networks. The desired behavior for implementations // is still being discussed. + kBlockchainDir / "GeneralStateTests" / "stCreate2" / "create2collisionStorage.json", + kBlockchainDir / "GeneralStateTests" / "stCreate2" / "create2collisionStorageParis.json", kBlockchainDir / "GeneralStateTests" / "stCreate2" / "RevertInCreateInInitCreate2.json", kBlockchainDir / "GeneralStateTests" / "stCreate2" / "RevertInCreateInInitCreate2Paris.json", kBlockchainDir / "GeneralStateTests" / "stRevertTest" / "RevertInCreateInInit.json", diff --git a/silkworm/core/protocol/blockchain.cpp b/silkworm/core/protocol/blockchain.cpp index 7452c22afa..d4ee7d50e1 100644 --- a/silkworm/core/protocol/blockchain.cpp +++ b/silkworm/core/protocol/blockchain.cpp @@ -89,7 +89,7 @@ ValidationResult Blockchain::insert_block(Block& block, bool check_state_root) { } ValidationResult Blockchain::execute_block(const Block& block, bool check_state_root) { - ExecutionProcessor processor{block, *rule_set_, state_, config_, false}; + ExecutionProcessor processor{block, *rule_set_, state_, config_, true}; processor.evm().exo_evm = exo_evm; if (const ValidationResult res = processor.execute_block(receipts_); res != ValidationResult::kOk) { From eb63c0e854c1ef97bde2858940e29302d19ccfe9 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com> Date: Fri, 13 Dec 2024 23:24:30 +0100 Subject: [PATCH 12/48] rpcdaemon: remove methods in db::chain namespace (#2595) --- .github/workflows/rpc-integration-tests.yml | 2 +- silkworm/db/chain/chain.cpp | 26 ----- silkworm/db/chain/chain.hpp | 4 - silkworm/db/chain/chain_test.cpp | 112 -------------------- silkworm/db/chain/remote_chain_storage.cpp | 15 ++- silkworm/rpc/core/block_reader.cpp | 7 ++ silkworm/rpc/core/block_reader.hpp | 2 + silkworm/rpc/core/logs_walker.cpp | 2 +- 8 files changed, 25 insertions(+), 145 deletions(-) delete mode 100644 silkworm/db/chain/chain_test.cpp diff --git a/.github/workflows/rpc-integration-tests.yml b/.github/workflows/rpc-integration-tests.yml index 328d4e4590..61035ca934 100644 --- a/.github/workflows/rpc-integration-tests.yml +++ b/.github/workflows/rpc-integration-tests.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git -c advice.detachedHead=false clone --depth 1 --branch v1.25.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v1.26.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests pip3 install -r requirements.txt --break-system-packages diff --git a/silkworm/db/chain/chain.cpp b/silkworm/db/chain/chain.cpp index 9017b1fa6f..ff39f1effa 100644 --- a/silkworm/db/chain/chain.cpp +++ b/silkworm/db/chain/chain.cpp @@ -31,32 +31,6 @@ namespace silkworm::db::chain { -Task read_header_number(kv::api::Transaction& tx, const evmc::bytes32& block_hash) { - const ByteView block_hash_bytes{block_hash.bytes, kHashLength}; - const auto value{co_await tx.get_one(table::kHeaderNumbersName, block_hash_bytes)}; - if (value.empty()) { - throw std::invalid_argument{"empty block number value in read_header_number"}; - } - co_return endian::load_big_u64(value.data()); -} - -Task> read_total_difficulty(kv::api::Transaction& tx, const evmc::bytes32& block_hash, uint64_t block_num) { - const auto block_key = db::block_key(block_num, block_hash.bytes); - SILK_TRACE << "read_total_difficulty block_key: " << to_hex(block_key); - const auto result{co_await tx.get_one(table::kDifficultyName, block_key)}; - if (result.empty()) { - co_return std::nullopt; - } - ByteView value{result}; - intx::uint256 total_difficulty{0}; - auto decoding_result{rlp::decode(value, total_difficulty)}; - if (!decoding_result) { - throw std::runtime_error{"cannot RLP-decode total difficulty value in read_total_difficulty"}; - } - SILK_DEBUG << "read_total_difficulty canonical total difficulty: " << total_difficulty; - co_return total_difficulty; -} - Task read_head_header_hash(kv::api::Transaction& tx) { const auto value = co_await tx.get_one(table::kHeadHeaderName, string_to_bytes(table::kHeadHeaderName)); if (value.empty()) { diff --git a/silkworm/db/chain/chain.hpp b/silkworm/db/chain/chain.hpp index e66e1dc2b3..50536cdfad 100644 --- a/silkworm/db/chain/chain.hpp +++ b/silkworm/db/chain/chain.hpp @@ -31,10 +31,6 @@ namespace silkworm::db::chain { using Transactions = std::vector; -Task read_header_number(kv::api::Transaction& tx, const evmc::bytes32& block_hash); - -Task> read_total_difficulty(kv::api::Transaction& tx, const evmc::bytes32& block_hash, BlockNum block_num); - Task read_head_header_hash(kv::api::Transaction& tx); } // namespace silkworm::db::chain diff --git a/silkworm/db/chain/chain_test.cpp b/silkworm/db/chain/chain_test.cpp deleted file mode 100644 index 575baabf38..0000000000 --- a/silkworm/db/chain/chain_test.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* - Copyright 2023 The Silkworm Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "chain.hpp" - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace silkworm::db::chain { - -using Catch::Matchers::Message; -using testing::_; -using testing::InvokeWithoutArgs; -using testing::Unused; - -static Bytes kNumber{*from_hex("00000000003D0900")}; -static Bytes kBlockHash{*from_hex("439816753229fc0736bf86a5048de4bc9fcdede8c91dadf88c828c76b2281dff")}; -static Bytes kHeader{*from_hex( - "f9025ca0209f062567c161c5f71b3f57a7de277b0e95c3455050b152d785ad" - "7524ef8ee7a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000" - "000000000a0e7536c5b61ed0e0ab7f3ce7f085806d40f716689c0c086676757de401b595658a040be247314d834a319556d1dcf458e87" - "07cc1aa4a416b6118474ce0c96fccb1aa07862fe11d10a9b237ffe9cb660f31e4bc4be66836c9bfc17310d47c60d75671fb9010000000" - "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - "0000000000000000000000000000000000000000000000000000000000000000000000001833d0900837a1200831e784b845fe880abb8" - "61d88301091a846765746888676f312e31352e36856c696e757800000000000000be009d0049d6f0ee8ca6764a1d3eb519bd4d046e167" - "ddcab467d5db31d063f2d58f266fa86c4502aa169d17762090e92b821843de69b41adbb5d86f5d114ba7f01a000000000000000000000" - "00000000000000000000000000000000000000000000880000000000000000")}; -static Bytes kBody{*from_hex("c68369e45a03c0")}; - -struct ChainTest : public silkworm::test_util::ContextTestBase { - test_util::MockTransaction transaction; -}; - -TEST_CASE_METHOD(ChainTest, "read_header_number") { - SECTION("existent hash") { - EXPECT_CALL(transaction, get_one(table::kHeaderNumbersName, _)).WillOnce(InvokeWithoutArgs([]() -> Task { co_return kNumber; })); - const evmc::bytes32 block_hash{0x439816753229fc0736bf86a5048de4bc9fcdede8c91dadf88c828c76b2281dff_bytes32}; - const auto header_number = spawn_and_wait(read_header_number(transaction, block_hash)); - CHECK(header_number == 4'000'000); - } - - SECTION("non-existent hash") { - EXPECT_CALL(transaction, get_one(table::kHeaderNumbersName, _)).WillOnce(InvokeWithoutArgs([]() -> Task { - co_return Bytes{}; - })); - const evmc::bytes32 block_hash{0x0000000000000000000000000000000000000000000000000000000000000000_bytes32}; - auto result = spawn(read_header_number(transaction, block_hash)); -#ifdef SILKWORM_SANITIZE // Avoid comparison against exception message: it triggers a TSAN data race seemingly related to libstdc++ string implementation - CHECK_THROWS_AS(result.get(), std::invalid_argument); -#else - CHECK_THROWS_MATCHES(result.get(), std::invalid_argument, Message("empty block number value in read_header_number")); -#endif // SILKWORM_SANITIZE - } -} - -TEST_CASE_METHOD(ChainTest, "read_total_difficulty") { - SECTION("empty RLP buffer") { - EXPECT_CALL(transaction, get_one(table::kDifficultyName, _)).WillOnce(InvokeWithoutArgs([]() -> Task { - co_return Bytes{}; - })); - evmc::bytes32 block_hash{0xd268bdabee5eab4914d0de9b0e0071364582cfb3c952b19727f1ab429f4ba2a8_bytes32}; - const uint64_t block_num{4'000'000}; - CHECK(spawn_and_wait(read_total_difficulty(transaction, block_hash, block_num)) == std::nullopt); - } - - SECTION("invalid RLP buffer") { - EXPECT_CALL(transaction, get_one(table::kDifficultyName, _)).WillOnce(InvokeWithoutArgs([]() -> Task { - co_return *from_hex("000102"); - })); - evmc::bytes32 block_hash{0xd268bdabee5eab4914d0de9b0e0071364582cfb3c952b19727f1ab429f4ba2a8_bytes32}; - uint64_t block_num{4'000'000}; - CHECK_THROWS_AS(spawn_and_wait(read_total_difficulty(transaction, block_hash, block_num)), std::runtime_error); - } - - SECTION("valid total difficulty") { - EXPECT_CALL(transaction, get_one(table::kDifficultyName, _)).WillOnce(InvokeWithoutArgs([]() -> Task { - co_return *from_hex("8360c7cc"); - })); - evmc::bytes32 block_hash{0xd268bdabee5eab4914d0de9b0e0071364582cfb3c952b19727f1ab429f4ba2a8_bytes32}; - uint64_t block_num{4'306'300}; - const auto total_difficulty = spawn_and_wait(read_total_difficulty(transaction, block_hash, block_num)); - CHECK(total_difficulty == 6'342'604 /*0x60c7cc*/); - } -} - -} // namespace silkworm::db::chain diff --git a/silkworm/db/chain/remote_chain_storage.cpp b/silkworm/db/chain/remote_chain_storage.cpp index f89b96cbea..57c6b43294 100644 --- a/silkworm/db/chain/remote_chain_storage.cpp +++ b/silkworm/db/chain/remote_chain_storage.cpp @@ -204,7 +204,20 @@ Task RemoteChainStorage::read_rlp_transaction(const evmc::bytes32& /*txn_h } Task> RemoteChainStorage::read_total_difficulty(const Hash& hash, BlockNum block_num) const { - co_return co_await db::chain::read_total_difficulty(tx_, hash, block_num); + const auto block_key = db::block_key(block_num, hash.bytes); + SILK_TRACE << "read_total_difficulty block_key: " << to_hex(block_key); + const auto result{co_await tx_.get_one(table::kDifficultyName, block_key)}; + if (result.empty()) { + co_return std::nullopt; + } + ByteView value{result}; + intx::uint256 total_difficulty{0}; + auto decoding_result{rlp::decode(value, total_difficulty)}; + if (!decoding_result) { + throw std::runtime_error{"cannot RLP-decode total difficulty value in read_total_difficulty"}; + } + SILK_DEBUG << "read_total_difficulty canonical total difficulty: " << total_difficulty; + co_return total_difficulty; } Task> RemoteChainStorage::read_block_num_by_transaction_hash(const evmc::bytes32& transaction_hash) const { diff --git a/silkworm/rpc/core/block_reader.cpp b/silkworm/rpc/core/block_reader.cpp index e26c90f00b..d1b3076269 100644 --- a/silkworm/rpc/core/block_reader.cpp +++ b/silkworm/rpc/core/block_reader.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -182,6 +183,12 @@ Task> BlockReader::get_block_num(const BlockNumOrHash& } } +Task BlockReader::get_block_num(const Hash& hash) { + auto bn = co_await chain_storage_.read_block_num(hash); + ensure(bn != 0, "get_block_num: block with hash not found"); + co_return *bn; +} + Task BlockReader::get_current_block_num() { co_return co_await stages::get_sync_stage_progress(transaction_, stages::kFinish); } diff --git a/silkworm/rpc/core/block_reader.hpp b/silkworm/rpc/core/block_reader.hpp index a30dcb39aa..fedb6923ef 100644 --- a/silkworm/rpc/core/block_reader.hpp +++ b/silkworm/rpc/core/block_reader.hpp @@ -61,6 +61,8 @@ class BlockReader { Task> get_block_num(const BlockNumOrHash& block_num_or_hash); + Task get_block_num(const Hash& hash); + Task get_current_block_num(); Task get_max_block_num(); diff --git a/silkworm/rpc/core/logs_walker.cpp b/silkworm/rpc/core/logs_walker.cpp index d9b1fc45a9..e4f22b2ae4 100644 --- a/silkworm/rpc/core/logs_walker.cpp +++ b/silkworm/rpc/core/logs_walker.cpp @@ -46,7 +46,7 @@ Task> LogsWalker::get_block_nums(const Filter& fil start = end = std::numeric_limits::max(); } else { auto block_hash = silkworm::to_bytes32(block_hash_bytes.value()); - auto block_num = co_await read_header_number(tx_, block_hash); + auto block_num = co_await block_reader_.get_block_num(block_hash); start = end = block_num; } } else { From bb62df80e718d5a4f8603dc457336e4eb5ed4a56 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com> Date: Sat, 14 Dec 2024 14:56:50 +0100 Subject: [PATCH 13/48] rpcdaemon: remove db::chain read header hash (#2600) --- silkworm/db/chain/chain.cpp | 44 -------------------- silkworm/db/chain/chain.hpp | 36 ---------------- silkworm/db/chain/chain_storage.hpp | 2 + silkworm/db/chain/local_chain_storage.cpp | 4 ++ silkworm/db/chain/local_chain_storage.hpp | 2 + silkworm/db/chain/remote_chain_storage.cpp | 19 ++++++++- silkworm/db/chain/remote_chain_storage.hpp | 4 ++ silkworm/db/test_util/mock_chain_storage.hpp | 2 + silkworm/rpc/commands/erigon_api.cpp | 6 +-- silkworm/rpc/core/logs_walker.cpp | 1 - 10 files changed, 32 insertions(+), 88 deletions(-) delete mode 100644 silkworm/db/chain/chain.cpp delete mode 100644 silkworm/db/chain/chain.hpp diff --git a/silkworm/db/chain/chain.cpp b/silkworm/db/chain/chain.cpp deleted file mode 100644 index ff39f1effa..0000000000 --- a/silkworm/db/chain/chain.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - Copyright 2023 The Silkworm Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "chain.hpp" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace silkworm::db::chain { - -Task read_head_header_hash(kv::api::Transaction& tx) { - const auto value = co_await tx.get_one(table::kHeadHeaderName, string_to_bytes(table::kHeadHeaderName)); - if (value.empty()) { - throw std::runtime_error{"empty head header hash value in read_head_header_hash"}; - } - const auto head_header_hash{to_bytes32(value)}; - SILK_DEBUG << "head header hash: " << to_hex(head_header_hash); - co_return head_header_hash; -} - -} // namespace silkworm::db::chain diff --git a/silkworm/db/chain/chain.hpp b/silkworm/db/chain/chain.hpp deleted file mode 100644 index 50536cdfad..0000000000 --- a/silkworm/db/chain/chain.hpp +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright 2023 The Silkworm Authors - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#pragma once - -#include - -#include - -#include -#include - -#include - -namespace silkworm::db::chain { - -// TODO(canepat) BlockReader or migrate to ChainStorage? - -using Transactions = std::vector; - -Task read_head_header_hash(kv::api::Transaction& tx); - -} // namespace silkworm::db::chain diff --git a/silkworm/db/chain/chain_storage.hpp b/silkworm/db/chain/chain_storage.hpp index 378219a9bb..4dd5ab9a72 100644 --- a/silkworm/db/chain/chain_storage.hpp +++ b/silkworm/db/chain/chain_storage.hpp @@ -90,6 +90,8 @@ class ChainStorage { virtual Task> read_block_num_by_transaction_hash(const evmc::bytes32& transaction_hash) const = 0; virtual Task> read_transaction_by_idx_in_block(BlockNum block_num, uint64_t txn_id) const = 0; + + virtual Task, std::optional>> read_head_header_and_hash() const = 0; }; } // namespace silkworm::db::chain diff --git a/silkworm/db/chain/local_chain_storage.cpp b/silkworm/db/chain/local_chain_storage.cpp index b650854d23..395566ae79 100644 --- a/silkworm/db/chain/local_chain_storage.cpp +++ b/silkworm/db/chain/local_chain_storage.cpp @@ -149,4 +149,8 @@ Task> LocalChainStorage::read_transaction_by_idx_in_b throw std::runtime_error{"not yet implemented"}; } +Task, std::optional>> LocalChainStorage::read_head_header_and_hash() const { + co_return data_model_.read_head_header_and_hash(); +} + } // namespace silkworm::db::chain diff --git a/silkworm/db/chain/local_chain_storage.hpp b/silkworm/db/chain/local_chain_storage.hpp index 7ef27919b4..0ba5bc3981 100644 --- a/silkworm/db/chain/local_chain_storage.hpp +++ b/silkworm/db/chain/local_chain_storage.hpp @@ -69,6 +69,8 @@ class LocalChainStorage : public ChainStorage { Task> read_block_num_by_transaction_hash(const evmc::bytes32& transaction_hash) const override; Task> read_transaction_by_idx_in_block(BlockNum block_num, uint64_t txn_id) const override; + Task, std::optional>> read_head_header_and_hash() const override; + private: db::DataModel data_model_; }; diff --git a/silkworm/db/chain/remote_chain_storage.cpp b/silkworm/db/chain/remote_chain_storage.cpp index 57c6b43294..31ee241c92 100644 --- a/silkworm/db/chain/remote_chain_storage.cpp +++ b/silkworm/db/chain/remote_chain_storage.cpp @@ -19,13 +19,13 @@ #include #include +#include #include +#include #include #include #include -#include "chain.hpp" - namespace silkworm::db::chain { RemoteChainStorage::RemoteChainStorage(kv::api::Transaction& tx, Providers providers) @@ -239,4 +239,19 @@ Task> RemoteChainStorage::read_transaction_by_idx_in_ co_return body.transactions[txn_id]; } +Task, std::optional>> RemoteChainStorage::read_head_header_and_hash() const { + const auto value = co_await tx_.get_one(table::kHeadHeaderName, string_to_bytes(table::kHeadHeaderName)); + if (value.empty()) { + throw std::runtime_error{"empty head header hash value in read_head_header_hash"}; + } + const auto head_header_hash{to_bytes32(value)}; + SILK_DEBUG << "head header hash: " << to_hex(head_header_hash); + + auto header = co_await read_header(head_header_hash); + + Hash header_hash{head_header_hash}; + + co_return std::pair{std::move(header), std::move(header_hash)}; +} + } // namespace silkworm::db::chain diff --git a/silkworm/db/chain/remote_chain_storage.hpp b/silkworm/db/chain/remote_chain_storage.hpp index cb971ef34e..40a5490db7 100644 --- a/silkworm/db/chain/remote_chain_storage.hpp +++ b/silkworm/db/chain/remote_chain_storage.hpp @@ -16,6 +16,8 @@ #pragma once +#include + #include #include @@ -69,6 +71,8 @@ class RemoteChainStorage : public ChainStorage { Task> read_block_num_by_transaction_hash(const evmc::bytes32& transaction_hash) const override; Task> read_transaction_by_idx_in_block(BlockNum block_num, uint64_t txn_id) const override; + Task, std::optional>> read_head_header_and_hash() const override; + protected: Providers& providers() { return providers_; } diff --git a/silkworm/db/test_util/mock_chain_storage.hpp b/silkworm/db/test_util/mock_chain_storage.hpp index 989cd01e30..4070fe653f 100644 --- a/silkworm/db/test_util/mock_chain_storage.hpp +++ b/silkworm/db/test_util/mock_chain_storage.hpp @@ -73,6 +73,8 @@ class MockChainStorage : public chain::ChainStorage { MOCK_METHOD((Task>), read_block_num_by_transaction_hash, (const evmc::bytes32&), (const, override)); MOCK_METHOD((Task>), read_transaction_by_idx_in_block, (BlockNum, uint64_t), (const, override)); + + MOCK_METHOD((Task, std::optional>>), read_head_header_and_hash, (), (const, override)); }; } // namespace silkworm::db::test_util diff --git a/silkworm/rpc/commands/erigon_api.cpp b/silkworm/rpc/commands/erigon_api.cpp index 84c26ffd00..09d39bb4c1 100644 --- a/silkworm/rpc/commands/erigon_api.cpp +++ b/silkworm/rpc/commands/erigon_api.cpp @@ -22,7 +22,6 @@ #include #include -#include #include #include #include @@ -123,10 +122,7 @@ Task ErigonRpcApi::handle_erigon_get_block_by_timestamp(const nlohmann::js // Lookup the first and last block headers const auto first_header = co_await chain_storage->read_canonical_header(kEarliestBlockNum); ensure(first_header.has_value(), "cannot find earliest header"); - const auto head_header_hash = co_await db::chain::read_head_header_hash(*tx); - const auto head_header_block_num = co_await chain_storage->read_block_num(head_header_hash); - ensure(head_header_block_num.has_value(), "cannot find head header hash"); - const auto current_header = co_await chain_storage->read_header(*head_header_block_num, head_header_hash); + const auto [current_header, head_header_hash] = co_await chain_storage->read_head_header_and_hash(); ensure(current_header.has_value(), "cannot find head header"); const BlockNum current_block_num = current_header->number; diff --git a/silkworm/rpc/core/logs_walker.cpp b/silkworm/rpc/core/logs_walker.cpp index e4f22b2ae4..66385834c3 100644 --- a/silkworm/rpc/core/logs_walker.cpp +++ b/silkworm/rpc/core/logs_walker.cpp @@ -22,7 +22,6 @@ #include #include -#include #include #include #include From 837331ee7e72873159cfb2f65f71b6bc0556c9f3 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:25:39 +0100 Subject: [PATCH 14/48] rpcdaemon: use txn state for bundles in eth_callMany (#2602) --- silkworm/rpc/core/call_many.cpp | 31 ++++++++++--------------------- silkworm/rpc/core/call_many.hpp | 2 +- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/silkworm/rpc/core/call_many.cpp b/silkworm/rpc/core/call_many.cpp index 89d4d44e20..4661790ff2 100644 --- a/silkworm/rpc/core/call_many.cpp +++ b/silkworm/rpc/core/call_many.cpp @@ -40,27 +40,16 @@ CallManyResult CallExecutor::executes_all_bundles(const silkworm::ChainConfig& c const Bundles& bundles, std::optional opt_timeout, const AccountsOverrides& accounts_overrides, - int32_t transaction_index, + TxnId txn_id, boost::asio::any_io_executor& this_executor) { CallManyResult result; const auto& block = block_with_hash->block; - const auto& block_transactions = block.transactions; - auto state = execution::StateFactory{transaction_}.create_state(this_executor, storage, block.header.number); + auto state = execution::StateFactory{transaction_}.create_state_txn(this_executor, storage, txn_id); EVMExecutor executor{block, config, workers_, std::make_shared(*state, accounts_overrides)}; - std::uint64_t timeout = opt_timeout.value_or(5000); + uint64_t timeout = opt_timeout.value_or(5000); const auto start_time = clock_time::now(); - for (auto idx{0}; idx < transaction_index; ++idx) { - silkworm::Transaction txn{block_transactions[static_cast(idx)]}; - auto exec_result = executor.call(block, txn); - if ((clock_time::since(start_time) / 1000000) > timeout) { - std::ostringstream oss; - oss << "execution aborted (timeout = " << static_cast(timeout) / 1000.0 << "s)"; - result.error = oss.str(); - return result; - } - } - executor.reset(); + // Don't call reserve here to preallocate result.results - since json value is dynamic it doesn't know yet how much it should allocate! // -> Don't uncomment this line result.results.reserve(bundles.size()); for (const auto& bundle : bundles) { @@ -143,7 +132,7 @@ Task CallExecutor::execute( std::optional timeout) { const auto chain_storage{transaction_.create_storage()}; - std::uint16_t count{0}; + uint16_t count{0}; bool empty = true; for (const auto& bundle : bundles) { SILK_DEBUG << "bundle[" << count++ << "]: " << bundle; @@ -162,12 +151,12 @@ Task CallExecutor::execute( if (!block_with_hash) { throw std::invalid_argument("read_block_by_block_num_or_hash: block not found"); } - auto transaction_index = context.transaction_index; - if (transaction_index == -1) { - transaction_index = static_cast(block_with_hash->block.transactions.size()); - } + const uint64_t transaction_index = + context.transaction_index == -1 ? block_with_hash->block.transactions.size() : static_cast(context.transaction_index); auto this_executor = co_await boost::asio::this_coro::executor; + const auto min_tx_num = co_await transaction_.first_txn_num_in_block(block_with_hash->block.header.number); + const auto txn_id = min_tx_num + transaction_index + 1; // for system txn in the beginning of block result = co_await async_task(workers_.executor(), [&]() -> CallManyResult { return executes_all_bundles(chain_config, *chain_storage, @@ -175,7 +164,7 @@ Task CallExecutor::execute( bundles, timeout, accounts_overrides, - transaction_index, + txn_id, this_executor); }); diff --git a/silkworm/rpc/core/call_many.hpp b/silkworm/rpc/core/call_many.hpp index d0db576e53..1a0782d224 100644 --- a/silkworm/rpc/core/call_many.hpp +++ b/silkworm/rpc/core/call_many.hpp @@ -64,7 +64,7 @@ class CallExecutor { const Bundles& bundles, std::optional opt_timeout, const AccountsOverrides& accounts_overrides, - int32_t transaction_index, + TxnId txn_id, boost::asio::any_io_executor& executor); private: From 057346cf6aae04fe223f80377bc939a04b0fe838 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Mon, 16 Dec 2024 11:37:13 +0100 Subject: [PATCH 15/48] rpcdaemon: fix data race in http::Server stop (#2587) --- silkworm/capi/silkworm_test.cpp | 2 -- silkworm/rpc/daemon.cpp | 4 ---- silkworm/rpc/http/server.cpp | 7 ------- silkworm/rpc/http/server.hpp | 2 -- 4 files changed, 15 deletions(-) diff --git a/silkworm/capi/silkworm_test.cpp b/silkworm/capi/silkworm_test.cpp index da88dee52a..2783786326 100644 --- a/silkworm/capi/silkworm_test.cpp +++ b/silkworm/capi/silkworm_test.cpp @@ -17,7 +17,6 @@ #include "silkworm.h" #include -#include #include @@ -28,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/silkworm/rpc/daemon.cpp b/silkworm/rpc/daemon.cpp index ae70d0d106..4e1d13ca1c 100644 --- a/silkworm/rpc/daemon.cpp +++ b/silkworm/rpc/daemon.cpp @@ -399,10 +399,6 @@ void Daemon::stop() { state_changes_stream_->close(); context_pool_.stop(); - - for (auto& service : rpc_services_) { - service->stop(); - } } void Daemon::join() { diff --git a/silkworm/rpc/http/server.cpp b/silkworm/rpc/http/server.cpp index d4cf68fe80..fbd00199be 100644 --- a/silkworm/rpc/http/server.cpp +++ b/silkworm/rpc/http/server.cpp @@ -108,11 +108,4 @@ Task Server::run() { SILK_DEBUG << "Server::run exiting..."; } -void Server::stop() { - // The server is stopped by cancelling all outstanding asynchronous operations. - SILK_DEBUG << "Server::stop started..."; - acceptor_.close(); - SILK_DEBUG << "Server::stop completed"; -} - } // namespace silkworm::rpc::http diff --git a/silkworm/rpc/http/server.hpp b/silkworm/rpc/http/server.hpp index 65d6a685e0..56d1be64b0 100644 --- a/silkworm/rpc/http/server.hpp +++ b/silkworm/rpc/http/server.hpp @@ -52,8 +52,6 @@ class Server { void start(); - void stop(); - private: static std::tuple parse_endpoint(const std::string& tcp_end_point); From 2ee61dc51ae306d8fe85f2a489e718f460974db7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 17 Dec 2024 16:52:45 +0100 Subject: [PATCH 16/48] evm: remove unused TraceOp::precompiled_call_gas (#2608) --- silkworm/core/execution/evm.cpp | 2 +- silkworm/core/execution/evm.hpp | 3 +-- silkworm/rpc/core/evm_debug.cpp | 5 ++--- silkworm/rpc/core/evm_debug.hpp | 3 +-- silkworm/rpc/core/evm_trace.cpp | 5 ++--- silkworm/rpc/core/evm_trace.hpp | 3 +-- 6 files changed, 8 insertions(+), 13 deletions(-) diff --git a/silkworm/core/execution/evm.cpp b/silkworm/core/execution/evm.cpp index 9a1e20740f..e9a5ba4a6b 100644 --- a/silkworm/core/execution/evm.cpp +++ b/silkworm/core/execution/evm.cpp @@ -251,7 +251,7 @@ evmc::Result EVM::call(const evmc_message& message) noexcept { for (auto tracer : tracers_) { const ByteView empty_code{}; // Any precompile code is empty tracer.get().on_execution_start(rev, message, empty_code); - tracer.get().on_precompiled_run(res.raw(), message.gas, state_); + tracer.get().on_precompiled_run(res.raw(), state_); tracer.get().on_execution_end(res.raw(), state_); } } else { diff --git a/silkworm/core/execution/evm.hpp b/silkworm/core/execution/evm.hpp index 784f2f53d1..fc657d05bd 100644 --- a/silkworm/core/execution/evm.hpp +++ b/silkworm/core/execution/evm.hpp @@ -63,8 +63,7 @@ class EvmTracer { virtual void on_pre_check_failed(const evmc_result& /*result*/, const evmc_message& /*msg*/) noexcept {}; virtual void on_creation_completed(const evmc_result& /*result*/, const IntraBlockState& /*intra_block_state*/) noexcept {} - virtual void on_precompiled_run(const evmc_result& /*result*/, int64_t /*gas*/, - const IntraBlockState& /*intra_block_state*/) noexcept {} + virtual void on_precompiled_run(const evmc_result& /*result*/, const IntraBlockState& /*intra_block_state*/) noexcept {} virtual void on_reward_granted(const CallResult& /*result*/, const IntraBlockState& /*intra_block_state*/) noexcept {} diff --git a/silkworm/rpc/core/evm_debug.cpp b/silkworm/rpc/core/evm_debug.cpp index 5e8e3a07f4..78992206cb 100644 --- a/silkworm/rpc/core/evm_debug.cpp +++ b/silkworm/rpc/core/evm_debug.cpp @@ -212,10 +212,9 @@ void DebugTracer::on_instruction_start(uint32_t pc, const intx::uint256* stack_t logs_.push_back(log); } -void DebugTracer::on_precompiled_run(const evmc_result& result, int64_t gas, const silkworm::IntraBlockState& /*intra_block_state*/) noexcept { +void DebugTracer::on_precompiled_run(const evmc_result& result, const silkworm::IntraBlockState& /*intra_block_state*/) noexcept { SILK_DEBUG << "DebugTracer::on_precompiled_run:" - << " status: " << result.status_code - << ", gas: " << std::dec << gas; + << " status: " << result.status_code; if (logs_.size() > 1) { flush_logs(); diff --git a/silkworm/rpc/core/evm_debug.hpp b/silkworm/rpc/core/evm_debug.hpp index 57226b8c86..f4f569b3d2 100644 --- a/silkworm/rpc/core/evm_debug.hpp +++ b/silkworm/rpc/core/evm_debug.hpp @@ -85,8 +85,7 @@ class DebugTracer : public EvmTracer { const evmone::ExecutionState& execution_state, const silkworm::IntraBlockState& intra_block_state) noexcept override; void on_execution_end(const evmc_result& result, const silkworm::IntraBlockState& intra_block_state) noexcept override; - void on_precompiled_run(const evmc_result& result, int64_t gas, - const silkworm::IntraBlockState& intra_block_state) noexcept override; + void on_precompiled_run(const evmc_result& result, const silkworm::IntraBlockState& intra_block_state) noexcept override; void flush_logs(); diff --git a/silkworm/rpc/core/evm_trace.cpp b/silkworm/rpc/core/evm_trace.cpp index c7b82cd0ef..886fc2f7aa 100644 --- a/silkworm/rpc/core/evm_trace.cpp +++ b/silkworm/rpc/core/evm_trace.cpp @@ -686,15 +686,14 @@ void VmTraceTracer::on_instruction_start(uint32_t pc, const intx::uint256* stack << ", msg.depth: " << std::dec << execution_state.msg->depth; } -void VmTraceTracer::on_precompiled_run(const evmc_result& result, int64_t gas, const silkworm::IntraBlockState& /*intra_block_state*/) noexcept { +void VmTraceTracer::on_precompiled_run(const evmc_result& result, const silkworm::IntraBlockState& /*intra_block_state*/) noexcept { SILK_DEBUG << "VmTraceTracer::on_precompiled_run:" - << " status: " << result.status_code << ", gas: " << std::dec << gas << "\n"; + << " status: " << result.status_code << "\n"; if (!traces_stack_.empty()) { auto& vm_trace = traces_stack_.top().get(); if (!vm_trace.ops.empty()) { auto& op = vm_trace.ops[vm_trace.ops.size() - 1]; - op.precompiled_call_gas = gas; op.sub = std::make_shared(); op.sub->code = "0x"; } diff --git a/silkworm/rpc/core/evm_trace.hpp b/silkworm/rpc/core/evm_trace.hpp index fd631fcabc..cc7c864dfd 100644 --- a/silkworm/rpc/core/evm_trace.hpp +++ b/silkworm/rpc/core/evm_trace.hpp @@ -99,7 +99,6 @@ struct VmTrace; struct TraceOp { int64_t gas_cost{0}; - std::optional precompiled_call_gas; std::optional call_gas_cap; std::optional trace_ex; std::string idx; @@ -150,7 +149,7 @@ class VmTraceTracer : public silkworm::EvmTracer { const silkworm::IntraBlockState& intra_block_state) noexcept override; void on_execution_end(const evmc_result& result, const silkworm::IntraBlockState& intra_block_state) noexcept override; void on_pre_check_failed(const evmc_result& result, const evmc_message& msg) noexcept override; - void on_precompiled_run(const evmc_result& result, int64_t gas, const silkworm::IntraBlockState& intra_block_state) noexcept override; + void on_precompiled_run(const evmc_result& result, const silkworm::IntraBlockState& intra_block_state) noexcept override; private: VmTrace& vm_trace_; From 2e0e7409054e333a90d614676b56b0906f8d3954 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Tue, 17 Dec 2024 21:43:49 +0100 Subject: [PATCH 17/48] ci: update lint and wasm jobs to Ubuntu 24 (#2606) --- .circleci/config.yml | 39 +++++++------------------ .github/workflows/macOS.yml | 2 +- cmake/cmake_format.cmake | 5 +++- cmake/cmake_format.yaml | 7 +++++ cmake/conan.cmake | 4 +++ cmake/format.cmake | 2 +- silkworm/interfaces/generate_grpc.cmake | 1 + tools/lint/ci_format.sh | 31 ++++++++++++++++++++ 8 files changed, 59 insertions(+), 32 deletions(-) create mode 100755 tools/lint/ci_format.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 2b75f509f2..a35e215116 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -86,7 +86,7 @@ commands: name: "Install Conan" command: | pip3 install --user --no-warn-script-location conan==1.64.1 - conan_path="$(python -m site --user-base)/bin" + conan_path="$(python3 -m site --user-base)/bin" echo "export \"PATH=$conan_path:\$PATH\"" >> "$BASH_ENV" "$conan_path/conan" --version @@ -195,7 +195,7 @@ commands: jobs: lint: machine: - image: ubuntu-2204:2023.04.2 + image: ubuntu-2404:2024.05.1 steps: - add_ssh_keys: fingerprints: @@ -204,33 +204,11 @@ jobs: - run: name: "Format" working_directory: ~/project - command: | - sudo pip3 install cmake-format==0.6.13 - make fmt - if ! git diff --exit-code - then - commit_message="make fmt" - head_commit_message="$(git log -1 --pretty=%B)" - - if [[ "$head_commit_message" == "$commit_message" ]] - then - echo "The formatting style is not compliant, although it was formatted. Try to run 'make fmt' locally and push the changes." - exit 1 - else - git config user.name GitHub - git config user.email noreply@github.com - git commit --all --message="$commit_message" - git config push.autoSetupRemote true - git push - - echo "The formatting style was not compliant, but it is fixed now. A new workflow will start soon, wait for it..." - exit 2 - fi - fi + command: ./tools/lint/ci_format.sh - run: - name: "Copyright" + name: "Lint" working_directory: ~/project - command: cmake -P cmake/copyright.cmake + command: make lint linux-gcc-thread-sanitizer: environment: @@ -394,7 +372,7 @@ jobs: environment: WASI_SDK_VERSION: 20 machine: - image: ubuntu-2204:2023.04.2 + image: ubuntu-2404:2024.05.1 steps: - checkout_with_submodules: ethereum_tests: false @@ -409,7 +387,10 @@ jobs: name: "Install dependencies" command: | sudo apt-get update - sudo apt-get install -y texinfo libtinfo5 + sudo apt-get install -y texinfo + # https://askubuntu.com/questions/1531760/how-to-install-libtinfo5-on-ubuntu24-04 + wget https://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb + sudo apt-get install ./libtinfo5_6.3-2ubuntu0.1_amd64.deb - install_conan - run: name: "Install Wasmer" diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml index dce372ad4f..736db62b9b 100644 --- a/.github/workflows/macOS.yml +++ b/.github/workflows/macOS.yml @@ -48,7 +48,7 @@ jobs: - name: Install Prerequisites run: | pip3 install --user --break-system-packages --no-warn-script-location conan==1.64.1 chardet - conan_path="$(python -m site --user-base)/bin" + conan_path="$(python3 -m site --user-base)/bin" echo "$conan_path" >> $GITHUB_PATH "$conan_path/conan" --version diff --git a/cmake/cmake_format.cmake b/cmake/cmake_format.cmake index 7d272bfc9a..ba6e747b49 100644 --- a/cmake/cmake_format.cmake +++ b/cmake/cmake_format.cmake @@ -38,4 +38,7 @@ file( list(PREPEND SRC "${CMAKE_CURRENT_LIST_DIR}/../CMakeLists.txt") list(FILTER SRC EXCLUDE REGEX "third_party/.+/(.+/)+CMakeLists.txt$") -execute_process(COMMAND "${CMAKE_FORMAT}" --in-place "--config-file=${CMAKE_CURRENT_LIST_DIR}/cmake_format.yaml" ${SRC}) +execute_process( + COMMAND "${CMAKE_FORMAT}" --in-place "--config-file=${CMAKE_CURRENT_LIST_DIR}/cmake_format.yaml" ${SRC} + COMMAND_ERROR_IS_FATAL ANY +) diff --git a/cmake/cmake_format.yaml b/cmake/cmake_format.yaml index 1b92bc5c8e..a5d84ef01a 100644 --- a/cmake/cmake_format.yaml +++ b/cmake/cmake_format.yaml @@ -15,6 +15,13 @@ parse: PUBLIC: '*' PRIVATE: '*' TYPE: '*' + execute_process: + flags: + - OUTPUT_STRIP_TRAILING_WHITESPACE + kwargs: + COMMAND_ERROR_IS_FATAL: '*' + RESULT_VARIABLE: '*' + OUTPUT_VARIABLE: '*' format: line_width: 120 diff --git a/cmake/conan.cmake b/cmake/conan.cmake index 53b6ab548a..356adc5169 100644 --- a/cmake/conan.cmake +++ b/cmake/conan.cmake @@ -104,6 +104,10 @@ if(SILKWORM_USE_MIMALLOC) endif() endif() +if(SILKWORM_CORE_ONLY) + set(CONAN_CXXFLAGS_ARG "catch2/*:tools.build:cxxflags=[\"-fno-exceptions\"]") +endif() + conan_cmake_install( PATH_OR_REFERENCE "${CONAN_BINARY_DIR}" INSTALL_FOLDER "${CONAN_BINARY_DIR}" diff --git a/cmake/format.cmake b/cmake/format.cmake index f61974fc0b..1ecabc6ad0 100644 --- a/cmake/format.cmake +++ b/cmake/format.cmake @@ -35,4 +35,4 @@ list(FILTER SRC EXCLUDE REGEX "silkworm/core/chain/dao.hpp$") list(FILTER SRC EXCLUDE REGEX "silkworm/rpc/json_rpc/specification.cpp\$") list(FILTER SRC EXCLUDE REGEX "silkworm/sync/internals/preverified_hashes/preverified_hashes_[a-z]+.cpp\$") -execute_process(COMMAND ${CLANG_FORMAT} -style=file -i ${SRC}) +execute_process(COMMAND ${CLANG_FORMAT} -style=file -i ${SRC} COMMAND_ERROR_IS_FATAL ANY) diff --git a/silkworm/interfaces/generate_grpc.cmake b/silkworm/interfaces/generate_grpc.cmake index 97125f98a9..9937e0de3c 100644 --- a/silkworm/interfaces/generate_grpc.cmake +++ b/silkworm/interfaces/generate_grpc.cmake @@ -32,6 +32,7 @@ execute_process( COMMAND "${PROTOBUF_PROTOC}" --version OUTPUT_VARIABLE PROTOC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE + COMMAND_ERROR_IS_FATAL ANY ) string(SUBSTRING "${PROTOC_VERSION}" 10 -1 PROTOC_VERSION) diff --git a/tools/lint/ci_format.sh b/tools/lint/ci_format.sh new file mode 100755 index 0000000000..05574d4b62 --- /dev/null +++ b/tools/lint/ci_format.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e +set -o pipefail + +pip3 install --user --no-warn-script-location cmake-format==0.6.13 pyyaml +install_path="$(python3 -m site --user-base)/bin" +export "PATH=$install_path:$PATH" + +make fmt + +if ! git diff --exit-code +then + commit_message="make fmt" + head_commit_message="$(git log -1 --pretty=%B)" + + if [[ "$head_commit_message" == "$commit_message" ]] + then + echo "The formatting style is not compliant, although it was formatted. Try to run 'make fmt' locally and push the changes." + exit 1 + else + git config user.name GitHub + git config user.email noreply@github.com + git commit --all --message="$commit_message" + git config push.autoSetupRemote true + git push + + echo "The formatting style was not compliant, but it is fixed now. A new workflow will start soon, wait for it..." + exit 2 + fi +fi From 03e37139e09eedaf4dac8d4987e92543d8cfa553 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 18 Dec 2024 07:56:40 +0100 Subject: [PATCH 18/48] evm: enable evmone APIv2 in tool/test utils (#2609) --- cmd/dev/check_changes.cpp | 2 +- cmd/dev/scan_txs.cpp | 2 +- cmd/state-transition/state_transition.cpp | 2 +- silkworm/core/execution/execution.hpp | 2 +- silkworm/db/test_util/test_database_context.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/dev/check_changes.cpp b/cmd/dev/check_changes.cpp index 8c58ca8778..64cdf0d3a4 100644 --- a/cmd/dev/check_changes.cpp +++ b/cmd/dev/check_changes.cpp @@ -131,7 +131,7 @@ int main(int argc, char* argv[]) { db::Buffer buffer{txn, std::make_unique(access_layer)}; buffer.set_historical_block(block_num); - ExecutionProcessor processor{block, *rule_set, buffer, *chain_config, false}; + ExecutionProcessor processor{block, *rule_set, buffer, *chain_config, true}; processor.evm().analysis_cache = &analysis_cache; if (const ValidationResult res = processor.execute_block(receipts); res != ValidationResult::kOk) { diff --git a/cmd/dev/scan_txs.cpp b/cmd/dev/scan_txs.cpp index e527ec6448..96873970c3 100644 --- a/cmd/dev/scan_txs.cpp +++ b/cmd/dev/scan_txs.cpp @@ -91,7 +91,7 @@ int main(int argc, char* argv[]) { db::Buffer buffer{txn, std::make_unique(txn)}; buffer.set_historical_block(block_num); - ExecutionProcessor processor{block, *rule_set, buffer, *chain_config, false}; + ExecutionProcessor processor{block, *rule_set, buffer, *chain_config, true}; processor.evm().analysis_cache = &analysis_cache; // Execute the block and retrieve the receipts diff --git a/cmd/state-transition/state_transition.cpp b/cmd/state-transition/state_transition.cpp index 648ea83702..61490d6c65 100644 --- a/cmd/state-transition/state_transition.cpp +++ b/cmd/state-transition/state_transition.cpp @@ -290,7 +290,7 @@ void StateTransition::run() { auto block = get_block(state, config); auto txn = get_transaction(expected_sub_state); - ExecutionProcessor processor{block, *rule_set, state, config, false}; + ExecutionProcessor processor{block, *rule_set, state, config, true}; Receipt receipt; const evmc_revision rev{config.revision(block.header.number, block.header.timestamp)}; diff --git a/silkworm/core/execution/execution.hpp b/silkworm/core/execution/execution.hpp index a73c3f52a6..87acccde63 100644 --- a/silkworm/core/execution/execution.hpp +++ b/silkworm/core/execution/execution.hpp @@ -47,7 +47,7 @@ inline ValidationResult execute_block( if (!rule_set) { return ValidationResult::kUnknownProtocolRuleSet; } - ExecutionProcessor processor{block, *rule_set, state, chain_config, false}; + ExecutionProcessor processor{block, *rule_set, state, chain_config, true}; if (const ValidationResult res = processor.execute_block(receipts); res != ValidationResult::kOk) { return res; diff --git a/silkworm/db/test_util/test_database_context.cpp b/silkworm/db/test_util/test_database_context.cpp index 3a9fa80136..2b6891766f 100644 --- a/silkworm/db/test_util/test_database_context.cpp +++ b/silkworm/db/test_util/test_database_context.cpp @@ -128,7 +128,7 @@ void populate_blocks(RWTxn& txn, const std::filesystem::path& tests_dir, InMemor // FIX 4b: populate receipts and logs table std::vector receipts; - ExecutionProcessor processor{block, *rule_set, state_buffer, *chain_config, false}; + ExecutionProcessor processor{block, *rule_set, state_buffer, *chain_config, true}; Buffer db_buffer{txn, std::make_unique(txn)}; for (auto& block_txn : block.transactions) { silkworm::Receipt receipt{}; From 7bb829e5f95f6f214a4d86034955dd5da2e898a6 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Wed, 18 Dec 2024 19:08:37 +0100 Subject: [PATCH 19/48] cmake: TSAN suppression for MDBX false-positives in unit tests (#2610) --- cmake/run_unit_tests.cmake | 4 ++++ cmake/run_unit_tests.sh | 2 +- tsan_suppressions.txt | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 tsan_suppressions.txt diff --git a/cmake/run_unit_tests.cmake b/cmake/run_unit_tests.cmake index ae57731928..e91ab36dc6 100644 --- a/cmake/run_unit_tests.cmake +++ b/cmake/run_unit_tests.cmake @@ -52,6 +52,10 @@ foreach(TEST_COMMAND IN LISTS TEST_COMMANDS) set(ENV{LLVM_PROFILE_FILE} "${TEST_COMMAND_NAME}.profraw") endif() + if("${SILKWORM_SANITIZE}" STREQUAL "thread") + set(ENV{TSAN_OPTIONS} "suppressions=tsan_suppressions.txt") + endif() + execute_process(COMMAND "${TEST_COMMAND}" "--rng-seed=${TIME}" "--min-duration=2" RESULT_VARIABLE EXIT_CODE) if(NOT (EXIT_CODE EQUAL 0)) message(FATAL_ERROR "${TEST_COMMAND_REL_PATH} has failed: ${EXIT_CODE}") diff --git a/cmake/run_unit_tests.sh b/cmake/run_unit_tests.sh index f7d7859c72..cee04d1b72 100755 --- a/cmake/run_unit_tests.sh +++ b/cmake/run_unit_tests.sh @@ -10,5 +10,5 @@ fi script_dir=$(dirname "$0") -cmake "-DSILKWORM_BUILD_DIR=$1" "-DSILKWORM_CLANG_COVERAGE=$2" -P "$script_dir/run_unit_tests.cmake" \ +cmake "-DSILKWORM_BUILD_DIR=$1" "-DSILKWORM_CLANG_COVERAGE=$2" "-DSILKWORM_SANITIZE=$3" -P "$script_dir/run_unit_tests.cmake" \ | grep -Ev '^(Randomness|RNG seed|============================)' diff --git a/tsan_suppressions.txt b/tsan_suppressions.txt new file mode 100644 index 0000000000..5a64255bdb --- /dev/null +++ b/tsan_suppressions.txt @@ -0,0 +1,5 @@ +# ThreadSanitizer suppressions file for project Silkworm. + +# MDBX is not compatible with ThreadSanitizer, see warning in mdbx.c:861 +# "libmdbx don't compatible with ThreadSanitizer, you will get a lot of false-positive issues." +race:mdbx From 5e69657eed01d874f2169fc48156a7ac0a1b5282 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com> Date: Wed, 18 Dec 2024 22:35:04 +0100 Subject: [PATCH 20/48] rpcdaemon: StateFactory rework (#2603) --- silkworm/db/kv/api/local_transaction.cpp | 2 +- silkworm/execution/state_factory.cpp | 12 --- silkworm/execution/state_factory.hpp | 10 +-- silkworm/rpc/commands/eth_api.cpp | 27 ++++-- silkworm/rpc/commands/eth_api_test.cpp | 2 + silkworm/rpc/commands/rpc_api_test.cpp | 4 +- silkworm/rpc/core/call_many.cpp | 2 +- silkworm/rpc/core/estimate_gas_oracle.cpp | 7 +- silkworm/rpc/core/estimate_gas_oracle.hpp | 2 +- .../rpc/core/estimate_gas_oracle_test.cpp | 34 ++++---- silkworm/rpc/core/evm_debug.cpp | 29 ++++--- silkworm/rpc/core/evm_executor.cpp | 3 +- silkworm/rpc/core/evm_executor.hpp | 1 + silkworm/rpc/core/evm_trace.cpp | 87 +++++++++++-------- silkworm/rpc/core/evm_trace_test.cpp | 25 +++--- silkworm/rpc/core/receipts.cpp | 8 +- 16 files changed, 145 insertions(+), 110 deletions(-) diff --git a/silkworm/db/kv/api/local_transaction.cpp b/silkworm/db/kv/api/local_transaction.cpp index 867e81e8c3..65865e9b2a 100644 --- a/silkworm/db/kv/api/local_transaction.cpp +++ b/silkworm/db/kv/api/local_transaction.cpp @@ -65,7 +65,7 @@ std::shared_ptr LocalTransaction::create_storage() { } Task LocalTransaction::first_txn_num_in_block(BlockNum /*block_num*/) { - throw std::logic_error{"not yet implemented"}; + throw std::logic_error{"LocalTransaction::first_txn_num_in_block: not yet implemented"}; } Task LocalTransaction::get_latest(GetLatestQuery /*query*/) { diff --git a/silkworm/execution/state_factory.cpp b/silkworm/execution/state_factory.cpp index 202db78835..61d6eb0fac 100644 --- a/silkworm/execution/state_factory.cpp +++ b/silkworm/execution/state_factory.cpp @@ -25,18 +25,6 @@ namespace silkworm::execution { std::shared_ptr StateFactory::create_state( - boost::asio::any_io_executor& executor, - const db::chain::ChainStorage& storage, - BlockNum block_num) { - if (tx.is_local()) { - auto& local_tx = dynamic_cast(tx); - return std::make_shared(block_num, std::nullopt, local_tx.data_store()); - } else { // NOLINT(readability-else-after-return) - return std::make_shared(executor, tx, storage, block_num, std::nullopt); - } -} - -std::shared_ptr StateFactory::create_state_txn( boost::asio::any_io_executor& executor, const db::chain::ChainStorage& storage, TxnId txn_id) { diff --git a/silkworm/execution/state_factory.hpp b/silkworm/execution/state_factory.hpp index 14c24a9339..ff0cda5019 100644 --- a/silkworm/execution/state_factory.hpp +++ b/silkworm/execution/state_factory.hpp @@ -31,14 +31,14 @@ struct StateFactory { db::kv::api::Transaction& tx; std::shared_ptr create_state( - boost::asio::any_io_executor& executor, - const db::chain::ChainStorage& storage, - BlockNum block_num); - - std::shared_ptr create_state_txn( boost::asio::any_io_executor& executor, const db::chain::ChainStorage& storage, TxnId txn_id); + + Task user_txn_id_at(BlockNum block_num, uint32_t txn_index = 0) { + const auto base_txn_in_block = co_await tx.first_txn_num_in_block(block_num); + co_return base_txn_in_block + 1 + txn_index; // + 1 for system txn in the beginning of block + } }; } // namespace silkworm::execution diff --git a/silkworm/rpc/commands/eth_api.cpp b/silkworm/rpc/commands/eth_api.cpp index 9227787dc6..9e836b996c 100644 --- a/silkworm/rpc/commands/eth_api.cpp +++ b/silkworm/rpc/commands/eth_api.cpp @@ -923,8 +923,11 @@ Task EthereumRpcApi::handle_eth_estimate_gas(const nlohmann::json& request co_return co_await state_reader.read_account(address); }; + execution::StateFactory state_factory{*tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(latest_block.header.number); + rpc::EstimateGasOracle estimate_gas_oracle{block_header_provider, account_reader, chain_config, workers_, *tx, *chain_storage}; - const auto estimated_gas = co_await estimate_gas_oracle.estimate_gas(call, latest_block, block_num_for_gas_limit); + const auto estimated_gas = co_await estimate_gas_oracle.estimate_gas(call, latest_block, txn_id, block_num_for_gas_limit); reply = make_json_content(request, to_quantity(estimated_gas)); } catch (const std::invalid_argument& iv) { @@ -1154,9 +1157,12 @@ Task EthereumRpcApi::handle_eth_call(const nlohmann::json& request, std::s } silkworm::Transaction txn{call.to_transaction()}; + execution::StateFactory state_factory{*tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num + 1); + const auto execution_result = co_await EVMExecutor::call( - chain_config, *chain_storage, workers_, block_with_hash->block, txn, [&tx](auto& io_executor, auto block_num1, auto& storage) { - return execution::StateFactory{*tx}.create_state(io_executor, storage, block_num1); + chain_config, *chain_storage, workers_, block_with_hash->block, txn, txn_id, [&state_factory](auto& io_executor, auto curr_txn_id, auto& storage) { + return state_factory.create_state(io_executor, storage, curr_txn_id); }); if (execution_result.success()) { @@ -1340,10 +1346,14 @@ Task EthereumRpcApi::handle_eth_create_access_list(const nlohmann::json& r Tracers tracers{tracer}; auto txn = call.to_transaction(std::nullopt, nonce); AccessList saved_access_list = call.access_list; + + execution::StateFactory state_factory{*tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_with_hash->block.header.number + 1); + while (true) { const auto execution_result = co_await EVMExecutor::call( - chain_config, *chain_storage, workers_, block_with_hash->block, txn, [&](auto& io_executor, auto block_num, auto& storage) { - return execution::StateFactory{*tx}.create_state(io_executor, storage, block_num); + chain_config, *chain_storage, workers_, block_with_hash->block, txn, txn_id, [&](auto& io_executor, auto curr_txn_id, auto& storage) { + return state_factory.create_state(io_executor, storage, curr_txn_id); }, tracers, /* refund */ true, /* gasBailout */ false); @@ -1436,9 +1446,12 @@ Task EthereumRpcApi::handle_eth_call_bundle(const nlohmann::json& request, break; } + execution::StateFactory state_factory{*tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_with_hash->block.header.number + 1); + const auto execution_result = co_await EVMExecutor::call( - chain_config, *chain_storage, workers_, block_with_hash->block, tx_with_block->transaction, [&](auto& io_executor, auto block_num, auto& storage) { - return execution::StateFactory{*tx}.create_state(io_executor, storage, block_num); + chain_config, *chain_storage, workers_, block_with_hash->block, tx_with_block->transaction, txn_id, [&](auto& io_executor, auto curr_txn_id, auto& storage) { + return state_factory.create_state(io_executor, storage, curr_txn_id); }); if (execution_result.pre_check_error) { reply = make_json_error(request, kServerError, execution_result.pre_check_error.value()); diff --git a/silkworm/rpc/commands/eth_api_test.cpp b/silkworm/rpc/commands/eth_api_test.cpp index 9120b71ce8..5131fb5cd2 100644 --- a/silkworm/rpc/commands/eth_api_test.cpp +++ b/silkworm/rpc/commands/eth_api_test.cpp @@ -105,6 +105,7 @@ TEST_CASE_METHOD(test_util::RpcApiE2ETest, "unit: eth_feeHistory succeeds if req })"_json); } +#ifdef notdef // temporarily commented out waiting for LocalTransaction implementation TEST_CASE_METHOD(test_util::RpcApiE2ETest, "eth_call without params on gas", "[rpc][api]") { const nlohmann::json request = R"({"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{}, "latest"]})"_json; std::string reply; @@ -115,6 +116,7 @@ TEST_CASE_METHOD(test_util::RpcApiE2ETest, "eth_call without params on gas", "[r "result":"0x" })"_json); } +#endif TEST_CASE_METHOD(test_util::RpcApiE2ETest, "fuzzy: eth_feeHistory sigsegv invalid input", "[rpc][api]") { const nlohmann::json request = R"({"jsonrpc":"2.0","id":1,"method":"eth_feeHistory","params":["5x1","0x2",[95,99]]})"_json; diff --git a/silkworm/rpc/commands/rpc_api_test.cpp b/silkworm/rpc/commands/rpc_api_test.cpp index 76fb6d62f4..26564565ea 100644 --- a/silkworm/rpc/commands/rpc_api_test.cpp +++ b/silkworm/rpc/commands/rpc_api_test.cpp @@ -24,7 +24,7 @@ namespace silkworm::rpc::commands { -#ifdef notdef // commented Temporary wating implementaion local-transaction +#ifdef notdef // temporarily commented out waiting for LocalTransaction implementation using test_util::RequestHandlerForTest; using test_util::RpcApiTestBase; #endif @@ -78,7 +78,7 @@ static const std::vector kSubtestsToIgnore = { "call-simple-contract.io", // eth_call: without gas paramters doesn't support base_fee_gas of block as default gas }; -#ifdef notdef // commented Temporary wating implementaion local-transaction +#ifdef notdef // temporarily commented out waiting for LocalTransaction implementation // Exclude tests from sanitizer builds due to ASAN/TSAN warnings inside gRPC library #ifndef SILKWORM_SANITIZE TEST_CASE("rpc_api io (all files)", "[rpc][rpc_api]") { diff --git a/silkworm/rpc/core/call_many.cpp b/silkworm/rpc/core/call_many.cpp index 4661790ff2..7d033d1f24 100644 --- a/silkworm/rpc/core/call_many.cpp +++ b/silkworm/rpc/core/call_many.cpp @@ -44,7 +44,7 @@ CallManyResult CallExecutor::executes_all_bundles(const silkworm::ChainConfig& c boost::asio::any_io_executor& this_executor) { CallManyResult result; const auto& block = block_with_hash->block; - auto state = execution::StateFactory{transaction_}.create_state_txn(this_executor, storage, txn_id); + auto state = execution::StateFactory{transaction_}.create_state(this_executor, storage, txn_id); EVMExecutor executor{block, config, workers_, std::make_shared(*state, accounts_overrides)}; uint64_t timeout = opt_timeout.value_or(5000); diff --git a/silkworm/rpc/core/estimate_gas_oracle.cpp b/silkworm/rpc/core/estimate_gas_oracle.cpp index 0d6f368e32..6f399506ba 100644 --- a/silkworm/rpc/core/estimate_gas_oracle.cpp +++ b/silkworm/rpc/core/estimate_gas_oracle.cpp @@ -25,7 +25,7 @@ namespace silkworm::rpc { -Task EstimateGasOracle::estimate_gas(const Call& call, const silkworm::Block& block, std::optional block_num_for_gas_limit) { +Task EstimateGasOracle::estimate_gas(const Call& call, const silkworm::Block& block, TxnId txn_id, std::optional block_num_for_gas_limit) { SILK_DEBUG << "EstimateGasOracle::estimate_gas called"; const auto block_num = block.header.number; @@ -79,8 +79,11 @@ Task EstimateGasOracle::estimate_gas(const Call& call, const silk SILK_DEBUG << "hi: " << hi << ", lo: " << lo << ", cap: " << cap; auto this_executor = co_await boost::asio::this_coro::executor; + + execution::StateFactory state_factory{transaction_}; + auto exec_result = co_await async_task(workers_.executor(), [&]() -> ExecutionResult { - auto state = execution::StateFactory{transaction_}.create_state(this_executor, storage_, block_num); + auto state = state_factory.create_state(this_executor, storage_, txn_id); ExecutionResult result{evmc_status_code::EVMC_SUCCESS}; silkworm::Transaction transaction{call.to_transaction()}; diff --git a/silkworm/rpc/core/estimate_gas_oracle.hpp b/silkworm/rpc/core/estimate_gas_oracle.hpp index c37ac0d716..9b50ace24e 100644 --- a/silkworm/rpc/core/estimate_gas_oracle.hpp +++ b/silkworm/rpc/core/estimate_gas_oracle.hpp @@ -90,7 +90,7 @@ class EstimateGasOracle { EstimateGasOracle(const EstimateGasOracle&) = delete; EstimateGasOracle& operator=(const EstimateGasOracle&) = delete; - Task estimate_gas(const Call& call, const silkworm::Block& latest_block, std::optional block_num_for_gas_limit = {}); + Task estimate_gas(const Call& call, const silkworm::Block& latest_block, TxnId txn_id, std::optional block_num_for_gas_limit = {}); protected: virtual ExecutionResult try_execution(EVMExecutor& executor, const silkworm::Block& _block, const silkworm::Transaction& transaction); diff --git a/silkworm/rpc/core/estimate_gas_oracle_test.cpp b/silkworm/rpc/core/estimate_gas_oracle_test.cpp index 08cdddc5cc..d2597fe5c0 100644 --- a/silkworm/rpc/core/estimate_gas_oracle_test.cpp +++ b/silkworm/rpc/core/estimate_gas_oracle_test.cpp @@ -122,7 +122,7 @@ TEST_CASE("estimate gas") { .WillOnce(Return(expect_result_fail)) .WillOnce(Return(expect_result_fail)) .WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == kTxGas * 2); @@ -131,7 +131,7 @@ TEST_CASE("estimate gas") { SECTION("Call empty, always succeeds") { ExecutionResult expect_result_ok{.error_code = evmc_status_code::EVMC_SUCCESS}; EXPECT_CALL(estimate_gas_oracle, try_execution(_, _, _)).Times(14).WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == kTxGas); } @@ -155,7 +155,7 @@ TEST_CASE("estimate gas") { .WillOnce(Return(expect_result_ok)) .WillOnce(Return(expect_result_fail)) .WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == 0x88b6); @@ -180,7 +180,7 @@ TEST_CASE("estimate gas") { .WillOnce(Return(expect_result_fail)) .WillOnce(Return(expect_result_ok)) .WillRepeatedly(Return(expect_result_fail)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == 0x6d5e); @@ -208,7 +208,7 @@ TEST_CASE("estimate gas") { .WillOnce(Return(expect_result_fail_pre_check)) .WillOnce(Return(expect_result_ok)) .WillRepeatedly(Return(expect_result_fail)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == 0x6d5e); @@ -237,7 +237,7 @@ TEST_CASE("estimate gas") { .WillOnce(Return(expect_result_fail)) .WillOnce(Return(expect_result_fail)) .WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == kTxGas * 4); @@ -249,7 +249,7 @@ TEST_CASE("estimate gas") { EXPECT_CALL(estimate_gas_oracle, try_execution(_, _, _)) .Times(15) .WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == kTxGas); @@ -279,7 +279,7 @@ TEST_CASE("estimate gas") { .WillOnce(Return(expect_result_fail)) .WillOnce(Return(expect_result_fail)) .WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == kTxGas * 2); @@ -306,7 +306,7 @@ TEST_CASE("estimate gas") { .WillOnce(Return(expect_result_fail)) .WillOnce(Return(expect_result_fail)) .WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == 0x61a8); @@ -337,7 +337,7 @@ TEST_CASE("estimate gas") { .WillOnce(Return(expect_result_fail)) .WillOnce(Return(expect_result_fail)) .WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == kTxGas * 2); @@ -365,7 +365,7 @@ TEST_CASE("estimate gas") { .WillOnce(Return(expect_result_fail)) .WillOnce(Return(expect_result_fail)) .WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == 0x61a8); @@ -375,7 +375,7 @@ TEST_CASE("estimate gas") { ExecutionResult expect_result_ok{.error_code = evmc_status_code::EVMC_SUCCESS}; call.gas = kGasCap * 2; EXPECT_CALL(estimate_gas_oracle, try_execution(_, _, _)).Times(25).WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == kTxGas); @@ -386,7 +386,7 @@ TEST_CASE("estimate gas") { call.gas = kTxGas / 2; EXPECT_CALL(estimate_gas_oracle, try_execution(_, _, _)).Times(14).WillRepeatedly(Return(expect_result_ok)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); const intx::uint256& estimate_gas = result.get(); CHECK(estimate_gas == kTxGas); @@ -398,7 +398,7 @@ TEST_CASE("estimate gas") { try { EXPECT_CALL(estimate_gas_oracle, try_execution(_, _, _)).Times(16).WillRepeatedly(Return(expect_result_fail)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); result.get(); CHECK(false); } catch (const silkworm::rpc::EstimateGasException&) { @@ -424,7 +424,7 @@ TEST_CASE("estimate gas") { .Times(2) .WillOnce(Return(expect_result_fail)) .WillRepeatedly(Return(expect_result_fail_pre_check)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); result.get(); CHECK(false); } catch (const silkworm::rpc::EstimateGasException&) { @@ -451,7 +451,7 @@ TEST_CASE("estimate gas") { .Times(2) .WillOnce(Return(expect_result_fail)) .WillRepeatedly(Return(expect_result_fail_pre_check)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); result.get(); CHECK(false); } catch (const silkworm::rpc::EstimateGasException&) { @@ -477,7 +477,7 @@ TEST_CASE("estimate gas") { .Times(2) .WillOnce(Return(expect_result_fail)) .WillRepeatedly(Return(expect_result_fail_pre_check)); - auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block), boost::asio::use_future); + auto result = boost::asio::co_spawn(pool, estimate_gas_oracle.estimate_gas(call, block, 244087591818874), boost::asio::use_future); result.get(); CHECK(false); } catch (const silkworm::rpc::EstimateGasException&) { diff --git a/silkworm/rpc/core/evm_debug.cpp b/silkworm/rpc/core/evm_debug.cpp index 78992206cb..91afb8a428 100644 --- a/silkworm/rpc/core/evm_debug.cpp +++ b/silkworm/rpc/core/evm_debug.cpp @@ -375,10 +375,11 @@ Task DebugExecutor::trace_call(json::Stream& stream, const BlockNumOrHash& rpc::Transaction transaction{call.to_transaction()}; const auto& block = block_with_hash->block; - const auto block_num = block.header.number; + const auto block_num = block.header.number + 1; stream.write_field("result"); stream.open_object(); + // trace_call semantics: we must execute the call from the state at the end of the given block, so we pass block.header.number + 1 co_await execute(stream, storage, block_num, block, transaction, /* index */ 0); stream.close_object(); @@ -396,10 +397,11 @@ Task DebugExecutor::trace_transaction(json::Stream& stream, const ChainSto } else { const auto& block = tx_with_block->block_with_hash->block; const auto& transaction = tx_with_block->transaction; - const auto block_num = block.header.number - 1; + const auto block_num = block.header.number; stream.write_field("result"); stream.open_object(); + // trace_transaction semantics: we must execute the txn from the state at the current block co_await execute(stream, storage, block_num, block, transaction, gsl::narrow(transaction.transaction_index)); stream.close_object(); } @@ -433,8 +435,12 @@ Task DebugExecutor::execute(json::Stream& stream, const ChainStorage& stor const auto chain_config = co_await storage.read_chain_config(); auto current_executor = co_await boost::asio::this_coro::executor; + + execution::StateFactory state_factory{tx_}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num); + co_await async_task(workers_.executor(), [&]() -> void { - auto state = execution::StateFactory{tx_}.create_state(current_executor, storage, block_num - 1); + auto state = state_factory.create_state(current_executor, storage, txn_id); EVMExecutor executor{block, chain_config, workers_, state}; for (std::uint64_t idx = 0; idx < transactions.size(); ++idx) { @@ -476,7 +482,7 @@ Task DebugExecutor::execute(json::Stream& stream, const ChainStorage& stor auto transaction_index = static_cast(block.transactions.size()); - co_await execute(stream, storage, block.header.number, block, transaction, transaction_index); + co_await execute(stream, storage, block.header.number + 1, block, transaction, transaction_index); co_return; } @@ -497,12 +503,12 @@ Task DebugExecutor::execute( auto current_executor = co_await boost::asio::this_coro::executor; // We must do the execution at the state after the txn identified by the given index within the given block - // at the state after the block identified by the given block_num, i.e. at the start of the next block (block_num + 1) - const auto first_txn_num_in_block = co_await tx_.first_txn_num_in_block(block_num + 1); + // at the state after the block identified by the given block_num + execution::StateFactory state_factory{tx_}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num, static_cast(index)); co_await async_task(workers_.executor(), [&]() { - const auto txn_id = first_txn_num_in_block + 1 + static_cast(index); // + 1 for system txn in the beginning of block - const auto state = execution::StateFactory{tx_}.create_state_txn(current_executor, storage, txn_id); + const auto state = state_factory.create_state(current_executor, storage, txn_id); EVMExecutor executor{block, chain_config, workers_, state}; @@ -550,12 +556,11 @@ Task DebugExecutor::execute( // We must do the execution at the state after the txn identified by transaction_with_block param in the same block // at the state of the block identified by the given block_num, i.e. at the start of the block (block_num) - const auto first_txn_num_in_block = co_await tx_.first_txn_num_in_block(block.header.number + 1); + execution::StateFactory state_factory{tx_}; + const auto txn_id = co_await state_factory.user_txn_id_at(block.header.number, static_cast(transaction_index)); co_await async_task(workers_.executor(), [&]() { - const auto txn_id = first_txn_num_in_block + 1 + static_cast(transaction_index); // + 1 for system txn in the beginning of block - - auto state = execution::StateFactory{tx_}.create_state_txn(current_executor, storage, txn_id); + auto state = state_factory.create_state(current_executor, storage, txn_id); EVMExecutor executor{block, chain_config, workers_, state}; for (const auto& bundle : bundles) { diff --git a/silkworm/rpc/core/evm_executor.cpp b/silkworm/rpc/core/evm_executor.cpp index 0fa909850d..6fc92f4325 100644 --- a/silkworm/rpc/core/evm_executor.cpp +++ b/silkworm/rpc/core/evm_executor.cpp @@ -292,13 +292,14 @@ Task EVMExecutor::call( WorkerPool& workers, const silkworm::Block& block, const silkworm::Transaction& txn, + const TxnId txn_id, StateFactory state_factory, const Tracers& tracers, bool refund, bool gas_bailout) { auto this_executor = co_await boost::asio::this_coro::executor; const auto execution_result = co_await async_task(workers.executor(), [&]() -> ExecutionResult { - auto state = state_factory(this_executor, block.header.number, chain_storage); + auto state = state_factory(this_executor, txn_id, chain_storage); EVMExecutor executor{block, config, workers, state}; return executor.call(block, txn, tracers, refund, gas_bailout); }); diff --git a/silkworm/rpc/core/evm_executor.hpp b/silkworm/rpc/core/evm_executor.hpp index b40944e2b4..4c85919811 100644 --- a/silkworm/rpc/core/evm_executor.hpp +++ b/silkworm/rpc/core/evm_executor.hpp @@ -92,6 +92,7 @@ class EVMExecutor { WorkerPool& workers, const silkworm::Block& block, const silkworm::Transaction& txn, + const TxnId txnId, StateFactory state_factory, const Tracers& tracers = {}, bool refund = true, diff --git a/silkworm/rpc/core/evm_trace.cpp b/silkworm/rpc/core/evm_trace.cpp index 886fc2f7aa..eda91e6da8 100644 --- a/silkworm/rpc/core/evm_trace.cpp +++ b/silkworm/rpc/core/evm_trace.cpp @@ -1412,14 +1412,19 @@ Task> TraceCallExecutor::trace_block_transactions(c const auto chain_config = co_await chain_storage_.read_chain_config(); auto current_executor = co_await boost::asio::this_coro::executor; + + execution::StateFactory state_factory{tx_}; + // trace_block semantics: we must execute the call from the state at the current block + const auto txn_id = co_await state_factory.user_txn_id_at(block_num); + const auto call_result = co_await async_task(workers_.executor(), [&]() -> std::vector { - auto state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, block_num - 1); + auto state = state_factory.create_state(current_executor, chain_storage_, txn_id); IntraBlockState initial_ibs{*state}; StateAddresses state_addresses(initial_ibs); std::shared_ptr ibs_tracer = std::make_shared(state_addresses); - auto curr_state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, block_num - 1); + auto curr_state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, txn_id); EVMExecutor executor{block, chain_config, workers_, curr_state}; std::vector trace_call_result(transactions.size()); @@ -1464,9 +1469,9 @@ Task> TraceCallExecutor::trace_block_transactions(c } Task TraceCallExecutor::trace_call(const silkworm::Block& block, const Call& call, const TraceConfig& config) { - // trace_call semantics: we must execute the call from the state at the end of the given block, so we pass block.header.number + // trace_call semantics: we must execute the call from the state at the end of the given block, so we pass block.header.number + 1 rpc::Transaction transaction{call.to_transaction()}; - auto result = co_await execute(block.header.number, block, transaction, /*index=*/-1, config, /*gas_bailout=*/true); + auto result = co_await execute(block.header.number + 1, block, transaction, /*index=*/-1, config, /*gas_bailout=*/true); co_return result; } @@ -1478,12 +1483,17 @@ Task TraceCallExecutor::trace_calls(const silkworm::Block& const auto chain_config = co_await chain_storage_.read_chain_config(); auto current_executor = co_await boost::asio::this_coro::executor; + + execution::StateFactory state_factory{tx_}; + // trace_calls semantics: we must execute the call from the state at the end of the given block, so we pass block.header.number + 1 + const auto txn_id = co_await state_factory.user_txn_id_at(block_num + 1); + const auto trace_calls_result = co_await async_task(workers_.executor(), [&]() -> TraceManyCallResult { - auto state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, block_num); + auto state = state_factory.create_state(current_executor, chain_storage_, txn_id); silkworm::IntraBlockState initial_ibs{*state}; StateAddresses state_addresses(initial_ibs); - auto curr_state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, block_num); + auto curr_state = state_factory.create_state(current_executor, chain_storage_, txn_id); EVMExecutor executor{block, chain_config, workers_, state}; std::shared_ptr ibs_tracer = std::make_shared(state_addresses); @@ -1539,11 +1549,15 @@ Task TraceCallExecutor::trace_deploy_transaction(const silkwo const auto chain_config = co_await chain_storage_.read_chain_config(); auto current_executor = co_await boost::asio::this_coro::executor; + + execution::StateFactory state_factory{tx_}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num); + const auto deploy_result = co_await async_task(workers_.executor(), [&]() -> TraceDeployResult { - auto state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, block_num - 1); + auto state = state_factory.create_state(current_executor, chain_storage_, txn_id); silkworm::IntraBlockState initial_ibs{*state}; - auto curr_state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, block_num - 1); + auto curr_state = state_factory.create_state(current_executor, chain_storage_, txn_id); EVMExecutor executor{block, chain_config, workers_, curr_state}; TraceDeployResult result; @@ -1567,15 +1581,15 @@ Task TraceCallExecutor::trace_deploy_transaction(const silkwo } Task TraceCallExecutor::trace_transaction(const silkworm::Block& block, const rpc::Transaction& transaction, const TraceConfig& config) { - // trace_transaction semantics: we must execute the txn from the state at the end of the previous block, so we pass block.header.number - 1 - return execute(block.header.number - 1, block, transaction, gsl::narrow(transaction.transaction_index), config, /*gas_bailout=*/false); + // trace_transaction semantics: we must execute the txn from the state at the current block + return execute(block.header.number, block, transaction, gsl::narrow(transaction.transaction_index), config, /*gas_bailout=*/false); } Task> TraceCallExecutor::trace_transaction(const BlockWithHash& block_with_hash, const rpc::Transaction& transaction, bool gas_bailout) { std::vector traces; - // trace_transaction semantics: we must execute the txn from the state at the end of the previous block, so we pass block.header.number - 1 - const auto result = co_await execute(block_with_hash.block.header.number - 1, block_with_hash.block, transaction, + // trace_transaction semantics: we must execute the txn from the state at the position transaction_index of the current block + const auto result = co_await execute(block_with_hash.block.header.number, block_with_hash.block, transaction, gsl::narrow(transaction.transaction_index), {false, true, false}, gas_bailout); const auto& trace_result = result.traces.trace; @@ -1604,13 +1618,13 @@ Task TraceCallExecutor::trace_transaction_entries(const Tran // We must do the execution at the state after the txn identified by transaction_with_block param in the same block // at the state of the block identified by the given block_num, i.e. at the start of the block (block_num) - const auto first_txn_num_in_block = co_await tx_.first_txn_num_in_block(block_num); - const auto trace_result = co_await async_task(workers_.executor(), [&]() -> TraceEntriesResult { - const auto txn_id = first_txn_num_in_block + 1 + static_cast(transaction_with_block.transaction.transaction_index); // + 1 for system txn in the beginning of block + execution::StateFactory state_factory{tx_}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num, gsl::narrow(transaction_with_block.transaction.transaction_index)); - auto state = execution::StateFactory{tx_}.create_state_txn(current_executor, chain_storage_, txn_id); + const auto trace_result = co_await async_task(workers_.executor(), [&]() -> TraceEntriesResult { + auto state = state_factory.create_state(current_executor, chain_storage_, txn_id); silkworm::IntraBlockState initial_ibs{*state}; - auto curr_state = execution::StateFactory{tx_}.create_state_txn(current_executor, chain_storage_, txn_id); + auto curr_state = state_factory.create_state(current_executor, chain_storage_, txn_id); EVMExecutor executor{block, chain_config, workers_, curr_state}; const auto entry_tracer = std::make_shared(initial_ibs); @@ -1633,14 +1647,14 @@ Task TraceCallExecutor::trace_transaction_error(const TransactionWi // We must do the execution at the state after the txn identified by transaction_with_block param in the same block // at the state of the block identified by the given block_num, i.e. at the start of the block (block_num) - const auto first_txn_num_in_block = co_await tx_.first_txn_num_in_block(block_num); - const auto trace_error = co_await async_task(workers_.executor(), [&]() -> std::string { - const auto txn_id = first_txn_num_in_block + 1 + static_cast(transaction_with_block.transaction.transaction_index); // + 1 for system txn in the beginning of block + execution::StateFactory state_factory{tx_}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num, gsl::narrow(transaction_with_block.transaction.transaction_index)); - auto state = execution::StateFactory{tx_}.create_state_txn(current_executor, chain_storage_, txn_id); + const auto trace_error = co_await async_task(workers_.executor(), [&]() -> std::string { + auto state = state_factory.create_state(current_executor, chain_storage_, txn_id); silkworm::IntraBlockState initial_ibs{*state}; - auto curr_state = execution::StateFactory{tx_}.create_state_txn(current_executor, chain_storage_, txn_id); + auto curr_state = state_factory.create_state(current_executor, chain_storage_, txn_id); EVMExecutor executor{block, chain_config, workers_, curr_state}; @@ -1666,14 +1680,14 @@ Task TraceCallExecutor::trace_operations(const Transactio // We must do the execution at the state after the txn identified by transaction_with_block param in the same block // at the state of the block identified by the given block_num, i.e. at the start of the block (block_num) - const auto first_txn_num_in_block = co_await tx_.first_txn_num_in_block(block_num); - const auto trace_op_result = co_await async_task(workers_.executor(), [&]() -> TraceOperationsResult { - const auto txn_id = first_txn_num_in_block + 1 + static_cast(transaction_with_block.transaction.transaction_index); // + 1 for system txn in the beginning of block + execution::StateFactory state_factory{tx_}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num, gsl::narrow(transaction_with_block.transaction.transaction_index)); - auto state = execution::StateFactory{tx_}.create_state_txn(current_executor, chain_storage_, txn_id); + const auto trace_op_result = co_await async_task(workers_.executor(), [&]() -> TraceOperationsResult { + auto state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, txn_id); silkworm::IntraBlockState initial_ibs{*state}; - auto curr_state = execution::StateFactory{tx_}.create_state_txn(current_executor, chain_storage_, txn_id); + auto curr_state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, txn_id); EVMExecutor executor{block, chain_config, workers_, curr_state}; auto entry_tracer = std::make_shared(initial_ibs); @@ -1696,11 +1710,14 @@ Task TraceCallExecutor::trace_touch_block(const silkworm::BlockWithHash& b const auto chain_config = co_await chain_storage_.read_chain_config(); auto current_executor = co_await boost::asio::this_coro::executor; + execution::StateFactory state_factory{tx_}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num); + const bool result = co_await async_task(workers_.executor(), [&]() -> bool { - auto state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, block_num - 1); + auto state = state_factory.create_state(current_executor, chain_storage_, txn_id); silkworm::IntraBlockState initial_ibs{*state}; - auto curr_state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, block_num - 1); + auto curr_state = execution::StateFactory{tx_}.create_state(current_executor, chain_storage_, txn_id); EVMExecutor executor{block, chain_config, workers_, curr_state}; for (size_t i = 0; i < block.transactions.size(); ++i) { @@ -1794,14 +1811,12 @@ Task TraceCallExecutor::execute( const auto chain_config = co_await chain_storage_.read_chain_config(); auto current_executor = co_await boost::asio::this_coro::executor; - std::shared_ptr state{}; - std::shared_ptr curr_state{}; // We must do the execution at the state after the txn identified by the given index within the given block - // at the state after the block identified by the given block_num, i.e. at the start of the next block (block_num + 1) - const auto first_txn_num_in_next_block = co_await tx_.first_txn_num_in_block(block_num + 1); - const auto txn_id = first_txn_num_in_next_block + 1 + gsl::narrow(transaction.transaction_index); // + 1 for system txn in the beginning of block - state = execution::StateFactory{tx_}.create_state_txn(current_executor, chain_storage_, txn_id); - curr_state = execution::StateFactory{tx_}.create_state_txn(current_executor, chain_storage_, txn_id); + // at the state after the block identified by the given block_num + execution::StateFactory state_factory{tx_}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num, gsl::narrow(transaction.transaction_index)); + auto state = state_factory.create_state(current_executor, chain_storage_, txn_id); + auto curr_state = state_factory.create_state(current_executor, chain_storage_, txn_id); const auto trace_call_result = co_await async_task(workers_.executor(), [&]() -> TraceCallResult { Tracers tracers; silkworm::IntraBlockState initial_ibs{*state}; diff --git a/silkworm/rpc/core/evm_trace_test.cpp b/silkworm/rpc/core/evm_trace_test.cpp index a3d11dc81f..15ec94d909 100644 --- a/silkworm/rpc/core/evm_trace_test.cpp +++ b/silkworm/rpc/core/evm_trace_test.cpp @@ -1221,6 +1221,9 @@ TEST_CASE_METHOD(TraceCallExecutorTest, "TraceCallExecutor::trace_calls") { static Bytes account_history_value3{*silkworm::from_hex("000944ed67f28fd50bb8e90000")}; SECTION("callMany: failed with intrinsic gas too low") { + EXPECT_CALL(transaction, first_txn_num_in_block(5'405'096)).Times(1).WillRepeatedly(Invoke([]() -> Task { + co_return 244087591818873; + })); EXPECT_CALL(backend, get_block_hash_from_block_num(_)) .WillOnce(InvokeWithoutArgs([]() -> Task> { co_return kZeroHeaderHash; @@ -1256,17 +1259,17 @@ TEST_CASE_METHOD(TraceCallExecutorTest, "TraceCallExecutor::trace_calls") { db::kv::api::GetAsOfQuery query1{ .table = table::kAccountDomain, .key = db::account_domain_key(bytes_to_address(account_history_key1)), - .timestamp = 244087591818873, + .timestamp = 244087591818874, }; db::kv::api::GetAsOfQuery query2{ .table = table::kAccountDomain, .key = db::account_domain_key(bytes_to_address(account_history_key2)), - .timestamp = 244087591818873, + .timestamp = 244087591818874, }; db::kv::api::GetAsOfQuery query3{ .table = table::kAccountDomain, .key = db::account_domain_key(bytes_to_address(account_history_key3)), - .timestamp = 244087591818873, + .timestamp = 244087591818874, }; EXPECT_CALL(backend, get_block_hash_from_block_num(_)) .WillOnce(InvokeWithoutArgs([]() -> Task> { @@ -1459,17 +1462,17 @@ TEST_CASE_METHOD(TraceCallExecutorTest, "TraceCallExecutor::trace_block_transact db::kv::api::GetAsOfQuery query1{ .table = table::kAccountDomain, .key = db::account_domain_key(bytes_to_address(account_history_key1)), - .timestamp = 244087591818873, + .timestamp = 244087591818874, }; db::kv::api::GetAsOfQuery query2{ .table = table::kAccountDomain, .key = db::account_domain_key(bytes_to_address(account_history_key2)), - .timestamp = 244087591818873, + .timestamp = 244087591818874, }; db::kv::api::GetAsOfQuery query3{ .table = table::kAccountDomain, .key = db::account_domain_key(bytes_to_address(account_history_key3)), - .timestamp = 244087591818873, + .timestamp = 244087591818874, }; EXPECT_CALL(backend, get_block_hash_from_block_num(_)) .WillOnce(InvokeWithoutArgs([]() -> Task> { @@ -1479,7 +1482,7 @@ TEST_CASE_METHOD(TraceCallExecutorTest, "TraceCallExecutor::trace_block_transact .WillOnce(InvokeWithoutArgs([]() -> Task { co_return kConfigValue; })); - EXPECT_CALL(transaction, first_txn_num_in_block(1'024'165)).Times(2).WillRepeatedly(Invoke([]() -> Task { + EXPECT_CALL(transaction, first_txn_num_in_block(1'024'165)).Times(1).WillRepeatedly(Invoke([]() -> Task { co_return 244087591818873; })); EXPECT_CALL(transaction, get_as_of(std::move(query1))).WillRepeatedly(Invoke([=](Unused) -> Task { @@ -1909,17 +1912,17 @@ TEST_CASE_METHOD(TraceCallExecutorTest, "TraceCallExecutor::trace_block") { db::kv::api::GetAsOfQuery query1{ .table = table::kAccountDomain, .key = db::account_domain_key(bytes_to_address(account_history_key1)), - .timestamp = 244087591818873, + .timestamp = 244087591818874, }; db::kv::api::GetAsOfQuery query2{ .table = table::kAccountDomain, .key = db::account_domain_key(bytes_to_address(account_history_key2)), - .timestamp = 244087591818873, + .timestamp = 244087591818874, }; db::kv::api::GetAsOfQuery query3{ .table = table::kAccountDomain, .key = db::account_domain_key(bytes_to_address(account_history_key3)), - .timestamp = 244087591818873, + .timestamp = 244087591818874, }; EXPECT_CALL(backend, get_block_hash_from_block_num(_)) .Times(2) @@ -1930,7 +1933,7 @@ TEST_CASE_METHOD(TraceCallExecutorTest, "TraceCallExecutor::trace_block") { .WillRepeatedly(InvokeWithoutArgs([]() -> Task { co_return kConfigValue; })); - EXPECT_CALL(transaction, first_txn_num_in_block(1'024'165)).Times(2).WillRepeatedly(Invoke([]() -> Task { + EXPECT_CALL(transaction, first_txn_num_in_block(1'024'165)).Times(1).WillRepeatedly(Invoke([]() -> Task { co_return 244087591818873; })); EXPECT_CALL(transaction, get_as_of(std::move(query1))).WillRepeatedly(Invoke([=](Unused) -> Task { diff --git a/silkworm/rpc/core/receipts.cpp b/silkworm/rpc/core/receipts.cpp index 98fdcca93b..aae7e06738 100644 --- a/silkworm/rpc/core/receipts.cpp +++ b/silkworm/rpc/core/receipts.cpp @@ -152,10 +152,14 @@ Task> generate_receipts(db::kv::api::Transaction& tx, co const auto chain_config = co_await chain_storage.read_chain_config(); auto current_executor = co_await boost::asio::this_coro::executor; + + execution::StateFactory state_factory{tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num); + const auto receipts = co_await async_task(workers.executor(), [&]() -> Receipts { - auto state = execution::StateFactory{tx}.create_state(current_executor, chain_storage, block_num - 1); + auto state = state_factory.create_state(current_executor, chain_storage, txn_id); - auto curr_state = execution::StateFactory{tx}.create_state(current_executor, chain_storage, block_num - 1); + auto curr_state = state_factory.create_state(current_executor, chain_storage, txn_id); EVMExecutor executor{block, chain_config, workers, state}; Receipts rpc_receipts; From 16b279a4adc94c8c8699b8bb64cd1652fdfbe5ec Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:09:40 +0100 Subject: [PATCH 21/48] node: handle code hash not found in Execution unwind (#2599) Fixes #2598 --- silkworm/node/stagedsync/stages/stage_execution.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/silkworm/node/stagedsync/stages/stage_execution.cpp b/silkworm/node/stagedsync/stages/stage_execution.cpp index 637b764b62..714878c90d 100644 --- a/silkworm/node/stagedsync/stages/stage_execution.cpp +++ b/silkworm/node/stagedsync/stages/stage_execution.cpp @@ -573,8 +573,11 @@ void Execution::revert_state(ByteView key, ByteView value, RWCursorDupSort& plai Bytes code_hash_key(kAddressLength + kIncarnationLength, '\0'); std::memcpy(&code_hash_key[0], &key[0], kAddressLength); endian::store_big_u64(&code_hash_key[kAddressLength], account.incarnation); - auto new_code_hash = plain_code_table.find(to_slice(code_hash_key)); - std::memcpy(&account.code_hash.bytes[0], new_code_hash.value.data(), kHashLength); + const auto new_code_hash = plain_code_table.find(to_slice(code_hash_key), /*throw_notfound=*/false); + if (new_code_hash.done) { + SILKWORM_ASSERT(new_code_hash.value.size() >= kHashLength); + std::memcpy(&account.code_hash.bytes[0], new_code_hash.value.data(), kHashLength); + } } // cleaning up contract codes auto state_account_encoded{plain_state_table.find(to_slice(key), /*throw_notfound=*/false)}; From 633836a3d7ac24c1e5dee92315deddbd1bc62e89 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:12:04 +0100 Subject: [PATCH 22/48] node: replace incremental with full mode in InterHashes stage (#2596) Fixes #2597 by replacing incremental mode with full-regeneration mode also for small block intervals. --- .../node/stagedsync/execution_pipeline.cpp | 19 +++--- .../node/stagedsync/stages/stage_headers.cpp | 2 +- .../stagedsync/stages/stage_interhashes.cpp | 64 ++++++++----------- .../stagedsync/stages/stage_interhashes.hpp | 6 +- 4 files changed, 42 insertions(+), 49 deletions(-) diff --git a/silkworm/node/stagedsync/execution_pipeline.cpp b/silkworm/node/stagedsync/execution_pipeline.cpp index 64c1f66b46..3ec0655595 100644 --- a/silkworm/node/stagedsync/execution_pipeline.cpp +++ b/silkworm/node/stagedsync/execution_pipeline.cpp @@ -171,21 +171,22 @@ Stage::Result ExecutionPipeline::forward(db::RWTxn& cycle_txn, BlockNum target_b const auto stage_result = current_stage_->second->forward(cycle_txn); if (stage_result != Stage::Result::kSuccess) { /* clang-format off */ - auto result_description = std::string(magic_enum::enum_name(stage_result)); - log::Error(get_log_prefix(current_stage_name), {"op", "Forward", "returned", result_description}); - SILK_ERROR_M("ExecutionPipeline") << "Forward interrupted due to stage " << current_stage_->first << " failure"; + const auto result_description = std::string(magic_enum::enum_name(stage_result)); + SILK_ERROR_M(get_log_prefix(current_stage_name), {"op", "Forward", "failure", result_description}); return stage_result; } /* clang-format on */ - auto stage_head_number = read_stage_progress(cycle_txn, current_stage_name.data()); - if (!stop_at_block && stage_head_number != target_block_num) { - throw std::logic_error("Sync pipeline: stage returned success with an block_num different from target=" + - to_string(target_block_num) + " reached= " + to_string(stage_head_number)); + const auto stage_head_number = read_stage_progress(cycle_txn, current_stage_name.data()); + if (!stop_at_block && stage_head_number != target_block_num && current_stage_name != kTriggersStageKey) { + SILK_ERROR_M(get_log_prefix(current_stage_name), + {"op", "Forward", "target", to_string(target_block_num), "reached", to_string(stage_head_number)}); + throw std::logic_error("stage returned success with an block_num different from target=" + + to_string(target_block_num) + " reached=" + to_string(stage_head_number)); } - auto [_, stage_duration] = stages_stop_watch.lap(); + const auto [_, stage_duration] = stages_stop_watch.lap(); if (stage_duration > kStageDurationThresholdForLog) { - log::Info(get_log_prefix(current_stage_name), {"op", "Forward", "done", StopWatch::format(stage_duration)}); + SILK_INFO_M(get_log_prefix(current_stage_name), {"op", "Forward", "done", StopWatch::format(stage_duration)}); } } diff --git a/silkworm/node/stagedsync/stages/stage_headers.cpp b/silkworm/node/stagedsync/stages/stage_headers.cpp index 7086c698fe..77bdc32f1c 100644 --- a/silkworm/node/stagedsync/stages/stage_headers.cpp +++ b/silkworm/node/stagedsync/stages/stage_headers.cpp @@ -100,7 +100,7 @@ HeadersStage::HeadersStage( const auto stop_at_block = Environment::get_stop_at_block(); if (stop_at_block.has_value()) { forced_target_block_ = stop_at_block; - log::Info(log_prefix_) << "env var STOP_AT_BLOCK set, target block=" << forced_target_block_.value(); + SILK_DEBUG_M(log_prefix_, {"target=", std::to_string(*forced_target_block_)}) << " env var STOP_AT_BLOCK set"; } } diff --git a/silkworm/node/stagedsync/stages/stage_interhashes.cpp b/silkworm/node/stagedsync/stages/stage_interhashes.cpp index f6857fc5ba..2d67b8fdfc 100644 --- a/silkworm/node/stagedsync/stages/stage_interhashes.cpp +++ b/silkworm/node/stagedsync/stages/stage_interhashes.cpp @@ -91,7 +91,10 @@ Stage::Result InterHashes::forward(RWTxn& txn) { ret = regenerate_intermediate_hashes(txn, &expected_state_root); } else { // Incremental update - ret = increment_intermediate_hashes(txn, previous_progress, hashstate_stage_progress, &expected_state_root); + // TODO(canepat) debug_unwind block 4'000'000 step 1 fails with kWrongStateRoot in incremental mode + // ret = increment_intermediate_hashes(txn, previous_progress, hashstate_stage_progress, &expected_state_root); + SILK_TRACE_M(log_prefix_, {"function", std::string(__FUNCTION__), "algo", "full rather than incremental"}); + ret = regenerate_intermediate_hashes(txn, &expected_state_root); } if (ret == Stage::Result::kWrongStateRoot) { @@ -106,20 +109,16 @@ Stage::Result InterHashes::forward(RWTxn& txn) { txn.commit_and_renew(); } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -175,7 +174,10 @@ Stage::Result InterHashes::unwind(RWTxn& txn) { ret = regenerate_intermediate_hashes(txn, &expected_state_root); } else { // Incremental update - ret = increment_intermediate_hashes(txn, previous_progress, to, &expected_state_root); + // TODO(canepat) debug_unwind block 4'000'000 step 1 fails with kWrongStateRoot in incremental mode + // ret = increment_intermediate_hashes(txn, previous_progress, to, &expected_state_root); + SILK_TRACE_M(log_prefix_, {"function", std::string(__FUNCTION__), "algo", "full rather than incremental"}); + ret = regenerate_intermediate_hashes(txn, &expected_state_root); } success_or_throw(ret); @@ -184,20 +186,16 @@ Stage::Result InterHashes::unwind(RWTxn& txn) { txn.commit_and_renew(); } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -460,6 +458,7 @@ Stage::Result InterHashes::regenerate_intermediate_hashes(RWTxn& txn, const evmc log_lck.unlock(); const evmc::bytes32 computed_root{trie_loader_->calculate_root()}; + SILK_TRACE_M(log_prefix_, {"function", std::string(__FUNCTION__), "computed_root", to_hex(computed_root.bytes)}); // Fail if not what expected if (expected_root != nullptr && computed_root != *expected_root) { @@ -475,20 +474,16 @@ Stage::Result InterHashes::regenerate_intermediate_hashes(RWTxn& txn, const evmc flush_collected_nodes(txn); } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -524,6 +519,7 @@ Stage::Result InterHashes::increment_intermediate_hashes(RWTxn& txn, BlockNum fr log_lck.unlock(); const evmc::bytes32 computed_root{trie_loader_->calculate_root()}; + SILK_TRACE_M(log_prefix_, {"function", std::string(__FUNCTION__), "computed_root", to_hex(computed_root.bytes)}); // Fail if not what expected if (expected_root != nullptr && computed_root != *expected_root) { @@ -532,28 +528,23 @@ Stage::Result InterHashes::increment_intermediate_hashes(RWTxn& txn, BlockNum fr account_collector_.reset(); // Will invoke dtor which causes all flushed files (if any) to be deleted storage_collector_.reset(); // Will invoke dtor which causes all flushed files (if any) to be deleted log_lck.unlock(); - log::Error("Wrong trie root", - {"expected", to_hex(*expected_root, true), "got", to_hex(computed_root, true)}); + SILK_ERROR_M("Wrong trie root", {"expected", to_hex(*expected_root, true), "got", to_hex(computed_root, true)}); return Stage::Result::kWrongStateRoot; } flush_collected_nodes(txn); } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "unexpected and undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -623,4 +614,5 @@ std::vector InterHashes::get_log_progress() { } return ret; } + } // namespace silkworm::stagedsync diff --git a/silkworm/node/stagedsync/stages/stage_interhashes.hpp b/silkworm/node/stagedsync/stages/stage_interhashes.hpp index f810c15020..176fd737ac 100644 --- a/silkworm/node/stagedsync/stages/stage_interhashes.hpp +++ b/silkworm/node/stagedsync/stages/stage_interhashes.hpp @@ -54,17 +54,17 @@ class InterHashes final : public Stage { trie::PrefixSet collect_storage_changes(db::RWTxn& txn, BlockNum from, BlockNum to, absl::btree_map& hashed_addresses); - //! \brief Erigon's RegenerateIntermediateHashes + //! \brief Erigon RegenerateIntermediateHashes //! \remarks might throw WrongRoot //! \return the state root Stage::Result regenerate_intermediate_hashes( db::RWTxn& txn, const evmc::bytes32* expected_root = nullptr); - //! \brief Erigon's IncrementIntermediateHashes + //! \brief Erigon IncrementIntermediateHashes //! \remarks might throw //! \return the state root - Stage::Result increment_intermediate_hashes( + [[maybe_unused]] Stage::Result increment_intermediate_hashes( db::RWTxn& txn, BlockNum from, BlockNum to, From 9796e2c6546ffa421ebd8675fd51ec57507a3eb6 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Thu, 19 Dec 2024 12:15:46 +0100 Subject: [PATCH 23/48] node: fix reached block num in BlockHashes for existing blocks (#2594) Fixes #2593 Note: the off-by-one error in reached block number reported back by BlockHashes only happens if the target block does _not_ correspond to the highest saved block (hence, more blocks exist in the canonical chain after the target one). *Extras* - improve error logs - avoid CLion warning - add missing `STOP_AT_BLOCK` set in `forward` subcommand of `staged_pipeline` --- cmd/dev/staged_pipeline.cpp | 1 + .../stagedsync/stages/stage_blockhashes.cpp | 27 +++++++------------ 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/cmd/dev/staged_pipeline.cpp b/cmd/dev/staged_pipeline.cpp index a47944fcfb..a6579db793 100644 --- a/cmd/dev/staged_pipeline.cpp +++ b/cmd/dev/staged_pipeline.cpp @@ -484,6 +484,7 @@ void forward(datastore::kvdb::EnvConfig& config, BlockNum forward_point, const b config.readonly = false; + Environment::set_stop_at_block(forward_point); Environment::set_start_at_stage(start_at_stage); Environment::set_stop_before_stage(stop_before_stage); diff --git a/silkworm/node/stagedsync/stages/stage_blockhashes.cpp b/silkworm/node/stagedsync/stages/stage_blockhashes.cpp index f4e1b9fcbd..5d6c8f3073 100644 --- a/silkworm/node/stagedsync/stages/stage_blockhashes.cpp +++ b/silkworm/node/stagedsync/stages/stage_blockhashes.cpp @@ -72,20 +72,16 @@ Stage::Result BlockHashes::forward(db::RWTxn& txn) { txn.commit_and_renew(); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -122,20 +118,16 @@ Stage::Result BlockHashes::unwind(db::RWTxn& txn) { txn.commit_and_renew(); } catch (const mdbx::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kDbError; } catch (const StageError& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = static_cast(ex.err()); } catch (const std::exception& ex) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", std::string(ex.what())}); ret = Stage::Result::kUnexpectedError; } catch (...) { - log::Error(log_prefix_, - {"function", std::string(__FUNCTION__), "exception", "undefined"}); + SILK_ERROR_M(log_prefix_, {"function", std::string(__FUNCTION__), "exception", "undefined"}); ret = Stage::Result::kUnexpectedError; } @@ -171,10 +163,11 @@ void BlockHashes::collect_and_load(db::RWTxn& txn, const BlockNum from, const Bl auto expected_block_num{from + 1}; auto header_key{db::block_key(expected_block_num)}; auto canon_hashes_cursor = txn.rw_cursor(db::table::kCanonicalHashes); - auto data{canon_hashes_cursor->find(datastore::kvdb::to_slice(header_key), /*throw_notfound=*/false)}; + auto data = canon_hashes_cursor->find(datastore::kvdb::to_slice(header_key), /*throw_notfound=*/false); while (data.done) { reached_block_num_ = endian::load_big_u64(static_cast(data.key.data())); if (reached_block_num_ > to) { + --reached_block_num_; break; } From bd009a0f8c40167af8cfe97bdc4681d335b171b4 Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Thu, 19 Dec 2024 22:10:34 +0100 Subject: [PATCH 24/48] ci: fix TSAN suppressions (#2612) --- .circleci/config.yml | 11 ++++++++--- Makefile | 2 +- cmake/run_unit_tests.cmake | 13 +++++++++---- cmake/run_unit_tests.sh | 2 +- .../sanitizer/tsan_suppressions.txt | 0 5 files changed, 19 insertions(+), 9 deletions(-) rename tsan_suppressions.txt => tools/sanitizer/tsan_suppressions.txt (100%) diff --git a/.circleci/config.yml b/.circleci/config.yml index a35e215116..62034f407b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -155,6 +155,9 @@ commands: test: parameters: + sanitizer: + type: string + default: "" ethereum_tests: type: boolean default: true @@ -164,7 +167,7 @@ commands: command: make "SILKWORM_BUILD_DIR=$HOME/build" run_smoke_tests - run: name: "Unit tests" - command: make "SILKWORM_BUILD_DIR=$HOME/build" run_unit_tests + command: make "SILKWORM_BUILD_DIR=$HOME/build" SILKWORM_CLANG_COVERAGE=OFF SILKWORM_SANITIZE=<> "SILKWORM_PROJECT_DIR=$HOME/project" run_unit_tests - when: condition: <> steps: @@ -226,7 +229,8 @@ jobs: compiler_id: gcc compiler_version: <> build_type: Debug - - test + - test: + sanitizer: thread linux-release: parameters: @@ -266,7 +270,8 @@ jobs: build_type: Debug compiler_id: clang compiler_version: 17 - - test + - test: + sanitizer: address,undefined linux-clang-coverage: environment: diff --git a/Makefile b/Makefile index 7fbbfbd5c0..06e47f7f12 100644 --- a/Makefile +++ b/Makefile @@ -27,6 +27,6 @@ run_smoke_tests: @cmake/run_smoke_tests.sh $(SILKWORM_BUILD_DIR) run_unit_tests: - @cmake/run_unit_tests.sh $(SILKWORM_BUILD_DIR) $(SILKWORM_CLANG_COVERAGE) + @cmake/run_unit_tests.sh $(SILKWORM_BUILD_DIR) $(SILKWORM_CLANG_COVERAGE) $(SILKWORM_SANITIZE) $(SILKWORM_PROJECT_DIR) test: run_smoke_tests run_unit_tests diff --git a/cmake/run_unit_tests.cmake b/cmake/run_unit_tests.cmake index e91ab36dc6..09ad2ad170 100644 --- a/cmake/run_unit_tests.cmake +++ b/cmake/run_unit_tests.cmake @@ -19,6 +19,11 @@ if(NOT SILKWORM_BUILD_DIR) endif() file(REAL_PATH "${SILKWORM_BUILD_DIR}" SILKWORM_BUILD_DIR) +if(NOT SILKWORM_PROJECT_DIR) + set(SILKWORM_PROJECT_DIR "${CMAKE_CURRENT_LIST_DIR}/..") +endif() +file(REAL_PATH "${SILKWORM_PROJECT_DIR}" SILKWORM_PROJECT_DIR) + if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") set(CMAKE_EXECUTABLE_SUFFIX ".exe") endif() @@ -43,6 +48,10 @@ string(TIMESTAMP TIME "%s") message("For all tests --rng-seed=${TIME}") message("") +if("${SILKWORM_SANITIZE}" STREQUAL "thread") + set(ENV{TSAN_OPTIONS} "suppressions=${SILKWORM_PROJECT_DIR}/tools/sanitizer/tsan_suppressions.txt") +endif() + foreach(TEST_COMMAND IN LISTS TEST_COMMANDS) file(RELATIVE_PATH TEST_COMMAND_REL_PATH "${SILKWORM_BUILD_DIR}" "${TEST_COMMAND}") message("Running ${TEST_COMMAND_REL_PATH}...") @@ -52,10 +61,6 @@ foreach(TEST_COMMAND IN LISTS TEST_COMMANDS) set(ENV{LLVM_PROFILE_FILE} "${TEST_COMMAND_NAME}.profraw") endif() - if("${SILKWORM_SANITIZE}" STREQUAL "thread") - set(ENV{TSAN_OPTIONS} "suppressions=tsan_suppressions.txt") - endif() - execute_process(COMMAND "${TEST_COMMAND}" "--rng-seed=${TIME}" "--min-duration=2" RESULT_VARIABLE EXIT_CODE) if(NOT (EXIT_CODE EQUAL 0)) message(FATAL_ERROR "${TEST_COMMAND_REL_PATH} has failed: ${EXIT_CODE}") diff --git a/cmake/run_unit_tests.sh b/cmake/run_unit_tests.sh index cee04d1b72..b2e096ce45 100755 --- a/cmake/run_unit_tests.sh +++ b/cmake/run_unit_tests.sh @@ -10,5 +10,5 @@ fi script_dir=$(dirname "$0") -cmake "-DSILKWORM_BUILD_DIR=$1" "-DSILKWORM_CLANG_COVERAGE=$2" "-DSILKWORM_SANITIZE=$3" -P "$script_dir/run_unit_tests.cmake" \ +cmake "-DSILKWORM_BUILD_DIR=$1" "-DSILKWORM_CLANG_COVERAGE=$2" "-DSILKWORM_SANITIZE=$3" "-SILKWORM_PROJECT_DIR=$4" -P "$script_dir/run_unit_tests.cmake" \ | grep -Ev '^(Randomness|RNG seed|============================)' diff --git a/tsan_suppressions.txt b/tools/sanitizer/tsan_suppressions.txt similarity index 100% rename from tsan_suppressions.txt rename to tools/sanitizer/tsan_suppressions.txt From f9ddfd8548cc6c004bf32a1c8ea774c9c2b3d73b Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Thu, 19 Dec 2024 22:24:35 +0100 Subject: [PATCH 25/48] docs: copy dbtool doc from GH wiki (#2613) --- docs/db_toolbox.md | 359 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 359 insertions(+) create mode 100644 docs/db_toolbox.md diff --git a/docs/db_toolbox.md b/docs/db_toolbox.md new file mode 100644 index 0000000000..62218423f6 --- /dev/null +++ b/docs/db_toolbox.md @@ -0,0 +1,359 @@ +Silkworm implements a small utility named `db_toolbox` which helps dealing with large LMDB datafile produced by Turbo-Geth. +Simple usage is `./db_toolbox [OPTIONS] [SUBCOMMAND] [SUBCOMMANDOPTIONS]` + +# OPTIONS +Common options always specify the base data file to open : +- `--datadir` which indicates the **directory** path where `data.mdb` is located +- `--lmdb.mapSize` which indicates the **LMDB map size** of data.mdb + +### Caveat +LMDB's mapSize value basically indicates the width of the segment of virtual memory that has been assigned a direct byte-for-byte correlation with with the data file on disk. This exhibits a very different behavior amongst Linux OS and Windows OS: while in the first case mapSize value behaves as a "limit" for the data file growth, on Windows there is a 1:1 relation amongst mapSize value and the effective size on disk. Put in other words : if, on Linux, we open a **new** LMDB data file specifying 10GB mapSize, we will have a data file with an effective size of few bytes until we begin to insert new data and eventually the growth of file size is limited by mapSize value (i.e. the file won't grow beyond 10GB and any attempt to insert new data will return an `MDB_MAPFULL` error). On Windows instead, the opening of a **new** LMDB data file with 10GB mapSize will result in the immediate allocation on disk of a file sized 10GB. + +### Hint +Omitting the specification of --lmdb.mapSize is allowed as long as the data file already exists on disk. In such case the value is automatically adjusted to the size of data.mdb. This is like specifying an `lmdb.mapSize == 0`. +**Warning** : although db_toolbox protects against errors is highly discouraged to provide a value for --lmdb.mapSize lower than actual file size cause, as observed behavior, the result is a truncation of data file to a size matching --lmdb.mapSize thus causing the invalidation of all mappings for existing data. + +# Subcommand : tables +Usage `./db_toolbox --datadir tables` + +This subcommand requires no additional arguments and provides a detailed list of tables stored into data.mdb. +Here is a sample output: +``` + Database tables : 40 + Database page size : 4096 + + Dbi Table name Records D Branch Leaf Overflow Size + --- ------------------------ ---------- -- ---------- ---------- ---------- ------------ + 0 [FREE_DBI] 1298 2 1 38 2662 11063296 + 1 [MAIN_DBI] 38 1 0 1 0 4096 + 2 ACS 0 0 0 0 0 0 + 3 B 0 0 0 0 0 0 + 4 CODE 332167 4 551 36369 471560 2082734080 + 5 CST2 480725185 5 42626 2983648 0 12395618304 + 6 DBINFO 4 1 0 1 0 4096 + 7 DatabaseVersion 1 1 0 1 0 4096 + 8 H 11093179 4 2888 183237 0 762368000 + 9 LastBlock 1 1 0 1 0 4096 + 10 LastFast 1 1 0 1 0 4096 + 11 LastHeader 1 1 0 1 0 4096 + 12 PLAIN-ACS 11093083 4 2206 636977 13858850 59383943168 + 13 PLAIN-CST2 480725185 5 23356 2423015 0 10020335616 + 14 PLAIN-SCS 8060176 4 1199 345971 19021260 79333089280 + 15 PLAIN-contractCode 28925348 5 10217 727455 0 3021504512 + 16 SCS 0 0 0 0 0 0 + 17 SNINFO 0 0 0 0 0 0 + 18 SSP2 13 1 0 1 0 4096 + 19 SSU2 12 1 0 1 0 4096 + 20 TrieSync 0 0 0 0 0 0 + 21 b 11093154 5 7247 579534 44431570 184395165696 + 22 call_from_index 0 0 0 0 0 0 + 23 call_to_index 0 0 0 0 0 0 + 24 clique- 0 0 0 0 0 0 + 25 contractCode 20079491 5 13292 647684 0 2707357696 + 26 ethereum-config- 1 1 0 1 0 4096 + 27 h 33279441 5 24581 2054802 0 8517152768 + 28 hAT 139283444 5 70658 3774220 657381 18441252864 + 29 hST 468672601 6 190311 10240434 472990 44661698560 + 30 iB 0 0 0 0 0 0 + 31 iTh2 161166225 4 4472 585499 0 2416521216 + 32 incarnationMap 10390653 4 1487 140197 0 580337664 + 33 l 874122311 5 210798 10736097 0 44838481920 + 34 log_address_index 2922721 4 870 91062 157358 1021091840 + 35 log_topic_index 102732305 5 54006 3118356 259925 14058647552 + 36 migrations 10 1 0 1 0 4096 + 37 r 11093083 4 5655 452366 42411330 175592861696 + 38 secure-key- 0 0 0 0 0 0 + 39 txSenders 9553003 5 17663 1412848 4982030 26265767936 + + Database map size : 773094113280 + Size of file on disk : 773094113280 + Data pages count : 168580819 + Data pages size : 690507034624 + Reclaimable pages : 1335698 + Reclaimable size : 5471019008 + Free space available : 88058097664 +``` + +Each table reports: +- the id it was opened with +- the name +- the number of records stored +- the maximum depth of the Btree +- The **number of pages** for Branch, Leaf and Overflow +- The overall size of data stored which is `(Branch + Leaf + Overflow) * Database page size` + +The bottom part of the report depicts the storage status of the data file. + +# Subcommand : freelist +Usage `./db_toolbox --datadir freelist [--detail]` + +This produces as output the sum of reclaimable space held in FREE_DBI. +Sample : +``` + Total free pages : 1335698 + Total free size : 5471019008 +``` +When the `--detail` CLI flag is also provided, the output records the free reclaimable datapages for each transaction which have freed some. +Sample : +``` + TxId Pages Size +--------- --------- ------------ + 33133 263 1077248 + 33134 509 2084864 + 33135 509 2084864 + 33136 509 2084864 + 33137 509 2084864 + 33138 509 2084864 + 33139 509 2084864 + 33140 509 2084864 + 33141 509 2084864 + 33142 509 2084864 + 33143 509 2084864 + 33144 509 2084864 + 33145 509 2084864 + 33146 509 2084864 + 33147 509 2084864 + 33148 509 2084864 + 33149 509 2084864 + 33150 509 2084864 + 33151 509 2084864 + 33152 509 2084864 + 33153 509 2084864 + 33154 509 2084864 + 33155 509 2084864 + 33156 509 2084864 + 33157 509 2084864 + [ ... ] + 34419 288 1179648 + 34420 6 24576 + 34421 12157 49795072 + 34422 6 24576 + 34423 15 61440 + 34424 6 24576 + 34425 12 49152 + 34426 6 24576 + 34427 6 24576 + 34428 59 241664 + 34429 6 24576 + 34430 9569 39194624 + + Total free pages : 1335698 + Total free size : 5471019008 +``` + +# Subcommand : clear +Usage `./db_toolbox --datadir clear --names [--drop]` + +This command provides a handy way to empty a table from all records or drop it. + +Example : +`./db_toolbox --datadir clear --names h b` + +will delete all records from tables `h` and `b` but the table (meant as a container) will remain into database. + +Example : +`./db_toolbox --datadir clear --names h b --drop` + +will delete tables `h` and `b` from database just like a SQL `drop` statement. + +## Caveat +Like all operations on LMDB the deletion of records (or of an entire table) lives within a writable transaction and by consequence requires database file to have enough space available to record all data pages which will be freed by the transaction. This implies the size of database file may grow. + +# Subcommand : compact +Usage `./db_toolbox --datadir compact --workdir [--replace] [--nobak]` + +The purpose of this subcommand is to obtain a _compacted_ data file. The compaction process renumbers all data pages while reclaiming those previously freed by preceding transactions. This command is the implementation of `mdb_env_copy2` LMDB API call with `MDB_CP_COMPACT` flag. +Running this command reports no progress and, ad indicative figure, took more than 6 hours to compact an 730GB data file on Windows with NMVe storage support. +Additional flag `--replace` will replace origin data file with compacted one by renaming original data file with `.bak` suffix. +Eventually flag `--nobak` will prevent the creation of the bak copy and directly overwrites the origin file. + +This is a sample output of `tables` command **before** a compact action +``` + Database tables : 40 + Database page size : 4096 + + Dbi Table name Records D Branch Leaf Overflow Size + --- ------------------------ ---------- -- ---------- ---------- ---------- ------------ + 0 [FREE_DBI] 1298 2 1 38 2662 11063296 + 1 [MAIN_DBI] 38 1 0 1 0 4096 + 2 ACS 0 0 0 0 0 0 + 3 B 0 0 0 0 0 0 + 4 CODE 332167 4 551 36369 471560 2082734080 + 5 CST2 480725185 5 42626 2983648 0 12395618304 + 6 DBINFO 4 1 0 1 0 4096 + 7 DatabaseVersion 1 1 0 1 0 4096 + 8 H 11093179 4 2888 183237 0 762368000 + 9 LastBlock 1 1 0 1 0 4096 + 10 LastFast 1 1 0 1 0 4096 + 11 LastHeader 1 1 0 1 0 4096 + 12 PLAIN-ACS 11093083 4 2206 636977 13858850 59383943168 + 13 PLAIN-CST2 480725185 5 23356 2423015 0 10020335616 + 14 PLAIN-SCS 8060176 4 1199 345971 19021260 79333089280 + 15 PLAIN-contractCode 28925348 5 10217 727455 0 3021504512 + 16 SCS 0 0 0 0 0 0 + 17 SNINFO 0 0 0 0 0 0 + 18 SSP2 13 1 0 1 0 4096 + 19 SSU2 12 1 0 1 0 4096 + 20 TrieSync 0 0 0 0 0 0 + 21 b 11093154 5 7247 579534 44431570 184395165696 + 22 call_from_index 0 0 0 0 0 0 + 23 call_to_index 0 0 0 0 0 0 + 24 clique- 0 0 0 0 0 0 + 25 contractCode 20079491 5 13292 647684 0 2707357696 + 26 ethereum-config- 1 1 0 1 0 4096 + 27 h 33279441 5 24581 2054802 0 8517152768 + 28 hAT 139283444 5 70658 3774220 657381 18441252864 + 29 hST 468672601 6 190311 10240434 472990 44661698560 + 30 iB 0 0 0 0 0 0 + 31 iTh2 161166225 4 4472 585499 0 2416521216 + 32 incarnationMap 10390653 4 1487 140197 0 580337664 + 33 l 874122311 5 210798 10736097 0 44838481920 + 34 log_address_index 2922721 4 870 91062 157358 1021091840 + 35 log_topic_index 102732305 5 54006 3118356 259925 14058647552 + 36 migrations 10 1 0 1 0 4096 + 37 r 11093083 4 5655 452366 42411330 175592861696 + 38 secure-key- 0 0 0 0 0 0 + 39 txSenders 9553003 5 17663 1412848 4982030 26265767936 + + Database map size : 773094113280 + Size of file on disk : 773094113280 + Data pages count : 168580819 + Data pages size : 690507034624 + Reclaimable pages : 1335698 + Reclaimable size : 5471019008 + Free space available : 88058097664 +``` + +And this is the same database **after** a compaction (6 hours and 10 minutes later) +``` + Database tables : 40 + Database page size : 4096 + + Dbi Table name Records D Branch Leaf Overflow Size + --- ------------------------ ---------- -- ---------- ---------- ---------- ------------ + 0 [FREE_DBI] 0 0 0 0 0 0 + 1 [MAIN_DBI] 38 1 0 1 0 4096 + 2 ACS 0 0 0 0 0 0 + 3 B 0 0 0 0 0 0 + 4 CODE 332167 4 551 36369 471560 2082734080 + 5 CST2 480725185 5 42626 2983648 0 12395618304 + 6 DBINFO 4 1 0 1 0 4096 + 7 DatabaseVersion 1 1 0 1 0 4096 + 8 H 11093179 4 2888 183237 0 762368000 + 9 LastBlock 1 1 0 1 0 4096 + 10 LastFast 1 1 0 1 0 4096 + 11 LastHeader 1 1 0 1 0 4096 + 12 PLAIN-ACS 11093083 4 2206 636977 13858850 59383943168 + 13 PLAIN-CST2 480725185 5 23356 2423015 0 10020335616 + 14 PLAIN-SCS 8060176 4 1199 345971 19021260 79333089280 + 15 PLAIN-contractCode 28925348 5 10217 727455 0 3021504512 + 16 SCS 0 0 0 0 0 0 + 17 SNINFO 0 0 0 0 0 0 + 18 SSP2 13 1 0 1 0 4096 + 19 SSU2 12 1 0 1 0 4096 + 20 TrieSync 0 0 0 0 0 0 + 21 b 11093154 5 7247 579534 44431570 184395165696 + 22 call_from_index 0 0 0 0 0 0 + 23 call_to_index 0 0 0 0 0 0 + 24 clique- 0 0 0 0 0 0 + 25 contractCode 20079491 5 13292 647684 0 2707357696 + 26 ethereum-config- 1 1 0 1 0 4096 + 27 h 33279441 5 24581 2054802 0 8517152768 + 28 hAT 139283444 5 70658 3774220 657381 18441252864 + 29 hST 468672601 6 190311 10240434 472990 44661698560 + 30 iB 0 0 0 0 0 0 + 31 iTh2 161166225 4 4472 585499 0 2416521216 + 32 incarnationMap 10390653 4 1487 140197 0 580337664 + 33 l 874122311 5 210798 10736097 0 44838481920 + 34 log_address_index 2922721 4 870 91062 157358 1021091840 + 35 log_topic_index 102732305 5 54006 3118356 259925 14058647552 + 36 migrations 10 1 0 1 0 4096 + 37 r 11093083 4 5655 452366 42411330 175592861696 + 38 secure-key- 0 0 0 0 0 0 + 39 txSenders 9553003 5 17663 1412848 4982030 26265767936 + + Database map size : 750808727552 + Size of file on disk : 750808682496 + Data pages count : 168578118 + Data pages size : 690495971328 + Reclaimable pages : 0 + Reclaimable size : 0 + Free space available : 60312756224 +``` + +## Caveat +To run the compact action you need free storage space available at least equal to size of origin data file. +Please note that this tool does reclaim free space **but does not defragment** tables segments. + +# Subcommand : copy +This tools gives the user the ability to copy individual table(s) from one database to another instead of keeping copies of entire databases. + +Usage +``` +./db_toolbox --datadir copy --targetdir \ + [--create --new.mapSize ] [--tables ] \ + [--noempty] [--upsert] [--commit] +``` +where +- `--targetdir` specifies the target directory holding the target data.mdb (directory must exist) +- if target data.mdb does not exist (i.e. target directory is empty) must specify `--create` and `--new.mapSize` with the initial map size for the data file being created +- `--tables` specifies a list of table names to copy. If omitted all **known** tables (see below) from origin data file will be copied +- `--noempty` flag specifies origin empty tables must not be copied (i.e. they're not created on target) +- `--upsert` flag forces the tool to copy origin data into target using Upserts instead of Appends. This is necessary when target db already exists and already contains populated tables with identical name +- `--commit` specifies the weight of each commit. By default the copy action commits every 5GB. + +**Limitation to known tables** : due to the nature of copy action the tool **must know** in advance the _definition_ of origin and target table (for example if is DUPSORTed) and by consequence all tables which do not have a definition in Turbo-Geth (and in Silkworm) code will be skipped. + +This tool automatically enlarges data file on behalf of the amount of data being copied. When `--upsert` CLI flag is active free_dbi pages are reused if possible. When, instead, default append mode data is stored, according to LMDB documentation, at the end of database. + +A useful progress is provided like in this sample: +``` +db_toolbox --datadir e:\tg\tg\chaindata copy --targetdir e:\tg\compact-temp --tables hAT hST + + Table Progress + ------------------------ -------------------------------------------------- + [FREE_DBI] Skipped (SYSTEM TABLE) + [MAIN_DBI] Skipped (SYSTEM TABLE) + ACS Skipped (no match --tables) + B Skipped (no match --tables) + CODE Skipped (no match --tables) + CST2 Skipped (no match --tables) + DBINFO Skipped (no match --tables) + DatabaseVersion Skipped (no match --tables) + H Skipped (unknown table) + LastBlock Skipped (no match --tables) + LastFast Skipped (no match --tables) + LastHeader Skipped (no match --tables) + PLAIN-ACS Skipped (no match --tables) + PLAIN-CST2 Skipped (no match --tables) + PLAIN-SCS Skipped (no match --tables) + PLAIN-contractCode Skipped (no match --tables) + SCS Skipped (no match --tables) + SNINFO Skipped (unknown table) + SSP2 Skipped (no match --tables) + SSU2 Skipped (no match --tables) + TrieSync Skipped (no match --tables) + b Skipped (no match --tables) + call_from_index Skipped (unknown table) + call_to_index Skipped (unknown table) + clique- Skipped (no match --tables) + contractCode Skipped (no match --tables) + ethereum-config- Skipped (no match --tables) + h Skipped (no match --tables) + hAT ............................W..................... + hST .W......W......W.......W......W.......W......W.... + iB Skipped (no match --tables) + iTh2 Skipped (no match --tables) + incarnationMap Skipped (no match --tables) + l Skipped (no match --tables) + log_address_index Skipped (no match --tables) + log_topic_index Skipped (no match --tables) + migrations Skipped (no match --tables) + r Skipped (no match --tables) + secure-key- Skipped (no match --tables) + txSenders Skipped (no match --tables) + All done! +``` + +When a table is effectively being copied each dot `.` represent 2% of overall records. +An `W` instead of `.` means in the last 2% there has been a commit (according to `--commit` value) From 76bd2f4ae6aa504d34a97d6e2863cd85ce65b565 Mon Sep 17 00:00:00 2001 From: Sixtysixter <20945591+Sixtysixter@users.noreply.github.com> Date: Fri, 20 Dec 2024 16:50:47 +0100 Subject: [PATCH 26/48] rpcdaemon: erigon_getLatestLogs for e3 (#2611) --- .github/workflows/rpc-integration-tests.yml | 2 +- silkworm/core/common/util.hpp | 5 +++ silkworm/rpc/commands/erigon_api.cpp | 5 ++- silkworm/rpc/core/block_reader.cpp | 3 ++ silkworm/rpc/core/block_reader_test.cpp | 3 +- silkworm/rpc/core/logs_walker.cpp | 39 +++++++++++++++++---- silkworm/rpc/types/filter.hpp | 1 + 7 files changed, 48 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rpc-integration-tests.yml b/.github/workflows/rpc-integration-tests.yml index 61035ca934..5417d856c6 100644 --- a/.github/workflows/rpc-integration-tests.yml +++ b/.github/workflows/rpc-integration-tests.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git -c advice.detachedHead=false clone --depth 1 --branch v1.26.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v1.27.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests pip3 install -r requirements.txt --break-system-packages diff --git a/silkworm/core/common/util.hpp b/silkworm/core/common/util.hpp index 7da9a629b0..9d81c2921c 100644 --- a/silkworm/core/common/util.hpp +++ b/silkworm/core/common/util.hpp @@ -58,6 +58,11 @@ inline bool is_valid_hex(std::string_view s) { return std::regex_match(s.data(), kHexRegex); } +inline bool is_valid_dec(std::string_view s) { + static const std::regex kHexRegex("^[0-9]+$"); + return std::regex_match(s.data(), kHexRegex); +} + inline bool is_valid_hash(std::string_view s) { if (s.length() != 2 + kHashLength * 2) { return false; diff --git a/silkworm/rpc/commands/erigon_api.cpp b/silkworm/rpc/commands/erigon_api.cpp index 09d39bb4c1..59607068dc 100644 --- a/silkworm/rpc/commands/erigon_api.cpp +++ b/silkworm/rpc/commands/erigon_api.cpp @@ -331,10 +331,12 @@ Task ErigonRpcApi::handle_erigon_get_latest_logs(const nlohmann::json& req co_return; } - LogFilterOptions options{true}; + LogFilterOptions options{true, true}; if (params.size() > 1) { options = params[1].get(); + options.add_timestamp = true; + options.overwrite_log_index = true; } if (options.log_count != 0 && options.block_count != 0) { @@ -368,6 +370,7 @@ Task ErigonRpcApi::handle_erigon_get_latest_logs(const nlohmann::json& req co_await tx->close(); // RAII not (yet) available with coroutines co_return; } + SILK_DEBUG << "start: " << start << " end: " << end; std::vector logs; co_await logs_walker.get_logs(start, end, filter.addresses, filter.topics, options, true, logs); diff --git a/silkworm/rpc/core/block_reader.cpp b/silkworm/rpc/core/block_reader.cpp index d1b3076269..15a05573d1 100644 --- a/silkworm/rpc/core/block_reader.cpp +++ b/silkworm/rpc/core/block_reader.cpp @@ -150,6 +150,9 @@ Task> BlockReader::get_block_num(const std::string& bl } else if (is_valid_hex(block_id)) { block_num = static_cast(std::stol(block_id, nullptr, 16)); check_if_latest = latest_required; + } else if (is_valid_dec(block_id)) { + block_num = static_cast(std::stol(block_id, nullptr, 10)); + check_if_latest = latest_required; } else { throw std::invalid_argument("get_block_num::Invalid Block Id"); } diff --git a/silkworm/rpc/core/block_reader_test.cpp b/silkworm/rpc/core/block_reader_test.cpp index 5577f1991d..4f06abdcf1 100644 --- a/silkworm/rpc/core/block_reader_test.cpp +++ b/silkworm/rpc/core/block_reader_test.cpp @@ -152,7 +152,8 @@ TEST_CASE("get_block_num latest_required", "[rpc][core][blocks]") { SECTION("block_num in dec") { static const std::string kBlockIdDec = "67890"; auto result = boost::asio::co_spawn(pool, block_reader.get_block_num(kBlockIdDec, /*latest_required=*/false), boost::asio::use_future); - REQUIRE_THROWS(result.get()); + auto [block_num, ignore] = result.get(); + CHECK(block_num == 67890); } SECTION("block_num in hex & latest true") { diff --git a/silkworm/rpc/core/logs_walker.cpp b/silkworm/rpc/core/logs_walker.cpp index 66385834c3..ad8ac21ae9 100644 --- a/silkworm/rpc/core/logs_walker.cpp +++ b/silkworm/rpc/core/logs_walker.cpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include @@ -93,6 +92,11 @@ Task LogsWalker::get_logs(BlockNum start, db::kv::api::PaginatedStream paginated_stream; if (!topics.empty()) { for (auto sub_topic = topics.begin(); sub_topic < topics.end(); ++sub_topic) { + if (sub_topic->empty()) { + continue; + } + + db::kv::api::PaginatedStream union_stream; for (auto it = sub_topic->begin(); it < sub_topic->end(); ++it) { SILK_DEBUG << "topic: " << to_hex(*it) << ", from_timestamp: " << from_timestamp << ", to_timestamp: " << to_timestamp; @@ -104,8 +108,13 @@ Task LogsWalker::get_logs(BlockNum start, .to_timestamp = to_timestamp, .ascending_order = asc_order}; auto paginated_result = co_await tx_.index_range(std::move(query)); - paginated_stream = db::kv::api::set_union(std::move(paginated_stream), co_await paginated_result.begin()); + union_stream = db::kv::api::set_union(std::move(union_stream), co_await paginated_result.begin()); + } + if (!paginated_stream) { + paginated_stream = std::move(union_stream); + continue; } + paginated_stream = db::kv::api::set_intersection(std::move(paginated_stream), std::move(union_stream)); } } if (!addresses.empty()) { @@ -139,6 +148,7 @@ Task LogsWalker::get_logs(BlockNum start, uint64_t log_count{0}; Logs filtered_chunk_logs; + uint64_t block_timestamp; auto itr = db::txn::make_txn_nums_stream(std::move(paginated_stream), asc_order, tx_, provider); while (const auto tnx_nums = co_await itr->next()) { if (tnx_nums->final_txn) { @@ -152,10 +162,9 @@ Task LogsWalker::get_logs(BlockNum start, SILK_DEBUG << "Not found block no. " << tnx_nums->block_num; break; } + block_timestamp = block_with_hash->block.header.timestamp; receipts = co_await core::get_receipts(tx_, *block_with_hash, *chain_storage, workers_); SILK_DEBUG << "Read #" << receipts.size() << " receipts from block " << tnx_nums->block_num; - - ++block_count; } const auto transaction = co_await chain_storage->read_transaction_by_idx_in_block(tnx_nums->block_num, tnx_nums->txn_index); if (!transaction) { @@ -166,16 +175,32 @@ Task LogsWalker::get_logs(BlockNum start, SILK_DEBUG << "Got transaction: block_num: " << tnx_nums->block_num << ", txn_index: " << tnx_nums->txn_index; SILKWORM_ASSERT(tnx_nums->txn_index < receipts.size()); - const auto& receipt = receipts.at(tnx_nums->txn_index); + auto& receipt = receipts.at(tnx_nums->txn_index); - SILK_DEBUG << "#rawLogs: " << receipt.logs.size(); + // ERIGON3 compatibility: erigon_getLatestLogs overwrites log index + if (options.overwrite_log_index) { + uint32_t log_index{0}; + for (auto& log : receipt.logs) { + log.index = log_index++; + } + } + + SILK_DEBUG << "blockNum: " << tnx_nums->block_num << ", #rawLogs: " << receipt.logs.size(); filtered_chunk_logs.clear(); filter_logs(receipt.logs, addresses, topics, filtered_chunk_logs, options.log_count == 0 ? 0 : options.log_count - log_count); SILK_DEBUG << "filtered #logs: " << filtered_chunk_logs.size(); - + if (filtered_chunk_logs.empty()) { + continue; + } + ++block_count; log_count += filtered_chunk_logs.size(); SILK_DEBUG << "log_count: " << log_count; + if (options.add_timestamp) { + for (auto& log : filtered_chunk_logs) { + log.timestamp = block_timestamp; + } + } logs.insert(logs.end(), filtered_chunk_logs.begin(), filtered_chunk_logs.end()); if (options.log_count != 0 && options.log_count <= log_count) { diff --git a/silkworm/rpc/types/filter.hpp b/silkworm/rpc/types/filter.hpp index be2e2543c2..9ccdd99c23 100644 --- a/silkworm/rpc/types/filter.hpp +++ b/silkworm/rpc/types/filter.hpp @@ -39,6 +39,7 @@ struct Filter { struct LogFilterOptions { bool add_timestamp{false}; + bool overwrite_log_index{false}; std::uint64_t log_count{0}; std::uint64_t block_count{0}; bool ignore_topics_order{false}; From 377c803a9341a2eccaa032a648a4566c8d429d92 Mon Sep 17 00:00:00 2001 From: Sixtysixter <20945591+Sixtysixter@users.noreply.github.com> Date: Fri, 20 Dec 2024 18:28:06 +0100 Subject: [PATCH 27/48] rpcdaemon: enabled erigon_getLatestLogs tests (#2615) --- .github/workflows/run_integration_tests.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/run_integration_tests.sh b/.github/workflows/run_integration_tests.sh index 8d06af72be..7b71015861 100755 --- a/.github/workflows/run_integration_tests.sh +++ b/.github/workflows/run_integration_tests.sh @@ -42,8 +42,7 @@ debug_traceTransaction/test_91.tar,\ debug_traceTransaction/test_92.tar,\ debug_traceTransaction/test_96.json,\ trace_replayBlockTransactions/test_29,\ -engine_,\ -erigon_getLatestLogs +engine_ failed_test=$? From 2d84274840f091aad3d4b9c03bd3f6394bd30ccc Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Sat, 21 Dec 2024 11:10:16 +0100 Subject: [PATCH 28/48] node: fix task caller lifecycle in Triggers schedule (#2605) --- .../node/stagedsync/stages/stage_triggers.cpp | 8 +-- .../node/stagedsync/stages/stage_triggers.hpp | 4 +- .../stagedsync/stages/stage_triggers_test.cpp | 50 +++++++++++++++++++ 3 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 silkworm/node/stagedsync/stages/stage_triggers_test.cpp diff --git a/silkworm/node/stagedsync/stages/stage_triggers.cpp b/silkworm/node/stagedsync/stages/stage_triggers.cpp index a418218464..e9f9877f44 100644 --- a/silkworm/node/stagedsync/stages/stage_triggers.cpp +++ b/silkworm/node/stagedsync/stages/stage_triggers.cpp @@ -40,13 +40,13 @@ Stage::Result TriggersStage::forward(db::RWTxn& tx) { } Task TriggersStage::schedule(std::function callback) { - auto task_caller = [this, c = std::move(callback)]() -> Task { - db::RWTxn* tx = this->current_tx_; + auto task_caller = [](auto* self, auto trigger) -> Task { + db::RWTxn* tx = self->current_tx_; SILKWORM_ASSERT(tx); - c(*tx); + trigger(*tx); co_return; }; - return concurrency::spawn_task(ioc_, task_caller()); + return concurrency::spawn_task(ioc_, task_caller(this, std::move(callback))); } bool TriggersStage::stop() { diff --git a/silkworm/node/stagedsync/stages/stage_triggers.hpp b/silkworm/node/stagedsync/stages/stage_triggers.hpp index b16e0de3b8..9686fccae4 100644 --- a/silkworm/node/stagedsync/stages/stage_triggers.hpp +++ b/silkworm/node/stagedsync/stages/stage_triggers.hpp @@ -37,8 +37,10 @@ class TriggersStage : public Stage, public datastore::StageScheduler { bool stop() override; - private: + protected: boost::asio::io_context ioc_; + + private: db::RWTxn* current_tx_{}; }; diff --git a/silkworm/node/stagedsync/stages/stage_triggers_test.cpp b/silkworm/node/stagedsync/stages/stage_triggers_test.cpp new file mode 100644 index 0000000000..e5fbea1179 --- /dev/null +++ b/silkworm/node/stagedsync/stages/stage_triggers_test.cpp @@ -0,0 +1,50 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "stage_triggers.hpp" + +#include + +#include +#include +#include + +namespace silkworm::stagedsync { + +using namespace silkworm::db; +using db::test_util::TempChainDataStore; + +class TriggersStateForTest : public TriggersStage { + public: + using TriggersStage::TriggersStage; + boost::asio::io_context& io_context() { return ioc_; } +}; + +TEST_CASE("TriggersStage: scheduled task lifetime") { + TempChainDataStore temp_chaindata; + RWTxn& txn{temp_chaindata.rw_txn()}; + txn.disable_commit(); + + stagedsync::SyncContext sync_context{}; + TriggersStateForTest stage_triggers{&sync_context}; + auto future = concurrency::spawn_future(stage_triggers.io_context(), stage_triggers.schedule([](auto& rw_txn) { + rw_txn.is_open(); + })); + REQUIRE(stage_triggers.forward(txn) == stagedsync::Stage::Result::kSuccess); + CHECK_NOTHROW(future.get()); +} + +} // namespace silkworm::stagedsync From 62b69b02c3214aa0a69577ed42e6e095547bacf9 Mon Sep 17 00:00:00 2001 From: Sixtysixter <20945591+Sixtysixter@users.noreply.github.com> Date: Mon, 23 Dec 2024 16:20:08 +0100 Subject: [PATCH 29/48] rpcdaemon: fix use-after-free in erigon_getLatestLogs (#2617) --- silkworm/rpc/commands/erigon_api.cpp | 4 +++- silkworm/rpc/commands/eth_api.cpp | 15 +++++++++++---- silkworm/rpc/core/logs_walker.hpp | 4 ++-- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/silkworm/rpc/commands/erigon_api.cpp b/silkworm/rpc/commands/erigon_api.cpp index 59607068dc..b532e05ba5 100644 --- a/silkworm/rpc/commands/erigon_api.cpp +++ b/silkworm/rpc/commands/erigon_api.cpp @@ -354,7 +354,9 @@ Task ErigonRpcApi::handle_erigon_get_latest_logs(const nlohmann::json& req auto tx = co_await database_->begin(); try { - LogsWalker logs_walker(*block_cache_, *tx, *backend_, workers_); + auto storage = tx->create_storage(); + LogsWalker logs_walker(*block_cache_, *tx, *storage, *backend_, workers_); + const auto [start, end] = co_await logs_walker.get_block_nums(filter); if (start == end && start == std::numeric_limits::max()) { auto error_msg = "invalid eth_getLogs filter block_hash: " + filter.block_hash.value(); diff --git a/silkworm/rpc/commands/eth_api.cpp b/silkworm/rpc/commands/eth_api.cpp index 9e836b996c..7a9a39986c 100644 --- a/silkworm/rpc/commands/eth_api.cpp +++ b/silkworm/rpc/commands/eth_api.cpp @@ -1516,7 +1516,8 @@ Task EthereumRpcApi::handle_eth_new_filter(const nlohmann::json& request, auto tx = co_await database_->begin(); try { - LogsWalker logs_walker{*block_cache_, *tx, *backend_, workers_}; + auto storage = tx->create_storage(); + LogsWalker logs_walker(*block_cache_, *tx, *storage, *backend_, workers_); const auto [start, end] = co_await logs_walker.get_block_nums(filter); filter.start = start; @@ -1600,7 +1601,9 @@ Task EthereumRpcApi::handle_eth_get_filter_logs(const nlohmann::json& requ auto tx = co_await database_->begin(); try { - LogsWalker logs_walker{*block_cache_, *tx, *backend_, workers_}; + auto storage = tx->create_storage(); + LogsWalker logs_walker(*block_cache_, *tx, *storage, *backend_, workers_); + const auto [start, end] = co_await logs_walker.get_block_nums(filter); if (filter.start != start && filter.end != end) { @@ -1649,7 +1652,9 @@ Task EthereumRpcApi::handle_eth_get_filter_changes(const nlohmann::json& r auto tx = co_await database_->begin(); try { - LogsWalker logs_walker{*block_cache_, *tx, *backend_, workers_}; + auto storage = tx->create_storage(); + LogsWalker logs_walker(*block_cache_, *tx, *storage, *backend_, workers_); + const auto [start, end] = co_await logs_walker.get_block_nums(filter); std::vector logs; @@ -1717,7 +1722,9 @@ Task EthereumRpcApi::handle_eth_get_logs(const nlohmann::json& request, st auto tx = co_await database_->begin(); try { - LogsWalker logs_walker{*block_cache_, *tx, *backend_, workers_}; + auto storage = tx->create_storage(); + LogsWalker logs_walker(*block_cache_, *tx, *storage, *backend_, workers_); + const auto [start, end] = co_await logs_walker.get_block_nums(filter); if (start == end && start == std::numeric_limits::max()) { auto error_msg = "invalid eth_getLogs filter block_hash: " + filter.block_hash.value(); diff --git a/silkworm/rpc/core/logs_walker.hpp b/silkworm/rpc/core/logs_walker.hpp index 6e88054582..8831655e4c 100644 --- a/silkworm/rpc/core/logs_walker.hpp +++ b/silkworm/rpc/core/logs_walker.hpp @@ -34,8 +34,8 @@ using boost::asio::awaitable; class LogsWalker { public: - explicit LogsWalker(BlockCache& block_cache, db::kv::api::Transaction& tx, ethbackend::BackEnd& backend, WorkerPool& workers) - : block_cache_(block_cache), tx_(tx), block_reader_(*tx.create_storage(), tx), backend_{backend}, workers_{workers} {} + explicit LogsWalker(BlockCache& block_cache, db::kv::api::Transaction& tx, const db::chain::ChainStorage& chain_storage, ethbackend::BackEnd& backend, WorkerPool& workers) + : block_cache_(block_cache), tx_(tx), block_reader_(chain_storage, tx), backend_{backend}, workers_{workers} {} LogsWalker(const LogsWalker&) = delete; LogsWalker& operator=(const LogsWalker&) = delete; From b0ce84b97a48ad80bb368319c6aee30f35cf3497 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:04:43 +0100 Subject: [PATCH 30/48] rpcdaemon: add NoRefunds flag in some debug API (#2616) --- .github/workflows/rpc-integration-tests.yml | 2 +- .github/workflows/run_integration_tests.sh | 1 + silkworm/rpc/core/evm_debug.cpp | 15 ++++++++++++--- silkworm/rpc/core/evm_debug.hpp | 1 + silkworm/rpc/core/evm_debug_test.cpp | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rpc-integration-tests.yml b/.github/workflows/rpc-integration-tests.yml index 5417d856c6..338544a54c 100644 --- a/.github/workflows/rpc-integration-tests.yml +++ b/.github/workflows/rpc-integration-tests.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git -c advice.detachedHead=false clone --depth 1 --branch v1.27.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v1.28.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests pip3 install -r requirements.txt --break-system-packages diff --git a/.github/workflows/run_integration_tests.sh b/.github/workflows/run_integration_tests.sh index 7b71015861..81900aebf6 100755 --- a/.github/workflows/run_integration_tests.sh +++ b/.github/workflows/run_integration_tests.sh @@ -28,6 +28,7 @@ debug_traceBlockByNumber/test_09,\ debug_traceBlockByNumber/test_10,\ debug_traceBlockByNumber/test_11,\ debug_traceBlockByNumber/test_12,\ +debug_traceBlockByNumber/test_21,\ debug_traceCallMany/test_07,\ debug_traceCallMany/test_09,\ debug_traceTransaction/test_25.json,\ diff --git a/silkworm/rpc/core/evm_debug.cpp b/silkworm/rpc/core/evm_debug.cpp index 91afb8a428..995eae16d9 100644 --- a/silkworm/rpc/core/evm_debug.cpp +++ b/silkworm/rpc/core/evm_debug.cpp @@ -39,12 +39,17 @@ void from_json(const nlohmann::json& json, DebugConfig& tc) { json.at("disableStorage").get_to(tc.disable_storage); json.at("disableMemory").get_to(tc.disable_memory); json.at("disableStack").get_to(tc.disable_stack); + + if (json.count("NoRefunds") != 0) { + json.at("NoRefunds").get_to(tc.no_refunds); + } } std::ostream& operator<<(std::ostream& out, const DebugConfig& tc) { out << "disableStorage: " << std::boolalpha << tc.disable_storage; out << " disableMemory: " << std::boolalpha << tc.disable_memory; out << " disableStack: " << std::boolalpha << tc.disable_stack; + out << " NoRefunds: " << std::boolalpha << tc.no_refunds; return out; } @@ -443,6 +448,8 @@ Task DebugExecutor::execute(json::Stream& stream, const ChainStorage& stor auto state = state_factory.create_state(current_executor, storage, txn_id); EVMExecutor executor{block, chain_config, workers_, state}; + bool refunds = !config_.no_refunds; + for (std::uint64_t idx = 0; idx < transactions.size(); ++idx) { rpc::Transaction txn{block.transactions[idx]}; SILK_DEBUG << "processing transaction: idx: " << idx << " txn: " << txn; @@ -456,7 +463,7 @@ Task DebugExecutor::execute(json::Stream& stream, const ChainStorage& stor stream.open_array(); Tracers tracers{debug_tracer}; - const auto execution_result = executor.call(block, txn, tracers, /* refund */ false, /* gasBailout */ false); + const auto execution_result = executor.call(block, txn, tracers, refunds, /* gasBailout */ false); debug_tracer->flush_logs(); stream.close_array(); @@ -517,8 +524,9 @@ Task DebugExecutor::execute( stream.write_field("structLogs"); stream.open_array(); + bool refunds = !config_.no_refunds; Tracers tracers{debug_tracer}; - const auto execution_result = executor.call(block, transaction, tracers); + const auto execution_result = executor.call(block, transaction, tracers, refunds); debug_tracer->flush_logs(); stream.close_array(); @@ -587,6 +595,7 @@ Task DebugExecutor::execute( } stream.open_array(); + bool refunds = !config_.no_refunds; for (const auto& call : bundle.transactions) { silkworm::Transaction txn{call.to_transaction()}; @@ -598,7 +607,7 @@ Task DebugExecutor::execute( auto debug_tracer = std::make_shared(stream, config_); Tracers tracers{debug_tracer}; - const auto execution_result = executor.call(block_context.block_with_hash->block, txn, tracers, /* refund */ false, /* gasBailout */ false); + const auto execution_result = executor.call(block_context.block_with_hash->block, txn, tracers, refunds, /* gasBailout */ false); debug_tracer->flush_logs(); stream.close_array(); diff --git a/silkworm/rpc/core/evm_debug.hpp b/silkworm/rpc/core/evm_debug.hpp index f4f569b3d2..35f10a4b21 100644 --- a/silkworm/rpc/core/evm_debug.hpp +++ b/silkworm/rpc/core/evm_debug.hpp @@ -48,6 +48,7 @@ struct DebugConfig { bool disable_storage{false}; bool disable_memory{false}; bool disable_stack{false}; + bool no_refunds{false}; }; std::string uint256_to_hex(const evmone::uint256& x); diff --git a/silkworm/rpc/core/evm_debug_test.cpp b/silkworm/rpc/core/evm_debug_test.cpp index 14326ceaaf..387e39bb60 100644 --- a/silkworm/rpc/core/evm_debug_test.cpp +++ b/silkworm/rpc/core/evm_debug_test.cpp @@ -1087,7 +1087,7 @@ TEST_CASE_METHOD(DebugExecutorTest, "DebugConfig") { std::ostringstream os; os << config; - CHECK(os.str() == "disableStorage: true disableMemory: false disableStack: true"); + CHECK(os.str() == "disableStorage: true disableMemory: false disableStack: true NoRefunds: false"); } } From 15e8dc9d1983a3b3b525b91174b16fb306018686 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com> Date: Mon, 23 Dec 2024 18:53:17 +0100 Subject: [PATCH 31/48] rpcdaemon: fix in debug_getRawHeader/debug_getRawBlock in case of header/block not found (#2618) --- .github/workflows/rpc-integration-tests.yml | 2 +- silkworm/rpc/commands/debug_api.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/rpc-integration-tests.yml b/.github/workflows/rpc-integration-tests.yml index 338544a54c..f2f4f6cbf0 100644 --- a/.github/workflows/rpc-integration-tests.yml +++ b/.github/workflows/rpc-integration-tests.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git -c advice.detachedHead=false clone --depth 1 --branch v1.28.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v1.29.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests pip3 install -r requirements.txt --break-system-packages diff --git a/silkworm/rpc/commands/debug_api.cpp b/silkworm/rpc/commands/debug_api.cpp index d885145e81..1782e7a68c 100644 --- a/silkworm/rpc/commands/debug_api.cpp +++ b/silkworm/rpc/commands/debug_api.cpp @@ -708,7 +708,7 @@ Task DebugRpcApi::handle_debug_get_raw_block(const nlohmann::json& request reply = make_json_content(request, silkworm::to_hex(encoded_block, true)); } catch (const std::invalid_argument& iv) { SILK_ERROR << "exception: " << iv.what() << " processing request: " << request.dump(); - reply = make_json_error(request, kInvalidParams, iv.what()); + reply = make_json_error(request, kServerError, iv.what()); } catch (const std::exception& e) { SILK_ERROR << "exception: " << e.what() << " processing request: " << request.dump(); reply = make_json_error(request, kInternalError, e.what()); @@ -740,14 +740,14 @@ Task DebugRpcApi::handle_debug_get_raw_header(const nlohmann::json& reques const auto block_hash = co_await chain_storage->read_canonical_header_hash(block_num); const auto header = co_await chain_storage->read_header(block_num, block_hash->bytes); if (!header) { - throw std::invalid_argument("header " + std::to_string(block_num) + " not found"); + throw std::invalid_argument("header not found"); } Bytes encoded_header; rlp::encode(encoded_header, *header); reply = make_json_content(request, silkworm::to_hex(encoded_header, true)); } catch (const std::invalid_argument& iv) { SILK_ERROR << "exception: " << iv.what() << " processing request: " << request.dump(); - reply = make_json_error(request, kInvalidParams, iv.what()); + reply = make_json_error(request, kServerError, iv.what()); } catch (const std::exception& e) { SILK_ERROR << "exception: " << e.what() << " processing request: " << request.dump(); reply = make_json_error(request, kInternalError, e.what()); @@ -783,7 +783,7 @@ Task DebugRpcApi::handle_debug_get_raw_transaction(const nlohmann::json& r reply = make_json_content(request, silkworm::to_hex(rlp, true)); } catch (const std::invalid_argument& iv) { SILK_WARN << "invalid_argument: " << iv.what() << " processing request: " << request.dump(); - reply = make_json_error(request, kInvalidParams, iv.what()); + reply = make_json_error(request, kServerError, iv.what()); } catch (const std::exception& e) { SILK_ERROR << "exception: " << e.what() << " processing request: " << request.dump(); reply = make_json_error(request, kInternalError, e.what()); From 13718e432ff951336f869da5b44c80304f83dabb Mon Sep 17 00:00:00 2001 From: Sixtysixter <20945591+Sixtysixter@users.noreply.github.com> Date: Mon, 23 Dec 2024 22:25:39 +0100 Subject: [PATCH 32/48] rpcdaemon: debug_traceBlockByNumber with block number in hex format (#2619) --- .github/workflows/rpc-integration-tests.yml | 2 +- silkworm/rpc/commands/debug_api.cpp | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rpc-integration-tests.yml b/.github/workflows/rpc-integration-tests.yml index f2f4f6cbf0..b3ddb4a99a 100644 --- a/.github/workflows/rpc-integration-tests.yml +++ b/.github/workflows/rpc-integration-tests.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git -c advice.detachedHead=false clone --depth 1 --branch v1.29.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v1.30.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests pip3 install -r requirements.txt --break-system-packages diff --git a/silkworm/rpc/commands/debug_api.cpp b/silkworm/rpc/commands/debug_api.cpp index 1782e7a68c..d470b6b10d 100644 --- a/silkworm/rpc/commands/debug_api.cpp +++ b/silkworm/rpc/commands/debug_api.cpp @@ -553,8 +553,18 @@ Task DebugRpcApi::handle_debug_trace_block_by_number(const nlohmann::json& stream.write_json(reply); co_return; } - const BlockNum block_num = - params[0].is_string() ? std::stoul(params[0].get(), nullptr, 10) : params[0].get(); + + BlockNum block_num{0}; + if (params[0].is_string()) { + const auto value = params[0].get(); + if (silkworm::is_valid_hex(value)) { + block_num = static_cast(std::stol(value, nullptr, 16)); + } else if (silkworm::is_valid_dec(value)) { + block_num = static_cast(std::stol(value, nullptr, 10)); + } + } else { + block_num = params[0].get(); + } debug::DebugConfig config; if (params.size() > 1) { From 7923eb46e99eb750a937eec4e00939bcee2c1d0c Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com> Date: Tue, 24 Dec 2024 10:45:51 +0100 Subject: [PATCH 33/48] rpcdaemon: StateReader using only txn_number (#2623) --- silkworm/db/kv/state_reader.cpp | 20 ++-------- silkworm/db/kv/state_reader.hpp | 5 +-- silkworm/execution/remote_state.hpp | 9 ++--- silkworm/execution/remote_state_test.cpp | 45 ++++++++++++----------- silkworm/execution/state_factory.cpp | 2 +- silkworm/rpc/commands/eth_api.cpp | 33 ++++++++++++----- silkworm/rpc/commands/ots_api.cpp | 11 +++++- silkworm/rpc/commands/parity_api.cpp | 8 +++- silkworm/rpc/core/block_reader.cpp | 8 +++- silkworm/rpc/core/estimate_gas_oracle.cpp | 2 +- silkworm/rpc/core/estimate_gas_oracle.hpp | 2 +- silkworm/rpc/core/evm_executor_test.cpp | 9 ----- 12 files changed, 80 insertions(+), 74 deletions(-) diff --git a/silkworm/db/kv/state_reader.cpp b/silkworm/db/kv/state_reader.cpp index e6831404bf..e3c0d92a20 100644 --- a/silkworm/db/kv/state_reader.cpp +++ b/silkworm/db/kv/state_reader.cpp @@ -26,19 +26,14 @@ namespace silkworm::db::kv { -StateReader::StateReader(kv::api::Transaction& tx, std::optional block_num, std::optional txn_id) : tx_(tx), block_num_(block_num), txn_number_(txn_id) { - SILKWORM_ASSERT((txn_id && !block_num) || (!txn_id && block_num)); +StateReader::StateReader(kv::api::Transaction& tx, TxnId txn_id) : tx_(tx), txn_number_(txn_id) { } Task> StateReader::read_account(const evmc::address& address) const { - if (!txn_number_) { - txn_number_ = co_await tx_.first_txn_num_in_block(*block_num_); - } - db::kv::api::GetAsOfQuery query{ .table = table::kAccountDomain, .key = db::account_domain_key(address), - .timestamp = static_cast(*txn_number_), + .timestamp = static_cast(txn_number_), }; const auto result = co_await tx_.get_as_of(std::move(query)); if (!result.success) { @@ -53,14 +48,10 @@ Task> StateReader::read_account(const evmc::address& addr Task StateReader::read_storage(const evmc::address& address, uint64_t /* incarnation */, const evmc::bytes32& location_hash) const { - if (!txn_number_) { - txn_number_ = co_await tx_.first_txn_num_in_block(*block_num_); - } - db::kv::api::GetAsOfQuery query{ .table = table::kStorageDomain, .key = db::storage_domain_key(address, location_hash), - .timestamp = static_cast(*txn_number_), + .timestamp = static_cast(txn_number_), }; const auto result = co_await tx_.get_as_of(std::move(query)); if (!result.success) { @@ -73,14 +64,11 @@ Task> StateReader::read_code(const evmc::address& address, if (code_hash == kEmptyHash) { co_return std::nullopt; } - if (!txn_number_) { - txn_number_ = co_await tx_.first_txn_num_in_block(*block_num_); - } db::kv::api::GetAsOfQuery query{ .table = table::kCodeDomain, .key = db::code_domain_key(address), - .timestamp = static_cast(*txn_number_), + .timestamp = static_cast(txn_number_), }; const auto result = co_await tx_.get_as_of(std::move(query)); if (!result.success) { diff --git a/silkworm/db/kv/state_reader.hpp b/silkworm/db/kv/state_reader.hpp index 184d372100..a2356cf5ae 100644 --- a/silkworm/db/kv/state_reader.hpp +++ b/silkworm/db/kv/state_reader.hpp @@ -34,7 +34,7 @@ namespace silkworm::db::kv { class StateReader { public: - StateReader(kv::api::Transaction& tx, std::optional block_num, std::optional txn_id = std::nullopt); + StateReader(kv::api::Transaction& tx, TxnId txn_id); StateReader(const StateReader&) = delete; StateReader& operator=(const StateReader&) = delete; @@ -49,8 +49,7 @@ class StateReader { private: kv::api::Transaction& tx_; - std::optional block_num_; - mutable std::optional txn_number_; + TxnId txn_number_; }; } // namespace silkworm::db::kv diff --git a/silkworm/execution/remote_state.hpp b/silkworm/execution/remote_state.hpp index 2b22ec9546..1ff6e8ddc9 100644 --- a/silkworm/execution/remote_state.hpp +++ b/silkworm/execution/remote_state.hpp @@ -39,9 +39,8 @@ class AsyncRemoteState { explicit AsyncRemoteState( db::kv::api::Transaction& tx, const db::chain::ChainStorage& storage, - std::optional block_num, - std::optional txn_id = std::nullopt) - : storage_(storage), state_reader_(tx, block_num ? *block_num + 1 : block_num, txn_id) {} + TxnId txn_id) + : storage_(storage), state_reader_(tx, txn_id) {} Task> read_account(const evmc::address& address) const noexcept; @@ -76,8 +75,8 @@ class RemoteState : public State { boost::asio::any_io_executor& executor, db::kv::api::Transaction& tx, const db::chain::ChainStorage& storage, - std::optional block_num, std::optional txn_id = std::nullopt) - : executor_(executor), async_state_{tx, storage, block_num, txn_id} {} + TxnId txn_id) + : executor_(executor), async_state_{tx, storage, txn_id} {} std::optional read_account(const evmc::address& address) const noexcept override; diff --git a/silkworm/execution/remote_state_test.cpp b/silkworm/execution/remote_state_test.cpp index 50ac87ee6d..822ad07338 100644 --- a/silkworm/execution/remote_state_test.cpp +++ b/silkworm/execution/remote_state_test.cpp @@ -54,8 +54,8 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf .WillRepeatedly(InvokeWithoutArgs([]() -> Task { co_return Bytes{}; })); - const BlockNum block_num = 1'000'000; - AsyncRemoteState state{transaction, chain_storage, block_num, std::nullopt}; + const TxnId txn_id = 244087591818874; + AsyncRemoteState state{transaction, chain_storage, txn_id}; const auto code_read{spawn_and_wait(state.read_code(address, kEmptyHash))}; CHECK(code_read.empty()); } @@ -73,8 +73,8 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf co_return response; })); - const BlockNum block_num = 1'000'000; - AsyncRemoteState state{transaction, chain_storage, block_num}; + const TxnId txn_id = 244087591818874; + AsyncRemoteState state{transaction, chain_storage, txn_id}; const evmc::bytes32 code_hash{0x04491edcd115127caedbd478e2e7895ed80c7847e903431f94f9cfa579cad47f_bytes32}; const auto code_read{spawn_and_wait(state.read_code(address, code_hash))}; CHECK(code_read == ByteView{kCode}); @@ -101,9 +101,6 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf } SECTION("read_storage with empty response from db") { - EXPECT_CALL(transaction, first_txn_num_in_block(1'000'001)).WillOnce(Invoke([]() -> Task { - co_return 0; - })); EXPECT_CALL(transaction, get_as_of(_)).WillOnce(Invoke([=](Unused) -> Task { db::kv::api::GetAsOfResult response{ .success = true, @@ -280,8 +277,8 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf .value = Bytes{}}; co_return response; })); - const BlockNum block_num = 1'000'000; - AsyncRemoteState state{transaction, chain_storage, block_num}; + const TxnId txn_id = 244087591818874; + AsyncRemoteState state{transaction, chain_storage, txn_id}; const auto account_read{spawn_and_wait(state.read_account(address))}; CHECK(account_read == std::nullopt); } @@ -296,9 +293,9 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf .value = Bytes{}}; co_return response; })); - const BlockNum block_num = 1'000'000; + const TxnId txn_id = 244087591818874; + AsyncRemoteState state{transaction, chain_storage, txn_id}; const evmc::bytes32 code_hash{0x04491edcd115127caedbd478e2e7895ed80c7847e903431f94f9cfa579cad47f_bytes32}; - AsyncRemoteState state{transaction, chain_storage, block_num}; const auto code_read{spawn_and_wait(state.read_code(address, code_hash))}; CHECK(code_read.empty()); } @@ -313,16 +310,16 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf .value = Bytes{}}; co_return response; })); - const BlockNum block_num = 1'000'000; const evmc::bytes32 location{0x04491edcd115127caedbd478e2e7895ed80c7847e903431f94f9cfa579cad47f_bytes32}; - AsyncRemoteState state{transaction, chain_storage, block_num}; + const TxnId txn_id = 244087591818874; + AsyncRemoteState state{transaction, chain_storage, txn_id}; const auto storage_read{spawn_and_wait(state.read_storage(address, 0, location))}; CHECK(storage_read == 0x0000000000000000000000000000000000000000000000000000000000000000_bytes32); } SECTION("AsyncRemoteState::previous_incarnation returns ok") { - const BlockNum block_num = 1'000'000; - AsyncRemoteState state{transaction, chain_storage, block_num}; + const TxnId txn_id = 244087591818874; + AsyncRemoteState state{transaction, chain_storage, txn_id}; const auto prev_incarnation{spawn_and_wait(state.previous_incarnation(address))}; CHECK(prev_incarnation == 0); } @@ -335,16 +332,17 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf } SECTION("AsyncRemoteState::current_canonical_block returns ok") { - const BlockNum block_num = 1'000'000; - AsyncRemoteState state{transaction, chain_storage, block_num}; + const TxnId txn_id = 244087591818874; + AsyncRemoteState state{transaction, chain_storage, txn_id}; const auto current_canonical_block{spawn_and_wait(state.current_canonical_block())}; CHECK(current_canonical_block == 0); } SECTION("AsyncRemoteState::total_difficulty with empty response from chain storage") { + const TxnId txn_id = 244087591818874; const BlockNum block_num = 1'000'000; + AsyncRemoteState state{transaction, chain_storage, txn_id}; const Hash block_hash{0x04491edcd115127caedbd478e2e7895ed80c7847e903431f94f9cfa579cad47f_bytes32}; - AsyncRemoteState state{transaction, chain_storage, block_num}; EXPECT_CALL(chain_storage, read_total_difficulty(block_hash, block_num)) .WillOnce(Invoke([](Unused, Unused) -> Task> { co_return std::nullopt; })); const auto total_difficulty{spawn_and_wait(state.total_difficulty(block_num, block_hash))}; @@ -352,9 +350,10 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf } SECTION("AsyncRemoteState::read_header with empty response from chain storage") { + const TxnId txn_id = 244087591818874; const BlockNum block_num = 1'000'000; + AsyncRemoteState state{transaction, chain_storage, txn_id}; const Hash block_hash{0x04491edcd115127caedbd478e2e7895ed80c7847e903431f94f9cfa579cad47f_bytes32}; - AsyncRemoteState state{transaction, chain_storage, block_num}; EXPECT_CALL(chain_storage, read_header(block_num, block_hash)) .WillOnce(Invoke([](Unused, Unused) -> Task> { co_return std::nullopt; })); const auto block_header{spawn_and_wait(state.read_header(block_num, block_hash))}; @@ -362,9 +361,10 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf } SECTION("AsyncRemoteState::read_body with empty response from from chain storage") { - const BlockNum block_num = 1'000'000; const Hash block_hash{0x04491edcd115127caedbd478e2e7895ed80c7847e903431f94f9cfa579cad47f_bytes32}; - AsyncRemoteState state{transaction, chain_storage, block_num}; + const TxnId txn_id = 244087591818874; + const BlockNum block_num = 1'000'000; + AsyncRemoteState state{transaction, chain_storage, txn_id}; BlockBody body; EXPECT_CALL(chain_storage, read_body(block_hash, block_num, body)) .WillOnce(Invoke([](Unused, Unused, Unused) -> Task { co_return true; })); @@ -378,10 +378,11 @@ TEST_CASE_METHOD(RemoteStateTest, "async remote buffer", "[rpc][core][remote_buf .WillRepeatedly(InvokeWithoutArgs([=]() -> Task { co_return Bytes{}; })); + const TxnId txn_id = 244087591818874; const BlockNum block_num = 1'000'000; EXPECT_CALL(chain_storage, read_canonical_header_hash(block_num)) .WillOnce(Invoke([](Unused) -> Task> { co_return std::nullopt; })); - AsyncRemoteState state{transaction, chain_storage, block_num}; + AsyncRemoteState state{transaction, chain_storage, txn_id}; const auto canonical_hash{spawn_and_wait(state.canonical_hash(block_num))}; CHECK(canonical_hash == std::nullopt); } diff --git a/silkworm/execution/state_factory.cpp b/silkworm/execution/state_factory.cpp index 61d6eb0fac..1649acb2c6 100644 --- a/silkworm/execution/state_factory.cpp +++ b/silkworm/execution/state_factory.cpp @@ -32,7 +32,7 @@ std::shared_ptr StateFactory::create_state( auto& local_tx = dynamic_cast(tx); return std::make_shared(std::nullopt, txn_id, local_tx.data_store()); } else { // NOLINT(readability-else-after-return) - return std::make_shared(executor, tx, storage, std::nullopt, txn_id); + return std::make_shared(executor, tx, storage, txn_id); } } diff --git a/silkworm/rpc/commands/eth_api.cpp b/silkworm/rpc/commands/eth_api.cpp index 7a9a39986c..5cb6ee1199 100644 --- a/silkworm/rpc/commands/eth_api.cpp +++ b/silkworm/rpc/commands/eth_api.cpp @@ -918,8 +918,8 @@ Task EthereumRpcApi::handle_eth_estimate_gas(const nlohmann::json& request return chain_storage->read_canonical_header(block_num); }; - rpc::AccountReader account_reader = [&tx](const evmc::address& address, BlockNum block_num) -> Task> { - StateReader state_reader{*tx, block_num + 1}; + rpc::AccountReader account_reader = [&tx](const evmc::address& address, TxnId txn_id) -> Task> { + StateReader state_reader{*tx, txn_id}; co_return co_await state_reader.read_account(address); }; @@ -973,7 +973,10 @@ Task EthereumRpcApi::handle_eth_get_balance(const nlohmann::json& request, const auto [block_num, is_latest_block] = co_await block_reader.get_block_num(block_num_or_hash); tx->set_state_cache_enabled(is_latest_block); - StateReader state_reader{*tx, block_num + 1}; + execution::StateFactory state_factory{*tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num + 1); + StateReader state_reader{*tx, txn_id}; + std::optional account{co_await state_reader.read_account(address)}; reply = make_json_content(request, "0x" + (account ? intx::hex(account->balance) : "0")); @@ -1012,7 +1015,10 @@ Task EthereumRpcApi::handle_eth_get_code(const nlohmann::json& request, nl const auto [block_num, is_latest_block] = co_await block_reader.get_block_num(block_id, /*latest_required=*/true); tx->set_state_cache_enabled(is_latest_block); - StateReader state_reader{*tx, block_num + 1}; + execution::StateFactory state_factory{*tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num + 1); + + StateReader state_reader{*tx, txn_id}; std::optional account{co_await state_reader.read_account(address)}; if (account) { @@ -1053,7 +1059,11 @@ Task EthereumRpcApi::handle_eth_get_transaction_count(const nlohmann::json const auto [block_num, is_latest_block] = co_await block_reader.get_block_num(block_id, /*latest_required=*/true); tx->set_state_cache_enabled(is_latest_block); - StateReader state_reader{*tx, block_num + 1}; + execution::StateFactory state_factory{*tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num + 1); + + StateReader state_reader{*tx, txn_id}; + std::optional account{co_await state_reader.read_account(address)}; if (account) { @@ -1101,7 +1111,10 @@ Task EthereumRpcApi::handle_eth_get_storage_at(const nlohmann::json& reque const auto [block_num, is_latest_block] = co_await block_reader.get_block_num(block_id, /*latest_required=*/true); tx->set_state_cache_enabled(is_latest_block); - StateReader state_reader{*tx, block_num + 1}; + execution::StateFactory state_factory{*tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num + 1); + + StateReader state_reader{*tx, txn_id}; std::optional account{co_await state_reader.read_account(address)}; if (account) { @@ -1317,7 +1330,10 @@ Task EthereumRpcApi::handle_eth_create_access_list(const nlohmann::json& r const bool is_latest_block = co_await block_reader.get_latest_executed_block_num() == block_with_hash->block.header.number; tx->set_state_cache_enabled(/*cache_enabled=*/is_latest_block); - StateReader state_reader{*tx, block_with_hash->block.header.number + 1}; + execution::StateFactory state_factory{*tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_with_hash->block.header.number + 1); + + StateReader state_reader{*tx, txn_id}; std::optional nonce = std::nullopt; evmc::address to{}; @@ -1347,9 +1363,6 @@ Task EthereumRpcApi::handle_eth_create_access_list(const nlohmann::json& r auto txn = call.to_transaction(std::nullopt, nonce); AccessList saved_access_list = call.access_list; - execution::StateFactory state_factory{*tx}; - const auto txn_id = co_await state_factory.user_txn_id_at(block_with_hash->block.header.number + 1); - while (true) { const auto execution_result = co_await EVMExecutor::call( chain_config, *chain_storage, workers_, block_with_hash->block, txn, txn_id, [&](auto& io_executor, auto curr_txn_id, auto& storage) { diff --git a/silkworm/rpc/commands/ots_api.cpp b/silkworm/rpc/commands/ots_api.cpp index a539695daa..b629b42176 100644 --- a/silkworm/rpc/commands/ots_api.cpp +++ b/silkworm/rpc/commands/ots_api.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -80,7 +81,10 @@ Task OtsRpcApi::handle_ots_has_code(const nlohmann::json& request, nlohman tx->set_state_cache_enabled(is_latest_block); const auto block_num = co_await block_reader.get_block_num(block_id); - StateReader state_reader{*tx, block_num + 1}; + execution::StateFactory state_factory{*tx}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num + 1); + + StateReader state_reader{*tx, txn_id}; std::optional account{co_await state_reader.read_account(address)}; if (account) { @@ -435,7 +439,10 @@ Task OtsRpcApi::handle_ots_get_contract_creator(const nlohmann::json& requ const auto chain_storage = tx->create_storage(); rpc::BlockReader block_reader{*chain_storage, *tx}; auto block_num = co_await block_reader.get_latest_block_num(); - StateReader state_reader{*tx, block_num}; + execution::StateFactory state_factory{*tx}; + const auto txn_number = co_await state_factory.user_txn_id_at(block_num); + + StateReader state_reader{*tx, txn_number}; std::optional account_opt{co_await state_reader.read_account(contract_address)}; if (!account_opt || account_opt.value().code_hash == kEmptyHash) { reply = make_json_content(request, nlohmann::detail::value_t::null); diff --git a/silkworm/rpc/commands/parity_api.cpp b/silkworm/rpc/commands/parity_api.cpp index ac734fa893..14f698b69a 100644 --- a/silkworm/rpc/commands/parity_api.cpp +++ b/silkworm/rpc/commands/parity_api.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -67,11 +68,14 @@ Task ParityRpcApi::handle_parity_list_storage_keys(const nlohmann::json& r const auto block_num = co_await block_reader.get_block_num(block_id); SILK_DEBUG << "read account with address: " << address << " block number: " << block_num; - StateReader state_reader{*tx, block_num}; + + execution::StateFactory state_factory{*tx}; + const auto txn_number = co_await state_factory.user_txn_id_at(block_num); + + StateReader state_reader{*tx, txn_number}; std::optional account = co_await state_reader.read_account(address); if (!account) throw std::domain_error{"account not found"}; - const auto txn_number = co_await tx->first_txn_num_in_block(block_num); auto from = db::code_domain_key(address); if (offset) { diff --git a/silkworm/rpc/core/block_reader.cpp b/silkworm/rpc/core/block_reader.cpp index 15a05573d1..fb09a9b5dc 100644 --- a/silkworm/rpc/core/block_reader.cpp +++ b/silkworm/rpc/core/block_reader.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -54,11 +55,14 @@ Task BlockReader::read_balance_changes(BlockCache& cache, const BlockNumOr SILK_TRACE << "read_balance_changes: block_num: " << block_num; - StateReader state_reader{transaction_, block_num + 1}; - const auto start_txn_number = co_await transaction_.first_txn_num_in_block(block_num); const auto end_txn_number = co_await transaction_.first_txn_num_in_block(block_num + 1); + execution::StateFactory state_factory{transaction_}; + const auto txn_id = co_await state_factory.user_txn_id_at(block_num + 1); + + StateReader state_reader{transaction_, txn_id}; + db::kv::api::HistoryRangeQuery query{ .table = db::table::kAccountDomain, .from_timestamp = static_cast(start_txn_number), diff --git a/silkworm/rpc/core/estimate_gas_oracle.cpp b/silkworm/rpc/core/estimate_gas_oracle.cpp index 6f399506ba..2edbe618cf 100644 --- a/silkworm/rpc/core/estimate_gas_oracle.cpp +++ b/silkworm/rpc/core/estimate_gas_oracle.cpp @@ -49,7 +49,7 @@ Task EstimateGasOracle::estimate_gas(const Call& call, const silk if (gas_price && gas_price != 0) { evmc::address from = call.from.value_or(evmc::address{0}); - std::optional account{co_await account_reader_(from, block_num + 1)}; + std::optional account{co_await account_reader_(from, txn_id)}; intx::uint256 balance = account->balance; SILK_DEBUG << "balance for address " << from << ": 0x" << intx::hex(balance); diff --git a/silkworm/rpc/core/estimate_gas_oracle.hpp b/silkworm/rpc/core/estimate_gas_oracle.hpp index 9b50ace24e..f77d99dfdd 100644 --- a/silkworm/rpc/core/estimate_gas_oracle.hpp +++ b/silkworm/rpc/core/estimate_gas_oracle.hpp @@ -37,7 +37,7 @@ inline constexpr std::uint64_t kTxGas = 21'000; inline constexpr std::uint64_t kGasCap = 50'000'000; using BlockHeaderProvider = std::function>(uint64_t)>; -using AccountReader = std::function>(const evmc::address&, uint64_t)>; +using AccountReader = std::function>(const evmc::address&, TxnId txn_id)>; struct EstimateGasException : public std::exception { public: diff --git a/silkworm/rpc/core/evm_executor_test.cpp b/silkworm/rpc/core/evm_executor_test.cpp index 385864f364..9f23251393 100644 --- a/silkworm/rpc/core/evm_executor_test.cpp +++ b/silkworm/rpc/core/evm_executor_test.cpp @@ -111,9 +111,6 @@ TEST_CASE_METHOD(EVMExecutorTest, "EVMExecutor") { SECTION("failed if transaction cost greater user amount") { auto cursor = std::make_shared(); - EXPECT_CALL(transaction, first_txn_num_in_block(6'000'001)).WillOnce(Invoke([]() -> Task { - co_return 244087591818873; - })); EXPECT_CALL(transaction, get_as_of(_)).WillOnce(Invoke([=](Unused) -> Task { db::kv::api::GetAsOfResult response{ .success = true, @@ -137,9 +134,6 @@ TEST_CASE_METHOD(EVMExecutorTest, "EVMExecutor") { SECTION("doesn't fail if transaction cost greater user amount && gasBailout == true") { auto cursor = std::make_shared(); - EXPECT_CALL(transaction, first_txn_num_in_block(6'000'001)).WillOnce(Invoke([]() -> Task { - co_return 244087591818873; - })); EXPECT_CALL(transaction, get_as_of(_)).WillRepeatedly(Invoke([=](Unused) -> Task { db::kv::api::GetAsOfResult response{ .success = true, @@ -172,9 +166,6 @@ TEST_CASE_METHOD(EVMExecutorTest, "EVMExecutor") { SECTION("call returns SUCCESS") { auto cursor = std::make_shared(); - EXPECT_CALL(transaction, first_txn_num_in_block(6'000'001)).WillOnce(Invoke([]() -> Task { - co_return 244087591818873; - })); EXPECT_CALL(transaction, get_as_of(_)).WillRepeatedly(Invoke([=](Unused) -> Task { db::kv::api::GetAsOfResult response{ .success = true, From e2f442f99e34187d6051c1e212010876f4435853 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Mon, 16 Dec 2024 09:49:54 +0100 Subject: [PATCH 34/48] cmake-conan from develop2@c22bbf0 --- third_party/cmake-conan/LICENSE | 21 + third_party/cmake-conan/conan.cmake | 1146 ------------------ third_party/cmake-conan/conan_provider.cmake | 676 +++++++++++ third_party/cmake-conan/readme.txt | 3 + 4 files changed, 700 insertions(+), 1146 deletions(-) create mode 100644 third_party/cmake-conan/LICENSE delete mode 100644 third_party/cmake-conan/conan.cmake create mode 100644 third_party/cmake-conan/conan_provider.cmake create mode 100644 third_party/cmake-conan/readme.txt diff --git a/third_party/cmake-conan/LICENSE b/third_party/cmake-conan/LICENSE new file mode 100644 index 0000000000..541f5a3a6f --- /dev/null +++ b/third_party/cmake-conan/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 JFrog + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/third_party/cmake-conan/conan.cmake b/third_party/cmake-conan/conan.cmake deleted file mode 100644 index abfe7db7f3..0000000000 --- a/third_party/cmake-conan/conan.cmake +++ /dev/null @@ -1,1146 +0,0 @@ -# The MIT License (MIT) - -# Copyright (c) 2018 JFrog - -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: - -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - - - -# This file comes from: https://github.com/conan-io/cmake-conan. Please refer -# to this repository for issues and documentation. - -# Its purpose is to wrap and launch Conan C/C++ Package Manager when cmake is called. -# It will take CMake current settings (os, compiler, compiler version, architecture) -# and translate them to conan settings for installing and retrieving dependencies. - -# It is intended to facilitate developers building projects that have conan dependencies, -# but it is only necessary on the end-user side. It is not necessary to create conan -# packages, in fact it shouldn't be use for that. Check the project documentation. - -# version: 0.19.0-dev - -include(CMakeParseArguments) - -function(_get_msvc_ide_version result) - set(${result} "" PARENT_SCOPE) - if(NOT MSVC_VERSION VERSION_LESS 1400 AND MSVC_VERSION VERSION_LESS 1500) - set(${result} 8 PARENT_SCOPE) - elseif(NOT MSVC_VERSION VERSION_LESS 1500 AND MSVC_VERSION VERSION_LESS 1600) - set(${result} 9 PARENT_SCOPE) - elseif(NOT MSVC_VERSION VERSION_LESS 1600 AND MSVC_VERSION VERSION_LESS 1700) - set(${result} 10 PARENT_SCOPE) - elseif(NOT MSVC_VERSION VERSION_LESS 1700 AND MSVC_VERSION VERSION_LESS 1800) - set(${result} 11 PARENT_SCOPE) - elseif(NOT MSVC_VERSION VERSION_LESS 1800 AND MSVC_VERSION VERSION_LESS 1900) - set(${result} 12 PARENT_SCOPE) - elseif(NOT MSVC_VERSION VERSION_LESS 1900 AND MSVC_VERSION VERSION_LESS 1910) - set(${result} 14 PARENT_SCOPE) - elseif(NOT MSVC_VERSION VERSION_LESS 1910 AND MSVC_VERSION VERSION_LESS 1920) - set(${result} 15 PARENT_SCOPE) - elseif(NOT MSVC_VERSION VERSION_LESS 1920 AND MSVC_VERSION VERSION_LESS 1930) - set(${result} 16 PARENT_SCOPE) - elseif(NOT MSVC_VERSION VERSION_LESS 1930 AND MSVC_VERSION VERSION_LESS 1950) - set(${result} 17 PARENT_SCOPE) - else() - message(FATAL_ERROR "Conan: Unknown MSVC compiler version [${MSVC_VERSION}]") - endif() -endfunction() - -macro(_conan_detect_build_type) - conan_parse_arguments(${ARGV}) - - if(ARGUMENTS_BUILD_TYPE) - set(_CONAN_SETTING_BUILD_TYPE ${ARGUMENTS_BUILD_TYPE}) - elseif(CMAKE_BUILD_TYPE) - set(_CONAN_SETTING_BUILD_TYPE ${CMAKE_BUILD_TYPE}) - else() - message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)") - endif() - - string(TOUPPER ${_CONAN_SETTING_BUILD_TYPE} _CONAN_SETTING_BUILD_TYPE_UPPER) - if (_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "DEBUG") - set(_CONAN_SETTING_BUILD_TYPE "Debug") - elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "RELEASE") - set(_CONAN_SETTING_BUILD_TYPE "Release") - elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "RELWITHDEBINFO") - set(_CONAN_SETTING_BUILD_TYPE "RelWithDebInfo") - elseif(_CONAN_SETTING_BUILD_TYPE_UPPER STREQUAL "MINSIZEREL") - set(_CONAN_SETTING_BUILD_TYPE "MinSizeRel") - endif() -endmacro() - -macro(_conan_check_system_name) - #handle -s os setting - if(CMAKE_SYSTEM_NAME AND NOT CMAKE_SYSTEM_NAME STREQUAL "Generic") - #use default conan os setting if CMAKE_SYSTEM_NAME is not defined - set(CONAN_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) - if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - set(CONAN_SYSTEM_NAME Macos) - endif() - if(${CMAKE_SYSTEM_NAME} STREQUAL "QNX") - set(CONAN_SYSTEM_NAME Neutrino) - endif() - set(CONAN_SUPPORTED_PLATFORMS Windows Linux Macos Android iOS FreeBSD WindowsStore WindowsCE watchOS tvOS FreeBSD SunOS AIX Arduino Emscripten Neutrino) - list (FIND CONAN_SUPPORTED_PLATFORMS "${CONAN_SYSTEM_NAME}" _index) - if (${_index} GREATER -1) - #check if the cmake system is a conan supported one - set(_CONAN_SETTING_OS ${CONAN_SYSTEM_NAME}) - else() - message(FATAL_ERROR "cmake system ${CONAN_SYSTEM_NAME} is not supported by conan. Use one of ${CONAN_SUPPORTED_PLATFORMS}") - endif() - endif() -endmacro() - -macro(_conan_check_language) - get_property(_languages GLOBAL PROPERTY ENABLED_LANGUAGES) - if (";${_languages};" MATCHES ";CXX;") - set(LANGUAGE CXX) - set(USING_CXX 1) - elseif (";${_languages};" MATCHES ";C;") - set(LANGUAGE C) - set(USING_CXX 0) - else () - message(FATAL_ERROR "Conan: Neither C or C++ was detected as a language for the project. Unabled to detect compiler version.") - endif() -endmacro() - -macro(_conan_detect_compiler) - - conan_parse_arguments(${ARGV}) - - if(ARGUMENTS_ARCH) - set(_CONAN_SETTING_ARCH ${ARGUMENTS_ARCH}) - endif() - - if(USING_CXX) - set(_CONAN_SETTING_COMPILER_CPPSTD ${CMAKE_CXX_STANDARD}) - endif() - - if (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL GNU OR ${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL QCC) - # using GCC or QCC - # TODO: Handle other params - string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION}) - list(GET VERSION_LIST 0 MAJOR) - list(GET VERSION_LIST 1 MINOR) - - if (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL GNU) - set(_CONAN_SETTING_COMPILER gcc) - # mimic Conan client autodetection - if (${MAJOR} GREATER_EQUAL 5) - set(COMPILER_VERSION ${MAJOR}) - else() - set(COMPILER_VERSION ${MAJOR}.${MINOR}) - endif() - elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL QCC) - set(_CONAN_SETTING_COMPILER qcc) - set(COMPILER_VERSION ${MAJOR}.${MINOR}) - endif () - - set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION}) - - if (USING_CXX) - conan_cmake_detect_unix_libcxx(_LIBCXX) - set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX}) - endif () - elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Intel) - string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION}) - list(GET VERSION_LIST 0 MAJOR) - list(GET VERSION_LIST 1 MINOR) - set(COMPILER_VERSION ${MAJOR}) - set(_CONAN_SETTING_COMPILER intel) - set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION}) - if (USING_CXX) - conan_cmake_detect_unix_libcxx(_LIBCXX) - set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX}) - endif () - elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL AppleClang) - # using AppleClang - string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION}) - list(GET VERSION_LIST 0 MAJOR) - list(GET VERSION_LIST 1 MINOR) - - # mimic Conan client autodetection - if (${MAJOR} GREATER_EQUAL 13) - set(COMPILER_VERSION ${MAJOR}) - else() - set(COMPILER_VERSION ${MAJOR}.${MINOR}) - endif() - - set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION}) - - set(_CONAN_SETTING_COMPILER apple-clang) - if (USING_CXX) - conan_cmake_detect_unix_libcxx(_LIBCXX) - set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX}) - endif () - elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang - AND NOT "${CMAKE_${LANGUAGE}_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC" - AND NOT "${CMAKE_${LANGUAGE}_SIMULATE_ID}" STREQUAL "MSVC") - - string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION}) - list(GET VERSION_LIST 0 MAJOR) - list(GET VERSION_LIST 1 MINOR) - set(_CONAN_SETTING_COMPILER clang) - - # mimic Conan client autodetection - if (${MAJOR} GREATER_EQUAL 8) - set(COMPILER_VERSION ${MAJOR}) - else() - set(COMPILER_VERSION ${MAJOR}.${MINOR}) - endif() - - set(_CONAN_SETTING_COMPILER_VERSION ${COMPILER_VERSION}) - - if(APPLE) - cmake_policy(GET CMP0025 APPLE_CLANG_POLICY) - if(NOT APPLE_CLANG_POLICY STREQUAL NEW) - message(STATUS "Conan: APPLE and Clang detected. Assuming apple-clang compiler. Set CMP0025 to avoid it") - set(_CONAN_SETTING_COMPILER apple-clang) - endif() - endif() - if (USING_CXX) - conan_cmake_detect_unix_libcxx(_LIBCXX) - set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX}) - endif () - elseif(${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL MSVC - OR (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang - AND "${CMAKE_${LANGUAGE}_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC" - AND "${CMAKE_${LANGUAGE}_SIMULATE_ID}" STREQUAL "MSVC")) - - set(_VISUAL "Visual Studio") - _get_msvc_ide_version(_VISUAL_VERSION) - if("${_VISUAL_VERSION}" STREQUAL "") - message(FATAL_ERROR "Conan: Visual Studio not recognized") - else() - set(_CONAN_SETTING_COMPILER ${_VISUAL}) - set(_CONAN_SETTING_COMPILER_VERSION ${_VISUAL_VERSION}) - endif() - - if(NOT _CONAN_SETTING_ARCH) - if (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "64") - set(_CONAN_SETTING_ARCH x86_64) - elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "^ARM") - message(STATUS "Conan: Using default ARM architecture from MSVC") - set(_CONAN_SETTING_ARCH armv6) - elseif (MSVC_${LANGUAGE}_ARCHITECTURE_ID MATCHES "86") - set(_CONAN_SETTING_ARCH x86) - else () - message(FATAL_ERROR "Conan: Unknown MSVC architecture [${MSVC_${LANGUAGE}_ARCHITECTURE_ID}]") - endif() - endif() - - conan_cmake_detect_vs_runtime(_vs_runtime ${ARGV}) - message(STATUS "Conan: Detected VS runtime: ${_vs_runtime}") - set(_CONAN_SETTING_COMPILER_RUNTIME ${_vs_runtime}) - - if (CMAKE_GENERATOR_TOOLSET) - set(_CONAN_SETTING_COMPILER_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET}) - elseif(CMAKE_VS_PLATFORM_TOOLSET AND (CMAKE_GENERATOR STREQUAL "Ninja")) - set(_CONAN_SETTING_COMPILER_TOOLSET ${CMAKE_VS_PLATFORM_TOOLSET}) - endif() - else() - message(FATAL_ERROR "Conan: compiler setup not recognized") - endif() - -endmacro() - -function(conan_cmake_settings result) - #message(STATUS "COMPILER " ${CMAKE_CXX_COMPILER}) - #message(STATUS "COMPILER " ${CMAKE_CXX_COMPILER_ID}) - #message(STATUS "VERSION " ${CMAKE_CXX_COMPILER_VERSION}) - #message(STATUS "FLAGS " ${CMAKE_LANG_FLAGS}) - #message(STATUS "LIB ARCH " ${CMAKE_CXX_LIBRARY_ARCHITECTURE}) - #message(STATUS "BUILD TYPE " ${CMAKE_BUILD_TYPE}) - #message(STATUS "GENERATOR " ${CMAKE_GENERATOR}) - #message(STATUS "GENERATOR WIN64 " ${CMAKE_CL_64}) - - message(STATUS "Conan: Automatic detection of conan settings from cmake") - - conan_parse_arguments(${ARGV}) - - _conan_detect_build_type(${ARGV}) - - _conan_check_system_name() - - _conan_check_language() - - _conan_detect_compiler(${ARGV}) - - # If profile is defined it is used - if(CMAKE_BUILD_TYPE STREQUAL "Debug" AND ARGUMENTS_DEBUG_PROFILE) - set(_APPLIED_PROFILES ${ARGUMENTS_DEBUG_PROFILE}) - elseif(CMAKE_BUILD_TYPE STREQUAL "Release" AND ARGUMENTS_RELEASE_PROFILE) - set(_APPLIED_PROFILES ${ARGUMENTS_RELEASE_PROFILE}) - elseif(CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" AND ARGUMENTS_RELWITHDEBINFO_PROFILE) - set(_APPLIED_PROFILES ${ARGUMENTS_RELWITHDEBINFO_PROFILE}) - elseif(CMAKE_BUILD_TYPE STREQUAL "MinSizeRel" AND ARGUMENTS_MINSIZEREL_PROFILE) - set(_APPLIED_PROFILES ${ARGUMENTS_MINSIZEREL_PROFILE}) - elseif(ARGUMENTS_PROFILE) - set(_APPLIED_PROFILES ${ARGUMENTS_PROFILE}) - endif() - - foreach(ARG ${_APPLIED_PROFILES}) - set(_SETTINGS ${_SETTINGS} -pr=${ARG}) - endforeach() - foreach(ARG ${ARGUMENTS_PROFILE_BUILD}) - conan_check(VERSION 1.24.0 REQUIRED DETECT_QUIET) - set(_SETTINGS ${_SETTINGS} -pr:b=${ARG}) - endforeach() - - if(NOT _SETTINGS OR ARGUMENTS_PROFILE_AUTO STREQUAL "ALL") - set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version - compiler.runtime compiler.libcxx compiler.toolset os) - endif() - - # remove any manually specified settings from the autodetected settings - foreach(ARG ${ARGUMENTS_SETTINGS}) - string(REGEX MATCH "[^=]*" MANUAL_SETTING "${ARG}") - message(STATUS "Conan: ${MANUAL_SETTING} was added as an argument. Not using the autodetected one.") - list(REMOVE_ITEM ARGUMENTS_PROFILE_AUTO "${MANUAL_SETTING}") - endforeach() - - # Automatic from CMake - foreach(ARG ${ARGUMENTS_PROFILE_AUTO}) - string(TOUPPER ${ARG} _arg_name) - string(REPLACE "." "_" _arg_name ${_arg_name}) - if(_CONAN_SETTING_${_arg_name}) - set(_SETTINGS ${_SETTINGS} -s ${ARG}=${_CONAN_SETTING_${_arg_name}}) - endif() - endforeach() - - foreach(ARG ${ARGUMENTS_SETTINGS}) - set(_SETTINGS ${_SETTINGS} -s ${ARG}) - endforeach() - - message(STATUS "Conan: Settings= ${_SETTINGS}") - - set(${result} ${_SETTINGS} PARENT_SCOPE) -endfunction() - - -function(conan_cmake_detect_unix_libcxx result) - # Take into account any -stdlib in compile options - get_directory_property(compile_options DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_OPTIONS) - string(GENEX_STRIP "${compile_options}" compile_options) - - # Take into account any _GLIBCXX_USE_CXX11_ABI in compile definitions - get_directory_property(defines DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMPILE_DEFINITIONS) - string(GENEX_STRIP "${defines}" defines) - - foreach(define ${defines}) - if(define MATCHES "_GLIBCXX_USE_CXX11_ABI") - if(define MATCHES "^-D") - set(compile_options ${compile_options} "${define}") - else() - set(compile_options ${compile_options} "-D${define}") - endif() - endif() - endforeach() - - # add additional compiler options ala cmRulePlaceholderExpander::ExpandRuleVariable - set(EXPAND_CXX_COMPILER ${CMAKE_CXX_COMPILER}) - if(CMAKE_CXX_COMPILER_ARG1) - # CMake splits CXX="foo bar baz" into CMAKE_CXX_COMPILER="foo", CMAKE_CXX_COMPILER_ARG1="bar baz" - # without this, ccache, winegcc, or other wrappers might lose all their arguments - separate_arguments(SPLIT_CXX_COMPILER_ARG1 NATIVE_COMMAND ${CMAKE_CXX_COMPILER_ARG1}) - list(APPEND EXPAND_CXX_COMPILER ${SPLIT_CXX_COMPILER_ARG1}) - endif() - - if(CMAKE_CXX_COMPILE_OPTIONS_TARGET AND CMAKE_CXX_COMPILER_TARGET) - # without --target= we may be calling the wrong underlying GCC - list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_TARGET}${CMAKE_CXX_COMPILER_TARGET}") - endif() - - if(CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN AND CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN) - list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN}${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") - endif() - - if(CMAKE_CXX_COMPILE_OPTIONS_SYSROOT) - # without --sysroot= we may find the wrong #include - if(CMAKE_SYSROOT_COMPILE) - list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT_COMPILE}") - elseif(CMAKE_SYSROOT) - list(APPEND EXPAND_CXX_COMPILER "${CMAKE_CXX_COMPILE_OPTIONS_SYSROOT}${CMAKE_SYSROOT}") - endif() - endif() - - separate_arguments(SPLIT_CXX_FLAGS NATIVE_COMMAND ${CMAKE_CXX_FLAGS}) - - if(CMAKE_OSX_SYSROOT) - set(xcode_sysroot_option "--sysroot=${CMAKE_OSX_SYSROOT}") - endif() - - execute_process( - COMMAND ${CMAKE_COMMAND} -E echo "#include " - COMMAND ${EXPAND_CXX_COMPILER} ${SPLIT_CXX_FLAGS} -x c++ ${xcode_sysroot_option} ${compile_options} -E -dM - - OUTPUT_VARIABLE string_defines - ) - - if(string_defines MATCHES "#define __GLIBCXX__") - # Allow -D_GLIBCXX_USE_CXX11_ABI=ON/OFF as argument to cmake - if(DEFINED _GLIBCXX_USE_CXX11_ABI) - if(_GLIBCXX_USE_CXX11_ABI) - set(${result} libstdc++11 PARENT_SCOPE) - return() - else() - set(${result} libstdc++ PARENT_SCOPE) - return() - endif() - endif() - - if(string_defines MATCHES "#define _GLIBCXX_USE_CXX11_ABI 1\n") - set(${result} libstdc++11 PARENT_SCOPE) - else() - # Either the compiler is missing the define because it is old, and so - # it can't use the new abi, or the compiler was configured to use the - # old abi by the user or distro (e.g. devtoolset on RHEL/CentOS) - set(${result} libstdc++ PARENT_SCOPE) - endif() - else() - set(${result} libc++ PARENT_SCOPE) - endif() -endfunction() - -function(conan_cmake_detect_vs_runtime result) - - conan_parse_arguments(${ARGV}) - if(ARGUMENTS_BUILD_TYPE) - set(build_type "${ARGUMENTS_BUILD_TYPE}") - elseif(CMAKE_BUILD_TYPE) - set(build_type "${CMAKE_BUILD_TYPE}") - else() - message(FATAL_ERROR "Please specify in command line CMAKE_BUILD_TYPE (-DCMAKE_BUILD_TYPE=Release)") - endif() - - if(build_type) - string(TOUPPER "${build_type}" build_type) - endif() - set(variables CMAKE_CXX_FLAGS_${build_type} CMAKE_C_FLAGS_${build_type} CMAKE_CXX_FLAGS CMAKE_C_FLAGS) - foreach(variable ${variables}) - if(NOT "${${variable}}" STREQUAL "") - string(REPLACE " " ";" flags "${${variable}}") - foreach (flag ${flags}) - if("${flag}" STREQUAL "/MD" OR "${flag}" STREQUAL "/MDd" OR "${flag}" STREQUAL "/MT" OR "${flag}" STREQUAL "/MTd") - string(SUBSTRING "${flag}" 1 -1 runtime) - set(${result} "${runtime}" PARENT_SCOPE) - return() - endif() - endforeach() - endif() - endforeach() - if("${build_type}" STREQUAL "DEBUG") - set(${result} "MDd" PARENT_SCOPE) - else() - set(${result} "MD" PARENT_SCOPE) - endif() -endfunction() - -function(_collect_settings result) - set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version - compiler.runtime compiler.libcxx compiler.toolset - compiler.cppstd os) - foreach(ARG ${ARGUMENTS_PROFILE_AUTO}) - string(TOUPPER ${ARG} _arg_name) - string(REPLACE "." "_" _arg_name ${_arg_name}) - if(_CONAN_SETTING_${_arg_name}) - set(detected_setings ${detected_setings} ${ARG}=${_CONAN_SETTING_${_arg_name}}) - endif() - endforeach() - set(${result} ${detected_setings} PARENT_SCOPE) -endfunction() - -function(conan_cmake_autodetect detected_settings) - _conan_detect_build_type(${ARGV}) - _conan_check_system_name() - _conan_check_language() - _conan_detect_compiler(${ARGV}) - _collect_settings(collected_settings) - set(${detected_settings} ${collected_settings} PARENT_SCOPE) -endfunction() - -macro(conan_parse_arguments) - set(options BASIC_SETUP CMAKE_TARGETS UPDATE KEEP_RPATHS NO_LOAD NO_OUTPUT_DIRS - OUTPUT_QUIET NO_IMPORTS SKIP_STD) - set(oneValueArgs CONANFILE ARCH BUILD_TYPE INSTALL_FOLDER OUTPUT_FOLDER CONAN_COMMAND) - set(multiValueArgs DEBUG_PROFILE RELEASE_PROFILE RELWITHDEBINFO_PROFILE MINSIZEREL_PROFILE - PROFILE REQUIRES OPTIONS IMPORTS SETTINGS BUILD ENV GENERATORS PROFILE_AUTO - INSTALL_ARGS CONFIGURATION_TYPES PROFILE_BUILD BUILD_REQUIRES) - cmake_parse_arguments(ARGUMENTS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) -endmacro() - -function(old_conan_cmake_install) - # Calls "conan install" - # Argument BUILD is equivalent to --build={missing, PkgName,...} or - # --build when argument is 'BUILD all' (which builds all packages from source) - # Argument CONAN_COMMAND, to specify the conan path, e.g. in case of running from source - # cmake does not identify conan as command, even if it is +x and it is in the path - conan_parse_arguments(${ARGV}) - - if(CONAN_CMAKE_MULTI) - set(ARGUMENTS_GENERATORS ${ARGUMENTS_GENERATORS} cmake_multi) - else() - set(ARGUMENTS_GENERATORS ${ARGUMENTS_GENERATORS} cmake) - endif() - - set(CONAN_BUILD_POLICY "") - foreach(ARG ${ARGUMENTS_BUILD}) - if(${ARG} STREQUAL "all") - set(CONAN_BUILD_POLICY ${CONAN_BUILD_POLICY} --build) - break() - else() - set(CONAN_BUILD_POLICY ${CONAN_BUILD_POLICY} --build=${ARG}) - endif() - endforeach() - if(ARGUMENTS_CONAN_COMMAND) - set(CONAN_CMD ${ARGUMENTS_CONAN_COMMAND}) - else() - conan_check(REQUIRED) - endif() - set(CONAN_OPTIONS "") - if(ARGUMENTS_CONANFILE) - if(IS_ABSOLUTE ${ARGUMENTS_CONANFILE}) - set(CONANFILE ${ARGUMENTS_CONANFILE}) - else() - set(CONANFILE ${CMAKE_CURRENT_SOURCE_DIR}/${ARGUMENTS_CONANFILE}) - endif() - else() - set(CONANFILE ".") - endif() - foreach(ARG ${ARGUMENTS_OPTIONS}) - set(CONAN_OPTIONS ${CONAN_OPTIONS} -o=${ARG}) - endforeach() - if(ARGUMENTS_UPDATE) - set(CONAN_INSTALL_UPDATE --update) - endif() - if(ARGUMENTS_NO_IMPORTS) - set(CONAN_INSTALL_NO_IMPORTS --no-imports) - endif() - set(CONAN_INSTALL_FOLDER "") - if(ARGUMENTS_INSTALL_FOLDER) - set(CONAN_INSTALL_FOLDER -if=${ARGUMENTS_INSTALL_FOLDER}) - endif() - set(CONAN_OUTPUT_FOLDER "") - if(ARGUMENTS_OUTPUT_FOLDER) - set(CONAN_OUTPUT_FOLDER -of=${ARGUMENTS_OUTPUT_FOLDER}) - endif() - foreach(ARG ${ARGUMENTS_GENERATORS}) - set(CONAN_GENERATORS ${CONAN_GENERATORS} -g=${ARG}) - endforeach() - foreach(ARG ${ARGUMENTS_ENV}) - set(CONAN_ENV_VARS ${CONAN_ENV_VARS} -e=${ARG}) - endforeach() - set(conan_args install ${CONANFILE} ${settings} ${CONAN_ENV_VARS} ${CONAN_GENERATORS} ${CONAN_BUILD_POLICY} ${CONAN_INSTALL_UPDATE} ${CONAN_INSTALL_NO_IMPORTS} ${CONAN_OPTIONS} ${CONAN_INSTALL_FOLDER} ${ARGUMENTS_INSTALL_ARGS}) - - string (REPLACE ";" " " _conan_args "${conan_args}") - message(STATUS "Conan executing: ${CONAN_CMD} ${_conan_args}") - - if(ARGUMENTS_OUTPUT_QUIET) - execute_process(COMMAND ${CONAN_CMD} ${conan_args} - RESULT_VARIABLE return_code - OUTPUT_VARIABLE conan_output - ERROR_VARIABLE conan_output - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - else() - execute_process(COMMAND ${CONAN_CMD} ${conan_args} - RESULT_VARIABLE return_code - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - endif() - - if(NOT "${return_code}" STREQUAL "0") - message(FATAL_ERROR "Conan install failed='${return_code}'") - endif() - -endfunction() - -function(conan_cmake_install) - if(DEFINED CONAN_COMMAND) - set(CONAN_CMD ${CONAN_COMMAND}) - else() - conan_check(REQUIRED) - endif() - - set(installOptions UPDATE NO_IMPORTS OUTPUT_QUIET ERROR_QUIET) - set(installOneValueArgs PATH_OR_REFERENCE REFERENCE REMOTE LOCKFILE LOCKFILE_OUT LOCKFILE_NODE_ID INSTALL_FOLDER OUTPUT_FOLDER) - set(installMultiValueArgs GENERATOR BUILD ENV ENV_HOST ENV_BUILD OPTIONS_HOST OPTIONS OPTIONS_BUILD PROFILE - PROFILE_HOST PROFILE_BUILD SETTINGS SETTINGS_HOST SETTINGS_BUILD CONF CONF_HOST CONF_BUILD) - cmake_parse_arguments(ARGS "${installOptions}" "${installOneValueArgs}" "${installMultiValueArgs}" ${ARGN}) - foreach(arg ${installOptions}) - if(ARGS_${arg}) - set(${arg} ${${arg}} ${ARGS_${arg}}) - endif() - endforeach() - foreach(arg ${installOneValueArgs}) - if(DEFINED ARGS_${arg}) - if("${arg}" STREQUAL "REMOTE") - set(flag "--remote") - elseif("${arg}" STREQUAL "LOCKFILE") - set(flag "--lockfile") - elseif("${arg}" STREQUAL "LOCKFILE_OUT") - set(flag "--lockfile-out") - elseif("${arg}" STREQUAL "LOCKFILE_NODE_ID") - set(flag "--lockfile-node-id") - elseif("${arg}" STREQUAL "INSTALL_FOLDER") - set(flag "--install-folder") - elseif("${arg}" STREQUAL "OUTPUT_FOLDER") - set(flag "--output-folder") - endif() - set(${arg} ${${arg}} ${flag} ${ARGS_${arg}}) - endif() - endforeach() - foreach(arg ${installMultiValueArgs}) - if(DEFINED ARGS_${arg}) - if("${arg}" STREQUAL "GENERATOR") - set(flag "--generator") - elseif("${arg}" STREQUAL "BUILD") - set(flag "--build") - elseif("${arg}" STREQUAL "ENV") - set(flag "--env") - elseif("${arg}" STREQUAL "ENV_HOST") - set(flag "--env:host") - elseif("${arg}" STREQUAL "ENV_BUILD") - set(flag "--env:build") - elseif("${arg}" STREQUAL "OPTIONS") - set(flag "--options") - elseif("${arg}" STREQUAL "OPTIONS_HOST") - set(flag "--options:host") - elseif("${arg}" STREQUAL "OPTIONS_BUILD") - set(flag "--options:build") - elseif("${arg}" STREQUAL "PROFILE") - set(flag "--profile") - elseif("${arg}" STREQUAL "PROFILE_HOST") - set(flag "--profile:host") - elseif("${arg}" STREQUAL "PROFILE_BUILD") - set(flag "--profile:build") - elseif("${arg}" STREQUAL "SETTINGS") - set(flag "--settings") - elseif("${arg}" STREQUAL "SETTINGS_HOST") - set(flag "--settings:host") - elseif("${arg}" STREQUAL "SETTINGS_BUILD") - set(flag "--settings:build") - elseif("${arg}" STREQUAL "CONF") - set(flag "--conf") - elseif("${arg}" STREQUAL "CONF_HOST") - set(flag "--conf:host") - elseif("${arg}" STREQUAL "CONF_BUILD") - set(flag "--conf:build") - endif() - list(LENGTH ARGS_${arg} numargs) - foreach(item ${ARGS_${arg}}) - if(${item} STREQUAL "all" AND ${arg} STREQUAL "BUILD") - set(${arg} "--build") - break() - endif() - set(${arg} ${${arg}} ${flag} ${item}) - endforeach() - endif() - endforeach() - if(DEFINED UPDATE) - set(UPDATE --update) - endif() - if(DEFINED NO_IMPORTS) - set(NO_IMPORTS --no-imports) - endif() - set(install_args install ${PATH_OR_REFERENCE} ${REFERENCE} ${UPDATE} ${NO_IMPORTS} ${REMOTE} - ${LOCKFILE} ${LOCKFILE_OUT} ${LOCKFILE_NODE_ID} ${INSTALL_FOLDER} - ${OUTPUT_FOLDER} ${GENERATOR} ${BUILD} ${ENV} ${ENV_HOST} ${ENV_BUILD} - ${OPTIONS} ${OPTIONS_HOST} ${OPTIONS_BUILD} ${PROFILE} ${PROFILE_HOST} - ${PROFILE_BUILD} ${SETTINGS} ${SETTINGS_HOST} ${SETTINGS_BUILD} - ${CONF} ${CONF_HOST} ${CONF_BUILD}) - - string(REPLACE ";" " " _install_args "${install_args}") - message(STATUS "Conan executing: ${CONAN_CMD} ${_install_args}") - - if(ARGS_OUTPUT_QUIET) - set(OUTPUT_OPT OUTPUT_QUIET) - endif() - if(ARGS_ERROR_QUIET) - set(ERROR_OPT ERROR_QUIET) - endif() - - execute_process(COMMAND ${CONAN_CMD} ${install_args} - RESULT_VARIABLE return_code - ${OUTPUT_OPT} - ${ERROR_OPT} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - - if(NOT "${return_code}" STREQUAL "0") - if (ARGS_ERROR_QUIET) - message(WARNING "Conan install failed='${return_code}'") - else() - message(FATAL_ERROR "Conan install failed='${return_code}'") - endif() - endif() - -endfunction() - -function(conan_cmake_lock_create) - if(DEFINED CONAN_COMMAND) - set(CONAN_CMD ${CONAN_COMMAND}) - else() - conan_check(REQUIRED) - endif() - - set(lockCreateOptions UPDATE BASE OUTPUT_QUIET ERROR_QUIET) - set(lockCreateOneValueArgs PATH REFERENCE REMOTE LOCKFILE LOCKFILE_OUT) - set(lockCreateMultiValueArgs BUILD ENV ENV_HOST ENV_BUILD OPTIONS_HOST OPTIONS OPTIONS_BUILD PROFILE - PROFILE_HOST PROFILE_BUILD SETTINGS SETTINGS_HOST SETTINGS_BUILD) - cmake_parse_arguments(ARGS "${lockCreateOptions}" "${lockCreateOneValueArgs}" "${lockCreateMultiValueArgs}" ${ARGN}) - foreach(arg ${lockCreateOptions}) - if(ARGS_${arg}) - set(${arg} ${${arg}} ${ARGS_${arg}}) - endif() - endforeach() - foreach(arg ${lockCreateOneValueArgs}) - if(DEFINED ARGS_${arg}) - if("${arg}" STREQUAL "REMOTE") - set(flag "--remote") - elseif("${arg}" STREQUAL "LOCKFILE") - set(flag "--lockfile") - elseif("${arg}" STREQUAL "LOCKFILE_OUT") - set(flag "--lockfile-out") - endif() - set(${arg} ${${arg}} ${flag} ${ARGS_${arg}}) - endif() - endforeach() - foreach(arg ${lockCreateMultiValueArgs}) - if(DEFINED ARGS_${arg}) - if("${arg}" STREQUAL "BUILD") - set(flag "--build") - elseif("${arg}" STREQUAL "ENV") - set(flag "--env") - elseif("${arg}" STREQUAL "ENV_HOST") - set(flag "--env:host") - elseif("${arg}" STREQUAL "ENV_BUILD") - set(flag "--env:build") - elseif("${arg}" STREQUAL "OPTIONS") - set(flag "--options") - elseif("${arg}" STREQUAL "OPTIONS_HOST") - set(flag "--options:host") - elseif("${arg}" STREQUAL "OPTIONS_BUILD") - set(flag "--options:build") - elseif("${arg}" STREQUAL "PROFILE") - set(flag "--profile") - elseif("${arg}" STREQUAL "PROFILE_HOST") - set(flag "--profile:host") - elseif("${arg}" STREQUAL "PROFILE_BUILD") - set(flag "--profile:build") - elseif("${arg}" STREQUAL "SETTINGS") - set(flag "--settings") - elseif("${arg}" STREQUAL "SETTINGS_HOST") - set(flag "--settings:host") - elseif("${arg}" STREQUAL "SETTINGS_BUILD") - set(flag "--settings:build") - endif() - list(LENGTH ARGS_${arg} numargs) - foreach(item ${ARGS_${arg}}) - if(${item} STREQUAL "all" AND ${arg} STREQUAL "BUILD") - set(${arg} "--build") - break() - endif() - set(${arg} ${${arg}} ${flag} ${item}) - endforeach() - endif() - endforeach() - if(DEFINED UPDATE) - set(UPDATE --update) - endif() - if(DEFINED BASE) - set(BASE --base) - endif() - set(lock_create_Args lock create ${PATH} ${REFERENCE} ${UPDATE} ${BASE} ${REMOTE} ${LOCKFILE} ${LOCKFILE_OUT} ${LOCKFILE_NODE_ID} ${INSTALL_FOLDER} - ${GENERATOR} ${BUILD} ${ENV} ${ENV_HOST} ${ENV_BUILD} ${OPTIONS} ${OPTIONS_HOST} ${OPTIONS_BUILD} - ${PROFILE} ${PROFILE_HOST} ${PROFILE_BUILD} ${SETTINGS} ${SETTINGS_HOST} ${SETTINGS_BUILD}) - - string(REPLACE ";" " " _lock_create_Args "${lock_create_Args}") - message(STATUS "Conan executing: ${CONAN_CMD} ${_lock_create_Args}") - - if(ARGS_OUTPUT_QUIET) - set(OUTPUT_OPT OUTPUT_QUIET) - endif() - if(ARGS_ERROR_QUIET) - set(ERROR_OPT ERROR_QUIET) - endif() - - execute_process(COMMAND ${CONAN_CMD} ${lock_create_Args} - RESULT_VARIABLE return_code - ${OUTPUT_OPT} - ${ERROR_OPT} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - - if(NOT "${return_code}" STREQUAL "0") - if (ARGS_ERROR_QUIET) - message(WARNING "Conan lock create failed='${return_code}'") - else() - message(FATAL_ERROR "Conan lock create failed='${return_code}'") - endif() - endif() -endfunction() - -function(conan_cmake_setup_conanfile) - conan_parse_arguments(${ARGV}) - if(ARGUMENTS_CONANFILE) - get_filename_component(_CONANFILE_NAME ${ARGUMENTS_CONANFILE} NAME) - # configure_file will make sure cmake re-runs when conanfile is updated - configure_file(${ARGUMENTS_CONANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk COPYONLY) - file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${_CONANFILE_NAME}.junk) - else() - conan_cmake_generate_conanfile(ON ${ARGV}) - endif() -endfunction() - -function(conan_cmake_configure) - conan_cmake_generate_conanfile(OFF ${ARGV}) -endfunction() - -# Generate, writing in disk a conanfile.txt with the requires, options, and imports -# specified as arguments -# This will be considered as temporary file, generated in CMAKE_CURRENT_BINARY_DIR) -function(conan_cmake_generate_conanfile DEFAULT_GENERATOR) - - conan_parse_arguments(${ARGV}) - - set(_FN "${CMAKE_CURRENT_BINARY_DIR}/conanfile.txt") - file(WRITE ${_FN} "") - - if(DEFINED ARGUMENTS_REQUIRES) - file(APPEND ${_FN} "[requires]\n") - foreach(REQUIRE ${ARGUMENTS_REQUIRES}) - file(APPEND ${_FN} ${REQUIRE} "\n") - endforeach() - endif() - - if (DEFAULT_GENERATOR OR DEFINED ARGUMENTS_GENERATORS) - file(APPEND ${_FN} "[generators]\n") - if (DEFAULT_GENERATOR) - file(APPEND ${_FN} "cmake\n") - endif() - if (DEFINED ARGUMENTS_GENERATORS) - foreach(GENERATOR ${ARGUMENTS_GENERATORS}) - file(APPEND ${_FN} ${GENERATOR} "\n") - endforeach() - endif() - endif() - - if(DEFINED ARGUMENTS_BUILD_REQUIRES) - file(APPEND ${_FN} "[build_requires]\n") - foreach(BUILD_REQUIRE ${ARGUMENTS_BUILD_REQUIRES}) - file(APPEND ${_FN} ${BUILD_REQUIRE} "\n") - endforeach() - endif() - - if(DEFINED ARGUMENTS_IMPORTS) - file(APPEND ${_FN} "[imports]\n") - foreach(IMPORTS ${ARGUMENTS_IMPORTS}) - file(APPEND ${_FN} ${IMPORTS} "\n") - endforeach() - endif() - - if(DEFINED ARGUMENTS_OPTIONS) - file(APPEND ${_FN} "[options]\n") - foreach(OPTION ${ARGUMENTS_OPTIONS}) - file(APPEND ${_FN} ${OPTION} "\n") - endforeach() - endif() - -endfunction() - - -macro(conan_load_buildinfo) - if(CONAN_CMAKE_MULTI) - set(_CONANBUILDINFO conanbuildinfo_multi.cmake) - else() - set(_CONANBUILDINFO conanbuildinfo.cmake) - endif() - if(ARGUMENTS_INSTALL_FOLDER) - set(_CONANBUILDINFOFOLDER ${ARGUMENTS_INSTALL_FOLDER}) - else() - set(_CONANBUILDINFOFOLDER ${CMAKE_CURRENT_BINARY_DIR}) - endif() - # Checks for the existence of conanbuildinfo.cmake, and loads it - # important that it is macro, so variables defined at parent scope - if(EXISTS "${_CONANBUILDINFOFOLDER}/${_CONANBUILDINFO}") - message(STATUS "Conan: Loading ${_CONANBUILDINFO}") - include(${_CONANBUILDINFOFOLDER}/${_CONANBUILDINFO}) - else() - message(FATAL_ERROR "${_CONANBUILDINFO} doesn't exist in ${CMAKE_CURRENT_BINARY_DIR}") - endif() -endmacro() - - -macro(conan_cmake_run) - conan_parse_arguments(${ARGV}) - - if(ARGUMENTS_CONFIGURATION_TYPES AND NOT CMAKE_CONFIGURATION_TYPES) - message(WARNING "CONFIGURATION_TYPES should only be specified for multi-configuration generators") - elseif(ARGUMENTS_CONFIGURATION_TYPES AND ARGUMENTS_BUILD_TYPE) - message(WARNING "CONFIGURATION_TYPES and BUILD_TYPE arguments should not be defined at the same time.") - endif() - - if(CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE AND NOT CONAN_EXPORTED - AND NOT ARGUMENTS_BUILD_TYPE) - set(CONAN_CMAKE_MULTI ON) - if (NOT ARGUMENTS_CONFIGURATION_TYPES) - set(ARGUMENTS_CONFIGURATION_TYPES "Release;Debug") - endif() - message(STATUS "Conan: Using cmake-multi generator") - else() - set(CONAN_CMAKE_MULTI OFF) - endif() - - if(NOT CONAN_EXPORTED) - conan_cmake_setup_conanfile(${ARGV}) - if(CONAN_CMAKE_MULTI) - foreach(CMAKE_BUILD_TYPE ${ARGUMENTS_CONFIGURATION_TYPES}) - set(ENV{CONAN_IMPORT_PATH} ${CMAKE_BUILD_TYPE}) - conan_cmake_settings(settings ${ARGV}) - old_conan_cmake_install(SETTINGS ${settings} ${ARGV}) - endforeach() - set(CMAKE_BUILD_TYPE) - else() - conan_cmake_settings(settings ${ARGV}) - old_conan_cmake_install(SETTINGS ${settings} ${ARGV}) - endif() - endif() - - if (NOT ARGUMENTS_NO_LOAD) - conan_load_buildinfo() - endif() - - if(ARGUMENTS_BASIC_SETUP) - foreach(_option CMAKE_TARGETS KEEP_RPATHS NO_OUTPUT_DIRS SKIP_STD) - if(ARGUMENTS_${_option}) - if(${_option} STREQUAL "CMAKE_TARGETS") - list(APPEND _setup_options "TARGETS") - else() - list(APPEND _setup_options ${_option}) - endif() - endif() - endforeach() - conan_basic_setup(${_setup_options}) - endif() -endmacro() - -function(conan_version result) - set(${result} "" PARENT_SCOPE) - - if(NOT CONAN_CMD) - find_program(CONAN_CMD conan) - if(NOT CONAN_CMD AND CONAN_REQUIRED) - message(FATAL_ERROR "Conan executable not found! Please install conan.") - endif() - endif() - - execute_process(COMMAND ${CONAN_CMD} --version - RESULT_VARIABLE return_code - OUTPUT_VARIABLE CONAN_VERSION_OUTPUT - ERROR_VARIABLE CONAN_VERSION_OUTPUT) - - if(NOT "${return_code}" STREQUAL "0") - message(FATAL_ERROR "Conan --version failed='${return_code}'") - endif() - - string(REGEX MATCH ".*Conan version ([0-9]+\\.[0-9]+\\.[0-9]+)" FOO "${CONAN_VERSION_OUTPUT}") - - set(${result} ${CMAKE_MATCH_1} PARENT_SCOPE) -endfunction() - -macro(conan_check) - # Checks conan availability in PATH - # Arguments REQUIRED, DETECT_QUIET and VERSION are optional - # Example usage: - # conan_check(VERSION 1.0.0 REQUIRED) - set(options REQUIRED DETECT_QUIET) - set(oneValueArgs VERSION) - cmake_parse_arguments(CONAN "${options}" "${oneValueArgs}" "" ${ARGN}) - if(NOT CONAN_DETECT_QUIET) - message(STATUS "Conan: checking conan executable") - endif() - - find_program(CONAN_CMD conan) - if(NOT CONAN_CMD AND CONAN_REQUIRED) - message(FATAL_ERROR "Conan executable not found! Please install conan.") - endif() - if(NOT CONAN_DETECT_QUIET) - message(STATUS "Conan: Found program ${CONAN_CMD}") - endif() - - conan_version(CONAN_DETECTED_VERSION) - - if(NOT CONAN_DETECT_QUIET) - message(STATUS "Conan: Version found ${CONAN_DETECTED_VERSION}") - endif() - - if(DEFINED CONAN_VERSION) - if(${CONAN_DETECTED_VERSION} VERSION_LESS ${CONAN_VERSION}) - message(FATAL_ERROR "Conan outdated. Installed: ${CONAN_DETECTED_VERSION}, \ - required: ${CONAN_VERSION}. Consider updating via 'pip \ - install conan==${CONAN_VERSION}'.") - endif() - endif() -endmacro() - -function(conan_add_remote) - # Adds a remote - # Arguments URL and NAME are required, INDEX, COMMAND and VERIFY_SSL are optional - # Example usage: - # conan_add_remote(NAME bincrafters INDEX 1 - # URL https://api.bintray.com/conan/bincrafters/public-conan - # VERIFY_SSL True) - set(oneValueArgs URL NAME INDEX COMMAND VERIFY_SSL) - cmake_parse_arguments(CONAN "" "${oneValueArgs}" "" ${ARGN}) - - if(DEFINED CONAN_INDEX) - set(CONAN_INDEX_ARG "-i ${CONAN_INDEX}") - endif() - if(DEFINED CONAN_COMMAND) - set(CONAN_CMD ${CONAN_COMMAND}) - else() - conan_check(REQUIRED DETECT_QUIET) - endif() - set(CONAN_VERIFY_SSL_ARG "True") - if(DEFINED CONAN_VERIFY_SSL) - set(CONAN_VERIFY_SSL_ARG ${CONAN_VERIFY_SSL}) - endif() - message(STATUS "Conan: Adding ${CONAN_NAME} remote repository (${CONAN_URL}) verify ssl (${CONAN_VERIFY_SSL_ARG})") - execute_process(COMMAND ${CONAN_CMD} remote add ${CONAN_NAME} ${CONAN_INDEX_ARG} -f ${CONAN_URL} ${CONAN_VERIFY_SSL_ARG} - RESULT_VARIABLE return_code) - if(NOT "${return_code}" STREQUAL "0") - message(FATAL_ERROR "Conan remote failed='${return_code}'") - endif() -endfunction() - -macro(conan_config_install) - # install a full configuration from a local or remote zip file - # Argument ITEM is required, arguments TYPE, SOURCE, TARGET and VERIFY_SSL are optional - # Example usage: - # conan_config_install(ITEM https://github.com/conan-io/cmake-conan.git - # TYPE git SOURCE source-folder TARGET target-folder VERIFY_SSL false) - set(oneValueArgs ITEM TYPE SOURCE TARGET VERIFY_SSL) - set(multiValueArgs ARGS) - cmake_parse_arguments(CONAN "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - - if(DEFINED CONAN_COMMAND) - set(CONAN_CMD ${CONAN_COMMAND}) - else() - conan_check(REQUIRED) - endif() - - if(DEFINED CONAN_VERIFY_SSL) - set(CONAN_VERIFY_SSL_ARG "--verify-ssl=${CONAN_VERIFY_SSL}") - endif() - - if(DEFINED CONAN_TYPE) - set(CONAN_TYPE_ARG "--type=${CONAN_TYPE}") - endif() - - if(DEFINED CONAN_ARGS) - # Convert ; seperated multi arg list into space seperated string - string(REPLACE ";" " " l_CONAN_ARGS "${CONAN_ARGS}") - set(CONAN_ARGS_ARGS "--args=${l_CONAN_ARGS}") - endif() - - if(DEFINED CONAN_SOURCE) - set(CONAN_SOURCE_ARGS "--source-folder=${CONAN_SOURCE}") - endif() - - if(DEFINED CONAN_TARGET) - set(CONAN_TARGET_ARGS "--target-folder=${CONAN_TARGET}") - endif() - - set (CONAN_CONFIG_INSTALL_ARGS ${CONAN_VERIFY_SSL_ARG} - ${CONAN_TYPE_ARG} - ${CONAN_ARGS_ARGS} - ${CONAN_SOURCE_ARGS} - ${CONAN_TARGET_ARGS}) - - message(STATUS "Conan: Installing config from ${CONAN_ITEM}") - execute_process(COMMAND ${CONAN_CMD} config install ${CONAN_ITEM} ${CONAN_CONFIG_INSTALL_ARGS} - RESULT_VARIABLE return_code) - if(NOT "${return_code}" STREQUAL "0") - message(FATAL_ERROR "Conan config failed='${return_code}'") - endif() -endmacro() - - -function(conan_cmake_profile) - set(profileOneValueArgs FILEPATH INCLUDE) - set(profileMultiValueArgs SETTINGS OPTIONS CONF ENV BUILDENV RUNENV TOOL_REQUIRES) - cmake_parse_arguments(ARGS "" "${profileOneValueArgs}" "${profileMultiValueArgs}" ${ARGN}) - - if(DEFINED ARGS_FILEPATH) - set(_FN "${ARGS_FILEPATH}") - else() - set(_FN "${CMAKE_CURRENT_BINARY_DIR}/profile") - endif() - message(STATUS "Conan: Creating profile ${_FN}") - file(WRITE ${_FN} "") - - if(DEFINED ARGS_INCLUDE) - file(APPEND ${_FN} "include(${ARGS_INCLUDE})\n") - endif() - - if(DEFINED ARGS_SETTINGS) - file(APPEND ${_FN} "[settings]\n") - foreach(SETTING ${ARGS_SETTINGS}) - file(APPEND ${_FN} ${SETTING} "\n") - endforeach() - endif() - - if(DEFINED ARGS_OPTIONS) - file(APPEND ${_FN} "[options]\n") - foreach(OPTION ${ARGS_OPTIONS}) - file(APPEND ${_FN} ${OPTION} "\n") - endforeach() - endif() - - if(DEFINED ARGS_CONF) - file(APPEND ${_FN} "[conf]\n") - foreach(CONF ${ARGS_CONF}) - file(APPEND ${_FN} ${CONF} "\n") - endforeach() - endif() - - if(DEFINED ARGS_ENV) - file(APPEND ${_FN} "[env]\n") - foreach(ENV ${ARGS_ENV}) - file(APPEND ${_FN} ${ENV} "\n") - endforeach() - endif() - - if(DEFINED ARGS_BUILDENV) - file(APPEND ${_FN} "[buildenv]\n") - foreach(BUILDENV ${ARGS_BUILDENV}) - file(APPEND ${_FN} ${BUILDENV} "\n") - endforeach() - endif() - - if(DEFINED ARGS_RUNENV) - file(APPEND ${_FN} "[runenv]\n") - foreach(RUNENV ${ARGS_RUNENV}) - file(APPEND ${_FN} ${RUNENV} "\n") - endforeach() - endif() - - if(DEFINED ARGS_TOOL_REQUIRES) - file(APPEND ${_FN} "[tool_requires]\n") - foreach(TOOL_REQUIRE ${ARGS_TOOL_REQUIRES}) - file(APPEND ${_FN} ${TOOL_REQUIRE} "\n") - endforeach() - endif() -endfunction() diff --git a/third_party/cmake-conan/conan_provider.cmake b/third_party/cmake-conan/conan_provider.cmake new file mode 100644 index 0000000000..0afa940abf --- /dev/null +++ b/third_party/cmake-conan/conan_provider.cmake @@ -0,0 +1,676 @@ +# The MIT License (MIT) +# +# Copyright (c) 2024 JFrog +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +set(CONAN_MINIMUM_VERSION 2.0.5) + +# Create a new policy scope and set the minimum required cmake version so the +# features behind a policy setting like if(... IN_LIST ...) behaves as expected +# even if the parent project does not specify a minimum cmake version or a minimum +# version less than this module requires (e.g. 3.0) before the first project() call. +# (see: https://cmake.org/cmake/help/latest/variable/CMAKE_PROJECT_TOP_LEVEL_INCLUDES.html) +# +# The policy-affecting calls like cmake_policy(SET...) or `cmake_minimum_required` only +# affects the current policy scope, i.e. between the PUSH and POP in this case. +# +# https://cmake.org/cmake/help/book/mastering-cmake/chapter/Policies.html#the-policy-stack +cmake_policy(PUSH) +cmake_minimum_required(VERSION 3.24) + + +function(detect_os os os_api_level os_sdk os_subsystem os_version) + # it could be cross compilation + message(STATUS "CMake-Conan: cmake_system_name=${CMAKE_SYSTEM_NAME}") + if(CMAKE_SYSTEM_NAME AND NOT CMAKE_SYSTEM_NAME STREQUAL "Generic") + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(${os} Macos PARENT_SCOPE) + elseif(CMAKE_SYSTEM_NAME STREQUAL "QNX") + set(${os} Neutrino PARENT_SCOPE) + elseif(CMAKE_SYSTEM_NAME STREQUAL "CYGWIN") + set(${os} Windows PARENT_SCOPE) + set(${os_subsystem} cygwin PARENT_SCOPE) + elseif(CMAKE_SYSTEM_NAME MATCHES "^MSYS") + set(${os} Windows PARENT_SCOPE) + set(${os_subsystem} msys2 PARENT_SCOPE) + else() + set(${os} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE) + endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Android") + if(DEFINED ANDROID_PLATFORM) + string(REGEX MATCH "[0-9]+" _os_api_level ${ANDROID_PLATFORM}) + elseif(DEFINED CMAKE_SYSTEM_VERSION) + set(_os_api_level ${CMAKE_SYSTEM_VERSION}) + endif() + message(STATUS "CMake-Conan: android api level=${_os_api_level}") + set(${os_api_level} ${_os_api_level} PARENT_SCOPE) + endif() + if(CMAKE_SYSTEM_NAME MATCHES "Darwin|iOS|tvOS|watchOS") + # CMAKE_OSX_SYSROOT contains the full path to the SDK for MakeFile/Ninja + # generators, but just has the original input string for Xcode. + if(NOT IS_DIRECTORY ${CMAKE_OSX_SYSROOT}) + set(_os_sdk ${CMAKE_OSX_SYSROOT}) + else() + if(CMAKE_OSX_SYSROOT MATCHES Simulator) + set(apple_platform_suffix simulator) + else() + set(apple_platform_suffix os) + endif() + if(CMAKE_OSX_SYSROOT MATCHES AppleTV) + set(_os_sdk "appletv${apple_platform_suffix}") + elseif(CMAKE_OSX_SYSROOT MATCHES iPhone) + set(_os_sdk "iphone${apple_platform_suffix}") + elseif(CMAKE_OSX_SYSROOT MATCHES Watch) + set(_os_sdk "watch${apple_platform_suffix}") + endif() + endif() + if(DEFINED os_sdk) + message(STATUS "CMake-Conan: cmake_osx_sysroot=${CMAKE_OSX_SYSROOT}") + set(${os_sdk} ${_os_sdk} PARENT_SCOPE) + endif() + if(DEFINED CMAKE_OSX_DEPLOYMENT_TARGET) + message(STATUS "CMake-Conan: cmake_osx_deployment_target=${CMAKE_OSX_DEPLOYMENT_TARGET}") + set(${os_version} ${CMAKE_OSX_DEPLOYMENT_TARGET} PARENT_SCOPE) + endif() + endif() + endif() +endfunction() + + +function(detect_arch arch) + # CMAKE_OSX_ARCHITECTURES can contain multiple architectures, but Conan only supports one. + # Therefore this code only finds one. If the recipes support multiple architectures, the + # build will work. Otherwise, there will be a linker error for the missing architecture(s). + if(DEFINED CMAKE_OSX_ARCHITECTURES) + string(REPLACE " " ";" apple_arch_list "${CMAKE_OSX_ARCHITECTURES}") + list(LENGTH apple_arch_list apple_arch_count) + if(apple_arch_count GREATER 1) + message(WARNING "CMake-Conan: Multiple architectures detected, this will only work if Conan recipe(s) produce fat binaries.") + endif() + endif() + if(CMAKE_SYSTEM_NAME MATCHES "Darwin|iOS|tvOS|watchOS" AND NOT CMAKE_OSX_ARCHITECTURES STREQUAL "") + set(host_arch ${CMAKE_OSX_ARCHITECTURES}) + elseif(MSVC) + set(host_arch ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}) + else() + set(host_arch ${CMAKE_SYSTEM_PROCESSOR}) + endif() + if(host_arch MATCHES "aarch64|arm64|ARM64") + set(_arch armv8) + elseif(host_arch MATCHES "armv7|armv7-a|armv7l|ARMV7") + set(_arch armv7) + elseif(host_arch MATCHES armv7s) + set(_arch armv7s) + elseif(host_arch MATCHES "i686|i386|X86") + set(_arch x86) + elseif(host_arch MATCHES "AMD64|amd64|x86_64|x64") + set(_arch x86_64) + endif() + message(STATUS "CMake-Conan: cmake_system_processor=${_arch}") + set(${arch} ${_arch} PARENT_SCOPE) +endfunction() + + +function(detect_cxx_standard cxx_standard) + set(${cxx_standard} ${CMAKE_CXX_STANDARD} PARENT_SCOPE) + if(CMAKE_CXX_EXTENSIONS) + set(${cxx_standard} "gnu${CMAKE_CXX_STANDARD}" PARENT_SCOPE) + endif() +endfunction() + + +macro(detect_gnu_libstdcxx) + # _conan_is_gnu_libstdcxx true if GNU libstdc++ + check_cxx_source_compiles(" + #include + #if !defined(__GLIBCXX__) && !defined(__GLIBCPP__) + static_assert(false); + #endif + int main(){}" _conan_is_gnu_libstdcxx) + + # _conan_gnu_libstdcxx_is_cxx11_abi true if C++11 ABI + check_cxx_source_compiles(" + #include + static_assert(sizeof(std::string) != sizeof(void*), \"using libstdc++\"); + int main () {}" _conan_gnu_libstdcxx_is_cxx11_abi) + + set(_conan_gnu_libstdcxx_suffix "") + if(_conan_gnu_libstdcxx_is_cxx11_abi) + set(_conan_gnu_libstdcxx_suffix "11") + endif() + unset (_conan_gnu_libstdcxx_is_cxx11_abi) +endmacro() + + +macro(detect_libcxx) + # _conan_is_libcxx true if LLVM libc++ + check_cxx_source_compiles(" + #include + #if !defined(_LIBCPP_VERSION) + static_assert(false); + #endif + int main(){}" _conan_is_libcxx) +endmacro() + + +function(detect_lib_cxx lib_cxx) + if(CMAKE_SYSTEM_NAME STREQUAL "Android") + message(STATUS "CMake-Conan: android_stl=${CMAKE_ANDROID_STL_TYPE}") + set(${lib_cxx} ${CMAKE_ANDROID_STL_TYPE} PARENT_SCOPE) + return() + endif() + + include(CheckCXXSourceCompiles) + + if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") + detect_gnu_libstdcxx() + set(${lib_cxx} "libstdc++${_conan_gnu_libstdcxx_suffix}" PARENT_SCOPE) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") + set(${lib_cxx} "libc++" PARENT_SCOPE) + elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + # Check for libc++ + detect_libcxx() + if(_conan_is_libcxx) + set(${lib_cxx} "libc++" PARENT_SCOPE) + return() + endif() + + # Check for libstdc++ + detect_gnu_libstdcxx() + if(_conan_is_gnu_libstdcxx) + set(${lib_cxx} "libstdc++${_conan_gnu_libstdcxx_suffix}" PARENT_SCOPE) + return() + endif() + + # TODO: it would be an error if we reach this point + elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + # Do nothing - compiler.runtime and compiler.runtime_type + # should be handled separately: https://github.com/conan-io/cmake-conan/pull/516 + return() + else() + # TODO: unable to determine, ask user to provide a full profile file instead + endif() +endfunction() + + +function(detect_compiler compiler compiler_version compiler_runtime compiler_runtime_type) + if(DEFINED CMAKE_CXX_COMPILER_ID) + set(_compiler ${CMAKE_CXX_COMPILER_ID}) + set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION}) + else() + if(NOT DEFINED CMAKE_C_COMPILER_ID) + message(FATAL_ERROR "C or C++ compiler not defined") + endif() + set(_compiler ${CMAKE_C_COMPILER_ID}) + set(_compiler_version ${CMAKE_C_COMPILER_VERSION}) + endif() + + message(STATUS "CMake-Conan: CMake compiler=${_compiler}") + message(STATUS "CMake-Conan: CMake compiler version=${_compiler_version}") + + if(_compiler MATCHES MSVC) + set(_compiler "msvc") + string(SUBSTRING ${MSVC_VERSION} 0 3 _compiler_version) + # Configure compiler.runtime and compiler.runtime_type settings for MSVC + if(CMAKE_MSVC_RUNTIME_LIBRARY) + set(_msvc_runtime_library ${CMAKE_MSVC_RUNTIME_LIBRARY}) + else() + set(_msvc_runtime_library MultiThreaded$<$:Debug>DLL) # default value documented by CMake + endif() + + set(_KNOWN_MSVC_RUNTIME_VALUES "") + list(APPEND _KNOWN_MSVC_RUNTIME_VALUES MultiThreaded MultiThreadedDLL) + list(APPEND _KNOWN_MSVC_RUNTIME_VALUES MultiThreadedDebug MultiThreadedDebugDLL) + list(APPEND _KNOWN_MSVC_RUNTIME_VALUES MultiThreaded$<$:Debug> MultiThreaded$<$:Debug>DLL) + + # only accept the 6 possible values, otherwise we don't don't know to map this + if(NOT _msvc_runtime_library IN_LIST _KNOWN_MSVC_RUNTIME_VALUES) + message(FATAL_ERROR "CMake-Conan: unable to map MSVC runtime: ${_msvc_runtime_library} to Conan settings") + endif() + + # Runtime is "dynamic" in all cases if it ends in DLL + if(_msvc_runtime_library MATCHES ".*DLL$") + set(_compiler_runtime "dynamic") + else() + set(_compiler_runtime "static") + endif() + message(STATUS "CMake-Conan: CMake compiler.runtime=${_compiler_runtime}") + + # Only define compiler.runtime_type when explicitly requested + # If a generator expression is used, let Conan handle it conditional on build_type + if(NOT _msvc_runtime_library MATCHES ":Debug>") + if(_msvc_runtime_library MATCHES "Debug") + set(_compiler_runtime_type "Debug") + else() + set(_compiler_runtime_type "Release") + endif() + message(STATUS "CMake-Conan: CMake compiler.runtime_type=${_compiler_runtime_type}") + endif() + + unset(_KNOWN_MSVC_RUNTIME_VALUES) + + elseif(_compiler MATCHES AppleClang) + set(_compiler "apple-clang") + string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + list(GET VERSION_LIST 0 _compiler_version) + elseif(_compiler MATCHES Clang) + set(_compiler "clang") + string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + list(GET VERSION_LIST 0 _compiler_version) + elseif(_compiler MATCHES GNU) + set(_compiler "gcc") + string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + list(GET VERSION_LIST 0 _compiler_version) + endif() + + message(STATUS "CMake-Conan: [settings] compiler=${_compiler}") + message(STATUS "CMake-Conan: [settings] compiler.version=${_compiler_version}") + if (_compiler_runtime) + message(STATUS "CMake-Conan: [settings] compiler.runtime=${_compiler_runtime}") + endif() + if (_compiler_runtime_type) + message(STATUS "CMake-Conan: [settings] compiler.runtime_type=${_compiler_runtime_type}") + endif() + + set(${compiler} ${_compiler} PARENT_SCOPE) + set(${compiler_version} ${_compiler_version} PARENT_SCOPE) + set(${compiler_runtime} ${_compiler_runtime} PARENT_SCOPE) + set(${compiler_runtime_type} ${_compiler_runtime_type} PARENT_SCOPE) +endfunction() + + +function(detect_build_type build_type) + get_property(multiconfig_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(NOT multiconfig_generator) + # Only set when we know we are in a single-configuration generator + # Note: we may want to fail early if `CMAKE_BUILD_TYPE` is not defined + set(${build_type} ${CMAKE_BUILD_TYPE} PARENT_SCOPE) + endif() +endfunction() + + +macro(set_conan_compiler_if_appleclang lang command output_variable) + if(CMAKE_${lang}_COMPILER_ID STREQUAL "AppleClang") + execute_process(COMMAND xcrun --find ${command} + OUTPUT_VARIABLE _xcrun_out OUTPUT_STRIP_TRAILING_WHITESPACE) + cmake_path(GET _xcrun_out PARENT_PATH _xcrun_toolchain_path) + cmake_path(GET CMAKE_${lang}_COMPILER PARENT_PATH _compiler_parent_path) + if ("${_xcrun_toolchain_path}" STREQUAL "${_compiler_parent_path}") + set(${output_variable} "") + endif() + unset(_xcrun_out) + unset(_xcrun_toolchain_path) + unset(_compiler_parent_path) + endif() +endmacro() + + +macro(append_compiler_executables_configuration) + set(_conan_c_compiler "") + set(_conan_cpp_compiler "") + set(_conan_rc_compiler "") + set(_conan_compilers_list "") + if(CMAKE_C_COMPILER) + set(_conan_c_compiler "\"c\":\"${CMAKE_C_COMPILER}\"") + set_conan_compiler_if_appleclang(C cc _conan_c_compiler) + list(APPEND _conan_compilers_list ${_conan_c_compiler}) + else() + message(WARNING "CMake-Conan: The C compiler is not defined. " + "Please define CMAKE_C_COMPILER or enable the C language.") + endif() + if(CMAKE_CXX_COMPILER) + set(_conan_cpp_compiler "\"cpp\":\"${CMAKE_CXX_COMPILER}\"") + set_conan_compiler_if_appleclang(CXX c++ _conan_cpp_compiler) + list(APPEND _conan_compilers_list ${_conan_cpp_compiler}) + else() + message(WARNING "CMake-Conan: The C++ compiler is not defined. " + "Please define CMAKE_CXX_COMPILER or enable the C++ language.") + endif() + if(CMAKE_RC_COMPILER) + set(_conan_rc_compiler "\"rc\":\"${CMAKE_RC_COMPILER}\"") + list(APPEND _conan_compilers_list ${_conan_rc_compiler}) + # Not necessary to warn if RC not defined + endif() + if(NOT "x${_conan_compilers_list}" STREQUAL "x") + string(REPLACE ";" "," _conan_compilers_list "${_conan_compilers_list}") + string(APPEND profile "tools.build:compiler_executables={${_conan_compilers_list}}\n") + endif() + unset(_conan_c_compiler) + unset(_conan_cpp_compiler) + unset(_conan_rc_compiler) + unset(_conan_compilers_list) +endmacro() + + +function(detect_host_profile output_file) + detect_os(os os_api_level os_sdk os_subsystem os_version) + detect_arch(arch) + detect_compiler(compiler compiler_version compiler_runtime compiler_runtime_type) + detect_cxx_standard(compiler_cppstd) + detect_lib_cxx(compiler_libcxx) + detect_build_type(build_type) + + set(profile "") + string(APPEND profile "[settings]\n") + if(arch) + string(APPEND profile arch=${arch} "\n") + endif() + if(os) + string(APPEND profile os=${os} "\n") + endif() + if(os_api_level) + string(APPEND profile os.api_level=${os_api_level} "\n") + endif() + if(os_version) + string(APPEND profile os.version=${os_version} "\n") + endif() + if(os_sdk) + string(APPEND profile os.sdk=${os_sdk} "\n") + endif() + if(os_subsystem) + string(APPEND profile os.subsystem=${os_subsystem} "\n") + endif() + if(compiler) + string(APPEND profile compiler=${compiler} "\n") + endif() + if(compiler_version) + string(APPEND profile compiler.version=${compiler_version} "\n") + endif() + if(compiler_runtime) + string(APPEND profile compiler.runtime=${compiler_runtime} "\n") + endif() + if(compiler_runtime_type) + string(APPEND profile compiler.runtime_type=${compiler_runtime_type} "\n") + endif() + if(compiler_cppstd) + string(APPEND profile compiler.cppstd=${compiler_cppstd} "\n") + endif() + if(compiler_libcxx) + string(APPEND profile compiler.libcxx=${compiler_libcxx} "\n") + endif() + if(build_type) + string(APPEND profile "build_type=${build_type}\n") + endif() + + if(NOT DEFINED output_file) + set(file_name "${CMAKE_BINARY_DIR}/profile") + else() + set(file_name ${output_file}) + endif() + + string(APPEND profile "[conf]\n") + string(APPEND profile "tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}\n") + + # propagate compilers via profile + append_compiler_executables_configuration() + + if(os STREQUAL "Android") + string(APPEND profile "tools.android:ndk_path=${CMAKE_ANDROID_NDK}\n") + endif() + + message(STATUS "CMake-Conan: Creating profile ${file_name}") + file(WRITE ${file_name} ${profile}) + message(STATUS "CMake-Conan: Profile: \n${profile}") +endfunction() + + +function(conan_profile_detect_default) + message(STATUS "CMake-Conan: Checking if a default profile exists") + execute_process(COMMAND ${CONAN_COMMAND} profile path default + RESULT_VARIABLE return_code + OUTPUT_VARIABLE conan_stdout + ERROR_VARIABLE conan_stderr + ECHO_ERROR_VARIABLE # show the text output regardless + ECHO_OUTPUT_VARIABLE + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + if(NOT ${return_code} EQUAL "0") + message(STATUS "CMake-Conan: The default profile doesn't exist, detecting it.") + execute_process(COMMAND ${CONAN_COMMAND} profile detect + RESULT_VARIABLE return_code + OUTPUT_VARIABLE conan_stdout + ERROR_VARIABLE conan_stderr + ECHO_ERROR_VARIABLE # show the text output regardless + ECHO_OUTPUT_VARIABLE + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + endif() +endfunction() + + +function(conan_install) + cmake_parse_arguments(ARGS conan_args ${ARGN}) + # SILKWORM-PATCH: set(conan_output_folder ${CMAKE_BINARY_DIR}/conan) + # Invoke "conan install" with the provided arguments + # SILKWORM-PATCH: set(conan_args ${conan_args} -of=${conan_output_folder}) + message(STATUS "CMake-Conan: conan install ${CMAKE_SOURCE_DIR} ${conan_args} ${ARGN}") + + + # In case there was not a valid cmake executable in the PATH, we inject the + # same we used to invoke the provider to the PATH + if(DEFINED PATH_TO_CMAKE_BIN) + set(old_path $ENV{PATH}) + set(ENV{PATH} "$ENV{PATH}:${PATH_TO_CMAKE_BIN}") + endif() + + execute_process(COMMAND ${CONAN_COMMAND} install ${CMAKE_SOURCE_DIR} ${conan_args} ${ARGN} --format=json + RESULT_VARIABLE return_code + OUTPUT_VARIABLE conan_stdout + ERROR_VARIABLE conan_stderr + ECHO_ERROR_VARIABLE # show the text output regardless + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + + if(DEFINED PATH_TO_CMAKE_BIN) + set(ENV{PATH} "${old_path}") + endif() + + if(NOT "${return_code}" STREQUAL "0") + message(FATAL_ERROR "Conan install failed='${return_code}'") + endif() + + # the files are generated in a folder that depends on the layout used, if + # one is specified, but we don't know a priori where this is. + # TODO: this can be made more robust if Conan can provide this in the json output + string(JSON conan_generators_folder GET "${conan_stdout}" graph nodes 0 generators_folder) + cmake_path(CONVERT ${conan_generators_folder} TO_CMAKE_PATH_LIST conan_generators_folder) + + message(STATUS "CMake-Conan: CONAN_GENERATORS_FOLDER=${conan_generators_folder}") + set_property(GLOBAL PROPERTY CONAN_GENERATORS_FOLDER "${conan_generators_folder}") + # reconfigure on conanfile changes + string(JSON conanfile GET "${conan_stdout}" graph nodes 0 label) + message(STATUS "CMake-Conan: CONANFILE=${CMAKE_SOURCE_DIR}/${conanfile}") + set_property(DIRECTORY ${CMAKE_SOURCE_DIR} APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/${conanfile}") + # success + set_property(GLOBAL PROPERTY CONAN_INSTALL_SUCCESS TRUE) + +endfunction() + + +function(conan_get_version conan_command conan_current_version) + execute_process( + COMMAND ${conan_command} --version + OUTPUT_VARIABLE conan_output + RESULT_VARIABLE conan_result + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(conan_result) + message(FATAL_ERROR "CMake-Conan: Error when trying to run Conan") + endif() + + string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" conan_version ${conan_output}) + set(${conan_current_version} ${conan_version} PARENT_SCOPE) +endfunction() + + +function(conan_version_check) + set(options ) + set(one_value_args MINIMUM CURRENT) + set(multi_value_args ) + cmake_parse_arguments(conan_version_check + "${options}" "${one_value_args}" "${multi_value_args}" ${ARGN}) + + if(NOT conan_version_check_MINIMUM) + message(FATAL_ERROR "CMake-Conan: Required parameter MINIMUM not set!") + endif() + if(NOT conan_version_check_CURRENT) + message(FATAL_ERROR "CMake-Conan: Required parameter CURRENT not set!") + endif() + + if(conan_version_check_CURRENT VERSION_LESS conan_version_check_MINIMUM) + message(FATAL_ERROR "CMake-Conan: Conan version must be ${conan_version_check_MINIMUM} or later") + endif() +endfunction() + + +macro(construct_profile_argument argument_variable profile_list) + set(${argument_variable} "") + if("${profile_list}" STREQUAL "CONAN_HOST_PROFILE") + set(_arg_flag "--profile:host=") + elseif("${profile_list}" STREQUAL "CONAN_BUILD_PROFILE") + set(_arg_flag "--profile:build=") + endif() + + set(_profile_list "${${profile_list}}") + list(TRANSFORM _profile_list REPLACE "auto-cmake" "${CMAKE_BINARY_DIR}/conan_host_profile") + list(TRANSFORM _profile_list PREPEND ${_arg_flag}) + set(${argument_variable} ${_profile_list}) + + unset(_arg_flag) + unset(_profile_list) +endmacro() + + +macro(conan_provide_dependency method package_name) + set_property(GLOBAL PROPERTY CONAN_PROVIDE_DEPENDENCY_INVOKED TRUE) + get_property(_conan_install_success GLOBAL PROPERTY CONAN_INSTALL_SUCCESS) + if(NOT _conan_install_success) + # SILKWORM-PATCH: find_program(CONAN_COMMAND "conan" REQUIRED) + conan_get_version(${CONAN_COMMAND} CONAN_CURRENT_VERSION) + conan_version_check(MINIMUM ${CONAN_MINIMUM_VERSION} CURRENT ${CONAN_CURRENT_VERSION}) + message(STATUS "CMake-Conan: first find_package() found. Installing dependencies with Conan") + if("default" IN_LIST CONAN_HOST_PROFILE OR "default" IN_LIST CONAN_BUILD_PROFILE) + conan_profile_detect_default() + endif() + if("auto-cmake" IN_LIST CONAN_HOST_PROFILE) + detect_host_profile(${CMAKE_BINARY_DIR}/conan_host_profile) + endif() + construct_profile_argument(_host_profile_flags CONAN_HOST_PROFILE) + construct_profile_argument(_build_profile_flags CONAN_BUILD_PROFILE) + if(EXISTS "${CMAKE_SOURCE_DIR}/conanfile.py") + file(READ "${CMAKE_SOURCE_DIR}/conanfile.py" outfile) + if(NOT "${outfile}" MATCHES ".*CMakeDeps.*") + message(WARNING "Cmake-conan: CMakeDeps generator was not defined in the conanfile") + endif() + set(generator "") + elseif (EXISTS "${CMAKE_SOURCE_DIR}/conanfile.txt") + file(READ "${CMAKE_SOURCE_DIR}/conanfile.txt" outfile) + if(NOT "${outfile}" MATCHES ".*CMakeDeps.*") + message(WARNING "Cmake-conan: CMakeDeps generator was not defined in the conanfile. " + "Please define the generator as it will be mandatory in the future") + endif() + set(generator "-g;CMakeDeps") + endif() + get_property(_multiconfig_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) + if(NOT _multiconfig_generator) + message(STATUS "CMake-Conan: Installing single configuration ${CMAKE_BUILD_TYPE}") + conan_install(${_host_profile_flags} ${_build_profile_flags} ${CONAN_INSTALL_ARGS} ${generator}) + else() + message(STATUS "CMake-Conan: Installing both Debug and Release") + conan_install(${_host_profile_flags} ${_build_profile_flags} -s build_type=Release ${CONAN_INSTALL_ARGS} ${generator}) + conan_install(${_host_profile_flags} ${_build_profile_flags} -s build_type=Debug ${CONAN_INSTALL_ARGS} ${generator}) + endif() + unset(_host_profile_flags) + unset(_build_profile_flags) + unset(_multiconfig_generator) + unset(_conan_install_success) + else() + message(STATUS "CMake-Conan: find_package(${ARGV1}) found, 'conan install' already ran") + unset(_conan_install_success) + endif() + + get_property(_conan_generators_folder GLOBAL PROPERTY CONAN_GENERATORS_FOLDER) + + # Ensure that we consider Conan-provided packages ahead of any other, + # irrespective of other settings that modify the search order or search paths + # This follows the guidelines from the find_package documentation + # (https://cmake.org/cmake/help/latest/command/find_package.html): + # find_package ( PATHS paths... NO_DEFAULT_PATH) + # find_package () + + # Filter out `REQUIRED` from the argument list, as the first call may fail + set(_find_args_${package_name} "${ARGN}") + list(REMOVE_ITEM _find_args_${package_name} "REQUIRED") + if(NOT "MODULE" IN_LIST _find_args_${package_name}) + find_package(${package_name} ${_find_args_${package_name}} BYPASS_PROVIDER PATHS "${_conan_generators_folder}" NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) + unset(_find_args_${package_name}) + endif() + + # Invoke find_package a second time - if the first call succeeded, + # this will simply reuse the result. If not, fall back to CMake default search + # behaviour, also allowing modules to be searched. + if(NOT ${package_name}_FOUND) + list(FIND CMAKE_MODULE_PATH "${_conan_generators_folder}" _index) + if(_index EQUAL -1) + list(PREPEND CMAKE_MODULE_PATH "${_conan_generators_folder}") + endif() + unset(_index) + find_package(${package_name} ${ARGN} BYPASS_PROVIDER) + list(REMOVE_ITEM CMAKE_MODULE_PATH "${_conan_generators_folder}") + endif() +endmacro() + + +cmake_language( + SET_DEPENDENCY_PROVIDER conan_provide_dependency + SUPPORTED_METHODS FIND_PACKAGE +) + + +macro(conan_provide_dependency_check) + set(_conan_provide_dependency_invoked FALSE) + get_property(_conan_provide_dependency_invoked GLOBAL PROPERTY CONAN_PROVIDE_DEPENDENCY_INVOKED) + if(NOT _conan_provide_dependency_invoked) + message(WARNING "Conan is correctly configured as dependency provider, " + "but Conan has not been invoked. Please add at least one " + "call to `find_package()`.") + if(DEFINED CONAN_COMMAND) + # supress warning in case `CONAN_COMMAND` was specified but unused. + set(_conan_command ${CONAN_COMMAND}) + unset(_conan_command) + endif() + endif() + unset(_conan_provide_dependency_invoked) +endmacro() + + +# Add a deferred call at the end of processing the top-level directory +# to check if the dependency provider was invoked at all. +cmake_language(DEFER DIRECTORY "${CMAKE_SOURCE_DIR}" CALL conan_provide_dependency_check) + +# Configurable variables for Conan profiles +set(CONAN_HOST_PROFILE "default;auto-cmake" CACHE STRING "Conan host profile") +set(CONAN_BUILD_PROFILE "default" CACHE STRING "Conan build profile") +set(CONAN_INSTALL_ARGS "--build=missing" CACHE STRING "Command line arguments for conan install") + +find_program(_cmake_program NAMES cmake NO_PACKAGE_ROOT_PATH NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH) +if(NOT _cmake_program) + get_filename_component(PATH_TO_CMAKE_BIN "${CMAKE_COMMAND}" DIRECTORY) + set(PATH_TO_CMAKE_BIN "${PATH_TO_CMAKE_BIN}" CACHE INTERNAL "Path where the CMake executable is") +endif() + +cmake_policy(POP) diff --git a/third_party/cmake-conan/readme.txt b/third_party/cmake-conan/readme.txt new file mode 100644 index 0000000000..c5fe46128e --- /dev/null +++ b/third_party/cmake-conan/readme.txt @@ -0,0 +1,3 @@ +https://github.com/conan-io/cmake-conan +branch: develop2 +commit: c22bbf0 From 51f164f266859190ad572f2799326c3e83facba3 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Mon, 16 Dec 2024 09:50:05 +0100 Subject: [PATCH 35/48] cmake: upgrade to Conan 2 (#2318) --- .circleci/config.yml | 8 +- .../actions/fuzzer-common-steps/action.yml | 9 +- .github/workflows/macOS.yml | 2 +- .github/workflows/windows.yml | 2 +- CMakeLists.txt | 21 ++- README.md | 6 +- cmake/compiler_settings.cmake | 10 -- cmake/conan.cmake | 141 +++++++++++++----- cmake/conan_quiet.cmake | 38 +++++ cmake/conan_quiet.sh | 18 +++ .../experimental/linux_arm64_gcc_12_debug | 6 +- .../experimental/linux_arm64_gcc_12_release | 6 +- .../experimental/linux_x64_clang_16_release | 17 --- .../experimental/linux_x64_gcc_12_debug | 6 +- .../experimental/linux_x64_gcc_12_release | 6 +- .../experimental/macos_arm64_clang_14_debug | 8 +- .../experimental/macos_arm64_clang_14_release | 8 +- .../experimental/macos_x64_clang_14_debug | 8 +- .../experimental/macos_x64_clang_14_release | 8 +- cmake/profiles/experimental/readme.txt | 11 +- .../experimental/windows_msvc_17_debug | 12 -- .../experimental/windows_msvc_17_release | 12 -- ...lang_13_debug => linux_x64_clang_16_debug} | 8 +- ..._13_release => linux_x64_clang_16_release} | 8 +- cmake/profiles/linux_x64_gcc_11_debug | 6 +- cmake/profiles/linux_x64_gcc_11_release | 6 +- cmake/profiles/macos_arm64_clang_13_debug | 8 +- cmake/profiles/macos_arm64_clang_13_release | 8 +- cmake/profiles/macos_x64_clang_13_debug | 8 +- cmake/profiles/macos_x64_clang_13_release | 8 +- cmake/profiles/wasi_release | 7 +- cmake/profiles/windows_msvc_16_debug | 12 -- cmake/profiles/windows_msvc_16_release | 12 -- cmake/profiles/windows_msvc_193_debug | 9 ++ cmake/profiles/windows_msvc_193_release | 9 ++ cmake/setup/compiler_install.sh | 53 +++++-- conanfile.py | 30 ++-- docs/fuzzer.md | 2 +- tests/docker/Dockerfile | 8 +- third_party/cmake-conan/conan_provider.cmake | 11 +- third_party/erigon-mdbx-go/CMakeLists.txt | 19 +++ third_party/gmp/CMakeLists.txt | 22 ++- third_party/libff/CMakeLists.txt | 12 ++ third_party/llvm/README.md | 6 +- 44 files changed, 361 insertions(+), 274 deletions(-) create mode 100644 cmake/conan_quiet.cmake create mode 100755 cmake/conan_quiet.sh delete mode 100644 cmake/profiles/experimental/linux_x64_clang_16_release delete mode 100644 cmake/profiles/experimental/windows_msvc_17_debug delete mode 100644 cmake/profiles/experimental/windows_msvc_17_release rename cmake/profiles/{linux_x64_clang_13_debug => linux_x64_clang_16_debug} (50%) rename cmake/profiles/{linux_x64_clang_13_release => linux_x64_clang_16_release} (51%) delete mode 100644 cmake/profiles/windows_msvc_16_debug delete mode 100644 cmake/profiles/windows_msvc_16_release create mode 100644 cmake/profiles/windows_msvc_193_debug create mode 100644 cmake/profiles/windows_msvc_193_release diff --git a/.circleci/config.yml b/.circleci/config.yml index 62034f407b..df07747353 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -85,7 +85,7 @@ commands: - run: name: "Install Conan" command: | - pip3 install --user --no-warn-script-location conan==1.64.1 + pip3 install --user --no-warn-script-location conan==2.10.2 conan_path="$(python3 -m site --user-base)/bin" echo "export \"PATH=$conan_path:\$PATH\"" >> "$BASH_ENV" "$conan_path/conan" --version @@ -109,7 +109,7 @@ commands: command: | if [[ "<>" == "clang" ]] then - conan_profile=linux_x64_clang_13_release + conan_profile=linux_x64_clang_16_release else conan_profile=linux_x64_gcc_11_release fi @@ -128,7 +128,7 @@ commands: name: "Save Conan cache" key: *conan-cache-key paths: - - ~/.conan + - ~/.conan2 build_fuzzer: steps: @@ -146,7 +146,7 @@ commands: - run: name: "CMake Fuzzer" working_directory: ~/build - command: cmake ../project -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONAN_PROFILE=linux_x64_clang_13_release -DCMAKE_TOOLCHAIN_FILE=../project/cmake/toolchain/clang_libcxx.cmake -DSILKWORM_FUZZER=ON + command: cmake ../project -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONAN_PROFILE=linux_x64_clang_16_release -DCMAKE_TOOLCHAIN_FILE=../project/cmake/toolchain/clang_libcxx.cmake -DSILKWORM_FUZZER=ON - run: name: "Build Fuzzer" command: | diff --git a/.github/actions/fuzzer-common-steps/action.yml b/.github/actions/fuzzer-common-steps/action.yml index 8e4f0c73ab..d524d19e52 100644 --- a/.github/actions/fuzzer-common-steps/action.yml +++ b/.github/actions/fuzzer-common-steps/action.yml @@ -23,17 +23,12 @@ runs: - name: Temporary step - conan cache cleanup - to be executed only once per runner shell: bash - run: conan remove "*" --force - - - name: Preinstall Conan packages - shell: bash - working-directory: ${{runner.workspace}}/silkworm - run: CC=clang-16 CXX=clang++-16 conan install --install-folder=build/conan --build=missing --profile=cmake/profiles/experimental/linux_x64_clang_16_release . + run: /opt/conan2/bin/conan remove --confirm "*" - name: Configure CMake shell: bash working-directory: ${{runner.workspace}}/silkworm/build - run: CC=clang-16 CXX=clang++-16 cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONAN_PROFILE=experimental/linux_x64_clang_16_release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/clang_libcxx.cmake -DSILKWORM_FUZZER=ON -DSILKWORM_FUZZER_SANITIZERS=${{inputs.fuzzer_sanitizers}} + run: CC=clang-16 CXX=clang++-16 cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONAN_PROFILE=linux_x64_clang_16_release -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain/clang_libcxx.cmake -DSILKWORM_FUZZER=ON -DSILKWORM_FUZZER_SANITIZERS=${{inputs.fuzzer_sanitizers}} - name: Build Silkworm Fuzzer Test shell: bash diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml index 736db62b9b..73bd80c16f 100644 --- a/.github/workflows/macOS.yml +++ b/.github/workflows/macOS.yml @@ -47,7 +47,7 @@ jobs: - name: Install Prerequisites run: | - pip3 install --user --break-system-packages --no-warn-script-location conan==1.64.1 chardet + pip3 install --user --break-system-packages --no-warn-script-location conan==2.10.2 chardet conan_path="$(python3 -m site --user-base)/bin" echo "$conan_path" >> $GITHUB_PATH "$conan_path/conan" --version diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 94420f50f8..693d05f26d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -47,7 +47,7 @@ jobs: id: conan uses: turtlebrowser/get-conan@main with: - version: 1.64.1 + version: 2.10.2 - name: Create Build Environment # Some projects don't allow in-source building, so create a separate build directory diff --git a/CMakeLists.txt b/CMakeLists.txt index eb8e5c0c14..29f32d64b2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ limitations under the License. ]] -cmake_minimum_required(VERSION 3.19.0) +cmake_minimum_required(VERSION 3.24.0) if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/evmone/evmone/evmc/.git) message(FATAL_ERROR "Git submodules not initialized, execute:\n git submodule update --init --recursive") @@ -22,10 +22,21 @@ endif() get_directory_property(SILKWORM_HAS_PARENT PARENT_DIRECTORY) if(NOT SILKWORM_HAS_PARENT) + # reduce the log verbosity of evmone/cmake/cable + if(NOT CMAKE_MESSAGE_LOG_LEVEL) + set(CMAKE_MESSAGE_LOG_LEVEL_EMPTY YES) + set(CMAKE_MESSAGE_LOG_LEVEL NOTICE) + endif() + include(third_party/evmone/evmone/cmake/cable/bootstrap.cmake) include(CableBuildType) cable_set_build_type(DEFAULT Release CONFIGURATION_TYPES Release Debug) + # restore the log verbosity + if(CMAKE_MESSAGE_LOG_LEVEL_EMPTY) + unset(CMAKE_MESSAGE_LOG_LEVEL) + endif() + if(NOT CMAKE_TOOLCHAIN_FILE) set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/toolchain/cxx20.cmake @@ -33,6 +44,8 @@ if(NOT SILKWORM_HAS_PARENT) ) include("${CMAKE_TOOLCHAIN_FILE}") endif() + + include(cmake/conan.cmake) endif() project(silkworm) @@ -70,10 +83,6 @@ option(SILKWORM_FUZZER_SANITIZERS "CLang sanitizer options for fuzzers" OFF) option(SILKWORM_USE_MIMALLOC "Enable using mimalloc for dynamic memory management" ON) option(SILKWORM_ALLOW_UNUSED_VAR_WARNINGS "Turn unused variable errors into warnings" OFF) -if(NOT SILKWORM_HAS_PARENT) - include(cmake/conan.cmake) -endif() - set_property( DIRECTORY APPEND @@ -125,5 +134,5 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") # avoid fatal error C1002: compiler is out of heap space list(REMOVE_ITEM UNIT_TEST_TARGETS silkworm_rpcdaemon_test) endif() -message(STATUS "UNIT_TEST_TARGETS: ${UNIT_TEST_TARGETS}") +message(VERBOSE "UNIT_TEST_TARGETS: ${UNIT_TEST_TARGETS}") add_custom_target(all_unit_tests DEPENDS ${UNIT_TEST_TARGETS}) diff --git a/README.md b/README.md index 3b5e87b199..50dc3c4efb 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ or AppleClang ([Xcode](https://developer.apple.com/xcode/) >= 15) Conan requires Python, and can be installed using: - pip3 install --user conan==1.64.1 chardet + pip3 install --user conan==2.10.2 chardet On Linux the conan binary gets installed into `$HOME/.local/bin` which is typically in PATH already. On macOS need to add the binary to PATH manually: @@ -122,9 +122,7 @@ will use "debug" configuration builds of dependencies. See available profiles in [cmake/profiles](cmake/profiles). -The conan packages could also be pre-installed using [conan install](https://docs.conan.io/1/reference/commands/consumer/install.html): - - conan install --install-folder=build/conan --build=missing --profile=cmake/profiles/macos_arm64_clang_13_debug . +During the cmake configuration step `conan_provider.cmake` runs a [conan install](https://docs.conan.io/2/reference/commands/install.html) command that downloads packages and builds some of them from source if needed. The exact arguments to this command are printed in the build log. Then run the build itself diff --git a/cmake/compiler_settings.cmake b/cmake/compiler_settings.cmake index c6cf2395b5..6d865906e0 100644 --- a/cmake/compiler_settings.cmake +++ b/cmake/compiler_settings.cmake @@ -89,16 +89,6 @@ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang$") link_libraries(c++abi) endif() - # cmake-format: off - # abseil in conan is prebuilt with clang 13 (see profiles), - # linking absl::log with clang 18+ produces an error due to an ABI change: - # https://github.com/abseil/abseil-cpp/issues/1747 - # https://github.com/llvm/llvm-project/issues/102443 - # cmake-format: on - if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18) - add_compile_options(-fclang-abi-compat=17) - endif() - else() message(WARNING "${CMAKE_CXX_COMPILER_ID} is not a supported compiler. Use at your own risk.") endif() diff --git a/cmake/conan.cmake b/cmake/conan.cmake index 356adc5169..7260995941 100644 --- a/cmake/conan.cmake +++ b/cmake/conan.cmake @@ -15,8 +15,18 @@ ]] include(${CMAKE_CURRENT_LIST_DIR}/compiler_settings_sanitize.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/conan_quiet.cmake) function(guess_conan_profile) + if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "" AND CMAKE_HOST_UNIX) + execute_process( + COMMAND uname -m + OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR + OUTPUT_STRIP_TRAILING_WHITESPACE + COMMAND_ERROR_IS_FATAL ANY + ) + endif() + if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "") set(ARCH_NAME "") elseif(CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL x86_64) @@ -38,7 +48,7 @@ function(guess_conan_profile) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND ARCH_NAME) set(PROFILE macos_${ARCH_NAME}_clang_13_release) elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") - set(PROFILE windows_msvc_16_release) + set(PROFILE windows_msvc_193_release) else() message(FATAL_ERROR "CONAN_PROFILE is not defined for ${CMAKE_HOST_SYSTEM_NAME} on ${CMAKE_HOST_SYSTEM_PROCESSOR}") endif() @@ -49,50 +59,95 @@ function(guess_conan_profile) ) endfunction() -set(CONAN_BINARY_DIR "${CMAKE_BINARY_DIR}/conan") -list(APPEND CMAKE_MODULE_PATH ${CONAN_BINARY_DIR}) -list(APPEND CMAKE_PREFIX_PATH ${CONAN_BINARY_DIR}) +function(get_conan_build_type profile_path var) + file(READ "${profile_path}" CONTENTS) + string(REGEX MATCH "build_type=[A-Za-z0-9]+" VALUE "${CONTENTS}") + string(SUBSTRING "${VALUE}" 11 -1 VALUE) + set(${var} + "${VALUE}" + PARENT_SCOPE + ) +endfunction() -# disable verbose logging from FindXXX.cmake files -set(CONAN_CMAKE_SILENT_OUTPUT ON) +macro(format_list_as_json_array list_var var) + list(JOIN ${list_var} "\",\"" ${var}) + set(${var} "[\"${${var}}\"]") +endmacro() -include("${CMAKE_SOURCE_DIR}/third_party/cmake-conan/conan.cmake") +# unset(CONAN_COMMAND CACHE) +find_program( + CONAN_COMMAND "conan" + PATHS /opt/conan2/bin + NO_DEFAULT_PATH +) +if(NOT CONAN_COMMAND) + find_program(CONAN_COMMAND "conan" PATHS ~/.local/bin REQUIRED) +endif() -# provide a static conanfile.py instead of generating it with conan_cmake_configure() -file(COPY "${CMAKE_SOURCE_DIR}/conanfile.py" DESTINATION "${CONAN_BINARY_DIR}") +# use "verbose" for more detailed conan install logs +set(CONAN_VERBOSITY "error") +set(CONAN_BINARY_DIR "${CMAKE_BINARY_DIR}/conan2") if(NOT DEFINED CONAN_PROFILE) guess_conan_profile() endif() -message(STATUS "CONAN_PROFILE: ${CONAN_PROFILE}") +message(VERBOSE "CONAN_PROFILE: ${CONAN_PROFILE}") +set(CONAN_PROFILE_PATH "${CMAKE_SOURCE_DIR}/cmake/profiles/${CONAN_PROFILE}") +set(CONAN_HOST_PROFILE "${CONAN_PROFILE_PATH}") +set(CONAN_BUILD_PROFILE "${CONAN_PROFILE_PATH}") +get_conan_build_type("${CONAN_PROFILE_PATH}" CONAN_BUILD_TYPE) set(CONAN_BUILD "missing") -set(CONAN_CXXFLAGS_ARG) -set(CONAN_OPTIONS) +set(CONAN_SETTINGS "") +set(CONAN_OPTIONS "") +set(CONAN_CONF "") + +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin") + set(OS_VERSION_MIN_CXXFLAG "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") +endif() + +if(OS_VERSION_MIN_CXXFLAG AND NOT SILKWORM_SANITIZE_COMPILER_OPTIONS) + list(APPEND CONAN_CONF "libtorrent/*:tools.build:cxxflags=[\"${OS_VERSION_MIN_CXXFLAG}\"]") +endif() if(SILKWORM_SANITIZE_COMPILER_OPTIONS) set(CONAN_CXXFLAGS ${SILKWORM_SANITIZE_COMPILER_OPTIONS}) - if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") - list(APPEND CONAN_CXXFLAGS "-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") + if(OS_VERSION_MIN_CXXFLAG) + list(APPEND CONAN_CXXFLAGS ${OS_VERSION_MIN_CXXFLAG}) endif() - list(JOIN CONAN_CXXFLAGS "\", \"" CONAN_CXXFLAGS_STR) - set(CONAN_CXXFLAGS_STR "[\"${CONAN_CXXFLAGS_STR}\"]") - set(CONAN_CXXFLAGS_ARG "tools.build:cxxflags=${CONAN_CXXFLAGS_STR}") - - list(APPEND CONAN_OPTIONS "boost:zlib=False") + list(APPEND CONAN_OPTIONS "boost/*:zlib=False") + list(APPEND CONAN_OPTIONS "grpc/*:with_libsystemd=False") - # libraries that needs to be rebuilt with sanitize flags + # libraries that must be rebuilt with sanitizer flags # cmake-format: off set(CONAN_BUILD - abseil - boost - grpc - libtorrent - protobuf + "abseil/*" + "boost/*" + "grpc/*" + "libtorrent/*" + "protobuf/*" ) # cmake-format: on + + format_list_as_json_array(CONAN_CXXFLAGS CONAN_CXXFLAGS_STR) + list(APPEND CONAN_CONF "tools.build:cxxflags=${CONAN_CXXFLAGS_STR}") +endif() + +if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + set(CONAN_VERBOSITY "verbose") + # make sure to not rebuild anything from source unless required + set(CONAN_BUILD "missing:libtorrent/*") + # HACK: MSVC is "multi config" and conan_provider.cmake runs 2 conan install commands for both Release and Debug + # despite CMAKE_BUILD_TYPE. This adds an extra build_type setting to both commands to override and force the desired + # build type. It still runs 2 commands, but the 2nd one has no effect. + list(APPEND CONAN_SETTINGS "build_type=${CMAKE_BUILD_TYPE}") + # most Windows packages on ConanCenter are built for cppstd=14, but some packages require at least cppstd=17 + # (otherwise report "Invalid" status) + list(APPEND CONAN_SETTINGS "asio-grpc/*:compiler.cppstd=17") + list(APPEND CONAN_SETTINGS "magic_enum/*:compiler.cppstd=17") + list(APPEND CONAN_SETTINGS "tomlplusplus/*:compiler.cppstd=17") endif() if(SILKWORM_USE_MIMALLOC) @@ -100,19 +155,37 @@ if(SILKWORM_USE_MIMALLOC) # should not be used in sanitizer builds or at least its override option must be disabled # (https://github.com/microsoft/mimalloc/issues/317#issuecomment-708506405) if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND NOT SILKWORM_SANITIZE) - list(APPEND CONAN_OPTIONS "mimalloc:override=True") + list(APPEND CONAN_OPTIONS "mimalloc/*:override=True") endif() endif() if(SILKWORM_CORE_ONLY) - set(CONAN_CXXFLAGS_ARG "catch2/*:tools.build:cxxflags=[\"-fno-exceptions\"]") + list(APPEND CONAN_CONF "catch2/*:tools.build:cxxflags=[\"-fno-exceptions\"]") endif() -conan_cmake_install( - PATH_OR_REFERENCE "${CONAN_BINARY_DIR}" - INSTALL_FOLDER "${CONAN_BINARY_DIR}" - BUILD ${CONAN_BUILD} - OPTIONS ${CONAN_OPTIONS} - PROFILE "${CMAKE_SOURCE_DIR}/cmake/profiles/${CONAN_PROFILE}" - CONF "${CONAN_CXXFLAGS_ARG}" +# cmake-format: off +set(CONAN_INSTALL_ARGS + -v ${CONAN_VERBOSITY} + --output-folder "${CONAN_BINARY_DIR}" + # https://github.com/conan-io/cmake-conan/issues/607 + --settings:all "&:build_type=${CMAKE_BUILD_TYPE}" ) +# cmake-format: on + +foreach(VALUE IN LISTS CONAN_BUILD) + list(APPEND CONAN_INSTALL_ARGS --build=${VALUE}) +endforeach() + +foreach(VALUE IN LISTS CONAN_SETTINGS) + list(APPEND CONAN_INSTALL_ARGS --settings:all=${VALUE}) +endforeach() + +foreach(VALUE IN LISTS CONAN_OPTIONS) + list(APPEND CONAN_INSTALL_ARGS --options:all=${VALUE}) +endforeach() + +foreach(VALUE IN LISTS CONAN_CONF) + list(APPEND CONAN_INSTALL_ARGS --conf:all=${VALUE}) +endforeach() + +set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES "${CMAKE_SOURCE_DIR}/third_party/cmake-conan/conan_provider.cmake") diff --git a/cmake/conan_quiet.cmake b/cmake/conan_quiet.cmake new file mode 100644 index 0000000000..6a3bacc593 --- /dev/null +++ b/cmake/conan_quiet.cmake @@ -0,0 +1,38 @@ +# Reduce verbosity of CMakeDeps conan generator +# do not edit, regenerate with conan_quiet.sh + +set(ZLIB_FIND_QUIETLY YES) +set(Catch2_FIND_QUIETLY YES) +set(jwt-cpp_FIND_QUIETLY YES) +set(GTest_FIND_QUIETLY YES) +set(LibtorrentRasterbar_FIND_QUIETLY YES) +set(Snappy_FIND_QUIETLY YES) +set(Microsoft.GSL_FIND_QUIETLY YES) +set(OpenSSL_FIND_QUIETLY YES) +set(fmt_FIND_QUIETLY YES) +set(roaring_FIND_QUIETLY YES) +set(BZip2_FIND_QUIETLY YES) +set(c-ares_FIND_QUIETLY YES) +set(magic_enum_FIND_QUIETLY YES) +set(absl_FIND_QUIETLY YES) +set(OpenSSL_FIND_QUIETLY YES) +set(tomlplusplus_FIND_QUIETLY YES) +set(spdlog_FIND_QUIETLY YES) +set(SQLite3_FIND_QUIETLY YES) +set(CLI11_FIND_QUIETLY YES) +set(tl-expected_FIND_QUIETLY YES) +set(asio-grpc_FIND_QUIETLY YES) +set(benchmark_FIND_QUIETLY YES) +set(gmp_FIND_QUIETLY YES) +set(Boost_FIND_QUIETLY YES) +set(SQLite3_FIND_QUIETLY YES) +set(mimalloc_FIND_QUIETLY YES) +set(re2_FIND_QUIETLY YES) +set(gRPC_FIND_QUIETLY YES) +set(protobuf_FIND_QUIETLY YES) +set(ZLIB_FIND_QUIETLY YES) +set(Protobuf_FIND_QUIETLY YES) +set(BZip2_FIND_QUIETLY YES) +set(SQLiteCpp_FIND_QUIETLY YES) +set(GTest_FIND_QUIETLY YES) +set(nlohmann_json_FIND_QUIETLY YES) diff --git a/cmake/conan_quiet.sh b/cmake/conan_quiet.sh new file mode 100755 index 0000000000..78efc3b93c --- /dev/null +++ b/cmake/conan_quiet.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +script_dir=$(dirname "${BASH_SOURCE[0]}") +project_dir="$script_dir/.." +build_dir="$1" + +if [[ -z "$build_dir" ]] +then + build_dir="$project_dir/build" +fi + +cat << EOF > "$script_dir/conan_quiet.cmake" +# Reduce verbosity of CMakeDeps conan generator +# do not edit, regenerate with conan_quiet.sh + +EOF + +grep -R FIND_QUIETLY "$build_dir/conan2" | sed -E 's/.+\((.+)\)/set(\1 YES)/' >> "$script_dir/conan_quiet.cmake" diff --git a/cmake/profiles/experimental/linux_arm64_gcc_12_debug b/cmake/profiles/experimental/linux_arm64_gcc_12_debug index 84715c32d4..8944d831e9 100644 --- a/cmake/profiles/experimental/linux_arm64_gcc_12_debug +++ b/cmake/profiles/experimental/linux_arm64_gcc_12_debug @@ -1,12 +1,8 @@ [settings] os=Linux -os_build=Linux arch=armv8 -arch_build=armv8 compiler=gcc compiler.version=12 compiler.libcxx=libstdc++11 +compiler.cppstd=17 build_type=Debug -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/experimental/linux_arm64_gcc_12_release b/cmake/profiles/experimental/linux_arm64_gcc_12_release index 47ea55e61b..a072a98730 100644 --- a/cmake/profiles/experimental/linux_arm64_gcc_12_release +++ b/cmake/profiles/experimental/linux_arm64_gcc_12_release @@ -1,12 +1,8 @@ [settings] os=Linux -os_build=Linux arch=armv8 -arch_build=armv8 compiler=gcc compiler.version=12 compiler.libcxx=libstdc++11 +compiler.cppstd=17 build_type=Release -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/experimental/linux_x64_clang_16_release b/cmake/profiles/experimental/linux_x64_clang_16_release deleted file mode 100644 index ba21adcbdc..0000000000 --- a/cmake/profiles/experimental/linux_x64_clang_16_release +++ /dev/null @@ -1,17 +0,0 @@ -[settings] -os=Linux -os_build=Linux -arch=x86_64 -arch_build=x86_64 -compiler=clang -compiler.version=16 -compiler.libcxx=libc++ -build_type=Release - -[options] - -[build_requires] - -[env] -CONAN_CXX_FLAGS="-fuse-ld=lld" -CONAN_C_FLAGS="-fuse-ld=lld" diff --git a/cmake/profiles/experimental/linux_x64_gcc_12_debug b/cmake/profiles/experimental/linux_x64_gcc_12_debug index 35372a5f46..c0f4a39e0a 100644 --- a/cmake/profiles/experimental/linux_x64_gcc_12_debug +++ b/cmake/profiles/experimental/linux_x64_gcc_12_debug @@ -1,12 +1,8 @@ [settings] os=Linux -os_build=Linux arch=x86_64 -arch_build=x86_64 compiler=gcc compiler.version=12 compiler.libcxx=libstdc++11 +compiler.cppstd=17 build_type=Debug -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/experimental/linux_x64_gcc_12_release b/cmake/profiles/experimental/linux_x64_gcc_12_release index 68dd94e10c..c8aaacd327 100644 --- a/cmake/profiles/experimental/linux_x64_gcc_12_release +++ b/cmake/profiles/experimental/linux_x64_gcc_12_release @@ -1,12 +1,8 @@ [settings] os=Linux -os_build=Linux arch=x86_64 -arch_build=x86_64 compiler=gcc compiler.version=12 compiler.libcxx=libstdc++11 +compiler.cppstd=17 build_type=Release -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/experimental/macos_arm64_clang_14_debug b/cmake/profiles/experimental/macos_arm64_clang_14_debug index 64ddf4a6c0..5e7e3ec2bd 100644 --- a/cmake/profiles/experimental/macos_arm64_clang_14_debug +++ b/cmake/profiles/experimental/macos_arm64_clang_14_debug @@ -1,12 +1,8 @@ [settings] os=Macos -os_build=Macos arch=armv8 -arch_build=armv8 compiler=apple-clang -compiler.version=14.0 +compiler.version=14 compiler.libcxx=libc++ +compiler.cppstd=17 build_type=Debug -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/experimental/macos_arm64_clang_14_release b/cmake/profiles/experimental/macos_arm64_clang_14_release index 8768c4f67f..b944fe3347 100644 --- a/cmake/profiles/experimental/macos_arm64_clang_14_release +++ b/cmake/profiles/experimental/macos_arm64_clang_14_release @@ -1,12 +1,8 @@ [settings] os=Macos -os_build=Macos arch=armv8 -arch_build=armv8 compiler=apple-clang -compiler.version=14.0 +compiler.version=14 compiler.libcxx=libc++ +compiler.cppstd=17 build_type=Release -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/experimental/macos_x64_clang_14_debug b/cmake/profiles/experimental/macos_x64_clang_14_debug index e2ae677c67..45a838776a 100644 --- a/cmake/profiles/experimental/macos_x64_clang_14_debug +++ b/cmake/profiles/experimental/macos_x64_clang_14_debug @@ -1,12 +1,8 @@ [settings] os=Macos -os_build=Macos arch=x86_64 -arch_build=x86_64 compiler=apple-clang -compiler.version=14.0 +compiler.version=14 compiler.libcxx=libc++ +compiler.cppstd=17 build_type=Debug -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/experimental/macos_x64_clang_14_release b/cmake/profiles/experimental/macos_x64_clang_14_release index d613bc4cdc..caf3d2c890 100644 --- a/cmake/profiles/experimental/macos_x64_clang_14_release +++ b/cmake/profiles/experimental/macos_x64_clang_14_release @@ -1,12 +1,8 @@ [settings] os=Macos -os_build=Macos arch=x86_64 -arch_build=x86_64 compiler=apple-clang -compiler.version=14.0 +compiler.version=14 compiler.libcxx=libc++ +compiler.cppstd=17 build_type=Release -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/experimental/readme.txt b/cmake/profiles/experimental/readme.txt index d9f25e44bc..8a322f1e79 100644 --- a/cmake/profiles/experimental/readme.txt +++ b/cmake/profiles/experimental/readme.txt @@ -1,7 +1,10 @@ -There are very few binary packages for gcc 12 and clang 14 on ConanCenter. +There are very few binary packages for gcc 12+ and clang 14+ on ConanCenter. +The supported platforms are listed here: https://github.com/conan-io/conan-center-index/issues/25691#issuecomment-2429167255 -Test using this command: +This command shows which packages are "Missing" and need to be built from sources: -conan install . --profile cmake/profiles/experimental/linux_x64_gcc_12_release + conan graph explain --profile:all cmake/profiles/experimental/linux_x64_gcc_12_release . -It shows which packages need "Download" of binaries or "Build" from sources. +This command shows if binaries are missing for a particular package: + + conan graph explain --profile:all cmake/profiles/experimental/linux_x64_gcc_12_release --requires=grpc/x.y.z diff --git a/cmake/profiles/experimental/windows_msvc_17_debug b/cmake/profiles/experimental/windows_msvc_17_debug deleted file mode 100644 index 685e16b406..0000000000 --- a/cmake/profiles/experimental/windows_msvc_17_debug +++ /dev/null @@ -1,12 +0,0 @@ -[settings] -os=Windows -os_build=Windows -arch=x86_64 -arch_build=x86_64 -compiler=Visual Studio -compiler.version=17 -compiler.runtime=MDd -build_type=Debug -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/experimental/windows_msvc_17_release b/cmake/profiles/experimental/windows_msvc_17_release deleted file mode 100644 index b753317e04..0000000000 --- a/cmake/profiles/experimental/windows_msvc_17_release +++ /dev/null @@ -1,12 +0,0 @@ -[settings] -os=Windows -os_build=Windows -arch=x86_64 -arch_build=x86_64 -compiler=Visual Studio -compiler.version=17 -compiler.runtime=MD -build_type=Release -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/linux_x64_clang_13_debug b/cmake/profiles/linux_x64_clang_16_debug similarity index 50% rename from cmake/profiles/linux_x64_clang_13_debug rename to cmake/profiles/linux_x64_clang_16_debug index 46160e3509..aadab8042d 100644 --- a/cmake/profiles/linux_x64_clang_13_debug +++ b/cmake/profiles/linux_x64_clang_16_debug @@ -1,12 +1,8 @@ [settings] os=Linux -os_build=Linux arch=x86_64 -arch_build=x86_64 compiler=clang -compiler.version=13 +compiler.version=16 compiler.libcxx=libc++ +compiler.cppstd=17 build_type=Debug -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/linux_x64_clang_13_release b/cmake/profiles/linux_x64_clang_16_release similarity index 51% rename from cmake/profiles/linux_x64_clang_13_release rename to cmake/profiles/linux_x64_clang_16_release index 250efe7c4a..3164500a5a 100644 --- a/cmake/profiles/linux_x64_clang_13_release +++ b/cmake/profiles/linux_x64_clang_16_release @@ -1,12 +1,8 @@ [settings] os=Linux -os_build=Linux arch=x86_64 -arch_build=x86_64 compiler=clang -compiler.version=13 +compiler.version=16 compiler.libcxx=libc++ +compiler.cppstd=17 build_type=Release -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/linux_x64_gcc_11_debug b/cmake/profiles/linux_x64_gcc_11_debug index 21378fb239..d627ca292d 100644 --- a/cmake/profiles/linux_x64_gcc_11_debug +++ b/cmake/profiles/linux_x64_gcc_11_debug @@ -1,12 +1,8 @@ [settings] os=Linux -os_build=Linux arch=x86_64 -arch_build=x86_64 compiler=gcc compiler.version=11 compiler.libcxx=libstdc++11 +compiler.cppstd=17 build_type=Debug -[options] -[build_requires] -[env] diff --git a/cmake/profiles/linux_x64_gcc_11_release b/cmake/profiles/linux_x64_gcc_11_release index ee38ba1656..3b7c771b9b 100644 --- a/cmake/profiles/linux_x64_gcc_11_release +++ b/cmake/profiles/linux_x64_gcc_11_release @@ -1,12 +1,8 @@ [settings] os=Linux -os_build=Linux arch=x86_64 -arch_build=x86_64 compiler=gcc compiler.version=11 compiler.libcxx=libstdc++11 +compiler.cppstd=17 build_type=Release -[options] -[build_requires] -[env] diff --git a/cmake/profiles/macos_arm64_clang_13_debug b/cmake/profiles/macos_arm64_clang_13_debug index e34ebb4768..20e6dfa5d4 100644 --- a/cmake/profiles/macos_arm64_clang_13_debug +++ b/cmake/profiles/macos_arm64_clang_13_debug @@ -1,12 +1,8 @@ [settings] os=Macos -os_build=Macos arch=armv8 -arch_build=armv8 compiler=apple-clang -compiler.version=13.0 +compiler.version=13 compiler.libcxx=libc++ +compiler.cppstd=17 build_type=Debug -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/macos_arm64_clang_13_release b/cmake/profiles/macos_arm64_clang_13_release index 0b8b38afc9..d7b3ae5d37 100644 --- a/cmake/profiles/macos_arm64_clang_13_release +++ b/cmake/profiles/macos_arm64_clang_13_release @@ -1,12 +1,8 @@ [settings] os=Macos -os_build=Macos arch=armv8 -arch_build=armv8 compiler=apple-clang -compiler.version=13.0 +compiler.version=13 compiler.libcxx=libc++ +compiler.cppstd=17 build_type=Release -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/macos_x64_clang_13_debug b/cmake/profiles/macos_x64_clang_13_debug index 45783f26b3..5c47f39831 100644 --- a/cmake/profiles/macos_x64_clang_13_debug +++ b/cmake/profiles/macos_x64_clang_13_debug @@ -1,12 +1,8 @@ [settings] os=Macos -os_build=Macos arch=x86_64 -arch_build=x86_64 compiler=apple-clang -compiler.version=13.0 +compiler.version=13 compiler.libcxx=libc++ +compiler.cppstd=17 build_type=Debug -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/macos_x64_clang_13_release b/cmake/profiles/macos_x64_clang_13_release index 7346e17a7f..fa07d48c4a 100644 --- a/cmake/profiles/macos_x64_clang_13_release +++ b/cmake/profiles/macos_x64_clang_13_release @@ -1,12 +1,8 @@ [settings] os=Macos -os_build=Macos arch=x86_64 -arch_build=x86_64 compiler=apple-clang -compiler.version=13.0 +compiler.version=13 compiler.libcxx=libc++ +compiler.cppstd=17 build_type=Release -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/wasi_release b/cmake/profiles/wasi_release index 31ae7ca3b1..e986e45afa 100644 --- a/cmake/profiles/wasi_release +++ b/cmake/profiles/wasi_release @@ -5,8 +5,5 @@ compiler=clang compiler.version=14 compiler.libcxx=libc++ build_type=Release -[options] -[build_requires] -[env] -CC=/opt/wasi-sdk/bin/clang -CXX=/opt/wasi-sdk/bin/clang++ +[conf] +tools.build:compiler_executables={'c': '/opt/wasi-sdk/bin/clang', 'cpp': '/opt/wasi-sdk/bin/clang++'} diff --git a/cmake/profiles/windows_msvc_16_debug b/cmake/profiles/windows_msvc_16_debug deleted file mode 100644 index 99fa4f1b73..0000000000 --- a/cmake/profiles/windows_msvc_16_debug +++ /dev/null @@ -1,12 +0,0 @@ -[settings] -os=Windows -os_build=Windows -arch=x86_64 -arch_build=x86_64 -compiler=Visual Studio -compiler.version=16 -compiler.runtime=MDd -build_type=Debug -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/windows_msvc_16_release b/cmake/profiles/windows_msvc_16_release deleted file mode 100644 index e52961d8e8..0000000000 --- a/cmake/profiles/windows_msvc_16_release +++ /dev/null @@ -1,12 +0,0 @@ -[settings] -os=Windows -os_build=Windows -arch=x86_64 -arch_build=x86_64 -compiler=Visual Studio -compiler.version=16 -compiler.runtime=MD -build_type=Release -[options] -[build_requires] -[env] \ No newline at end of file diff --git a/cmake/profiles/windows_msvc_193_debug b/cmake/profiles/windows_msvc_193_debug new file mode 100644 index 0000000000..86bf46cfe9 --- /dev/null +++ b/cmake/profiles/windows_msvc_193_debug @@ -0,0 +1,9 @@ +[settings] +os=Windows +arch=x86_64 +compiler=msvc +compiler.version=193 +compiler.runtime=dynamic +compiler.runtime_type=Release +compiler.cppstd=14 +build_type=Debug diff --git a/cmake/profiles/windows_msvc_193_release b/cmake/profiles/windows_msvc_193_release new file mode 100644 index 0000000000..14b080f211 --- /dev/null +++ b/cmake/profiles/windows_msvc_193_release @@ -0,0 +1,9 @@ +[settings] +os=Windows +arch=x86_64 +compiler=msvc +compiler.version=193 +compiler.runtime=dynamic +compiler.runtime_type=Release +compiler.cppstd=14 +build_type=Release diff --git a/cmake/setup/compiler_install.sh b/cmake/setup/compiler_install.sh index a0e903f50a..1f3712363c 100755 --- a/cmake/setup/compiler_install.sh +++ b/cmake/setup/compiler_install.sh @@ -6,13 +6,22 @@ set -e set -o pipefail +script_dir=$(dirname "${BASH_SOURCE[0]}") +project_dir="$script_dir/../.." + function install_gcc { GCC_VERSION="$1" echo "Installing GCC $GCC_VERSION..." sudo apt-get update - sudo apt-get install -y gcc-$GCC_VERSION g++-$GCC_VERSION - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$GCC_VERSION 100 --slave /usr/bin/g++ g++ /usr/bin/g++-$GCC_VERSION + sudo apt-get install -y g++-$GCC_VERSION + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-$GCC_VERSION 100 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-$GCC_VERSION + sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 100 + sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 100 + sudo update-alternatives --set gcc /usr/bin/gcc-$GCC_VERSION + sudo update-alternatives --set cc /usr/bin/gcc + sudo update-alternatives --set c++ /usr/bin/g++ } # libc++ is an alternative standard library needed for coroutines support on Clang @@ -22,22 +31,32 @@ function install_clang { echo "Installing clang $CLANG_VERSION..." sudo apt-get update - package_available=$(apt list llvm-$CLANG_VERSION 2>/dev/null | grep llvm-$CLANG_VERSION) - - if [[ -n "$package_available" ]]; then - echo "The package llvm-$CLANG_VERSION is available in apt repositories" - sudo apt-get install -y llvm-$CLANG_VERSION libc++-$CLANG_VERSION-dev libc++abi-$CLANG_VERSION-dev clang-$CLANG_VERSION lld-$CLANG_VERSION + if apt-cache show clang-$CLANG_VERSION > /dev/null 2>&1 + then + echo "Installing from the default apt repositories" + sudo apt-get install -y clang-$CLANG_VERSION \ + libc++-$CLANG_VERSION-dev libc++abi-$CLANG_VERSION-dev \ + lld-$CLANG_VERSION else - echo "Package llvm-$CLANG_VERSION not available, attempting to install using llvm.sh script" - sudo ../../third_party/llvm/llvm.sh $CLANG_VERSION + echo "Installing from apt.llvm.org using llvm.sh script" + sudo "$project_dir/third_party/llvm/llvm.sh" $CLANG_VERSION fi - sudo ln -sfv /usr/bin/clang-$CLANG_VERSION /usr/bin/clang - sudo ln -sfv /usr/bin/clang++-$CLANG_VERSION /usr/bin/clang++ - sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100 - sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100 - sudo update-alternatives --install /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-$CLANG_VERSION 100 - sudo update-alternatives --install /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-$CLANG_VERSION 100 + sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-$CLANG_VERSION 100 \ + --slave /usr/bin/clang++ clang++ /usr/bin/clang++-$CLANG_VERSION \ + --slave /usr/bin/llvm-cov llvm-cov /usr/bin/llvm-cov-$CLANG_VERSION \ + --slave /usr/bin/llvm-profdata llvm-profdata /usr/bin/llvm-profdata-$CLANG_VERSION + sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100 + sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100 + sudo update-alternatives --set clang /usr/bin/clang-$CLANG_VERSION + sudo update-alternatives --set cc /usr/bin/clang + sudo update-alternatives --set c++ /usr/bin/clang++ + + # alias gcc to clang + # this is useful for scripts having gcc hardcoded (such as GMP autotools build) + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/clang 10 \ + --slave /usr/bin/g++ g++ /usr/bin/clang++ + sudo update-alternatives --set gcc /usr/bin/clang } if [[ -n "$1" ]] @@ -64,3 +83,7 @@ case "$compiler_id" in install_clang "$version" ;; esac + +update-alternatives --display cc +update-alternatives --display c++ +update-alternatives --display gcc diff --git a/conanfile.py b/conanfile.py index 87338153df..9a1f8fd352 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,11 +1,11 @@ # Copyright 2023 The Silkworm Authors - +# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at - +# # http://www.apache.org/licenses/LICENSE-2.0 - +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -17,7 +17,7 @@ class SilkwormRecipe(ConanFile): settings = 'os', 'compiler', 'build_type', 'arch' - generators = 'cmake_find_package' + generators = 'CMakeDeps' def requirements(self): self.requires('catch2/3.6.0') @@ -32,10 +32,10 @@ def requirements(self): self.requires('abseil/20240116.2') self.requires('asio-grpc/2.9.2') self.requires('benchmark/1.6.1') - self.requires('boost/1.83.0') + self.requires('boost/1.83.0', override=True) self.requires('cli11/2.2.0') self.requires('gmp/6.2.1') - self.requires('grpc/1.67.1') + self.requires('grpc/1.67.1', override=True) self.requires('gtest/1.12.1') self.requires('jwt-cpp/0.6.0') self.requires('libtorrent/2.0.10') @@ -51,19 +51,23 @@ def requirements(self): def configure(self): self.options['asio-grpc'].local_allocator = 'boost_container' - # Conan Center has Windows binaries built only with msvc16 and mimalloc built only with option override=False. - # In order to build mimalloc with override=True we could switch to msvc17 compiler but this would trigger a full - # rebuild from sources of all dependencies increasing build time a lot, so we prefer to keep mimalloc override - # disabled on Windows. - # The same applies also for boost with option asio_no_deprecated, so we skip configuration entirely on Windows. - if self.settings.os == 'Windows': - return + if (self.settings.os == 'Linux') and (self.settings.compiler == 'clang'): + self.options['grpc'].with_libsystemd = False # Disable Catch2 version 3.x.x signal handling on WASM if self.settings.arch == 'wasm': self.options['catch2'].no_posix_signals = True + self.configure_boost() + + def configure_boost(self): + # on Windows rebuilding boost from sources increases the build time a lot, so we skip configuration + # hoping it doesn't break with asio_no_deprecated = False + if self.settings.os == 'Windows': + return + self.options['boost'].asio_no_deprecated = True + if self.settings.os == 'Macos': cmake_osx_deployment_target = '10.14' os_version_min_flag = f'-mmacosx-version-min={cmake_osx_deployment_target}' diff --git a/docs/fuzzer.md b/docs/fuzzer.md index 06d2206821..8a8553ce65 100644 --- a/docs/fuzzer.md +++ b/docs/fuzzer.md @@ -6,7 +6,7 @@ To build the fuzzer use the following: ```bash mkdir build cd build -cmake ../project -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONAN_PROFILE=linux_x64_clang_13_release -DCMAKE_TOOLCHAIN_FILE=../project/cmake/toolchain/clang_libcxx.cmake -DSILKWORM_FUZZER=ON +cmake ../project -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCONAN_PROFILE=linux_x64_clang_16_release -DCMAKE_TOOLCHAIN_FILE=../project/cmake/toolchain/clang_libcxx.cmake -DSILKWORM_FUZZER=ON cmake --build --target rpcdaemon_fuzzer_test cmake –-build --target rpcdaemon_fuzzer_diagnostics ``` diff --git a/tests/docker/Dockerfile b/tests/docker/Dockerfile index aebddddfda..3e6284645c 100644 --- a/tests/docker/Dockerfile +++ b/tests/docker/Dockerfile @@ -6,7 +6,7 @@ FROM cimg/python:3.12.0 as base # 1 Install dependencies RUN sudo apt-get update RUN sudo apt install -y python3-pip -RUN sudo pip3 install conan==1.64.1 chardet +RUN sudo pip3 install conan==2.10.2 chardet RUN sudo apt-get update # 2 Get repo and submodules @@ -22,7 +22,7 @@ RUN cmake/setup/compiler_install.sh clang 16 # 4 Build all targets WORKDIR /app/build -RUN cmake ../project -DCMAKE_BUILD_TYPE=Debug -DCONAN_PROFILE=linux_x64_clang_13_debug +RUN cmake ../project -DCMAKE_BUILD_TYPE=Debug -DCONAN_PROFILE=linux_x64_clang_16_release -DCMAKE_TOOLCHAIN_FILE=../project/cmake/toolchain/clang_libcxx.cmake WORKDIR /app/project RUN cmake --build /app/build -j4 @@ -48,7 +48,7 @@ RUN git pull origin ${BRANCH} # Rebuild all targets RUN echo "Rebuilding" WORKDIR /app/build -RUN sudo cmake ../project -DCMAKE_BUILD_TYPE=Debug -DCONAN_PROFILE=linux_x64_clang_13_debug +RUN sudo cmake ../project -DCMAKE_BUILD_TYPE=Debug -DCONAN_PROFILE=linux_x64_clang_16_release -DCMAKE_TOOLCHAIN_FILE=../project/cmake/toolchain/clang_libcxx.cmake WORKDIR /app/project RUN sudo cmake --build /app/build -j4 @@ -64,7 +64,7 @@ RUN sudo cmake --build /app/build -j4 # RUN for file in ~/artifacts/*; do sed -i 's/^>> //' "$file"; done # # Rebuild fuzzer # WORKDIR /app/build -# RUN sudo cmake ../project -DCMAKE_BUILD_TYPE=Debug -DCONAN_PROFILE=linux_x64_clang_13_debug -DSILKWORM_FUZZING=ON +# RUN sudo cmake ../project -DCMAKE_BUILD_TYPE=Debug -DCONAN_PROFILE=linux_x64_clang_16_release -DCMAKE_TOOLCHAIN_FILE=../project/cmake/toolchain/clang_libcxx.cmake -DSILKWORM_FUZZER=ON # WORKDIR /app/project # RUN sudo cmake --build /app/build -j4 --target rpcdaemon_fuzzer_test # # Run fuzzer diff --git a/third_party/cmake-conan/conan_provider.cmake b/third_party/cmake-conan/conan_provider.cmake index 0afa940abf..59a58ed700 100644 --- a/third_party/cmake-conan/conan_provider.cmake +++ b/third_party/cmake-conan/conan_provider.cmake @@ -489,11 +489,11 @@ function(conan_install) string(JSON conan_generators_folder GET "${conan_stdout}" graph nodes 0 generators_folder) cmake_path(CONVERT ${conan_generators_folder} TO_CMAKE_PATH_LIST conan_generators_folder) - message(STATUS "CMake-Conan: CONAN_GENERATORS_FOLDER=${conan_generators_folder}") + message(VERBOSE "CMake-Conan: CONAN_GENERATORS_FOLDER=${conan_generators_folder}") set_property(GLOBAL PROPERTY CONAN_GENERATORS_FOLDER "${conan_generators_folder}") # reconfigure on conanfile changes string(JSON conanfile GET "${conan_stdout}" graph nodes 0 label) - message(STATUS "CMake-Conan: CONANFILE=${CMAKE_SOURCE_DIR}/${conanfile}") + message(VERBOSE "CMake-Conan: CONANFILE=${CMAKE_SOURCE_DIR}/${conanfile}") set_property(DIRECTORY ${CMAKE_SOURCE_DIR} APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/${conanfile}") # success set_property(GLOBAL PROPERTY CONAN_INSTALL_SUCCESS TRUE) @@ -562,7 +562,7 @@ macro(conan_provide_dependency method package_name) # SILKWORM-PATCH: find_program(CONAN_COMMAND "conan" REQUIRED) conan_get_version(${CONAN_COMMAND} CONAN_CURRENT_VERSION) conan_version_check(MINIMUM ${CONAN_MINIMUM_VERSION} CURRENT ${CONAN_CURRENT_VERSION}) - message(STATUS "CMake-Conan: first find_package() found. Installing dependencies with Conan") + message(VERBOSE "CMake-Conan: first find_package() found. Installing dependencies with Conan") if("default" IN_LIST CONAN_HOST_PROFILE OR "default" IN_LIST CONAN_BUILD_PROFILE) conan_profile_detect_default() endif() @@ -587,10 +587,10 @@ macro(conan_provide_dependency method package_name) endif() get_property(_multiconfig_generator GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(NOT _multiconfig_generator) - message(STATUS "CMake-Conan: Installing single configuration ${CMAKE_BUILD_TYPE}") + message(VERBOSE "CMake-Conan: Installing single configuration ${CMAKE_BUILD_TYPE}") conan_install(${_host_profile_flags} ${_build_profile_flags} ${CONAN_INSTALL_ARGS} ${generator}) else() - message(STATUS "CMake-Conan: Installing both Debug and Release") + message(VERBOSE "CMake-Conan: Installing both Debug and Release") conan_install(${_host_profile_flags} ${_build_profile_flags} -s build_type=Release ${CONAN_INSTALL_ARGS} ${generator}) conan_install(${_host_profile_flags} ${_build_profile_flags} -s build_type=Debug ${CONAN_INSTALL_ARGS} ${generator}) endif() @@ -599,7 +599,6 @@ macro(conan_provide_dependency method package_name) unset(_multiconfig_generator) unset(_conan_install_success) else() - message(STATUS "CMake-Conan: find_package(${ARGV1}) found, 'conan install' already ran") unset(_conan_install_success) endif() diff --git a/third_party/erigon-mdbx-go/CMakeLists.txt b/third_party/erigon-mdbx-go/CMakeLists.txt index d3cc4d9812..044635037e 100644 --- a/third_party/erigon-mdbx-go/CMakeLists.txt +++ b/third_party/erigon-mdbx-go/CMakeLists.txt @@ -15,9 +15,28 @@ ]] set(MDBX_ENABLE_TESTS OFF) + +# reduce the log verbosity of mdbx-go/mdbxdist/CMakeLists.txt +if(NOT CMAKE_MESSAGE_LOG_LEVEL) + set(CMAKE_MESSAGE_LOG_LEVEL_EMPTY YES) + set(CMAKE_MESSAGE_LOG_LEVEL NOTICE) +endif() + add_subdirectory(mdbx-go/mdbxdist) + +# restore the log verbosity +if(CMAKE_MESSAGE_LOG_LEVEL_EMPTY) + unset(CMAKE_MESSAGE_LOG_LEVEL) +endif() + target_compile_definitions(mdbx-static PUBLIC CONSTEXPR_ASSERT=assert) +# mdbx is not compatible with TSAN and added to the suppressions config file let's suppress the related compilation +# warnings +if(SILKWORM_SANITIZE STREQUAL "thread" AND CMAKE_CXX_COMPILER_ID MATCHES "GNU") + target_compile_options(mdbx-static PRIVATE -Wno-tsan) +endif() + if(MDBX_BUILD_TOOLS) foreach( TOOL diff --git a/third_party/gmp/CMakeLists.txt b/third_party/gmp/CMakeLists.txt index 4f8196fb0d..7f7c99ef4a 100644 --- a/third_party/gmp/CMakeLists.txt +++ b/third_party/gmp/CMakeLists.txt @@ -14,6 +14,20 @@ limitations under the License. ]] +function(expand_config_gen_expr expr build_type var) + string(REGEX MATCH ":[^>]+" VALUE "${expr}") + string(REPLACE ":" "" VALUE "${VALUE}") + set(${var} + "${VALUE}" + PARENT_SCOPE + ) +endfunction() + +if(GMP_LIBRARY STREQUAL "GMP_LIBRARY-NOTFOUND") + unset(GMP_LIBRARY CACHE) + unset(GMP_INCLUDE_DIR CACHE) +endif() + if(DEFINED GMP_LIBRARY) add_library(gmplib STATIC IMPORTED) set_target_properties(gmplib PROPERTIES IMPORTED_LOCATION "${GMP_LIBRARY}") @@ -24,15 +38,17 @@ if(DEFINED GMP_LIBRARY) endif() else() find_package(gmp REQUIRED) - add_custom_target(gmplib DEPENDS gmp::GMP) + add_custom_target(gmplib DEPENDS gmp::gmp) # derive the path variables from the package for intx, libff - get_target_property(GMP_INCLUDE_DIR gmp::GMP INTERFACE_INCLUDE_DIRECTORIES) + get_target_property(GMP_INCLUDE_DIR_EXPR gmp::libgmp INTERFACE_INCLUDE_DIRECTORIES) + expand_config_gen_expr("${GMP_INCLUDE_DIR_EXPR}" ${CMAKE_BUILD_TYPE} GMP_INCLUDE_DIR) set(GMP_INCLUDE_DIR "${GMP_INCLUDE_DIR}" CACHE PATH "" ) - get_target_property(GMP_LIBRARY_DIR gmp::GMP INTERFACE_LINK_DIRECTORIES) + get_target_property(GMP_LIBRARY_DIR_EXPR gmp::libgmp INTERFACE_LINK_DIRECTORIES) + expand_config_gen_expr("${GMP_LIBRARY_DIR_EXPR}" ${CMAKE_BUILD_TYPE} GMP_LIBRARY_DIR) find_library( GMP_LIBRARY gmp PATHS "${GMP_LIBRARY_DIR}" REQUIRED diff --git a/third_party/libff/CMakeLists.txt b/third_party/libff/CMakeLists.txt index 33519aaace..ee2088e14d 100644 --- a/third_party/libff/CMakeLists.txt +++ b/third_party/libff/CMakeLists.txt @@ -20,4 +20,16 @@ set(CURVE ) option(WITH_PROCPS "" OFF) option(IS_LIBFF_PARENT "" OFF) + +# reduce the log verbosity of libff/CMakeLists.txt +if(NOT CMAKE_MESSAGE_LOG_LEVEL) + set(CMAKE_MESSAGE_LOG_LEVEL_EMPTY YES) + set(CMAKE_MESSAGE_LOG_LEVEL NOTICE) +endif() + add_subdirectory(libff) + +# restore the log verbosity +if(CMAKE_MESSAGE_LOG_LEVEL_EMPTY) + unset(CMAKE_MESSAGE_LOG_LEVEL) +endif() diff --git a/third_party/llvm/README.md b/third_party/llvm/README.md index 295543f26f..9651564720 100644 --- a/third_party/llvm/README.md +++ b/third_party/llvm/README.md @@ -10,4 +10,8 @@ To re-compile, run the following commands: The problem with the standard build delivered by the `compiler_install.sh` is that the libFuzzer is linked against the libstdc++ library. This is not compatible with the libc++ library used by the Silkworm project. Therefore, we need to re-compile the libFuzzer library. To prevent the lengthy recompliation of the whole LLVM project, we deliver the pre-compiled libFuzzer library in this repository. -The similar issue has been in https://github.com/google/oss-fuzz/issues/2328. \ No newline at end of file +The similar issue has been in https://github.com/google/oss-fuzz/issues/2328. + +Update llvm.sh using: + + curl -O https://apt.llvm.org/llvm.sh From 0b7b3b92f492f4f4f1435c5496bb7b7b54f6cd0b Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com> Date: Thu, 26 Dec 2024 15:49:14 +0100 Subject: [PATCH 36/48] rpcdaemon: read_rlp_transaction() on RemoteChainStorage class (#2624) --- silkworm/db/chain/remote_chain_storage.cpp | 34 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/silkworm/db/chain/remote_chain_storage.cpp b/silkworm/db/chain/remote_chain_storage.cpp index 31ee241c92..71e0a8420d 100644 --- a/silkworm/db/chain/remote_chain_storage.cpp +++ b/silkworm/db/chain/remote_chain_storage.cpp @@ -194,13 +194,41 @@ Task RemoteChainStorage::read_rlp_transactions(BlockNum block_num, const e } rlp_txs.reserve(block.transactions.size()); for (const auto& transaction : block.transactions) { - rlp::encode(rlp_txs.emplace_back(), transaction); + rlp::encode(rlp_txs.emplace_back(), transaction, /*wrap_eip2718_into_string=*/false); } co_return true; } -Task RemoteChainStorage::read_rlp_transaction(const evmc::bytes32& /*txn_hash*/, Bytes& /*rlp_tx*/) const { - throw std::logic_error{"RemoteChainStorage::read_rlp_transaction not implemented"}; +Task RemoteChainStorage::read_rlp_transaction(const evmc::bytes32& txn_hash, Bytes& rlp_tx) const { + auto block_num = co_await providers_.block_num_from_txn_hash(txn_hash.bytes); + if (!block_num) { + co_return false; + } + + const auto block_hash = co_await providers_.canonical_block_hash_from_number(*block_num); + if (!block_hash) { + co_return false; + } + + std::vector rlp_txs; + if (!co_await read_rlp_transactions(*block_num, *block_hash, rlp_txs)) { + co_return false; + } + + Block block; + const bool success = co_await providers_.block(*block_num, block_hash->bytes, /*.read_senders=*/false, block); + if (!success) { + co_return false; + } + for (const auto& transaction : block.transactions) { + Bytes rlp; + if (transaction.hash() == txn_hash) { + rlp::encode(rlp, transaction, /*wrap_eip2718_into_string=*/false); + rlp_tx = rlp; + co_return true; + } + } + co_return false; } Task> RemoteChainStorage::read_total_difficulty(const Hash& hash, BlockNum block_num) const { From a461f8a4bbc72effa670f9563dbc206d4144e5a7 Mon Sep 17 00:00:00 2001 From: Sixtysixter <20945591+Sixtysixter@users.noreply.github.com> Date: Sun, 29 Dec 2024 17:43:58 +0100 Subject: [PATCH 37/48] rpcdaemon: enable debug_traceCallMany tests (#2620) --- .github/workflows/rpc-integration-tests.yml | 2 +- .github/workflows/run_integration_tests.sh | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/rpc-integration-tests.yml b/.github/workflows/rpc-integration-tests.yml index b3ddb4a99a..bbd9541f1c 100644 --- a/.github/workflows/rpc-integration-tests.yml +++ b/.github/workflows/rpc-integration-tests.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git -c advice.detachedHead=false clone --depth 1 --branch v1.30.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v1.31.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests pip3 install -r requirements.txt --break-system-packages diff --git a/.github/workflows/run_integration_tests.sh b/.github/workflows/run_integration_tests.sh index 81900aebf6..9fe8b375aa 100755 --- a/.github/workflows/run_integration_tests.sh +++ b/.github/workflows/run_integration_tests.sh @@ -29,8 +29,6 @@ debug_traceBlockByNumber/test_10,\ debug_traceBlockByNumber/test_11,\ debug_traceBlockByNumber/test_12,\ debug_traceBlockByNumber/test_21,\ -debug_traceCallMany/test_07,\ -debug_traceCallMany/test_09,\ debug_traceTransaction/test_25.json,\ debug_traceTransaction/test_36.json,\ debug_traceTransaction/test_43.json,\ From d840a608ba66ebe9c642a8c4c50614663209f833 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:29:35 +0100 Subject: [PATCH 38/48] rpcdaemon: impl API debug_getRawReceipts (#2627) --- .github/workflows/rpc-integration-tests.yml | 2 +- docs/JSON-RPC-API.md | 2 +- silkworm/rpc/commands/debug_api.cpp | 91 +++++++++++++++------ silkworm/rpc/commands/debug_api.hpp | 1 + silkworm/rpc/commands/rpc_api_table.cpp | 1 + silkworm/rpc/core/evm_executor.cpp | 13 ++- silkworm/rpc/core/receipts.cpp | 36 +++++--- silkworm/rpc/core/receipts.hpp | 13 ++- silkworm/rpc/ethdb/cbor_test.cpp | 6 +- silkworm/rpc/json/receipt.cpp | 2 +- silkworm/rpc/json/receipt_test.cpp | 8 +- silkworm/rpc/json_rpc/methods.hpp | 1 + silkworm/rpc/types/receipt.cpp | 7 +- silkworm/rpc/types/receipt.hpp | 6 +- silkworm/rpc/types/receipt_test.cpp | 3 +- 15 files changed, 123 insertions(+), 69 deletions(-) diff --git a/.github/workflows/rpc-integration-tests.yml b/.github/workflows/rpc-integration-tests.yml index bbd9541f1c..b11ae3fce6 100644 --- a/.github/workflows/rpc-integration-tests.yml +++ b/.github/workflows/rpc-integration-tests.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git -c advice.detachedHead=false clone --depth 1 --branch v1.31.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v1.32.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests pip3 install -r requirements.txt --break-system-packages diff --git a/docs/JSON-RPC-API.md b/docs/JSON-RPC-API.md index d857a3bf20..db757d3d76 100644 --- a/docs/JSON-RPC-API.md +++ b/docs/JSON-RPC-API.md @@ -98,7 +98,7 @@ The following table shows the current [JSON RPC API](https://eth.wiki/json-rpc/A | debug_getBadBlocks | No | data not available | | | | debug_getRawBlock | Yes | can be optimized to avoid re-encoding | | | | debug_getRawHeader | Yes | | | | -| debug_getRawReceipts | No | see eth_getBlockReceipts | | | +| debug_getRawReceipts | Yes | | | | | debug_getRawTransaction | Yes | | | | | debug_storageRangeAt | Yes | | Yes | | | debug_traceBlockByHash | Yes | uses JSON streaming | Yes | | diff --git a/silkworm/rpc/commands/debug_api.cpp b/silkworm/rpc/commands/debug_api.cpp index d470b6b10d..41a0971d1b 100644 --- a/silkworm/rpc/commands/debug_api.cpp +++ b/silkworm/rpc/commands/debug_api.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -35,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -113,7 +115,6 @@ Task DebugRpcApi::handle_debug_get_modified_accounts_by_number(const nlohm reply = make_json_error(request, kInvalidParams, error_msg); co_return; } - auto start_block_id = params[0].get(); auto end_block_id = start_block_id; if (params.size() == 2) { @@ -162,7 +163,6 @@ Task DebugRpcApi::handle_debug_get_modified_accounts_by_hash(const nlohman reply = make_json_error(request, kInvalidParams, error_msg); co_return; } - const auto start_hash = params[0].get(); auto end_hash = start_hash; if (params.size() == 2) { @@ -213,13 +213,11 @@ Task DebugRpcApi::handle_debug_storage_range_at(const nlohmann::json& requ reply = make_json_error(request, kInvalidParams, error_msg); co_return; } - auto block_hash = params[0].get(); auto tx_index = params[1].get(); auto address = params[2].get(); auto start_key = params[3].get(); auto max_result = params[4].get(); - SILK_DEBUG << "block_hash: 0x" << silkworm::to_hex(block_hash) << " tx_index: " << tx_index << " address: " << address @@ -298,11 +296,9 @@ Task DebugRpcApi::handle_debug_account_at(const nlohmann::json& request, n reply = make_json_error(request, kInvalidParams, error_msg); co_return; } - auto block_hash = params[0].get(); auto tx_index = params[1].get(); auto address = params[2].get(); - SILK_DEBUG << "block_hash: 0x" << silkworm::to_hex(block_hash) << " tx_index: " << tx_index << " address: " << address; @@ -389,16 +385,13 @@ Task DebugRpcApi::handle_debug_trace_transaction(const nlohmann::json& req SILK_ERROR << error_msg; const auto reply = make_json_error(request, kInvalidParams, error_msg); stream.write_json(reply); - co_return; } - auto transaction_hash = params[0].get(); - + const auto transaction_hash = params[0].get(); debug::DebugConfig config; if (params.size() > 1) { config = params[1].get(); } - SILK_DEBUG << "transaction_hash: " << silkworm::to_hex(transaction_hash) << " config: {" << config << "}"; stream.open_object(); @@ -434,7 +427,6 @@ Task DebugRpcApi::handle_debug_trace_call(const nlohmann::json& request, j SILK_ERROR << error_msg; const auto reply = make_json_error(request, kInvalidParams, error_msg); stream.write_json(reply); - co_return; } const auto call = params[0].get(); @@ -443,7 +435,6 @@ Task DebugRpcApi::handle_debug_trace_call(const nlohmann::json& request, j if (params.size() > 2) { config = params[2].get(); } - SILK_DEBUG << "call: " << call << " block_num_or_hash: " << block_num_or_hash << " config: {" << config << "}"; stream.open_object(); @@ -489,37 +480,29 @@ Task DebugRpcApi::handle_debug_trace_call_many(const nlohmann::json& reque SILK_ERROR << error_msg << request.dump(); const auto reply = make_json_error(request, kInvalidParams, error_msg); stream.write_json(reply); - co_return; } - const auto& params = request["params"]; if (params.size() < 2) { auto error_msg = "invalid debug_traceCallMany params: " + params.dump(); SILK_ERROR << error_msg; const auto reply = make_json_error(request, kInvalidParams, error_msg); stream.write_json(reply); - co_return; } const auto bundles = params[0].get(); - if (bundles.empty()) { const auto error_msg = "invalid debug_traceCallMany bundle list: " + params.dump(); SILK_ERROR << error_msg; const auto reply = make_json_error(request, kInvalidParams, error_msg); stream.write_json(reply); - co_return; } - const auto simulation_context = params[1].get(); - debug::DebugConfig config; if (params.size() > 2) { config = params[2].get(); } - SILK_DEBUG << "bundles: " << bundles << " simulation_context: " << simulation_context << " config: {" << config << "}"; stream.open_object(); @@ -553,7 +536,6 @@ Task DebugRpcApi::handle_debug_trace_block_by_number(const nlohmann::json& stream.write_json(reply); co_return; } - BlockNum block_num{0}; if (params[0].is_string()) { const auto value = params[0].get(); @@ -565,12 +547,10 @@ Task DebugRpcApi::handle_debug_trace_block_by_number(const nlohmann::json& } else { block_num = params[0].get(); } - debug::DebugConfig config; if (params.size() > 1) { config = params[1].get(); } - SILK_DEBUG << "block_num: " << block_num << " config: {" << config << "}"; stream.open_object(); @@ -616,12 +596,10 @@ Task DebugRpcApi::handle_debug_trace_block_by_hash(const nlohmann::json& r co_return; } const auto block_hash = params[0].get(); - debug::DebugConfig config; if (params.size() > 1) { config = params[1].get(); } - SILK_DEBUG << "block_hash: " << silkworm::to_hex(block_hash) << " config: {" << config << "}"; stream.open_object(); @@ -693,7 +671,6 @@ Task> get_modified_accounts(db::kv::api::Transaction& tx Task DebugRpcApi::handle_debug_get_raw_block(const nlohmann::json& request, nlohmann::json& reply) { const auto& params = request["params"]; - if (params.size() != 1) { auto error_msg = "invalid debug_getRawBlock params: " + params.dump(); SILK_ERROR << error_msg; @@ -730,6 +707,66 @@ Task DebugRpcApi::handle_debug_get_raw_block(const nlohmann::json& request co_await tx->close(); // RAII not (yet) available with coroutines } +Task DebugRpcApi::handle_debug_get_raw_receipts(const nlohmann::json& request, nlohmann::json& reply) { + const auto& params = request["params"]; + if (params.size() != 1) { + auto error_msg = "invalid debug_getRawReceipts params: " + params.dump(); + SILK_ERROR << error_msg; + reply = make_json_error(request, kInvalidParams, error_msg); + co_return; + } + const auto block_num_or_hash = params[0].get(); + + auto tx = co_await database_->begin(); + + try { + const auto chain_storage = tx->create_storage(); + const auto block_with_hash = co_await core::read_block_by_block_num_or_hash(*block_cache_, *chain_storage, *tx, block_num_or_hash); + if (!block_with_hash) { + reply = make_json_content(request, nullptr); + co_await tx->close(); // RAII not (yet) available with coroutines + co_return; + } + + auto receipts = co_await core::get_receipts(*tx, *block_with_hash, *chain_storage, workers_, false); + SILK_TRACE << "#receipts: " << receipts.size(); + + std::vector raw_receipts; + for (auto& rpc_receipt : receipts) { + silkworm::Receipt core_receipt{ + .type = rpc_receipt.type, + .success = rpc_receipt.success, + .cumulative_gas_used = rpc_receipt.cumulative_gas_used, + .bloom = rpc_receipt.bloom, + }; + for (auto& log : rpc_receipt.logs) { + core_receipt.logs.push_back(silkworm::Log{ + .address = log.address, + .topics = std::move(log.topics), + .data = std::move(log.data), + }); + } + + Bytes receipt_rlp; + rlp::encode(receipt_rlp, core_receipt); + + raw_receipts.push_back(silkworm::to_hex(receipt_rlp, /*with_prefix=*/true)); + } + reply = make_json_content(request, raw_receipts); + } catch (const std::invalid_argument& iv) { + SILK_ERROR << "exception: " << iv.what() << " processing request: " << request.dump(); + reply = make_json_error(request, kServerError, iv.what()); + } catch (const std::exception& e) { + SILK_ERROR << "exception: " << e.what() << " processing request: " << request.dump(); + reply = make_json_error(request, kInternalError, e.what()); + } catch (...) { + SILK_ERROR << "unexpected exception processing request: " << request.dump(); + reply = make_json_error(request, kServerError, "unexpected exception"); + } + + co_await tx->close(); // RAII not (yet) available with coroutines +} + Task DebugRpcApi::handle_debug_get_raw_header(const nlohmann::json& request, nlohmann::json& reply) { const auto& params = request["params"]; if (params.size() != 1) { @@ -777,7 +814,7 @@ Task DebugRpcApi::handle_debug_get_raw_transaction(const nlohmann::json& r reply = make_json_error(request, kInvalidParams, error_msg); co_return; } - auto transaction_hash = params[0].get(); + const auto transaction_hash = params[0].get(); SILK_DEBUG << "transaction_hash: " << silkworm::to_hex(transaction_hash); auto tx = co_await database_->begin(); diff --git a/silkworm/rpc/commands/debug_api.hpp b/silkworm/rpc/commands/debug_api.hpp index 4f112c6092..aad5808d8c 100644 --- a/silkworm/rpc/commands/debug_api.hpp +++ b/silkworm/rpc/commands/debug_api.hpp @@ -70,6 +70,7 @@ class DebugRpcApi { Task handle_debug_get_raw_block(const nlohmann::json& request, nlohmann::json& reply); Task handle_debug_get_raw_header(const nlohmann::json& request, nlohmann::json& reply); Task handle_debug_get_raw_transaction(const nlohmann::json& request, nlohmann::json& reply); + Task handle_debug_get_raw_receipts(const nlohmann::json& request, nlohmann::json& reply); private: boost::asio::io_context& ioc_; diff --git a/silkworm/rpc/commands/rpc_api_table.cpp b/silkworm/rpc/commands/rpc_api_table.cpp index bde262d26a..a36ab94c64 100644 --- a/silkworm/rpc/commands/rpc_api_table.cpp +++ b/silkworm/rpc/commands/rpc_api_table.cpp @@ -105,6 +105,7 @@ void RpcApiTable::add_debug_handlers() { method_handlers_[json_rpc::method::k_debug_getRawBlock] = &commands::RpcApi::handle_debug_get_raw_block; method_handlers_[json_rpc::method::k_debug_getRawHeader] = &commands::RpcApi::handle_debug_get_raw_header; method_handlers_[json_rpc::method::k_debug_getRawTransaction] = &commands::RpcApi::handle_debug_get_raw_transaction; + method_handlers_[json_rpc::method::k_debug_getRawReceipts] = &commands::RpcApi::handle_debug_get_raw_receipts; stream_handlers_[json_rpc::method::k_debug_traceCall] = &commands::RpcApi::handle_debug_trace_call; stream_handlers_[json_rpc::method::k_debug_traceCallMany] = &commands::RpcApi::handle_debug_trace_call_many; diff --git a/silkworm/rpc/core/evm_executor.cpp b/silkworm/rpc/core/evm_executor.cpp index 6fc92f4325..d371905103 100644 --- a/silkworm/rpc/core/evm_executor.cpp +++ b/silkworm/rpc/core/evm_executor.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include @@ -267,18 +266,18 @@ ExecutionResult EVMExecutor::call_with_receipt( const auto exec_result = call(block, txn, tracers, refund, gas_bailout); - const auto& logs = execution_processor_.intra_block_state().logs(); + auto& logs = execution_processor_.intra_block_state().logs(); receipt.success = exec_result.success(); receipt.bloom = logs_bloom(logs); receipt.gas_used = txn.gas_limit - exec_result.gas_left; - receipt.type = static_cast(txn.type); - for (const auto& log : logs) { + receipt.type = txn.type; + for (auto& log : logs) { Log rpc_log; rpc_log.address = log.address; - rpc_log.data = log.data; - rpc_log.topics = log.topics; - receipt.logs.push_back(rpc_log); + rpc_log.data = std::move(log.data); + rpc_log.topics = std::move(log.topics); + receipt.logs.push_back(std::move(rpc_log)); } SILK_DEBUG << "EVMExecutor::call call_result: " << exec_result.error_message() << " #data: " << exec_result.data.size() << " end"; diff --git a/silkworm/rpc/core/receipts.cpp b/silkworm/rpc/core/receipts.cpp index aae7e06738..dc0710599c 100644 --- a/silkworm/rpc/core/receipts.cpp +++ b/silkworm/rpc/core/receipts.cpp @@ -32,13 +32,21 @@ namespace silkworm::rpc::core { using ethdb::walk; -Task get_receipts(db::kv::api::Transaction& tx, const silkworm::BlockWithHash& block_with_hash, const db::chain::ChainStorage& chain_storage, WorkerPool& workers) { +static constexpr int kGasPerBlob = 0x20000; + +Task get_receipts(db::kv::api::Transaction& tx, + const silkworm::BlockWithHash& block_with_hash, + const db::chain::ChainStorage& chain_storage, + WorkerPool& workers, + bool extended_receipt_info) { if (block_with_hash.block.transactions.empty()) { co_return Receipts{}; } const evmc::bytes32 block_hash = block_with_hash.hash; - uint64_t block_num = block_with_hash.block.header.number; + const BlockNum block_num = block_with_hash.block.header.number; + + // Try to read receipts from storage, if not present regenerate them auto raw_receipts = co_await read_receipts(tx, block_num); if (!raw_receipts || raw_receipts->empty()) { raw_receipts = co_await generate_receipts(tx, block_with_hash.block, chain_storage, workers); @@ -46,16 +54,21 @@ Task get_receipts(db::kv::api::Transaction& tx, const silkworm::BlockW co_return Receipts{}; } } - auto& receipts = *raw_receipts; - auto& header = block_with_hash.block.header; - // Add derived fields to the receipts - auto& transactions = block_with_hash.block.transactions; + const auto& transactions = block_with_hash.block.transactions; SILK_DEBUG << "#transactions=" << block_with_hash.block.transactions.size() << " #receipts=" << receipts.size(); if (transactions.size() != receipts.size()) { - throw std::runtime_error{"#transactions and #receipts do not match in read_receipts"}; + throw std::runtime_error{"#transactions and #receipts do not match in get_receipts"}; } + + if (!extended_receipt_info) { + co_return receipts; + } + + // Add derived fields to the receipts + const auto& header = block_with_hash.block.header; + uint32_t log_index{0}; for (size_t i{0}; i < receipts.size(); ++i) { // The tx hash can be calculated by the tx content itself @@ -87,7 +100,7 @@ Task get_receipts(db::kv::api::Transaction& tx, const silkworm::BlockW receipts[i].from = transactions[i].sender(); receipts[i].to = transactions[i].to; - receipts[i].type = static_cast(transactions[i].type); + receipts[i].type = transactions[i].type; // The derived fields of receipt are taken from block and transaction for (size_t j{0}; j < receipts[i].logs.size(); ++j) { @@ -100,13 +113,13 @@ Task get_receipts(db::kv::api::Transaction& tx, const silkworm::BlockW } } - co_return *raw_receipts; + co_return receipts; } Task> read_receipts(db::kv::api::Transaction& tx, BlockNum block_num) { const auto block_key = db::block_key(block_num); const auto data = co_await tx.get_one(db::table::kBlockReceiptsName, block_key); - SILK_TRACE << "read_raw_receipts data: " << silkworm::to_hex(data); + SILK_TRACE << "read_receipts data: " << silkworm::to_hex(data); if (data.empty()) { co_return std::nullopt; } @@ -142,7 +155,8 @@ Task> read_receipts(db::kv::api::Transaction& tx, BlockN co_return receipts; } -Task> generate_receipts(db::kv::api::Transaction& tx, const silkworm::Block& block, +Task> generate_receipts(db::kv::api::Transaction& tx, + const silkworm::Block& block, const db::chain::ChainStorage& chain_storage, WorkerPool& workers) { auto block_num = block.header.number; diff --git a/silkworm/rpc/core/receipts.hpp b/silkworm/rpc/core/receipts.hpp index 9c8ba6ac96..7d9f17ede7 100644 --- a/silkworm/rpc/core/receipts.hpp +++ b/silkworm/rpc/core/receipts.hpp @@ -26,12 +26,17 @@ namespace silkworm::rpc::core { -static constexpr int kGasPerBlob = 0x20000; - -Task get_receipts(db::kv::api::Transaction& tx, const silkworm::BlockWithHash& block_with_hash, const db::chain::ChainStorage& chain_storage, WorkerPool& workers); +Task get_receipts(db::kv::api::Transaction& tx, + const silkworm::BlockWithHash& block_with_hash, + const db::chain::ChainStorage& chain_storage, + WorkerPool& workers, + bool extended_receipt_info = true); Task> read_receipts(db::kv::api::Transaction& tx, BlockNum block_num); -Task> generate_receipts(db::kv::api::Transaction& tx, const silkworm::Block& block, const db::chain::ChainStorage& chain_storage, WorkerPool& workers); +Task> generate_receipts(db::kv::api::Transaction& tx, + const silkworm::Block& block, + const db::chain::ChainStorage& chain_storage, + WorkerPool& workers); } // namespace silkworm::rpc::core diff --git a/silkworm/rpc/ethdb/cbor_test.cpp b/silkworm/rpc/ethdb/cbor_test.cpp index 43b4652b45..98cb085c98 100644 --- a/silkworm/rpc/ethdb/cbor_test.cpp +++ b/silkworm/rpc/ethdb/cbor_test.cpp @@ -131,7 +131,7 @@ TEST_CASE("decode receipts from CBOR 1", "[rpc][ethdb][cbor]") { Receipts receipts{}; CHECK_NOTHROW(cbor_decode(*silkworm::from_hex("818400f60101"), receipts)); CHECK(receipts.size() == 1); - CHECK(receipts[0].type == 0); + CHECK(receipts[0].type == TransactionType::kLegacy); CHECK(receipts[0].success == 1); CHECK(receipts[0].cumulative_gas_used == 1); } @@ -144,10 +144,10 @@ TEST_CASE("decode receipts from CBOR 2", "[rpc][ethdb][cbor]") { "8400f60101"), receipts)); CHECK(receipts.size() == 2); - CHECK(receipts[0].type == 0); + CHECK(receipts[0].type == TransactionType::kLegacy); CHECK(receipts[0].success == 1); CHECK(receipts[0].cumulative_gas_used == 1); - CHECK(receipts[1].type == 0); + CHECK(receipts[1].type == TransactionType::kLegacy); CHECK(receipts[1].success == 1); CHECK(receipts[1].cumulative_gas_used == 1); } diff --git a/silkworm/rpc/json/receipt.cpp b/silkworm/rpc/json/receipt.cpp index 6cb8093722..9dee2c7efd 100644 --- a/silkworm/rpc/json/receipt.cpp +++ b/silkworm/rpc/json/receipt.cpp @@ -35,7 +35,7 @@ void to_json(nlohmann::json& json, const Receipt& receipt) { } else { json["to"] = nlohmann::json{}; } - json["type"] = to_quantity(receipt.type ? receipt.type.value() : 0); + json["type"] = to_quantity(static_cast(receipt.type)); json["gasUsed"] = to_quantity(receipt.gas_used); json["cumulativeGasUsed"] = to_quantity(receipt.cumulative_gas_used); json["effectiveGasPrice"] = to_quantity(receipt.effective_gas_price); diff --git a/silkworm/rpc/json/receipt_test.cpp b/silkworm/rpc/json/receipt_test.cpp index 702cf1ce91..7b8ac2ba71 100644 --- a/silkworm/rpc/json/receipt_test.cpp +++ b/silkworm/rpc/json/receipt_test.cpp @@ -60,12 +60,12 @@ TEST_CASE("deserialize wrong object receipt", "[rpc][from_json]") { TEST_CASE("deserialize empty array receipt", "[rpc][from_json]") { const nlohmann::json j1 = R"([0,null,0,0])"_json; const auto r1 = j1.get(); - CHECK(*r1.type == 0); + CHECK(r1.type == TransactionType::kLegacy); CHECK(r1.success == false); CHECK(r1.cumulative_gas_used == 0); const auto j2 = nlohmann::json::from_cbor(*silkworm::from_hex("8400f60000")); const auto r2 = j2.get(); - CHECK(*r2.type == 0); + CHECK(r2.type == TransactionType::kLegacy); CHECK(r2.success == false); CHECK(r2.cumulative_gas_used == 0); } @@ -73,7 +73,7 @@ TEST_CASE("deserialize empty array receipt", "[rpc][from_json]") { TEST_CASE("deserialize array receipt", "[rpc][from_json]") { const nlohmann::json j = R"([1,null,1,123456])"_json; const auto r = j.get(); - CHECK(*r.type == 1); + CHECK(r.type == TransactionType::kAccessList); CHECK(r.success == true); CHECK(r.cumulative_gas_used == 123456); } @@ -107,6 +107,7 @@ TEST_CASE("serialize empty receipt", "[silkworm::json][to_json]") { TEST_CASE("serialize receipt", "[silkworm::json][to_json]") { Receipt r{ + TransactionType::kAccessList, true, 454647, silkworm::Bloom{}, @@ -119,7 +120,6 @@ TEST_CASE("serialize receipt", "[silkworm::json][to_json]") { 3, 0x22ea9f6b28db76a7162054c05ed812deb2f519cd_address, 0x22ea9f6b28db76a7162054c05ed812deb2f519cd_address, - 1, 2000000000}; nlohmann::json j = r; CHECK(j == R"({ diff --git a/silkworm/rpc/json_rpc/methods.hpp b/silkworm/rpc/json_rpc/methods.hpp index 56b4cf79e0..455b79534b 100644 --- a/silkworm/rpc/json_rpc/methods.hpp +++ b/silkworm/rpc/json_rpc/methods.hpp @@ -103,6 +103,7 @@ inline constexpr const char* k_debug_traceBlockByHash{"debug_traceBlockByHash"}; inline constexpr const char* k_debug_getRawBlock{"debug_getRawBlock"}; inline constexpr const char* k_debug_getRawHeader{"debug_getRawHeader"}; inline constexpr const char* k_debug_getRawTransaction{"debug_getRawTransaction"}; +inline constexpr const char* k_debug_getRawReceipts{"debug_getRawReceipts"}; inline constexpr const char* k_trace_call{"trace_call"}; inline constexpr const char* k_trace_callMany{"trace_callMany"}; diff --git a/silkworm/rpc/types/receipt.cpp b/silkworm/rpc/types/receipt.cpp index d018fa8e1c..ec4bfe77c3 100644 --- a/silkworm/rpc/types/receipt.cpp +++ b/silkworm/rpc/types/receipt.cpp @@ -48,12 +48,7 @@ std::ostream& operator<<(std::ostream& out, const Receipt& r) { } out << " tx_hash: " << to_hex(r.tx_hash); out << " tx_index: " << r.tx_index; - if (r.type) { - out << " type: 0x" << std::hex << std::setw(2) << std::setfill('0') << static_cast(*r.type) << std::dec; - } else { - out << " type: null"; - } - + out << " type: 0x" << std::hex << std::setw(2) << std::setfill('0') << static_cast(r.type) << std::dec; return out; } diff --git a/silkworm/rpc/types/receipt.hpp b/silkworm/rpc/types/receipt.hpp index 1859c5bce5..c7c901b684 100644 --- a/silkworm/rpc/types/receipt.hpp +++ b/silkworm/rpc/types/receipt.hpp @@ -30,6 +30,7 @@ namespace silkworm::rpc { struct Receipt { /* raw fields */ + TransactionType type{TransactionType::kLegacy}; // EIP-2718 bool success{false}; uint64_t cumulative_gas_used{0}; silkworm::Bloom bloom{}; @@ -44,10 +45,9 @@ struct Receipt { uint32_t tx_index{0}; std::optional from; std::optional to; - std::optional type{std::nullopt}; // EIP-2718 intx::uint256 effective_gas_price{0}; - std::optional blob_gas_used{std::nullopt}; // EIP-4844 - std::optional> blob_gas_price{std::nullopt}; // EIP-4844 + std::optional blob_gas_used{std::nullopt}; // EIP-4844 + std::optional blob_gas_price{std::nullopt}; // EIP-4844 }; std::ostream& operator<<(std::ostream& out, const Receipt& r); diff --git a/silkworm/rpc/types/receipt_test.cpp b/silkworm/rpc/types/receipt_test.cpp index ae3d8ff8ac..d070b19bf2 100644 --- a/silkworm/rpc/types/receipt_test.cpp +++ b/silkworm/rpc/types/receipt_test.cpp @@ -43,13 +43,13 @@ TEST_CASE("print empty receipt", "[rpc][types][receipt]") { TEST_CASE("print receipt", "[rpc][types][receipt]") { Logs logs{}; Receipt r{ + TransactionType::kDynamicFee, true, 210000, bloom_from_logs(logs), logs}; r.from = 0x0715a7794a1dc8e42615f059dd6e406a6594651a_address; r.to = 0x0715a7794a1dc8e42615f059dd6e406a6594651a_address; - r.type = 2; CHECK_NOTHROW(silkworm::test_util::null_stream() << r); } @@ -96,6 +96,7 @@ TEST_CASE("bloom from more than one log", "[rpc][types][receipt]") { TEST_CASE("receipt with empty bloom", "[rpc][types][receipt]") { Logs logs{}; Receipt r{ + TransactionType::kLegacy, true, 210000, bloom_from_logs(logs), From be046eb15e582307173ba2fb249b1deb3fe572d3 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Mon, 30 Dec 2024 15:23:25 +0100 Subject: [PATCH 39/48] Update AUTHORS (#2629) --- AUTHORS | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/AUTHORS b/AUTHORS index f12ff5cfb0..0586fb6aca 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,9 +1,3 @@ # This is the official list of Silkworm authors for copyright purposes. -Andrey Ashikhmin -Tullio Canepa -Greg Colvin -Andrea Lanfranchi -Daniel Lazarenko -Giulio Rebuffo -Michelangelo Riccobene +https://github.com/erigontech/silkworm/graphs/contributors From 1159767c69a152db9194cb9c01cdd37bfb66779d Mon Sep 17 00:00:00 2001 From: canepat <16927169+canepat@users.noreply.github.com> Date: Mon, 30 Dec 2024 18:22:48 +0100 Subject: [PATCH 40/48] rpcdaemon: remove unused code in EVMExecutor (#2631) --- silkworm/rpc/core/evm_executor.hpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/silkworm/rpc/core/evm_executor.hpp b/silkworm/rpc/core/evm_executor.hpp index 4c85919811..b6cafc83d1 100644 --- a/silkworm/rpc/core/evm_executor.hpp +++ b/silkworm/rpc/core/evm_executor.hpp @@ -92,7 +92,7 @@ class EVMExecutor { WorkerPool& workers, const silkworm::Block& block, const silkworm::Transaction& txn, - const TxnId txnId, + TxnId txnId, StateFactory state_factory, const Tracers& tracers = {}, bool refund = true, @@ -132,15 +132,7 @@ class EVMExecutor { void reset(); - const IntraBlockState& intra_block_state() const { return execution_processor_.intra_block_state(); } - private: - struct PreCheckResult { - std::string pre_check_error; - PreCheckErrorCode pre_check_error_code; - }; - static std::optional pre_check(const EVM& evm, const silkworm::Transaction& txn, - const intx::uint256& base_fee_per_gas, const intx::uint128& g0); const silkworm::ChainConfig& config_; WorkerPool& workers_; std::shared_ptr state_; From 9974f251d8e1aee14c51b7f562b5149d6b44b4f7 Mon Sep 17 00:00:00 2001 From: lupin012 <58134934+lupin012@users.noreply.github.com> Date: Mon, 30 Dec 2024 20:26:29 +0100 Subject: [PATCH 41/48] rpcdaemon: remove unnecessary call to read_rlp_transactions (#2628) --- silkworm/db/chain/remote_chain_storage.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/silkworm/db/chain/remote_chain_storage.cpp b/silkworm/db/chain/remote_chain_storage.cpp index 71e0a8420d..68a2f9f6d8 100644 --- a/silkworm/db/chain/remote_chain_storage.cpp +++ b/silkworm/db/chain/remote_chain_storage.cpp @@ -210,11 +210,6 @@ Task RemoteChainStorage::read_rlp_transaction(const evmc::bytes32& txn_has co_return false; } - std::vector rlp_txs; - if (!co_await read_rlp_transactions(*block_num, *block_hash, rlp_txs)) { - co_return false; - } - Block block; const bool success = co_await providers_.block(*block_num, block_hash->bytes, /*.read_senders=*/false, block); if (!success) { From d9123c1d6471c78eb31fb086a4cc69eca4ed4f3f Mon Sep 17 00:00:00 2001 From: Sixtysixter <20945591+Sixtysixter@users.noreply.github.com> Date: Tue, 31 Dec 2024 08:46:59 +0100 Subject: [PATCH 42/48] rpcdaemon: debug_traceBlockByNumber support for block tags (#2626) --- .github/workflows/rpc-integration-tests.yml | 2 +- .github/workflows/run_integration_tests.sh | 2 +- silkworm/rpc/commands/debug_api.cpp | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rpc-integration-tests.yml b/.github/workflows/rpc-integration-tests.yml index b11ae3fce6..67989d4e26 100644 --- a/.github/workflows/rpc-integration-tests.yml +++ b/.github/workflows/rpc-integration-tests.yml @@ -33,7 +33,7 @@ jobs: - name: Checkout RPC Tests Repository & Install Requirements run: | rm -rf ${{runner.workspace}}/rpc-tests - git -c advice.detachedHead=false clone --depth 1 --branch v1.32.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests + git -c advice.detachedHead=false clone --depth 1 --branch v1.33.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests cd ${{runner.workspace}}/rpc-tests pip3 install -r requirements.txt --break-system-packages diff --git a/.github/workflows/run_integration_tests.sh b/.github/workflows/run_integration_tests.sh index 9fe8b375aa..bb900d8c18 100755 --- a/.github/workflows/run_integration_tests.sh +++ b/.github/workflows/run_integration_tests.sh @@ -28,7 +28,7 @@ debug_traceBlockByNumber/test_09,\ debug_traceBlockByNumber/test_10,\ debug_traceBlockByNumber/test_11,\ debug_traceBlockByNumber/test_12,\ -debug_traceBlockByNumber/test_21,\ +debug_traceBlockByNumber/test_29,\ debug_traceTransaction/test_25.json,\ debug_traceTransaction/test_36.json,\ debug_traceTransaction/test_43.json,\ diff --git a/silkworm/rpc/commands/debug_api.cpp b/silkworm/rpc/commands/debug_api.cpp index 41a0971d1b..d8003a19b9 100644 --- a/silkworm/rpc/commands/debug_api.cpp +++ b/silkworm/rpc/commands/debug_api.cpp @@ -536,14 +536,16 @@ Task DebugRpcApi::handle_debug_trace_block_by_number(const nlohmann::json& stream.write_json(reply); co_return; } + + auto tx = co_await database_->begin(); BlockNum block_num{0}; if (params[0].is_string()) { + auto chain_storage = tx->create_storage(); + BlockReader block_reader{*chain_storage, *tx}; + const auto value = params[0].get(); - if (silkworm::is_valid_hex(value)) { - block_num = static_cast(std::stol(value, nullptr, 16)); - } else if (silkworm::is_valid_dec(value)) { - block_num = static_cast(std::stol(value, nullptr, 10)); - } + + block_num = co_await block_reader.get_block_num(value); } else { block_num = params[0].get(); } @@ -557,8 +559,6 @@ Task DebugRpcApi::handle_debug_trace_block_by_number(const nlohmann::json& stream.write_json_field("id", request["id"]); stream.write_field("jsonrpc", "2.0"); - auto tx = co_await database_->begin(); - try { const auto chain_storage = tx->create_storage(); From 3135ae17e2de622b09b8924f136bb6f4929796b8 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Thu, 19 Dec 2024 13:57:45 +0100 Subject: [PATCH 43/48] enable_large_values --- silkworm/db/datastore/kvdb/database.cpp | 3 +++ silkworm/db/datastore/kvdb/database.hpp | 7 +++++-- silkworm/db/datastore/kvdb/domain.hpp | 1 + silkworm/db/datastore/kvdb/history.hpp | 1 + silkworm/db/datastore/kvdb/schema.hpp | 10 ++++++++++ silkworm/db/state/schema_config.cpp | 1 + 6 files changed, 21 insertions(+), 2 deletions(-) diff --git a/silkworm/db/datastore/kvdb/database.cpp b/silkworm/db/datastore/kvdb/database.cpp index 19f1cd551b..e55945f6c7 100644 --- a/silkworm/db/datastore/kvdb/database.cpp +++ b/silkworm/db/datastore/kvdb/database.cpp @@ -46,13 +46,16 @@ DatabaseRef::EntitiesMap make_entities( Domain DatabaseRef::domain(datastore::EntityName name) const { auto& entity = entities_.at(name); + auto& domain_def = dynamic_cast(*schema_.entities().at(name)); Domain domain{ entity.at(Schema::kDomainValuesName), + domain_def.has_large_values(), std::nullopt, }; if (entity.contains(Schema::kHistoryValuesName)) { domain.history.emplace(History{ entity.at(Schema::kHistoryValuesName), + domain_def.has_large_values(), inverted_index(name), }); } diff --git a/silkworm/db/datastore/kvdb/database.hpp b/silkworm/db/datastore/kvdb/database.hpp index dc67719e3f..de8c42354c 100644 --- a/silkworm/db/datastore/kvdb/database.hpp +++ b/silkworm/db/datastore/kvdb/database.hpp @@ -42,14 +42,17 @@ class DatabaseRef { // this is private, use Database.ref() or DatabaseUnmanaged.ref() to create DatabaseRef( mdbx::env env, + const Schema::DatabaseDef& schema, const EntitiesMap& entities) : env_{env}, + schema_{schema}, entities_{entities} {} friend class Database; friend class DatabaseUnmanaged; mdbx::env env_; + const Schema::DatabaseDef& schema_; const EntitiesMap& entities_; }; @@ -70,7 +73,7 @@ class Database { Domain domain(datastore::EntityName name) const { return ref().domain(name); } InvertedIndex inverted_index(datastore::EntityName name) { return ref().inverted_index(name); } - DatabaseRef ref() const { return {env_, entities_}; } // NOLINT(cppcoreguidelines-slicing) + DatabaseRef ref() const { return {env_, schema_, entities_}; } // NOLINT(cppcoreguidelines-slicing) private: mdbx::env_managed env_; @@ -93,7 +96,7 @@ class DatabaseUnmanaged { Domain domain(datastore::EntityName name) const { return ref().domain(name); } InvertedIndex inverted_index(datastore::EntityName name) { return ref().inverted_index(name); } - DatabaseRef ref() const { return {env_, entities_}; } // NOLINT(cppcoreguidelines-slicing) + DatabaseRef ref() const { return {env_, schema_, entities_}; } // NOLINT(cppcoreguidelines-slicing) private: EnvUnmanaged env_; diff --git a/silkworm/db/datastore/kvdb/domain.hpp b/silkworm/db/datastore/kvdb/domain.hpp index 18ff378fbf..20ac81d35f 100644 --- a/silkworm/db/datastore/kvdb/domain.hpp +++ b/silkworm/db/datastore/kvdb/domain.hpp @@ -25,6 +25,7 @@ namespace silkworm::datastore::kvdb { struct Domain { const MapConfig& values_table; + bool has_large_values; std::optional history; }; diff --git a/silkworm/db/datastore/kvdb/history.hpp b/silkworm/db/datastore/kvdb/history.hpp index 7f684545e2..4ff9c1974f 100644 --- a/silkworm/db/datastore/kvdb/history.hpp +++ b/silkworm/db/datastore/kvdb/history.hpp @@ -23,6 +23,7 @@ namespace silkworm::datastore::kvdb { struct History { const MapConfig& values_table; + bool has_large_values; InvertedIndex inverted_index; }; diff --git a/silkworm/db/datastore/kvdb/schema.hpp b/silkworm/db/datastore/kvdb/schema.hpp index d1ef39e58b..4b412901f7 100644 --- a/silkworm/db/datastore/kvdb/schema.hpp +++ b/silkworm/db/datastore/kvdb/schema.hpp @@ -81,10 +81,20 @@ class Schema { return *this; } + DomainDef& enable_large_values() { + has_large_values_ = true; + return *this; + } + DomainDef& without_history() { DatabaseDef::undefine_history_schema(*this); return *this; } + + bool has_large_values() const { return has_large_values_; } + + private: + bool has_large_values_{false}; }; class DatabaseDef { diff --git a/silkworm/db/state/schema_config.cpp b/silkworm/db/state/schema_config.cpp index 867405f4f2..affaa08dd4 100644 --- a/silkworm/db/state/schema_config.cpp +++ b/silkworm/db/state/schema_config.cpp @@ -50,6 +50,7 @@ datastore::kvdb::Schema::DatabaseDef make_state_database_schema() { schema.domain(kDomainNameAccounts); schema.domain(kDomainNameStorage); schema.domain(kDomainNameCode) + .enable_large_values() .values_disable_multi_value(); schema.domain(kDomainNameCommitment) .without_history(); From f75247475a8885665f453c87682223da00d254f0 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Thu, 19 Dec 2024 14:21:30 +0100 Subject: [PATCH 44/48] move step.hpp to datastore/common --- silkworm/db/blocks/schema_config.cpp | 2 +- silkworm/db/datastore/{snapshots => }/common/step.hpp | 4 ++-- .../db/datastore/{snapshots => }/common/timestamp.hpp | 4 ++-- silkworm/db/datastore/kvdb/CMakeLists.txt | 1 + silkworm/db/datastore/snapshot_merger.cpp | 2 +- silkworm/db/datastore/snapshot_merger.hpp | 6 +++--- silkworm/db/datastore/snapshots/CMakeLists.txt | 1 + silkworm/db/datastore/snapshots/common/snapshot_path.cpp | 4 ++-- silkworm/db/datastore/snapshots/common/snapshot_path.hpp | 4 +++- .../db/datastore/snapshots/common/snapshot_path_test.cpp | 2 ++ silkworm/db/datastore/snapshots/schema.cpp | 2 +- silkworm/db/datastore/snapshots/schema.hpp | 2 +- .../db/datastore/snapshots/segment/kv_segment_test.cpp | 1 + silkworm/db/datastore/snapshots/segment/segment_test.cpp | 1 + silkworm/db/datastore/snapshots/snapshot_bundle.cpp | 1 + silkworm/db/datastore/snapshots/snapshot_bundle.hpp | 6 +++++- silkworm/db/datastore/snapshots/snapshot_repository.cpp | 1 + silkworm/db/datastore/snapshots/snapshot_repository.hpp | 8 ++++++-- silkworm/db/snapshot_sync.cpp | 4 ++-- silkworm/db/snapshot_sync.hpp | 2 +- silkworm/db/snapshot_sync_test.cpp | 2 +- silkworm/db/state/schema_config.cpp | 2 +- 22 files changed, 40 insertions(+), 22 deletions(-) rename silkworm/db/datastore/{snapshots => }/common/step.hpp (98%) rename silkworm/db/datastore/{snapshots => }/common/timestamp.hpp (94%) diff --git a/silkworm/db/blocks/schema_config.cpp b/silkworm/db/blocks/schema_config.cpp index dd68a81483..b8b29ceb3d 100644 --- a/silkworm/db/blocks/schema_config.cpp +++ b/silkworm/db/blocks/schema_config.cpp @@ -60,7 +60,7 @@ snapshots::SnapshotRepository make_blocks_repository(std::filesystem::path dir_p std::move(dir_path), open, make_blocks_repository_schema(), - std::make_unique(), + std::make_unique(), make_blocks_index_builders_factory(), }; } diff --git a/silkworm/db/datastore/snapshots/common/step.hpp b/silkworm/db/datastore/common/step.hpp similarity index 98% rename from silkworm/db/datastore/snapshots/common/step.hpp rename to silkworm/db/datastore/common/step.hpp index ab055f4726..9e900e7364 100644 --- a/silkworm/db/datastore/snapshots/common/step.hpp +++ b/silkworm/db/datastore/common/step.hpp @@ -21,7 +21,7 @@ #include "timestamp.hpp" -namespace silkworm::snapshots { +namespace silkworm::datastore { //! Scale factor to convert from-to block number values in block snapshot file names inline constexpr size_t kStepSizeForBlockSnapshots = 1'000; @@ -115,4 +115,4 @@ struct StepToTxnIdConverter : public StepToTimestampConverter { } }; -} // namespace silkworm::snapshots +} // namespace silkworm::datastore diff --git a/silkworm/db/datastore/snapshots/common/timestamp.hpp b/silkworm/db/datastore/common/timestamp.hpp similarity index 94% rename from silkworm/db/datastore/snapshots/common/timestamp.hpp rename to silkworm/db/datastore/common/timestamp.hpp index 621c3eedc6..7268e0bc53 100644 --- a/silkworm/db/datastore/snapshots/common/timestamp.hpp +++ b/silkworm/db/datastore/common/timestamp.hpp @@ -19,7 +19,7 @@ #include #include -namespace silkworm::snapshots { +namespace silkworm::datastore { using Timestamp = uint64_t; @@ -34,4 +34,4 @@ struct TimestampRange { std::string to_string() const { return std::string("[") + std::to_string(start) + ", " + std::to_string(end) + ")"; } }; -} // namespace silkworm::snapshots +} // namespace silkworm::datastore diff --git a/silkworm/db/datastore/kvdb/CMakeLists.txt b/silkworm/db/datastore/kvdb/CMakeLists.txt index 0677e4df08..af85f67ce5 100644 --- a/silkworm/db/datastore/kvdb/CMakeLists.txt +++ b/silkworm/db/datastore/kvdb/CMakeLists.txt @@ -27,6 +27,7 @@ silkworm_library( mdbx-static silkworm_core silkworm_infra + silkworm_datastore_common silkworm_datastore_etl ) diff --git a/silkworm/db/datastore/snapshot_merger.cpp b/silkworm/db/datastore/snapshot_merger.cpp index eebc227eb1..c892a8b927 100644 --- a/silkworm/db/datastore/snapshot_merger.cpp +++ b/silkworm/db/datastore/snapshot_merger.cpp @@ -136,7 +136,7 @@ void SnapshotMerger::commit(std::shared_ptr result) { on_snapshot_merged_signal_(bundle.step_range()); } -boost::signals2::scoped_connection SnapshotMerger::on_snapshot_merged(const std::function& callback) { +boost::signals2::scoped_connection SnapshotMerger::on_snapshot_merged(const std::function& callback) { return on_snapshot_merged_signal_.connect(callback); } diff --git a/silkworm/db/datastore/snapshot_merger.hpp b/silkworm/db/datastore/snapshot_merger.hpp index 062a24c932..19ba630381 100644 --- a/silkworm/db/datastore/snapshot_merger.hpp +++ b/silkworm/db/datastore/snapshot_merger.hpp @@ -21,8 +21,8 @@ #include +#include "common/step.hpp" #include "data_migration.hpp" -#include "snapshots/common/step.hpp" #include "snapshots/snapshot_repository.hpp" #include "snapshots/snapshot_size.hpp" @@ -36,7 +36,7 @@ class SnapshotMerger : public DataMigration { : snapshots_(snapshots), tmp_dir_path_(std::move(tmp_dir_path)) {} - boost::signals2::scoped_connection on_snapshot_merged(const std::function& callback); + boost::signals2::scoped_connection on_snapshot_merged(const std::function& callback); private: static constexpr size_t kBatchSize = 10; @@ -51,7 +51,7 @@ class SnapshotMerger : public DataMigration { snapshots::SnapshotRepository& snapshots_; std::filesystem::path tmp_dir_path_; - boost::signals2::signal on_snapshot_merged_signal_; + boost::signals2::signal on_snapshot_merged_signal_; }; } // namespace silkworm::datastore diff --git a/silkworm/db/datastore/snapshots/CMakeLists.txt b/silkworm/db/datastore/snapshots/CMakeLists.txt index 5d7a9942f1..f35b2e2fe9 100644 --- a/silkworm/db/datastore/snapshots/CMakeLists.txt +++ b/silkworm/db/datastore/snapshots/CMakeLists.txt @@ -38,6 +38,7 @@ set(LIBS_PUBLIC Microsoft.GSL::GSL silkworm_core silkworm_infra + silkworm_datastore_common silkworm_bittorrent ) # cmake-format: on diff --git a/silkworm/db/datastore/snapshots/common/snapshot_path.cpp b/silkworm/db/datastore/snapshots/common/snapshot_path.cpp index e54be6d290..f05a1a9d15 100644 --- a/silkworm/db/datastore/snapshots/common/snapshot_path.cpp +++ b/silkworm/db/datastore/snapshots/common/snapshot_path.cpp @@ -69,8 +69,8 @@ std::optional SnapshotPath::parse( return std::nullopt; } StepRange step_range{ - Step{static_cast(step_start)}, - Step{static_cast(step_end)}, + datastore::Step{static_cast(step_start)}, + datastore::Step{static_cast(step_end)}, }; std::optional sub_dir_name; diff --git a/silkworm/db/datastore/snapshots/common/snapshot_path.hpp b/silkworm/db/datastore/snapshots/common/snapshot_path.hpp index b2bee21dfa..2ba497cf3b 100644 --- a/silkworm/db/datastore/snapshots/common/snapshot_path.hpp +++ b/silkworm/db/datastore/snapshots/common/snapshot_path.hpp @@ -22,7 +22,7 @@ #include #include -#include "step.hpp" +#include "../../common/step.hpp" namespace silkworm::snapshots { @@ -31,6 +31,8 @@ inline constexpr uint8_t kSnapshotV1{1}; class SnapshotPath { public: + using StepRange = datastore::StepRange; + enum class FilenameFormat { kE2, kE3, diff --git a/silkworm/db/datastore/snapshots/common/snapshot_path_test.cpp b/silkworm/db/datastore/snapshots/common/snapshot_path_test.cpp index 0fecfca8e4..81ab98e9d5 100644 --- a/silkworm/db/datastore/snapshots/common/snapshot_path_test.cpp +++ b/silkworm/db/datastore/snapshots/common/snapshot_path_test.cpp @@ -23,6 +23,8 @@ namespace silkworm::snapshots { +using namespace datastore; + TEST_CASE("SnapshotPath::parse", "[silkworm][node][snapshot]") { SECTION("invalid") { static constexpr std::string_view kInvalidFilenames[]{ diff --git a/silkworm/db/datastore/snapshots/schema.cpp b/silkworm/db/datastore/snapshots/schema.cpp index 6338dd4444..54f36323a3 100644 --- a/silkworm/db/datastore/snapshots/schema.cpp +++ b/silkworm/db/datastore/snapshots/schema.cpp @@ -23,7 +23,7 @@ namespace silkworm::snapshots { SnapshotPath Schema::SnapshotFileDef::make_path( const std::filesystem::path& dir_path, - StepRange range) const { + datastore::StepRange range) const { auto filename_format = sub_dir_name() ? SnapshotPath::FilenameFormat::kE3 : SnapshotPath::FilenameFormat::kE2; return SnapshotPath::make(dir_path, sub_dir_name(), filename_format, kSnapshotV1, range, tag(), file_ext()); } diff --git a/silkworm/db/datastore/snapshots/schema.hpp b/silkworm/db/datastore/snapshots/schema.hpp index b1a932e696..09ca15c87f 100644 --- a/silkworm/db/datastore/snapshots/schema.hpp +++ b/silkworm/db/datastore/snapshots/schema.hpp @@ -56,7 +56,7 @@ class Schema { return *this; } - SnapshotPath make_path(const std::filesystem::path& dir_path, StepRange range) const; + SnapshotPath make_path(const std::filesystem::path& dir_path, datastore::StepRange range) const; Format format() const { return format_; } const std::optional& sub_dir_name() const { return sub_dir_name_; } diff --git a/silkworm/db/datastore/snapshots/segment/kv_segment_test.cpp b/silkworm/db/datastore/snapshots/segment/kv_segment_test.cpp index fc4b7171e0..df89118eba 100644 --- a/silkworm/db/datastore/snapshots/segment/kv_segment_test.cpp +++ b/silkworm/db/datastore/snapshots/segment/kv_segment_test.cpp @@ -42,6 +42,7 @@ struct CharCodec : public Encoder, public Decoder { }; TEST_CASE("KVSegmentFile") { + using namespace datastore; TemporaryDirectory tmp_dir; auto path = SnapshotPath::make(tmp_dir.path(), std::nullopt, SnapshotPath::FilenameFormat::kE2, kSnapshotV1, StepRange{Step{0}, Step{1}}, "headers", ".seg"); static constexpr seg::CompressionKind kCompressionKind = seg::CompressionKind::kKeys; diff --git a/silkworm/db/datastore/snapshots/segment/segment_test.cpp b/silkworm/db/datastore/snapshots/segment/segment_test.cpp index 2078797860..d6d96eaab2 100644 --- a/silkworm/db/datastore/snapshots/segment/segment_test.cpp +++ b/silkworm/db/datastore/snapshots/segment/segment_test.cpp @@ -25,6 +25,7 @@ namespace silkworm::snapshots::segment { TEST_CASE("SegmentFile") { + using namespace datastore; TemporaryDirectory tmp_dir; auto path = SnapshotPath::make(tmp_dir.path(), std::nullopt, SnapshotPath::FilenameFormat::kE2, kSnapshotV1, StepRange{Step{0}, Step{1}}, "headers", ".seg"); diff --git a/silkworm/db/datastore/snapshots/snapshot_bundle.cpp b/silkworm/db/datastore/snapshots/snapshot_bundle.cpp index 01521d00fd..65d03bf571 100644 --- a/silkworm/db/datastore/snapshots/snapshot_bundle.cpp +++ b/silkworm/db/datastore/snapshots/snapshot_bundle.cpp @@ -22,6 +22,7 @@ namespace silkworm::snapshots { using namespace rec_split; using namespace segment; +using namespace datastore; static std::map make_snapshot_paths( Schema::SnapshotFileDef::Format format, diff --git a/silkworm/db/datastore/snapshots/snapshot_bundle.hpp b/silkworm/db/datastore/snapshots/snapshot_bundle.hpp index cc4621c181..a2124c8b3d 100644 --- a/silkworm/db/datastore/snapshots/snapshot_bundle.hpp +++ b/silkworm/db/datastore/snapshots/snapshot_bundle.hpp @@ -50,9 +50,11 @@ struct SnapshotBundleData { SnapshotBundleData open_bundle_data( const Schema::RepositoryDef& schema, const std::filesystem::path& dir_path, - StepRange step_range); + datastore::StepRange step_range); struct SnapshotBundlePaths { + using StepRange = datastore::StepRange; + SnapshotBundlePaths( Schema::RepositoryDef schema, std::filesystem::path dir_path, @@ -74,6 +76,8 @@ struct SnapshotBundlePaths { }; struct SnapshotBundle { + using StepRange = datastore::StepRange; + SnapshotBundle(StepRange step_range, SnapshotBundleData data) : step_range_{step_range}, data_{std::move(data)} { diff --git a/silkworm/db/datastore/snapshots/snapshot_repository.cpp b/silkworm/db/datastore/snapshots/snapshot_repository.cpp index 00db030b9f..469689a1aa 100644 --- a/silkworm/db/datastore/snapshots/snapshot_repository.cpp +++ b/silkworm/db/datastore/snapshots/snapshot_repository.cpp @@ -26,6 +26,7 @@ namespace silkworm::snapshots { namespace fs = std::filesystem; +using namespace datastore; SnapshotRepository::SnapshotRepository( std::filesystem::path dir_path, diff --git a/silkworm/db/datastore/snapshots/snapshot_repository.hpp b/silkworm/db/datastore/snapshots/snapshot_repository.hpp index 3ade1d7815..7ccc070508 100644 --- a/silkworm/db/datastore/snapshots/snapshot_repository.hpp +++ b/silkworm/db/datastore/snapshots/snapshot_repository.hpp @@ -46,11 +46,15 @@ struct IndexBuilder; //! - segments have [from:to) semantic class SnapshotRepository { public: + using Timestamp = datastore::Timestamp; + using Step = datastore::Step; + using StepRange = datastore::StepRange; + SnapshotRepository( std::filesystem::path dir_path, bool open, Schema::RepositoryDef schema, - std::unique_ptr step_converter, + std::unique_ptr step_converter, std::unique_ptr index_builders_factory); SnapshotRepository(SnapshotRepository&&) = default; @@ -128,7 +132,7 @@ class SnapshotRepository { Schema::RepositoryDef schema_; //! Converts timestamp units to steps - std::unique_ptr step_converter_; + std::unique_ptr step_converter_; //! Creates index builders std::unique_ptr index_builders_factory_; diff --git a/silkworm/db/snapshot_sync.cpp b/silkworm/db/snapshot_sync.cpp index 3943b54b63..841cae3ccd 100644 --- a/silkworm/db/snapshot_sync.cpp +++ b/silkworm/db/snapshot_sync.cpp @@ -108,7 +108,7 @@ Task SnapshotSync::setup_and_run() { co_return; } - [[maybe_unused]] auto snapshot_merged_subscription = snapshot_merger_.on_snapshot_merged([this](StepRange range) { + [[maybe_unused]] auto snapshot_merged_subscription = snapshot_merger_.on_snapshot_merged([this](datastore::StepRange range) { this->seed_frozen_bundle(range); }); @@ -294,7 +294,7 @@ void SnapshotSync::seed_frozen_local_snapshots() { } } -void SnapshotSync::seed_frozen_bundle(StepRange range) { +void SnapshotSync::seed_frozen_bundle(datastore::StepRange range) { bool is_frozen = range.size() >= kMaxMergerSnapshotSize; auto bundle = blocks_repository().find_bundle(range.start); if (bundle && (bundle->step_range() == range) && is_frozen) { diff --git a/silkworm/db/snapshot_sync.hpp b/silkworm/db/snapshot_sync.hpp index 6240387298..260339ee2d 100644 --- a/silkworm/db/snapshot_sync.hpp +++ b/silkworm/db/snapshot_sync.hpp @@ -67,7 +67,7 @@ class SnapshotSync { Task build_missing_indexes(); void seed_frozen_local_snapshots(); - void seed_frozen_bundle(snapshots::StepRange range); + void seed_frozen_bundle(datastore::StepRange range); void seed_bundle(snapshots::SnapshotBundle& bundle); void seed_snapshot(const snapshots::SnapshotPath& path); diff --git a/silkworm/db/snapshot_sync_test.cpp b/silkworm/db/snapshot_sync_test.cpp index a1f07af7ea..008e0ef509 100644 --- a/silkworm/db/snapshot_sync_test.cpp +++ b/silkworm/db/snapshot_sync_test.cpp @@ -132,7 +132,7 @@ TEST_CASE("SnapshotSync::update_block_headers", "[db][snapshot][sync]") { REQUIRE_NOTHROW(TransactionToBlockIndex::make(body_segment_path, txn_segment_path, txn_segment_file.block_num_range().start).build()); // Add a sample Snapshot bundle to the repository - auto step_range = StepRange::from_block_num_range(snapshots::test_util::kSampleSnapshotBlockRange); + auto step_range = datastore::StepRange::from_block_num_range(snapshots::test_util::kSampleSnapshotBlockRange); SnapshotBundle bundle{ step_range, open_bundle_data(blocks::make_blocks_repository_schema(), tmp_dir_path, step_range), diff --git a/silkworm/db/state/schema_config.cpp b/silkworm/db/state/schema_config.cpp index affaa08dd4..c4e9f22dc0 100644 --- a/silkworm/db/state/schema_config.cpp +++ b/silkworm/db/state/schema_config.cpp @@ -73,7 +73,7 @@ snapshots::SnapshotRepository make_state_repository(std::filesystem::path dir_pa std::move(dir_path), open, make_state_repository_schema(), - std::make_unique(), + std::make_unique(), make_state_index_builders_factory(), }; } From fef4e9b2e1d4d1e46e9928d0187cce0f5471f7ec Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Thu, 19 Dec 2024 16:19:05 +0100 Subject: [PATCH 45/48] move codecs to address_codecs, account_codecs, storage_codecs --- silkworm/db/state/account_codecs.hpp | 42 +++++++++++++++ silkworm/db/state/accounts_domain.hpp | 21 ++------ ...address_decoder.hpp => address_codecs.hpp} | 0 ...coder_test.cpp => address_codecs_test.cpp} | 2 +- silkworm/db/state/code_domain.hpp | 2 +- .../db/state/log_address_inverted_index.hpp | 2 +- silkworm/db/state/storage_codecs.hpp | 53 +++++++++++++++++++ silkworm/db/state/storage_domain.hpp | 33 +----------- .../db/state/traces_from_inverted_index.hpp | 2 +- .../db/state/traces_to_inverted_index.hpp | 2 +- 10 files changed, 105 insertions(+), 54 deletions(-) create mode 100644 silkworm/db/state/account_codecs.hpp rename silkworm/db/state/{address_decoder.hpp => address_codecs.hpp} (100%) rename silkworm/db/state/{address_decoder_test.cpp => address_codecs_test.cpp} (97%) create mode 100644 silkworm/db/state/storage_codecs.hpp diff --git a/silkworm/db/state/account_codecs.hpp b/silkworm/db/state/account_codecs.hpp new file mode 100644 index 0000000000..0b7704a002 --- /dev/null +++ b/silkworm/db/state/account_codecs.hpp @@ -0,0 +1,42 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include + +#include "silkworm/db/util.hpp" + +namespace silkworm::db::state { + +struct AccountDecoder : public snapshots::Decoder { + Account value; + + ~AccountDecoder() override = default; + + void decode_word(ByteView word) override { + auto account = Account::from_encoded_storage_v3(word); + if (!account) + throw DecodingException{account.error(), "AccountDecoder failed to decode Account"}; + value = std::move(*account); + } +}; + +static_assert(snapshots::DecoderConcept); + +} // namespace silkworm::db::state diff --git a/silkworm/db/state/accounts_domain.hpp b/silkworm/db/state/accounts_domain.hpp index 6fecd7e66b..52959d1d2b 100644 --- a/silkworm/db/state/accounts_domain.hpp +++ b/silkworm/db/state/accounts_domain.hpp @@ -16,29 +16,14 @@ #pragma once -#include +#include #include -#include -#include "address_decoder.hpp" +#include "account_codecs.hpp" +#include "address_codecs.hpp" namespace silkworm::db::state { -struct AccountDecoder : public snapshots::Decoder { - Account value; - - ~AccountDecoder() override = default; - - void decode_word(ByteView word) override { - auto account = Account::from_encoded_storage_v3(word); - if (!account) - throw DecodingException{account.error(), "AccountDecoder failed to decode Account"}; - value = std::move(*account); - } -}; - -static_assert(snapshots::DecoderConcept); - using AccountsDomainKVSegmentReader = snapshots::segment::KVSegmentReader; } // namespace silkworm::db::state diff --git a/silkworm/db/state/address_decoder.hpp b/silkworm/db/state/address_codecs.hpp similarity index 100% rename from silkworm/db/state/address_decoder.hpp rename to silkworm/db/state/address_codecs.hpp diff --git a/silkworm/db/state/address_decoder_test.cpp b/silkworm/db/state/address_codecs_test.cpp similarity index 97% rename from silkworm/db/state/address_decoder_test.cpp rename to silkworm/db/state/address_codecs_test.cpp index 6f7d0cca18..1cfa562f08 100644 --- a/silkworm/db/state/address_decoder_test.cpp +++ b/silkworm/db/state/address_codecs_test.cpp @@ -14,7 +14,7 @@ limitations under the License. */ -#include "address_decoder.hpp" +#include "address_codecs.hpp" #include diff --git a/silkworm/db/state/code_domain.hpp b/silkworm/db/state/code_domain.hpp index 3202610503..d56ffd3b20 100644 --- a/silkworm/db/state/code_domain.hpp +++ b/silkworm/db/state/code_domain.hpp @@ -19,7 +19,7 @@ #include #include -#include "address_decoder.hpp" +#include "address_codecs.hpp" namespace silkworm::db::state { diff --git a/silkworm/db/state/log_address_inverted_index.hpp b/silkworm/db/state/log_address_inverted_index.hpp index 6b7a1c4e4d..f80299d014 100644 --- a/silkworm/db/state/log_address_inverted_index.hpp +++ b/silkworm/db/state/log_address_inverted_index.hpp @@ -19,7 +19,7 @@ #include #include -#include "address_decoder.hpp" +#include "address_codecs.hpp" namespace silkworm::db::state { diff --git a/silkworm/db/state/storage_codecs.hpp b/silkworm/db/state/storage_codecs.hpp new file mode 100644 index 0000000000..638aa5bc73 --- /dev/null +++ b/silkworm/db/state/storage_codecs.hpp @@ -0,0 +1,53 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include + +#include "address_codecs.hpp" + +namespace silkworm::db::state { + +struct Bytes32Decoder : public snapshots::Decoder { + evmc::bytes32 value; + ~Bytes32Decoder() override = default; + void decode_word(ByteView word) override { + if (word.size() < sizeof(value.bytes)) + throw std::runtime_error{"Bytes32Decoder failed to decode"}; + std::memcpy(value.bytes, word.data(), sizeof(value.bytes)); + } +}; + +static_assert(snapshots::DecoderConcept); + +struct StorageAddressAndLocationDecoder : public snapshots::Decoder { + struct { + AddressDecoder address; + Bytes32Decoder location_hash; + } value; + + ~StorageAddressAndLocationDecoder() override = default; + + void decode_word(ByteView word) override { + value.address.decode_word(word); + value.location_hash.decode_word(word.substr(kAddressLength)); + } +}; + +static_assert(snapshots::DecoderConcept); + +} // namespace silkworm::db::state diff --git a/silkworm/db/state/storage_domain.hpp b/silkworm/db/state/storage_domain.hpp index 151241ce23..d43a7a1fa1 100644 --- a/silkworm/db/state/storage_domain.hpp +++ b/silkworm/db/state/storage_domain.hpp @@ -16,42 +16,13 @@ #pragma once -#include - +#include #include -#include "address_decoder.hpp" +#include "storage_codecs.hpp" namespace silkworm::db::state { -struct Bytes32Decoder : public snapshots::Decoder { - evmc::bytes32 value; - ~Bytes32Decoder() override = default; - void decode_word(ByteView word) override { - if (word.size() < sizeof(value.bytes)) - throw std::runtime_error{"Bytes32Decoder failed to decode"}; - std::memcpy(value.bytes, word.data(), sizeof(value.bytes)); - } -}; - -static_assert(snapshots::DecoderConcept); - -struct StorageAddressAndLocationDecoder : public snapshots::Decoder { - struct { - AddressDecoder address; - Bytes32Decoder location_hash; - } value; - - ~StorageAddressAndLocationDecoder() override = default; - - void decode_word(ByteView word) override { - value.address.decode_word(word); - value.location_hash.decode_word(word.substr(kAddressLength)); - } -}; - -static_assert(snapshots::DecoderConcept); - using StorageDomainKVSegmentReader = snapshots::segment::KVSegmentReader; } // namespace silkworm::db::state diff --git a/silkworm/db/state/traces_from_inverted_index.hpp b/silkworm/db/state/traces_from_inverted_index.hpp index 00d3be550d..5c1de4f0b1 100644 --- a/silkworm/db/state/traces_from_inverted_index.hpp +++ b/silkworm/db/state/traces_from_inverted_index.hpp @@ -19,7 +19,7 @@ #include #include -#include "address_decoder.hpp" +#include "address_codecs.hpp" namespace silkworm::db::state { diff --git a/silkworm/db/state/traces_to_inverted_index.hpp b/silkworm/db/state/traces_to_inverted_index.hpp index 4592b62d32..676a415569 100644 --- a/silkworm/db/state/traces_to_inverted_index.hpp +++ b/silkworm/db/state/traces_to_inverted_index.hpp @@ -19,7 +19,7 @@ #include #include -#include "address_decoder.hpp" +#include "address_codecs.hpp" namespace silkworm::db::state { From aef4bc1a1c62c6fb85dec6186aeb1aa2fd417eca Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Mon, 23 Dec 2024 15:20:04 +0100 Subject: [PATCH 46/48] AccountCodec --- silkworm/core/types/account.cpp | 216 ---------------- silkworm/core/types/account.hpp | 21 +- silkworm/db/access_layer.cpp | 5 +- silkworm/db/access_layer_test.cpp | 3 +- silkworm/db/buffer.cpp | 16 +- silkworm/db/buffer_test.cpp | 8 +- silkworm/db/genesis.cpp | 3 +- silkworm/db/kv/state_reader.cpp | 3 +- silkworm/db/state/account_codec.cpp | 236 ++++++++++++++++++ silkworm/db/state/account_codec.hpp | 54 ++++ .../state/account_codec_test.cpp} | 42 ++-- silkworm/db/state/account_codecs.hpp | 3 +- .../stagedsync/stages/stage_execution.cpp | 7 +- .../stagedsync/stages/stage_hashstate.cpp | 6 +- .../stagedsync/stages/stage_interhashes.cpp | 8 +- .../stages/stage_interhashes/_test.cpp | 26 +- .../stages/stage_interhashes/trie_loader.cpp | 3 +- silkworm/node/stagedsync/stages_test.cpp | 12 +- silkworm/rpc/commands/debug_api.cpp | 3 +- silkworm/rpc/commands/ots_api.cpp | 7 +- silkworm/rpc/core/account_dumper.cpp | 3 +- silkworm/rpc/core/block_reader.cpp | 3 +- 22 files changed, 384 insertions(+), 304 deletions(-) create mode 100644 silkworm/db/state/account_codec.cpp create mode 100644 silkworm/db/state/account_codec.hpp rename silkworm/{core/types/account_test.cpp => db/state/account_codec_test.cpp} (69%) diff --git a/silkworm/core/types/account.cpp b/silkworm/core/types/account.cpp index 0fd1dc8fe6..640d023e1f 100644 --- a/silkworm/core/types/account.cpp +++ b/silkworm/core/types/account.cpp @@ -16,226 +16,10 @@ #include "account.hpp" -#include -#include #include -#include namespace silkworm { -Bytes Account::encode_for_storage(bool omit_code_hash) const { - Bytes res(1, '\0'); - uint8_t field_set{0}; - - if (nonce != 0) { - field_set |= 1; - auto be{endian::to_big_compact(nonce)}; - res.push_back(static_cast(be.length())); - res.append(be); - } - - if (balance != 0) { - field_set |= 2; - auto be{endian::to_big_compact(balance)}; - res.push_back(static_cast(be.length())); - res.append(be); - } - - if (incarnation != 0) { - field_set |= 4; - auto be{endian::to_big_compact(incarnation)}; - res.push_back(static_cast(be.length())); - res.append(be); - } - - if (code_hash != kEmptyHash && !omit_code_hash) { - field_set |= 8; - res.push_back(kHashLength); - res.append(code_hash.bytes, kHashLength); - } - - res[0] = field_set; - return res; -} - -size_t Account::encoding_length_for_storage() const { - size_t len{1}; - - if (nonce != 0) { - auto be{endian::to_big_compact(nonce)}; - len += 1 + be.length(); - } - - if (balance != 0) { - auto be{endian::to_big_compact(balance)}; - len += 1 + be.length(); - } - - if (incarnation != 0) { - auto be{endian::to_big_compact(incarnation)}; - len += 1 + be.length(); - } - - if (code_hash != kEmptyHash) { - len += 1 + kHashLength; - } - - return len; -} - -static tl::expected validate_encoded_head(ByteView& encoded_payload) noexcept { - if (encoded_payload.empty()) { - return 0; - } - if (encoded_payload[0] && encoded_payload.length() == 1) { - // Must be at least 2 bytes : field_set + len of payload - return tl::unexpected{DecodingError::kInputTooShort}; - } - if (encoded_payload[0] > 15) { - // Can only be at max 1 | 2 | 4 | 8 - return tl::unexpected{DecodingError::kInvalidFieldset}; - } - - return encoded_payload[0]; -} - -tl::expected Account::from_encoded_storage(ByteView encoded_payload) noexcept { - const tl::expected field_set{validate_encoded_head(encoded_payload)}; - if (!field_set) { - return tl::unexpected{field_set.error()}; - } - Account a; - if (field_set == 0) { - return a; - } - - size_t pos{1}; - for (int i{1}; i < 16; i *= 2) { - if (*field_set & i) { - uint8_t len = encoded_payload[pos++]; - if (encoded_payload.length() < pos + len) { - return tl::unexpected{DecodingError::kInputTooShort}; - } - const auto encoded_value{encoded_payload.substr(pos, len)}; - switch (i) { - case 1: - if (DecodingResult res{endian::from_big_compact(encoded_value, a.nonce)}; !res) { - return tl::unexpected{res.error()}; - } - break; - case 2: - if (DecodingResult res{endian::from_big_compact(encoded_value, a.balance)}; !res) { - return tl::unexpected{res.error()}; - } - break; - case 4: - if (DecodingResult res{endian::from_big_compact(encoded_value, a.incarnation)}; !res) { - return tl::unexpected{res.error()}; - } - break; - case 8: - if (len != kHashLength) { - return tl::unexpected{DecodingError::kUnexpectedLength}; - } - std::memcpy(a.code_hash.bytes, &encoded_value[0], kHashLength); - break; - default: - intx::unreachable(); - } - pos += len; - } - } - - return a; -} - -tl::expected Account::from_encoded_storage_v3(ByteView encoded_payload) noexcept { - Account a; - if (encoded_payload.empty()) { - return a; - } - size_t pos{0}; - for (int i{0}; i < 4; ++i) { - uint8_t len = encoded_payload[pos++]; - if (len == 0) { - if (encoded_payload.length() == pos && i < 3) { - return tl::unexpected{DecodingError::kUnexpectedLength}; - } - continue; - } - if (encoded_payload.length() < pos + len) { - return tl::unexpected{DecodingError::kInputTooShort}; - } - const auto encoded_value{encoded_payload.substr(pos, len)}; - switch (i) { - case 0: - if (DecodingResult res{endian::from_big_compact(encoded_value, a.nonce)}; !res) { - return tl::unexpected{res.error()}; - } - break; - case 1: - if (DecodingResult res{endian::from_big_compact(encoded_value, a.balance)}; !res) { - return tl::unexpected{res.error()}; - } - break; - case 2: - if (len != kHashLength) { - return tl::unexpected{DecodingError::kUnexpectedLength}; - } - std::memcpy(a.code_hash.bytes, encoded_value.data(), kHashLength); - break; - case 3: - if (DecodingResult res{endian::from_big_compact(encoded_value, a.incarnation)}; !res) { - return tl::unexpected{res.error()}; - } - break; - default: - intx::unreachable(); - } - pos += len; - if (pos >= encoded_payload.length() && i < 3) { - return tl::unexpected{DecodingError::kInputTooShort}; - } - } - - return a; -} - -tl::expected Account::incarnation_from_encoded_storage(ByteView encoded_payload) noexcept { - const tl::expected field_set{validate_encoded_head(encoded_payload)}; - if (!field_set) { - return tl::unexpected{field_set.error()}; - } - if (!(*field_set & /*incarnation mask*/ 4)) { - return 0; - } - - size_t pos{1}; - uint64_t incarnation{0}; - for (int i{1}; i < 8; i *= 2) { - if (*field_set & i) { - uint8_t len = encoded_payload[pos++]; - if (encoded_payload.length() < pos + len) { - return tl::unexpected{DecodingError::kInputTooShort}; - } - switch (i) { - case 1: - case 2: - break; - case 4: - if (DecodingResult res{endian::from_big_compact(encoded_payload.substr(pos, len), incarnation)}; !res) { - return tl::unexpected{res.error()}; - } - return incarnation; - default: - intx::unreachable(); - } - pos += len; - } - } - intx::unreachable(); -} - Bytes Account::rlp(const evmc::bytes32& storage_root) const { rlp::Header h{true, 0}; h.payload_length += rlp::length(nonce); diff --git a/silkworm/core/types/account.hpp b/silkworm/core/types/account.hpp index b623078e8a..306096047d 100644 --- a/silkworm/core/types/account.hpp +++ b/silkworm/core/types/account.hpp @@ -19,8 +19,8 @@ #include #include -#include #include +#include namespace silkworm { @@ -36,28 +36,9 @@ struct Account { uint64_t incarnation{0}; uint64_t previous_incarnation{0}; - //! \brief Encode the account into its binary representation for data storage - //! \remarks Erigon (*Account)EncodeForStorage - Bytes encode_for_storage(bool omit_code_hash = false) const; - - //! \brief Compute the length of the account binary representation for data storage - //! \remarks Erigon (*Account)EncodingLengthForStorage - size_t encoding_length_for_storage() const; - //! \brief Serialize the account into its Recursive-Length Prefix (RLP) representation Bytes rlp(const evmc::bytes32& storage_root) const; - //! \brief Decode an Account from its binary representation for data storage - static tl::expected from_encoded_storage(ByteView encoded_payload) noexcept; - - //! \brief Decode an Account from its binary representation for data storage in E3 data format - static tl::expected from_encoded_storage_v3(ByteView encoded_payload) noexcept; - - //! \brief Return an Account Incarnation from its binary representation for data storage - //! \remarks Similar to from_encoded_storage but faster as it parses only incarnation - static tl::expected incarnation_from_encoded_storage( - ByteView encoded_payload) noexcept; - friend bool operator==(const Account&, const Account&) = default; }; diff --git a/silkworm/db/access_layer.cpp b/silkworm/db/access_layer.cpp index cf50a48502..da926a3c42 100644 --- a/silkworm/db/access_layer.cpp +++ b/silkworm/db/access_layer.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -744,7 +745,7 @@ std::optional read_account(ROTxn& txn, const evmc::address& address, st return std::nullopt; } - const auto acc_res{Account::from_encoded_storage(encoded.value())}; + const auto acc_res = state::AccountCodec::from_encoded_storage(encoded.value()); success_or_throw(acc_res); Account acc{*acc_res}; @@ -787,7 +788,7 @@ static std::optional historical_previous_incarnation(ROTxn& txn, const if (!encoded_account) { return std::nullopt; } - const auto acc_result{Account::from_encoded_storage(encoded_account.value())}; + const auto acc_result = state::AccountCodec::from_encoded_storage(encoded_account.value()); success_or_throw(acc_result); Account account{*acc_result}; const uint64_t previous_incarnation{account.incarnation > 0 ? account.incarnation - 1 : 0}; diff --git a/silkworm/db/access_layer_test.cpp b/silkworm/db/access_layer_test.cpp index d1b1e2168f..24aea8d831 100644 --- a/silkworm/db/access_layer_test.cpp +++ b/silkworm/db/access_layer_test.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -571,7 +572,7 @@ TEST_CASE("Account history", "[db][access_layer]") { // Account change set for block_num Bytes acs_key{block_key(block_num)}; Bytes acs_data{ByteView{account_address}}; - acs_data.append(account.encode_for_storage()); + acs_data.append(state::AccountCodec::encode_for_storage(account)); acs_cursor->upsert(to_slice(acs_key), to_slice(acs_data)); Bytes ah_key{account_history_key(account_address, UINT64_MAX)}; diff --git a/silkworm/db/buffer.cpp b/silkworm/db/buffer.cpp index aa58c868ef..bc5070ccd9 100644 --- a/silkworm/db/buffer.cpp +++ b/silkworm/db/buffer.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -87,23 +88,26 @@ void Buffer::update_account(const evmc::address& address, std::optional Bytes encoded_initial{}; if (initial) { bool omit_code_hash{!account_deleted}; - encoded_initial = initial->encode_for_storage(omit_code_hash); + encoded_initial = state::AccountCodec::encode_for_storage(*initial, omit_code_hash); } block_account_changes_[block_num_].insert_or_assign(address, encoded_initial); } + size_t encoding_length_for_storage = current ? state::AccountCodec::encoding_length_for_storage(*current) : 0; + if (equal) { - batch_state_size_ += kAddressLength + (current ? current->encoding_length_for_storage() : 0); + batch_state_size_ += kAddressLength + encoding_length_for_storage; return; } + auto it{accounts_.find(address)}; if (it != accounts_.end()) { - batch_state_size_ -= it->second.has_value() ? it->second->encoding_length_for_storage() : 0; - batch_state_size_ += (current ? current->encoding_length_for_storage() : 0); + batch_state_size_ -= it->second.has_value() ? state::AccountCodec::encoding_length_for_storage(*it->second) : 0; + batch_state_size_ += encoding_length_for_storage; it->second = current; } else { - batch_state_size_ += kAddressLength + (current ? current->encoding_length_for_storage() : 0); + batch_state_size_ += kAddressLength + encoding_length_for_storage; accounts_[address] = current; } @@ -365,7 +369,7 @@ void Buffer::write_state_to_db() { auto key{to_slice(address)}; state_table->erase(key, /*whole_multivalue=*/true); // PlainState is multivalue if (it->second.has_value()) { - Bytes encoded{it->second->encode_for_storage()}; + Bytes encoded = state::AccountCodec::encode_for_storage(*it->second); state_table->upsert(key, to_slice(encoded)); written_size += kAddressLength + encoded.length(); } diff --git a/silkworm/db/buffer_test.cpp b/silkworm/db/buffer_test.cpp index 1917c38f13..2b2533fe99 100644 --- a/silkworm/db/buffer_test.cpp +++ b/silkworm/db/buffer_test.cpp @@ -26,6 +26,8 @@ #include #include +#include "state/account_codec.hpp" + namespace silkworm::db { TEST_CASE("Buffer storage", "[silkworm][db][buffer]") { @@ -245,7 +247,7 @@ TEST_CASE("Buffer account", "[silkworm][db][buffer]") { SECTION("New EOA account") { const evmc::address address{0xbe00000000000000000000000000000000000000_address}; - Account current_account; + state::AccountEncodable current_account; current_account.balance = kEther; Buffer buffer{txn, std::make_unique(txn)}; @@ -277,7 +279,7 @@ TEST_CASE("Buffer account", "[silkworm][db][buffer]") { initial_account.nonce = 1; initial_account.balance = 0; - Account current_account; + state::AccountEncodable current_account; current_account.nonce = 2; current_account.balance = kEther; @@ -303,7 +305,7 @@ TEST_CASE("Buffer account", "[silkworm][db][buffer]") { data_value_view.remove_prefix(kAddressLength); REQUIRE(!data_value_view.empty()); - auto previous_account{Account::from_encoded_storage(data_value_view)}; + auto previous_account = state::AccountCodec::from_encoded_storage(data_value_view); CHECK(previous_account == initial_account); } diff --git a/silkworm/db/genesis.cpp b/silkworm/db/genesis.cpp index 48cb010af8..43453c8d18 100644 --- a/silkworm/db/genesis.cpp +++ b/silkworm/db/genesis.cpp @@ -23,6 +23,7 @@ #include #include +#include "state/account_codec.hpp" #include "tables.hpp" namespace silkworm::db { @@ -121,7 +122,7 @@ void write_genesis_allocation_to_db(RWTxn& txn, const InMemoryState& genesis_all auto code_table{open_cursor(txn, table::kCode)}; for (const auto& [address, account] : genesis_allocation.accounts()) { // Store account plain state - Bytes encoded{account.encode_for_storage()}; + Bytes encoded = state::AccountCodec::encode_for_storage(account); state_table->upsert(to_slice(address), to_slice(encoded)); // Store code diff --git a/silkworm/db/kv/state_reader.cpp b/silkworm/db/kv/state_reader.cpp index e3c0d92a20..622ec7537b 100644 --- a/silkworm/db/kv/state_reader.cpp +++ b/silkworm/db/kv/state_reader.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -40,7 +41,7 @@ Task> StateReader::read_account(const evmc::address& addr co_return std::nullopt; } - const auto account{Account::from_encoded_storage_v3(result.value)}; + const auto account = db::state::AccountCodec::from_encoded_storage_v3(result.value); success_or_throw(account); co_return *account; } diff --git a/silkworm/db/state/account_codec.cpp b/silkworm/db/state/account_codec.cpp new file mode 100644 index 0000000000..55bd684f48 --- /dev/null +++ b/silkworm/db/state/account_codec.cpp @@ -0,0 +1,236 @@ +/* + Copyright 2022 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "account_codec.hpp" + +#include + +namespace silkworm::db::state { + +Bytes AccountCodec::encode_for_storage(const Account& account, bool omit_code_hash) { + Bytes res(1, '\0'); + uint8_t field_set{0}; + + if (account.nonce != 0) { + field_set |= 1; + auto be{endian::to_big_compact(account.nonce)}; + res.push_back(static_cast(be.length())); + res.append(be); + } + + if (account.balance != 0) { + field_set |= 2; + auto be{endian::to_big_compact(account.balance)}; + res.push_back(static_cast(be.length())); + res.append(be); + } + + if (account.incarnation != 0) { + field_set |= 4; + auto be{endian::to_big_compact(account.incarnation)}; + res.push_back(static_cast(be.length())); + res.append(be); + } + + if (account.code_hash != kEmptyHash && !omit_code_hash) { + field_set |= 8; + res.push_back(kHashLength); + res.append(account.code_hash.bytes, kHashLength); + } + + res[0] = field_set; + return res; +} + +size_t AccountCodec::encoding_length_for_storage(const Account& account) { + size_t len{1}; + + if (account.nonce != 0) { + auto be{endian::to_big_compact(account.nonce)}; + len += 1 + be.length(); + } + + if (account.balance != 0) { + auto be{endian::to_big_compact(account.balance)}; + len += 1 + be.length(); + } + + if (account.incarnation != 0) { + auto be{endian::to_big_compact(account.incarnation)}; + len += 1 + be.length(); + } + + if (account.code_hash != kEmptyHash) { + len += 1 + kHashLength; + } + + return len; +} + +static tl::expected validate_encoded_head(ByteView& encoded_payload) noexcept { + if (encoded_payload.empty()) { + return 0; + } + if (encoded_payload[0] && encoded_payload.length() == 1) { + // Must be at least 2 bytes : field_set + len of payload + return tl::unexpected{DecodingError::kInputTooShort}; + } + if (encoded_payload[0] > 15) { + // Can only be at max 1 | 2 | 4 | 8 + return tl::unexpected{DecodingError::kInvalidFieldset}; + } + + return encoded_payload[0]; +} + +tl::expected AccountCodec::from_encoded_storage(ByteView encoded_payload) noexcept { + const tl::expected field_set{validate_encoded_head(encoded_payload)}; + if (!field_set) { + return tl::unexpected{field_set.error()}; + } + Account a; + if (field_set == 0) { + return a; + } + + size_t pos{1}; + for (int i{1}; i < 16; i *= 2) { + if (*field_set & i) { + uint8_t len = encoded_payload[pos++]; + if (encoded_payload.length() < pos + len) { + return tl::unexpected{DecodingError::kInputTooShort}; + } + const auto encoded_value{encoded_payload.substr(pos, len)}; + switch (i) { + case 1: + if (DecodingResult res{endian::from_big_compact(encoded_value, a.nonce)}; !res) { + return tl::unexpected{res.error()}; + } + break; + case 2: + if (DecodingResult res{endian::from_big_compact(encoded_value, a.balance)}; !res) { + return tl::unexpected{res.error()}; + } + break; + case 4: + if (DecodingResult res{endian::from_big_compact(encoded_value, a.incarnation)}; !res) { + return tl::unexpected{res.error()}; + } + break; + case 8: + if (len != kHashLength) { + return tl::unexpected{DecodingError::kUnexpectedLength}; + } + std::memcpy(a.code_hash.bytes, &encoded_value[0], kHashLength); + break; + default: + intx::unreachable(); + } + pos += len; + } + } + + return a; +} + +tl::expected AccountCodec::from_encoded_storage_v3(ByteView encoded_payload) noexcept { + Account a; + if (encoded_payload.empty()) { + return a; + } + size_t pos{0}; + for (int i{0}; i < 4; ++i) { + uint8_t len = encoded_payload[pos++]; + if (len == 0) { + if (encoded_payload.length() == pos && i < 3) { + return tl::unexpected{DecodingError::kUnexpectedLength}; + } + continue; + } + if (encoded_payload.length() < pos + len) { + return tl::unexpected{DecodingError::kInputTooShort}; + } + const auto encoded_value{encoded_payload.substr(pos, len)}; + switch (i) { + case 0: + if (DecodingResult res{endian::from_big_compact(encoded_value, a.nonce)}; !res) { + return tl::unexpected{res.error()}; + } + break; + case 1: + if (DecodingResult res{endian::from_big_compact(encoded_value, a.balance)}; !res) { + return tl::unexpected{res.error()}; + } + break; + case 2: + if (len != kHashLength) { + return tl::unexpected{DecodingError::kUnexpectedLength}; + } + std::memcpy(a.code_hash.bytes, encoded_value.data(), kHashLength); + break; + case 3: + if (DecodingResult res{endian::from_big_compact(encoded_value, a.incarnation)}; !res) { + return tl::unexpected{res.error()}; + } + break; + default: + intx::unreachable(); + } + pos += len; + if (pos >= encoded_payload.length() && i < 3) { + return tl::unexpected{DecodingError::kInputTooShort}; + } + } + + return a; +} + +tl::expected AccountCodec::incarnation_from_encoded_storage(ByteView encoded_payload) noexcept { + const tl::expected field_set{validate_encoded_head(encoded_payload)}; + if (!field_set) { + return tl::unexpected{field_set.error()}; + } + if (!(*field_set & /*incarnation mask*/ 4)) { + return 0; + } + + size_t pos{1}; + uint64_t incarnation{0}; + for (int i{1}; i < 8; i *= 2) { + if (*field_set & i) { + uint8_t len = encoded_payload[pos++]; + if (encoded_payload.length() < pos + len) { + return tl::unexpected{DecodingError::kInputTooShort}; + } + switch (i) { + case 1: + case 2: + break; + case 4: + if (DecodingResult res{endian::from_big_compact(encoded_payload.substr(pos, len), incarnation)}; !res) { + return tl::unexpected{res.error()}; + } + return incarnation; + default: + intx::unreachable(); + } + pos += len; + } + } + intx::unreachable(); +} + +} // namespace silkworm::db::state diff --git a/silkworm/db/state/account_codec.hpp b/silkworm/db/state/account_codec.hpp new file mode 100644 index 0000000000..72fb946d18 --- /dev/null +++ b/silkworm/db/state/account_codec.hpp @@ -0,0 +1,54 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include + +namespace silkworm::db::state { + +struct AccountCodec { + //! \brief Encode the account into its binary representation for data storage + //! \remarks Erigon (*Account)EncodeForStorage + static Bytes encode_for_storage(const Account& account, bool omit_code_hash = false); + + //! \brief Compute the length of the account binary representation for data storage + //! \remarks Erigon (*Account)EncodingLengthForStorage + static size_t encoding_length_for_storage(const Account& account); + + //! \brief Decode an Account from its binary representation for data storage + static tl::expected from_encoded_storage(ByteView encoded_payload) noexcept; + + //! \brief Decode an Account from its binary representation for data storage in E3 data format + static tl::expected from_encoded_storage_v3(ByteView encoded_payload) noexcept; + + //! \brief Return an Account Incarnation from its binary representation for data storage + //! \remarks Similar to from_encoded_storage but faster as it parses only incarnation + static tl::expected incarnation_from_encoded_storage( + ByteView encoded_payload) noexcept; +}; + +struct AccountEncodable : public Account { + Bytes encode_for_storage(bool omit_code_hash = false) const { + return AccountCodec::encode_for_storage(*this, omit_code_hash); + } + size_t encoding_length_for_storage() const { + return AccountCodec::encoding_length_for_storage(*this); + } +}; + +} // namespace silkworm::db::state diff --git a/silkworm/core/types/account_test.cpp b/silkworm/db/state/account_codec_test.cpp similarity index 69% rename from silkworm/core/types/account_test.cpp rename to silkworm/db/state/account_codec_test.cpp index 25a55246f0..fabb59a30d 100644 --- a/silkworm/core/types/account_test.cpp +++ b/silkworm/db/state/account_codec_test.cpp @@ -14,18 +14,18 @@ limitations under the License. */ -#include "account.hpp" +#include "account_codec.hpp" #include #include -namespace silkworm { +namespace silkworm::db::state { TEST_CASE("Decode account from storage") { SECTION("Correct payload") { Bytes encoded{*from_hex("0f01020203e8010520f1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c9239")}; - auto decoded{Account::from_encoded_storage(encoded)}; + auto decoded = AccountCodec::from_encoded_storage(encoded); REQUIRE(decoded); CHECK(decoded->nonce == 2); @@ -33,19 +33,19 @@ TEST_CASE("Decode account from storage") { CHECK(decoded->code_hash == 0xf1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c9239_bytes32); CHECK(decoded->incarnation == 5); - CHECK(decoded->encoding_length_for_storage() == encoded.length()); - CHECK(decoded->encode_for_storage() == encoded); + CHECK(AccountCodec::encoding_length_for_storage(*decoded) == encoded.length()); + CHECK(AccountCodec::encode_for_storage(*decoded) == encoded); } SECTION("Correct payload only incarnation") { Bytes encoded{*from_hex("0f01020203e8010520f1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c9239")}; - auto incarnation{Account::incarnation_from_encoded_storage(encoded)}; + auto incarnation = AccountCodec::incarnation_from_encoded_storage(encoded); CHECK(incarnation == 5); } SECTION("Empty payload") { Bytes encoded{}; - auto decoded{Account::from_encoded_storage(encoded)}; + auto decoded = AccountCodec::from_encoded_storage(encoded); REQUIRE(decoded); CHECK(decoded->nonce == 0); @@ -56,39 +56,39 @@ TEST_CASE("Decode account from storage") { SECTION("One zero byte payload") { Bytes encoded{*from_hex("00")}; - CHECK(Account::from_encoded_storage(encoded)); + CHECK(AccountCodec::from_encoded_storage(encoded)); } SECTION("One non-zero byte payload") { Bytes encoded{*from_hex("04")}; - CHECK(Account::from_encoded_storage(encoded) == tl::unexpected{DecodingError::kInputTooShort}); + CHECK(AccountCodec::from_encoded_storage(encoded) == tl::unexpected{DecodingError::kInputTooShort}); } SECTION("One >15 byte head plus 1byte") { Bytes encoded{*from_hex("1e01")}; - CHECK(Account::from_encoded_storage(encoded) == tl::unexpected{DecodingError::kInvalidFieldset}); + CHECK(AccountCodec::from_encoded_storage(encoded) == tl::unexpected{DecodingError::kInvalidFieldset}); } SECTION("Too short payload") { Bytes encoded{*from_hex("0f")}; - CHECK(Account::from_encoded_storage(encoded) == tl::unexpected{DecodingError::kInputTooShort}); + CHECK(AccountCodec::from_encoded_storage(encoded) == tl::unexpected{DecodingError::kInputTooShort}); } SECTION("Wrong nonce payload") { Bytes encoded{*from_hex("01020001")}; - CHECK(Account::from_encoded_storage(encoded) == tl::unexpected{DecodingError::kLeadingZero}); + CHECK(AccountCodec::from_encoded_storage(encoded) == tl::unexpected{DecodingError::kLeadingZero}); } SECTION("Wrong code_hash payload") { Bytes encoded{*from_hex("0x0805c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4")}; - CHECK(Account::from_encoded_storage(encoded) == tl::unexpected{DecodingError::kUnexpectedLength}); + CHECK(AccountCodec::from_encoded_storage(encoded) == tl::unexpected{DecodingError::kUnexpectedLength}); } } TEST_CASE("Decode account from storage V3") { SECTION("Correct payload") { Bytes encoded{*from_hex("01020203e820f1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c92390105")}; - const auto decoded{Account::from_encoded_storage_v3(encoded)}; + const auto decoded = AccountCodec::from_encoded_storage_v3(encoded); REQUIRE(decoded); CHECK(decoded->nonce == 2); @@ -99,7 +99,7 @@ TEST_CASE("Decode account from storage V3") { SECTION("Empty payload") { Bytes encoded{}; - const auto decoded{Account::from_encoded_storage_v3(encoded)}; + const auto decoded = AccountCodec::from_encoded_storage_v3(encoded); REQUIRE(decoded); CHECK(decoded->nonce == 0); @@ -112,13 +112,13 @@ TEST_CASE("Decode account from storage V3") { std::vector encoded_sequence{"00", "0000", "000000"}; for (const auto encoded_payload : encoded_sequence) { Bytes encoded{*from_hex(encoded_payload)}; - CHECK(Account::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kUnexpectedLength}); + CHECK(AccountCodec::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kUnexpectedLength}); } } SECTION("All zero byte payload") { Bytes encoded{*from_hex("00000000")}; - CHECK(Account::from_encoded_storage_v3(encoded)); + CHECK(AccountCodec::from_encoded_storage_v3(encoded)); } SECTION("Too short payload") { @@ -130,19 +130,19 @@ TEST_CASE("Decode account from storage V3") { }; for (const auto encoded_payload : encoded_sequence) { Bytes encoded{*from_hex(encoded_payload)}; - CHECK(Account::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kInputTooShort}); + CHECK(AccountCodec::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kInputTooShort}); } } SECTION("Wrong nonce payload") { Bytes encoded{*from_hex("020001")}; - CHECK(Account::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kLeadingZero}); + CHECK(AccountCodec::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kLeadingZero}); } SECTION("Wrong code_hash payload") { Bytes encoded{*from_hex("01020203e822f1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c92390105")}; - CHECK(Account::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kUnexpectedLength}); + CHECK(AccountCodec::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kUnexpectedLength}); } } -} // namespace silkworm +} // namespace silkworm::db::state diff --git a/silkworm/db/state/account_codecs.hpp b/silkworm/db/state/account_codecs.hpp index 0b7704a002..d5624305a9 100644 --- a/silkworm/db/state/account_codecs.hpp +++ b/silkworm/db/state/account_codecs.hpp @@ -20,6 +20,7 @@ #include #include +#include "account_codec.hpp" #include "silkworm/db/util.hpp" namespace silkworm::db::state { @@ -30,7 +31,7 @@ struct AccountDecoder : public snapshots::Decoder { ~AccountDecoder() override = default; void decode_word(ByteView word) override { - auto account = Account::from_encoded_storage_v3(word); + auto account = AccountCodec::from_encoded_storage_v3(word); if (!account) throw DecodingException{account.error(), "AccountDecoder failed to decode Account"}; value = std::move(*account); diff --git a/silkworm/node/stagedsync/stages/stage_execution.cpp b/silkworm/node/stagedsync/stages/stage_execution.cpp index 714878c90d..83a1f31539 100644 --- a/silkworm/node/stagedsync/stages/stage_execution.cpp +++ b/silkworm/node/stagedsync/stages/stage_execution.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -566,7 +567,7 @@ void Execution::revert_state(ByteView key, ByteView value, RWCursorDupSort& plai RWCursor& plain_code_table) { if (key.size() == kAddressLength) { if (!value.empty()) { - const auto account_res{Account::from_encoded_storage(value)}; + const auto account_res = db::state::AccountCodec::from_encoded_storage(value); SILKWORM_ASSERT(account_res); Account account{*account_res}; if (account.incarnation > 0 && account.code_hash == kEmptyHash) { @@ -582,7 +583,7 @@ void Execution::revert_state(ByteView key, ByteView value, RWCursorDupSort& plai // cleaning up contract codes auto state_account_encoded{plain_state_table.find(to_slice(key), /*throw_notfound=*/false)}; if (state_account_encoded) { - const auto state_incarnation{Account::incarnation_from_encoded_storage(from_slice(state_account_encoded.value))}; + const auto state_incarnation = db::state::AccountCodec::incarnation_from_encoded_storage(from_slice(state_account_encoded.value)); SILKWORM_ASSERT(state_incarnation); // cleanup each code incarnation for (uint64_t i = *state_incarnation; i > account.incarnation; --i) { @@ -592,7 +593,7 @@ void Execution::revert_state(ByteView key, ByteView value, RWCursorDupSort& plai plain_code_table.erase(to_slice(key_hash)); } } - auto new_encoded_account{account.encode_for_storage(false)}; + Bytes new_encoded_account = db::state::AccountCodec::encode_for_storage(account); plain_state_table.erase(to_slice(key), /*whole_multivalue=*/true); plain_state_table.upsert(to_slice(key), to_slice(new_encoded_account)); } else { diff --git a/silkworm/node/stagedsync/stages/stage_hashstate.cpp b/silkworm/node/stagedsync/stages/stage_hashstate.cpp index de7472d5b1..ca784ab2a7 100644 --- a/silkworm/node/stagedsync/stages/stage_hashstate.cpp +++ b/silkworm/node/stagedsync/stages/stage_hashstate.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include namespace silkworm::stagedsync { @@ -799,7 +800,7 @@ void HashState::write_changes_from_changed_addresses(RWTxn& txn, const ChangedAd target_hashed_accounts->upsert(db::to_slice(address_hash), to_slice(current_encoded_value)); // Lookup value in PlainCodeHash for Contract - auto account = Account::from_encoded_storage(current_encoded_value); + auto account = db::state::AccountCodec::from_encoded_storage(current_encoded_value); success_or_throw(account); if (account->incarnation != 0) { std::memcpy(&plain_code_key[0], address.bytes, kAddressLength); @@ -814,7 +815,8 @@ void HashState::write_changes_from_changed_addresses(RWTxn& txn, const ChangedAd "address_hash", to_hex(address_hash), "incarnation", std::to_string(account->incarnation)}); std::memcpy(account->code_hash.bytes, code_data.value.data(), kHashLength); - target_hashed_accounts->upsert(db::to_slice(address_hash), to_slice(account->encode_for_storage())); + Bytes account_data = db::state::AccountCodec::encode_for_storage(*account); + target_hashed_accounts->upsert(db::to_slice(address_hash), to_slice(account_data)); } target_hashed_code->upsert(to_slice(hashed_code_key), code_data.value); } else { diff --git a/silkworm/node/stagedsync/stages/stage_interhashes.cpp b/silkworm/node/stagedsync/stages/stage_interhashes.cpp index 2d67b8fdfc..0a3666ceb8 100644 --- a/silkworm/node/stagedsync/stages/stage_interhashes.cpp +++ b/silkworm/node/stagedsync/stages/stage_interhashes.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -37,6 +38,7 @@ using namespace silkworm::db; using datastore::kvdb::Collector; using datastore::kvdb::from_slice; using datastore::kvdb::to_slice; +using silkworm::db::state::AccountCodec; Stage::Result InterHashes::forward(RWTxn& txn) { Stage::Result ret{Stage::Result::kSuccess}; @@ -270,7 +272,7 @@ trie::PrefixSet InterHashes::collect_account_changes(RWTxn& txn, BlockNum from, } else { auto ps_data{plain_state->find(db::to_slice(address), false)}; if (ps_data && !ps_data.value.empty()) { - const auto account{Account::from_encoded_storage(from_slice(ps_data.value))}; + const auto account{AccountCodec::from_encoded_storage(from_slice(ps_data.value))}; success_or_throw(account); plainstate_account.emplace(*account); } @@ -287,7 +289,7 @@ trie::PrefixSet InterHashes::collect_account_changes(RWTxn& txn, BlockNum from, // happened (with possible recreation). If they don't match delete from TrieStorage all hashed addresses // + incarnation if (!changeset_value_view.empty()) { - const auto changeset_account{Account::from_encoded_storage(changeset_value_view)}; + const auto changeset_account{AccountCodec::from_encoded_storage(changeset_value_view)}; success_or_throw(changeset_account); if (changeset_account->incarnation) { if (plainstate_account == std::nullopt || @@ -307,7 +309,7 @@ trie::PrefixSet InterHashes::collect_account_changes(RWTxn& txn, BlockNum from, if (changeset_value_view.empty()) { deleted_ts_prefixes.insert(address.bytes); } else { - const auto changeset_account{Account::from_encoded_storage(changeset_value_view)}; + const auto changeset_account{AccountCodec::from_encoded_storage(changeset_value_view)}; success_or_throw(changeset_account); if (changeset_account->incarnation > plainstate_account->incarnation) { deleted_ts_prefixes.insert( diff --git a/silkworm/node/stagedsync/stages/stage_interhashes/_test.cpp b/silkworm/node/stagedsync/stages/stage_interhashes/_test.cpp index e61d2568e9..54832ed4fe 100644 --- a/silkworm/node/stagedsync/stages/stage_interhashes/_test.cpp +++ b/silkworm/node/stagedsync/stages/stage_interhashes/_test.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -31,6 +32,7 @@ namespace silkworm::trie { using namespace silkworm::db; +using namespace silkworm::db::state; using namespace silkworm::datastore::kvdb; using datastore::kvdb::Collector; @@ -387,7 +389,7 @@ TEST_CASE("Account and storage trie") { HashBuilder hb; const evmc::bytes32 key1{0xB000000000000000000000000000000000000000000000000000000000000000_bytes32}; - const Account a1{0, 3 * kEther}; + const AccountEncodable a1{0, 3 * kEther}; hashed_accounts.upsert(to_slice(key1), to_slice(a1.encode_for_storage())); hb.add_leaf(unpack_nibbles(key1.bytes), a1.rlp(/*storage_root=*/kEmptyRoot)); @@ -395,7 +397,7 @@ TEST_CASE("Account and storage trie") { const evmc::address address2{0x7db3e81b72d2695e19764583f6d219dbee0f35ca_address}; const auto key2{keccak256(address2)}; REQUIRE((key2.bytes[0] == 0xB0 && key2.bytes[1] == 0x40)); - const Account a2{0, 1 * kEther}; + const AccountEncodable a2{0, 1 * kEther}; hashed_accounts.upsert(to_slice(key2.bytes), to_slice(a2.encode_for_storage())); hb.add_leaf(unpack_nibbles(key2.bytes), a2.rlp(/*storage_root=*/kEmptyRoot)); @@ -404,7 +406,7 @@ TEST_CASE("Account and storage trie") { const auto key3{keccak256(address3)}; REQUIRE((key3.bytes[0] == 0xB0 && key3.bytes[1] == 0x41)); const evmc::bytes32 code_hash{0x5be74cad16203c4905c068b012a2e9fb6d19d036c410f16fd177f337541440dd_bytes32}; - const Account a3{0, 2 * kEther, code_hash, kDefaultIncarnation}; + const AccountEncodable a3{0, 2 * kEther, code_hash, kDefaultIncarnation}; hashed_accounts.upsert(to_slice(key3.bytes), to_slice(a3.encode_for_storage())); Bytes storage_key{storage_prefix(key3.bytes, kDefaultIncarnation)}; @@ -413,17 +415,17 @@ TEST_CASE("Account and storage trie") { hb.add_leaf(unpack_nibbles(key3.bytes), a3.rlp(storage_root)); const evmc::bytes32 key4a{0xB1A0000000000000000000000000000000000000000000000000000000000000_bytes32}; - const Account a4a{0, 4 * kEther}; + const AccountEncodable a4a{0, 4 * kEther}; hashed_accounts.upsert(to_slice(key4a), to_slice(a4a.encode_for_storage())); hb.add_leaf(unpack_nibbles(key4a.bytes), a4a.rlp(/*storage_root=*/kEmptyRoot)); const evmc::bytes32 key5{0xB310000000000000000000000000000000000000000000000000000000000000_bytes32}; - const Account a5{0, 8 * kEther}; + const AccountEncodable a5{0, 8 * kEther}; hashed_accounts.upsert(to_slice(key5), to_slice(a5.encode_for_storage())); hb.add_leaf(unpack_nibbles(key5.bytes), a5.rlp(/*storage_root=*/kEmptyRoot)); const evmc::bytes32 key6{0xB340000000000000000000000000000000000000000000000000000000000000_bytes32}; - const Account a6{0, 1 * kEther}; + const AccountEncodable a6{0, 1 * kEther}; hashed_accounts.upsert(to_slice(key6), to_slice(a6.encode_for_storage())); hb.add_leaf(unpack_nibbles(key6.bytes), a6.rlp(/*storage_root=*/kEmptyRoot)); @@ -491,7 +493,7 @@ TEST_CASE("Account and storage trie") { const auto key4b{keccak256(address4b)}; REQUIRE(key4b.bytes[0] == key4a.bytes[0]); - const Account a4b{0, 5 * kEther}; + const AccountEncodable a4b{0, 5 * kEther}; hashed_accounts.upsert(to_slice(key4b.bytes), to_slice(a4b.encode_for_storage())); PrefixSet account_changes{}; @@ -595,7 +597,7 @@ TEST_CASE("Account and storage trie") { } TEST_CASE("Account trie around extension node") { - const Account account_one_ether{0, 1 * kEther}; + const AccountEncodable account_one_ether{0, 1 * kEther}; const std::vector keys{ 0x30af561000000000000000000000000000000000000000000000000000000000_bytes32, @@ -673,7 +675,7 @@ TEST_CASE("Trie Accounts : incremental vs regeneration") { // ------------------------------------------------------------------------------ // Start with 3n accounts at genesis, each holding 1 ETH - const Account one_eth{0, 1 * kEther}; + const AccountEncodable one_eth{0, 1 * kEther}; for (size_t i{0}, e{3 * n}; i < e; ++i) { const evmc::address address{int_to_address(i)}; const auto hash{keccak256(address)}; @@ -684,7 +686,7 @@ TEST_CASE("Trie Accounts : incremental vs regeneration") { (void)regenerate_intermediate_hashes(txn, context.dir().temp().path()); // Double the balance of the first third of the accounts - const Account two_eth{0, 2 * kEther}; + const AccountEncodable two_eth{0, 2 * kEther}; for (size_t i{0}; i < n; ++i) { const evmc::address address{int_to_address(i)}; const auto hash{keccak256(address)}; @@ -766,14 +768,14 @@ TEST_CASE("Trie Storage : incremental vs regeneration") { const uint64_t incarnation1{3}; const uint64_t incarnation2{1}; - const Account account1{ + const AccountEncodable account1{ 5, // nonce 7 * kEther, // balance 0x5e3c5ae99a1c6785210d0d233641562557ad763e18907cca3a8d42bd0a0b4ecb_bytes32, // code_hash incarnation1, // incarnation }; - const Account account2{ + const AccountEncodable account2{ 1, // nonce 13 * kEther, // balance 0x3a9c1d84e48734ae951e023197bda6d03933a4ca44124a2a544e227aa93efe75_bytes32, // code_hash diff --git a/silkworm/node/stagedsync/stages/stage_interhashes/trie_loader.cpp b/silkworm/node/stagedsync/stages/stage_interhashes/trie_loader.cpp index ae581940ae..ad5e1c6aa1 100644 --- a/silkworm/node/stagedsync/stages/stage_interhashes/trie_loader.cpp +++ b/silkworm/node/stagedsync/stages/stage_interhashes/trie_loader.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -114,7 +115,7 @@ evmc::bytes32 TrieLoader::calculate_root() { } // Retrieve account data - const auto account{Account::from_encoded_storage(from_slice(hashed_account_data.value))}; + const auto account = db::state::AccountCodec::from_encoded_storage(from_slice(hashed_account_data.value)); success_or_throw(account); evmc::bytes32 storage_root{kEmptyRoot}; diff --git a/silkworm/node/stagedsync/stages_test.cpp b/silkworm/node/stagedsync/stages_test.cpp index 91a8d4fc2b..00ff4be069 100644 --- a/silkworm/node/stagedsync/stages_test.cpp +++ b/silkworm/node/stagedsync/stages_test.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,7 @@ using namespace silkworm; using namespace silkworm::db; using namespace silkworm::datastore::kvdb; using namespace evmc::literals; +using silkworm::db::state::AccountCodec; static ethash::hash256 keccak256(const evmc::address& address) { return silkworm::keccak256(address.bytes); @@ -422,7 +424,7 @@ TEST_CASE("Sync Stages") { auto current_record = plain_state_cursor->current(/*throw_notfound=*/false); REQUIRE(current_record); REQUIRE(from_slice(current_record.key) == ByteView{sender.bytes}); - auto decoded_account = Account::from_encoded_storage(from_slice(current_record.value)); + auto decoded_account = AccountCodec::from_encoded_storage(from_slice(current_record.value)); REQUIRE(decoded_account); REQUIRE(decoded_account->nonce == 3); auto receipts_cursor = txn.ro_cursor(table::kBlockReceipts); @@ -461,7 +463,7 @@ TEST_CASE("Sync Stages") { current_record = plain_state_cursor->current(/*throw_notfound=*/false); REQUIRE(current_record); REQUIRE(from_slice(current_record.key) == ByteView{sender.bytes}); - decoded_account = Account::from_encoded_storage(from_slice(current_record.value)); + decoded_account = AccountCodec::from_encoded_storage(from_slice(current_record.value)); REQUIRE(decoded_account); REQUIRE(decoded_account->nonce == 2); receipts_cursor = txn.ro_cursor(table::kBlockReceipts); @@ -499,7 +501,7 @@ TEST_CASE("Sync Stages") { current_record = plain_state_cursor->current(/*throw_notfound=*/false); REQUIRE(current_record); REQUIRE(from_slice(current_record.key) == ByteView{sender.bytes}); - decoded_account = Account::from_encoded_storage(from_slice(current_record.value)); + decoded_account = AccountCodec::from_encoded_storage(from_slice(current_record.value)); REQUIRE(decoded_account); REQUIRE(decoded_account->nonce == 3); receipts_cursor = txn.ro_cursor(table::kBlockReceipts); @@ -569,7 +571,7 @@ TEST_CASE("Sync Stages") { REQUIRE(hashed_accounts_table.seek(to_slice(hashed_sender.bytes))); { auto account_encoded{from_slice(hashed_accounts_table.current().value)}; - auto account{Account::from_encoded_storage(account_encoded)}; + auto account = AccountCodec::from_encoded_storage(account_encoded); CHECK(account->nonce == 3); CHECK(account->balance < kEther); } @@ -610,7 +612,7 @@ TEST_CASE("Sync Stages") { REQUIRE(hashed_accounts_table.seek(to_slice(hashed_sender.bytes))); { auto account_encoded{from_slice(hashed_accounts_table.current().value)}; - auto account{Account::from_encoded_storage(account_encoded)}; + auto account = AccountCodec::from_encoded_storage(account_encoded); CHECK(account->nonce == 1); CHECK(account->balance == kEther); CHECK(stages::read_stage_progress(txn, stages::kHashStateKey) == unwind_to); diff --git a/silkworm/rpc/commands/debug_api.cpp b/silkworm/rpc/commands/debug_api.cpp index d8003a19b9..53527274b1 100644 --- a/silkworm/rpc/commands/debug_api.cpp +++ b/silkworm/rpc/commands/debug_api.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -341,7 +342,7 @@ Task DebugRpcApi::handle_debug_account_at(const nlohmann::json& request, n co_return; } - const auto account{Account::from_encoded_storage_v3(result.value)}; + const auto account{db::state::AccountCodec::from_encoded_storage_v3(result.value)}; if (account) { json_result["nonce"] = rpc::to_quantity(account->nonce); json_result["balance"] = "0x" + intx::to_string(account->balance, 16); diff --git a/silkworm/rpc/commands/ots_api.cpp b/silkworm/rpc/commands/ots_api.cpp index b629b42176..2e89a754d3 100644 --- a/silkworm/rpc/commands/ots_api.cpp +++ b/silkworm/rpc/commands/ots_api.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -329,7 +330,7 @@ Task OtsRpcApi::handle_ots_get_transaction_by_sender_and_nonce(const nlohm prev_txn_id = txn_id; continue; } - const auto account{Account::from_encoded_storage_v3(result.value)}; + const auto account{db::state::AccountCodec::from_encoded_storage_v3(result.value)}; SILK_DEBUG << "Account: " << *account; if (account->nonce > nonce) { break; @@ -359,7 +360,7 @@ Task OtsRpcApi::handle_ots_get_transaction_by_sender_and_nonce(const nlohm creation_txn_id = static_cast(txn_id); co_return false; } - const auto account{Account::from_encoded_storage_v3(result.value)}; + const auto account{db::state::AccountCodec::from_encoded_storage_v3(result.value)}; SILK_DEBUG << "account.nonce: " << account->nonce << ", nonce: " << nonce; if (account->nonce <= nonce) { creation_txn_id = std::max(creation_txn_id, static_cast(txn_id)); @@ -492,7 +493,7 @@ Task OtsRpcApi::handle_ots_get_contract_creator(const nlohmann::json& requ prev_txn_id = txn_id; continue; } - const auto account{Account::from_encoded_storage_v3(result.value)}; + const auto account{db::state::AccountCodec::from_encoded_storage_v3(result.value)}; SILK_DEBUG << "Decoded account: " << *account; if (account->incarnation == account_opt.value().incarnation) { diff --git a/silkworm/rpc/core/account_dumper.cpp b/silkworm/rpc/core/account_dumper.cpp index 47e9693f67..022220d52e 100644 --- a/silkworm/rpc/core/account_dumper.cpp +++ b/silkworm/rpc/core/account_dumper.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -78,7 +79,7 @@ Task AccountDumper::dump_accounts( break; } - auto account{Account::from_encoded_storage_v3(value->second)}; + auto account{db::state::AccountCodec::from_encoded_storage_v3(value->second)}; success_or_throw(account); dump_account.balance = account->balance; diff --git a/silkworm/rpc/core/block_reader.cpp b/silkworm/rpc/core/block_reader.cpp index fb09a9b5dc..32415e6d04 100644 --- a/silkworm/rpc/core/block_reader.cpp +++ b/silkworm/rpc/core/block_reader.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -77,7 +78,7 @@ Task BlockReader::read_balance_changes(BlockCache& cache, const BlockNumOr intx::uint256 current_balance{0}; if (!value->second.empty()) { - const auto account{Account::from_encoded_storage_v3(value->second)}; + const auto account{db::state::AccountCodec::from_encoded_storage_v3(value->second)}; if (account) { old_balance = account->balance; } From 152b5e9957dcc047c1202cc27e1fae01c5ee2f69 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Tue, 24 Dec 2024 14:03:13 +0100 Subject: [PATCH 47/48] AccountCodec::encode_for_storage_v3, rewrite from_encoded_storage_v3 --- silkworm/db/state/account_codec.cpp | 100 +++++++++++++---------- silkworm/db/state/account_codec.hpp | 2 + silkworm/db/state/account_codec_test.cpp | 88 +++++++++----------- 3 files changed, 96 insertions(+), 94 deletions(-) diff --git a/silkworm/db/state/account_codec.cpp b/silkworm/db/state/account_codec.cpp index 55bd684f48..f5c1022319 100644 --- a/silkworm/db/state/account_codec.cpp +++ b/silkworm/db/state/account_codec.cpp @@ -146,56 +146,68 @@ tl::expected AccountCodec::from_encoded_storage(ByteView return a; } +Bytes AccountCodec::encode_for_storage_v3(const Account& account) { + Bytes result; + auto write = [&result](ByteView field) { + result.push_back(static_cast(field.size())); + result.append(field); + }; + + write(endian::to_big_compact(account.nonce)); + write(endian::to_big_compact(account.balance)); + write((account.code_hash != kEmptyHash) ? ByteView{account.code_hash.bytes, kHashLength} : ByteView{}); + write(endian::to_big_compact(account.incarnation)); + + return result; +} + tl::expected AccountCodec::from_encoded_storage_v3(ByteView encoded_payload) noexcept { - Account a; - if (encoded_payload.empty()) { - return a; - } - size_t pos{0}; - for (int i{0}; i < 4; ++i) { - uint8_t len = encoded_payload[pos++]; - if (len == 0) { - if (encoded_payload.length() == pos && i < 3) { - return tl::unexpected{DecodingError::kUnexpectedLength}; - } - continue; - } - if (encoded_payload.length() < pos + len) { + auto read = [&encoded_payload]() -> tl::expected { + if (encoded_payload.empty()) { return tl::unexpected{DecodingError::kInputTooShort}; } - const auto encoded_value{encoded_payload.substr(pos, len)}; - switch (i) { - case 0: - if (DecodingResult res{endian::from_big_compact(encoded_value, a.nonce)}; !res) { - return tl::unexpected{res.error()}; - } - break; - case 1: - if (DecodingResult res{endian::from_big_compact(encoded_value, a.balance)}; !res) { - return tl::unexpected{res.error()}; - } - break; - case 2: - if (len != kHashLength) { - return tl::unexpected{DecodingError::kUnexpectedLength}; - } - std::memcpy(a.code_hash.bytes, encoded_value.data(), kHashLength); - break; - case 3: - if (DecodingResult res{endian::from_big_compact(encoded_value, a.incarnation)}; !res) { - return tl::unexpected{res.error()}; - } - break; - default: - intx::unreachable(); - } - pos += len; - if (pos >= encoded_payload.length() && i < 3) { + uint8_t len = encoded_payload[0]; + encoded_payload.remove_prefix(1); + + if (encoded_payload.size() < len) { return tl::unexpected{DecodingError::kInputTooShort}; } - } + ByteView field = encoded_payload.substr(0, len); + encoded_payload.remove_prefix(len); + return field; + }; + + auto read_and_decode = [&read](auto out_ptr, auto decode) -> DecodingResult { + auto field = read(); + if (!field) return tl::unexpected{field.error()}; + if (field->empty()) return {}; + return decode(*field, *out_ptr); + }; + + auto decode_hash = [](ByteView data, evmc_bytes32& out_hash) -> DecodingResult { + if (data.size() == kHashLength) { + std::memcpy(out_hash.bytes, data.data(), kHashLength); + return {}; + } else { + return tl::unexpected{DecodingError::kUnexpectedLength}; + } + }; - return a; + Account account; + + auto result = read_and_decode(&account.nonce, endian::from_big_compact); + if (!result) return tl::unexpected{result.error()}; + + result = read_and_decode(&account.balance, endian::from_big_compact); + if (!result) return tl::unexpected{result.error()}; + + result = read_and_decode(&account.code_hash, decode_hash); + if (!result) return tl::unexpected{result.error()}; + + result = read_and_decode(&account.incarnation, endian::from_big_compact); + if (!result) return tl::unexpected{result.error()}; + + return account; } tl::expected AccountCodec::incarnation_from_encoded_storage(ByteView encoded_payload) noexcept { diff --git a/silkworm/db/state/account_codec.hpp b/silkworm/db/state/account_codec.hpp index 72fb946d18..083cab2237 100644 --- a/silkworm/db/state/account_codec.hpp +++ b/silkworm/db/state/account_codec.hpp @@ -33,6 +33,8 @@ struct AccountCodec { //! \brief Decode an Account from its binary representation for data storage static tl::expected from_encoded_storage(ByteView encoded_payload) noexcept; + static Bytes encode_for_storage_v3(const Account& account); + //! \brief Decode an Account from its binary representation for data storage in E3 data format static tl::expected from_encoded_storage_v3(ByteView encoded_payload) noexcept; diff --git a/silkworm/db/state/account_codec_test.cpp b/silkworm/db/state/account_codec_test.cpp index fabb59a30d..06f9194158 100644 --- a/silkworm/db/state/account_codec_test.cpp +++ b/silkworm/db/state/account_codec_test.cpp @@ -85,64 +85,52 @@ TEST_CASE("Decode account from storage") { } } -TEST_CASE("Decode account from storage V3") { - SECTION("Correct payload") { - Bytes encoded{*from_hex("01020203e820f1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c92390105")}; - const auto decoded = AccountCodec::from_encoded_storage_v3(encoded); - REQUIRE(decoded); - - CHECK(decoded->nonce == 2); - CHECK(decoded->balance == 1000); - CHECK(decoded->code_hash == 0xf1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c9239_bytes32); - CHECK(decoded->incarnation == 5); - } - - SECTION("Empty payload") { - Bytes encoded{}; - const auto decoded = AccountCodec::from_encoded_storage_v3(encoded); - REQUIRE(decoded); - - CHECK(decoded->nonce == 0); - CHECK(decoded->balance == 0); - CHECK(decoded->code_hash == kEmptyHash); - CHECK(decoded->incarnation == 0); - } - - SECTION("Insufficient zero byte payload") { - std::vector encoded_sequence{"00", "0000", "000000"}; - for (const auto encoded_payload : encoded_sequence) { - Bytes encoded{*from_hex(encoded_payload)}; - CHECK(AccountCodec::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kUnexpectedLength}); - } - } - - SECTION("All zero byte payload") { - Bytes encoded{*from_hex("00000000")}; - CHECK(AccountCodec::from_encoded_storage_v3(encoded)); - } +TEST_CASE("AccountCodec::encode_for_storage_v3") { + CHECK(AccountCodec::encode_for_storage_v3(Account{2, 3, kEmptyRoot, 4}) == + *from_hex("010201032056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4210104")); + CHECK(AccountCodec::encode_for_storage_v3(Account{2, 3, kEmptyHash, 4}) == *from_hex("01020103000104")); + CHECK(AccountCodec::encode_for_storage_v3(Account{0, 3, kEmptyHash, 4}) == *from_hex("000103000104")); + CHECK(AccountCodec::encode_for_storage_v3(Account{2, 0, kEmptyHash, 4}) == *from_hex("010200000104")); + CHECK(AccountCodec::encode_for_storage_v3(Account{2, 3, kEmptyHash, 0}) == *from_hex("010201030000")); +} - SECTION("Too short payload") { - std::vector encoded_sequence{ +TEST_CASE("AccountCodec::from_encoded_storage_v3") { + auto decode = [](std::string_view payload) -> tl::expected { + return AccountCodec::from_encoded_storage_v3(*from_hex(payload)); + }; + + CHECK(decode("010201032056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b4210104") == + Account{2, 3, kEmptyRoot, 4}); + CHECK(decode("01020103000104") == Account{2, 3, kEmptyHash, 4}); + CHECK(decode("000103000104") == Account{0, 3, kEmptyHash, 4}); + CHECK(decode("010200000104") == Account{2, 0, kEmptyHash, 4}); + CHECK(decode("010201030000") == Account{2, 3, kEmptyHash, 0}); + CHECK(decode("00000000") == Account{}); + CHECK(decode("01020203e820f1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c92390105") == + Account{2, 1000, 0xf1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c9239_bytes32, 5}); + + // wrong nonce + CHECK(decode("020001") == tl::unexpected{DecodingError::kLeadingZero}); + + // wrong code hash + CHECK(decode("01020203e822f1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c92390105") == + tl::unexpected{DecodingError::kUnexpectedLength}); + + SECTION("Too short payloads") { + std::vector payloads{ + "", + "00", + "0000", + "000000", "0f", "0102", "01020203e8", "0805c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4", }; - for (const auto encoded_payload : encoded_sequence) { - Bytes encoded{*from_hex(encoded_payload)}; - CHECK(AccountCodec::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kInputTooShort}); + for (const auto payload : payloads) { + CHECK(decode(payload) == tl::unexpected{DecodingError::kInputTooShort}); } } - - SECTION("Wrong nonce payload") { - Bytes encoded{*from_hex("020001")}; - CHECK(AccountCodec::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kLeadingZero}); - } - - SECTION("Wrong code_hash payload") { - Bytes encoded{*from_hex("01020203e822f1885eda54b7a053318cd41e2093220dab15d65381b1157a3633a83bfd5c92390105")}; - CHECK(AccountCodec::from_encoded_storage_v3(encoded) == tl::unexpected{DecodingError::kUnexpectedLength}); - } } } // namespace silkworm::db::state From 18a962639fc836d7200b4887dcafd28a9e82c0d3 Mon Sep 17 00:00:00 2001 From: battlmonstr Date: Tue, 24 Dec 2024 14:03:50 +0100 Subject: [PATCH 48/48] DomainPutQuery, DomainGetLatestQuery, DomainDeleteQuery, LocalState update --- .../db/datastore/kvdb/big_endian_codec.cpp | 34 ++++ .../db/datastore/kvdb/big_endian_codec.hpp | 35 +++++ silkworm/db/datastore/kvdb/codec.hpp | 47 ++++++ silkworm/db/datastore/kvdb/domain.hpp | 145 ++++++++++++++++++ silkworm/db/datastore/kvdb/history.hpp | 44 ++++++ silkworm/db/datastore/kvdb/inverted_index.hpp | 33 ++++ silkworm/db/datastore/kvdb/kvts_codec.hpp | 142 +++++++++++++++++ silkworm/db/datastore/kvdb/raw_codec.hpp | 52 +++++++ .../db/datastore/snapshots/common/codec.hpp | 4 + .../snapshots/segment/kv_segment_test.cpp | 2 +- .../snapshots/test_util/string_codec.hpp | 2 +- silkworm/db/state/account_codecs.hpp | 20 +++ silkworm/db/state/accounts_domain.hpp | 4 + silkworm/db/state/address_codecs.hpp | 13 ++ silkworm/db/state/code_domain.hpp | 5 + silkworm/db/state/commitment_domain.hpp | 5 + silkworm/db/state/receipts_domain.hpp | 5 + silkworm/db/state/storage_codecs.cpp | 33 ++++ silkworm/db/state/storage_codecs.hpp | 36 +++++ silkworm/db/state/storage_domain.hpp | 4 + silkworm/execution/local_state.cpp | 86 ++++++++--- silkworm/execution/local_state.hpp | 46 +++--- silkworm/execution/state_factory.cpp | 2 +- 23 files changed, 755 insertions(+), 44 deletions(-) create mode 100644 silkworm/db/datastore/kvdb/big_endian_codec.cpp create mode 100644 silkworm/db/datastore/kvdb/big_endian_codec.hpp create mode 100644 silkworm/db/datastore/kvdb/codec.hpp create mode 100644 silkworm/db/datastore/kvdb/kvts_codec.hpp create mode 100644 silkworm/db/datastore/kvdb/raw_codec.hpp create mode 100644 silkworm/db/state/storage_codecs.cpp diff --git a/silkworm/db/datastore/kvdb/big_endian_codec.cpp b/silkworm/db/datastore/kvdb/big_endian_codec.cpp new file mode 100644 index 0000000000..f22c36a368 --- /dev/null +++ b/silkworm/db/datastore/kvdb/big_endian_codec.cpp @@ -0,0 +1,34 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "big_endian_codec.hpp" + +#include + +namespace silkworm::datastore::kvdb { + +Slice BigEndianU64Codec::encode() { + data.resize(sizeof(uint64_t), 0); + endian::store_big_u64(data.data(), value); + return to_slice(data); +} + +void BigEndianU64Codec::decode(Slice slice) { + SILKWORM_ASSERT(slice.size() >= sizeof(uint64_t)); + value = endian::load_big_u64(static_cast(slice.data())); +} + +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/kvdb/big_endian_codec.hpp b/silkworm/db/datastore/kvdb/big_endian_codec.hpp new file mode 100644 index 0000000000..d028973a70 --- /dev/null +++ b/silkworm/db/datastore/kvdb/big_endian_codec.hpp @@ -0,0 +1,35 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include "codec.hpp" + +namespace silkworm::datastore::kvdb { + +struct BigEndianU64Codec : public Codec { + uint64_t value{0}; + Bytes data; + + ~BigEndianU64Codec() override = default; + Slice encode() override; + void decode(Slice slice) override; +}; + +static_assert(EncoderConcept); +static_assert(DecoderConcept); + +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/kvdb/codec.hpp b/silkworm/db/datastore/kvdb/codec.hpp new file mode 100644 index 0000000000..4526313128 --- /dev/null +++ b/silkworm/db/datastore/kvdb/codec.hpp @@ -0,0 +1,47 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include "mdbx.hpp" + +namespace silkworm::datastore::kvdb { + +struct Encoder { + virtual ~Encoder() = default; + virtual Slice encode() = 0; +}; + +template +concept EncoderConcept = + std::derived_from && + requires(TEncoder encoder) { encoder.value; }; + +struct Decoder { + virtual ~Decoder() = default; + virtual void decode(Slice slice) = 0; +}; + +template +concept DecoderConcept = + std::derived_from && + requires(TDecoder decoder) { decoder.value; }; + +struct Codec : public Encoder, public Decoder { + ~Codec() override = default; +}; + +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/kvdb/domain.hpp b/silkworm/db/datastore/kvdb/domain.hpp index 20ac81d35f..7c2dbe2878 100644 --- a/silkworm/db/datastore/kvdb/domain.hpp +++ b/silkworm/db/datastore/kvdb/domain.hpp @@ -18,7 +18,11 @@ #include +#include "../common/step.hpp" +#include "big_endian_codec.hpp" +#include "codec.hpp" #include "history.hpp" +#include "kvts_codec.hpp" #include "mdbx.hpp" namespace silkworm::datastore::kvdb { @@ -29,4 +33,145 @@ struct Domain { std::optional history; }; +struct InvertedStepCodec : public Codec { + Step value{0}; + BigEndianU64Codec codec; + static constexpr size_t kEncodedSize = sizeof(decltype(BigEndianU64Codec::value)); + + ~InvertedStepCodec() override = default; + + Slice encode() override { + codec.value = ~value.value; + return codec.encode(); + } + + void decode(Slice slice) override { + codec.decode(slice); + value = Step(~codec.value); + } +}; + +static_assert(EncoderConcept); +static_assert(DecoderConcept); + +template +using DomainKeyEncoder = KVTSKeyEncoder; + +template +using DomainValueEncoder = KVTSValueEncoder; + +template +using DomainKeyDecoder = KVTSKeyDecoder; + +template +using DomainValueDecoder = KVTSValueDecoder; + +template +struct DomainPutLatestQuery { + RWTxn& tx; + Domain entity; + + using TKey = decltype(TKeyEncoder::value); + using TValue = decltype(TValueEncoder::value); + + void exec(const TKey& key, const TValue& value, Step step) { + DomainKeyEncoder key_encoder{entity.has_large_values}; + key_encoder.value.key.value = key; + key_encoder.value.timestamp.value = step; + + DomainValueEncoder value_encoder{entity.has_large_values}; + value_encoder.value.value.value = value; + value_encoder.value.timestamp.value = step; + + tx.rw_cursor(entity.values_table)->insert(key_encoder.encode(), value_encoder.encode()); + } +}; + +template +struct DomainGetLatestQuery { + RWTxn& tx; + Domain entity; + + using TKey = decltype(TKeyEncoder::value); + using TValue = decltype(TValueDecoder::value); + + struct Result { + TValue value; + Step step; + }; + + std::optional exec(const TKey& key) { + DomainKeyEncoder key_encoder{/* has_large_values = */ false}; + key_encoder.value.key.value = key; + Slice key_slice = key_encoder.encode(); + + auto result = tx.ro_cursor(entity.values_table)->lower_bound(key_slice, false); + if (!result) return std::nullopt; + + DomainKeyDecoder> key_decoder{entity.has_large_values}; + key_decoder.decode(result.key); + if (key_decoder.value.key.value != from_slice(key_slice)) return std::nullopt; + + DomainValueDecoder> empty_value_decoder{entity.has_large_values}; + empty_value_decoder.decode(result.value); + if (empty_value_decoder.value.value.value.empty()) return std::nullopt; + + DomainValueDecoder value_decoder{entity.has_large_values}; + value_decoder.decode(result.value); + + Step step = Step(key_decoder.value.timestamp.value.value | value_decoder.value.timestamp.value.value); + + return Result{std::move(value_decoder.value.value.value), step}; + } +}; + +template +struct DomainPutQuery { + RWTxn& tx; + Domain entity; + + using TKey = decltype(TKeyEncoder::value); + using TValue = decltype(TValueEncoder::value); + + void exec( + const TKey& key, + const TValue& value, + Timestamp timestamp, + const std::optional& prev_value, + Step prev_step) { + DomainPutLatestQuery value_query{tx, entity}; + value_query.exec(key, value, prev_step); + + if (entity.history) { + if (prev_value) { + HistoryPutQuery history_query{tx, *entity.history}; + history_query.exec(key, *prev_value, timestamp); + } else { + HistoryDeleteQuery history_query{tx, *entity.history}; + history_query.exec(key, timestamp); + } + } + } +}; + +template +struct DomainDeleteQuery { + RWTxn& tx; + Domain entity; + + using TKey = decltype(TKeyEncoder::value); + using TValue = decltype(TValueEncoder::value); + + void exec( + const TKey& key, + Timestamp timestamp, + const std::optional& prev_value, + Step prev_step) { + if (prev_value) { + DomainPutQuery> query{tx, entity}; + query.exec(key, ByteView{}, timestamp, prev_value, prev_step); + } + } +}; + } // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/kvdb/history.hpp b/silkworm/db/datastore/kvdb/history.hpp index 4ff9c1974f..dc5d7bec62 100644 --- a/silkworm/db/datastore/kvdb/history.hpp +++ b/silkworm/db/datastore/kvdb/history.hpp @@ -17,6 +17,7 @@ #pragma once #include "inverted_index.hpp" +#include "kvts_codec.hpp" #include "mdbx.hpp" namespace silkworm::datastore::kvdb { @@ -27,4 +28,47 @@ struct History { InvertedIndex inverted_index; }; +template +using HistoryKeyEncoder = KVTSKeyEncoder; + +template +using HistoryValueEncoder = KVTSValueEncoder; + +template +struct HistoryPutQuery { + RWTxn& tx; + History entity; + + using TKey = decltype(TKeyEncoder::value); + using TValue = decltype(TValueEncoder::value); + + void exec(const TKey& key, const TValue& value, Timestamp timestamp) { + HistoryKeyEncoder key_encoder{entity.has_large_values}; + key_encoder.value.key.value = key; + key_encoder.value.timestamp.value = timestamp; + + HistoryValueEncoder value_encoder{entity.has_large_values}; + value_encoder.value.value.value = value; + value_encoder.value.timestamp.value = timestamp; + + tx.rw_cursor(entity.values_table)->insert(key_encoder.encode(), value_encoder.encode()); + + InvertedIndexPutQuery inverted_index_query{tx, entity.inverted_index}; + inverted_index_query.exec(key, timestamp, false); + } +}; + +template +struct HistoryDeleteQuery { + RWTxn& tx; + History entity; + + using TKey = decltype(TKeyEncoder::value); + + void exec(const TKey& key, Timestamp timestamp) { + HistoryPutQuery> query{tx, entity}; + query.exec(key, ByteView{}, timestamp); + } +}; + } // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/kvdb/inverted_index.hpp b/silkworm/db/datastore/kvdb/inverted_index.hpp index 363c794f0e..178c32ee17 100644 --- a/silkworm/db/datastore/kvdb/inverted_index.hpp +++ b/silkworm/db/datastore/kvdb/inverted_index.hpp @@ -16,6 +16,9 @@ #pragma once +#include "../common/timestamp.hpp" +#include "big_endian_codec.hpp" +#include "codec.hpp" #include "mdbx.hpp" namespace silkworm::datastore::kvdb { @@ -25,4 +28,34 @@ struct InvertedIndex { const MapConfig& index_table; }; +using TimestampEncoder = BigEndianU64Codec; + +template +struct InvertedIndexPutQuery { + RWTxn& tx; + InvertedIndex entity; + + using TKey = decltype(TKeyEncoder::value); + + void exec(const TKey& key, const Timestamp timestamp, bool with_index_update) { + return exec(key, timestamp, with_index_update); + } + + template + void exec(const TKey& key, const TTimestamp& timestamp, bool with_index_update) { + TKeyEncoder key_encoder; + key_encoder.value = key; + Slice key_slice = key_encoder.encode(); + + TTimestampEncoder ts_encoder; + ts_encoder.value = timestamp; + Slice ts_slice = ts_encoder.encode(); + + tx.rw_cursor(entity.keys_table)->insert(ts_slice, key_slice); + if (with_index_update) { + tx.rw_cursor(entity.index_table)->insert(key_slice, ts_slice); + } + } +}; + } // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/kvdb/kvts_codec.hpp b/silkworm/db/datastore/kvdb/kvts_codec.hpp new file mode 100644 index 0000000000..ea0d1c7433 --- /dev/null +++ b/silkworm/db/datastore/kvdb/kvts_codec.hpp @@ -0,0 +1,142 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include "codec.hpp" +#include "raw_codec.hpp" + +namespace silkworm::datastore::kvdb { + +template +class KVTSKeyEncoder : public Encoder { + public: + struct { + TEncoder key; + TTimestampEncoder timestamp; + } value; + + explicit KVTSKeyEncoder(bool has_large_values) + : has_large_values_{has_large_values} {} + ~KVTSKeyEncoder() override = default; + + Slice encode() override { + data_.clear(); + if (has_large_values_) { + // encode as key + timestamp + data_.append(from_slice(value.key.encode())); + data_.append(from_slice(value.timestamp.encode())); + return to_slice(data_); + } else { + return value.key.encode(); + } + } + + private: + bool has_large_values_; + Bytes data_; +}; + +template +class KVTSValueEncoder : public Encoder { + public: + struct { + TEncoder value; + TTimestampEncoder timestamp; + } value; + + explicit KVTSValueEncoder(bool has_large_values) + : has_large_values_{has_large_values} {} + ~KVTSValueEncoder() override = default; + + Slice encode() override { + data_.clear(); + if (has_large_values_) { + return value.value.encode(); + } else { + // encode as timestamp + value + data_.append(from_slice(value.timestamp.encode())); + data_.append(from_slice(value.value.encode())); + return to_slice(data_); + } + } + + private: + bool has_large_values_; + Bytes data_; +}; + +static_assert(EncoderConcept, RawEncoder>>); +static_assert(EncoderConcept, RawEncoder>>); + +template +class KVTSKeyDecoder : public Decoder { + public: + struct { + TDecoder key; + TTimestampDecoder timestamp; + } value; + + explicit KVTSKeyDecoder(bool has_large_values) + : has_large_values_{has_large_values} {} + ~KVTSKeyDecoder() override = default; + + void decode(Slice data) override { + if (has_large_values_) { + // decode as key + timestamp + SILKWORM_ASSERT(data.size() >= kEncodedTimestampSize); + value.key.decode(to_slice(from_slice(data).substr(0, data.size() - kEncodedTimestampSize))); + value.timestamp.decode(to_slice(from_slice(data).substr(data.size() - kEncodedTimestampSize, kEncodedTimestampSize))); + } else { + value.key.decode(data); + } + } + + private: + bool has_large_values_; +}; + +template +class KVTSValueDecoder : public Decoder { + public: + struct { + TDecoder value; + TTimestampDecoder timestamp; + } value; + + explicit KVTSValueDecoder(bool has_large_values) + : has_large_values_{has_large_values} {} + ~KVTSValueDecoder() override = default; + + void decode(Slice slice) override { + if (has_large_values_) { + value.value.decode(slice); + } else { + // decode as timestamp + value + SILKWORM_ASSERT(slice.size() >= kEncodedTimestampSize); + value.timestamp.decode(to_slice(from_slice(slice).substr(0, kEncodedTimestampSize))); + value.value.decode(to_slice(from_slice(slice).substr(kEncodedTimestampSize))); + } + } + + private: + bool has_large_values_; +}; + +static_assert(DecoderConcept, RawDecoder, sizeof(uint64_t)>>); +static_assert(DecoderConcept, RawDecoder, sizeof(uint64_t)>>); + +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/kvdb/raw_codec.hpp b/silkworm/db/datastore/kvdb/raw_codec.hpp new file mode 100644 index 0000000000..226d3478e6 --- /dev/null +++ b/silkworm/db/datastore/kvdb/raw_codec.hpp @@ -0,0 +1,52 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include + +#include "codec.hpp" + +namespace silkworm::datastore::kvdb { + +template +concept BytesOrByteView = std::same_as || std::same_as; + +template +struct RawDecoder : public Decoder { + TBytes value; + ~RawDecoder() override = default; + void decode(Slice slice) override { + value = from_slice(slice); + } +}; + +static_assert(DecoderConcept>); +static_assert(DecoderConcept>); + +template +struct RawEncoder : public Encoder { + TBytes value; + ~RawEncoder() override = default; + Slice encode() override { + return to_slice(ByteView{value}); + } +}; + +static_assert(EncoderConcept>); +static_assert(EncoderConcept>); + +} // namespace silkworm::datastore::kvdb diff --git a/silkworm/db/datastore/snapshots/common/codec.hpp b/silkworm/db/datastore/snapshots/common/codec.hpp index fb145bd4d4..3a50a61597 100644 --- a/silkworm/db/datastore/snapshots/common/codec.hpp +++ b/silkworm/db/datastore/snapshots/common/codec.hpp @@ -44,4 +44,8 @@ concept DecoderConcept = std::derived_from && requires(TDecoder decoder) { decoder.value; }; +struct Codec : public Encoder, public Decoder { + ~Codec() override = default; +}; + } // namespace silkworm::snapshots diff --git a/silkworm/db/datastore/snapshots/segment/kv_segment_test.cpp b/silkworm/db/datastore/snapshots/segment/kv_segment_test.cpp index df89118eba..d5dd6ba178 100644 --- a/silkworm/db/datastore/snapshots/segment/kv_segment_test.cpp +++ b/silkworm/db/datastore/snapshots/segment/kv_segment_test.cpp @@ -25,7 +25,7 @@ namespace silkworm::snapshots::segment { -struct CharCodec : public Encoder, public Decoder { +struct CharCodec : public Codec { char value{}; Bytes word; diff --git a/silkworm/db/datastore/snapshots/test_util/string_codec.hpp b/silkworm/db/datastore/snapshots/test_util/string_codec.hpp index ff3ceab140..7d2100ae8d 100644 --- a/silkworm/db/datastore/snapshots/test_util/string_codec.hpp +++ b/silkworm/db/datastore/snapshots/test_util/string_codec.hpp @@ -24,7 +24,7 @@ namespace silkworm::snapshots { -struct StringCodec : public Encoder, public Decoder { +struct StringCodec : public Codec { std::string value; Bytes word; diff --git a/silkworm/db/state/account_codecs.hpp b/silkworm/db/state/account_codecs.hpp index d5624305a9..e1d03b28f9 100644 --- a/silkworm/db/state/account_codecs.hpp +++ b/silkworm/db/state/account_codecs.hpp @@ -17,6 +17,7 @@ #pragma once #include +#include #include #include @@ -25,6 +26,25 @@ namespace silkworm::db::state { +struct AccountKVDBCodec : public datastore::kvdb::Codec { + Account value; + Bytes data; + + ~AccountKVDBCodec() override = default; + + datastore::kvdb::Slice encode() override { + data = AccountCodec::encode_for_storage_v3(value); + return datastore::kvdb::to_slice(data); + } + + void decode(datastore::kvdb::Slice slice) override { + value = unwrap_or_throw(AccountCodec::from_encoded_storage_v3(datastore::kvdb::from_slice(slice))); + } +}; + +static_assert(datastore::kvdb::EncoderConcept); +static_assert(datastore::kvdb::DecoderConcept); + struct AccountDecoder : public snapshots::Decoder { Account value; diff --git a/silkworm/db/state/accounts_domain.hpp b/silkworm/db/state/accounts_domain.hpp index 52959d1d2b..a8b5dd59ad 100644 --- a/silkworm/db/state/accounts_domain.hpp +++ b/silkworm/db/state/accounts_domain.hpp @@ -24,6 +24,10 @@ namespace silkworm::db::state { +using AccountsDomainGetLatestQuery = datastore::kvdb::DomainGetLatestQuery; +using AccountsDomainPutQuery = datastore::kvdb::DomainPutQuery; +using AccountsDomainDeleteQuery = datastore::kvdb::DomainDeleteQuery; + using AccountsDomainKVSegmentReader = snapshots::segment::KVSegmentReader; } // namespace silkworm::db::state diff --git a/silkworm/db/state/address_codecs.hpp b/silkworm/db/state/address_codecs.hpp index bb6b43962e..ca9d736faa 100644 --- a/silkworm/db/state/address_codecs.hpp +++ b/silkworm/db/state/address_codecs.hpp @@ -20,10 +20,23 @@ #include +#include #include namespace silkworm::db::state { +struct AddressKVDBEncoder : public datastore::kvdb::Encoder { + evmc::address value; + + ~AddressKVDBEncoder() override = default; + + datastore::kvdb::Slice encode() override { + return {&value.bytes, kAddressLength}; + } +}; + +static_assert(datastore::kvdb::EncoderConcept); + struct AddressDecoder : public snapshots::Decoder { evmc::address value; diff --git a/silkworm/db/state/code_domain.hpp b/silkworm/db/state/code_domain.hpp index d56ffd3b20..1ca5912b06 100644 --- a/silkworm/db/state/code_domain.hpp +++ b/silkworm/db/state/code_domain.hpp @@ -16,6 +16,7 @@ #pragma once +#include #include #include @@ -23,6 +24,10 @@ namespace silkworm::db::state { +using CodeDomainGetLatestQuery = datastore::kvdb::DomainGetLatestQuery>; +using CodeDomainPutQuery = datastore::kvdb::DomainPutQuery>; +using CodeDomainDeleteQuery = datastore::kvdb::DomainDeleteQuery>; + using CodeDomainKVSegmentReader = snapshots::segment::KVSegmentReader>; } // namespace silkworm::db::state diff --git a/silkworm/db/state/commitment_domain.hpp b/silkworm/db/state/commitment_domain.hpp index 4afc9bbdaf..565a459f8d 100644 --- a/silkworm/db/state/commitment_domain.hpp +++ b/silkworm/db/state/commitment_domain.hpp @@ -16,11 +16,16 @@ #pragma once +#include #include #include namespace silkworm::db::state { +using CommitmentDomainGetLatestQuery = datastore::kvdb::DomainGetLatestQuery, datastore::kvdb::RawDecoder>; +using CommitmentDomainPutQuery = datastore::kvdb::DomainPutQuery, datastore::kvdb::RawEncoder>; +using CommitmentDomainDeleteQuery = datastore::kvdb::DomainDeleteQuery, datastore::kvdb::RawEncoder>; + using CommitmentDomainKVSegmentReader = snapshots::segment::KVSegmentReader, snapshots::RawDecoder>; } // namespace silkworm::db::state diff --git a/silkworm/db/state/receipts_domain.hpp b/silkworm/db/state/receipts_domain.hpp index 929d965bcc..de901acbc8 100644 --- a/silkworm/db/state/receipts_domain.hpp +++ b/silkworm/db/state/receipts_domain.hpp @@ -18,11 +18,16 @@ #include +#include #include #include namespace silkworm::db::state { +using ReceiptsDomainGetLatestQuery = datastore::kvdb::DomainGetLatestQuery, datastore::kvdb::RawDecoder>; +using ReceiptsDomainPutQuery = datastore::kvdb::DomainPutQuery, datastore::kvdb::RawEncoder>; +using ReceiptsDomainDeleteQuery = datastore::kvdb::DomainDeleteQuery, datastore::kvdb::RawEncoder>; + enum class ReceiptsDomainKey : uint8_t { kCumulativeGasUsedInBlockKey = 0, kCumulativeBlobGasUsedInBlockKey = 1, diff --git a/silkworm/db/state/storage_codecs.cpp b/silkworm/db/state/storage_codecs.cpp new file mode 100644 index 0000000000..39c4873161 --- /dev/null +++ b/silkworm/db/state/storage_codecs.cpp @@ -0,0 +1,33 @@ +/* + Copyright 2024 The Silkworm Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "storage_codecs.hpp" + +namespace silkworm::db::state { + +datastore::kvdb::Slice StorageAddressAndLocationKVDBEncoder::encode() { + // TODO: this extra copy could be avoided if encoders are able to contain a reference + encoder.address.value = value.address; + encoder.location_hash.value = value.location_hash; + + data.clear(); + data.reserve(kAddressLength + kHashLength); + data.append(datastore::kvdb::from_slice(encoder.address.encode())); + data.append(datastore::kvdb::from_slice(encoder.location_hash.encode())); + return datastore::kvdb::to_slice(data); +} + +} // namespace silkworm::db::state diff --git a/silkworm/db/state/storage_codecs.hpp b/silkworm/db/state/storage_codecs.hpp index 638aa5bc73..86b90e5a08 100644 --- a/silkworm/db/state/storage_codecs.hpp +++ b/silkworm/db/state/storage_codecs.hpp @@ -16,12 +16,28 @@ #pragma once +#include #include #include "address_codecs.hpp" namespace silkworm::db::state { +struct Bytes32KVDBCodec : public datastore::kvdb::Codec { + evmc::bytes32 value; + ~Bytes32KVDBCodec() override = default; + datastore::kvdb::Slice encode() override { + return {&value.bytes, sizeof(value.bytes)}; + } + void decode(datastore::kvdb::Slice slice) override { + SILKWORM_ASSERT(slice.size() >= sizeof(value.bytes)); + std::memcpy(value.bytes, slice.data(), sizeof(value.bytes)); + } +}; + +static_assert(datastore::kvdb::EncoderConcept); +static_assert(datastore::kvdb::DecoderConcept); + struct Bytes32Decoder : public snapshots::Decoder { evmc::bytes32 value; ~Bytes32Decoder() override = default; @@ -34,6 +50,26 @@ struct Bytes32Decoder : public snapshots::Decoder { static_assert(snapshots::DecoderConcept); +struct StorageAddressAndLocationKVDBEncoder : public datastore::kvdb::Encoder { + struct { + evmc::address address; + evmc::bytes32 location_hash; + } value; + + struct { + AddressKVDBEncoder address; + Bytes32KVDBCodec location_hash; + } encoder; + + Bytes data; + + ~StorageAddressAndLocationKVDBEncoder() override = default; + + datastore::kvdb::Slice encode() override; +}; + +static_assert(datastore::kvdb::EncoderConcept); + struct StorageAddressAndLocationDecoder : public snapshots::Decoder { struct { AddressDecoder address; diff --git a/silkworm/db/state/storage_domain.hpp b/silkworm/db/state/storage_domain.hpp index d43a7a1fa1..a50b5f32c8 100644 --- a/silkworm/db/state/storage_domain.hpp +++ b/silkworm/db/state/storage_domain.hpp @@ -23,6 +23,10 @@ namespace silkworm::db::state { +using StorageDomainGetLatestQuery = datastore::kvdb::DomainGetLatestQuery; +using StorageDomainPutQuery = datastore::kvdb::DomainPutQuery; +using StorageDomainDeleteQuery = datastore::kvdb::DomainDeleteQuery; + using StorageDomainKVSegmentReader = snapshots::segment::KVSegmentReader; } // namespace silkworm::db::state diff --git a/silkworm/execution/local_state.cpp b/silkworm/execution/local_state.cpp index b543d2730a..72d0b66b7f 100644 --- a/silkworm/execution/local_state.cpp +++ b/silkworm/execution/local_state.cpp @@ -17,33 +17,43 @@ #include "local_state.hpp" #include +#include +#include +#include namespace silkworm::execution { +using namespace db::state; +using namespace datastore; + std::optional LocalState::read_account(const evmc::address& address) const noexcept { - if (block_num_) { - return db::read_account(txn_, address, *block_num_ + 1); - } else { - // TODO read using txn_id - return std::nullopt; + AccountsDomainGetLatestQuery query{tx_, data_store_.state_db().accounts_domain()}; + auto result = query.exec(address); + if (result) { + return std::move(result->value); } + return std::nullopt; } -ByteView LocalState::read_code(const evmc::address& /*address*/, const evmc::bytes32& code_hash) const noexcept { - auto code_optional = db::read_code(txn_, code_hash); - if (!code_optional) { - return ByteView{}; +ByteView LocalState::read_code(const evmc::address& address, const evmc::bytes32& /*code_hash*/) const noexcept { + CodeDomainGetLatestQuery query{tx_, data_store_.state_db().code_domain()}; + auto result = query.exec(address); + if (result) { + return std::move(result->value); } - return *code_optional; + return ByteView{}; } -evmc::bytes32 LocalState::read_storage(const evmc::address& address, uint64_t incarnation, const evmc::bytes32& location) const noexcept { - if (block_num_) { - return db::read_storage(txn_, address, incarnation, location, *block_num_ + 1); - } else { - // TODO read using txn_id - return {}; +evmc::bytes32 LocalState::read_storage( + const evmc::address& address, + uint64_t /*incarnation*/, + const evmc::bytes32& location) const noexcept { + StorageDomainGetLatestQuery query{tx_, data_store_.state_db().storage_domain()}; + auto result = query.exec({address, location}); + if (result) { + return std::move(result->value); } + return {}; } uint64_t LocalState::previous_incarnation(const evmc::address& /*address*/) const noexcept { @@ -51,15 +61,15 @@ uint64_t LocalState::previous_incarnation(const evmc::address& /*address*/) cons } std::optional LocalState::read_header(BlockNum block_num, const evmc::bytes32& block_hash) const noexcept { - return data_model_.read_header(block_num, block_hash); + return data_model().read_header(block_num, block_hash); } bool LocalState::read_body(BlockNum block_num, const evmc::bytes32& block_hash, BlockBody& out) const noexcept { - return data_model_.read_body(block_hash, block_num, out); + return data_model().read_body(block_hash, block_num, out); } std::optional LocalState::total_difficulty(BlockNum block_num, const evmc::bytes32& block_hash) const noexcept { - return data_model_.read_total_difficulty(block_num, block_hash); + return data_model().read_total_difficulty(block_num, block_hash); } evmc::bytes32 LocalState::state_root_hash() const { @@ -73,7 +83,43 @@ BlockNum LocalState::current_canonical_block() const { std::optional LocalState::canonical_hash(BlockNum block_num) const { // This method should not be called by EVM::execute - return data_model_.read_canonical_header_hash(block_num); + return data_model().read_canonical_header_hash(block_num); +} + +void LocalState::update_account( + const evmc::address& address, + std::optional initial, + std::optional current) { + // TODO: prev_step - a step at which initial value was produced + Step prev_step = Step::from_txn_id(txn_id_); + AccountsDomainPutQuery query{tx_, data_store_.state_db().accounts_domain()}; + // TODO: handle current = nullopt + query.exec(address, *current, txn_id_, initial, prev_step); +} + +void LocalState::update_account_code( + const evmc::address& address, + uint64_t /*incarnation*/, + const evmc::bytes32& /*code_hash*/, + ByteView code) { + // TODO: prev_step - a step at which initial value was produced + Step prev_step = Step::from_txn_id(txn_id_); + CodeDomainPutQuery query{tx_, data_store_.state_db().code_domain()}; + // TODO: initial_code + std::optional initial_code = std::nullopt; + query.exec(address, code, txn_id_, initial_code, prev_step); +} + +void LocalState::update_storage( + const evmc::address& address, + uint64_t /*incarnation*/, + const evmc::bytes32& location, + const evmc::bytes32& initial, + const evmc::bytes32& current) { + // TODO: prev_step - a step at which initial value was produced + Step prev_step = Step::from_txn_id(txn_id_); + StorageDomainPutQuery query{tx_, data_store_.state_db().storage_domain()}; + query.exec({address, location}, current, txn_id_, initial, prev_step); } } // namespace silkworm::execution diff --git a/silkworm/execution/local_state.hpp b/silkworm/execution/local_state.hpp index 2d84f6806f..a16a9d0c62 100644 --- a/silkworm/execution/local_state.hpp +++ b/silkworm/execution/local_state.hpp @@ -33,11 +33,12 @@ namespace silkworm::execution { class LocalState : public State { public: - explicit LocalState(std::optional block_num, std::optional txn_id, db::DataStoreRef data_store) - : block_num_{block_num}, - txnid_{txn_id}, - txn_{data_store.chaindata.access_ro().start_ro_tx()}, - data_model_{txn_, data_store.blocks_repository} {} + explicit LocalState( + TxnId txn_id, + db::DataStoreRef data_store) + : txn_id_{txn_id}, + data_store_{std::move(data_store)}, + tx_{data_store_.chaindata.access_rw().start_rw_tx()} {} std::optional read_account(const evmc::address& address) const noexcept override; @@ -72,30 +73,33 @@ class LocalState : public State { void begin_block(BlockNum /*block_num*/, size_t /*updated_accounts_count*/) override {} void update_account( - const evmc::address& /*address*/, - std::optional /*initial*/, - std::optional /*current*/) override {} + const evmc::address& address, + std::optional initial, + std::optional current) override; void update_account_code( - const evmc::address& /*address*/, - uint64_t /*incarnation*/, - const evmc::bytes32& /*code_hash*/, - ByteView /*code*/) override {} + const evmc::address& address, + uint64_t incarnation, + const evmc::bytes32& code_hash, + ByteView code) override; void update_storage( - const evmc::address& /*address*/, - uint64_t /*incarnation*/, - const evmc::bytes32& /*location*/, - const evmc::bytes32& /*initial*/, - const evmc::bytes32& /*current*/) override {} + const evmc::address& address, + uint64_t incarnation, + const evmc::bytes32& location, + const evmc::bytes32& initial, + const evmc::bytes32& current) override; void unwind_state_changes(BlockNum /*block_num*/) override {} private: - std::optional block_num_; - std::optional txnid_; - mutable datastore::kvdb::ROTxnManaged txn_; - db::DataModel data_model_; + db::DataModel data_model() const { + return db::DataModelFactory{data_store_}(tx_); + } + + TxnId txn_id_; + db::DataStoreRef data_store_; + mutable datastore::kvdb::RWTxnManaged tx_; }; } // namespace silkworm::execution diff --git a/silkworm/execution/state_factory.cpp b/silkworm/execution/state_factory.cpp index 1649acb2c6..c6f15891c9 100644 --- a/silkworm/execution/state_factory.cpp +++ b/silkworm/execution/state_factory.cpp @@ -30,7 +30,7 @@ std::shared_ptr StateFactory::create_state( TxnId txn_id) { if (tx.is_local()) { auto& local_tx = dynamic_cast(tx); - return std::make_shared(std::nullopt, txn_id, local_tx.data_store()); + return std::make_shared(txn_id, local_tx.data_store()); } else { // NOLINT(readability-else-after-return) return std::make_shared(executor, tx, storage, txn_id); }