No description provided.
Bench pr 35215 #35739
pull andrewtoth wants to merge 67 commits into bitcoin:master from bitcoin-dev-tools:bench-pr-35215 changing 51 files +8353 −135-
andrewtoth commented at 11:07 PM on July 16, 2026: contributor
-
749d1edb09
benchcoin: add tooling
Adds build configuration, benchmarking CI workflows, Python dependencies, plotting tools, and documentation for benchcoin. Co-authored-by: David Gumberg <davidzgumberg@gmail.com> Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
-
don't compare to master in prs cc5ded79ab
-
only run single bins in prs 6692892ac3
-
rebase at 0100 GMT d2f0c02017
-
make charts taller abd1664e8d
-
update machine configs and charts 4c02923795
-
206c00f719
fix nightly chart display and machine spec detection
- Fix empty chart: use get_chart_data() instead of to_dict() so JS filters can match config strings ("450", "32000") instead of objects - Capture machine specs on self-hosted runner during build job and pass via --machine-specs flag to nightly append, instead of detecting on the ubuntu-latest publish runner -
chart: make chart series dynamic and unique ebe7de65af
-
rename history file 669dac82a8
-
use better colours in charts f1d53285c3
-
don't use inline html e5d485523c
-
use commit date in chart data points 5b80732c76
-
use nix flake in both publish workflow steps 3dda5b15b9
-
fix nightly-history mismatch 00726a4f40
-
fix instrumented suffixes in reports 13855e7489
-
add clickable plotly links 62eb3470a5
-
use corect path in index 1227da1306
-
use scatter plot for leveldb compaction 3908dbfc7d
-
add debug logs to artifacts 973d6f5ed1
-
dynamic charts test a02242d783
-
fix theme render order 1ae62cb302
-
add ruff and ty to flake d649425335
-
support a full IBD PR run 6809a91b40
-
4ab35c7e2d
Generate static debug.log plots during report generation
Run LogParser + PlotGenerator from bench/analyze.py during artifact copying to produce static PNG charts from debug.log files. This pre-generates the same 11 chart types that were previously rendered client-side via JavaScript. Changes to report.py: - Import HAS_MATPLOTLIB, LogParser, PlotGenerator from bench.analyze - _copy_network_artifacts: generate plots after each debug.log with "{network}-{name}" prefix (e.g. "450-uninstrumented-pr") - _copy_artifacts: generate plots for single-directory mode, including when input_dir == output_dir - _prepare_graphs_data: add "plots" key with relative paths to PNGs - generate(): reorder to copy artifacts before HTML rendering so _prepare_graphs_data can find the generated plot files Plot generation is guarded by HAS_MATPLOTLIB for graceful fallback when matplotlib is unavailable. -
8254ef15c1
Replace client-side debug.log charts with static images
The pr-report.html template previously included debug-log-charts.html which fetched multi-hundred-MB debug.log.gz files in the browser, decompressed them with pako.js, parsed every line, and rendered 11 Plotly charts client-side. This made report pages unresponsive. Now that report.py pre-generates the charts as static PNGs: - pr-report.html: replace the debug-log-charts.html include with an img loop over graph.plots, using loading="lazy" - debug-log-charts.html: delete (344 lines of client-side JS) - base.html: remove pako.js and Plotly CDN scripts (both are independently included by pr-chart.html and nightly-chart.html via their own script tags) The debug.log download link is preserved.
-
daf2270249
Update bench/README.md to reflect current CLI interface
Rewrite to document the TOML config + matrix entry workflow, removing stale references to the old two-commit comparison CLI, --datadir requirement, profiles, and BENCH_DATADIR env var.
-
66c1f835a3
Stop publishing debug.log.gz to gh-pages, link to CI artifacts instead
Debug logs were consuming 388MB on gh-pages. They are already uploaded as CI artifacts with 90-day retention during benchmark runs. - Remove gzip compression and copying of debug logs in report generation - Remove debug log extraction in publish-results workflow - Replace per-graph "Download debug.log" links with a single link to the CI run page where artifacts can be downloaded - Keep matplotlib plot generation from debug logs (plots are still generated during report phase, just the raw logs aren't published)
-
f749534a41
Wait for Pages deployment before commenting on PR
The PR comment with result links was posted before GitHub Pages finished deploying, leading to broken links. Add a wait-for-pages job that polls for the pages-build-deployment run matching our exact gh-pages commit, then blocks until it completes.
-
Sort PR results index numerically instead of lexicographically 201a738c00
-
e00c82f058
set prune height to 1_000_000MB
Previously, prune=10000 was causing flushes of the UTXO set when block pruning was taking please, resulting in logs like: ❯ zcat 32000-instrumented-pr-debug.log.gz | rg UTXO 2026-02-12T07:22:57Z * Using 31990.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space) 2026-02-12T07:28:51Z [warning] Flushing large (2 GiB) UTXO set to disk, it may take several minutes 2026-02-12T07:33:10Z [warning] Flushing large (3 GiB) UTXO set to disk, it may take several minutes 2026-02-12T07:37:23Z [warning] Flushing large (4 GiB) UTXO set to disk, it may take several minutes 2026-02-12T07:42:03Z [warning] Flushing large (4 GiB) UTXO set to disk, it may take several minutes 2026-02-12T07:46:34Z [warning] Flushing large (5 GiB) UTXO set to disk, it may take several minutes 2026-02-12T07:51:10Z [warning] Flushing large (6 GiB) UTXO set to disk, it may take several minutes 2026-02-12T07:55:57Z [warning] Flushing large (7 GiB) UTXO set to disk, it may take several minutes 2026-02-12T08:00:35Z [warning] Flushing large (8 GiB) UTXO set to disk, it may take several minutes 2026-02-12T08:05:16Z [warning] Flushing large (8 GiB) UTXO set to disk, it may take several minutes 2026-02-12T08:10:00Z [warning] Flushing large (8 GiB) UTXO set to disk, it may take several minutes 2026-02-12T08:14:36Z [warning] Flushing large (8 GiB) UTXO set to disk, it may take several minutes 2026-02-12T08:16:47Z [warning] Flushing large (8 GiB) UTXO set to disk, it may take several minutes and generally interrupting benchmarking. Remove this effect by setting prune to such a high value it will never trigger. Prune is **required** to permit us to continue syncing from a pruned datadir.
-
Include prune in nightly chart series key 8f20b4025a
-
Fix numeric sort crash on pr-main directory 25326caa96
-
c9df434340
Restore debug log extraction for PNG plot generation
ec9395419a removed debug log copying to stop publishing raw logs to gh-pages (388MB). But it also removed the extraction step that makes debug logs available during report generation, so matplotlib had no input files and PNG charts silently stopped appearing in PR reports. Restore the copy of debug-logs-${network} artifacts into the results directory before report generation. The raw logs are still not committed to gh-pages — only the small pre-rendered PNGs in plots/ are. -
use local bitcoin node to test region network issues baf6eb5810
-
bcc34acdd0
pin nightly benchmark job order: 450 before 32000
Replace the matrix strategy with explicit sequential jobs so the 450 benchmark always runs first in a consistent cache state, and the 32000 benchmark always runs second.
-
38924e0ee7
run fstrim before each benchmark for consistent SSD performance
Weekly fstrim.timer on the runner caused a ~25% speedup every Monday (Sunday night run). Running fstrim in the prepare script before each benchmark ensures consistent write performance regardless of when the system timer last ran. Follows the same suid wrapper pattern as drop-caches.
-
c19edd12e9
Revert "use local bitcoin node to test region network issues"
This reverts commit fd8bdf64ec654c3dbc8677a2bfffa005cbac5ed0.
-
d52a97db5a
fstrim the mount point, not a subdirectory
FITRIM ioctl requires the filesystem mount point. Resolve it from the tmp_datadir path by walking up to the mount boundary.
-
b2218532f6
show manual nightly re-runs as scatter points on chart
Manual (workflow_dispatch) runs are now stored separately from scheduled nightly runs. Scheduled runs still dedup by (date, commit, dbcache) to handle retries. Manual runs always append, appearing as diamond markers on the chart alongside the nightly trend line. Also ruff format.
-
Compare PR benchmarks against median of last 7 nightly runs f95e18193a
-
f8e57f3a9f
merge manual nightly runs into their series on the chart
Manual (workflow_dispatch) runs no longer get a separate "(manual)" legend entry with diamond markers. They appear as regular points in the same series trace as scheduled runs.
-
68407e21d8
Add assumevalid=0 benchmark runs to PR workflow
Adds a separate benchmark job (benchmark-noav) that runs IBD with -assumevalid=0 to measure full script verification performance. Uses a dedicated TOML config with uninstrumented-only matrix, and prefixes artifacts with noav- so the publish workflow can handle them alongside existing runs.
-
nix: update flamegraph 3d60b1eeaf
-
nix: bump nixpkgs 6d3f03d177
-
bump flakegraph package hashes 7f25b9701e
-
bump GH actions versions d89bff4a55
-
dbffd39257
Add experiment-driven benchmark runner
Move benchmark shape into declarative experiment manifests so subjects, profiles, and derived comparisons can change without invasive workflow edits. This gives PR, nightly, and differential flamegraph runs the same high-level interface while keeping the existing build and benchmark phases as implementation details. Record perf artifacts from instrumented runs and derive flamegraph outputs from the hyperfine cleanup hook. This keeps artifact conversion out of the measured command and gives comparisons a stable raw profile input. Cut PR and nightly workflows over to experiment output trees and drop active no-assume-valid benchmarking. Historical noav result parsing is left in report generation so old published pages continue to render.
-
57e775acc7
Retire matrix benchmark configs
Make experiment manifests the only public benchmark shape. The old run command, BenchmarkConfig module, and bench/configs TOML files duplicated profile semantics now owned by Experiment. Introduce RunSpec as the internal contract consumed by BenchmarkPhase. Nightly history now records config snapshots from experiment manifests instead of loading legacy benchmark configs.
-
f45225cb8b
Add experiment artifact store
Centralize experiment artifact layout and write artifacts.json so workflows and derivations no longer need to duplicate run directory conventions. Update PR publish and nightly append workflows to read result, debug, flamegraph, and profile metadata from the artifact manifest instead of hardcoded experiment-output paths.
-
e7df211964
Split experiment planning from execution
Make experiment selection produce explicit build, run, and comparison tasks before any execution starts. This keeps validation and filtering separate from the runner and gives dry-run output the same source of truth as real runs. The runner now consumes the plan directly, which makes profile-scoped comparison derivations explicit and reduces the amount of scheduler logic embedded in execution.
-
fccff170d2
Replace phase config with environments
Separate process-level execution settings from benchmark run specs so build, benchmark, and experiment phases no longer depend on the broad Config object. The CLI still resolves bench.toml, environment variables, and arguments in one place, then hands phases small environment objects with only the flags and paths they need. Build dry-runs now return before saving or restoring git state.
-
43369bb18f
Report from experiment artifacts
Make CI report generation consume artifacts.json directly instead of rebuilding profile inputs as network-named directories. The report model now carries profile metadata through rendering and combined results output. This removes the old noassumevalid display path and drops the unused multi-network report CLI surface, leaving single-run reports and experiment-manifest reports as the two supported modes.
-
bd59b81b83
Isolate experiment subject resolution
Move commit and binary subject handling behind a resolver so the experiment runner executes a plan without also owning subject acquisition policy. This makes future subject sources, such as prebuilt artifact lookups or named branch refs, a localized change instead of another branch in the runner loop.
-
513034661d
Deepen benchmark CI result interfaces
Move CI-facing result selection into benchcoin so workflow code no longer has to understand artifact manifest internals, profile naming, or report JSON shape. Recording run config snapshots in artifacts keeps dbcache and instrumentation identity local to the experiment output, which makes publishing and nightly history less brittle.
-
e3ce1b8175
Load experiment artifacts through catalog
Report generation and nightly history should not know the raw artifacts.json run schema. A typed catalog interface keeps path resolution and manifest field knowledge local to ArtifactStore, so future artifact layout changes have one place to update.
-
align times and runs 23c67b929a
-
db6ebd275e
Increase nightly benchmark checkout depth
The nightly benchmark derives the Bitcoin commit by running merge-base against upstream/master. The current benchcoin stack is deeper than the old shallow checkout, so merge-base failed before the experiment could start. Use a bounded but larger fetch depth to keep the job lightweight while covering the current stack.
-
185c08e088
Report experiment run times by config
Use experiment config snapshots when formatting PR report labels and summaries so profile-specific bitcoind arguments are visible in published results. This keeps default nightly-comparable runs on the existing comparison path while allowing exploratory matrices without matching nightly baselines to publish their raw run times.
-
ae1f201a43
Darken chart palette for tooltip contrast
Plotly can render hover and legend text using trace colors on white surfaces. The previous palette included very light entries, especially the lime series, which made labels hard to read. Keep the existing ten-slot palette and deterministic color indexes, but replace each slot with a darker same-hue color that clears normal text contrast against white.
-
f1180c90f3
Update report summary test label
The report summary formatter now uses config snapshot labels so PR comments preserve dbcache units and any extra bitcoind arguments consistently. Refresh the CI interface assertion to match that canonical label instead of the older display-only "450 MB" spelling.
-
642ec43cfd
test: add shared SipHash vectors
Add deterministic fixed-width and block-sequence SipHash-2-4 vectors before refactoring the implementation. Validate the shared JSON with `CSipHasher`, the applicable `PresaltedSipHasher` overloads, and the independent Python implementation. Move randomized generic/fixed comparisons to the integer fuzzer. The later SipHash-1-3-UJ tests can add expected outputs and comparisons to the same inputs. Migrating the separate 0-63-byte `siphash_4_2_testvec` incremental-write test to JSON is out of scope. Co-authored-by: Pieter Wuille <pieter@wuille.net>
-
f39a5183ee
refactor: simplify adding SipHash variants
Make the new SipHash-1-3-UJ construction smaller and easier to verify by extracting the round, normal-block, and finalization logic duplicated across `CSipHasher` and the fixed-width `PresaltedSipHasher` paths. The following commits can then focus on the differences from SipHash-2-4. Co-authored-by: Pieter Wuille <pieter@wuille.net>
-
fe0ec599ca
crypto: add generic SipHash-1-3-UJ
Add `SipHasher13UJ`, a block-oriented SipHash-1-3-UJ implementation accepting arbitrarily mixed 64-bit normal blocks and 256-bit jumboblocks. Use this generic interface as the executable specification for the fixed-width implementation added next. Co-authored-by: Lőrinc <pap.lorinc@gmail.com> Co-authored-by: Jean-Philippe Aumasson <jeanphilippe.aumasson@gmail.com>
-
19782c177b
crypto: add fixed-width SipHash-1-3-UJ
Add `PresaltedSipHasher13UJ` for one `uint256` jumboblock, optionally followed by one 64-bit normal block. Implement these paths directly in the header because the new hasher benefits from inlining, unlike the existing SipHash implementation. Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
-
813c6177c2
test: add SipHash-1-3-UJ coverage
Add SipHash-1-3-UJ expected outputs to the shared vectors and check block-encoding invariants and that the standard and UJ finalizers remain distinct. Compare the generic and fixed-width implementations for every overlapping input and fuzz the same equivalence. The UJ expected outputs were generated by a reference implementation that Claude Opus 4.8 produced from only the `SipHasher13UJ` class comment. Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
-
fc6c0802dc
bench: add fixed-width SipHash benchmarks
Add 32- and 36-byte benchmarks for SipHash-2-4 and SipHash-1-3-UJ after establishing their shared correctness coverage. Keep all four measurements together so both fixed shapes can be compared before changing `SaltedOutpointHasher`. Co-authored-by: Pieter Wuille <pieter@wuille.net>
-
f22d89a5c6
coins: use SipHash-1-3-UJ for outpoint hashing
Switch `SaltedOutpointHasher` to `PresaltedSipHasher13UJ`, accelerating the coins cache and other in-memory outpoint tables while preserving the public wrapper type. Its salted outputs are process-local and must not be persisted, serialized, or compared across processes. Co-authored-by: Pieter Wuille <pieter@wuille.net>
- andrewtoth closed this on Jul 16, 2026
-
l0rinc commented at 11:21 PM on July 16, 2026: contributor
You forgot to delete AssumeUTXO and the GUI
Contributors