Skip to content

Instantly share code, notes, and snippets.

@l0rinc
l0rinc / benchmark.md
Last active March 24, 2025 11:27
Benchmarking meeting notes

Benchmarking meeting notes

Add a macro benchmark suite with longer-running operations, exercising a different set of functionality that is performance-critical.

  • One of them could be the speed of an assumeUTXO load-and-dump (this would check block read/write and (de)serialization, but only part of validation).
  • Another one could be an actual IBD for 840-880k blocks (small part of IBD, but should produce a representative comparison quickly).
  • Another one would be a reindex-chainstate up to e.g. 880k blocks (more realistic, but takes long and doesn't involve reading/writing blocks).
  • Lastly, several full IBDs to make sure the previous quick checks are representative (likely only required for big changes). We don't have to run all of these for every PR; it could be tied to labels added to PRs where the author/reviewers think they're relevant (e.g., not for doc typo fixes). This would require integration with CoreCheck.

Other suggested macro benchmarks by the participants:

  • Compact block reconstruction
@l0rinc
l0rinc / GetLegacySigOpCount.patch
Created May 17, 2025 15:12
[PATCH] Add paranoid sanity checks
diff --git a/src/script/script.cpp b/src/script/script.cpp
--- a/src/script/script.cpp (revision 6ddb22a8c89a40ec0d4d75a195c2bc0231933285)
+++ b/src/script/script.cpp (revision b34e14355d94b21064cc64977955bf696e09992e)
@@ -4,7 +4,8 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <script/script.h>
-
+#include <script/solver.h>
+#include <logging.h>