Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
d0d912c
WIP
mediocregopher Mar 20, 2026
aa3fc7c
feat(engine): support env_switches in reth_newPayload for mid-block E…
mediocregopher Mar 20, 2026
900e271
feat(reth-bench): rewrite generate-big-block to use env_switches
mediocregopher Mar 20, 2026
679b06f
fix: skip block hash validation for zero-hash payloads
mediocregopher Mar 20, 2026
1a3c3dd
fix: strip blob transactions from merged big block payloads
mediocregopher Mar 20, 2026
0539654
fix: zero blob_gas_used and excess_blob_gas after stripping blob txs
mediocregopher Mar 20, 2026
0b068a8
fix: keep excess_blob_gas unchanged when stripping blob txs
mediocregopher Mar 20, 2026
3f6d3c8
fix: skip post-execution validation for big blocks with env_switches
mediocregopher Mar 20, 2026
9a16129
fix: reset receipt tracking and use global tx index across env_switch…
mediocregopher Mar 20, 2026
5b4b4de
fix: skip FCU for big blocks with zero block hash
mediocregopher Mar 20, 2026
b78f74f
fix: enable state root checking for env_switches and compute real blo…
mediocregopher Mar 21, 2026
2ee4d70
fix: keep blob transactions and merge versioned hashes instead of str…
mediocregopher Mar 21, 2026
f2f4689
fix(engine): use correct execution context for env_switch segments
mediocregopher Mar 21, 2026
664aebb
refactor(reth-bench): remove legacy zero-hash payload fallback
mediocregopher Mar 21, 2026
bbada8f
feat(reth-bench): support sequential big block chaining
mediocregopher Mar 21, 2026
b7d0936
fix(engine): skip parent header validation for env_switch blocks
mediocregopher Mar 21, 2026
a29c30f
fix(engine): fix big block env_switches execution bugs
mediocregopher Mar 21, 2026
e8d9b83
fix(engine): fix state root task premature finalization and blob vali…
mediocregopher Mar 21, 2026
28a8198
feat(reth-bench): sequential big block chaining with BLOCKHASH and bl…
Mar 22, 2026
0fe4478
refactor(engine): simplify big block prior_block_hashes plumbing
mediocregopher Mar 23, 2026
d9a5fe4
feat(bench): derive excess_blob_gas for chained big blocks and re-ena…
mediocregopher Mar 23, 2026
15423a5
feat(engine): re-enable validate_block_pre_execution_with_tx_root for…
mediocregopher Mar 23, 2026
03427a7
feat(bench): compute correct receipts_root and validate gas_used for …
mediocregopher Mar 23, 2026
7900eca
refactor: fix receipt cumulative gas at source, remove env_switches v…
mediocregopher Mar 23, 2026
98378c0
perf: apply gas offset when streaming receipts to background root task
mediocregopher Mar 23, 2026
8e8f60e
chore: add --testing.skip-requests-hash-check to e2e big blocks script
mediocregopher Mar 23, 2026
6140eb2
refactor: use --target-gas instead of --count for big block generation
mediocregopher Mar 23, 2026
8328cfc
bench(ci): reuse cached big-block fixtures and select snapshot from m…
mediocregopher Mar 23, 2026
0611463
feat: add --testing.skip-requests-hash-check flag
mediocregopher Mar 23, 2026
d00c62b
rm BIG_BLOCK_VALIDATION.md
mediocregopher Mar 23, 2026
341c078
Merge remote-tracking branch 'origin/main' into mediocregopher/2k-big…
mediocregopher Mar 23, 2026
cc3d58e
docs: add big block payload validator changes document
mediocregopher Mar 23, 2026
5bc85b2
fix: cap prior_block_hashes to 256 entries
mediocregopher Mar 23, 2026
cc5f2ba
feat: add reth-bb binary for big block payload execution
mediocregopher Mar 24, 2026
b90c152
Rm brian-test
mediocregopher Mar 24, 2026
b8ef906
feat(reth-bb): implement BbEngineValidator with multi-segment execution
mediocregopher Mar 24, 2026
2957545
refactor: expose BasicEngineValidator internals for external use
mediocregopher Mar 24, 2026
0d94fc4
rm docs/big-block-payload-validator-changes.md
mediocregopher Mar 24, 2026
e9b536c
refactor(reth-bb): simplify BlockExecutionPlan to always include firs…
mediocregopher Mar 24, 2026
fc3ec7d
bench(ci): use separate schelk datadir for big-block snapshots
mediocregopher Mar 24, 2026
9579099
fix(reth-bb): correct inter-segment BLOCKHASH seeding and gas accounting
mediocregopher Mar 24, 2026
51e2c79
refactor: replace StateHookSender with explicit finish_state_updates
mediocregopher Mar 24, 2026
6142f06
refactor: extract BlockExecutorStrategy trait from BasicEngineValidator
mediocregopher Mar 24, 2026
612b167
chore: merge main, resolve reth-bench conflict (keep ours)
mediocregopher Mar 24, 2026
5d3767a
refactor: restrict visibility of BasicEngineValidator internals
mediocregopher Mar 24, 2026
bc0a7cd
chore: revert unrelated dead_code attribute on parse_gas_limit
mediocregopher Mar 24, 2026
066bfb4
refactor: rename BlockExecutorStrategy and DefaultBlockExecutor
mediocregopher Mar 24, 2026
0232b15
chore: remove --testing.skip-gas-limit-ramp-check CLI flag
mediocregopher Mar 24, 2026
1789c87
feat: accept K/M/G suffixes for --target-gas in generate-big-block
mediocregopher Mar 24, 2026
9dcf184
docs: add README for reth-bb
mediocregopher Mar 24, 2026
48ca0ef
docs: remove unwind step from reth-bb README
mediocregopher Mar 24, 2026
379cf9b
README updates
mediocregopher Mar 24, 2026
e284a8f
Revert workflow changes
mediocregopher Mar 24, 2026
0877401
remove e2e test script
mediocregopher Mar 24, 2026
201347a
fix: resolve CI failures for reth-bb
mediocregopher Mar 24, 2026
98acbcf
refactor: replace ExecuteBlockResult type alias with ExecuteBlockOutc…
mediocregopher Mar 24, 2026
28f5c76
fix: add Debug impl for ExecuteBlockOutcome
mediocregopher Mar 24, 2026
0bb90c6
fix: resolve clippy warnings in reth-bb and reth-bench
mediocregopher Mar 24, 2026
f401726
fix: call finish_state_updates in test_state_root test
mediocregopher Mar 24, 2026
68eb04d
feat(bench): separate big-blocks param, use brian-test manifest, use …
mediocregopher Mar 25, 2026
ff3d95e
fix(bench): gracefully handle chain tip in big block generation
mediocregopher Mar 25, 2026
748e8c9
fix(bench): use -p reth-bb instead of --bin reth-bb in build script
mediocregopher Mar 25, 2026
3ce14f0
fix(bench): only build reth-bb for big blocks, reth otherwise
mediocregopher Mar 25, 2026
b720dd7
merge: integrate big-blocks snapshot selection from #23193
mediocregopher Mar 25, 2026
b596ffd
fix(consensus): add skip_requests_hash_check to EthBeaconConsensus
mediocregopher Mar 25, 2026
4b40032
fix(reth-bb): execute empty segments for system contract calls
mediocregopher Mar 25, 2026
e940810
fix(reth-bb): remove extra EngineApiMessageVersion arg from fork_choi…
mediocregopher Mar 25, 2026
7f35a3a
fix(consensus): collapse nested if to satisfy clippy collapsible_if
mediocregopher Mar 25, 2026
c37aa8c
fix(bench): use nested or-pattern to satisfy clippy unnested_or_patterns
mediocregopher Mar 25, 2026
34687ab
Merge remote-tracking branch 'origin/main' into mediocregopher/2k-big…
mediocregopher Mar 25, 2026
87cccbb
support wait_time in replay-payloads
mediocregopher Mar 25, 2026
cac20bc
Merge remote-tracking branch 'origin/main' into mediocregopher/2k-big…
mediocregopher Mar 26, 2026
ed351c1
fix(reth-bb): segment boundary handling for big-block execution
mediocregopher Mar 28, 2026
1fa6a42
refactor: remove EngineValidatorBlockExecutor abstraction from payloa…
mediocregopher Mar 28, 2026
9db21a1
Merge remote-tracking branch 'origin/main' into mediocregopher/2k-big…
mediocregopher Mar 30, 2026
4593e11
refactor(reth-bb): use finish/reconstruct for segment boundaries
mediocregopher Mar 30, 2026
436fc68
fix(reth-bb): use real gas limits and fix cumulative_gas_used in rece…
mediocregopher Mar 30, 2026
65f17f3
fix(reth-bb): use real gas limits and fix cumulative_gas_used in rece…
mediocregopher Mar 30, 2026
b9b117a
fix(reth-bb): preserve state hook across segment boundaries
mediocregopher Mar 30, 2026
ac142bb
fix: resolve CI failures - missing fork_choice_updated arg, collapsib…
mediocregopher Mar 30, 2026
a29824c
fix: add missing EngineApiMessageVersion arg in bsc-p2p example
mediocregopher Mar 30, 2026
f69399d
Merge remote-tracking branch 'origin/main' into mediocregopher/2k-big…
mediocregopher Mar 30, 2026
7ba69b8
fix: restore missing .. in bsc-p2p ForkchoiceUpdated pattern
mediocregopher Mar 30, 2026
5bfe254
fix(reth-bb): fix unresolved doc link for execute_transaction
mediocregopher Mar 30, 2026
42f0ad7
fix: add missing version field to BeaconEngineMessage in engine tree …
mediocregopher Mar 30, 2026
2d03932
fix: resolve clippy warnings in reth-bb evm.rs
mediocregopher Mar 30, 2026
20d1cd3
Merge remote-tracking branch 'origin/main' into mediocregopher/2k-big…
mediocregopher Mar 30, 2026
d7e914c
refactor: remove unnecessary version field from BeaconEngineMessage::…
mediocregopher Mar 30, 2026
81d7428
fix: move staged plan from EVM factory to executor factory
mediocregopher Mar 30, 2026
8ac2a8e
fix(bb): skip post-execution validation for big blocks
mediocregopher Mar 30, 2026
9ac57df
Revert "fix(bb): skip post-execution validation for big blocks"
mediocregopher Mar 30, 2026
fdba314
debug(bb): add gas accounting logs at segment boundaries
mediocregopher Mar 30, 2026
df1074a
fix(bb): reseed block hash cache per segment to fix BLOCKHASH collisions
mediocregopher Mar 30, 2026
0d00672
fix: resolve clippy empty-line-after-doc-comments in reth-bb
mediocregopher Mar 31, 2026
1dcc6e5
fix(bench): restore --wait-for-persistence CLI arg in replay-payloads
mediocregopher Mar 31, 2026
14acdc8
remove test buckets
mediocregopher Mar 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 31 additions & 18 deletions .github/scripts/bench-reth-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,28 @@
# optional branch-sha is the PR head commit for cache key
#
# Outputs:
# baseline: <source-dir>/target/profiling/reth
# feature: <source-dir>/target/profiling/reth, reth-bench installed to cargo bin
# baseline: <source-dir>/target/profiling/reth (or reth-bb if BENCH_BIG_BLOCKS=true)
# feature: <source-dir>/target/profiling/reth (or reth-bb), reth-bench installed to cargo bin
#
# Required: mc (MinIO client) with a configured alias
# Optional env: BENCH_BIG_BLOCKS (true/false) — build reth-bb instead of reth
set -euo pipefail

MC="mc"
MODE="$1"
SOURCE_DIR="$2"
COMMIT="$3"

BIG_BLOCKS="${BENCH_BIG_BLOCKS:-false}"
# The node binary to build: reth-bb for big blocks, reth otherwise
if [ "$BIG_BLOCKS" = "true" ]; then
NODE_BIN="reth-bb"
NODE_PKG="-p reth-bb"
else
NODE_BIN="reth"
NODE_PKG="--bin reth"
fi

# Tracy support: when BENCH_TRACY is "on" or "full", add Tracy cargo features
# and frame pointers for accurate stack traces.
EXTRA_FEATURES=""
Expand Down Expand Up @@ -62,18 +73,18 @@ case "$MODE" in
mkdir -p "${SOURCE_DIR}/target/profiling"

CACHE_VALID=false
if $MC stat "${BUCKET}/reth" &>/dev/null; then
echo "Cache hit for baseline (${COMMIT}), downloading binary..."
$MC cp "${BUCKET}/reth" "${SOURCE_DIR}/target/profiling/reth"
chmod +x "${SOURCE_DIR}/target/profiling/reth"
if verify_binary "${SOURCE_DIR}/target/profiling/reth" "${COMMIT}"; then
if $MC stat "${BUCKET}/${NODE_BIN}" &>/dev/null; then
echo "Cache hit for baseline (${COMMIT}), downloading ${NODE_BIN}..."
$MC cp "${BUCKET}/${NODE_BIN}" "${SOURCE_DIR}/target/profiling/${NODE_BIN}"
chmod +x "${SOURCE_DIR}/target/profiling/${NODE_BIN}"
if verify_binary "${SOURCE_DIR}/target/profiling/${NODE_BIN}" "${COMMIT}"; then
CACHE_VALID=true
else
echo "Cached baseline binary is stale, rebuilding..."
fi
fi
if [ "$CACHE_VALID" = false ]; then
echo "Building baseline (${COMMIT}) from source..."
echo "Building baseline ${NODE_BIN} (${COMMIT}) from source..."
cd "${SOURCE_DIR}"
FEATURES_ARG=""
WORKSPACE_ARG=""
Expand All @@ -84,8 +95,8 @@ case "$MODE" in
fi
# shellcheck disable=SC2086
RUSTFLAGS="-C target-cpu=native${EXTRA_RUSTFLAGS}" \
cargo build --profile profiling --bin reth $WORKSPACE_ARG $FEATURES_ARG
$MC cp target/profiling/reth "${BUCKET}/reth"
cargo build --profile profiling $NODE_PKG $WORKSPACE_ARG $FEATURES_ARG
$MC cp "target/profiling/${NODE_BIN}" "${BUCKET}/${NODE_BIN}"
fi
;;

Expand All @@ -94,32 +105,34 @@ case "$MODE" in
BUCKET="minio/reth-binaries/${BRANCH_SHA}${BUILD_SUFFIX}"

CACHE_VALID=false
if $MC stat "${BUCKET}/reth" &>/dev/null && $MC stat "${BUCKET}/reth-bench" &>/dev/null; then
if $MC stat "${BUCKET}/${NODE_BIN}" &>/dev/null && $MC stat "${BUCKET}/reth-bench" &>/dev/null; then
echo "Cache hit for ${BRANCH_SHA}, downloading binaries..."
mkdir -p "${SOURCE_DIR}/target/profiling"
$MC cp "${BUCKET}/reth" "${SOURCE_DIR}/target/profiling/reth"
$MC cp "${BUCKET}/${NODE_BIN}" "${SOURCE_DIR}/target/profiling/${NODE_BIN}"
$MC cp "${BUCKET}/reth-bench" /home/ubuntu/.cargo/bin/reth-bench
chmod +x "${SOURCE_DIR}/target/profiling/reth" /home/ubuntu/.cargo/bin/reth-bench
if verify_binary "${SOURCE_DIR}/target/profiling/reth" "${COMMIT}"; then
chmod +x "${SOURCE_DIR}/target/profiling/${NODE_BIN}" /home/ubuntu/.cargo/bin/reth-bench
if verify_binary "${SOURCE_DIR}/target/profiling/${NODE_BIN}" "${COMMIT}"; then
CACHE_VALID=true
else
echo "Cached feature binary is stale, rebuilding..."
fi
fi
if [ "$CACHE_VALID" = false ]; then
echo "Building feature (${COMMIT}) from source..."
echo "Building feature ${NODE_BIN} (${COMMIT}) from source..."
cd "${SOURCE_DIR}"
rustup show active-toolchain || rustup default stable
if [ -n "$EXTRA_FEATURES" ]; then
# Can't use `make profiling` when adding features; build explicitly
# --workspace is needed for cross-package feature syntax (tracy-client/ondemand)
RUSTFLAGS="-C target-cpu=native${EXTRA_RUSTFLAGS}" \
cargo build --profile profiling --workspace --bin reth --features "${EXTRA_FEATURES}"
cargo build --profile profiling --workspace $NODE_PKG --features "${EXTRA_FEATURES}"
else
make profiling
# shellcheck disable=SC2086
RUSTFLAGS="-C target-cpu=native${EXTRA_RUSTFLAGS}" \
cargo build --profile profiling $NODE_PKG
fi
make install-reth-bench
$MC cp target/profiling/reth "${BUCKET}/reth"
$MC cp "target/profiling/${NODE_BIN}" "${BUCKET}/${NODE_BIN}"
$MC cp "$(which reth-bench)" "${BUCKET}/reth-bench"
fi
;;
Expand Down
17 changes: 10 additions & 7 deletions .github/scripts/bench-reth-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ if "$BINARY" node --help 2>/dev/null | grep -qF -- '--debug.startup-sync-state-i
SYNC_STATE_IDLE=true
fi

# Big blocks mode requires the testing API, skip-invalid-transactions, and
# skip-gas-limit-ramp-check + gas-limit override to avoid the 6800-block ramp.
if [ "$BIG_BLOCKS" = "true" ]; then
RETH_ARGS+=(--http.api eth,net,web3,reth,testing --rpc.max-request-size max --testing.skip-invalid-transactions --testing.skip-gas-limit-ramp-check --testing.gas-limit 1000000000)
fi

# Append per-label extra node args (baseline or feature)
EXTRA_NODE_ARGS=""
case "$LABEL" in
Expand Down Expand Up @@ -266,9 +260,18 @@ if [ "$BIG_BLOCKS" = "true" ]; then
sleep 0.5 # give tracy-capture time to connect
fi

BB_BENCH_ARGS=(--reth-new-payload --wait-for-persistence)
if [ -n "${BENCH_WAIT_TIME:-}" ]; then
BB_BENCH_ARGS+=(--wait-time "$BENCH_WAIT_TIME")
fi
# Limit number of payloads if blocks count is specified
if [ "${BENCH_BLOCKS:-0}" -gt 0 ] 2>/dev/null; then
BB_BENCH_ARGS+=(--count "$BENCH_BLOCKS")
fi

echo "Running big blocks benchmark (replay-payloads)..."
$BENCH_NICE "$RETH_BENCH" replay-payloads \
"${EXTRA_BENCH_ARGS[@]}" \
"${BB_BENCH_ARGS[@]}" \
--payload-dir "$BIG_BLOCKS_DIR/payloads" \
--engine-rpc-url http://127.0.0.1:8551 \
--jwt-secret "$DATADIR/jwt.hex" \
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/check_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ exclude_crates=(
reth-ress-provider
# The following are not supposed to be working
reth # all of the crates below
reth-bb # binary-only, uses tokio features unsupported on wasm
reth-storage-rpc-provider
reth-invalid-block-hooks # reth-provider
reth-libmdbx # mdbx
Expand Down
58 changes: 33 additions & 25 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ on:
workflow_dispatch:
inputs:
blocks:
description: "Number of blocks to benchmark (or 'big' for big blocks mode)"
description: "Number of blocks to benchmark"
required: false
default: "500"
type: string
big_blocks:
description: "Use big blocks mode (pre-generated merged payloads with reth-bb)"
required: false
default: "false"
type: boolean
warmup:
description: "Number of warmup blocks"
required: false
Expand Down Expand Up @@ -152,7 +157,7 @@ jobs:
samply = '${{ github.event.inputs.samply }}' === 'true' ? 'true' : 'false';
var noSlack = '${{ github.event.inputs.no_slack }}' !== 'false' ? 'true' : 'false';
cores = '${{ github.event.inputs.cores }}' || '0';
bigBlocks = blocks === 'big' ? 'true' : 'false';
bigBlocks = '${{ github.event.inputs.big_blocks }}' === 'true' ? 'true' : 'false';
var rethNewPayload = '${{ github.event.inputs.reth_newPayload }}' !== 'false' ? 'true' : 'false';
var abba = '${{ github.event.inputs.abba }}' !== 'false' ? 'true' : 'false';
var otlp = '${{ github.event.inputs.otlp }}' !== 'false' ? 'true' : 'false';
Expand All @@ -178,14 +183,13 @@ jobs:
actor = context.payload.comment.user.login;

const body = context.payload.comment.body.trim();
const intArgs = new Set(['warmup', 'cores']);
const intOrKeywordArgs = new Map([['blocks', new Set(['big'])]]);
const intArgs = new Set(['warmup', 'cores', 'blocks']);
const refArgs = new Set(['baseline', 'feature']);
const boolArgs = new Set(['samply', 'no-slack']);
const boolArgs = new Set(['samply', 'no-slack', 'big-blocks']);
const boolDefaultTrue = new Set(['reth_newPayload', 'abba', 'otlp']);
const durationArgs = new Set(['wait-time']);
const stringArgs = new Set(['baseline-args', 'feature-args']);
const defaults = { blocks: '500', warmup: '100', baseline: '', feature: '', samply: 'false', 'no-slack': 'false', cores: '0', reth_newPayload: 'true', abba: 'true', otlp: 'true', 'wait-time': '', 'baseline-args': '', 'feature-args': '' };
const defaults = { blocks: '500', warmup: '100', baseline: '', feature: '', samply: 'false', 'no-slack': 'false', 'big-blocks': 'false', cores: '0', reth_newPayload: 'true', abba: 'true', otlp: 'true', 'wait-time': '', 'baseline-args': '', 'feature-args': '' };
const unknown = [];
const invalid = [];
const args = body.replace(/^(?:@decofe|derek) bench\s*/, '');
Expand Down Expand Up @@ -230,15 +234,6 @@ jobs:
} else {
defaults[key] = value;
}
} else if (intOrKeywordArgs.has(key)) {
const keywords = intOrKeywordArgs.get(key);
if (keywords.has(value)) {
defaults[key] = value;
} else if (/^\d+$/.test(value)) {
defaults[key] = value;
} else {
invalid.push(`\`${key}=${value}\` (must be a positive integer or one of: ${[...keywords].join(', ')})`);
}
} else if (refArgs.has(key)) {
if (!value) {
invalid.push(`\`${key}=\` (must be a git ref)`);
Expand All @@ -255,7 +250,7 @@ jobs:
if (unknown.length) errors.push(`Unknown argument(s): \`${unknown.join('`, `')}\``);
if (invalid.length) errors.push(`Invalid value(s): ${invalid.join(', ')}`);
if (errors.length) {
const msg = `❌ **Invalid bench command**\n\n${errors.join('\n')}\n\n**Usage:** \`@decofe bench [blocks=N|big] [warmup=N] [baseline=REF] [feature=REF] [samply] [no-slack] [cores=N] [reth_newPayload=true|false] [abba=true|false] [otlp=true|false] [wait-time=DURATION] [baseline-args="..."] [feature-args="..."]\``;
const msg = `❌ **Invalid bench command**\n\n${errors.join('\n')}\n\n**Usage:** \`@decofe bench [blocks=N] [big-blocks] [warmup=N] [baseline=REF] [feature=REF] [samply] [no-slack] [cores=N] [reth_newPayload=true|false] [abba=true|false] [otlp=true|false] [wait-time=DURATION] [baseline-args="..."] [feature-args="..."]\``;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -272,7 +267,7 @@ jobs:
samply = defaults.samply;
var noSlack = defaults['no-slack'];
cores = defaults.cores;
bigBlocks = blocks === 'big' ? 'true' : 'false';
bigBlocks = defaults['big-blocks'];
var rethNewPayload = defaults.reth_newPayload;
var abba = defaults.abba;
var otlp = defaults.otlp;
Expand Down Expand Up @@ -508,6 +503,7 @@ jobs:
BENCH_OTLP: ${{ needs.reth-bench-ack.outputs.otlp }}
BENCH_COMMENT_ID: ${{ needs.reth-bench-ack.outputs.comment-id }}
BENCH_NO_SLACK: ${{ needs.reth-bench-ack.outputs.no-slack }}
BENCH_NODE_BIN: ${{ needs.reth-bench-ack.outputs.big-blocks == 'true' && 'reth-bb' || 'reth' }}
BENCH_METRICS_ADDR: "127.0.0.1:9100"
BENCH_OTLP_TRACES_ENDPOINT: ${{ needs.reth-bench-ack.outputs.otlp != 'false' && secrets.BENCH_OTLP_TRACES_ENDPOINT || '' }}
BENCH_OTLP_LOGS_ENDPOINT: ${{ needs.reth-bench-ack.outputs.otlp != 'false' && secrets.BENCH_OTLP_LOGS_ENDPOINT || '' }}
Expand Down Expand Up @@ -825,7 +821,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BENCH_REPO: ${{ github.repository }}
BENCH_RETH_BINARY: ${{ github.workspace }}/../reth-feature/target/profiling/reth
BENCH_RETH_BINARY: ${{ github.workspace }}/../reth-feature/target/profiling/${{ needs.reth-bench-ack.outputs.big-blocks == 'true' && 'reth-bb' || 'reth' }}
run: .github/scripts/bench-reth-snapshot.sh

# System tuning for reproducible benchmarks
Expand Down Expand Up @@ -891,11 +887,23 @@ jobs:
exit 0
fi
MC="mc --config-dir /home/ubuntu/.mc"
BUCKET="minio/reth-snapshots/reth-1-minimal-stable-big-blocks.tar.zst"
MANIFEST="minio/reth-snapshots/reth-1-minimal-stable-big-blocks.json"
rm -rf "$BIG_BLOCKS_DIR"; mkdir -p "$BIG_BLOCKS_DIR"
echo "Downloading big blocks from $BUCKET..."
$MC cat "$BUCKET" | pzstd -d -p 6 | tar -xf - -C "$BIG_BLOCKS_DIR"

# Download and parse manifest
echo "Downloading manifest from $MANIFEST..."
$MC cat "$MANIFEST" > "$BIG_BLOCKS_DIR/manifest.json"
UPLOAD_PATH=$(jq -r '.upload_path' "$BIG_BLOCKS_DIR/manifest.json")
COUNT=$(jq -r '.count' "$BIG_BLOCKS_DIR/manifest.json")
TARGET_GAS=$(jq -r '.target_gas' "$BIG_BLOCKS_DIR/manifest.json")
echo "Manifest: count=$COUNT, target_gas=$TARGET_GAS, archive=$UPLOAD_PATH"

# Download and extract archive
ARCHIVE="minio/$UPLOAD_PATH"
echo "Downloading big blocks from $ARCHIVE..."
$MC cat "$ARCHIVE" | pzstd -d -p 6 | tar -xf - -C "$BIG_BLOCKS_DIR"
echo "Big blocks downloaded to $BIG_BLOCKS_DIR"

# Verify expected directory structure
if [ ! -d "$BIG_BLOCKS_DIR/payloads" ]; then
echo "::error::Big blocks archive missing expected payloads/ directory"
Expand Down Expand Up @@ -946,7 +954,7 @@ jobs:
cat > "$BENCH_LABELS_FILE" <<LABELS
{"benchmark_run":"baseline-1","run_type":"baseline","git_ref":"${BASELINE_REF}","bench_sha":"${BASELINE_REF}","benchmark_id":"${BENCH_ID}","run_start_epoch":"$(date +%s)","reference_epoch":"${BENCH_REFERENCE_EPOCH}"}
LABELS
taskset -c 0 .github/scripts/bench-reth-run.sh baseline ../reth-baseline/target/profiling/reth "$BENCH_WORK_DIR/baseline-1"
taskset -c 0 .github/scripts/bench-reth-run.sh baseline "../reth-baseline/target/profiling/${BENCH_NODE_BIN}" "$BENCH_WORK_DIR/baseline-1"

- name: "Run benchmark: feature (1/2)"
id: run-feature-1
Expand All @@ -957,7 +965,7 @@ jobs:
cat > "$BENCH_LABELS_FILE" <<LABELS
{"benchmark_run":"feature-1","run_type":"feature","git_ref":"${FEATURE_REF}","bench_sha":"${FEATURE_REF}","benchmark_id":"${BENCH_ID}","run_start_epoch":"$(date +%s)","reference_epoch":"${BENCH_REFERENCE_EPOCH}"}
LABELS
taskset -c 0 .github/scripts/bench-reth-run.sh feature ../reth-feature/target/profiling/reth "$BENCH_WORK_DIR/feature-1"
taskset -c 0 .github/scripts/bench-reth-run.sh feature "../reth-feature/target/profiling/${BENCH_NODE_BIN}" "$BENCH_WORK_DIR/feature-1"

- name: "Run benchmark: feature (2/2)"
if: env.BENCH_ABBA != 'false'
Expand All @@ -969,7 +977,7 @@ jobs:
cat > "$BENCH_LABELS_FILE" <<LABELS
{"benchmark_run":"feature-2","run_type":"feature","git_ref":"${FEATURE_REF}","bench_sha":"${FEATURE_REF}","benchmark_id":"${BENCH_ID}","run_start_epoch":"$(date +%s)","reference_epoch":"${BENCH_REFERENCE_EPOCH}"}
LABELS
taskset -c 0 .github/scripts/bench-reth-run.sh feature ../reth-feature/target/profiling/reth "$BENCH_WORK_DIR/feature-2"
taskset -c 0 .github/scripts/bench-reth-run.sh feature "../reth-feature/target/profiling/${BENCH_NODE_BIN}" "$BENCH_WORK_DIR/feature-2"

- name: "Run benchmark: baseline (2/2)"
if: env.BENCH_ABBA != 'false'
Expand All @@ -983,7 +991,7 @@ jobs:
cat > "$BENCH_LABELS_FILE" <<LABELS
{"benchmark_run":"baseline-2","run_type":"baseline","git_ref":"${BASELINE_REF}","bench_sha":"${BASELINE_REF}","benchmark_id":"${BENCH_ID}","run_start_epoch":"${LAST_RUN_START}","reference_epoch":"${BENCH_REFERENCE_EPOCH}"}
LABELS
taskset -c 0 .github/scripts/bench-reth-run.sh baseline ../reth-baseline/target/profiling/reth "$BENCH_WORK_DIR/baseline-2"
taskset -c 0 .github/scripts/bench-reth-run.sh baseline "../reth-baseline/target/profiling/${BENCH_NODE_BIN}" "$BENCH_WORK_DIR/baseline-2"

- name: Stop metrics proxy & generate Grafana URL
id: metrics
Expand Down
53 changes: 53 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ exclude = [".github/"]

[workspace]
members = [
"bin/reth-bb/",
"bin/reth-bench/",
"bin/reth/",
"crates/storage/rpc-provider/",
Expand Down
Loading
Loading