From d91e3c0d7b48f7a0ecc2a108dc4771e44435b5c6 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Fri, 3 Jan 2025 15:17:08 -0500 Subject: [PATCH 1/2] Comments on neutrino filter processing. --- src/chasers/chaser_validate.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/chasers/chaser_validate.cpp b/src/chasers/chaser_validate.cpp index 84e48f71..d6b134ee 100644 --- a/src/chasers/chaser_validate.cpp +++ b/src/chasers/chaser_validate.cpp @@ -347,10 +347,14 @@ bool chaser_validate::update_neutrino(const header_link& link, if (!query.neutrino_enabled()) return true; + // Filters are computed during validate, in parallel. + // Validation skipped under checkpoint/milestone to only compute filter. data_chunk filter{}; if (!compute_filter(filter, block)) return false; + // TODO: move filter header computation to confirmation chaser (ordered). + // TODO: this requires distinct storage array[n, 256] for filter headers. neutrino_ = compute_filter_header(neutrino_, filter); return query.set_filter(link, neutrino_, filter); } From 3fe83b9e1236e35f7451342cf82cd709dc04d91f Mon Sep 17 00:00:00 2001 From: evoskuil Date: Fri, 3 Jan 2025 15:47:18 -0500 Subject: [PATCH 2/2] Provide error code with directory create failure. --- console/executor_store.cpp | 4 ++-- console/localize.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/console/executor_store.cpp b/console/executor_store.cpp index 066ad5c8..247de4b8 100644 --- a/console/executor_store.cpp +++ b/console/executor_store.cpp @@ -59,9 +59,9 @@ bool executor::check_store_path(bool create) const if (create) { logger(format(BN_INITIALIZING_CHAIN) % store); - if (!database::file::create_directory(store)) + if (auto ec = database::file::create_directory_ex(store)) { - logger(format(BN_INITCHAIN_EXISTS) % store); + logger(format(BN_INITCHAIN_DIRECTORY_ERROR) % store % ec.message()); return false; } } diff --git a/console/localize.hpp b/console/localize.hpp index 290fca03..e174c825 100644 --- a/console/localize.hpp +++ b/console/localize.hpp @@ -38,8 +38,8 @@ namespace node { // --initchain #define BN_INITIALIZING_CHAIN \ "Initializing %1% directory..." -#define BN_INITCHAIN_EXISTS \ - "Failed because the directory %1% already exists." +#define BN_INITCHAIN_DIRECTORY_ERROR \ + "Failed creating directory %1% with error '%2%'." #define BN_INITCHAIN_CREATING \ "Please wait while creating the database..." #define BN_INITCHAIN_CREATED \