diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644
index 00000000000..4ed70d500ab
--- /dev/null
+++ b/.circleci/config.yml
@@ -0,0 +1,243 @@
+version: 2.1
+
+# Runs this fork's validation workflows through pinned act because GitHub Actions is disabled.
+# Pull requests and branch pushes run the PR checks; merge queues add stage.yml. Event metadata is
+# generated once per CircleCI revision and shared by all shards.
+#
+# The read-only GitHub token is exposed to PR code, so its CircleCI context must remain
+# restricted to trusted contributors. Keep CircleCI auto-cancellation enabled.
+#
+# The act binary, checksum, and runner image are pinned. Compiler caches are no-ops because
+# act's local cache is not reusable across these machines; Pages plumbing is skipped after the
+# validation build. Lint and unit jobs are distributed; other workflows run up to four jobs.
+#
+# Excluded: pr-title.yml, label-pr.yml, and the privileged cyclops-audit.yml integration.
+
+jobs:
+ # Replaces lint.yml's `deny` job, which calls tempoxyz/ci's reusable deny.yml. That workflow starts
+ # with tempoxyz's secure-runner, which needs a GitHub OIDC token that act never receives, so the
+ # check itself runs natively here. Its policy comes from deny.toml in this repo.
+ #
+ # When re-applying this CI patch onto a new reth release, diff lint.yml's `deny:` job and the
+ # tempoxyz/ci deny.yml it calls against this job (toolchain, cargo-deny version, `check`
+ # arguments, deny flags), and update both pins here.
+ cargo-deny:
+ docker:
+ - image: rust:1.95-bookworm@sha256:6258907abe69656e41cd992e0b705cdcfabcbbe3db374f92ed2d47121282d4a1
+ resource_class: medium
+ steps:
+ - checkout
+ - run:
+ name: Install pinned cargo-deny
+ command: |
+ set -euo pipefail
+ readonly DENY_VERSION="0.20.2"
+ readonly DENY_SHA256="9f12ed4c49936e09b48bf862b595cde2fe64fcbd9d74dfacac6131ca824c8d5f"
+ readonly DENY_ARCHIVE="cargo-deny-${DENY_VERSION}-x86_64-unknown-linux-musl.tar.gz"
+ curl --fail --silent --show-error --location \
+ "https://github.com/EmbarkStudios/cargo-deny/releases/download/${DENY_VERSION}/${DENY_ARCHIVE}" \
+ --output "/tmp/${DENY_ARCHIVE}"
+ echo "${DENY_SHA256} /tmp/${DENY_ARCHIVE}" | sha256sum --check
+ tar -xzf "/tmp/${DENY_ARCHIVE}" -C /usr/local/bin --strip-components=1 \
+ "cargo-deny-${DENY_VERSION}-x86_64-unknown-linux-musl/cargo-deny"
+ test "$(cargo-deny --version)" = "cargo-deny ${DENY_VERSION}"
+ - run:
+ name: cargo deny check
+ command: cargo deny --log-level warn --all-features check all
+
+ prepare-act-event:
+ machine:
+ image: ubuntu-2404:2025.09.1
+ resource_class: medium
+ steps:
+ - checkout
+ - run:
+ name: Snapshot GitHub event
+ command: |
+ mkdir -p /tmp/act-event
+ if ! .circleci/prepare-act-event.sh; then
+ echo "GitHub event preparation failed; act shards will report the failure" |
+ tee /tmp/act-event/failed
+ fi
+ - persist_to_workspace:
+ root: /tmp/act-event
+ paths:
+ - .
+
+ act:
+ parameters:
+ wf:
+ type: string
+ job:
+ type: string
+ default: ""
+ concurrent_jobs:
+ type: integer
+ default: 4
+ machine:
+ image: ubuntu-2404:2025.09.1
+ resource_class: xlarge
+ steps:
+ - checkout
+ - attach_workspace:
+ at: /tmp/act-event
+ - run:
+ name: Check event snapshot
+ command: |
+ if [ -f /tmp/act-event/failed ]; then
+ cat /tmp/act-event/failed >&2
+ exit 1
+ fi
+ - run:
+ name: Install pinned act
+ command: |
+ set -euo pipefail
+ readonly ACT_VERSION="0.2.89-action-cache-fix.1"
+ readonly ACT_RELEASE="v0.2.89-action-cache-fix.4"
+ readonly ACT_BINARY="act_Linux_x86_64"
+ readonly ACT_SHA256="28bfcf1502f59a834b14f2fb23c39e5b253c2234d875592b5aa0a175f9674dce"
+ curl --fail --silent --show-error --location \
+ "https://github.com/ethereum-optimism/act/releases/download/${ACT_RELEASE}/${ACT_BINARY}" \
+ --output "/tmp/${ACT_BINARY}"
+ echo "${ACT_SHA256} /tmp/${ACT_BINARY}" | sha256sum --check
+ sudo install -m 0755 "/tmp/${ACT_BINARY}" /usr/local/bin/act
+ test "$(act --version)" = "act version ${ACT_VERSION}"
+ - run:
+ name: Stub unsupported non-check actions
+ command: |
+ mkdir -p /tmp/noop-action
+ printf '%s\n' \
+ 'name: noop' \
+ 'description: disabled service plumbing under act' \
+ 'inputs:' \
+ ' cache-bin: {required: false}' \
+ ' cache-on-failure: {required: false}' \
+ ' cache-targets: {required: false}' \
+ ' prefix-key: {required: false}' \
+ 'runs:' \
+ ' using: composite' \
+ ' steps:' \
+ ' - run: echo "Service plumbing disabled under act"' \
+ ' shell: bash' \
+ > /tmp/noop-action/action.yml
+ - run:
+ name: Run << parameters.wf >> via act
+ no_output_timeout: 45m
+ command: |
+ set -euo pipefail
+ event_path=/tmp/act-event/github-event.json
+ event_name="$(jq -er 'if .pull_request then "pull_request" elif .merge_group then "merge_group" elif .ref and .after then "push" else error("unsupported event") end' "$event_path")"
+ base_ref="$(jq -r '(.pull_request.base.ref // .merge_group.base_ref // "") | sub("^refs/heads/"; "")' "$event_path")"
+ target_job="<< parameters.job >>"
+ # Validate documentation without entering Pages deployment on branch pushes.
+ if [ "<< parameters.wf >>" = "book.yml" ]; then
+ target_job=build
+ fi
+ act_job=()
+ if [ -n "$target_job" ]; then
+ case "$target_job" in
+ crate-checks-*)
+ partition="${target_job#crate-checks-}"
+ if [[ ! "$partition" =~ ^[1-9][0-9]*$ ]]; then
+ echo "invalid crate-checks partition: $partition" >&2
+ exit 1
+ fi
+ act_job=(-j crate-checks --matrix "partition:${partition}")
+ ;;
+ *)
+ act_job=(-j "$target_job")
+ ;;
+ esac
+ fi
+
+ act_env=(--env "RUSTC_WRAPPER=" --env "GITHUB_BASE_REF=${base_ref}")
+ if [ "<< parameters.wf >>" = "unit.yml" ] && [ "$target_job" = "state" ]; then
+ # EF tests use Rayon internally, so unrestricted nextest processes multiply
+ # runnable threads and starve valid_blocks past its upstream timeout.
+ act_env+=(--env "NEXTEST_TEST_THREADS=2")
+ fi
+ if [ "$event_name" != "pull_request" ]; then
+ act_env+=(
+ --env "GITHUB_REF=refs/heads/${CIRCLE_BRANCH}"
+ --env "GITHUB_SHA=${CIRCLE_SHA1}"
+ )
+ fi
+
+ act "$event_name" -W ".github/workflows/<< parameters.wf >>" \
+ "${act_job[@]}" \
+ --eventpath "$event_path" \
+ -P "ubuntu-latest=catthehacker/ubuntu@sha256:b839c14c4410998529ec18f951262bdf87a2b23bc1467304d07b491b9455e074" \
+ --concurrent-jobs << parameters.concurrent_jobs >> \
+ "${act_env[@]}" \
+ -s GITHUB_TOKEN="${MISE_GITHUB_TOKEN:?missing restricted read-only GitHub token}" \
+ --local-repository "mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba=/tmp/noop-action" \
+ --local-repository "Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6=/tmp/noop-action" \
+ --local-repository "actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d=/tmp/noop-action" \
+ --local-repository "actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9=/tmp/noop-action"
+
+workflows:
+ reth-act:
+ jobs:
+ - prepare-act-event:
+ context:
+ - circleci-repo-readonly-authenticated-github-token
+ - act:
+ context:
+ - circleci-repo-readonly-authenticated-github-token
+ name: "act-<< matrix.wf >>"
+ requires:
+ - prepare-act-event
+ matrix:
+ parameters:
+ wf:
+ - book.yml
+ - compact.yml
+ - e2e.yml
+ - grafana.yml
+ - integration.yml
+ - lint-actions.yml
+ - stage.yml
+ - act:
+ wf: lint.yml
+ concurrent_jobs: 1
+ context:
+ - circleci-repo-readonly-authenticated-github-token
+ name: "act-lint-<< matrix.job >>"
+ requires:
+ - prepare-act-event
+ matrix:
+ parameters:
+ job:
+ - clippy-binaries
+ - clippy
+ - wasm
+ - riscv
+ - crate-checks-1
+ - crate-checks-2
+ - crate-checks-3
+ - msrv
+ - docs
+ - fmt
+ - udeps
+ - book
+ - typos
+ - check-toml
+ - grafana
+ - no-test-deps
+ - feature-propagation
+ - cargo-deny:
+ name: lint-deny
+ - act:
+ wf: unit.yml
+ concurrent_jobs: 1
+ context:
+ - circleci-repo-readonly-authenticated-github-token
+ name: "act-unit-<< matrix.job >>"
+ requires:
+ - prepare-act-event
+ matrix:
+ parameters:
+ job:
+ - test
+ - state
+ - doc
diff --git a/.circleci/prepare-act-event.sh b/.circleci/prepare-act-event.sh
new file mode 100755
index 00000000000..99cccb27f3c
--- /dev/null
+++ b/.circleci/prepare-act-event.sh
@@ -0,0 +1,102 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+readonly OUTPUT_DIR="${ACT_EVENT_OUTPUT_DIR:-/tmp/act-event}"
+readonly EVENT_PATH="${OUTPUT_DIR}/github-event.json"
+
+mkdir -p "$OUTPUT_DIR"
+rm -f "$EVENT_PATH"
+
+: "${CIRCLE_SHA1:?missing CircleCI revision}"
+: "${CIRCLE_PROJECT_USERNAME:?missing CircleCI project owner}"
+: "${CIRCLE_PROJECT_REPONAME:?missing CircleCI project repository}"
+
+repository="${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}"
+
+if [[ "${CIRCLE_BRANCH:-}" == gh-readonly-queue/* ]]; then
+ event_name="merge_group"
+elif [[ -n "${CIRCLE_PULL_REQUEST:-}" ]]; then
+ event_name="pull_request"
+else
+ event_name="push"
+fi
+
+case "$event_name" in
+ pull_request)
+ : "${CIRCLE_PULL_REQUEST:?pull-request trigger must provide CIRCLE_PULL_REQUEST}"
+ pr_number="${CIRCLE_PULL_REQUEST##*/}"
+ if [[ ! "$pr_number" =~ ^[1-9][0-9]*$ ]]; then
+ echo "invalid pull-request URL: ${CIRCLE_PULL_REQUEST}" >&2
+ exit 1
+ fi
+
+ pull_request_path="${OUTPUT_DIR}/pull-request.json"
+ curl --fail --silent --show-error --location \
+ -H "Accept: application/vnd.github+json" \
+ -H "Authorization: Bearer ${MISE_GITHUB_TOKEN:?missing restricted read-only GitHub token}" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ "https://api.github.com/repos/${repository}/pulls/${pr_number}" > "$pull_request_path"
+
+ event_head_sha="$(jq -er '.head.sha' "$pull_request_path")"
+ if [[ "$event_head_sha" != "$CIRCLE_SHA1" ]]; then
+ echo "PR head does not match CircleCI revision: ${CIRCLE_SHA1} != ${event_head_sha}" >&2
+ exit 1
+ fi
+
+ jq '{
+ action: "synchronize",
+ number: .number,
+ pull_request: .,
+ repository: .base.repo,
+ sender: .user
+ }' "$pull_request_path" > "$EVENT_PATH"
+ base_ref="$(jq -er '.base.ref | select(length > 0)' "$pull_request_path")"
+ head_ref="$(jq -er '.head.ref | select(length > 0)' "$pull_request_path")"
+ echo "act event: pull_request #${pr_number}, ${head_ref} -> ${base_ref}"
+ ;;
+ push)
+ : "${CIRCLE_BRANCH:?push trigger must provide CIRCLE_BRANCH}"
+ jq -n \
+ --arg ref "refs/heads/${CIRCLE_BRANCH}" \
+ --arg after "$CIRCLE_SHA1" \
+ '{ref: $ref, after: $after}' > "$EVENT_PATH"
+ echo "act event: push ${CIRCLE_BRANCH} at ${CIRCLE_SHA1}"
+ ;;
+ merge_group)
+ : "${CIRCLE_BRANCH:?merge-queue trigger must provide CIRCLE_BRANCH}"
+ if [[ ! "$CIRCLE_BRANCH" =~ ^gh-readonly-queue/(.+)/pr-([1-9][0-9]*)-[^/]+$ ]]; then
+ echo "merge_group requires a gh-readonly-queue//pr-- branch, got: ${CIRCLE_BRANCH}" >&2
+ exit 1
+ fi
+ base_ref="${BASH_REMATCH[1]}"
+
+ if ! base_sha="$(git rev-parse "${CIRCLE_SHA1}^1" 2>/dev/null)"; then
+ git fetch --no-tags --depth=2 origin "$CIRCLE_SHA1"
+ base_sha="$(git rev-parse "${CIRCLE_SHA1}^1")"
+ fi
+
+ jq -n \
+ --arg head_sha "$CIRCLE_SHA1" \
+ --arg head_ref "refs/heads/${CIRCLE_BRANCH}" \
+ --arg base_sha "$base_sha" \
+ --arg base_ref "refs/heads/${base_ref}" \
+ --arg repository "$repository" \
+ --arg repository_name "$CIRCLE_PROJECT_REPONAME" \
+ --arg repository_owner "$CIRCLE_PROJECT_USERNAME" \
+ '{
+ action: "checks_requested",
+ merge_group: {
+ head_sha: $head_sha,
+ head_ref: $head_ref,
+ base_sha: $base_sha,
+ base_ref: $base_ref
+ },
+ repository: {
+ full_name: $repository,
+ name: $repository_name,
+ owner: {login: $repository_owner}
+ }
+ }' > "$EVENT_PATH"
+ echo "act event: merge_group ${CIRCLE_BRANCH} -> ${base_ref} at ${base_sha}"
+ ;;
+esac
diff --git a/.github/scripts/check_rv32imac.sh b/.github/scripts/check_rv32imac.sh
index 4e477cdbed1..988a95a3309 100755
--- a/.github/scripts/check_rv32imac.sh
+++ b/.github/scripts/check_rv32imac.sh
@@ -32,7 +32,7 @@ trap 'rm -rf -- "$tmpdir"' EXIT INT TERM
for crate in "${crates_to_check[@]}"; do
outfile="$tmpdir/$crate.log"
- if cargo +stable build -p "$crate" --target riscv32imac-unknown-none-elf --no-default-features --color never >"$outfile" 2>&1; then
+ if cargo build -p "$crate" --target riscv32imac-unknown-none-elf --no-default-features --color never >"$outfile" 2>&1; then
echo "✅ $crate"
else
echo "❌ $crate"
diff --git a/.github/scripts/check_wasm.sh b/.github/scripts/check_wasm.sh
index 15a8b8122ff..e4d5a8037a8 100755
--- a/.github/scripts/check_wasm.sh
+++ b/.github/scripts/check_wasm.sh
@@ -110,7 +110,7 @@ for crate in "${crates[@]}"; do
fi
outfile="$tmpdir/$crate.log"
- if cargo +stable build -p "$crate" --target wasm32-wasip1 --no-default-features --color never >"$outfile" 2>&1; then
+ if cargo build -p "$crate" --target wasm32-wasip1 --no-default-features --color never >"$outfile" 2>&1; then
echo "✅ $crate"
else
echo "❌ $crate"
diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml
index 07f26676b62..86a39c9945b 100644
--- a/.github/workflows/book.yml
+++ b/.github/workflows/book.yml
@@ -40,6 +40,8 @@ jobs:
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
+ with:
+ toolchain: nightly-2026-07-14
- name: Build docs
run: cd docs/vocs && bash scripts/build-cargo-docs.sh
diff --git a/.github/workflows/compact.yml b/.github/workflows/compact.yml
index 52ad1ff8374..ac60ce324b2 100644
--- a/.github/workflows/compact.yml
+++ b/.github/workflows/compact.yml
@@ -1,6 +1,6 @@
# Ensures that `Compact` codec changes are backwards compatible.
#
-# 1) checkout `main`
+# 1) checkout the PR base, or the selected release for maintenance-branch pushes
# 2) randomly generate and serialize to disk many different type vectors with `Compact` (eg. Header, Transaction, etc)
# 3) checkout `pr`
# 4) deserialize previously generated test vectors
@@ -35,6 +35,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
@@ -42,9 +44,11 @@ jobs:
- name: Checkout base
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
- ref: ${{ github.base_ref || 'main' }}
+ # Use v2.6.0's commit: the fork carries its history but does not mirror upstream tags.
+ # The maintenance branch must decode its release's data, not unreleased main formats.
+ ref: ${{ github.base_ref || (github.ref == 'refs/heads/optimism' && '73a3a00862a8f14f89e30da8de001456f18cfae0' || 'main') }}
persist-credentials: false
- # On `main` branch, generates test vectors and serializes them to disk using `Compact`.
+ # On the comparison base, generate test vectors and serialize them to disk using `Compact`.
- name: Generate compact vectors
run: |
${{ matrix.bin }} -- test-vectors compact --write
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 6031cd278a5..98f7d55e787 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -35,6 +35,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8
with:
@@ -71,6 +73,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8
with:
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index 3d3ff5abf6d..45567fed0b0 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -42,6 +42,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- name: Install Geth
run: .github/scripts/install_geth.sh
- uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8
@@ -86,6 +88,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8
with:
tool: nextest
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index b52ca66799c..1368de51907 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -38,6 +38,7 @@ jobs:
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@clippy
with:
+ toolchain: nightly-2026-07-14
components: clippy
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
@@ -62,6 +63,7 @@ jobs:
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@nightly
with:
+ toolchain: nightly-2026-07-14
components: clippy
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
@@ -81,8 +83,10 @@ jobs:
with:
persist-credentials: false
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
+ - run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
with:
+ toolchain: "1.97.0"
target: wasm32-wasip1
- uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8
with:
@@ -94,7 +98,7 @@ jobs:
- uses: dcarbone/install-jq-action@4fcb5062d7ce9bc4382d1a352d19ba3ba2c317c1 # v4.0.1
- name: Run Wasm checks
run: |
- sudo apt update && sudo apt install gcc-multilib
+ sudo apt update && sudo apt install --yes gcc-multilib
.github/scripts/check_wasm.sh
riscv:
@@ -109,6 +113,7 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- uses: dtolnay/rust-toolchain@stable
with:
+ toolchain: "1.97.0"
target: riscv32imac-unknown-none-elf
- uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8
with:
@@ -138,6 +143,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8
with:
tool: cargo-hack
@@ -183,6 +190,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@nightly
+ with:
+ toolchain: nightly-2026-07-14
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
@@ -206,6 +215,7 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- uses: dtolnay/rust-toolchain@nightly
with:
+ toolchain: nightly-2026-07-14
components: rustfmt
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- name: Run fmt
@@ -224,6 +234,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@nightly
+ with:
+ toolchain: nightly-2026-07-14
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
@@ -246,6 +258,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@nightly
+ with:
+ toolchain: nightly-2026-07-14
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
@@ -308,6 +322,8 @@ jobs:
persist-credentials: false
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- name: Ensure no arbitrary or proptest dependency on default build
run: cargo tree --package reth -e=features,no-dev | grep -Eq "arbitrary|proptest" && exit 1 || exit 0
@@ -323,6 +339,8 @@ jobs:
persist-credentials: false
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- uses: taiki-e/cache-cargo-install-action@9ee83daaa7b96a6fab930949ecf1122bba04a389 # v3.0.8
diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml
index bb5c2422482..a235be631cf 100644
--- a/.github/workflows/stage.yml
+++ b/.github/workflows/stage.yml
@@ -39,6 +39,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml
index 9e59205b8d8..a42d46af854 100644
--- a/.github/workflows/unit.yml
+++ b/.github/workflows/unit.yml
@@ -42,6 +42,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
@@ -94,6 +96,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- uses: taiki-e/install-action@d438492cf8a250514fa2d34b30bc3c0dc37c65ff # v2.87.8
with:
tool: nextest
@@ -118,6 +122,8 @@ jobs:
- uses: rui314/setup-mold@7e4f20ad28a2e8ca6fd0892ccf72e2abb706b9c3 # v1
- run: .github/scripts/install_llvm.sh ubuntu
- uses: dtolnay/rust-toolchain@stable
+ with:
+ toolchain: "1.97.0"
- uses: mozilla-actions/sccache-action@fc920bf0ec8de6ee65d409111f7ec508035751ba # v0.0.11
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
diff --git a/Cargo.lock b/Cargo.lock
index 9a19ff74073..3c61ed85363 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1756,12 +1756,6 @@ dependencies = [
"serde_core",
]
-[[package]]
-name = "bitmaps"
-version = "3.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1d084b0137aaa901caf9f1e8b21daa6aa24d41cd806e111335541eff9683bd6"
-
[[package]]
name = "bitvec"
version = "1.0.1"
@@ -5014,13 +5008,12 @@ dependencies = [
[[package]]
name = "imbl"
-version = "7.0.1"
+version = "7.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "43ea8d4c37ee560727e824d62804183624d371e632019b0e9e3532bce64a33e5"
+checksum = "46bad832b9b463ed9398b8506488cc2e3b897a9d44f13af115f382aac71f4fec"
dependencies = [
"arbitrary",
"archery",
- "bitmaps",
"equivalent",
"imbl-sized-chunks",
"rand_core 0.9.5",
@@ -5032,12 +5025,9 @@ dependencies = [
[[package]]
name = "imbl-sized-chunks"
-version = "0.1.3"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8f4241005618a62f8d57b2febd02510fb96e0137304728543dfc5fd6f052c22d"
-dependencies = [
- "bitmaps",
-]
+checksum = "2a0813be332553f857953298749fa19549e8b61b80589757c29b4e2a804fa9c6"
[[package]]
name = "impl-codec"
diff --git a/crates/chain-state/src/in_memory.rs b/crates/chain-state/src/in_memory.rs
index ef0fa4fabb3..adf6790bf0f 100644
--- a/crates/chain-state/src/in_memory.rs
+++ b/crates/chain-state/src/in_memory.rs
@@ -1001,12 +1001,22 @@ impl> NewCanonicalChain {
/// Returns the new tip for [`Self::Reorg`] and [`Self::Commit`] variants which commit at least
/// 1 new block.
pub fn tip(&self) -> &RecoveredBlock {
+ self.new_blocks().last().expect("non empty blocks").recovered_block()
+ }
+
+ /// Returns the blocks added to the canonical chain by this update.
+ pub fn new_blocks(&self) -> &[ExecutedBlock] {
match self {
- Self::Commit { new } | Self::Reorg { new, .. } => {
- new.last().expect("non empty blocks").recovered_block()
- }
+ Self::Commit { new } | Self::Reorg { new, .. } => new,
}
}
+
+ /// Returns whether the newly canonicalized blocks contain the given hash.
+ ///
+ /// This does not include the unchanged canonical prefix before the first new block.
+ pub fn contains(&self, hash: B256) -> bool {
+ self.new_blocks().iter().any(|block| block.recovered_block().hash() == hash)
+ }
}
#[cfg(test)]
diff --git a/crates/engine/tree/src/tree/mod.rs b/crates/engine/tree/src/tree/mod.rs
index d45cfcab271..9e16234ec2e 100644
--- a/crates/engine/tree/src/tree/mod.rs
+++ b/crates/engine/tree/src/tree/mod.rs
@@ -1252,6 +1252,10 @@ where
trace!(target: "engine::tree", "fcu head hash is already canonical");
+ if !self.is_consistent_forkchoice_state(state, None)? {
+ return Ok(Some(TreeOutcome::new(OnForkChoiceUpdated::invalid_state())));
+ }
+
// Update the safe and finalized blocks and ensure their values are valid
if let Err(outcome) = self.ensure_consistent_forkchoice_state(state) {
// safe or finalized hashes are invalid
@@ -1320,6 +1324,10 @@ where
return Ok(Some(TreeOutcome::new(OnForkChoiceUpdated::too_deep_reorg())));
}
+ if !self.is_consistent_forkchoice_state(state, None)? {
+ return Ok(Some(TreeOutcome::new(OnForkChoiceUpdated::invalid_state())));
+ }
+
// We need to effectively unwind the _canonical_ chain to the FCU's head, which is
// part of the canonical chain. We need to update the latest block state to reflect
// the canonical ancestor. This ensures that state providers and the transaction
@@ -1348,6 +1356,10 @@ where
// Ensure we can apply a new chain update for the head block
if let Some(chain_update) = self.on_new_head(state.head_block_hash)? {
+ if !self.is_consistent_forkchoice_state(state, Some(&chain_update))? {
+ return Ok(Some(TreeOutcome::new(OnForkChoiceUpdated::invalid_state())));
+ }
+
let tip = chain_update.tip().clone_sealed_header();
self.on_canonical_chain_update(chain_update);
@@ -3360,17 +3372,81 @@ where
}
/// Attempts to find the header for the given block hash if it is canonical.
+ ///
+ /// A persisted header can still be found by hash while its disk reorg is pending, so it is
+ /// only canonical if it is not above the canonical head and matches the canonical hash at its
+ /// height. The in-memory canonical hash is preferred over the persisted one.
pub fn find_canonical_header(
&self,
hash: B256,
) -> Result