From 7edaf8b64cb2d59ada22042fee62a417e52368b8 Mon Sep 17 00:00:00 2001 From: Eunovo Date: Thu, 31 Oct 2024 19:31:36 +0000 Subject: [PATCH] Benchmark Chainstate::ConnectBlock duration Measure ConnectBlock performance for - blocks containing only schnorr sigs - blocks containing both schnorr and ecdsa sigs - blocks containing only ecdsa sigs This will allow testing and measurement of performance improvement for features like batch verification of schnorr signatures --- src/bench/CMakeLists.txt | 1 + src/bench/connectblock.cpp | 137 +++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 src/bench/connectblock.cpp diff --git a/src/bench/CMakeLists.txt b/src/bench/CMakeLists.txt index c55bbb1e05f..9f0c4067724 100644 --- a/src/bench/CMakeLists.txt +++ b/src/bench/CMakeLists.txt @@ -22,6 +22,7 @@ add_executable(bench_bitcoin checkblockindex.cpp checkqueue.cpp cluster_linearize.cpp + connectblock.cpp crypto_hash.cpp descriptors.cpp disconnected_transactions.cpp diff --git a/src/bench/connectblock.cpp b/src/bench/connectblock.cpp new file mode 100644 index 00000000000..efe05dc2af1 --- /dev/null +++ b/src/bench/connectblock.cpp @@ -0,0 +1,137 @@ +// Copyright (c) 2025 The Bitcoin Core developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#include +#include +#include +#include +#include