Skip to content

Conversation

@Elvis339
Copy link
Contributor

@Elvis339 Elvis339 commented Nov 27, 2025

Why

Track C-Chain reexecution benchmark performance over time. Catch regressions before production.

Closes #1494

How

Firewood → triggers AvalancheGo benchmark → downloads results → publishes to GitHub Pages

Screenshot 2026-01-27 at 16 12 02

Changes

  • scripts/bench-cchain-reexecution.sh

    • Trigger AvalancheGo's C-Chain reexecution benchmark
    • Poll for workflow registration
    • Wait for completion and download artifacts
  • .github/workflows/track-performance.yml

    • Orchestrate benchmark trigger via the script
    • Publish results to GitHub Pages (main → bench/, branches → dev/bench/{branch}/)

Usage

# Auth
nix run ./ffi#gh -- auth login
export GH_TOKEN=$(nix run ./ffi#gh -- auth token)

# Predefined test
./scripts/bench-cchain-reexecution.sh trigger firewood-101-250k

# With specific Firewood version
FIREWOOD_REF=v0.0.18 ./scripts/bench-cchain-reexecution.sh trigger firewood-101-250k

# Custom block range
RUNNER=avalanche-avalanchego-runner-2ti \
FIREWOOD_REF=v0.0.18 \
CONFIG=firewood \
START_BLOCK=1 \
END_BLOCK=100 \
BLOCK_DIR_SRC=cchain-mainnet-blocks-200-ldb \
./scripts/bench-cchain-reexecution.sh trigger

# Other commands
./scripts/bench-cchain-reexecution.sh tests    # list available tests
./scripts/bench-cchain-reexecution.sh list     # list recent runs
./scripts/bench-cchain-reexecution.sh status <run_id>
  • Set FIREWOOD_REF=v0.0.18 explicitly. Without it, the workflow builds from HEAD, which currently fails due to changes in FFI layer

Related

AvalancheGo: ava-labs/avalanchego#4650
Local iteration PR: #1642
Followup: #1639

Implements workflow to trigger C-Chain reexecution benchmarks in AvalancheGo
and track Firewood performance over time. Supports task-based and custom
parameter modes. Results stored in GitHub Pages via github-action-benchmark.
@Elvis339 Elvis339 changed the title Es/enable firewood dev workflow ci: Track Firewood Performance via AvalancheGo Benchmarks Nov 27, 2025
@Elvis339 Elvis339 changed the title ci: Track Firewood Performance via AvalancheGo Benchmarks ci(perf): Track Firewood Performance via AvalancheGo Benchmarks Nov 27, 2025
@Elvis339 Elvis339 marked this pull request as ready for review November 27, 2025 15:04
@Elvis339
Copy link
Contributor Author

Elvis339 commented Nov 27, 2025

@Elvis339 Elvis339 marked this pull request as draft November 27, 2025 15:11
@Elvis339 Elvis339 self-assigned this Dec 1, 2025
@Elvis339 Elvis339 marked this pull request as ready for review December 2, 2025 20:32
@Elvis339 Elvis339 requested a review from alarso16 as a code owner December 4, 2025 17:17
@Elvis339 Elvis339 requested a review from rkuris January 26, 2026 14:58
@Elvis339 Elvis339 marked this pull request as ready for review January 26, 2026 16:39
"**/tests/compile_*/**",
"justfile",
"scripts/run-just.sh",
"scripts/**",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added new benchmark script (bench-cchain-reexecution.sh) which
caused CI to fail with "Config does not cover the file". Shell
scripts aren't checked for license content (only .rs/.go/.h are),
but must be explicitly listed in the config. Exclude entire
scripts/ directory to avoid listing each script individually.

https://github.com/ava-labs/firewood/blob/main/.github/check-license-headers.yaml

Copy link
Member

@rkuris rkuris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Early review, could use another pass

There's a lot of code here and I barely was able to complete the review in my maximum review time. Please consider breaking this up for more timely reviews, especially if the review is anything larger than this.

I'm also a little confused about how we track which firewood and avalanchego versions we ran the test against.

Let's say the performance loss was due to a change in avalanchego, how can we know that?

Remove local developer tooling (justfile recipe, flake.nix, METRICS.md)
to reduce PR scope. These will be submitted in a follow-up PR after
the CI workflow changes are merged.
@Elvis339
Copy link
Contributor Author

Elvis339 commented Jan 26, 2026

Early review, could use another pass

There's a lot of code here and I barely was able to complete the review in my maximum review time. Please consider breaking this up for more timely reviews, especially if the review is anything larger than this.

I'm also a little confused about how we track which firewood and avalanchego versions we ran the test against.

Let's say the performance loss was due to a change in avalanchego, how can we know that?

I've split into two PRs per your feedback:

  • This PR (CI): Workflows, benchmark script, license config
  • #1642 (Local tooling): justfile recipe, METRICS.md docs, flake.nix

On version tracking github-action-benchmark stores time-series data (mgas/s over time) without version metadata tracing a regression requires digging through run history.

This is a conscious tradeoff to get data flowing now with minimal setup, then iterate to something more robust (S3 storage, richer metadata, export for analysis). Planning to revisit after ~2 weeks of data collection.

For now, each run logs Firewood / Avalanchego refs in the GitHub Actions summary, so the info exists just not queryable. Added your concern to the tracking doc as something to think through for the next iteration. How does that sound?

Summary example: https://github.com/ava-labs/firewood/actions/runs/21334552166

@Elvis339 Elvis339 removed the DO NOT MERGE This PR is not meant to be merged in its current state label Jan 27, 2026
@Elvis339
Copy link
Contributor Author

Executing:

RUNNER=avalanche-avalanchego-runner-2ti \
FIREWOOD_REF=v0.0.18 \
CONFIG=firewood \
START_BLOCK=1 \
END_BLOCK=100 \
BLOCK_DIR_SRC=cchain-mainnet-blocks-200-ldb \
./scripts/bench-cchain-reexecution.sh trigger

Triggered reexecution benchmark in AvalancheGo https://github.com/ava-labs/avalanchego/actions/runs/21408080471

Copy link
Contributor

@RodrigoVillar RodrigoVillar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving on the condition that #1493 (comment) be addressed

@Elvis339
Copy link
Contributor Author

Approving on the condition that #1493 (comment) be addressed

Thank you, it was addressed:

@Elvis339 Elvis339 merged commit 06c4d0a into main Jan 28, 2026
51 checks passed
@Elvis339 Elvis339 deleted the es/enable-firewood-dev-workflow branch January 28, 2026 17:24
@RodrigoVillar
Copy link
Contributor

@Elvis339 I meant this:

help Show this help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track Firewood Performance via AvalancheGo Reexecution Benchmarks

4 participants