From 3446b643696c69e23007dcdb51811e8a529b1328 Mon Sep 17 00:00:00 2001 From: Sebastian Stammler Date: Thu, 5 Nov 2026 09:16:58 +0000 Subject: [PATCH 01/21] ci,op-deployer: publish release binaries from GitHub Actions (#23907) Co-authored-by: Claude Opus 5.5 --- .github/workflows/release-op-deployer.yaml | 186 ++++++++++++++++++ .../op-deployer/usage/release-workflows.mdx | 27 ++- 2 files changed, 208 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release-op-deployer.yaml diff --git a/.github/workflows/release-op-deployer.yaml b/.github/workflows/release-op-deployer.yaml new file mode 100644 index 00000000000..cb6720539ad --- /dev/null +++ b/.github/workflows/release-op-deployer.yaml @@ -0,0 +1,186 @@ +# Builds the op-deployer binaries for a tag and attaches them to a draft GitHub release, which a +# release manager publishes after adding the notes. Releases are immutable once published, so the +# assets must be in place first. netchef and the superchain-registry download these assets by name. +# +# A tag push only runs this workflow if the tagged commit contains it. For any other tag, dispatch +# it from develop: the workflow then comes from develop and the source from the tag, so the build +# may only use just recipes and tools that also exist on that tag. +name: release-op-deployer + +on: + push: + tags: + - "op-deployer/v*" + workflow_dispatch: + inputs: + tag: + description: Existing tag to release, e.g. op-deployer/v1.2.3-rc.1 + required: true + type: string + +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ inputs.tag || github.ref_name }} + cancel-in-progress: false + +env: + TAG: ${{ inputs.tag || github.ref_name }} + +jobs: + build: + runs-on: ubuntu-24.04 + timeout-minutes: 45 + permissions: + contents: read + outputs: + version: ${{ steps.version.outputs.version }} + steps: + - name: Harden the runner + uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 + with: + egress-policy: audit + + - name: Check the tag + id: version + shell: bash + run: | + set -euo pipefail + if [[ ! "$TAG" =~ ^op-deployer/v[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$ ]]; then + echo "::error::The tag is not op-deployer/vMAJOR.MINOR.PATCH[-PRERELEASE]." + exit 1 + fi + echo "version=${TAG#op-deployer/v}" >> "$GITHUB_OUTPUT" + + - name: Checkout + uses: actions/checkout@71cf2267d89c5cb81562390fa70a37fa40b1305e # v6 + with: + ref: refs/tags/${{ env.TAG }} + submodules: recursive + persist-credentials: false + + # No cache anywhere in this job: the release must depend only on the tagged source. + - name: Install tools + uses: jdx/mise-action@c1ecc8f748cd28cdeabf76dab3cccde4ce692fe4 # v4.0.0 + with: + version: 2026.10.21 + install_args: go just forge jq yq + cache: false + + - name: Build contracts + working-directory: packages/contracts-bedrock + env: + FOUNDRY_PROFILE: ci + run: just forge-build --skip test + + - name: Pack the embedded contract artifacts + working-directory: op-deployer + run: just copy-contract-artifacts + + - name: Build the superchain bundle + run: just build-superchain-go + + - name: Build the release assets + shell: bash + env: + VERSION: ${{ steps.version.outputs.version }} + run: | + set -euo pipefail + commit=$(git rev-parse HEAD) + commit_time=$(git show -s --format=%ct) + commit_date=$(TZ=UTC git show -s --date=format-local:%Y-%m-%dT%H:%M:%SZ --format=%cd) + version_pkg=github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/version + ldflags="-X $version_pkg.GitCommit=$commit -X $version_pkg.GitDate=$commit_date -X $version_pkg.Version=$VERSION -X $version_pkg.Meta=" + + mkdir dist + for target in linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64; do + os=${target%/*} + arch=${target#*/} + name=op-deployer-$VERSION-$os-$arch + binary=op-deployer + if [ "$os" = windows ]; then + binary=op-deployer.exe + fi + + mkdir "dist/$name" + CGO_ENABLED=0 GOOS=$os GOARCH=$arch go build -trimpath -ldflags "$ldflags" \ + -o "dist/$name/$binary" ./op-deployer/cmd/op-deployer + cp op-deployer/README.md "dist/$name/" + chmod 755 "dist/$name/$binary" + chmod 644 "dist/$name/README.md" + touch -d "@$commit_time" "dist/$name"/* + + if [ "$os" = windows ]; then + (cd dist && zip -qX "$name.zip" "$name/README.md" "$name/$binary") + else + tar -C dist --owner=0 --group=0 --numeric-owner -cf - "$name/README.md" "$name/$binary" \ + | gzip -n > "dist/$name.tar.gz" + fi + done + + "dist/op-deployer-$VERSION-linux-amd64/op-deployer" --version | grep -F "$VERSION-${commit:0:8}-" + + rm -r dist/op-deployer-*/ + (cd dist && sha256sum ./*.tar.gz ./*.zip | sed 's# \./# #' > "op-deployer_${VERSION}_checksums.txt") + + - name: Upload the release assets + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: release-assets + path: dist/ + if-no-files-found: error + retention-days: 7 + + # Holds the write token, so it must not check out or run any repository code. + publish: + needs: build + runs-on: ubuntu-24.04 + timeout-minutes: 10 + permissions: + contents: write + steps: + - name: Harden the runner + uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4 + with: + egress-policy: audit + + - name: Download the release assets + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 + with: + name: release-assets + path: dist + + - name: Attach the assets to a draft release + shell: bash + env: + GH_REPO: ${{ github.repository }} + GH_TOKEN: ${{ github.token }} + VERSION: ${{ needs.build.outputs.version }} + run: | + set -euo pipefail + # Lists releases instead of using gh release view, which reports an API failure as "not found". + drafts=$(gh api --paginate "repos/$GH_REPO/releases" --jq '.[] | [.tag_name, .draft] | @tsv' \ + | awk -F'\t' -v tag="$TAG" '$1 == tag { print $2 }') + case "$drafts" in + "") + prerelease=() + if [[ "$VERSION" == *-* ]]; then + prerelease=(--prerelease) + fi + gh release create "$TAG" --draft --verify-tag --latest=false "${prerelease[@]}" \ + --title "op-deployer v$VERSION" --notes "" + ;; + true) ;; + *) + echo "::error::$TAG is already published, so its assets can't change, or has several drafts. Found: $drafts" + exit 1 + ;; + esac + gh release upload "$TAG" dist/* --clobber + + expected=$(find dist -type f | wc -l) + attached=$(gh release view "$TAG" --json assets --jq '.assets | length') + if [ "$attached" -ne "$expected" ]; then + echo "::error::$TAG has $attached assets, expected $expected." + exit 1 + fi diff --git a/docs/public-docs/chain-operators/tools/op-deployer/usage/release-workflows.mdx b/docs/public-docs/chain-operators/tools/op-deployer/usage/release-workflows.mdx index 1e0813a2341..ffaf80ec23a 100644 --- a/docs/public-docs/chain-operators/tools/op-deployer/usage/release-workflows.mdx +++ b/docs/public-docs/chain-operators/tools/op-deployer/usage/release-workflows.mdx @@ -9,6 +9,23 @@ This page is for people developing OP Deployer itself. If you only need to pick for your contract version, see the [releases reference](/chain-operators/tools/op-deployer/reference/releases). +## Publish a Release + +Pushing an `op-deployer/vX.Y.Z` tag runs the `release-op-deployer` GitHub Actions workflow, which builds the binaries and +attaches them to a draft GitHub release. If the tagged commit doesn't contain the workflow, run it from `develop` with +the tag as its input. + +Wait until the workflow run succeeds, then add the release notes and publish the draft: + +```bash +gh release edit op-deployer/vX.Y.Z --notes-file notes.md --draft=false --latest=false +``` + + +Releases are immutable. A release published before its assets are attached can never receive them, so you would need a +new tag. Tools such as netchef can only download the binaries once the release is published. + + ## Backport a Fix to an Earlier Version From time to time, we may backport bugfixes from develop onto earlier versions of OP Deployer. The process for this is @@ -32,7 +49,7 @@ git push origin fixes/deployer-v0.2.0 1. open pr from fixes/deployer-v0.2.0 targeting backports/op-deployer/v0.2.0 2. merge the pr -3. push a new tag for op-deployer/v0.2.1 on backports/op-deployer/v0.2.0 branch (goreleaser will create the release) +3. push a new tag for op-deployer/v0.2.1 on backports/op-deployer/v0.2.0 branch and publish its draft release ``` ## Add Support for a New Contract Version @@ -90,7 +107,7 @@ git tag -a op-deployer/v0.X.0-rc.n -m "op-deployer/v0.X.0-rc.n" git push origin op-deployer/v0.X.0-rc.n ``` -The tag triggers two CircleCI workflows: `release` publishes the docker images, and `go-release-op-deployer` runs -goreleaser, which publishes the binaries and creates the GitHub release. Wait for both to finish, then edit the release -notes and mark a release candidate as a pre-release (`gh release edit --prerelease`). Announce the release in -`#proj-op-deployer` and `#solutions`. +The tag triggers the CircleCI `release` workflow, which publishes the docker images, and the `release-op-deployer` +GitHub Actions workflow, which attaches the binaries to a draft GitHub release and marks a release candidate as a +pre-release. Wait for both to finish, then add the release notes and [publish the draft](#publish-a-release). Announce +the release in `#proj-op-deployer` and `#solutions`. From 9931ba24f0372b384a05c0fc9f803ff324921879 Mon Sep 17 00:00:00 2001 From: Sebastian Stammler Date: Thu, 5 Nov 2026 10:33:12 +0000 Subject: [PATCH 02/21] ci,op-deployer,op-up: remove goreleaser and op-up releases (#23914) Co-authored-by: Claude Opus 5.5 --- .circleci/continue/helpers.yml | 5 - .circleci/continue/main.yml | 252 ++++-------------- docs/public-docs/scripts/generate-releases.ts | 4 +- mise.toml | 2 - op-deployer/.goreleaser.yaml | 60 ----- op-up/.goreleaser.yaml | 63 ----- op-up/Dockerfile | 9 - ops/book/src/ci/mise.md | 2 +- 8 files changed, 53 insertions(+), 344 deletions(-) delete mode 100644 op-deployer/.goreleaser.yaml delete mode 100644 op-up/.goreleaser.yaml delete mode 100644 op-up/Dockerfile diff --git a/.circleci/continue/helpers.yml b/.circleci/continue/helpers.yml index 2aa1dc91109..354e6e86c5f 100644 --- a/.circleci/continue/helpers.yml +++ b/.circleci/continue/helpers.yml @@ -195,10 +195,6 @@ commands: mise-cache-checksum: type: string default: '{{ checksum "mise.toml" }}' - fresh-install: - description: Skip every mise cache and install mise and all tools fresh. See install-mise's fresh_install. - type: boolean - default: false steps: - github-checkout: method: << parameters.checkout-method >> @@ -206,4 +202,3 @@ commands: enable_mise_cache: << parameters.enable-mise-cache >> mise_cache_key_prefix: << parameters.mise-cache-key-prefix >> mise_cache_checksum: << parameters.mise-cache-checksum >> - fresh_install: << parameters.fresh-install >> diff --git a/.circleci/continue/main.yml b/.circleci/continue/main.yml index fae4be93dca..618fe06d6ba 100644 --- a/.circleci/continue/main.yml +++ b/.circleci/continue/main.yml @@ -289,35 +289,25 @@ commands: description: "The versions of solc to install" type: string default: "0.8.15,0.8.19,0.8.25,0.8.28" - use_cache: - description: Restore and save the solc cache. Disable to download every compiler fresh. - type: boolean - default: true steps: - - when: - condition: << parameters.use_cache >> - steps: - - restore_cache: - keys: - # use mise.toml to anchor on the underlying forge/svm versions - - svm-cache-{{ checksum "mise.toml" }}-<> - # Fall back to any svm cache for the same forge/svm versions so a - # changed solc_versions list reuses what's there and installs only - # the difference instead of a full cold install. - - svm-cache-{{ checksum "mise.toml" }}- + - restore_cache: + keys: + # use mise.toml to anchor on the underlying forge/svm versions + - svm-cache-{{ checksum "mise.toml" }}-<> + # Fall back to any svm cache for the same forge/svm versions so a + # changed solc_versions list reuses what's there and installs only + # the difference instead of a full cold install. + - svm-cache-{{ checksum "mise.toml" }}- - run: name: Install solc compilers command: | for version in $(echo "<>" | tr ',' '\n'); do svm which $version || svm install $version done - - when: - condition: << parameters.use_cache >> - steps: - - save_cache: - key: svm-cache-{{ checksum "mise.toml" }}-<> - paths: - - ~/.svm + - save_cache: + key: svm-cache-{{ checksum "mise.toml" }}-<> + paths: + - ~/.svm install-contracts-dependencies: description: "Install the dependencies for the smart contracts" @@ -326,13 +316,8 @@ commands: description: "The versions of solc to install" type: string default: "0.8.15,0.8.19,0.8.25,0.8.28" - use_cache: - description: Restore and save the solc cache. - type: boolean - default: true steps: - - install-solc-compilers: - use_cache: << parameters.use_cache >> + - install-solc-compilers - run: name: Install dependencies command: | @@ -940,90 +925,61 @@ jobs: description: Profile to use for building type: string default: ci - use_caches: - description: >- - Restore and save the mise, solc, forge build and Go caches. The - op-deployer release build disables them so the artifacts it ships don't - depend on content an earlier job saved to a cache. - type: boolean - default: true steps: - - when: - condition: << parameters.use_caches >> - steps: - - checkout-with-mise: - checkout-method: blobless - enable-mise-cache: true - - unless: - condition: << parameters.use_caches >> - steps: - - checkout-with-mise: - checkout-method: blobless - fresh-install: true - - install-contracts-dependencies: - use_cache: << parameters.use_caches >> + - checkout-with-mise: + checkout-method: blobless + enable-mise-cache: true + - install-contracts-dependencies - run: name: Print forge version command: forge --version - - when: - condition: << parameters.use_caches >> - steps: - - run: - name: Compute forge build cache key - command: | - # Key over every input affecting forge output: all tracked package - # files via `git ls-files -s` (sources, config, lib/ submodule - # pins), mise.toml toolchain pins, and profile/args. Exact-key only - # (no fallback restore): a hit never serves artifacts for changed - # or deleted contracts; a miss is a normal clean build. The - # installed solc set is deliberately unkeyed — drift only makes - # forge recompile mismatched artifacts, never serve stale ones. - { - echo "profile=<> args=<>" - sha256sum mise.toml - git ls-files -s -- packages/contracts-bedrock - } | sha256sum | cut -d' ' -f1 | tee /tmp/forge-cache-key.txt - - restore_cache: - name: Restore forge build cache - keys: - - forge-build-v1-<>-{{ checksum "/tmp/forge-cache-key.txt" }} + - run: + name: Compute forge build cache key + command: | + # Key over every input affecting forge output: all tracked package + # files via `git ls-files -s` (sources, config, lib/ submodule + # pins), mise.toml toolchain pins, and profile/args. Exact-key only + # (no fallback restore): a hit never serves artifacts for changed + # or deleted contracts; a miss is a normal clean build. The + # installed solc set is deliberately unkeyed — drift only makes + # forge recompile mismatched artifacts, never serve stale ones. + { + echo "profile=<> args=<>" + sha256sum mise.toml + git ls-files -s -- packages/contracts-bedrock + } | sha256sum | cut -d' ' -f1 | tee /tmp/forge-cache-key.txt + - restore_cache: + name: Restore forge build cache + keys: + - forge-build-v1-<>-{{ checksum "/tmp/forge-cache-key.txt" }} - run: name: Build contracts command: just forge-build <> environment: FOUNDRY_PROFILE: <> working_directory: packages/contracts-bedrock - - when: - condition: << parameters.use_caches >> - steps: - - save_cache: - name: Save forge build cache - key: forge-build-v1-<>-{{ checksum "/tmp/forge-cache-key.txt" }} - # These paths hold for profiles that keep foundry.toml's default - # output dirs; a profile that redirects them (e.g. kprove's - # out = kout-proofs) needs this list extended. - paths: - - packages/contracts-bedrock/cache - - packages/contracts-bedrock/artifacts - - packages/contracts-bedrock/forge-artifacts + - save_cache: + name: Save forge build cache + key: forge-build-v1-<>-{{ checksum "/tmp/forge-cache-key.txt" }} + # These paths hold for profiles that keep foundry.toml's default + # output dirs; a profile that redirects them (e.g. kprove's + # out = kout-proofs) needs this list extended. + paths: + - packages/contracts-bedrock/cache + - packages/contracts-bedrock/artifacts + - packages/contracts-bedrock/forge-artifacts # copy-contract-artifacts runs `go run ... mktar`, which needs the Go # module set. Restore the shared cache (warmed by prep-go-modules) so it # doesn't hit proxy.golang.org. - - when: - condition: << parameters.use_caches >> - steps: - - go-restore-cache: - namespace: contracts-bedrock-build + - go-restore-cache: + namespace: contracts-bedrock-build - run: name: "Copy artifacts into deployer" command: | just copy-contract-artifacts working_directory: op-deployer - - when: - condition: << parameters.use_caches >> - steps: - - go-save-cache: - namespace: contracts-bedrock-build + - go-save-cache: + namespace: contracts-bedrock-build - persist_to_workspace: root: "." paths: @@ -2441,62 +2397,6 @@ jobs: command: bash scripts/ops/publish-artifacts.sh working_directory: packages/contracts-bedrock - go-release: - parameters: - module: - description: Go Module Name - type: string - filename: - description: Goreleaser config file - default: .goreleaser.yaml - type: string - use_caches: - description: >- - Restore the mise and Go module caches and use Docker layer caching. The - op-deployer release disables them so its binary and images are built with - freshly installed tools and freshly downloaded modules. - type: boolean - default: true - docker: - - image: <> - resource_class: large.gen2 - steps: - - setup_remote_docker: - docker_layer_caching: << parameters.use_caches >> - - gcp-cli/install - - gcp-oidc-authenticate: - gcp_cred_config_file_path: /tmp/gcp_cred_config.json - oidc_token_file_path: /tmp/oidc_token.json - - when: - condition: << parameters.use_caches >> - steps: - - checkout-with-mise: - enable-mise-cache: true - - unless: - condition: << parameters.use_caches >> - steps: - - checkout-with-mise: - fresh-install: true - - attach_workspace: {at: "."} - # goreleaser compiles the Go release binaries on the host. - - when: - condition: << parameters.use_caches >> - steps: - - restore-go-mod-cache - - run: - name: Build superchain bundle - command: just build-superchain-go - - run: - name: Configure Docker - command: | - gcloud auth configure-docker us-docker.pkg.dev - - run: - name: Run goreleaser - # Without an explicit tag, goreleaser picks the highest version-sorted tag on HEAD. - # Git sorts v1.0.0-rc.1 above v1.0.0, so a final tag on an rc's commit releases as the rc. - command: | - GORELEASER_CURRENT_TAG="$CIRCLE_TAG" goreleaser release --clean -f ./<>/<> - stale-check: machine: image: ubuntu-2204:2024.08.1 @@ -2817,58 +2717,6 @@ workflows: - circleci-repo-readonly-authenticated-github-token - circleci-api-token - go-release-op-deployer: - jobs: - - contracts-bedrock-build: - name: build-contracts-go-release-op-deployer - filters: - tags: - only: /^op-deployer.*/ - branches: - ignore: /.*/ - build_args: --skip test - use_caches: false - context: - - circleci-repo-readonly-authenticated-github-token - - go-release: - filters: - tags: - only: /^op-deployer.*/ - branches: - ignore: /.*/ - module: op-deployer - use_caches: false - context: - - oplabs-gcr-release - - circleci-repo-readonly-authenticated-github-token - requires: - - build-contracts-go-release-op-deployer - - go-release-op-up: - jobs: - - contracts-bedrock-build: - name: build-contracts-go-release-op-up - filters: - tags: - only: /^op-up.*/ - branches: - ignore: /.*/ - build_args: --skip test - context: - - circleci-repo-readonly-authenticated-github-token - - go-release: - filters: - tags: - only: /^op-up.*/ - branches: - ignore: /.*/ - module: op-up - context: - - oplabs-gcr-release - - circleci-repo-readonly-authenticated-github-token - requires: - - build-contracts-go-release-op-up - release: when: << pipeline.parameters.c-run_release >> jobs: diff --git a/docs/public-docs/scripts/generate-releases.ts b/docs/public-docs/scripts/generate-releases.ts index 33a7d807cdf..9e658d9f7f9 100644 --- a/docs/public-docs/scripts/generate-releases.ts +++ b/docs/public-docs/scripts/generate-releases.ts @@ -33,8 +33,8 @@ interface GitHubRelease { // ─── Configuration ──────────────────────────────────────────────────────────── -// Tag prefix formats confirmed from .goreleaser.yaml, release.toml, and -// ops/scripts/find_release_tag.sh in the monorepo. +// Tag prefixes follow the /v form that ops/scripts/find_release_tag.sh +// looks up in the monorepo. // Order controls the Latest Releases card list on the index page. const COMPONENTS: Component[] = [ // ── optimism repo ────────────────────────────────────────────────────────── diff --git a/mise.toml b/mise.toml index 202b81f545d..80bb2631b22 100644 --- a/mise.toml +++ b/mise.toml @@ -65,7 +65,6 @@ cast = "1.8.3" anvil = "1.8.3" # Other dependencies -goreleaser-pro = "2.11.2" git-cliff = "2.12.0" # Fake dependencies @@ -80,7 +79,6 @@ forge = "github:foundry-rs/foundry[bin=forge,version_prefix=v]" cast = "github:foundry-rs/foundry[bin=cast,version_prefix=v]" anvil = "github:foundry-rs/foundry[bin=anvil,version_prefix=v]" just = "github:casey/just" -goreleaser-pro = "github:goreleaser/goreleaser-pro[bin=goreleaser,version_prefix=v]" gotestsum = "github:gotestyourself/gotestsum[version_prefix=v]" mockery = "github:vektra/mockery[version_prefix=v]" svm-rs = "github:alloy-rs/svm-rs[bin=svm,version_prefix=v]" diff --git a/op-deployer/.goreleaser.yaml b/op-deployer/.goreleaser.yaml deleted file mode 100644 index 7ec958177b2..00000000000 --- a/op-deployer/.goreleaser.yaml +++ /dev/null @@ -1,60 +0,0 @@ -# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json -# vim: set ts=2 sw=2 tw=0 fo=cnqoj - -version: 2 - -project_name: op-deployer - -before: - hooks: - - go mod tidy - -builds: - - id: main - main: ./cmd/op-deployer - binary: op-deployer - env: - - CGO_ENABLED=0 - goos: - - linux - - windows - - darwin - goarch: - - amd64 - - arm64 - ignore: - - goos: windows - goarch: arm64 - mod_timestamp: "{{ .CommitTimestamp }}" - ldflags: - - -X github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/version.GitCommit={{ .FullCommit }} - - -X github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/version.GitDate={{ .CommitDate }} - - -X github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/version.Version={{ .Version }} - - -X github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/version.Meta= - -archives: - - format: tar.gz - # this name template makes the OS and Arch compatible with the results of `uname`. - name_template: "{{ .ProjectName }}-{{.Version}}-{{ tolower .Os }}-{{ .Arch }}" - # use zip for windows archives - wrap_in_directory: true - format_overrides: - - goos: windows - format: zip - -changelog: - sort: asc - filters: - exclude: - - "^docs:" - - "^test:" - -release: - github: - owner: ethereum-optimism - name: optimism - make_latest: false - -monorepo: - tag_prefix: op-deployer/ - dir: op-deployer diff --git a/op-up/.goreleaser.yaml b/op-up/.goreleaser.yaml deleted file mode 100644 index c7cb05c73f8..00000000000 --- a/op-up/.goreleaser.yaml +++ /dev/null @@ -1,63 +0,0 @@ -# yaml-language-server: $schema=https://goreleaser.com/static/schema-pro.json -# vim: set ts=2 sw=2 tw=0 fo=cnqoj - -version: 2 - -project_name: op-up - -before: - hooks: - - go mod tidy - -builds: - - id: main - main: . - binary: "{{ .ProjectName }}" - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - goarch: - - amd64 - - arm64 - ignore: - - goos: linux - goarch: arm64 - mod_timestamp: "{{ .CommitTimestamp }}" - ldflags: - - -X main.GitCommit={{ .FullCommit }} - - -X main.GitDate={{ .CommitDate }} - - -X main.Version={{ .Version }} - - -X main.VersionMeta= - -archives: - - format: tar.gz - # this name template makes the OS and Arch compatible with the results of `uname`. - name_template: "{{ .ProjectName }}-{{ .Version }}-{{ tolower .Os }}-{{ .Arch }}" - wrap_in_directory: true - files: [] - -dockers: - - goos: linux - goarch: amd64 - dockerfile: Dockerfile - image_templates: - - "us-docker.pkg.dev/oplabs-tools-artifacts/images/{{ .ProjectName }}:{{ .Tag }}" - -changelog: - sort: asc - filters: - exclude: - - "^docs:" - - "^test:" - -release: - github: - owner: ethereum-optimism - name: optimism - make_latest: false - -monorepo: - tag_prefix: op-up/ - dir: op-up diff --git a/op-up/Dockerfile b/op-up/Dockerfile deleted file mode 100644 index 42a49390829..00000000000 --- a/op-up/Dockerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM debian:bookworm-20240812-slim -ENTRYPOINT ["/op-up"] -COPY op-up /op-up - -# Install ca-certificates so that HTTPS requests work -RUN apt-get -o Acquire::Retries=8 update && apt-get -o Acquire::Retries=8 install -y ca-certificates - -# Symlink onto the PATH -RUN ln -s /op-up /usr/local/bin/op-up diff --git a/ops/book/src/ci/mise.md b/ops/book/src/ci/mise.md index 22c36f5cc6a..4701be9c524 100644 --- a/ops/book/src/ci/mise.md +++ b/ops/book/src/ci/mise.md @@ -24,7 +24,7 @@ will require an alias to be defined in `mise.toml`. To do this: 1. Add an alias named after the package to the `[tool_alias]` stanza. 2. Configure the alias to point to the package repository and specify the executable at the end - as `[bin=]`, e.g. `github:goreleaser/goreleaser-pro[bin=goreleaser,version_prefix=v]`. + as `[bin=]`, e.g. `github:alloy-rs/svm-rs[bin=svm,version_prefix=v]`. Add `version_prefix=v` when the upstream release tags are v-prefixed (mise's `github:` backend does not auto-strip prefixes). 3. Add your package and its version to the list of tools in the `[tools]` stanza. \ No newline at end of file From be2667d0435b2d5dfcd5825c9e794fc30b99e7ea Mon Sep 17 00:00:00 2001 From: Sebastian Stammler Date: Thu, 5 Nov 2026 16:56:58 +0000 Subject: [PATCH 03/21] release-notes: tag PRs that change go:embed'ed files as LINKED (#23949) Co-authored-by: Claude Opus 5.5 --- .../skills/release-notes/scripts/pr-facts.sh | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/.claude/skills/release-notes/scripts/pr-facts.sh b/.claude/skills/release-notes/scripts/pr-facts.sh index bf07c82cf2e..a1c92b7a774 100755 --- a/.claude/skills/release-notes/scripts/pr-facts.sh +++ b/.claude/skills/release-notes/scripts/pr-facts.sh @@ -20,7 +20,8 @@ # Output, one row per PR in draft order, tab-separated: # # files <paths> # -# LINKED changed a package compiled into one of the component's binaries; <paths> lists +# LINKED changed a package compiled into one of the component's binaries, or a file such +# a package embeds (//go:embed); <paths> lists # just those packages — that is the reason the PR may belong in the notes # CONFIG moved the embedded superchain registry (submodule pin, generated archive # checksum, or kona's registry snapshots); read it by hand, a new activation time @@ -53,6 +54,7 @@ trap 'rm -rf "$workdir"' EXIT : > "$workdir/deps" : > "$workdir/pkgmap" : > "$workdir/scripts" +: > "$workdir/embeds" have_go=0 have_rust=0 contracts=0 @@ -60,13 +62,20 @@ contracts=0 # --- dependency sets ------------------------------------------------------------------- # Which units of code end up in the component's binaries. Empty leaves every row tagged '?'. -# The first of <targets> whose dependency set is non-empty. +# The first of <targets> whose dependency set is non-empty. Also records the files those +# packages embed (//go:embed) in $workdir/embeds as "<path>\t<package dir>": they ship in +# the binary without being Go source. resolve_go() { local out=$1 target shift for target in "$@"; do - if (cd "$root" && go list -deps "$target" 2> /dev/null) \ - | sed -n "s|^$MODULE/||p" | sort -u > "$out" && [ -s "$out" ]; then + if (cd "$root" && go list -deps \ + -f '{{.ImportPath}}{{range .EmbedFiles}}{{"\n"}}embed {{$.ImportPath}} {{.}}{{end}}' \ + "$target" 2> /dev/null) > "$workdir/golist" \ + && sed -n "s|^$MODULE/||p" "$workdir/golist" | sort -u > "$out" && [ -s "$out" ]; then + awk -v m="$MODULE/" '$1 == "embed" && index($2, m) == 1 { + d = substr($2, length(m) + 1); print d "/" $3 "\t" d + }' "$workdir/golist" >> "$workdir/embeds" return 0 fi done @@ -236,12 +245,16 @@ fi xargs -P "$JOBS" -n 2 bash -c 'fetch "$0" "$1"' < "$workdir/work" for f in "$workdir"/pr-*; do - awk -F'\t' -v depfile="$workdir/deps" -v pkgfile="$workdir/pkgmap" \ + awk -F'\t' -v depfile="$workdir/deps" -v pkgfile="$workdir/pkgmap" -v embedfile="$workdir/embeds" \ -v scriptfile="$workdir/scripts" -v have_go="$have_go" -v have_rust="$have_rust" \ -v contracts="$contracts" ' BEGIN { while ((getline dep < depfile) > 0) linked[dep] = 1 while ((getline line < scriptfile) > 0) scripts[line] = 1 + while ((getline line < embedfile) > 0) { + split(line, kv, "\t") + embedded[kv[1]] = kv[2] + } while ((getline line < pkgfile) > 0) { split(line, kv, "\t") pkgdir[kv[1]] = kv[2] @@ -285,6 +298,7 @@ for f in "$workdir"/pr-*; do } } if (have_go == 1) { + if (path in embedded) return embedded[path] # Test files are not compiled into the binary, so a PR that only adds # coverage to a linked package does not change what ships. if (path !~ /\.go$/ || path ~ /_test\.go$/) return "" From 98c789c254427a0ca81661aa27a852b39c64f771 Mon Sep 17 00:00:00 2001 From: "mintlify[bot]" <109931778+mintlify[bot]@users.noreply.github.com> Date: Thu, 5 Nov 2026 18:30:59 +0000 Subject: [PATCH 04/21] Fix translation drift (#23950) Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> --- .../reference/artifacts-locators.mdx | 16 ++- .../tools/op-deployer/usage/bootstrap.mdx | 16 +-- .../op-deployer/usage/custom-deployments.mdx | 16 ++- .../op-deployer/usage/release-workflows.mdx | 97 +++++++++++-------- .../kona-node/configuration.mdx | 60 +++++++++--- .../kona-node/run/sequencer.mdx | 18 ++-- docs/public-docs/ko/notices/upgrade-21.mdx | 37 ++++--- 7 files changed, 161 insertions(+), 99 deletions(-) diff --git a/docs/public-docs/ko/chain-operators/tools/op-deployer/reference/artifacts-locators.mdx b/docs/public-docs/ko/chain-operators/tools/op-deployer/reference/artifacts-locators.mdx index 0c8f163b0d0..9b7e97e02c9 100644 --- a/docs/public-docs/ko/chain-operators/tools/op-deployer/reference/artifacts-locators.mdx +++ b/docs/public-docs/ko/chain-operators/tools/op-deployer/reference/artifacts-locators.mdx @@ -8,17 +8,15 @@ OP Deployer는 사전 컴파일된 컨트랙트 artifact를 호출합니다. 이 컨트랙트 artifact의 위치를 가리킵니다. locator는 URL에 불과하지만, 여기에서 설명하는 몇 가지 추가 동작을 담고 있습니다. -## Locator 유형 +## Locator 유형 {#locator-types} -locator는 다음 세 가지 유형 중 하나입니다. +locator는 다음 세 가지 유형 중 하나입니다. 이전 릴리스의 `tag://` locator는 더 이상 허용되지 않습니다. -* `tag://` locator: 버전이 지정된 컨트랙트 릴리스를 가리킵니다. 이 locator는 알려진 URL로 해석됩니다. 태그된 - locator로 다운로드한 artifact는 OP Deployer 구현에 하드코딩된 체크섬으로 검증됩니다. - 이를 통해 태그가 지정된 이후 컨트랙트 artifact가 변조되는 것을 방지합니다. 또한 태그된 locator는 반복적인 - 다운로드를 피하기 위해 디스크에 캐시됩니다. - * 예: `tag://op-contracts/v1.8.0-rc.4` -* `https://` locator: 웹상의 컨트랙트 artifact tarball을 가리킵니다. HTTP locator는 태그된 locator와 마찬가지로 - 캐시되지만, 체크섬으로 검증되지는 않습니다. +* `embedded`(기본값): OP Deployer 바이너리에 컴파일되어 포함된 컨트랙트 artifact를 사용합니다. 각 OP Deployer + 릴리스는 지원하는 컨트랙트 릴리스의 artifact를 포함하므로, 실행 시점에 아무것도 다운로드하거나 검증하지 않습니다. + * 예: `embedded` +* `https://` locator: 웹상의 컨트랙트 artifact tarball을 가리킵니다. HTTP locator는 반복적인 다운로드를 피하기 위해 + 디스크에 캐시됩니다. * 예: `https://<url-to-remote-forge-artifacts>` * `file://` locator: artifact가 포함된 로컬 디스크의 디렉터리를 가리킵니다. * 예: `file://<path-to-repo-root>/packages/contracts-bedrock/forge-artifacts` diff --git a/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/bootstrap.mdx b/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/bootstrap.mdx index fb6331e6ce1..7c70926b355 100644 --- a/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/bootstrap.mdx +++ b/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/bootstrap.mdx @@ -20,7 +20,7 @@ Bootstrap 명령은 새로운 OP Stack 배포를 위한 전역 싱글톤과 구 **이 명령들은 hot wallet에서 호출해도 안전합니다.** 이 명령으로 배포되는 컨트랙트는 모두 "ownable"이 아니므로, 배포 주소는 이후 시스템에 대한 제어 권한을 갖지 않습니다. -## 공유 컨트랙트 Bootstrap +## 공유 컨트랙트 Bootstrap {#bootstrap-shared-contracts} ```shell op-deployer bootstrap superchain \ @@ -31,13 +31,13 @@ op-deployer bootstrap superchain \ --guardian="<role address>" ``` -### CLI 인수 +### CLI 인수 {#cli-arguments} -#### `--superchain-proxy-admin-owner`, `--guardian` +#### `--superchain-proxy-admin-owner`, `--guardian` {#superchain-proxy-admin-owner-guardian} 개발 환경에서는 이 값들을 모두 hot wallet EOA로 지정해도 됩니다. 프로덕션 환경에서는 `--guardian`은 HSM(하드웨어 보안 모듈)으로 보호되는 hot wallet이어야 하며, `--superchain-proxy-admin-owner`는 멀티시그 cold wallet(예: Gnosis Safe)이어야 합니다. -### 출력 +### 출력 {#output} 이 명령은 여러 컨트랙트를 배포하고 다음과 같은 JSON을 출력합니다. @@ -49,7 +49,7 @@ op-deployer bootstrap superchain \ } ``` -## 구현 Bootstrap +## 구현 Bootstrap {#bootstrap-implementations} ```shell op-deployer bootstrap implementations \ @@ -72,7 +72,11 @@ op-deployer bootstrap implementations \ | `--min-dispute-game-finality-delay-seconds`, `--max-dispute-game-finality-delay-seconds` | `AnchorStateRegistry` | 게임이 해결된 후 결과가 최종 확정되기까지의 시간 | 12시간~3.5일 | | `--min-withdrawal-delay-seconds`, `--max-withdrawal-delay-seconds` | `DelayedWETH` | bond 잠금 해제 후 출금하기까지의 시간 | 12시간~7일 | -### 출력 +<Unreleased component="op-deployer" /> + +구현 컨트랙트에는 `ZKDisputeGame`과 원시(raw) SP1 verifier를 래핑하는 `SP1PlonkAdapter`가 포함됩니다. Ethereum mainnet과 Sepolia에서는 op-deployer가 Succinct의 릴리스 승인 verifier를 사용합니다. 그 외의 L1에서는 `--sp1-verifier-address`를 전달해야 하며, 그렇지 않으면 명령이 실패합니다. + +### 출력 {#output} 이 명령은 구현 컨트랙트, blueprint, OPCM을 배포합니다. 배포는 (대부분) 결정론적이므로, 구현과 생성자 인수가 동일하게 유지되는 한 컨트랙트는 체인당 한 번만 배포됩니다. 이는 `op-deployer apply` 파이프라인에도 diff --git a/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/custom-deployments.mdx b/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/custom-deployments.mdx index 76c573f0b36..38d3787b973 100644 --- a/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/custom-deployments.mdx +++ b/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/custom-deployments.mdx @@ -4,6 +4,8 @@ description: OP Deployer로 커스텀 배포를 관리하는 방법을 알아봅 diataxis: how-to --- +import { Unreleased } from "/ko/snippets/unreleased.mdx" + OP Deployer는 주로 Optimism이 거버넌스를 담당하는 체인에서 사용하도록 설계되었지만, 커스텀 배포 관리도 지원합니다. 이는 특히 RaaS 제공업체에서 흔하며, 이들의 고객은 커스텀 L1(L3의 경우 L2)이나 거버넌스를 사용하는 배포를 요청하는 경우가 많습니다. 이 가이드에서는 OP Deployer를 사용하여 이러한 체인을 관리하는 과정을 @@ -14,7 +16,7 @@ OP Deployer는 주로 Optimism이 거버넌스를 담당하는 체인에서 사 코드를 실행하고 있을 수 있습니다. 사용에 따른 위험은 본인이 부담해야 합니다. </Warning> -## Bootstrap +## Bootstrap {#bootstrapping} 커스텀 OP Stack을 배포하는 첫 번째 단계는 L1에 bootstrap하는 것입니다. 이 과정에서 다음 작업이 수행됩니다. @@ -24,7 +26,7 @@ OP Deployer는 주로 Optimism이 거버넌스를 담당하는 체인에서 사 이를 위해 `op-deployer`의 [`bootstrap`](/ko/chain-operators/tools/op-deployer/usage/bootstrap) 계열 명령을 사용합니다. -### 공유 컨트랙트 Bootstrap +### 공유 컨트랙트 Bootstrap {#bootstrap-shared-contracts} 모든 OP Chain은 논리적인 배포 그룹에 속합니다. 이 그룹은 OP Chain 그룹의 동작을 제어하는 공유 컨트랙트 집합으로 구성됩니다. 여기에는 다음이 포함됩니다. @@ -57,7 +59,7 @@ bootstrap할 때는 다음 모범 사례를 따르는 것을 권장합니다. 2. 배포자로는 일반 EOA를 사용하십시오. 배포가 완료되면 배포자는 배포에 대한 어떠한 제어 권한도 갖지 않습니다. 3. 표준 컨트랙트 태그(예: `tag://op-contracts/v2.0.0`)를 사용하십시오. 이렇게 하면 업그레이드가 더 쉬워집니다. -### 구현 Bootstrap +### 구현 Bootstrap {#bootstrapping-implementations} OP Chain의 스마트 컨트랙트는 사전 배포된 구현 집합을 가리키는 factory를 사용하여 배포됩니다. 새로운 L1에 배포할 때마다, 그리고 새로운 스마트 컨트랙트 버전이 릴리스될 때마다 factory와 구현을 배포해야 합니다. @@ -81,6 +83,10 @@ op-deployer bootstrap implementations \ --upgrade-controller="<superchain-proxy-admin-owner used in bootstrap superchain>" ``` +<Unreleased component="op-deployer" /> + +Ethereum mainnet과 Sepolia 이외의 L1에서는 릴리스의 `SP1PlonkAdapter`에 사용할 원시(raw) SP1 verifier를 `--sp1-verifier-address`로 함께 전달해야 하며, 그렇지 않으면 명령이 실패합니다. `op-deployer apply`는 intent의 `globalDeployOverrides.sp1Verifier`로 동일한 입력을 받습니다. + `bootstrap superchain` 명령과 마찬가지로, 이 명령은 관련 컨트랙트의 주소가 포함된 JSON 파일을 출력합니다. 이 파일도 잘 보관하십시오. @@ -92,7 +98,7 @@ OP Chain을 배포할 factory입니다. 또한 서로 다른 컨트랙트 버전 * 각 OPCM은 **정확히 하나의** 배포 그룹과 연결됩니다. 즉, 관리하는 새 배포 그룹마다 `bootstrap implementations` 명령을 사용하여 새 OPCM을 **반드시** 배포해야 합니다. -## 배포 +## 배포 {#deploying} 컨트랙트와 구현을 bootstrap한 후에는 `apply` 명령으로 L2 체인을 배포할 수 있습니다. intent에서 `configType`을 `standard-overrides`로 지정하고 `opcmAddress` 필드를 위의 OPCM 주소로 설정해야 합니다. **올바른 OPCM을 호출하는지 @@ -120,7 +126,7 @@ l2ContractsLocator = "tag://..." `apply`가 성공적으로 완료되면 `inspect` 계열 명령을 사용하여 체인의 L2 제네시스 및 rollup 구성 파일을 다운로드할 수 있습니다. -## 업그레이드 +## 업그레이드 {#upgrading} <Warning> `op-deployer upgrade` 명령은 `op-contracts/v5.0.0`까지의 업그레이드만 지원합니다. `op-contracts/v5.0.0`에서 diff --git a/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/release-workflows.mdx b/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/release-workflows.mdx index e5d1d543c3e..1955776415d 100644 --- a/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/release-workflows.mdx +++ b/docs/public-docs/ko/chain-operators/tools/op-deployer/usage/release-workflows.mdx @@ -9,7 +9,24 @@ diataxis: how-to 선택하면 되는 경우에는 [릴리스 레퍼런스](/ko/chain-operators/tools/op-deployer/reference/releases)를 참고하십시오. </Note> -## 이전 버전에 수정 사항 백포트 +## 릴리스 게시 {#publish-a-release} + +`op-deployer/vX.Y.Z` 태그를 push하면 `release-op-deployer` GitHub Actions 워크플로가 실행됩니다. 이 워크플로는 +바이너리를 빌드하고 draft GitHub 릴리스에 첨부합니다. 태그된 커밋에 워크플로가 포함되어 있지 않은 경우, +태그를 입력값으로 하여 `develop`에서 워크플로를 실행합니다. + +워크플로 실행이 성공할 때까지 기다린 다음, 릴리스 노트를 추가하고 draft를 게시합니다. + +```bash +gh release edit op-deployer/vX.Y.Z --notes-file notes.md --draft=false --latest=false +``` + +<Warning> +릴리스는 변경할 수 없습니다(immutable). asset이 첨부되기 전에 게시된 릴리스에는 이후에도 asset을 첨부할 수 없으므로 +새 태그가 필요합니다. netchef와 같은 도구는 릴리스가 게시된 후에만 바이너리를 다운로드할 수 있습니다. +</Warning> + +## 이전 버전에 수정 사항 백포트 {#backport-a-fix-to-an-earlier-version} 때때로 develop의 버그 수정 사항을 이전 버전의 OP Deployer에 백포트할 수 있습니다. 이 프로세스는 다음과 같습니다. @@ -32,69 +49,65 @@ git push origin fixes/deployer-v0.2.0 1. open pr from fixes/deployer-v0.2.0 targeting backports/op-deployer/v0.2.0 2. merge the pr -3. push a new tag for op-deployer/v0.2.1 on backports/op-deployer/v0.2.0 branch (goreleaser will create the release) +3. push a new tag for op-deployer/v0.2.1 on backports/op-deployer/v0.2.0 branch and publish its draft release ``` -## 새 컨트랙트 버전 지원 추가 +## 새 컨트랙트 버전 지원 추가 {#add-support-for-a-new-contract-version} 새 컨트랙트 버전에 대한 지원을 추가하는 작업은 여러 단계로 이루어집니다. 다음은 개략적인 개요입니다. 편의상 새 `rc` 릴리스에 대한 지원을 추가한다고 가정합니다. -### 1단계: develop에 지원 추가 +OP Deployer는 지원하는 컨트랙트와 같은 `proposal/op-contracts/vX.Y.Z` 브랜치에서 릴리스됩니다. 따라서 컨트랙트 +개발이 `develop`에서 계속되는 동안에도 두 구성 요소의 호환성이 유지됩니다. 컨트랙트 artifact는 빌드 시점에 해당 +checkout에서 바이너리에 포함되므로, artifact를 별도로 게시하거나 고정(pin)할 필요가 없습니다. + +### 1단계: develop에 지원 추가 {#step-1-add-support-on-develop} 먼저 `develop` 브랜치에 새 컨트랙트 버전에 대한 지원을 추가해야 합니다. 즉, 배포 파이프라인이 새 버전에 필요한 모든 변경 사항을 지원하도록 해야 합니다. 일반적으로 새 배포 변수를 전달하고, Solidity 스크립트/OPCM의 ABI 변경에 대응하는 작업이 포함됩니다. -### 2단계: 게시된 artifact 추가 +### 2단계: 컨트랙트 릴리스 태그 지정 {#step-2-tag-the-contracts-release} -모노레포의 루트에서 다음을 실행합니다. +컨트랙트 팀은 [컨트랙트 릴리스 프로세스](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/book/src/policies/release-process.md)에 +따라 릴리스에 `op-contracts/vX.Y.Z-rc.n` 태그를 지정하고 OPCM을 배포합니다. +OP Deployer 릴리스는 같은 커밋에서 만들어집니다. -```bash -cd packages/contracts-bedrock -just clean -just build -bash scripts/ops/calculate-checksum.sh -# copy the outputted checksum -cd ../../op-deployer -just calculate-artifacts-hash <checksum> -``` +### 3단계: 새 릴리스로 SR 업데이트 {#step-3-update-the-sr-with-the-new-release} -이렇게 하면 artifact의 체크섬과 artifact tarball의 해시가 계산됩니다. OP Deployer는 이 값을 사용하여 태그된 -컨트랙트 locator를 다운로드하고 검증합니다. +OPCM 배포에서 얻은 주소와 함께 superchain-registry의 [표준 버전](https://github.com/ethereum-optimism/superchain-registry/tree/main/validation/standard)에 +새 RC를 추가합니다. -이제 새 artifact tarball을 다운로드할 수 있도록 `standard/standard.go`를 이 값으로 업데이트합니다. +### 4단계: validation 패키지와 현재 태그 업데이트 {#step-4-update-the-validation-package-and-the-current-tag} -```go -// Add a new const for your release - -const ContractsVXTag = "op-contracts/vX.Y.Z" - -var taggedReleases = map[string]TaggedRelease{ -// Other releases... -ContractsVXTag: { -ArtifactsHash: common.HexToHash("<the artifacts hash>"), -ContentHash: common.HexToHash("<the checksum>"), -}, -} - -// Update the L1/L2 versions accordingly -func IsSupportedL1Version(tag string) bool { -return tag == ContractsVXTag -} +SR은 `validation` 패키지를 통해 OP Deployer로 가져옵니다. proposal 브랜치에서 이 패키지를 업데이트합니다. + +```shell +go get github.com/ethereum-optimism/superchain-registry/validation@<SR commit SHA> +go mod tidy ``` -### 3단계: 새 릴리스로 SR 업데이트 +그런 다음 `op-deployer/pkg/deployer/standard/standard.go`에서 새 태그에 대한 상수를 추가하고 `CurrentTag`가 이를 가리키도록 합니다. + +```go +ContractsVXTag = "op-contracts/vX.Y.Z-rc.n" +CurrentTag = ContractsVXTag +``` -superchain-registry의 [표준 버전](https://github.com/ethereum-optimism/superchain-registry/tree/main/validation/standard)에 새 RC를 추가합니다. +OP Deployer는 `CurrentTag`를 사용하여 레지스트리에서 표준 OPCM 주소를 확인합니다. proposal 브랜치를 대상으로 +PR을 엽니다. PR이 병합되면 OP Deployer 변경 사항을 `develop`으로 cherry-pick합니다. -### 4단계: validation 패키지 업데이트 +### 5단계: 릴리스 태그 지정 {#step-5-tag-the-release} -SR은 `validation` 패키지를 통해 OP Deployer로 가져옵니다. 모노레포의 루트에서 다음 명령을 실행하여 -업데이트합니다. +OP Deployer의 minor 버전은 컨트랙트의 major 버전을 따릅니다. 컨트랙트 `vX.0.0`은 `op-deployer/v0.X.0`과 짝을 이룹니다. +proposal 브랜치의 head에 태그를 지정하고 태그를 push합니다. ```shell -go get -u github.com/ethereum-optimism/superchain-registry/validation@<SR commit SHA> +git tag -a op-deployer/v0.X.0-rc.n -m "op-deployer/v0.X.0-rc.n" +git push origin op-deployer/v0.X.0-rc.n ``` -이것으로 완료입니다! +태그는 docker 이미지를 게시하는 CircleCI `release` 워크플로와 `release-op-deployer` GitHub Actions 워크플로를 +트리거합니다. `release-op-deployer` 워크플로는 바이너리를 draft GitHub 릴리스에 첨부하고, release candidate를 +pre-release로 표시합니다. 두 워크플로가 모두 완료될 때까지 기다린 다음, 릴리스 노트를 추가하고 +[draft를 게시](#publish-a-release)합니다. `#proj-op-deployer`와 `#solutions`에 릴리스를 공지합니다. diff --git a/docs/public-docs/ko/node-operators/kona-node/configuration.mdx b/docs/public-docs/ko/node-operators/kona-node/configuration.mdx index dac7a26466e..e90d658866f 100644 --- a/docs/public-docs/ko/node-operators/kona-node/configuration.mdx +++ b/docs/public-docs/ko/node-operators/kona-node/configuration.mdx @@ -13,11 +13,11 @@ import { Unreleased } from "/ko/snippets/unreleased.mdx" 각 플래그에 대한 자세한 내용은 인라인 도움말(`kona-node node --help`) 또는 소스 코드를 참조하십시오. </Note> -## 기본 포트 +## 기본 포트 {#default-ports} <KonaNodePorts /> -## 핵심 노드 인수 +## 핵심 노드 인수 {#core-node-arguments} | 플래그 | 환경 변수 | 설명 | 필수 | 기본값 | |------|-----|-------------|----------|---------| @@ -31,13 +31,13 @@ import { Unreleased } from "/ko/snippets/unreleased.mdx" | `--l2-config-file <PATH>` | `KONA_NODE_ROLLUP_CONFIG` | 사용자 지정 L2 rollup 구성 파일의 경로 | 아니요 | - | | `--l1-runtime-config-reload-interval <SECONDS>` | `KONA_NODE_L1_RUNTIME_CONFIG_RELOAD_INTERVAL` | 런타임 구성을 다시 로드하는 폴링 간격 | 아니요 | `600` | -## 전역 인수 +## 전역 인수 {#global-arguments} | 플래그 | 환경 변수 | 설명 | 필수 | 기본값 | |------|-----|-------------|----------|---------| | `--l2-chain-id <ID/NAME>` 또는 `-c <ID/NAME>` | `KONA_NODE_L2_CHAIN_ID` | L2 체인 ID(숫자) 또는 체인 이름(문자열) | 아니요 | `10` (Optimism) | -### 체인 ID 지원 +### 체인 ID 지원 {#chain-id-support} `--l2-chain-id` 플래그는 `alloy_chains` crate를 사용해 유연한 체인 식별을 지원합니다. @@ -63,15 +63,15 @@ export KONA_NODE_L2_CHAIN_ID=optimism && kona-node node [args...] 지원되는 체인 이름에는 `alloy_chains`가 인식하는 모든 이름(예: `optimism`, `base`, `mainnet`)이 포함됩니다. 사용자 지정 네트워크를 위해 알려지지 않은 숫자 체인 ID도 허용됩니다. -## P2P 인수 +## P2P 인수 {#p2p-arguments} | 플래그 | 환경 변수 | 설명 | 기본값 | |------|-----|-------------|---------| | `--p2p.no-discovery` | `KONA_NODE_P2P_NO_DISCOVERY` | Discv5(노드 탐색)를 비활성화합니다. [탐색 없이 실행하기](#running-without-discovery)를 참조하십시오 | `false` | | `--p2p.priv.path <PATH>` | `KONA_NODE_P2P_PRIV_PATH` | peer ID용 16진수 인코딩 32바이트 개인 키 파일의 경로 | - | | `--p2p.priv.raw <HEX>` | `KONA_NODE_P2P_PRIV_RAW` | peer ID용 16진수 인코딩 32바이트 개인 키 | - | -| `--p2p.advertise.ip <IP>` | `KONA_NODE_P2P_ADVERTISE_IP` | 외부 피어에 알릴 IP | - | -| `--p2p.advertise.tcp <PORT>` | `KONA_NODE_P2P_ADVERTISE_TCP_PORT` | 알릴 TCP 포트 | `0` | +| `--p2p.advertise.ip <IP>` | `KONA_NODE_P2P_ADVERTISE_IP` | 외부 피어에 알릴 IP입니다. 설정하지 않으면 특정 `--p2p.listen.ip`를 사용하고, `0.0.0.0` 또는 `::`인 경우 탐색이 피어로부터 주소를 알아낼 때까지 알리지 않습니다. [알리는 주소](#advertised-address)를 참고하십시오 | - | +| `--p2p.advertise.tcp <PORT>` | `KONA_NODE_P2P_ADVERTISE_TCP_PORT` | 알릴 TCP 포트입니다. `0`이면 LibP2P가 바인딩한 포트를 사용합니다 | `0` | | `--p2p.advertise.udp <PORT>` | `KONA_NODE_P2P_ADVERTISE_UDP_PORT` | 알릴 UDP 포트 | `0` | | `--p2p.listen.ip <IP>` | `KONA_NODE_P2P_LISTEN_IP` | LibP2P/Discv5를 바인딩할 IP | `0.0.0.0` | | `--p2p.listen.tcp <PORT>` | `KONA_NODE_P2P_LISTEN_TCP_PORT` | LibP2P를 바인딩할 TCP 포트 | `9222` | @@ -89,6 +89,7 @@ export KONA_NODE_L2_CHAIN_ID=optimism && kona-node node [args...] | `--p2p.ban.threshold <N>` | `KONA_NODE_P2P_BAN_THRESHOLD` | 차단 임계값 | `-100` | | `--p2p.ban.duration <MINUTES>` | `KONA_NODE_P2P_BAN_DURATION` | 차단 기간: 차단된 피어는 연결이 끊기며, 차단이 만료되거나 [`opp2p_unblockPeer`](/ko/node-operators/kona-node/rpc/p2p#opp2p_unblockpeer)로 해제될 때까지 양방향 연결이 거부됩니다. 차단은 재시작 후에는 유지되지 않습니다 | `60` | | `--p2p.discovery.interval <SECONDS>` | `KONA_NODE_P2P_DISCOVERY_INTERVAL` | 피어 탐색 간격 | `5` | +| `--p2p.discovery.ip-votes <N>` | `KONA_NODE_P2P_DISCOVERY_IP_VOTES` | 노드가 외부 주소를 알리기 전에 같은 주소를 보고해야 하는 피어 수로, 최소 `2`입니다. `--p2p.advertise.ip`를 사용하면 무시됩니다. 투표 수가 적을수록 더 적은 피어가 주소를 결정하므로, 공개 네트워크에서는 기본값을 유지하십시오. op-node에는 이러한 플래그가 없으며 임계값이 `10`으로 고정되어 있습니다. [알리는 주소](#advertised-address)를 참고하십시오 | `10` | | `--p2p.bootstore <PATH>` | `KONA_NODE_P2P_BOOTSTORE` | bootstore를 저장할 디렉터리 | - | | `--p2p.redial <N>` | `KONA_NODE_P2P_REDIAL` | 피어 재연결(redial) 임계값 | `500` | | `--p2p.redial.period <MINUTES>` | `KONA_NODE_P2P_REDIAL_PERIOD` | 피어 연결 시도 주기 | `60` | @@ -101,7 +102,36 @@ export KONA_NODE_L2_CHAIN_ID=optimism && kona-node node [args...] | `--p2p.signer.endpoint <URL>` | `KONA_NODE_P2P_SIGNER_ENDPOINT` | gossip으로 전파되는 블록에 서명하는 원격 op-signer입니다. `--p2p.signer.address`가 필요합니다 | - | | `--p2p.signer.address <ADDRESS>` | `KONA_NODE_P2P_SIGNER_ADDRESS` | 원격 서명자 키의 주소 | - | -### 정적 피어 +### 알리는 주소 {#advertised-address} + +<Unreleased component="kona-node" /> + +다른 노드는 탐색이 게시하는 레코드인 ENR을 통해 이 노드를 찾습니다. 이 레코드에는 gossip용 TCP 포트, 탐색용 UDP 포트, 그리고 노드가 자신의 IP를 알게 된 경우 두 포트에 접근할 수 있는 IP가 담깁니다. + +| `--p2p.listen.ip` | `--p2p.advertise.ip` | 알리는 IP | +|-------------------|----------------------|---------------| +| 모든 값 | 설정됨 | advertise IP이며, 변경되지 않습니다. | +| `10.0.0.5` 또는 `127.0.0.1`과 같은 특정 주소 | 설정되지 않음 | 처음에는 listen IP입니다. 충분한 수의 피어가 다른 주소에 동의하면 탐색이 이를 대체합니다. | +| 모든 인터페이스, `0.0.0.0`(기본값) 또는 `::` | 설정되지 않음 | 처음에는 없습니다. 충분한 수의 피어가 주소에 동의하면 탐색이 주소를 추가합니다. | + +TCP 포트는 `--p2p.advertise.tcp`가 설정된 경우 해당 값이며, 그렇지 않으면 LibP2P가 바인딩한 포트입니다. 즉, `--p2p.listen.tcp` 또는 listen 포트가 `0`일 때 선택된 포트입니다. UDP 포트는 `--p2p.advertise.udp`가 설정된 경우 해당 값이며, 그렇지 않으면 탐색이 수신 대기하는 포트입니다. + +`--p2p.advertise.ip`가 없으면 탐색은 bootnode를 통해 찾은 피어로부터 노드의 주소를 알아냅니다. 탐색이 연결하는 각 피어는 자신이 보는 노드의 주소를 보고합니다. bootnode 자체는 집계되지 않습니다. 이러한 피어 중 `--p2p.discovery.ip-votes`개(기본값 10개)가 같은 주소를 보고하면 노드는 그 주소를 알립니다. 그 전까지는 레코드에 IP가 없는 노드에 접근할 수 없으므로, 다른 노드는 이 노드를 유지하지 않습니다. 그 전에 연결했던 피어는 이 노드와 새 세션을 시작하거나 다른 노드로부터 이 노드의 레코드를 알게 되면 이 노드를 추가합니다. + +devnet이나 로컬 테스트 네트워크처럼 노드의 bootnode를 제외하고 접근 가능한 노드 수가 이보다 적은 네트워크에서는, 모든 인터페이스에서 수신 대기하는 노드가 자신의 주소를 알아내지 못하며 다른 노드도 이 노드를 찾을 수 없습니다. 모든 인터페이스에서 수신 대기하는 노드는 자신의 주소를 알아낸 후에만 집계되므로, 대부분의 노드가 그렇게 수신 대기하는 작은 네트워크에서는 어떤 노드도 주소를 알아내지 못할 수 있습니다. 이러한 네트워크에서는 다음 중 하나를 수행하십시오. + +- 다른 노드가 이 노드에 접근하는 주소로 `--p2p.advertise.ip`를 설정하거나, `--p2p.listen.ip`로 해당 주소에서 수신 대기합니다. +- 또는 `--p2p.discovery.ip-votes`를 낮춥니다. 투표 수가 적을수록 더 적은 피어가 주소를 결정합니다. 공모한 두 피어가 노드를 접근 불가능하게 만들거나 다른 노드가 다른 호스트를 가리키게 할 수 있습니다. 따라서 공개 네트워크에서는 기본값을 유지하십시오. + +기본 제공 bootnode가 없는 체인에서 `--p2p.advertise.ip` 없이 모든 인터페이스에서 수신 대기하면, 노드는 시작 시 경고를 로그로 남깁니다. + +<Info> + +op-node는 listen IP를 알리지 않습니다. `--p2p.advertise.ip`가 없으면 op-node는 임계값이 10으로 고정된 피어 투표를 통해 자신의 주소를 알아냅니다. 따라서 op-node는 특정 주소에서 수신 대기하는 경우에도 작은 네트워크에서는 `--p2p.advertise.ip`가 필요합니다. + +</Info> + +### 정적 피어 {#static-peers} `--p2p.static-peers`는 탐색 결과와 관계없이 노드가 직접 연결하고 연결을 유지하는 피어 목록입니다. sequencer와 같은 노드가 신뢰하는 노드와 계속 연결되도록 하려면 이 플래그를 사용하십시오. @@ -138,7 +168,7 @@ op-node에서는 이 플래그를 `--p2p.static`이라고 부르며, kona-node </Info> -### 탐색 없이 실행하기 +### 탐색 없이 실행하기 {#running-without-discovery} <Unreleased component="kona-node" /> @@ -166,7 +196,7 @@ P2P RPC 메서드는 여전히 응답합니다. 탐색이 꺼졌을 때 op-node 탐색이 꺼져 있을 때 정적 피어가 설정되지 않았거나 bootnode가 설정된 경우(bootnode는 무시되므로), 노드는 시작 시 경고를 로그로 남깁니다. -## RPC 인수 +## RPC 인수 {#rpc-arguments} RPC 서버는 한 번 시작됩니다. 예기치 않게 중지되면 노드는 오류와 함께 종료됩니다. @@ -178,7 +208,7 @@ RPC 서버는 한 번 시작됩니다. 예기치 않게 중지되면 노드는 | `--rpc.enable-admin` | `KONA_NODE_RPC_ENABLE_ADMIN` | admin API 활성화 | `false` | | `--rpc.admin-state <PATH>` | `KONA_NODE_RPC_ADMIN_STATE` | admin 상태를 영구 저장할 파일 경로 | - | -## Sequencer 인수 +## Sequencer 인수 {#sequencer-arguments} | 플래그 | 환경 변수 | 설명 | 기본값 | |------|-----|-------------|---------| @@ -188,7 +218,7 @@ RPC 서버는 한 번 시작됩니다. 예기치 않게 중지되면 노드는 | `--conductor.rpc <URL>` | `KONA_NODE_CONDUCTOR_RPC` | 외부 conductor 서비스의 RPC 엔드포인트 URL입니다. 이 값을 지정하면 sequencer 모드에서 conductor 연동이 활성화되며, validator 모드에서는 효과가 없습니다. | - | | `--conductor.rpc.timeout <SECONDS>` | `KONA_NODE_CONDUCTOR_RPC_TIMEOUT` | conductor 서비스 RPC 타임아웃 | `1` | -## Interop 인수 +## Interop 인수 {#interop-arguments} | 플래그 | 환경 변수 | 설명 | 기본값 | |------|-----|-------------|---------| @@ -198,11 +228,11 @@ RPC 서버는 한 번 시작됩니다. 예기치 않게 중지되면 노드는 `kona-node`는 supervisor RPC 서버를 실행하지 않으므로 `--supervisor.*` 플래그 그룹이 없습니다. `--interop.dependency-set`이 노드의 유일한 interop 플래그입니다. -## RPC 신뢰 플래그 +## RPC 신뢰 플래그 {#rpc-trust-flags} `--l1-trust-rpc`와 `--l2-trust-rpc` 플래그는 Kona가 RPC 응답의 블록 해시를 검증할지 여부를 제어합니다. 신뢰를 비활성화해야 하는 경우에 대한 안내와 신뢰, 비신뢰, 혼합 공급자 구성 예시는 [RPC 신뢰 구성](/ko/node-operators/kona-node/run/rpc-trust)을 참조하십시오. -## 기본 동작 +## 기본 동작 {#default-behavior} 위 플래그로 재정의하지 않는 한, `kona-node node` 실행에는 다음 기본값이 적용됩니다. @@ -215,7 +245,7 @@ RPC 서버는 한 번 시작됩니다. 예기치 않게 중지되면 노드는 `--metrics.enabled` 플래그로 활성화할 수 있으며, 그러면 메트릭이 `0.0.0.0:9090`에서 제공되고, `--metrics.port` 및 `--metrics.addr` 플래그로 구성할 수 있습니다. -## Rollup 구성 로딩 +## Rollup 구성 로딩 {#rollup-configuration-loading} `--l2-config-file` CLI 플래그로 rollup 구성 파일 경로를 지정하지 _않으면_, Rollup Config는 diff --git a/docs/public-docs/ko/node-operators/kona-node/run/sequencer.mdx b/docs/public-docs/ko/node-operators/kona-node/run/sequencer.mdx index e078c0587a4..71c6fe9a38f 100644 --- a/docs/public-docs/ko/node-operators/kona-node/run/sequencer.mdx +++ b/docs/public-docs/ko/node-operators/kona-node/run/sequencer.mdx @@ -10,7 +10,7 @@ diataxis: how-to sequencer 모드는 주로 rollup 운영자가 사용하는 고급 설정입니다. 대부분의 사용자는 기본 validator 모드로 node를 실행합니다. </Info> -## 기본 Sequencer 설정 +## 기본 Sequencer 설정 {#basic-sequencer-setup} Kona node를 sequencer 모드로 실행하려면 다음과 같이 합니다. @@ -25,7 +25,9 @@ kona-node node \ --chain=123456 ``` -## 필수 인수 +superchain registry에 없는 체인에는 기본 제공 bootnode가 없으므로, 네트워크가 너무 작아 다른 node가 sequencer에 그 주소를 알려주지 못할 수 있습니다. 다른 node가 sequencer에 접근하는 주소로 `--p2p.advertise.ip`를 설정하십시오. 자세한 내용은 [알리는 주소(advertised address)](/ko/node-operators/kona-node/configuration#advertised-address)를 참고하십시오. + +## 필수 인수 {#required-arguments} <Warning> **필수 설정** @@ -43,7 +45,7 @@ sequencer 모드에는 모든 표준 node 인수와 함께 `--mode=Sequencer` | **Chain ID** | `--chain` | `KONA_NODE_L2_CHAIN_ID` | L2 체인 식별자 | | **Block Signer** | `--p2p.sequencer.key.path`, `--p2p.sequencer.key` 또는 `--p2p.signer.address`와 함께 `--p2p.signer.endpoint` | `KONA_NODE_P2P_SEQUENCER_KEY_PATH`, `KONA_NODE_P2P_SEQUENCER_KEY`, `KONA_NODE_P2P_SIGNER_ENDPOINT`, `KONA_NODE_P2P_SIGNER_ADDRESS` | sequencer가 gossip하는 블록에 서명합니다. 로컬 키 또는 원격 op-signer를 사용합니다 | -## Sequencer 전용 플래그 +## Sequencer 전용 플래그 {#sequencer-specific-flags} | 플래그 | 환경 변수 | 기본값 | 설명 | |------|---------------------|---------|-------------| @@ -55,9 +57,9 @@ sequencer 모드에는 모든 표준 node 인수와 함께 `--mode=Sequencer` validator 모드와 공유하는 표준 node 인수를 포함한 전체 플래그 목록은 [Kona node CLI 레퍼런스](/ko/node-operators/kona-node/configuration)에 있습니다. -## 예시 설정 +## 예시 설정 {#example-configurations} -### 기본 Sequencer +### 기본 Sequencer {#basic-sequencer} ```bash kona-node node \ --mode=Sequencer \ @@ -68,7 +70,7 @@ kona-node node \ --chain=42161 ``` -### Conductor를 사용하는 Sequencer +### Conductor를 사용하는 Sequencer {#sequencer-with-conductor} ```bash kona-node node \ --mode=Sequencer \ @@ -82,7 +84,7 @@ kona-node node \ --chain=123456 ``` -### 복구 모드 Sequencer +### 복구 모드 Sequencer {#recovery-mode-sequencer} ```bash kona-node node \ --mode=Sequencer \ @@ -94,7 +96,7 @@ kona-node node \ --chain=42161 ``` -## 주요 고려 사항 +## 주요 고려 사항 {#key-considerations} <Tip> **Sequencer 운영** diff --git a/docs/public-docs/ko/notices/upgrade-21.mdx b/docs/public-docs/ko/notices/upgrade-21.mdx index 7572c319e69..38310a81553 100644 --- a/docs/public-docs/ko/notices/upgrade-21.mdx +++ b/docs/public-docs/ko/notices/upgrade-21.mdx @@ -21,7 +21,7 @@ is_imported_content: 'false' --- Upgrade 21은 OP Stack 체인을 위한 L1 스마트 컨트랙트 업그레이드입니다. -이 업그레이드는 `op-contracts/v9.0.0`에 포함되어 배포되며, 모든 체인에서 `ETHLockbox`를 보관(custody) 및 일시 중지 식별자로 지정하고, 상호운용성(interop)에 필요한 L1 컨트랙트 변경 사항을 포함합니다. +이 업그레이드는 `op-contracts/v9.0.0`에 포함되어 배포되며, 모든 체인에서 `ETHLockbox`를 보관(custody) 및 일시 중지 식별자로 지정하고, L1 출금 경로를 강화하며, 상호운용성(interop)에 필요한 L1 컨트랙트 변경 사항을 포함합니다. L2 하드포크가 없으므로 구성해야 할 활성화 타임스탬프는 없습니다. 각 네트워크는 온체인 작업을 실행하여 업그레이드됩니다. @@ -30,9 +30,9 @@ L2 하드포크가 없으므로 구성해야 할 활성화 타임스탬프는 아래 날짜는 Optimism Governance 승인에 따라 달라지는 목표이며, 컨트랙트 및 구성 요소 버전은 릴리스 후보가 게시되면 추가됩니다. </Info> -## 포함 내용 +## 포함 내용 {#what’s-included} -### 보관 및 일시 중지 식별자로서의 ETHLockbox +### 보관 및 일시 중지 식별자로서의 ETHLockbox {#ethlockbox-as-the-custody-and-pause-identifier} Upgrade 21 이후 모든 체인에는 `ETHLockbox`가 있으며, lockbox는 체인별 일시 중지에 사용되는 유일한 식별자가 됩니다. `SystemConfig`의 `ETH_LOCKBOX` 기능은 더 이상 비활성화할 수 없습니다. @@ -47,7 +47,14 @@ Upgrade 21 이후 모든 체인에는 `ETHLockbox`가 있으며, lockbox는 체 신뢰할 수 있는 확인 수단은 여전히 `OptimismPortal.paused()`입니다. 일시 중지 식별자의 작동 방식은 [bridge 일시 중지](/ko/op-stack/security/pause)를 참조하세요. -### Interop 컨트랙트 변경 사항 +### L1 bridge 강화 {#l1-bridge-hardening} + +`OptimismPortal2.finalizeWithdrawalTransaction`은 발신자가 `L2CrossDomainMessenger`이고 `L1CrossDomainMessenger` 호출이 실패하면 `OptimismPortal_L1CDMCallFailed`로 revert합니다. 따라서 해당 출금은 실패 상태로 최종 확정되지 않고 재시도 가능한 상태로 유지됩니다. +`L1CrossDomainMessenger.relayMessage`는 relay 결과를 기록하기 위해 더 많은 gas를 예약합니다. 이 기록 덕분에 실패한 메시지를 다시 재생(replay)할 수 있습니다. 또한 gas 검사 전에 payload를 메모리로 복사하므로, 복사 작업이 더 이상 예약된 gas를 소모하지 않습니다. +relay gas 상수는 `LOCAL_*`(이 체인의 relay)와 `REMOTE_*`(다른 체인에 대해 부과되는 `baseGas`)로 분리됩니다. +`RELAY_*` getter는 `IL1CrossDomainMessenger`에서 `REMOTE_*`의 별칭(alias)으로 유지됩니다. + +### Interop 컨트랙트 변경 사항 {#interop-contract-changes} Upgrade 21에는 interop에 필요한 L1 컨트랙트 변경 사항이 포함됩니다. 이러한 변경 사항은 이후 업그레이드에서 사용되기 전까지는 아무런 동작도 하지 않습니다. Upgrade 21은 마이그레이션을 호출하지 않으며 interop을 활성화하지도 않습니다. @@ -61,20 +68,20 @@ Upgrade 21에는 interop에 필요한 L1 컨트랙트 변경 사항이 포함됩 [공유 dispute game 런북](/ko/chain-operators/tutorials/merge-shared-dispute-game)에서 마이그레이션 흐름을 설명하며, 이 런북은 아직 프로덕션 체인에 사용하도록 승인되지 않았습니다. interop에 필요한 노드 토폴로지는 [Interop 활성화 준비](/ko/notices/interop-prep)를 참조하세요. -### 출금 증명 정리 +### 출금 증명 정리 {#withdrawal-proof-cleanup} `OptimismPortal.deleteProvenWithdrawal(bytes32,address)`를 사용하면 누구나 분쟁 게임(dispute game)이 절대 최종 확정으로 이어질 수 없는 출금 증명, 즉 게임이 challenger에게 유리하게 해결되었거나 blacklist에 등록된 출금 증명을 삭제할 수 있습니다. 이 함수는 `WithdrawalProofDeleted`를 emit합니다. 유효한 게임에 대한 증명은 영향을 받지 않습니다. -### OPCM 및 StandardValidator 업데이트 +### OPCM 및 StandardValidator 업데이트 {#opcm-and-standardvalidator-updates} `OPContractsManagerV2`와 `OPContractsManagerStandardValidator`가 위 변경 사항에 맞게 업데이트됩니다. validator는 새로운 lockbox 및 일시 중지 구성에 대한 assertion을 추가하고, interop 체인의 공유 `ProxyAdmin`을 처리합니다. -## 필요한 조치 +## 필요한 조치 {#required-actions} -### 체인 운영자 +### 체인 운영자 {#chain-operators} * Guardian 일시 중지 도구와 런북이 `OptimismPortal`의 `ethLockbox()`에서 읽은 체인의 `ETHLockbox` 주소를 체인별 일시 중지 식별자로 전달하도록 업데이트합니다. * `Paused` 및 `Unpaused` 이벤트를 `OptimismPortal` 주소로 필터링하는 모니터링을 업데이트합니다. @@ -89,7 +96,7 @@ validator는 새로운 lockbox 및 일시 중지 구성에 대한 assertion을 체인별 일시 중지 식별자의 작동 방식과 체인을 일시 중지하는 방법은 [bridge 일시 중지](/ko/op-stack/security/pause)를 참조하세요. </Info> -#### absolute prestate 업데이트 +#### absolute prestate 업데이트 {#update-the-absolute-prestate} Upgrade 21에는 하드포크가 없지만, [`kona-client/v1.9.0`](https://github.com/ethereum-optimism/optimism/releases/tag/kona-client%2Fv1.9.0)에서 빌드된 새 absolute prestate가 함께 배포됩니다. [`op-challenger` v1.11.0](https://github.com/ethereum-optimism/optimism/releases/tag/op-challenger%2Fv1.11.0)에는 이에 맞는 `kona-host` v1.9.0이 포함되어 있으므로, 오프체인 구성 요소 변경은 `op-challenger` 업데이트뿐입니다. @@ -170,12 +177,12 @@ prestate를 위해 새 버전이 필요한 다른 OP Stack 구성 요소는 없 </Step> </Steps> -### 노드 운영자 +### 노드 운영자 {#node-operators} Upgrade 21에는 L2 하드포크가 없습니다. 필요한 구성 요소 버전이 있다면 릴리스 후보가 게시될 때 여기에 나열됩니다. -### 앱 개발자 및 인프라 통합 업체 +### 앱 개발자 및 인프라 통합 업체 {#app-developers-and-infrastructure-integrators} 일반적인 L2 컨트랙트와 트랜잭션은 영향을 받지 않습니다. 통합이 다음 중 하나에 해당하는 경우 업데이트해야 합니다. @@ -183,16 +190,18 @@ Upgrade 21에는 L2 하드포크가 없습니다. * 체인에 보관된 ETH를 측정하기 위해 `OptimismPortal`의 ETH 잔액을 읽는 경우. 업그레이드 이후에는 체인의 `ETHLockbox` 잔액을 읽어야 합니다. * `SuperchainConfig`의 `Paused` 이벤트를 `OptimismPortal` 주소로 필터링하는 경우 * 출금 증명을 추적하며 새로운 `WithdrawalProofDeleted` 이벤트를 처리해야 하는 경우 +* 출금을 최종 확정하거나 relay하는 경우. 이제 `finalizeWithdrawalTransaction`은 L1 messenger 호출이 실패하면 `OptimismPortal_L1CDMCallFailed`로 revert합니다. 이 경우 더 많은 gas로 재시도할 수 있는 것으로 처리해야 합니다. 절대 relay될 수 없는 messenger 출금은 실패 상태로 최종 확정되지 않고, 증명되었지만 최종 확정되지 않은 상태로 유지됩니다. +* messenger의 relay gas 상수를 읽는 경우. 이 상수는 `LOCAL_*`와 `REMOTE_*`로 분리되며, `RELAY_*` getter는 `REMOTE_*`의 별칭으로 유지됩니다. <Info> 체인 잔액과 일시 중지 상태 모니터링에 대한 안내는 [거래소 및 bridge](/ko/op-stack/security/exchanges-and-bridges)를 참조하세요. </Info> -### 사용자 +### 사용자 {#users} 별도의 조치는 필요하지 않습니다. -## 업그레이드 일정 +## 업그레이드 일정 {#upgrade-timing} Upgrade 21은 L1 컨트랙트 업그레이드로 적용되므로, 각 네트워크는 온체인 작업을 실행하여 업그레이드됩니다. @@ -210,7 +219,7 @@ OP Enterprise Self Managed 체인은 지원이 필요한 경우 Optimism 담당 Mainnet 실행은 Optimism Governance 승인과 Sepolia 안정화 기간의 정상 진행 여부에 따라 달라지므로, 이 날짜는 변경될 수 있습니다. 거버넌스 제안과 온체인 투표는 게시되면 여기에 링크됩니다. -## 준비 상태 확인 +## 준비 상태 확인 {#verify-readiness} Sepolia 실행 후, mainnet 실행 전에 다음을 수행합니다. From 4056e1b2b6a6565dd507fab14a3064bbd24110ee Mon Sep 17 00:00:00 2001 From: Inphi <3516807+Inphi@users.noreply.github.com> Date: Thu, 5 Nov 2026 21:27:10 +0000 Subject: [PATCH 05/21] rust: use underscore lint names in workspace lint tables (#23955) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --- rust/Cargo.toml | 22 +++++++++++----------- rust/kona/sp1/programs/Cargo.toml | 22 +++++++++++----------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 08cb8d958f9..ca19d03a0dc 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -96,13 +96,13 @@ rustdoc-args = ["--cfg", "docsrs"] # this block to the nested SP1 guest workspace. # BEGIN SHARED WORKSPACE LINTS [workspace.lints.rust] -missing-debug-implementations = "warn" -missing-docs = "warn" -unreachable-pub = "warn" -unused-must-use = "deny" -rust-2018-idioms = { level = "deny", priority = -1 } -unnameable-types = "warn" -rust-2024-incompatible-pat = "warn" +missing_debug_implementations = "warn" +missing_docs = "warn" +unreachable_pub = "warn" +unused_must_use = "deny" +rust_2018_idioms = { level = "deny", priority = -1 } +unnameable_types = "warn" +rust_2024_incompatible_pat = "warn" [workspace.lints.rustdoc] all = "warn" @@ -142,7 +142,7 @@ manual_clamp = "warn" manual_is_variant_and = "warn" manual_string_new = "warn" match_same_arms = "warn" -missing-const-for-fn = "warn" +missing_const_for_fn = "warn" mutex_integer = "warn" naive_bytecount = "warn" needless_bitwise_bool = "warn" @@ -151,11 +151,11 @@ needless_for_each = "warn" needless_pass_by_ref_mut = "warn" nonstandard_macro_braces = "warn" option_as_ref_cloned = "warn" -option-if-let-else = "warn" +option_if_let_else = "warn" or_fun_call = "warn" path_buf_push_overwrite = "warn" read_zero_byte_vec = "warn" -redundant-clone = "warn" +redundant_clone = "warn" redundant_else = "warn" single_char_pattern = "warn" string_lit_as_bytes = "warn" @@ -174,7 +174,7 @@ unnecessary_struct_initialization = "warn" unnested_or_patterns = "warn" unused_peekable = "warn" unused_rounding = "warn" -use-self = "warn" +use_self = "warn" useless_let_if_seq = "warn" while_float = "warn" zero_sized_map_values = "warn" diff --git a/rust/kona/sp1/programs/Cargo.toml b/rust/kona/sp1/programs/Cargo.toml index a541efa601c..ef7243ef76d 100644 --- a/rust/kona/sp1/programs/Cargo.toml +++ b/rust/kona/sp1/programs/Cargo.toml @@ -20,13 +20,13 @@ repository = "https://github.com/ethereum-optimism/optimism" # this workspace must remain separate to isolate the SP1 crypto patches. # BEGIN SHARED WORKSPACE LINTS [workspace.lints.rust] -missing-debug-implementations = "warn" -missing-docs = "warn" -unreachable-pub = "warn" -unused-must-use = "deny" -rust-2018-idioms = { level = "deny", priority = -1 } -unnameable-types = "warn" -rust-2024-incompatible-pat = "warn" +missing_debug_implementations = "warn" +missing_docs = "warn" +unreachable_pub = "warn" +unused_must_use = "deny" +rust_2018_idioms = { level = "deny", priority = -1 } +unnameable_types = "warn" +rust_2024_incompatible_pat = "warn" [workspace.lints.rustdoc] all = "warn" @@ -66,7 +66,7 @@ manual_clamp = "warn" manual_is_variant_and = "warn" manual_string_new = "warn" match_same_arms = "warn" -missing-const-for-fn = "warn" +missing_const_for_fn = "warn" mutex_integer = "warn" naive_bytecount = "warn" needless_bitwise_bool = "warn" @@ -75,11 +75,11 @@ needless_for_each = "warn" needless_pass_by_ref_mut = "warn" nonstandard_macro_braces = "warn" option_as_ref_cloned = "warn" -option-if-let-else = "warn" +option_if_let_else = "warn" or_fun_call = "warn" path_buf_push_overwrite = "warn" read_zero_byte_vec = "warn" -redundant-clone = "warn" +redundant_clone = "warn" redundant_else = "warn" single_char_pattern = "warn" string_lit_as_bytes = "warn" @@ -98,7 +98,7 @@ unnecessary_struct_initialization = "warn" unnested_or_patterns = "warn" unused_peekable = "warn" unused_rounding = "warn" -use-self = "warn" +use_self = "warn" useless_let_if_seq = "warn" while_float = "warn" zero_sized_map_values = "warn" From 50115fa6ff8f205845afc12c652ac2fd7a389854 Mon Sep 17 00:00:00 2001 From: Matt Solomon <matt@mattsolomon.dev> Date: Thu, 5 Nov 2026 21:45:47 +0000 Subject: [PATCH 06/21] ci: pin SOURCE_DATE_EPOCH for sccache and drop rust-binaries-for-sysgo (#23948) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --- .circleci/continue/main.yml | 35 ++++++++++------------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/.circleci/continue/main.yml b/.circleci/continue/main.yml index 618fe06d6ba..6863245c287 100644 --- a/.circleci/continue/main.yml +++ b/.circleci/continue/main.yml @@ -253,6 +253,11 @@ commands: { echo "export GOOGLE_APPLICATION_CREDENTIALS=/tmp/sccache_gcp_cred.json" echo "export RUSTC_WRAPPER=sccache" + # reth-node-core's build script embeds the build time, so without a + # fixed value it and every crate built on it miss the cache on every + # run. op-reth reports op-version's build info instead, so its version + # output is unchanged. + echo "export SOURCE_DATE_EPOCH=1700000000" } >> "$BASH_ENV" rust-sccache-stats: @@ -2167,16 +2172,6 @@ jobs: paths: - "rust/kona/prestate-artifacts-*/" - # Aggregator job - allows downstream jobs to depend on a single job instead of listing all build jobs. - rust-binaries-for-sysgo: - docker: - - image: <<pipeline.parameters.c-default_docker_image>> - resource_class: small.gen2 - steps: - - run: - name: All Rust binaries ready - command: echo "All Rust binaries built and persisted to workspace" - # ============================================================================ preimage-reproducibility: @@ -2615,11 +2610,6 @@ workflows: context: - circleci-repo-readonly-authenticated-github-token - sccache-gcs-optimism - - rust-binaries-for-sysgo: - requires: - - rust-kona-binaries - - rust-op-reth-binary - - rust-sp1-super-range-executor - go-binaries-for-sysgo: requires: - prep-go-modules @@ -2643,10 +2633,12 @@ workflows: - circleci-repo-readonly-authenticated-github-token - slack - discord - requires: + requires: &memory_all_requires - contracts-bedrock-build - cannon-prestate - - rust-binaries-for-sysgo + - rust-kona-binaries + - rust-op-reth-binary + - rust-sp1-super-range-executor - go-binaries-for-sysgo - prep-go-modules # for the gitignored superchain-configs.zip op-acceptance-tests //go:embeds @@ -2668,14 +2660,7 @@ workflows: - circleci-repo-readonly-authenticated-github-token - slack - discord - requires: - - contracts-bedrock-build - - cannon-prestate - - rust-binaries-for-sysgo - - go-binaries-for-sysgo - - prep-go-modules - # for the gitignored superchain-configs.zip op-acceptance-tests //go:embeds - - prep-superchain + requires: *memory_all_requires # Gate job - single stable job used as GitHub required status check for develop. # Uses terminal requires so it always runs (even when deps fail), giving the # merge queue an immediate failure signal instead of a timeout. From b8492fddb1d8656c973fa6c18f48dcc255515a95 Mon Sep 17 00:00:00 2001 From: Adrian Sutton <adrian@oplabs.co> Date: Thu, 5 Nov 2026 21:56:54 +0000 Subject: [PATCH 07/21] contracts-bedrock: Use the real ETHLiquidity balance in tests and docs (#23927) --- .../reference/contracts/interop/predeploy.mdx | 2 +- .../reference/contracts/interop/predeploy.mdx | 2 +- .../test/L2/ETHLiquidity.t.sol | 21 +++++++------------ .../test/L2/SuperchainETHBridge.t.sol | 12 +++-------- 4 files changed, 12 insertions(+), 25 deletions(-) diff --git a/docs/public-docs/app-developers/reference/contracts/interop/predeploy.mdx b/docs/public-docs/app-developers/reference/contracts/interop/predeploy.mdx index 74eb676298e..f01dff87d91 100644 --- a/docs/public-docs/app-developers/reference/contracts/interop/predeploy.mdx +++ b/docs/public-docs/app-developers/reference/contracts/interop/predeploy.mdx @@ -41,7 +41,7 @@ The `SuperchainETHBridge` is a predeploy contract that facilitates cross-chain E The `ETHLiquidity` contract is a predeploy that manages native ETH liquidity for cross-chain transfers within the OP Stack interop set. It works in conjunction with the `SuperchainETHBridge` to facilitate the movement of ETH between chains without requiring modifications to the EVM to generate new ETH. -The contract is initialized with a very large balance (type(uint248).max wei) to ensure it can handle all legitimate minting operations. This design allows the `SuperchainETHBridge` to have a guaranteed source of ETH liquidity on each chain, which is essential for the cross-chain ETH transfer mechanism. +The contract is initialized with a very large balance (type(uint128).max wei) to ensure it can handle all legitimate minting operations. This design allows the `SuperchainETHBridge` to have a guaranteed source of ETH liquidity on each chain, which is essential for the cross-chain ETH transfer mechanism. * **Address:** `0x4200000000000000000000000000000000000025` * **Specs:** [`ETHLiquidity`](https://specs.optimism.io/interop/eth-liquidity.html) diff --git a/docs/public-docs/ko/app-developers/reference/contracts/interop/predeploy.mdx b/docs/public-docs/ko/app-developers/reference/contracts/interop/predeploy.mdx index 50adec10726..3740565b3d6 100644 --- a/docs/public-docs/ko/app-developers/reference/contracts/interop/predeploy.mdx +++ b/docs/public-docs/ko/app-developers/reference/contracts/interop/predeploy.mdx @@ -41,7 +41,7 @@ L2 체인 간의 안전한 ERC20 토큰 전송에 활용됩니다. `ETHLiquidity` 컨트랙트는 OP Stack interop 세트 내 크로스체인 전송을 위한 네이티브 ETH 유동성을 관리하는 predeploy입니다. `SuperchainETHBridge`와 함께 작동하여, 새로운 ETH를 생성하기 위해 EVM을 수정하지 않고도 체인 간 ETH 이동을 지원합니다. -이 컨트랙트는 모든 정당한 발행(minting) 작업을 처리할 수 있도록 매우 큰 잔액(type(uint248).max wei)으로 초기화됩니다. 이러한 설계 덕분에 `SuperchainETHBridge`는 각 체인에서 보장된 ETH 유동성 공급원을 확보할 수 있으며, 이는 크로스체인 ETH 전송 메커니즘에 필수적입니다. +이 컨트랙트는 모든 정당한 발행(minting) 작업을 처리할 수 있도록 매우 큰 잔액(type(uint128).max wei)으로 초기화됩니다. 이러한 설계 덕분에 `SuperchainETHBridge`는 각 체인에서 보장된 ETH 유동성 공급원을 확보할 수 있으며, 이는 크로스체인 ETH 전송 메커니즘에 필수적입니다. * **주소:** `0x4200000000000000000000000000000000000025` * **사양:** [`ETHLiquidity`](https://specs.optimism.io/interop/eth-liquidity.html) diff --git a/packages/contracts-bedrock/test/L2/ETHLiquidity.t.sol b/packages/contracts-bedrock/test/L2/ETHLiquidity.t.sol index 9448edd2302..26f2ae5c558 100644 --- a/packages/contracts-bedrock/test/L2/ETHLiquidity.t.sol +++ b/packages/contracts-bedrock/test/L2/ETHLiquidity.t.sol @@ -41,7 +41,7 @@ abstract contract ETHLiquidity_TestInit is CommonTest { uint32 internal constant SET_PAUSED_GAS_LIMIT = 200_000; /// @notice The starting balance of the ETHLiquidity contract. - uint256 public constant STARTING_LIQUIDITY_BALANCE = type(uint248).max; + uint256 public constant STARTING_LIQUIDITY_BALANCE = type(uint128).max; /// @notice Nonce of the next message these tests relay from the L1CrossDomainMessenger. uint240 internal l1MessageNonce; @@ -50,13 +50,6 @@ abstract contract ETHLiquidity_TestInit is CommonTest { function setUp() public virtual override { super.enableInterop(); super.setUp(); - - { - // TODO: Remove this block when L2Genesis includes this contract. - vm.etch(address(superchainETHBridge), vm.getDeployedCode("SuperchainETHBridge.sol:SuperchainETHBridge")); - vm.etch(address(ethLiquidity), vm.getDeployedCode("ETHLiquidity.sol:ETHLiquidity")); - vm.deal(address(ethLiquidity), type(uint248).max); - } } /// @notice Tests that contract is set up with the correct starting balance, unpaused. @@ -136,7 +129,7 @@ contract ETHLiquidity_Burn_Test is ETHLiquidity_TestInit { /// @param _amount Amount of ETH (in wei) to call the burn function with. function testFuzz_burn_fromAuthorizedCaller_succeeds(uint256 _amount) public { // Assume - _amount = bound(_amount, 0, type(uint248).max - 1); + _amount = bound(_amount, 0, type(uint128).max - 1); // Arrange vm.deal(address(superchainETHBridge), _amount); @@ -159,7 +152,7 @@ contract ETHLiquidity_Burn_Test is ETHLiquidity_TestInit { // Assume vm.assume(_caller != address(superchainETHBridge)); vm.assume(_caller != address(ethLiquidity)); - _amount = bound(_amount, 0, type(uint248).max - 1); + _amount = bound(_amount, 0, type(uint128).max - 1); // Arrange vm.deal(_caller, _amount); @@ -179,7 +172,7 @@ contract ETHLiquidity_Burn_Test is ETHLiquidity_TestInit { /// @param _amount Amount of ETH (in wei) to call the burn function with. function testFuzz_burn_whilePaused_reverts(uint256 _amount) public { // Assume - _amount = bound(_amount, 0, type(uint248).max - 1); + _amount = bound(_amount, 0, type(uint128).max - 1); // Arrange vm.deal(address(superchainETHBridge), _amount); @@ -234,7 +227,7 @@ contract ETHLiquidity_Mint_Test is ETHLiquidity_TestInit { /// @param _amount Amount of ETH (in wei) to call the mint function with. function testFuzz_mint_fromAuthorizedCaller_succeeds(uint256 _amount) public { // Assume - _amount = bound(_amount, 0, type(uint248).max - 1); + _amount = bound(_amount, 0, type(uint128).max - 1); // Get balances before uint256 superchainETHBridgeBalanceBefore = address(superchainETHBridge).balance; @@ -257,7 +250,7 @@ contract ETHLiquidity_Mint_Test is ETHLiquidity_TestInit { // Assume vm.assume(_caller != address(superchainETHBridge)); vm.assume(address(_caller).balance == 0); - _amount = bound(_amount, 0, type(uint248).max - 1); + _amount = bound(_amount, 0, type(uint128).max - 1); // Arrange // Nothing to arrange. @@ -278,7 +271,7 @@ contract ETHLiquidity_Mint_Test is ETHLiquidity_TestInit { /// @param _amount Amount of ETH (in wei) to call the mint function with. function testFuzz_mint_whilePaused_reverts(uint256 _amount) public { // Assume - _amount = bound(_amount, 0, type(uint248).max - 1); + _amount = bound(_amount, 0, type(uint128).max - 1); // Arrange _setPaused(true); diff --git a/packages/contracts-bedrock/test/L2/SuperchainETHBridge.t.sol b/packages/contracts-bedrock/test/L2/SuperchainETHBridge.t.sol index c63dc548a5c..5efa9a5d1ab 100644 --- a/packages/contracts-bedrock/test/L2/SuperchainETHBridge.t.sol +++ b/packages/contracts-bedrock/test/L2/SuperchainETHBridge.t.sol @@ -71,12 +71,6 @@ abstract contract SuperchainETHBridge_TestInit is CommonTest, MockHelper { function setUp() public virtual override { super.enableInterop(); super.setUp(); - - { - // TODO: Remove this block when L2Genesis includes this contract. - vm.etch(address(superchainETHBridge), vm.getDeployedCode("SuperchainETHBridge.sol:SuperchainETHBridge")); - vm.etch(address(ethLiquidity), vm.getDeployedCode("ETHLiquidity.sol:ETHLiquidity")); - } } /// @notice Pauses or unpauses ETHLiquidity: relays `setPaused` from this chain's @@ -129,7 +123,7 @@ contract SuperchainETHBridge_SendETH_Test is SuperchainETHBridge_TestInit { vm.assume(_sender != ZERO_ADDRESS); vm.assume(_sender != Predeploys.L2_TO_L2_CROSS_DOMAIN_MESSENGER); vm.assume(_to != ZERO_ADDRESS); - _amount = bound(_amount, 0, type(uint248).max - 1); + _amount = bound(_amount, 0, type(uint128).max - 1); // Arrange vm.deal(_sender, _amount); @@ -302,7 +296,7 @@ contract SuperchainETHBridge_RelayETH_Test is SuperchainETHBridge_TestInit { // Assume vm.assume(_to != ZERO_ADDRESS); assumePayable(_to); - _amount = bound(_amount, 0, type(uint248).max - 1); + _amount = bound(_amount, 0, type(uint128).max - 1); // Arrange vm.deal(address(superchainETHBridge), _amount); @@ -414,7 +408,7 @@ contract SuperchainETHBridge_RefundETH_Test is SuperchainETHBridge_TestInit { vm.assume(_from != address(ethLiquidity) && _from != address(0) && _to != address(0)); vm.assume(_from != Predeploys.L2_TO_L2_CROSS_DOMAIN_MESSENGER); assumeNotPrecompile(_from); - _amount = bound(_amount, 1, type(uint248).max - 1); + _amount = bound(_amount, 1, type(uint128).max - 1); (uint256 nonce, bytes32 messageHash) = _send(_from, _to, _amount); _expire(messageHash); uint256 balanceBefore = _from.balance; From fdf142b5a7f425326ad8179928014d276244b848 Mon Sep 17 00:00:00 2001 From: Sebastian Stammler <seb@oplabs.co> Date: Fri, 6 Nov 2026 10:17:56 +0000 Subject: [PATCH 08/21] op-reth: keep endpoint.up on out-of-scope interop filter answers (#23951) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --- rust/Cargo.lock | 1 + rust/op-reth/crates/txpool/Cargo.toml | 1 + .../txpool/src/interop_filter/client.rs | 9 +- .../txpool/src/interop_filter/errors.rs | 7 + .../txpool/src/interop_filter/metrics.rs | 161 ++++++++++++++---- 5 files changed, 144 insertions(+), 35 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index acca24289b5..218d6b423b6 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -14350,6 +14350,7 @@ dependencies = [ "jsonrpsee", "jsonrpsee-server", "metrics", + "metrics-util", "op-alloy-consensus", "op-alloy-flz", "op-alloy-rpc-types", diff --git a/rust/op-reth/crates/txpool/Cargo.toml b/rust/op-reth/crates/txpool/Cargo.toml index 9f03c0f3a65..761ea438495 100644 --- a/rust/op-reth/crates/txpool/Cargo.toml +++ b/rust/op-reth/crates/txpool/Cargo.toml @@ -65,6 +65,7 @@ reth-optimism-chainspec = { workspace = true, features = ["superchain-configs"] reth-optimism-primitives = { workspace = true, features = ["reth-codec"] } reth-provider = { workspace = true, features = ["test-utils"] } reth-transaction-pool = { workspace = true, features = ["test-utils"] } +metrics-util = { workspace = true, features = ["debugging"] } rstest.workspace = true tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros"] } # Mock JSON-RPC server for interop filter client tests. jsonrpsee-server is already a workspace diff --git a/rust/op-reth/crates/txpool/src/interop_filter/client.rs b/rust/op-reth/crates/txpool/src/interop_filter/client.rs index ebdc6014d36..0632df2d1e9 100644 --- a/rust/op-reth/crates/txpool/src/interop_filter/client.rs +++ b/rust/op-reth/crates/txpool/src/interop_filter/client.rs @@ -118,7 +118,8 @@ impl InteropFilterClient { invalid += 1; first_invalid.get_or_insert(e); } - // Non-response (timeout / transport): does not count toward quorum. + // Non-response (timeout, transport, data not yet available): does not count toward + // quorum. Err(_) => continue, } // Quorum reached: stop without awaiting not-yet-responded endpoints. But a failsafe @@ -596,11 +597,7 @@ impl<'a> IntoFuture for CheckAccessListRequest<'a> { .map_err(|_| InteropTxValidatorError::Timeout(timeout.as_secs())) .and_then(|r| r.map_err(InteropTxValidatorError::from_json_rpc)); - match &verdict { - Ok(()) => endpoint_metrics.record_valid(), - Err(e) if e.is_definitive_invalid() => endpoint_metrics.record_invalid(), - Err(_) => endpoint_metrics.record_unavailable(), - } + endpoint_metrics.record_verdict(&verdict); verdict }) } diff --git a/rust/op-reth/crates/txpool/src/interop_filter/errors.rs b/rust/op-reth/crates/txpool/src/interop_filter/errors.rs index 2dd9f8bfb92..95a4b771896 100644 --- a/rust/op-reth/crates/txpool/src/interop_filter/errors.rs +++ b/rust/op-reth/crates/txpool/src/interop_filter/errors.rs @@ -102,6 +102,13 @@ impl InteropTxValidatorError { matches!(self, Self::FailsafeEnabled) } + /// Returns `true` if the endpoint answered that the initiating message's timestamp is newer + /// than what it has ingested or cross-validated. A healthy filter answers this for any recent + /// message. + pub const fn is_message_too_recent(&self) -> bool { + matches!(self, Self::DataUnavailable { code: OUT_OF_SCOPE_CODE }) + } + /// Returns a new instance of [`Other`](Self::Other) error variant. pub fn other<E>(err: E) -> Self where diff --git a/rust/op-reth/crates/txpool/src/interop_filter/metrics.rs b/rust/op-reth/crates/txpool/src/interop_filter/metrics.rs index bb42a76efd3..b1ac752ae7b 100644 --- a/rust/op-reth/crates/txpool/src/interop_filter/metrics.rs +++ b/rust/op-reth/crates/txpool/src/interop_filter/metrics.rs @@ -29,12 +29,17 @@ const ENDPOINT_VERDICTS: &str = "optimism_transaction_pool.interop.endpoint.verd /// `EndpointMetrics` used to emit, so existing dashboards keep working. const ENDPOINT_QUERY_LATENCY: &str = "optimism_transaction_pool.interop.endpoint.query_latency"; -/// Fully-qualified name of the per-endpoint health gauge: `1` if the endpoint answered its last -/// *completed* check (valid or invalid — both mean it responded), `0` if that check was a -/// non-response. Left untouched when a check is cancelled by fast-accept, so it reflects the last -/// real outcome. `sum(endpoint.up)` against -/// [`quorum_min_responses`](InteropMetrics::quorum_min_responses) is the fail-closed headroom: it -/// drops as endpoints fall away, *before* quorum is lost. +/// Fully-qualified name of the per-endpoint health gauge: `1` if the endpoint's last completed +/// check returned a verdict (valid or invalid), `0` if it was a non-response. `sum(endpoint.up)` +/// against [`quorum_min_responses`](InteropMetrics::quorum_min_responses) is the fail-closed +/// headroom: it drops as endpoints stop answering, *before* quorum is lost. +/// +/// A check cancelled by fast-accept and a +/// [too recent](InteropTxValidatorError::is_message_too_recent) answer leave it unchanged. That +/// answer still misses quorum, so `rejected_no_quorum` can fire at full headroom, and a filter +/// whose ingestion stalled keeps its last value; its `verdicts{verdict="valid"}` rate falls +/// against its peers instead, and the filter's own +/// `op_interop_filter_default_ingestion_lag_seconds` rises. const ENDPOINT_UP: &str = "optimism_transaction_pool.interop.endpoint.up"; /// `result` label values for [`InteropMetrics::record_decision`]. Every transaction that reaches @@ -107,8 +112,7 @@ pub struct EndpointMetrics { invalid: Counter, /// Non-responses from this endpoint (timeout, transport error, soft out-of-sync). unavailable: Counter, - /// `1` if this endpoint's last completed check produced a verdict, `0` if it was a - /// non-response. See [`ENDPOINT_UP`]. + /// Per-endpoint health gauge. See [`ENDPOINT_UP`]. up: Gauge, } @@ -136,26 +140,24 @@ impl EndpointMetrics { self.query_latency.record(duration.as_secs_f64()); } - /// Records this endpoint's definitive valid verdict (a valid verdict still means it responded). - #[inline] - pub fn record_valid(&self) { - self.valid.increment(1); - self.up.set(1.0); - } - - /// Records this endpoint's definitive invalid verdict (an invalid verdict still means it - /// responded). - #[inline] - pub fn record_invalid(&self) { - self.invalid.increment(1); - self.up.set(1.0); - } - - /// Records this endpoint's non-response (timeout, transport error, soft out-of-sync). - #[inline] - pub fn record_unavailable(&self) { - self.unavailable.increment(1); - self.up.set(0.0); + /// Records the outcome of this endpoint's completed check. See `ENDPOINT_UP` for how each + /// outcome moves the health gauge. + pub fn record_verdict(&self, verdict: &Result<(), InteropTxValidatorError>) { + match verdict { + Ok(()) => { + self.valid.increment(1); + self.up.set(1.0); + } + Err(e) if e.is_definitive_invalid() => { + self.invalid.increment(1); + self.up.set(1.0); + } + Err(e) if e.is_message_too_recent() => self.unavailable.increment(1), + Err(_) => { + self.unavailable.increment(1); + self.up.set(0.0); + } + } } } @@ -315,7 +317,8 @@ fn describe_metrics() { ); describe_gauge!( ENDPOINT_UP, - "1 if an interop endpoint answered its last completed check, else 0; sum vs \ + "1 if an interop endpoint's last completed check returned a verdict, 0 if a non-response; \ + a too-recent-message answer leaves it unchanged but still misses quorum; sum vs \ quorum_min_responses is the fail-closed headroom (labels: endpoint)" ); } @@ -323,11 +326,111 @@ fn describe_metrics() { #[cfg(test)] mod tests { use super::*; + use metrics_util::debugging::{DebugValue, DebuggingRecorder}; + use rstest::rstest; fn server_error() -> InteropTxValidatorError { InteropTxValidatorError::other(std::io::Error::other("filter unreachable")) } + fn data_unavailable(code: i32) -> Result<(), InteropTxValidatorError> { + Err(InteropTxValidatorError::DataUnavailable { code }) + } + + #[derive(Debug, Default, PartialEq)] + struct EndpointState { + up: f64, + valid: u64, + invalid: u64, + unavailable: u64, + } + + /// Returns the endpoint's metric values after recording `verdicts` in order. + fn endpoint_state(verdicts: &[Result<(), InteropTxValidatorError>]) -> EndpointState { + let recorder = DebuggingRecorder::new(); + let snapshotter = recorder.snapshotter(); + metrics::with_local_recorder(&recorder, || { + let endpoint = EndpointMetrics::for_endpoint(0); + for verdict in verdicts { + endpoint.record_verdict(verdict); + } + }); + + let mut state = EndpointState::default(); + for (key, _, _, value) in snapshotter.snapshot().into_vec() { + let key = key.key(); + match value { + DebugValue::Gauge(value) if key.name() == ENDPOINT_UP => { + state.up = value.into_inner(); + } + DebugValue::Counter(value) if key.name() == ENDPOINT_VERDICTS => { + let verdict = key.labels().find(|label| label.key() == "verdict"); + match verdict.expect("verdict counter has a verdict label").value() { + VERDICT_VALID => state.valid = value, + VERDICT_INVALID => state.invalid = value, + VERDICT_UNAVAILABLE => state.unavailable = value, + other => panic!("unexpected verdict label {other}"), + } + } + _ => {} + } + } + state + } + + /// A too-recent answer counts as unavailable but must not move the gauge in either direction. + #[test] + fn out_of_scope_counts_as_unavailable_but_keeps_up() { + assert_eq!( + endpoint_state(&[data_unavailable(-321100)]), + EndpointState { up: 1.0, unavailable: 1, ..Default::default() } + ); + assert_eq!( + endpoint_state(&[Ok(()), data_unavailable(-321100)]), + EndpointState { up: 1.0, valid: 1, unavailable: 1, ..Default::default() } + ); + assert_eq!( + endpoint_state(&[Err(server_error()), data_unavailable(-321100)]), + EndpointState { up: 0.0, unavailable: 2, ..Default::default() } + ); + } + + #[rstest] + #[case::future_data(data_unavailable(-321401))] + #[case::uninitialized(data_unavailable(-320400))] + #[case::timeout(Err(InteropTxValidatorError::Timeout(2)))] + #[case::transport(Err(server_error()))] + #[case::failsafe(Err(InteropTxValidatorError::FailsafeEnabled))] + fn non_response_drops_up(#[case] verdict: Result<(), InteropTxValidatorError>) { + assert_eq!( + endpoint_state(&[Ok(()), verdict]), + EndpointState { up: 0.0, valid: 1, unavailable: 1, ..Default::default() } + ); + } + + #[rstest] + #[case::valid(Ok(()), 1, 0)] + #[case::invalid( + Err(InteropTxValidatorError::InvalidEntry(SuperchainDAError::ConflictingData)), + 0, + 1 + )] + #[case::rejected( + Err(InteropTxValidatorError::Rejected { code: -32602, message: String::new() }), + 0, + 1 + )] + fn verdict_restores_up( + #[case] verdict: Result<(), InteropTxValidatorError>, + #[case] valid: u64, + #[case] invalid: u64, + ) { + assert_eq!( + endpoint_state(&[Err(server_error()), verdict]), + EndpointState { up: 1.0, valid, invalid, unavailable: 1 } + ); + } + #[test] fn validation_reason_maps_every_da_error() { assert_eq!(validation_reason(&SuperchainDAError::SkippedData), "skipped_data"); From 4ebd27fe9d58ea3595530c00f39547cfa24b460e Mon Sep 17 00:00:00 2001 From: Anton Evangelatov <anton.evangelatov@gmail.com> Date: Fri, 6 Nov 2026 13:34:47 +0000 Subject: [PATCH 09/21] contracts-bedrock: compare the messenger balance to its start in relay retry tests (#23972) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --- .../test/L1/L1CrossDomainMessenger.t.sol | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/contracts-bedrock/test/L1/L1CrossDomainMessenger.t.sol b/packages/contracts-bedrock/test/L1/L1CrossDomainMessenger.t.sol index a6e7eb75204..be3ef817c23 100644 --- a/packages/contracts-bedrock/test/L1/L1CrossDomainMessenger.t.sol +++ b/packages/contracts-bedrock/test/L1/L1CrossDomainMessenger.t.sol @@ -692,6 +692,8 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes address target = address(0xabcd); address sender = Predeploys.L2_CROSS_DOMAIN_MESSENGER; uint256 value = 100; + // The messenger of a forked chain can already hold ETH. + uint256 balanceBeforeMessenger = address(l1CrossDomainMessenger).balance; vm.expectCall(target, hex"1111"); @@ -712,7 +714,7 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes hex"1111" ); - assertEq(address(l1CrossDomainMessenger).balance, value); + assertEq(address(l1CrossDomainMessenger).balance, balanceBeforeMessenger + value); assertEq(address(target).balance, 0); assertEq(l1CrossDomainMessenger.successfulMessages(hash), false); assertEq(l1CrossDomainMessenger.failedMessages(hash), true); @@ -733,7 +735,7 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes hex"1111" ); - assertEq(address(l1CrossDomainMessenger).balance, 0); + assertEq(address(l1CrossDomainMessenger).balance, balanceBeforeMessenger); assertEq(address(target).balance, value); assertEq(l1CrossDomainMessenger.successfulMessages(hash), true); assertEq(l1CrossDomainMessenger.failedMessages(hash), true); @@ -831,6 +833,8 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes address target = address(0xabcd); address sender = Predeploys.L2_CROSS_DOMAIN_MESSENGER; uint256 value = 100; + // The messenger of a forked chain can already hold ETH. + uint256 balanceBeforeMessenger = address(l1CrossDomainMessenger).balance; // Compute the message hash. bytes32 hash = Hashing.hashCrossDomainMessageV1( @@ -868,7 +872,7 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes ); // Message failed. - assertEq(address(l1CrossDomainMessenger).balance, value); + assertEq(address(l1CrossDomainMessenger).balance, balanceBeforeMessenger + value); assertEq(address(target).balance, 0); assertEq(l1CrossDomainMessenger.successfulMessages(hash), false); assertEq(l1CrossDomainMessenger.failedMessages(hash), true); @@ -895,7 +899,7 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes ); // Message was successfully relayed. - assertEq(address(l1CrossDomainMessenger).balance, 0); + assertEq(address(l1CrossDomainMessenger).balance, balanceBeforeMessenger); assertEq(address(target).balance, value); assertEq(l1CrossDomainMessenger.successfulMessages(hash), true); assertEq(l1CrossDomainMessenger.failedMessages(hash), true); @@ -906,6 +910,8 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes address target = address(0xabcd); address sender = Predeploys.L2_CROSS_DOMAIN_MESSENGER; uint256 value = 100; + // The messenger of a forked chain can already hold ETH. + uint256 balanceBeforeMessenger = address(l1CrossDomainMessenger).balance; // Compute the message hash. bytes32 hash = Hashing.hashCrossDomainMessageV1( @@ -941,7 +947,7 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes ); // Message was successfully relayed. - assertEq(address(l1CrossDomainMessenger).balance, 0); + assertEq(address(l1CrossDomainMessenger).balance, balanceBeforeMessenger); assertEq(address(target).balance, value); assertEq(l1CrossDomainMessenger.successfulMessages(hash), true); assertEq(l1CrossDomainMessenger.failedMessages(hash), false); @@ -966,6 +972,8 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes address target = address(0xabcd); address sender = Predeploys.L2_CROSS_DOMAIN_MESSENGER; uint256 value = 100; + // The messenger of a forked chain can already hold ETH. + uint256 balanceBeforeMessenger = address(l1CrossDomainMessenger).balance; // Compute the message hash. bytes32 hash = Hashing.hashCrossDomainMessageV1( @@ -1000,7 +1008,7 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes ); // Message failed. - assertEq(address(l1CrossDomainMessenger).balance, value); + assertEq(address(l1CrossDomainMessenger).balance, balanceBeforeMessenger + value); assertEq(address(target).balance, 0); assertEq(l1CrossDomainMessenger.successfulMessages(hash), false); assertEq(l1CrossDomainMessenger.failedMessages(hash), true); @@ -1027,7 +1035,7 @@ contract L1CrossDomainMessenger_Uncategorized_Test is L1CrossDomainMessenger_Tes ); // Message was successfully relayed. - assertEq(address(l1CrossDomainMessenger).balance, 0); + assertEq(address(l1CrossDomainMessenger).balance, balanceBeforeMessenger); assertEq(address(target).balance, value); assertEq(l1CrossDomainMessenger.successfulMessages(hash), true); assertEq(l1CrossDomainMessenger.failedMessages(hash), true); From 4617ee2ba1e6dff0653128ae07f6830bb160a759 Mon Sep 17 00:00:00 2001 From: "donoso.eth" <30406536+donoso-eth@users.noreply.github.com> Date: Fri, 6 Nov 2026 13:37:03 +0000 Subject: [PATCH 10/21] op-core/superchain,op-node: carry genesis system config params from the registry (#23970) Co-authored-by: Claude Opus 5 <noreply@anthropic.com> --- op-core/superchain/types.go | 6 ++++++ op-node/superchain/superchain.go | 9 +++++++++ op-node/superchain/superchain_test.go | 24 ++++++++++++++++++++---- op-service/ptr/ptr.go | 8 ++++++++ 4 files changed, 43 insertions(+), 4 deletions(-) diff --git a/op-core/superchain/types.go b/op-core/superchain/types.go index 29bdbd21771..14d3ec3772e 100644 --- a/op-core/superchain/types.go +++ b/op-core/superchain/types.go @@ -101,6 +101,12 @@ type SystemConfig struct { GasLimit uint64 `json:"gasLimit" toml:"gasLimit"` BaseFeeScalar *uint64 `json:"baseFeeScalar,omitempty" toml:"baseFeeScalar,omitempty"` BlobBaseFeeScalar *uint64 `json:"blobBaseFeeScalar,omitempty" toml:"blobBaseFeeScalar,omitempty"` + // Operator fee (Isthmus), min base fee and DA footprint gas scalar (Jovian). The registry + // records these only when non-zero, so an absent key means the chain started from zero. + OperatorFeeScalar *uint32 `json:"operatorFeeScalar,omitempty" toml:"operatorFeeScalar,omitempty"` + OperatorFeeConstant *uint64 `json:"operatorFeeConstant,omitempty" toml:"operatorFeeConstant,omitempty"` + MinBaseFee *uint64 `json:"minBaseFee,omitempty" toml:"minBaseFee,omitempty"` + DAFootprintGasScalar *uint16 `json:"daFootprintGasScalar,omitempty" toml:"daFootprintGasScalar,omitempty"` } type RolesConfig struct { diff --git a/op-node/superchain/superchain.go b/op-node/superchain/superchain.go index 1e45cb3c8ea..14815f108a3 100644 --- a/op-node/superchain/superchain.go +++ b/op-node/superchain/superchain.go @@ -14,6 +14,7 @@ import ( "github.com/ethereum-optimism/optimism/op-core/superchain/bundle" "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/eth" + "github.com/ethereum-optimism/optimism/op-service/ptr" ) // LoadOPStackRollupConfig loads the rollup configuration of the requested chain ID from the superchain-registry. @@ -56,6 +57,14 @@ func rollupConfigFromRegistry(chConfig *registry.ChainConfig, superConfig regist Overhead: eth.Bytes32(sysCfg.Overhead), Scalar: eth.Bytes32(sysCfg.Scalar), GasLimit: sysCfg.GasLimit, + OperatorFeeParams: eth.EncodeOperatorFeeParams(eth.OperatorFeeParams{ + Scalar: ptr.Deref(sysCfg.OperatorFeeScalar), + Constant: ptr.Deref(sysCfg.OperatorFeeConstant), + }), + MinBaseFee: ptr.Deref(sysCfg.MinBaseFee), + // Zero means the protocol default. It is substituted only in + // SetDAFootprintGasScalarOrDefault when the L1 info is built, matching kona. + DAFootprintGasScalar: ptr.Deref(sysCfg.DAFootprintGasScalar), } addrs := chConfig.Addresses diff --git a/op-node/superchain/superchain_test.go b/op-node/superchain/superchain_test.go index 7524a07ef1e..ca6f625e549 100644 --- a/op-node/superchain/superchain_test.go +++ b/op-node/superchain/superchain_test.go @@ -9,6 +9,7 @@ import ( registry "github.com/ethereum-optimism/optimism/op-core/superchain" "github.com/ethereum-optimism/optimism/op-node/rollup" + "github.com/ethereum-optimism/optimism/op-service/eth" "github.com/ethereum-optimism/optimism/op-service/ptr" "github.com/stretchr/testify/require" ) @@ -44,10 +45,14 @@ func fullyPopulatedChainConfig() *registry.ChainConfig { L1: registry.GenesisRef{Hash: common.HexToHash("0xaa"), Number: 100}, L2: registry.GenesisRef{Hash: common.HexToHash("0xbb")}, SystemConfig: registry.SystemConfig{ - BatcherAddr: common.HexToAddress("0x4444444444444444444444444444444444444444"), - Overhead: common.HexToHash("0xbc"), - Scalar: common.HexToHash("0xa6fe0"), - GasLimit: 30_000_000, + BatcherAddr: common.HexToAddress("0x4444444444444444444444444444444444444444"), + Overhead: common.HexToHash("0xbc"), + Scalar: common.HexToHash("0xa6fe0"), + GasLimit: 30_000_000, + OperatorFeeScalar: ptr.New(uint32(13)), + OperatorFeeConstant: ptr.New(uint64(14)), + MinBaseFee: ptr.New(uint64(5_000_000_000)), + DAFootprintGasScalar: ptr.New(uint16(800)), }, }, Addresses: registry.AddressesConfig{ @@ -86,6 +91,17 @@ func TestRollupConfigFromRegistry(t *testing.T) { require.Equal(t, uint64(9), *cfg.KarstTime) require.True(t, cfg.KeepKarstUpgradeGas, "keep_karst_upgrade_gas from the registry must be carried into rollup.Config") + + // The post-Isthmus/Jovian genesis system config params decide the L1 attributes deposit and + // the block's extraData, so a dropped one derives a different chain than the sequencer built. + genesisSysCfg := cfg.Genesis.SystemConfig + require.Equal(t, uint64(5_000_000_000), genesisSysCfg.MinBaseFee, + "minBaseFee from the registry must reach the genesis system config") + require.Equal(t, uint16(800), genesisSysCfg.DAFootprintGasScalar, + "daFootprintGasScalar must be carried through as recorded, not replaced by the default") + operatorFee := eth.DecodeOperatorFeeParams(genesisSysCfg.OperatorFeeParams) + require.Equal(t, uint32(13), operatorFee.Scalar) + require.Equal(t, uint64(14), operatorFee.Constant) } // TestRollupConfigFromRegistry_AllFieldsSet feeds a fully-populated chain config through the diff --git a/op-service/ptr/ptr.go b/op-service/ptr/ptr.go index 02854e053ce..836234035c5 100644 --- a/op-service/ptr/ptr.go +++ b/op-service/ptr/ptr.go @@ -13,6 +13,14 @@ func New[T any](v T) *T { return &v } +// Deref returns the value behind v, or the zero value of T when v is nil. +func Deref[T any](v *T) (zero T) { + if v == nil { + return zero + } + return *v +} + func Str[T any](v *T) string { if v == nil { return "<nil>" From a71a7dbb502a682819c5a9901e7457bebb57a15c Mon Sep 17 00:00:00 2001 From: Anton Evangelatov <anton.evangelatov@gmail.com> Date: Fri, 6 Nov 2026 15:55:51 +0000 Subject: [PATCH 11/21] op-deployer: run the forge package tests in CI (#23643) Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --- .circleci/continue/main.yml | 12 ++++++++++++ justfile | 3 +-- op-deployer/justfile | 18 ++++++++++++++++++ op-deployer/pkg/deployer/forge/binary_test.go | 12 +++++++++--- 4 files changed, 40 insertions(+), 5 deletions(-) diff --git a/.circleci/continue/main.yml b/.circleci/continue/main.yml index 6863245c287..8997b2f0311 100644 --- a/.circleci/continue/main.yml +++ b/.circleci/continue/main.yml @@ -1838,6 +1838,9 @@ jobs: enable-mise-cache: true - attach_workspace: at: . + # op-deployer/pkg/deployer/forge's tests compile a test project with forge. Without + # an installed solc, forge downloads the newest matching release on every run. + - install-solc-compilers - run: name: Configure op-reth binary paths command: | @@ -2302,6 +2305,13 @@ jobs: - checkout-with-mise: checkout-method: blobless enable-mise-cache: true + # The recipe downloads every pinned forge release archive, so skip it on PRs that change + # neither the forge package nor the recipe. check-changed also runs it on develop and when + # mise.toml or the CI config changes. + - check-changed: + patterns: op-deployer/pkg/deployer/forge,op-deployer/justfile + no_go_deps: "true" + - restore-go-mod-cache - run: command: just check-forge-version working_directory: op-deployer @@ -2469,6 +2479,8 @@ workflows: context: - circleci-repo-readonly-authenticated-github-token - op-deployer-forge-version: + requires: + - prep-go-modules context: - circleci-repo-readonly-authenticated-github-token - semgrep-scan: diff --git a/justfile b/justfile index 1e9ccf28a2f..22e08c7b4b1 100644 --- a/justfile +++ b/justfile @@ -11,11 +11,10 @@ TEST_TIMEOUT := env('TEST_TIMEOUT', '10m') # op-acceptance-tests dedicated acceptance-test job (needs a running devnet) # cannon dedicated cannon job (slow MIPS emulation tests) # rust rust-e2e pipeline (needs prebuilt Rust binaries) -# op-deployer/pkg/deployer/forge fails when forge is on PATH (ethereum-optimism/optimism#21200) # op-e2e/actions dedicated go-actions-tests job (its own resource class # and timeout; running them here too would run them twice) # See the list-test-packages recipe, which expands `go list ./...` minus these. -EXCLUDED_TEST_PKGS := "op-acceptance-tests cannon rust op-deployer/pkg/deployer/forge op-e2e/actions" +EXCLUDED_TEST_PKGS := "op-acceptance-tests cannon rust op-e2e/actions" # Fault-proof packages run in the default go-tests job and again in a dedicated # job with Cannon enabled, so they keep a separate list. diff --git a/op-deployer/justfile b/op-deployer/justfile index f49918cbec7..c2fb5db41ab 100644 --- a/op-deployer/justfile +++ b/op-deployer/justfile @@ -61,6 +61,24 @@ check-forge-version: echo -e "\n✓ forge versions match: $mise_version" + echo -e "\nVerifying the pinned forge release archives and checksums..." + log=$(mktemp) + trap 'rm -f "$log"' EXIT + # The archives come from the GitHub CDN, so retry a transient download failure. + n=0 + until OP_DEPLOYER_TEST_FORGE_RELEASES=1 go test -count=1 -timeout=15m -v -run '^TestStandardBinary_ForgeBins$' ./pkg/deployer/forge/ | tee "$log"; do + n=$((n+1)) + if [ "$n" -ge 3 ]; then + echo "ERROR: forge release archive verification failed after $n attempts" >&2 + exit 1 + fi + backoff=$((10 * 2 ** (n - 1))) + echo "forge release archive verification failed (attempt $n); retrying in ${backoff}s..." >&2 + sleep "$backoff" + done + # go test also exits 0 when -run matches nothing or the test skips. + grep -q '^--- PASS: TestStandardBinary_ForgeBins ' "$log" || { echo "ERROR: TestStandardBinary_ForgeBins did not run" >&2; exit 1; } + # ====================================== # Deployment and Verification Utilities # diff --git a/op-deployer/pkg/deployer/forge/binary_test.go b/op-deployer/pkg/deployer/forge/binary_test.go index d9b7229f633..6a497f5dbff 100644 --- a/op-deployer/pkg/deployer/forge/binary_test.go +++ b/op-deployer/pkg/deployer/forge/binary_test.go @@ -21,11 +21,16 @@ import ( // TestStandardBinary_ForgeBins tests that the binary can be downloaded from the // official release channel, and that their checksums are correct. +// +// It downloads every pinned release archive from GitHub, so it only runs when +// OP_DEPLOYER_TEST_FORGE_RELEASES is set (see `just check-forge-version`). func TestStandardBinary_ForgeBins(t *testing.T) { - if testing.Short() { - t.Skip("skipping test in -short mode") + if os.Getenv("OP_DEPLOYER_TEST_FORGE_RELEASES") == "" { + t.Skip("OP_DEPLOYER_TEST_FORGE_RELEASES not set") } + require.NotEmpty(t, checksums, "version.json pins no forge release checksums") + // Clear out the PATH env var so it forces a download. t.Setenv("PATH", "") @@ -44,7 +49,8 @@ func TestStandardBinary_ForgeBins(t *testing.T) { ) require.NoError(t, err) - ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) + // Each archive is over 100 MB. The timeout bounds a hang, not a slow mirror. + ctx, cancel := context.WithTimeout(t.Context(), 2*time.Minute) defer cancel() require.NoError(t, bin.Ensure(ctx)) }) From 446b187d3f12499a149d2533601caa1e9b2b296d Mon Sep 17 00:00:00 2001 From: Matt Solomon <matt@mattsolomon.dev> Date: Fri, 6 Nov 2026 16:30:46 +0000 Subject: [PATCH 12/21] op-acceptance-tests: run each test in its own go test (#23974) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --- .circleci/continue/main.yml | 2 +- docs/ai/acceptance-tests.md | 14 +- docs/ai/writing-acceptance-tests.md | 4 + op-acceptance-tests/README.md | 8 +- op-acceptance-tests/justfile | 127 ++++++--- .../serial/interop_fault_proofs_test.go | 42 ++- .../interop/reorgs/invalid_exec_msgs_test.go | 3 +- .../reorgs/l2_reorgs_after_l1_reorg_test.go | 3 +- .../tests/karst/upgrade_gas_test.go | 3 +- op-acceptance-tests/tests/osaka_on_l2_test.go | 18 -- .../tests/proofs/zk/honest_challenger_test.go | 15 +- .../tests/proofs/zk/zk_proposer_test.go | 3 +- op-acceptance-tests/tests/sdm/block_test.go | 4 - .../tests/superfaultproofs/intrablock.go | 268 +++++++++--------- ops/scripts/shard-tests.sh | 16 +- 15 files changed, 302 insertions(+), 228 deletions(-) diff --git a/.circleci/continue/main.yml b/.circleci/continue/main.yml index 8997b2f0311..11b7490c25e 100644 --- a/.circleci/continue/main.yml +++ b/.circleci/continue/main.yml @@ -2048,7 +2048,7 @@ jobs: type: integer default: 1 acceptance_test_jobs: - description: "Override ACCEPTANCE_TEST_JOBS (go test -p) for this run; empty + description: "Override ACCEPTANCE_TEST_JOBS (tests run at once) for this run; empty leaves the justfile default in place" type: string default: "" diff --git a/docs/ai/acceptance-tests.md b/docs/ai/acceptance-tests.md index 135c135f0d0..958e266f599 100644 --- a/docs/ai/acceptance-tests.md +++ b/docs/ai/acceptance-tests.md @@ -92,9 +92,9 @@ You can also run `just build-deps` directly to pre-build without running tests. ## Tuning Parallelism (`acceptance-test` only) When using `just acceptance-test`, the runner sets: -- `ACCEPTANCE_TEST_JOBS` — number of packages to test in parallel (default: 12) -- `ACCEPTANCE_TEST_PARALLEL` — `go test -parallel` value per package (default: 1) -- `ACCEPTANCE_TEST_TIMEOUT` — per-package timeout (default: 30m) +- `ACCEPTANCE_TEST_JOBS` — number of tests to run at once (default: 8) +- `ACCEPTANCE_TEST_PARALLEL` — `go test -parallel` value per test (default: 1) +- `ACCEPTANCE_TEST_TIMEOUT` — per-test timeout (default: 30m) Override with environment variables: @@ -105,11 +105,13 @@ cd op-acceptance-tests && ACCEPTANCE_TEST_PARALLEL=2 ACCEPTANCE_TEST_TIMEOUT=1h ## Log Output (`acceptance-test` only) When using `just acceptance-test`, logs are written to `op-acceptance-tests/logs/testrun-<timestamp>/`: -- `all.log` — full test output -- `raw_go_events.log` — JSON test events +- `all.log` — console output +- `raw_go_events-<node>-<package>.<test>.log` — JSON test events, one file per top-level test +- `per-test/<dotted package>/<test>.log` — each test's own output +- `failed/<node>-<package>.<test>.log` — console output of each test that failed, plus any still running if the run was cut off - `flaky-tests.txt` — tests marked with `MarkFlaky()` -Results XML goes to `op-acceptance-tests/results/results.xml`. +Results XML goes to `op-acceptance-tests/results/results-<node>-<package>.<test>.xml`, one file per top-level test. When using `just test`, output goes to stdout only. diff --git a/docs/ai/writing-acceptance-tests.md b/docs/ai/writing-acceptance-tests.md index b86531dbd85..215c2887b52 100644 --- a/docs/ai/writing-acceptance-tests.md +++ b/docs/ai/writing-acceptance-tests.md @@ -80,6 +80,10 @@ func TestSomething(gt *testing.T) { Keep the test body at this level. If you find yourself reaching into low-level clients, RPC calls, or raw receipts, that is a signal the DSL is missing an operation or typed API. The resulting value or error may still be asserted in the test when that assertion is the behaviour under test. +Run subtests sequentially, using `devtest.SerialT(gt)` in a `gt.Run` subtest, and make only the top-level test parallel. Go stops a parent test's clock while its parallel subtests run, so the parent's recorded time leaves them out and can round to 0s. CI's timing-based split then underweights it, and such tests pile up on one node. `devtest.RunParallel` is fine: it waits inside a subtest, so the parent's time stays real. + +Don't print to stdout from `TestMain` or `init`. `go test -list` runs them, and `just acceptance-test` fails on anything in its output that isn't a test name, because stray output can hide a name. + ## DSL Patterns to Follow ### Action Methods Do Three Things diff --git a/op-acceptance-tests/README.md b/op-acceptance-tests/README.md index d7af95ba317..c73b738fcb2 100644 --- a/op-acceptance-tests/README.md +++ b/op-acceptance-tests/README.md @@ -42,11 +42,11 @@ gotestsum --format testname --junitfile ./results/results.xml -- \ -count=1 -p 4 -parallel 4 -timeout 30m ./tests/... ``` -The `just` wrapper computes defaults from available CPUs: +The `just` wrapper runs each top-level test in its own `go test`, with these defaults: -- package jobs: CPU count -- in-package `t.Parallel`: half the CPU count -- timeout: `30m` +- tests at once: `8` +- `t.Parallel` within a test's `go test`: `1` +- per-test timeout: `30m` Override them with `ACCEPTANCE_TEST_JOBS`, `ACCEPTANCE_TEST_PARALLEL`, and `ACCEPTANCE_TEST_TIMEOUT`. diff --git a/op-acceptance-tests/justfile b/op-acceptance-tests/justfile index e048d226f27..a2ec5c383c3 100644 --- a/op-acceptance-tests/justfile +++ b/op-acceptance-tests/justfile @@ -75,26 +75,26 @@ acceptance-test: # Each ParallelT acceptance test spins its own full devstack (L1 geth + # op-node + op-reth/op-geth + batcher + proposer + challenger), so the real - # cost driver is concurrent ParallelT goroutines, bounded by -p * -parallel. + # cost driver is concurrent ParallelT goroutines, bounded by jobs * -parallel. # The previous unbounded default (-p = CPU_COUNT ~= 20, -parallel = ~10) # saturated CPU+RAM and triggered mass "context deadline exceeded" failures # across the runner — see ethereum-optimism/optimism#20966. # - # Collapse to a single concurrency axis: -parallel=1 disables intra-package - # parallelism so each package binary runs one test at a time, and -p directly - # caps concurrent test devstacks across the runner. 12 is well under the - # observed ~30-effective-devstack crash threshold and lands wall time near - # the pre-cap baseline. - DEFAULT_JOBS=12 + # Collapse to a single concurrency axis: each top-level test gets its own + # `go test -parallel=1`, and xargs -P directly caps concurrent test devstacks + # across the runner. 8 is what CI runs. + DEFAULT_JOBS=8 DEFAULT_TEST_PARALLEL=1 JOBS="${ACCEPTANCE_TEST_JOBS:-$DEFAULT_JOBS}" + # xargs -P 0 means no cap, or 100 on BusyBox. + [ "$JOBS" -gt 0 ] || { echo "error: ACCEPTANCE_TEST_JOBS must be a positive integer" >&2; exit 1; } TEST_PARALLEL="${ACCEPTANCE_TEST_PARALLEL:-$DEFAULT_TEST_PARALLEL}" TEST_TIMEOUT="${ACCEPTANCE_TEST_TIMEOUT:-30m}" echo "CPU COUNT: $CPU_COUNT" - echo "PACKAGE JOBS: $JOBS" + echo "TEST JOBS: $JOBS" echo "TEST PARALLELISM: $TEST_PARALLEL" - echo "PACKAGE TIMEOUT: $TEST_TIMEOUT" + echo "TEST TIMEOUT: $TEST_TIMEOUT" cd {{REPO_ROOT}} if ! command -v gotestsum >/dev/null; then @@ -107,7 +107,7 @@ acceptance-test: mkdir -p "$LOG_ROOT" "$RESULTS_DIR" LOG_DIR="$LOG_ROOT/testrun-$(date -u +%Y%m%d-%H%M%S)" mkdir -p "$LOG_DIR/failed" - rm -f "$RESULTS_DIR/results.xml" + rm -f "$RESULTS_DIR"/results*.xml FLAKY_REPORT="$LOG_DIR/flaky-tests.txt" if command -v rg >/dev/null 2>&1; then @@ -122,46 +122,87 @@ acceptance-test: # split the test set across CIRCLE_NODE_TOTAL nodes using historical timings # so each node runs a balanced subset. Falls back to running everything when # CIRCLE_NODE_TOTAL is unset (local runs, single-node CI). - RUN_FLAG="" - JUNIT_FILE="$RESULTS_DIR/results.xml" - JSON_FILE="$LOG_DIR/raw_go_events.log" - if [ -n "${CIRCLE_NODE_TOTAL:-}" ] && [ "$CIRCLE_NODE_TOTAL" -gt 1 ]; then - NODE_INDEX=${CIRCLE_NODE_INDEX:-0} - NODE_TOTAL=${CIRCLE_NODE_TOTAL:-1} - - go test -list '^Test' "${TEST_PACKAGES[@]}" \ - | {{REPO_ROOT}}/ops/scripts/shard-tests.sh > /tmp/tests_shard.txt - - SHARD_COUNT=$(wc -l < /tmp/tests_shard.txt | tr -d ' ') - echo "Node $NODE_INDEX/$NODE_TOTAL running $SHARD_COUNT tests:" - cat /tmp/tests_shard.txt - - if [ "$SHARD_COUNT" -eq 0 ]; then - echo "No tests assigned to this node, skipping." - exit 0 - fi - - RUN_FLAG="-run=^($(paste -sd '|' /tmp/tests_shard.txt))$" - JUNIT_FILE="$RESULTS_DIR/results-${NODE_INDEX}.xml" - JSON_FILE="$LOG_DIR/raw_go_events-${NODE_INDEX}.log" + export NODE_INDEX=${CIRCLE_NODE_INDEX:-0} + go test -list '^Test' "${TEST_PACKAGES[@]}" | tee "$LOG_DIR/tests_list.txt" \ + | {{REPO_ROOT}}/ops/scripts/shard-tests.sh > "$LOG_DIR/tests_shard.txt" \ + || { grep -v '^Test' "$LOG_DIR/tests_list.txt" >&2; exit 1; } + + # `go test -list` prints a package's tests and then its `ok <package>` line. + # Anything else could be hiding a test name, as in `setup: TestX` from a TestMain + # that prints with no newline. + awk '/^Test[^[:space:]]*$/ { names[++n] = $0; next } + /^ok \t/ { for (; n > 0; n--) print $2, names[n]; next } + /^\? \t/ { next } + { print "error: unexpected go test -list output: " $0 > "/dev/stderr"; exit 1 }' \ + "$LOG_DIR/tests_list.txt" > "$LOG_DIR/tests_all_pairs.txt" + + SHARD_COUNT=$(wc -l < "$LOG_DIR/tests_shard.txt" | tr -d ' ') + echo "Node $NODE_INDEX/${CIRCLE_NODE_TOTAL:-1} running $SHARD_COUNT tests:" + cat "$LOG_DIR/tests_shard.txt" + + # There are far more tests than nodes, so an empty shard means the split failed. + if [ "$SHARD_COUNT" -eq 0 ]; then + echo "error: no tests assigned to this node" >&2 + exit 1 fi + # Pair each test on this node with the package(s) that have it, in shard order. + while read -r name; do + grep " $name\$" "$LOG_DIR/tests_all_pairs.txt" || { echo "error: no package found for $name" >&2; exit 1; } + done < "$LOG_DIR/tests_shard.txt" > "$LOG_DIR/tests_pairs.txt" + + # Runs one test; passing means a clean exit and the test starting and reporting + # a pass or skip, since `go test` also passes when -run matches nothing. Exits + # are only ever 0 or 1 because xargs stops starting tests if a command exits 255 + # or dies from a signal. A failed test keeps its own copy of the output, untangled + # from the other tests'. + run_test() { + local id="$NODE_INDEX-${1//\//.}.$2" + local failed_log="$LOG_DIR/failed/$id.log" + {{REPO_ROOT}}/ops/scripts/gotestsum-split.sh \ + --format testname \ + --junitfile "$RESULTS_DIR/results-$id.xml" \ + --jsonfile "$LOG_DIR/raw_go_events-$id.log" \ + -- \ + -count=1 \ + -parallel "$TEST_PARALLEL" \ + -timeout "$TEST_TIMEOUT" \ + -run "^$2\$" \ + "$1" \ + 2>&1 | tee "$failed_log" + if [ "${PIPESTATUS[0]}" -ne 0 ]; then + return 1 + fi + # test2json leaves its \u0016 marker on a result line that follows unterminated + # output at a multiple of 4096 bytes, and drops the test's pass event. + local events="$LOG_DIR/raw_go_events-$id.log" + if ! grep -qF "\"Action\":\"run\",\"Package\":\"$1\",\"Test\":\"$2\"" "$events" \ + || ! grep -qE "\"Output\":\"(\\\\u0016)?--- (PASS|SKIP): $2 \(" "$events" \ + || grep -qF "\"Action\":\"fail\",\"Package\":\"$1\",\"Test\":\"$2\"" "$events"; then + echo "FAIL $1.$2 (go test exited 0 but the test did not run and report a pass or skip)" | tee -a "$failed_log" + return 1 + fi + rm "$failed_log" + } + export -f run_test + export LOG_LEVEL RESULTS_DIR LOG_DIR TEST_PARALLEL TEST_TIMEOUT + set +e - LOG_LEVEL="${LOG_LEVEL}" {{REPO_ROOT}}/ops/scripts/gotestsum-split.sh \ - --format testname \ - --junitfile "$JUNIT_FILE" \ - --jsonfile "$JSON_FILE" \ - -- \ - -count=1 \ - -p "${JOBS}" \ - -parallel "${TEST_PARALLEL}" \ - -timeout "${TEST_TIMEOUT}" \ - ${RUN_FLAG:+"$RUN_FLAG"} \ - "${TEST_PACKAGES[@]}" \ + xargs -n 2 -P "$JOBS" bash -c 'run_test "$@" </dev/null' _ < "$LOG_DIR/tests_pairs.txt" \ 2>&1 | tee "$LOG_DIR/all.log" TEST_STATUS=${PIPESTATUS[0]} set -e + RAN=$(( $(find "$LOG_DIR" -maxdepth 1 -name 'raw_go_events-*' | wc -l) )) + TOTAL=$(( $(wc -l < "$LOG_DIR/tests_pairs.txt") )) + FAILED=$(( $(find "$LOG_DIR/failed" -name '*.log' | wc -l) )) + echo "Ran $RAN of $TOTAL tests, $FAILED failed" | tee -a "$LOG_DIR/all.log" + ls "$LOG_DIR/failed" | tee -a "$LOG_DIR/all.log" + if { [ "$RAN" -ne "$TOTAL" ] || [ "$FAILED" -gt 0 ]; } && [ "$TEST_STATUS" -eq 0 ]; then + echo "error: not every test ran and passed" | tee -a "$LOG_DIR/all.log" + TEST_STATUS=1 + fi + cp "$LOG_DIR/all.log" "$LOG_DIR/summary.log" exit "$TEST_STATUS" diff --git a/op-acceptance-tests/tests/interop/proofs/serial/interop_fault_proofs_test.go b/op-acceptance-tests/tests/interop/proofs/serial/interop_fault_proofs_test.go index 4a2272224a3..1e05fb40f7d 100644 --- a/op-acceptance-tests/tests/interop/proofs/serial/interop_fault_proofs_test.go +++ b/op-acceptance-tests/tests/interop/proofs/serial/interop_fault_proofs_test.go @@ -99,14 +99,40 @@ func TestInteropFaultProofs_ReplacedBlockCrossChainMessage(gt *testing.T) { sfp.RunReplacedBlockCrossChainMessageTest(t, sys, proofRunners()...) } -func TestInteropFaultProofs_IntraBlock(gt *testing.T) { - for _, tc := range sfp.IntraBlockCases() { - gt.Run(tc.Name, func(gt *testing.T) { - t := devtest.SerialT(gt) - sys := presets.NewSimpleInterop(t) - sfp.RunIntraBlockConsolidationTest(t, sys, tc, proofRunners()...) - }) - } +// Each intra-block case is a top-level test, so CI can shard the cases across +// nodes. Each one builds its own devstack (~70s). +func TestInteropFaultProofs_IntraBlock_CascadeInvalid(gt *testing.T) { + runIntraBlockCase(gt, sfp.IntraBlockCascadeInvalid()) +} + +func TestInteropFaultProofs_IntraBlock_SwapCascadeInvalid(gt *testing.T) { + runIntraBlockCase(gt, sfp.IntraBlockSwapCascadeInvalid()) +} + +func TestInteropFaultProofs_IntraBlock_CyclicDependencyValid(gt *testing.T) { + runIntraBlockCase(gt, sfp.IntraBlockCyclicDependencyValid()) +} + +func TestInteropFaultProofs_IntraBlock_CyclicDependencyInvalid(gt *testing.T) { + runIntraBlockCase(gt, sfp.IntraBlockCyclicDependencyInvalid()) +} + +func TestInteropFaultProofs_IntraBlock_LongDependencyChainValid(gt *testing.T) { + runIntraBlockCase(gt, sfp.IntraBlockLongDependencyChainValid()) +} + +func TestInteropFaultProofs_IntraBlock_SameChainValid(gt *testing.T) { + runIntraBlockCase(gt, sfp.IntraBlockSameChainValid()) +} + +func TestInteropFaultProofs_IntraBlock_SameChainInvalid(gt *testing.T) { + runIntraBlockCase(gt, sfp.IntraBlockSameChainInvalid()) +} + +func runIntraBlockCase(gt *testing.T, tc *sfp.IntraBlockTestCase) { + t := devtest.SerialT(gt) + sys := presets.NewSimpleInterop(t) + sfp.RunIntraBlockConsolidationTest(t, sys, tc, proofRunners()...) } func TestInteropFaultProofs_CycleReplacementPreservesAcyclicPrerequisite(gt *testing.T) { diff --git a/op-acceptance-tests/tests/interop/reorgs/invalid_exec_msgs_test.go b/op-acceptance-tests/tests/interop/reorgs/invalid_exec_msgs_test.go index 4abba2059eb..107a1b0eb38 100644 --- a/op-acceptance-tests/tests/interop/reorgs/invalid_exec_msgs_test.go +++ b/op-acceptance-tests/tests/interop/reorgs/invalid_exec_msgs_test.go @@ -26,6 +26,7 @@ import ( // TestReorgInvalidExecMsgs tests that the supernode reorgs the chain when an invalid exec msg is included // Each subtest runs a test with a different invalid message, by modifying the message in the txModifierFn func TestReorgInvalidExecMsgs(gt *testing.T) { + gt.Parallel() gt.Run("invalid log index", func(gt *testing.T) { testReorgInvalidExecMsg(gt, func(msg *messages.Message) { msg.Identifier.LogIndex = 1024 @@ -46,7 +47,7 @@ func TestReorgInvalidExecMsgs(gt *testing.T) { } func testReorgInvalidExecMsg(gt *testing.T, txModifierFn func(msg *messages.Message)) { - t := devtest.ParallelT(gt) + t := devtest.SerialT(gt) ctx := t.Ctx() sys := presets.NewTwoL2SupernodeInterop(t, 0) diff --git a/op-acceptance-tests/tests/interop/reorgs/l2_reorgs_after_l1_reorg_test.go b/op-acceptance-tests/tests/interop/reorgs/l2_reorgs_after_l1_reorg_test.go index 5c0cedf2b3b..e38b78b9470 100644 --- a/op-acceptance-tests/tests/interop/reorgs/l2_reorgs_after_l1_reorg_test.go +++ b/op-acceptance-tests/tests/interop/reorgs/l2_reorgs_after_l1_reorg_test.go @@ -16,6 +16,7 @@ import ( type checksFunc func(t devtest.T, sys *presets.TwoL2SupernodeInterop) func TestL2ReorgAfterL1Reorg(gt *testing.T) { + gt.Parallel() gt.Run("unsafe reorg", func(gt *testing.T) { var crossSafeRef, localSafeRef, unsafeRef eth.BlockID // Capture refs that must remain canonical before the manual L1 sequencing loop runs, @@ -66,7 +67,7 @@ func TestL2ReorgAfterL1Reorg(gt *testing.T) { // to-be-reorged window. // postChecks runs after the reorg has been recovered. func testL2ReorgAfterL1Reorg(gt *testing.T, n int, preEarlyChecks, preChecks, postChecks checksFunc) { - t := devtest.ParallelT(gt) + t := devtest.SerialT(gt) ctx := t.Ctx() sys := presets.NewTwoL2SupernodeInterop(t, 0) diff --git a/op-acceptance-tests/tests/karst/upgrade_gas_test.go b/op-acceptance-tests/tests/karst/upgrade_gas_test.go index c5bafc91a7b..94c7fde413e 100644 --- a/op-acceptance-tests/tests/karst/upgrade_gas_test.go +++ b/op-acceptance-tests/tests/karst/upgrade_gas_test.go @@ -18,6 +18,7 @@ const karstUpgradeGasOffset uint64 = 10 // steady state); with the keep_karst_upgrade_gas opt-out the chain deliberately keeps the // inflated limit instead. func TestKarstUpgradeGas(gt *testing.T) { + gt.Parallel() gt.Run("reverts", func(gt *testing.T) { testKarstUpgradeGas(gt, false) }) gt.Run("kept", func(gt *testing.T) { testKarstUpgradeGas(gt, true) }) } @@ -28,7 +29,7 @@ func TestKarstUpgradeGas(gt *testing.T) { // after activation reverts to the steady state, unless keep is set — the chain opted out via // keep_karst_upgrade_gas — in which case it keeps the inflated activation-block limit. func testKarstUpgradeGas(gt *testing.T, keep bool) { - t := devtest.ParallelT(gt) + t := devtest.SerialT(gt) offset := karstUpgradeGasOffset deployOpts := []sysgo.DeployerOption{sysgo.WithKarstAtOffset(&offset)} diff --git a/op-acceptance-tests/tests/osaka_on_l2_test.go b/op-acceptance-tests/tests/osaka_on_l2_test.go index 42185116f43..631177a78b9 100644 --- a/op-acceptance-tests/tests/osaka_on_l2_test.go +++ b/op-acceptance-tests/tests/osaka_on_l2_test.go @@ -27,7 +27,6 @@ func TestEIP7823UpperBoundModExp(gt *testing.T) { sysgo.SkipOnOpGeth(t, "osaka is not supported in op-geth") t.Run("pre-karst", func(t devtest.T) { - t.Parallel() sys := presets.NewMinimal(t, presets.WithDeployerOptions(sysgo.WithJovianAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))) eoa := sys.FunderL2.NewFundedEOA(eth.OneEther) @@ -43,7 +42,6 @@ func TestEIP7823UpperBoundModExp(gt *testing.T) { }) t.Run("post-karst", func(t devtest.T) { - t.Parallel() sys := presets.NewMinimalWithKona(t, presets.WithDeployerOptions(sysgo.WithKarstAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))) eoa := sys.FunderL2.NewFundedEOA(eth.OneEther) @@ -63,7 +61,6 @@ func TestEIP7883ModExpGasCostIncrease(gt *testing.T) { sysgo.SkipOnOpGeth(t, "osaka is not supported in op-geth") t.Run("pre-karst", func(t devtest.T) { - t.Parallel() sys := presets.NewMinimal(t, presets.WithDeployerOptions(sysgo.WithJovianAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))) eoa := sys.FunderL2.NewFundedEOA(eth.OneEther) @@ -83,7 +80,6 @@ func TestEIP7883ModExpGasCostIncrease(gt *testing.T) { }) t.Run("post-karst", func(t devtest.T) { - t.Parallel() sys := presets.NewMinimalWithKona(t, presets.WithDeployerOptions(sysgo.WithKarstAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))) eoa := sys.FunderL2.NewFundedEOA(eth.OneEther) @@ -107,8 +103,6 @@ func TestEIP7825TxGasLimitCap(gt *testing.T) { // EVM, so eth_call and eth_simulateV1 don't enforce it. t.Run("pre-karst", func(t devtest.T) { - t.Parallel() - // Live chain is on Jovian (no cap), so a tx with gas > 2^24 lands // successfully. Run kona two ways to verify it honors its rollup // config: with a matching Jovian config it accepts the block, with @@ -131,7 +125,6 @@ func TestEIP7825TxGasLimitCap(gt *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t devtest.T) { - t.Parallel() opts := append( []presets.Option{presets.WithDeployerOptions(sysgo.WithJovianAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))}, tc.konaOpts..., @@ -156,7 +149,6 @@ func TestEIP7825TxGasLimitCap(gt *testing.T) { }) t.Run("post-karst", func(t devtest.T) { - t.Parallel() // Live chain is on Karst — op-reth's RPC rejects a tx with gas > 2^24 // at submission time, so it never lands on-chain. Nothing for kona to // validate. @@ -171,8 +163,6 @@ func TestEIP7951P256VerifyGasCostIncrease(gt *testing.T) { sysgo.SkipOnOpGeth(t, "osaka is not supported in op-geth") t.Run("pre-karst", func(t devtest.T) { - t.Parallel() - // Empty P256VERIFY calldata: the precompile charges its full gas cost // regardless of input length and returns empty (input != 160 bytes). // Empty calldata avoids EIP-7623 calldata cost inflation, so intrinsic @@ -204,7 +194,6 @@ func TestEIP7951P256VerifyGasCostIncrease(gt *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t devtest.T) { - t.Parallel() opts := append( []presets.Option{presets.WithDeployerOptions(sysgo.WithJovianAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))}, tc.konaOpts..., @@ -228,7 +217,6 @@ func TestEIP7951P256VerifyGasCostIncrease(gt *testing.T) { }) t.Run("post-karst", func(t devtest.T) { - t.Parallel() sys := presets.NewMinimalWithKona(t, presets.WithDeployerOptions(sysgo.WithKarstAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))) eoa := sys.FunderL2.NewFundedEOA(eth.OneEther) @@ -255,8 +243,6 @@ func TestKarstBn256PairingInputSizeReduction(gt *testing.T) { sysgo.SkipOnOpGeth(t, "osaka is not supported in op-geth") t.Run("pre-karst", func(t devtest.T) { - t.Parallel() - // 301 pairs (57,792 bytes) exceeds the Karst cap but fits within // Jovian's 81,984-byte cap. On Jovian the call succeeds (pairing // identity points → 1). Run kona two ways to verify it honors its @@ -281,7 +267,6 @@ func TestKarstBn256PairingInputSizeReduction(gt *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t devtest.T) { - t.Parallel() opts := append( []presets.Option{presets.WithDeployerOptions(sysgo.WithJovianAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))}, tc.konaOpts..., @@ -308,7 +293,6 @@ func TestKarstBn256PairingInputSizeReduction(gt *testing.T) { }) t.Run("post-karst", func(t devtest.T) { - t.Parallel() sys := presets.NewMinimalWithKona(t, presets.WithDeployerOptions(sysgo.WithKarstAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))) eoa := sys.FunderL2.NewFundedEOA(eth.OneEther) @@ -328,7 +312,6 @@ func TestEIP7939CLZ(gt *testing.T) { sysgo.SkipOnOpGeth(t, "osaka is not supported in op-geth") t.Run("pre-karst", func(t devtest.T) { - t.Parallel() sys := presets.NewMinimal(t, presets.WithDeployerOptions(sysgo.WithJovianAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))) eoa := sys.FunderL2.NewFundedEOA(eth.OneEther) @@ -343,7 +326,6 @@ func TestEIP7939CLZ(gt *testing.T) { }) t.Run("post-karst", func(t devtest.T) { - t.Parallel() sys := presets.NewMinimalWithKona(t, presets.WithDeployerOptions(sysgo.WithKarstAtGenesis, sysgo.WithForkAtL1Genesis(forks.Osaka))) eoa := sys.FunderL2.NewFundedEOA(eth.OneEther) diff --git a/op-acceptance-tests/tests/proofs/zk/honest_challenger_test.go b/op-acceptance-tests/tests/proofs/zk/honest_challenger_test.go index cc421ea7abb..3ff4ce2b311 100644 --- a/op-acceptance-tests/tests/proofs/zk/honest_challenger_test.go +++ b/op-acceptance-tests/tests/proofs/zk/honest_challenger_test.go @@ -96,15 +96,16 @@ func honestChallengerBeatsUnsafeProposal(t devtest.T, sys *presets.SingleChainIn // super-root sources share the decision body; the supernode subtest additionally proves the // unchallenged valid proposal anchors (source-agnostic lifecycle behavior tested once). func TestZK_HonestChallenger_ValidProposal_DefenderWins(gt *testing.T) { + gt.Parallel() gt.Run("op-node", func(gt *testing.T) { - t := devtest.ParallelT(gt) + t := devtest.SerialT(gt) sys := newOpNodeSystem(t) // The op-node preset runs no op-zk-proposer; seed the proposal manually. game := sys.DisputeGameFactory().StartZKGame(sys.FunderL1.NewFundedEOA(eth.OneEther)) honestChallengerResolvesValidProposal(t, sys, game) }) gt.Run("supernode", func(gt *testing.T) { - t := devtest.ParallelT(gt) + t := devtest.SerialT(gt) sys := newSupernodeSystem(t) // The honest proposer creates the valid root proposal. game := honestChallengerResolvesValidProposal(t, sys, sys.DisputeGameFactory().WaitForZKGameAtIndex(0)) @@ -122,12 +123,13 @@ func TestZK_HonestChallenger_ValidProposal_DefenderWins(gt *testing.T) { // super-root sources share the decision body; the supernode subtest additionally proves the // challenger claims its credit and the invalid proposal never advances the anchor state. func TestZK_HonestChallenger_InvalidProposal_ChallengerWins(gt *testing.T) { + gt.Parallel() gt.Run("op-node", func(gt *testing.T) { - t := devtest.ParallelT(gt) + t := devtest.SerialT(gt) honestChallengerBeatsInvalidProposal(t, newOpNodeSystem(t)) }) gt.Run("supernode", func(gt *testing.T) { - t := devtest.ParallelT(gt) + t := devtest.SerialT(gt) // This subtest asserts the anchor never moves, so no honest proposer: // its valid proposals would legitimately advance the anchor. sys := newSupernodeSystem(t, presets.WithoutHonestProposer()) @@ -206,12 +208,13 @@ func TestZK_HonestChallenger_InvalidChainBProposal_ChallengesProposal(gt *testin // CHALLENGER_WINS. This is a distinct path from a mismatched-root proposal at an already-safe // timestamp, and each super-root source reaches Data == nil differently, so both are exercised. func TestZK_HonestChallenger_UnsafeProposal_ChallengerWins(gt *testing.T) { + gt.Parallel() gt.Run("op-node", func(gt *testing.T) { - t := devtest.ParallelT(gt) + t := devtest.SerialT(gt) honestChallengerBeatsUnsafeProposal(t, newOpNodeSystem(t)) }) gt.Run("supernode", func(gt *testing.T) { - t := devtest.ParallelT(gt) + t := devtest.SerialT(gt) honestChallengerBeatsUnsafeProposal(t, newSupernodeSystem(t)) }) } diff --git a/op-acceptance-tests/tests/proofs/zk/zk_proposer_test.go b/op-acceptance-tests/tests/proofs/zk/zk_proposer_test.go index a1f017dd9f2..2bd113211d6 100644 --- a/op-acceptance-tests/tests/proofs/zk/zk_proposer_test.go +++ b/op-acceptance-tests/tests/proofs/zk/zk_proposer_test.go @@ -439,6 +439,7 @@ func TestProposerProvesChunkAgreeingOnReplacedBlockInside(gt *testing.T) { // TestProposerProvesChunksInsideReplacementIdleGap covers chunk boundaries between idle timestamps after replacement. func TestProposerProvesChunksInsideReplacementIdleGap(gt *testing.T) { + gt.Parallel() const rangeSplitCount uint64 = 128 for _, testCase := range []struct { name string @@ -449,7 +450,7 @@ func TestProposerProvesChunksInsideReplacementIdleGap(gt *testing.T) { {"replacement_at_agreed", 0, zkproposer.LogBatchesSubmitted(0)}, } { gt.Run(testCase.name, func(gt *testing.T) { - t := devtest.ParallelT(gt) + t := devtest.SerialT(gt) sys, hidden := newReplacedBlockSystem(t, presets.WithL2BlockTimes(map[eth.ChainID]uint64{sysgo.DefaultL2AID: 1, sysgo.DefaultL2BID: 4}), presets.WithZKProposerOption(sysgo.WithZKRangeSplitCount(rangeSplitCount)), diff --git a/op-acceptance-tests/tests/sdm/block_test.go b/op-acceptance-tests/tests/sdm/block_test.go index 37057c730a7..685ba6635a6 100644 --- a/op-acceptance-tests/tests/sdm/block_test.go +++ b/op-acceptance-tests/tests/sdm/block_test.go @@ -213,10 +213,6 @@ func TestSDMPostExecBlockDerivesAndChainProgresses(gt *testing.T) { {name: "singular_batch", singular: true}, } { t.Run(testCase.name, func(t devtest.T) { - // Each subtest spins up an independent devstack runtime (the batcher's - // batch type is the only meaningful difference), so they're safe to run - // concurrently. Cuts wall-clock from ~76s sequential to ~max(sub1, sub2). - t.Parallel() testSDMPostExecBlockDerivesAndChainProgresses(t, testCase.name, testCase.singular) }) } diff --git a/op-acceptance-tests/tests/superfaultproofs/intrablock.go b/op-acceptance-tests/tests/superfaultproofs/intrablock.go index a933adb8e9b..cffe19f87f2 100644 --- a/op-acceptance-tests/tests/superfaultproofs/intrablock.go +++ b/op-acceptance-tests/tests/superfaultproofs/intrablock.go @@ -16,7 +16,6 @@ import ( // IntraBlockTestCase describes a single intra-block scenario. type IntraBlockTestCase struct { - Name string ExpectReplacement bool BuildTxs func(s *intraBlockSetup) (txsA, txsB []*txplan.PlannedTx) } @@ -175,143 +174,154 @@ func RunIntraBlockConsolidationTest(t devtest.T, sys *presets.SimpleInterop, tc }, runners...) } -// IntraBlockCases returns all intra-block test scenarios. -// CyclicDependencyInvalid uses a fabricated pending message approach to create a true -// exec→exec cycle, exercising kona's cycle detection codepath during consolidation. -func IntraBlockCases() []*IntraBlockTestCase { - return []*IntraBlockTestCase{ - { - // Init(A) + valid Exec(B→A) on chain A, - // Init(B) + invalid Exec(A→B) on chain B. - // Chain B is invalid (bad exec), chain A is transitively invalid. - Name: "CascadeInvalid", - ExpectReplacement: true, - BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { - pairA := s.prepareInitA(0) - pairB := s.prepareInitB(0) - return []*txplan.PlannedTx{pairA.SubmitInit(), pairB.SubmitExecTo(s.alice)}, - []*txplan.PlannedTx{pairB.SubmitInit(), pairA.SubmitInvalidExecTo(s.bob)} - }, +// Intra-block scenarios for RunIntraBlockConsolidationTest. Each returns a fresh +// case and must have a matching TestInteropFaultProofs_IntraBlock_<Case> test in +// interop/proofs/serial; nothing else runs it. + +// Init(A) + valid Exec(B→A) on chain A, +// Init(B) + invalid Exec(A→B) on chain B. +// Chain B is invalid (bad exec), chain A is transitively invalid. +func IntraBlockCascadeInvalid() *IntraBlockTestCase { + return &IntraBlockTestCase{ + ExpectReplacement: true, + BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { + pairA := s.prepareInitA(0) + pairB := s.prepareInitB(0) + return []*txplan.PlannedTx{pairA.SubmitInit(), pairB.SubmitExecTo(s.alice)}, + []*txplan.PlannedTx{pairB.SubmitInit(), pairA.SubmitInvalidExecTo(s.bob)} }, - { - // Same as CascadeInvalid but with chains swapped. - // Init(A) + invalid Exec(B→A) on chain A, - // Init(B) + valid Exec(A→B) on chain B. - Name: "SwapCascadeInvalid", - ExpectReplacement: true, - BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { - pairA := s.prepareInitA(0) - pairB := s.prepareInitB(0) - return []*txplan.PlannedTx{pairA.SubmitInit(), pairB.SubmitInvalidExecTo(s.alice)}, - []*txplan.PlannedTx{pairB.SubmitInit(), pairA.SubmitExecTo(s.bob)} - }, + } +} + +// Same as CascadeInvalid but with chains swapped. +// Init(A) + invalid Exec(B→A) on chain A, +// Init(B) + valid Exec(A→B) on chain B. +func IntraBlockSwapCascadeInvalid() *IntraBlockTestCase { + return &IntraBlockTestCase{ + ExpectReplacement: true, + BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { + pairA := s.prepareInitA(0) + pairB := s.prepareInitB(0) + return []*txplan.PlannedTx{pairA.SubmitInit(), pairB.SubmitInvalidExecTo(s.alice)}, + []*txplan.PlannedTx{pairB.SubmitInit(), pairA.SubmitExecTo(s.bob)} }, - { - // Valid cyclic cross-chain dependency: - // Init(A) + Exec(B→A) on chain A, - // Init(B) + Exec(A→B) on chain B. - // Both blocks survive. - Name: "CyclicDependencyValid", - BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { - pairA := s.prepareInitA(0) - pairB := s.prepareInitB(0) - return []*txplan.PlannedTx{pairA.SubmitInit(), pairB.SubmitExecTo(s.alice)}, - []*txplan.PlannedTx{pairB.SubmitInit(), pairA.SubmitExecTo(s.bob)} - }, + } +} + +// Valid cyclic cross-chain dependency: +// Init(A) + Exec(B→A) on chain A, +// Init(B) + Exec(A→B) on chain B. +// Both blocks survive. +func IntraBlockCyclicDependencyValid() *IntraBlockTestCase { + return &IntraBlockTestCase{ + BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { + pairA := s.prepareInitA(0) + pairB := s.prepareInitB(0) + return []*txplan.PlannedTx{pairA.SubmitInit(), pairB.SubmitExecTo(s.alice)}, + []*txplan.PlannedTx{pairB.SubmitInit(), pairA.SubmitExecTo(s.bob)} }, - { - // True exec→exec cycle using fabricated pending messages. - // ExecA references a fabricated init at B's position (wrong origin), - // ExecB references ExecA's ExecutingMessage event. - // Both are invalid: ExecA references wrong origin, ExecB depends on invalid ExecA. - Name: "CyclicDependencyInvalid", - ExpectReplacement: true, - BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { - // Fabricate a pending init message at ExecB's expected position. - // ExecA will reference this, but the actual log at (chainB, blockNumB, logIdx=0) - // will be ExecB's ExecutingMessage event (wrong origin), making ExecA invalid. - topic := crypto.Keccak256Hash([]byte("DataEmitted(bytes)")) - msgHash := crypto.Keccak256Hash([]byte("fabricated cyclic msg")) - var fabricatedPayload []byte - fabricatedPayload = append(fabricatedPayload, topic.Bytes()...) - fabricatedPayload = append(fabricatedPayload, msgHash.Bytes()...) - - fabricatedBMsg := messages.Message{ - Identifier: messages.Identifier{ - Origin: s.eventLoggerB, - BlockNumber: s.expectedBlockNumB, - LogIndex: 0, - Timestamp: s.nextTimestamp, - ChainID: s.bob.ChainID(), - }, - PayloadHash: crypto.Keccak256Hash(fabricatedPayload), - } + } +} - // Precompute ExecA's ExecutingMessage event message - execAEventMsg := dsl.PrecomputeExecEventMessage( - fabricatedBMsg, s.alice.ChainID(), - s.expectedBlockNumA, 0, s.nextTimestamp, - ) - - // ExecA references fabricated message from B - // ExecB references ExecA's event - return []*txplan.PlannedTx{dsl.SubmitExecForMessage(fabricatedBMsg, s.alice)}, - []*txplan.PlannedTx{dsl.SubmitExecForMessage(execAEventMsg, s.bob)} - }, +// True exec→exec cycle using fabricated pending messages. +// ExecA references a fabricated init at B's position (wrong origin), +// ExecB references ExecA's ExecutingMessage event. +// Both are invalid: ExecA references wrong origin, ExecB depends on invalid ExecA. +// Exercises kona's cycle detection codepath during consolidation. +func IntraBlockCyclicDependencyInvalid() *IntraBlockTestCase { + return &IntraBlockTestCase{ + ExpectReplacement: true, + BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { + // Fabricate a pending init message at ExecB's expected position. + // ExecA will reference this, but the actual log at (chainB, blockNumB, logIdx=0) + // will be ExecB's ExecutingMessage event (wrong origin), making ExecA invalid. + topic := crypto.Keccak256Hash([]byte("DataEmitted(bytes)")) + msgHash := crypto.Keccak256Hash([]byte("fabricated cyclic msg")) + var fabricatedPayload []byte + fabricatedPayload = append(fabricatedPayload, topic.Bytes()...) + fabricatedPayload = append(fabricatedPayload, msgHash.Bytes()...) + + fabricatedBMsg := messages.Message{ + Identifier: messages.Identifier{ + Origin: s.eventLoggerB, + BlockNumber: s.expectedBlockNumB, + LogIndex: 0, + Timestamp: s.nextTimestamp, + ChainID: s.bob.ChainID(), + }, + PayloadHash: crypto.Keccak256Hash(fabricatedPayload), + } + + // Precompute ExecA's ExecutingMessage event message + execAEventMsg := dsl.PrecomputeExecEventMessage( + fabricatedBMsg, s.alice.ChainID(), + s.expectedBlockNumA, 0, s.nextTimestamp, + ) + + // ExecA references fabricated message from B + // ExecB references ExecA's event + return []*txplan.PlannedTx{dsl.SubmitExecForMessage(fabricatedBMsg, s.alice)}, + []*txplan.PlannedTx{dsl.SubmitExecForMessage(execAEventMsg, s.bob)} }, - { - // Depth-10 exec→exec dependency chain alternating between chains A and B. - // Starts with an init on chain A, then 10 execs alternating B, A, B, A, ... - // All valid. - Name: "LongDependencyChainValid", - BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { - pairA := s.prepareInitA(0) - - var txsA, txsB []*txplan.PlannedTx - txsA = append(txsA, pairA.SubmitInit()) - - currentMsg := pairA.Message - logIdxA := uint32(1) // init occupies logIdx 0 - logIdxB := uint32(0) - - const depth = 10 - for i := 0; i < depth; i++ { - if i%2 == 0 { - // Exec on chain B referencing currentMsg - execEventMsg := dsl.PrecomputeExecEventMessage(currentMsg, s.bob.ChainID(), s.expectedBlockNumB, logIdxB, s.nextTimestamp) - txsB = append(txsB, dsl.SubmitExecForMessage(currentMsg, s.bob)) - currentMsg = execEventMsg - logIdxB++ - } else { - // Exec on chain A referencing currentMsg - execEventMsg := dsl.PrecomputeExecEventMessage(currentMsg, s.alice.ChainID(), s.expectedBlockNumA, logIdxA, s.nextTimestamp) - txsA = append(txsA, dsl.SubmitExecForMessage(currentMsg, s.alice)) - currentMsg = execEventMsg - logIdxA++ - } + } +} + +// Depth-10 exec→exec dependency chain alternating between chains A and B. +// Starts with an init on chain A, then 10 execs alternating B, A, B, A, ... +// All valid. +func IntraBlockLongDependencyChainValid() *IntraBlockTestCase { + return &IntraBlockTestCase{ + BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { + pairA := s.prepareInitA(0) + + var txsA, txsB []*txplan.PlannedTx + txsA = append(txsA, pairA.SubmitInit()) + + currentMsg := pairA.Message + logIdxA := uint32(1) // init occupies logIdx 0 + logIdxB := uint32(0) + + const depth = 10 + for i := 0; i < depth; i++ { + if i%2 == 0 { + // Exec on chain B referencing currentMsg + execEventMsg := dsl.PrecomputeExecEventMessage(currentMsg, s.bob.ChainID(), s.expectedBlockNumB, logIdxB, s.nextTimestamp) + txsB = append(txsB, dsl.SubmitExecForMessage(currentMsg, s.bob)) + currentMsg = execEventMsg + logIdxB++ + } else { + // Exec on chain A referencing currentMsg + execEventMsg := dsl.PrecomputeExecEventMessage(currentMsg, s.alice.ChainID(), s.expectedBlockNumA, logIdxA, s.nextTimestamp) + txsA = append(txsA, dsl.SubmitExecForMessage(currentMsg, s.alice)) + currentMsg = execEventMsg + logIdxA++ } + } - return txsA, txsB - }, + return txsA, txsB }, - { - // Same-chain valid: Init + Exec on chain A, empty chain B. - Name: "SameChainValid", - BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { - pair := s.prepareInitA(0) - return []*txplan.PlannedTx{pair.SubmitInit(), pair.SubmitExecTo(s.alice)}, - nil - }, + } +} + +// Same-chain valid: Init + Exec on chain A, empty chain B. +func IntraBlockSameChainValid() *IntraBlockTestCase { + return &IntraBlockTestCase{ + BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { + pair := s.prepareInitA(0) + return []*txplan.PlannedTx{pair.SubmitInit(), pair.SubmitExecTo(s.alice)}, + nil }, - { - // Same-chain invalid: Init + invalid Exec on chain A, empty chain B. - Name: "SameChainInvalid", - ExpectReplacement: true, - BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { - pair := s.prepareInitA(0) - return []*txplan.PlannedTx{pair.SubmitInit(), pair.SubmitInvalidExecTo(s.alice)}, - nil - }, + } +} + +// Same-chain invalid: Init + invalid Exec on chain A, empty chain B. +func IntraBlockSameChainInvalid() *IntraBlockTestCase { + return &IntraBlockTestCase{ + ExpectReplacement: true, + BuildTxs: func(s *intraBlockSetup) ([]*txplan.PlannedTx, []*txplan.PlannedTx) { + pair := s.prepareInitA(0) + return []*txplan.PlannedTx{pair.SubmitInit(), pair.SubmitInvalidExecTo(s.alice)}, + nil }, } } diff --git a/ops/scripts/shard-tests.sh b/ops/scripts/shard-tests.sh index 26d32ea980a..5d2f652e295 100755 --- a/ops/scripts/shard-tests.sh +++ b/ops/scripts/shard-tests.sh @@ -5,18 +5,22 @@ # this node's share to stdout, split by historical timing data # (--timings-type=testname, sourced from the JUnit files jobs upload via # store_test_results). Outside CircleCI parallelism (CIRCLE_NODE_TOTAL unset -# or 1) every test passes through unchanged. +# or 1) every unique test name passes through. # # Exits 1 when no test names arrive: `go test -list` failed (compile error, # or a crash in TestMain — which -list executes) or a name filter matched -# nothing. Without this guard every node would receive an empty shard and -# skip, letting a broken package report green. +# nothing. Without this guard every node would receive an empty shard, which +# could let a broken package report green. set -euo pipefail ALL_TESTS_FILE=$(mktemp) trap 'rm -f "$ALL_TESTS_FILE"' EXIT -grep -E '^Test' > "$ALL_TESTS_FILE" || true +# grep exits 1 for no matches, handled below, and above 1 for an error. +grep -E '^Test' > "$ALL_TESTS_FILE" || [ "$?" -eq 1 ] +# A name is listed once per package that has it. Keep one, so it goes to one node, +# and that node's caller runs every package's copy. +LC_ALL=C sort -u -o "$ALL_TESTS_FILE" "$ALL_TESTS_FILE" TOTAL_TESTS=$(wc -l < "$ALL_TESTS_FILE" | tr -d ' ') if [ "$TOTAL_TESTS" -eq 0 ]; then @@ -33,4 +37,6 @@ fi # Canceled runs can leave partial history. CircleCI's tiny default weight for # missing timings can put every unknown test on the same otherwise-light shard. # Give unknown acceptance tests a realistic setup/runtime budget instead. -circleci tests split --split-by=timings --timings-type=testname --time-default=1m "$ALL_TESTS_FILE" +# `awk 1` ends the last line with a newline, since callers' `read` and `wc -l` would +# miss a test without one. +circleci tests split --split-by=timings --timings-type=testname --time-default=1m "$ALL_TESTS_FILE" | awk 1 From c8473baf040b12959818f30bef8336b8a950cba2 Mon Sep 17 00:00:00 2001 From: Matt Solomon <matt@mattsolomon.dev> Date: Fri, 6 Nov 2026 20:00:11 +0000 Subject: [PATCH 13/21] op-deployer: add a hidden receipt poll interval and use 50ms in integration tests (#23979) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --- op-deployer/pkg/deployer/apply.go | 47 ++++--- op-deployer/pkg/deployer/bootstrap/flags.go | 2 + .../pkg/deployer/bootstrap/flags_test.go | 73 ++++++++++ .../pkg/deployer/bootstrap/implementations.go | 18 ++- .../pkg/deployer/bootstrap/superchain.go | 18 ++- op-deployer/pkg/deployer/broadcaster/keyed.go | 35 ++++- .../pkg/deployer/broadcaster/keyed_test.go | 126 ++++++++++++++++++ op-deployer/pkg/deployer/continue.go | 28 ++-- op-deployer/pkg/deployer/continue_test.go | 9 +- op-deployer/pkg/deployer/flags.go | 12 ++ op-deployer/pkg/deployer/flags/names.go | 2 + op-deployer/pkg/deployer/flags_test.go | 6 + .../deployer/integration_test/apply_test.go | 36 ++--- .../integration_test/cli/bootstrap_test.go | 2 + .../integration_test/cli/cli_runner.go | 22 ++- .../integration_test/cli/continue_test.go | 5 +- .../integration_test/cli/e2e_apply_test.go | 3 +- .../integration_test/continue_test.go | 13 +- 18 files changed, 388 insertions(+), 69 deletions(-) create mode 100644 op-deployer/pkg/deployer/bootstrap/flags_test.go diff --git a/op-deployer/pkg/deployer/apply.go b/op-deployer/pkg/deployer/apply.go index f903cd3aee5..887ad8a7e3d 100644 --- a/op-deployer/pkg/deployer/apply.go +++ b/op-deployer/pkg/deployer/apply.go @@ -42,9 +42,14 @@ type ApplyConfig struct { UseForge bool // ForgeSlowBroadcast confirms each Forge broadcast transaction before sending the next. ForgeSlowBroadcast bool + // ReceiptQueryInterval is how often to poll for each broadcast's receipt. Zero uses the broadcaster's default. + ReceiptQueryInterval time.Duration } func (a *ApplyConfig) Check() error { + if err := broadcaster.CheckReceiptQueryInterval(a.ReceiptQueryInterval); err != nil { + return err + } if a.Workdir == "" { return fmt.Errorf("workdir must be specified") } @@ -98,14 +103,15 @@ func ApplyCLI() func(cliCtx *cli.Context) error { ctx := ctxinterrupt.WithCancelOnInterrupt(cliCtx.Context) if err := Apply(ctx, ApplyConfig{ - L1RPCUrl: l1RPCUrl, - Workdir: workdir, - PrivateKey: privateKey, - DeploymentTarget: depTarget, - Logger: l, - CacheDir: cacheDir, - UseForge: cliCtx.Bool(UseForgeFlagName), - ForgeSlowBroadcast: cliCtx.Bool(ForgeSlowBroadcastFlagName), + L1RPCUrl: l1RPCUrl, + Workdir: workdir, + PrivateKey: privateKey, + DeploymentTarget: depTarget, + Logger: l, + CacheDir: cacheDir, + UseForge: cliCtx.Bool(UseForgeFlagName), + ForgeSlowBroadcast: cliCtx.Bool(ForgeSlowBroadcastFlagName), + ReceiptQueryInterval: cliCtx.Duration(ReceiptQueryIntervalFlagName), }); err != nil { return err } @@ -170,18 +176,19 @@ func Apply(ctx context.Context, cfg ApplyConfig) error { } if err := ApplyPipeline(ctx, ApplyPipelineOpts{ - L1RPCUrl: cfg.L1RPCUrl, - DeploymentTarget: cfg.DeploymentTarget, - DeployerPrivateKey: cfg.privateKeyECDSA, - Intent: intent, - State: st, - Logger: cfg.Logger, - StateWriter: pipeline.WorkdirStateWriter(cfg.Workdir), - CacheDir: cfg.CacheDir, - UseForge: cfg.UseForge, - ForgeSlowBroadcast: cfg.ForgeSlowBroadcast, - PrivateKey: cfg.PrivateKey, - Workdir: cfg.Workdir, + L1RPCUrl: cfg.L1RPCUrl, + DeploymentTarget: cfg.DeploymentTarget, + DeployerPrivateKey: cfg.privateKeyECDSA, + Intent: intent, + State: st, + Logger: cfg.Logger, + StateWriter: pipeline.WorkdirStateWriter(cfg.Workdir), + CacheDir: cfg.CacheDir, + UseForge: cfg.UseForge, + ForgeSlowBroadcast: cfg.ForgeSlowBroadcast, + ReceiptQueryInterval: cfg.ReceiptQueryInterval, + PrivateKey: cfg.PrivateKey, + Workdir: cfg.Workdir, }); err != nil { return err } diff --git a/op-deployer/pkg/deployer/bootstrap/flags.go b/op-deployer/pkg/deployer/bootstrap/flags.go index 51a31d6e0b7..d16f636b0a4 100644 --- a/op-deployer/pkg/deployer/bootstrap/flags.go +++ b/op-deployer/pkg/deployer/bootstrap/flags.go @@ -205,6 +205,7 @@ var ImplementationsFlags = []cli.Flag{ deployer.VerifierAPIKeyFlag, deployer.UseForgeFlag, deployer.ForgeSlowBroadcastFlag, + deployer.ReceiptQueryIntervalFlag, } var ProxyFlags = []cli.Flag{ @@ -229,6 +230,7 @@ var SuperchainFlags = []cli.Flag{ deployer.VerifierAPIKeyFlag, deployer.UseForgeFlag, deployer.ForgeSlowBroadcastFlag, + deployer.ReceiptQueryIntervalFlag, } var ValidatorFlags = []cli.Flag{ diff --git a/op-deployer/pkg/deployer/bootstrap/flags_test.go b/op-deployer/pkg/deployer/bootstrap/flags_test.go new file mode 100644 index 00000000000..4cb6f7812e0 --- /dev/null +++ b/op-deployer/pkg/deployer/bootstrap/flags_test.go @@ -0,0 +1,73 @@ +package bootstrap + +import ( + "io" + stdlog "log" + "log/slog" + "testing" + + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer" + "github.com/ethereum-optimism/optimism/op-service/log" + "github.com/stretchr/testify/require" + "github.com/urfave/cli/v2" +) + +// Runs each command's real action. Every Check() validates the interval first, so an out-of-range +// value is only rejected if the command copied the flag into its config. The empty RPC and key flags +// override the environment, so an accepted value always stops at the next check, before any RPC. +func TestReceiptQueryIntervalFlagReachesConfig(t *testing.T) { + root, slogDefault := log.Root(), slog.Default() + stdOutput, stdFlags := stdlog.Writer(), stdlog.Flags() + t.Cleanup(func() { + log.SetDefault(root) + slog.SetDefault(slogDefault) + // slog.SetDefault also redirects the standard logger, and restoring slog does not undo that. + stdlog.SetOutput(stdOutput) + stdlog.SetFlags(stdFlags) + }) + + tests := []struct { + name string + flags []cli.Flag + action cli.ActionFunc + args []string + nextErr string + }{ + { + name: "apply", + flags: deployer.ApplyFlags, + action: deployer.ApplyCLI(), + args: []string{"--deployment-target=live", "--workdir=" + t.TempDir()}, + nextErr: "l1 RPC URL must be specified for live deployment", + }, + { + name: "continue", + flags: deployer.ContinueFlags, + action: deployer.ContinueCLI(), + args: []string{"--workdir=" + t.TempDir()}, + nextErr: "private key must be specified", + }, + {name: "superchain", flags: SuperchainFlags, action: SuperchainCLI, nextErr: "l1RPCUrl must be specified"}, + {name: "implementations", flags: ImplementationsFlags, action: ImplementationsCLI, nextErr: "l1RPCUrl must be specified"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + run := func(interval string) error { + app := &cli.App{ + Writer: io.Discard, + ErrWriter: io.Discard, + Flags: deployer.GlobalFlags, + Commands: []*cli.Command{{Name: "cmd", Flags: tt.flags, Action: tt.action}}, + } + args := []string{"op-deployer", "cmd", "--l1-rpc-url=", "--private-key=", "--receipt-query-interval=" + interval} + return app.RunContext(t.Context(), append(args, tt.args...)) + } + for _, bad := range []string{"49ms", "2s", "-1s"} { + require.ErrorContains(t, run(bad), "receipt query interval must be 0 or between 50ms and 1s") + } + for _, good := range []string{"0", "50ms", "1s"} { + require.ErrorContains(t, run(good), tt.nextErr) + } + }) + } +} diff --git a/op-deployer/pkg/deployer/bootstrap/implementations.go b/op-deployer/pkg/deployer/bootstrap/implementations.go index 740e26f28a2..b751c32025e 100644 --- a/op-deployer/pkg/deployer/bootstrap/implementations.go +++ b/op-deployer/pkg/deployer/bootstrap/implementations.go @@ -8,6 +8,7 @@ import ( "math/big" "os" "strings" + "time" mipsVersion "github.com/ethereum-optimism/optimism/cannon/mipsevm/versions" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer" @@ -59,6 +60,8 @@ type ImplementationsConfig struct { CacheDir string `cli:"cache-dir"` UseForge bool `cli:"use-forge"` ForgeSlowBroadcast bool `cli:"forge-slow-broadcast"` + // ReceiptQueryInterval is how often to poll for each broadcast's receipt. Zero uses the broadcaster's default. + ReceiptQueryInterval time.Duration Logger log.Logger @@ -66,6 +69,9 @@ type ImplementationsConfig struct { } func (c *ImplementationsConfig) Check() error { + if err := broadcaster.CheckReceiptQueryInterval(c.ReceiptQueryInterval); err != nil { + return err + } if c.L1RPCUrl == "" { return errors.New("l1RPCUrl must be specified") } @@ -176,6 +182,7 @@ func ImplementationsCLI(cliCtx *cli.Context) error { if cliCtx.IsSet(SP1VerifierAddressFlagName) && cfg.SP1Verifier == (common.Address{}) { return fmt.Errorf("--%s must not be zero when explicitly set", SP1VerifierAddressFlagName) } + cfg.ReceiptQueryInterval = cliCtx.Duration(deployer.ReceiptQueryIntervalFlagName) cfg.Logger = l artifactsURLStr := cliCtx.String(deployer.ArtifactsLocatorFlagName) @@ -318,11 +325,12 @@ func Implementations(ctx context.Context, cfg ImplementationsConfig) (opcm.Deplo chainDeployer := crypto.PubkeyToAddress(cfg.privateKeyECDSA.PublicKey) bcaster, err := broadcaster.NewKeyedBroadcaster(broadcaster.KeyedBroadcasterOpts{ - Logger: lgr, - ChainID: chainID, - Client: l1Client, - Signer: signer, - From: chainDeployer, + Logger: lgr, + ChainID: chainID, + Client: l1Client, + Signer: signer, + From: chainDeployer, + ReceiptQueryInterval: cfg.ReceiptQueryInterval, }) if err != nil { return dio, fmt.Errorf("failed to create broadcaster: %w", err) diff --git a/op-deployer/pkg/deployer/bootstrap/superchain.go b/op-deployer/pkg/deployer/bootstrap/superchain.go index 5fff83da78c..11c759d37a8 100644 --- a/op-deployer/pkg/deployer/bootstrap/superchain.go +++ b/op-deployer/pkg/deployer/bootstrap/superchain.go @@ -6,6 +6,7 @@ import ( "fmt" "os" "strings" + "time" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/artifacts" @@ -37,6 +38,8 @@ type SuperchainConfig struct { UseForge bool // ForgeSlowBroadcast confirms each Forge broadcast transaction before sending the next. ForgeSlowBroadcast bool + // ReceiptQueryInterval is how often to poll for each broadcast's receipt. Zero uses the broadcaster's default. + ReceiptQueryInterval time.Duration privateKeyECDSA *ecdsa.PrivateKey @@ -46,6 +49,9 @@ type SuperchainConfig struct { } func (c *SuperchainConfig) Check() error { + if err := broadcaster.CheckReceiptQueryInterval(c.ReceiptQueryInterval); err != nil { + return err + } if c.L1RPCUrl == "" { return fmt.Errorf("l1RPCUrl must be specified") } @@ -106,6 +112,7 @@ func SuperchainCLI(cliCtx *cli.Context) error { CacheDir: cacheDir, UseForge: useForge, ForgeSlowBroadcast: cliCtx.Bool(deployer.ForgeSlowBroadcastFlagName), + ReceiptQueryInterval: cliCtx.Duration(deployer.ReceiptQueryIntervalFlagName), SuperchainProxyAdminOwner: superchainProxyAdminOwner, Guardian: guardian, Paused: paused, @@ -218,11 +225,12 @@ func Superchain(ctx context.Context, cfg SuperchainConfig) (opcm.DeploySuperchai chainDeployer := crypto.PubkeyToAddress(cfg.privateKeyECDSA.PublicKey) bcaster, err := broadcaster.NewKeyedBroadcaster(broadcaster.KeyedBroadcasterOpts{ - Logger: lgr, - ChainID: chainID, - Client: l1Client, - Signer: signer, - From: chainDeployer, + Logger: lgr, + ChainID: chainID, + Client: l1Client, + Signer: signer, + From: chainDeployer, + ReceiptQueryInterval: cfg.ReceiptQueryInterval, }) if err != nil { return dso, fmt.Errorf("failed to create broadcaster: %w", err) diff --git a/op-deployer/pkg/deployer/broadcaster/keyed.go b/op-deployer/pkg/deployer/broadcaster/keyed.go index 4f1d6cd45ee..3b465797b9a 100644 --- a/op-deployer/pkg/deployer/broadcaster/keyed.go +++ b/op-deployer/pkg/deployer/broadcaster/keyed.go @@ -20,6 +20,28 @@ import ( "github.com/ethereum/go-ethereum/ethclient" ) +const ( + // DefaultReceiptQueryInterval is the receipt poll interval when none is set. + DefaultReceiptQueryInterval = time.Second + // minReceiptQueryInterval limits RPC load: each rebroadcast of a stuck transaction adds a poller, + // so a send stuck for a minute polls about 100 times a second at this rate. + minReceiptQueryInterval = 50 * time.Millisecond + // maxReceiptQueryInterval is the default. Slower polling leaves less time to see a mined + // transaction's receipt before rebroadcasts hit SafeAbortNonceTooLowCount and abort the send. + maxReceiptQueryInterval = DefaultReceiptQueryInterval +) + +// CheckReceiptQueryInterval rejects unsafe intervals. Zero means DefaultReceiptQueryInterval. +func CheckReceiptQueryInterval(interval time.Duration) error { + if interval != 0 && (interval < minReceiptQueryInterval || interval > maxReceiptQueryInterval) { + return fmt.Errorf( + "receipt query interval must be 0 or between %s and %s, got %s", + minReceiptQueryInterval, maxReceiptQueryInterval, interval, + ) + } + return nil +} + type KeyedBroadcaster struct { lgr log.Logger mgr txmgr.TxManager @@ -37,9 +59,20 @@ type KeyedBroadcasterOpts struct { } func NewKeyedBroadcaster(cfg KeyedBroadcasterOpts) (*KeyedBroadcaster, error) { + if err := CheckReceiptQueryInterval(cfg.ReceiptQueryInterval); err != nil { + return nil, err + } receiptQueryInterval := cfg.ReceiptQueryInterval if receiptQueryInterval == 0 { - receiptQueryInterval = time.Second + receiptQueryInterval = DefaultReceiptQueryInterval + } + if receiptQueryInterval != DefaultReceiptQueryInterval { + // apply --use-forge --deployment-target=live also builds this broadcaster, so it warns even though Forge does its own sending. + cfg.Logger.Warn( + "using non-default receipt query interval, which is only meant for tests", + "interval", receiptQueryInterval, + "default", DefaultReceiptQueryInterval, + ) } mgrCfg := &txmgr.Config{ diff --git a/op-deployer/pkg/deployer/broadcaster/keyed_test.go b/op-deployer/pkg/deployer/broadcaster/keyed_test.go index ba7c3f4c6d7..edc13531f6f 100644 --- a/op-deployer/pkg/deployer/broadcaster/keyed_test.go +++ b/op-deployer/pkg/deployer/broadcaster/keyed_test.go @@ -2,9 +2,16 @@ package broadcaster import ( "context" + "encoding/json" "errors" + "math/big" + "net/http" + "net/http/httptest" + "sync/atomic" "testing" + "time" + opcrypto "github.com/ethereum-optimism/optimism/op-service/crypto" "github.com/ethereum-optimism/optimism/op-service/log" "github.com/ethereum-optimism/optimism/op-service/testlog" "github.com/ethereum-optimism/optimism/op-service/txmgr" @@ -12,7 +19,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethclient" "github.com/holiman/uint256" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) @@ -103,3 +113,119 @@ func TestKeyedBroadcasterStopsAfterFailure(t *testing.T) { require.Equal(t, 2, calls) require.ErrorIs(t, results[1].Err, sendErr) } + +func TestNewKeyedBroadcasterReceiptQueryInterval(t *testing.T) { + const warning = "using non-default receipt query interval" + tests := []struct { + name string + interval time.Duration + wantErr bool + wantWarn bool + }{ + {name: "zero is the one second default", interval: 0}, + {name: "explicit default", interval: time.Second}, + {name: "lowest allowed", interval: 50 * time.Millisecond, wantWarn: true}, + {name: "faster than the default", interval: time.Second - 1, wantWarn: true}, + {name: "below minimum", interval: 50*time.Millisecond - 1, wantErr: true}, + {name: "above maximum", interval: time.Second + 1, wantErr: true}, + {name: "negative", interval: -time.Second, wantErr: true}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + require.Equal(t, tt.wantErr, CheckReceiptQueryInterval(tt.interval) != nil) + + lgr, logs := testlog.CaptureLogger(t, log.LevelWarn) + _, err := NewKeyedBroadcaster(KeyedBroadcasterOpts{ + Logger: lgr, + ChainID: big.NewInt(1), + Client: ethclient.NewClient(nil), + Signer: func(context.Context, common.Address, *types.Transaction) (*types.Transaction, error) { return nil, nil }, + ReceiptQueryInterval: tt.interval, + }) + if tt.wantErr { + require.ErrorContains(t, err, "receipt query interval must be 0 or between 50ms and 1s") + return + } + require.NoError(t, err) + warned := logs.FindLog(testlog.NewMessageContainsFilter(warning)) != nil + require.Equal(t, tt.wantWarn, warned) + }) + } +} + +// The receipt appears on the tenth poll. At the one-second default the tx manager's ticker can't get +// there before ten seconds on any machine, and at 50ms a slow host still has plenty of slack. +func TestKeyedBroadcasterPollsAtConfiguredInterval(t *testing.T) { + const receiptOnPoll = 10 + require.Less(t, timeUntilPoll(t, 50*time.Millisecond, receiptOnPoll), receiptOnPoll*time.Second) +} + +// Real deployments set no interval, so faster polling here would apply to every one of them. +func TestKeyedBroadcasterPollsEverySecondByDefault(t *testing.T) { + for _, interval := range []time.Duration{0, time.Second} { + t.Run(interval.String(), func(t *testing.T) { + require.GreaterOrEqual(t, timeUntilPoll(t, interval, 1), time.Second) + }) + } +} + +// timeUntilPoll broadcasts a transaction whose receipt appears on the given poll, and returns how long that took. +func timeUntilPoll(t *testing.T, interval time.Duration, receiptOnPoll int32) time.Duration { + t.Helper() + var polls atomic.Int32 + srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var req struct { + ID json.RawMessage `json:"id"` + Method string `json:"method"` + Params []json.RawMessage `json:"params"` + } + assert.NoError(t, json.NewDecoder(r.Body).Decode(&req)) + var result any + switch req.Method { + case "eth_getBlockByNumber": + result = &types.Header{Number: big.NewInt(1), BaseFee: big.NewInt(1), Difficulty: new(big.Int)} + case "eth_maxPriorityFeePerGas", "eth_blobBaseFee": + result = "0x1" + case "eth_estimateGas": + result = "0x5208" + case "eth_getTransactionCount": + result = "0x0" + case "eth_sendRawTransaction": + result = common.Hash{'T'} + case "eth_getTransactionReceipt": + if polls.Add(1) >= receiptOnPoll { + result = &types.Receipt{ + Status: types.ReceiptStatusSuccessful, + Logs: []*types.Log{}, + BlockNumber: big.NewInt(1), + BlockHash: common.Hash{'B'}, + } + } + } + assert.NoError(t, json.NewEncoder(w).Encode(map[string]any{"jsonrpc": "2.0", "id": req.ID, "result": result})) + })) + t.Cleanup(srv.Close) + client, err := ethclient.Dial(srv.URL) + require.NoError(t, err) + + key, err := crypto.GenerateKey() + require.NoError(t, err) + from := crypto.PubkeyToAddress(key.PublicKey) + bcaster, err := NewKeyedBroadcaster(KeyedBroadcasterOpts{ + Logger: testlog.Logger(t, log.LevelError), + ChainID: big.NewInt(1), + Client: client, + Signer: opcrypto.SignerFnFromBind(opcrypto.PrivateKeySignerFn(key, big.NewInt(1))), + From: from, + ReceiptQueryInterval: interval, + }) + require.NoError(t, err) + bcaster.Hook(Broadcast{Type: BroadcastCall, From: from, To: common.Address{'T'}, Value: (*hexutil.U256)(new(uint256.Int))}) + + start := time.Now() + _, err = bcaster.Broadcast(t.Context()) + require.NoError(t, err) + elapsed := time.Since(start) + require.EqualValues(t, receiptOnPoll, polls.Load()) + return elapsed +} diff --git a/op-deployer/pkg/deployer/continue.go b/op-deployer/pkg/deployer/continue.go index ce4591fd236..617d6e65453 100644 --- a/op-deployer/pkg/deployer/continue.go +++ b/op-deployer/pkg/deployer/continue.go @@ -6,6 +6,7 @@ import ( "fmt" "math/big" "strings" + "time" "github.com/ethereum-optimism/optimism/op-chain-ops/addresses" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/artifacts" @@ -34,11 +35,16 @@ type ContinueConfig struct { PrivateKey string CacheDir string Logger log.Logger + // ReceiptQueryInterval is how often to poll for each broadcast's receipt. Zero uses the broadcaster's default. + ReceiptQueryInterval time.Duration privateKeyECDSA *ecdsa.PrivateKey } func (c *ContinueConfig) Check() error { + if err := broadcaster.CheckReceiptQueryInterval(c.ReceiptQueryInterval); err != nil { + return err + } if c.Workdir == "" { return fmt.Errorf("workdir must be specified") } @@ -61,11 +67,12 @@ func (c *ContinueConfig) Check() error { func newContinueConfig(cliCtx *cli.Context, lgr log.Logger) ContinueConfig { return ContinueConfig{ - Workdir: cliCtx.String(WorkdirFlagName), - L1RPCUrl: cliCtx.String(L1RPCURLFlagName), - PrivateKey: cliCtx.String(PrivateKeyFlagName), - CacheDir: cliCtx.String(CacheDirFlagName), - Logger: lgr, + Workdir: cliCtx.String(WorkdirFlagName), + L1RPCUrl: cliCtx.String(L1RPCURLFlagName), + PrivateKey: cliCtx.String(PrivateKeyFlagName), + CacheDir: cliCtx.String(CacheDirFlagName), + Logger: lgr, + ReceiptQueryInterval: cliCtx.Duration(ReceiptQueryIntervalFlagName), } } @@ -446,11 +453,12 @@ func (r *continuationRunner) broadcastAndCheckpoint(chain *continuationChain) er chainID := r.state.PreparedDeployment.Intent.L1ChainIDBig() signer := opcrypto.SignerFnFromBind(opcrypto.PrivateKeySignerFn(r.cfg.privateKeyECDSA, chainID)) liveBroadcaster, err := broadcaster.NewKeyedBroadcaster(broadcaster.KeyedBroadcasterOpts{ - Logger: r.cfg.Logger, - ChainID: new(big.Int).Set(chainID), - Client: r.l1Client, - Signer: signer, - From: r.deployer, + Logger: r.cfg.Logger, + ChainID: new(big.Int).Set(chainID), + Client: r.l1Client, + Signer: signer, + From: r.deployer, + ReceiptQueryInterval: r.cfg.ReceiptQueryInterval, }) if err != nil { return fmt.Errorf("failed to create live broadcaster: %w", err) diff --git a/op-deployer/pkg/deployer/continue_test.go b/op-deployer/pkg/deployer/continue_test.go index c5df60cb430..d3e309337ac 100644 --- a/op-deployer/pkg/deployer/continue_test.go +++ b/op-deployer/pkg/deployer/continue_test.go @@ -95,10 +95,11 @@ func TestContinueFlagsExcludeDeploymentSelectors(t *testing.T) { require.False(t, flagNames[DeploymentTargetFlag.Name]) require.False(t, flagNames[GenesisTimeOffsetFlagName]) require.Equal(t, map[string]bool{ - WorkdirFlagName: true, - OutdirFlagName: true, - PrivateKeyFlagName: true, - L1RPCURLFlagName: true, + WorkdirFlagName: true, + OutdirFlagName: true, + PrivateKeyFlagName: true, + L1RPCURLFlagName: true, + ReceiptQueryIntervalFlagName: true, }, flagNames) } diff --git a/op-deployer/pkg/deployer/flags.go b/op-deployer/pkg/deployer/flags.go index 02601b73bf9..25512cc3168 100644 --- a/op-deployer/pkg/deployer/flags.go +++ b/op-deployer/pkg/deployer/flags.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/artifacts" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/broadcaster" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/flags" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/state" @@ -33,6 +34,8 @@ const ( UseForgeFlagName = flags.UseForgeFlagName ForgeSlowBroadcastFlagName = flags.ForgeSlowBroadcastFlagName GenesisTimeOffsetFlagName = flags.GenesisTimeOffsetFlagName + + ReceiptQueryIntervalFlagName = flags.ReceiptQueryIntervalFlagName ) var ( @@ -150,6 +153,13 @@ var ( EnvVars: PrefixEnvVar("FORGE_SLOW_BROADCAST"), Value: false, } + ReceiptQueryIntervalFlag = &cli.DurationFlag{ + Name: ReceiptQueryIntervalFlagName, + Usage: "for tests: how often to poll for each broadcast's receipt, from 50ms to 1s; 0 uses the default of 1s. Does not affect transactions sent by Forge", + EnvVars: PrefixEnvVar("RECEIPT_QUERY_INTERVAL"), + Value: broadcaster.DefaultReceiptQueryInterval, + Hidden: true, + } GenesisTimeOffsetFlag = &cli.Uint64Flag{ Name: GenesisTimeOffsetFlagName, Usage: "Offset in seconds added to the L1 anchor block's timestamp to produce the committed L2 genesis " + @@ -179,6 +189,7 @@ var ContinueFlags = []cli.Flag{ WorkdirFlag, PrivateKeyFlag, L1RPCURLFlag, + ReceiptQueryIntervalFlag, } var ApplyFlags = []cli.Flag{ @@ -192,6 +203,7 @@ var ApplyFlags = []cli.Flag{ VerifierUrlFlag, UseForgeFlag, ForgeSlowBroadcastFlag, + ReceiptQueryIntervalFlag, } var PrestateFlags = []cli.Flag{ diff --git a/op-deployer/pkg/deployer/flags/names.go b/op-deployer/pkg/deployer/flags/names.go index 49ea633cd5c..0dca08e484a 100644 --- a/op-deployer/pkg/deployer/flags/names.go +++ b/op-deployer/pkg/deployer/flags/names.go @@ -27,6 +27,8 @@ const ( UseForgeFlagName = "use-forge" ForgeSlowBroadcastFlagName = "forge-slow-broadcast" GenesisTimeOffsetFlagName = "genesis-time-offset" + + ReceiptQueryIntervalFlagName = "receipt-query-interval" ) func DefaultCacheDir() string { diff --git a/op-deployer/pkg/deployer/flags_test.go b/op-deployer/pkg/deployer/flags_test.go index aa492eba20c..c9a4eeebe4d 100644 --- a/op-deployer/pkg/deployer/flags_test.go +++ b/op-deployer/pkg/deployer/flags_test.go @@ -2,6 +2,7 @@ package deployer import ( "testing" + "time" "github.com/stretchr/testify/require" ) @@ -16,3 +17,8 @@ func TestVerificationFlagDefaults(t *testing.T) { require.NotContains(t, flag.Names(), "verify") } } + +func TestReceiptQueryIntervalFlagIsHiddenWithOneSecondDefault(t *testing.T) { + require.Equal(t, time.Second, ReceiptQueryIntervalFlag.Value) + require.True(t, ReceiptQueryIntervalFlag.Hidden) +} diff --git a/op-deployer/pkg/deployer/integration_test/apply_test.go b/op-deployer/pkg/deployer/integration_test/apply_test.go index 315a6a2f17a..5938305bfde 100644 --- a/op-deployer/pkg/deployer/integration_test/apply_test.go +++ b/op-deployer/pkg/deployer/integration_test/apply_test.go @@ -96,6 +96,7 @@ func TestEndToEndBootstrapApply(t *testing.T) { SuperchainProxyAdminOwner: superchainPAO, Guardian: common.Address{'G'}, Paused: false, + ReceiptQueryInterval: testReceiptQueryInterval, }) require.NoError(t, err) @@ -124,6 +125,7 @@ func TestEndToEndBootstrapApply(t *testing.T) { FaultGameClockExtension: standard.DisputeClockExtension, FaultGameMaxClockDuration: standard.DisputeMaxClockDuration, SP1Verifier: sp1Verifier, + ReceiptQueryInterval: testReceiptQueryInterval, }) require.NoError(t, err) @@ -135,14 +137,15 @@ func TestEndToEndBootstrapApply(t *testing.T) { require.NoError(t, deployer.ApplyPipeline( ctx, deployer.ApplyPipelineOpts{ - DeploymentTarget: deployer.DeploymentTargetLive, - L1RPCUrl: l1RPC, - DeployerPrivateKey: pk, - Intent: intent, - State: st, - Logger: lgr, - StateWriter: pipeline.NoopStateWriter(), - CacheDir: testCacheDir, + DeploymentTarget: deployer.DeploymentTargetLive, + L1RPCUrl: l1RPC, + DeployerPrivateKey: pk, + Intent: intent, + State: st, + Logger: lgr, + StateWriter: pipeline.NoopStateWriter(), + CacheDir: testCacheDir, + ReceiptQueryInterval: testReceiptQueryInterval, }, )) @@ -187,14 +190,15 @@ func TestApplyDefaultsSP1VerifierOnSepolia(t *testing.T) { intent, st := shared.NewIntent(t, big.NewInt(sepoliaChainID), dk, uint256.NewInt(12345), loc, loc, 30_000_000) require.NoError(t, deployer.ApplyPipeline(ctx, deployer.ApplyPipelineOpts{ - DeploymentTarget: deployer.DeploymentTargetLive, - L1RPCUrl: l1RPC, - DeployerPrivateKey: pk, - Intent: intent, - State: st, - Logger: lgr, - StateWriter: pipeline.NoopStateWriter(), - CacheDir: testCacheDir, + DeploymentTarget: deployer.DeploymentTargetLive, + L1RPCUrl: l1RPC, + DeployerPrivateKey: pk, + Intent: intent, + State: st, + Logger: lgr, + StateWriter: pipeline.NoopStateWriter(), + CacheDir: testCacheDir, + ReceiptQueryInterval: testReceiptQueryInterval, })) expected, err := standard.SP1VerifierFor(sepoliaChainID) diff --git a/op-deployer/pkg/deployer/integration_test/cli/bootstrap_test.go b/op-deployer/pkg/deployer/integration_test/cli/bootstrap_test.go index fa8699fc324..39c9d0d8acf 100644 --- a/op-deployer/pkg/deployer/integration_test/cli/bootstrap_test.go +++ b/op-deployer/pkg/deployer/integration_test/cli/bootstrap_test.go @@ -46,6 +46,7 @@ func TestCLIBootstrap(t *testing.T) { "--superchain-proxy-admin-owner", superchainProxyAdminOwner.Hex(), "--guardian", guardian.Hex(), }, nil) + requireFastReceiptPoll(t, output) t.Logf("Bootstrap superchain output:\n%s", output) @@ -124,6 +125,7 @@ func TestCLIBootstrap(t *testing.T) { "--challenger", challenger.Hex(), "--sp1-verifier-address", runner.DeployMockSP1Verifier(t).Hex(), }, nil) + requireFastReceiptPoll(t, output) t.Logf("Bootstrap implementations output:\n%s", output) diff --git a/op-deployer/pkg/deployer/integration_test/cli/cli_runner.go b/op-deployer/pkg/deployer/integration_test/cli/cli_runner.go index 1ef0f0fee38..4c2fc351d8e 100644 --- a/op-deployer/pkg/deployer/integration_test/cli/cli_runner.go +++ b/op-deployer/pkg/deployer/integration_test/cli/cli_runner.go @@ -5,6 +5,7 @@ import ( "log/slog" "os/exec" "path/filepath" + "strings" "syscall" "testing" "time" @@ -21,8 +22,21 @@ import ( "github.com/stretchr/testify/require" ) +// testReceiptQueryInterval replaces the default one-second receipt poll, which is nearly all of a +// deploy's time because Anvil mines on send. +const testReceiptQueryInterval = 50 * time.Millisecond + var cliTestBinary string +// requireFastReceiptPoll checks that the interval reached the command's broadcaster. Otherwise a +// dropped field would only make the tests slower. +func requireFastReceiptPoll(t *testing.T, output string) { + t.Helper() + reached := strings.Contains(output, "using non-default receipt query interval") && + strings.Contains(output, "interval="+testReceiptQueryInterval.String()) + require.True(t, reached, "the receipt query interval did not reach the broadcaster") +} + // CLITestRunner provides utilities for running op-deployer CLI commands in tests type CLITestRunner struct { workDir string @@ -147,7 +161,13 @@ func (r *CLITestRunner) Run(ctx context.Context, args []string, env map[string]s } cmd.WaitDelay = 5 * time.Second cmd.Dir = r.workDir - cmd.Env = cmd.Environ() + cmd.Env = append(cmd.Environ(), + "DEPLOYER_RECEIPT_QUERY_INTERVAL="+testReceiptQueryInterval.String(), + // requireFastReceiptPoll reads this log output. + "DEPLOYER_LOG_FORMAT=text", + "DEPLOYER_LOG_COLOR=false", + "DEPLOYER_LOG_LEVEL=info", + ) for key, value := range env { cmd.Env = append(cmd.Env, key+"="+value) } diff --git a/op-deployer/pkg/deployer/integration_test/cli/continue_test.go b/op-deployer/pkg/deployer/integration_test/cli/continue_test.go index 03a55f24e2c..94d7912f43c 100644 --- a/op-deployer/pkg/deployer/integration_test/cli/continue_test.go +++ b/op-deployer/pkg/deployer/integration_test/cli/continue_test.go @@ -90,7 +90,8 @@ func TestContinueCLIColdStart(t *testing.T) { runner := NewCLITestRunner(t) require.NoDirExists(t, filepath.Join(runner.GetWorkDir(), ".cache")) nonceBefore := continueCLINonce(t, fixture) - runner.ExpectSuccess(t, continueCLIArgs(fixture, workdir), nil) + output := runner.ExpectSuccess(t, continueCLIArgs(fixture, workdir), nil) + requireFastReceiptPoll(t, output) require.Equal(t, nonceBefore+1, continueCLINonce(t, fixture)) persisted, err := pipeline.ReadState(workdir) @@ -133,6 +134,7 @@ func newContinueCLIFixture(t *testing.T) *continueCLIFixture { CacheDir: setupCacheDir, SuperchainProxyAdminOwner: superchainPAO, Guardian: intent.SuperchainRoles.SuperchainGuardian, + ReceiptQueryInterval: testReceiptQueryInterval, }) require.NoError(t, err) sp1Verifier := testutil.DeployMockSP1Verifier(t, l1Client, key, afacts) @@ -161,6 +163,7 @@ func newContinueCLIFixture(t *testing.T) *continueCLIFixture { FaultGameClockExtension: standard.DisputeClockExtension, FaultGameMaxClockDuration: standard.DisputeMaxClockDuration, SP1Verifier: sp1Verifier, + ReceiptQueryInterval: testReceiptQueryInterval, }) require.NoError(t, err) diff --git a/op-deployer/pkg/deployer/integration_test/cli/e2e_apply_test.go b/op-deployer/pkg/deployer/integration_test/cli/e2e_apply_test.go index 3c12f9267ad..1b1235a9815 100644 --- a/op-deployer/pkg/deployer/integration_test/cli/e2e_apply_test.go +++ b/op-deployer/pkg/deployer/integration_test/cli/e2e_apply_test.go @@ -64,11 +64,12 @@ func TestCLIEndToEndApply(t *testing.T) { require.NoError(t, intent.WriteToFile(filepath.Join(workDir, "intent.toml"))) // Apply first chain with live deployment - runner.ExpectSuccessWithNetwork(t, []string{ + output := runner.ExpectSuccessWithNetwork(t, []string{ "apply", "--deployment-target", "live", "--workdir", workDir, }, nil) + requireFastReceiptPoll(t, output) // Add second chain to intent intent, err := pipeline.ReadIntent(workDir) diff --git a/op-deployer/pkg/deployer/integration_test/continue_test.go b/op-deployer/pkg/deployer/integration_test/continue_test.go index 752d3881169..a37e74c3059 100644 --- a/op-deployer/pkg/deployer/integration_test/continue_test.go +++ b/op-deployer/pkg/deployer/integration_test/continue_test.go @@ -563,6 +563,7 @@ func newContinuationEnvWithIntentMutator( CacheDir: cacheDir, SuperchainProxyAdminOwner: superchainPAO, Guardian: intent.SuperchainRoles.SuperchainGuardian, + ReceiptQueryInterval: testReceiptQueryInterval, }) require.NoError(t, err) @@ -591,6 +592,7 @@ func newContinuationEnvWithIntentMutator( FaultGameClockExtension: standard.DisputeClockExtension, FaultGameMaxClockDuration: standard.DisputeMaxClockDuration, SP1Verifier: deployMockSP1Verifier(t, l1Client, key), + ReceiptQueryInterval: testReceiptQueryInterval, }) require.NoError(t, err) @@ -654,11 +656,12 @@ func newContinuationEnvWithIntentMutator( func (e *continuationEnv) config() deployer.ContinueConfig { return deployer.ContinueConfig{ - Workdir: e.workdir, - L1RPCUrl: e.l1RPC, - PrivateKey: e.privateKey, - CacheDir: e.cacheDir, - Logger: e.lgr, + Workdir: e.workdir, + L1RPCUrl: e.l1RPC, + PrivateKey: e.privateKey, + CacheDir: e.cacheDir, + Logger: e.lgr, + ReceiptQueryInterval: testReceiptQueryInterval, } } From c88c9048da6c00493f905c5bc88edc89bb9ef96d Mon Sep 17 00:00:00 2001 From: Karl Floersch <karl@oplabs.co> Date: Fri, 6 Nov 2026 20:44:46 +0000 Subject: [PATCH 14/21] op-deployer: deploy OP Private private chains on their settlement chain (#23953) Co-authored-by: opsuperchain <opsuperchain@slop.bot> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --- docs/ai/devfeatures.md | 2 +- .../l2_genesis_allocs_oracle_test.go | 24 ++- .../integration_test/settlement_test.go | 202 ++++++++++++++++++ op-deployer/pkg/deployer/pipeline/init.go | 6 + .../pkg/deployer/pipeline/l2genesis.go | 6 + op-deployer/pkg/deployer/pipeline/opchain.go | 12 ++ .../pkg/deployer/pipeline/settlement.go | 193 +++++++++++++++++ .../pkg/deployer/pipeline/settlement_test.go | 193 +++++++++++++++++ op-deployer/pkg/deployer/prepare.go | 18 ++ .../pkg/deployer/prepare_settlement_test.go | 47 ++++ op-deployer/pkg/deployer/validate/validate.go | 8 + .../pkg/deployer/validate/validate_test.go | 45 ++++ .../pkg/deployer/verify/auto_verify.go | 2 +- .../pkg/deployer/verify/state_bundle.go | 21 +- .../pkg/deployer/verify/state_bundle_test.go | 52 +++++ op-deployer/pkg/deployer/verify/verifier.go | 2 +- 16 files changed, 820 insertions(+), 13 deletions(-) create mode 100644 op-deployer/pkg/deployer/integration_test/settlement_test.go create mode 100644 op-deployer/pkg/deployer/pipeline/settlement.go create mode 100644 op-deployer/pkg/deployer/pipeline/settlement_test.go create mode 100644 op-deployer/pkg/deployer/prepare_settlement_test.go create mode 100644 op-deployer/pkg/deployer/validate/validate_test.go create mode 100644 op-deployer/pkg/deployer/verify/state_bundle_test.go diff --git a/docs/ai/devfeatures.md b/docs/ai/devfeatures.md index 8b7df0822e0..4fc5c6fb75e 100644 --- a/docs/ai/devfeatures.md +++ b/docs/ai/devfeatures.md @@ -17,7 +17,7 @@ Active flags: |------|-------| | `DeployV2DisputeGames` | Legacy, no longer used; constant kept for historical reasons | | `BridgeHook` | Bridge hook configuration on OptimismPortal2, currently planned only for the compliance module | -| `OPPrivate` | The OP Private `ChainConfig` predeploy in L2 genesis, holding the chain's settlement chain ID (op-deployer chain override `settlementChainId`) | +| `OPPrivate` | The OP Private `ChainConfig` predeploy in L2 genesis, holding the chain's settlement chain ID (op-deployer chain override `settlementChainId`, per chain only). A chain whose `settlementChainId` names an earlier chain of the same intent is a private chain: op-deployer reuses that chain's L1 contracts for it and skips it in `validate` and `verify` | | `SuperRootGamesMigration` | Super-root games migration path in OPCM upgrade — **enabled by default** | diff --git a/op-deployer/pkg/deployer/integration_test/l2_genesis_allocs_oracle_test.go b/op-deployer/pkg/deployer/integration_test/l2_genesis_allocs_oracle_test.go index 03048762463..20ebe10856b 100644 --- a/op-deployer/pkg/deployer/integration_test/l2_genesis_allocs_oracle_test.go +++ b/op-deployer/pkg/deployer/integration_test/l2_genesis_allocs_oracle_test.go @@ -86,14 +86,21 @@ func allocModes(t *testing.T) []allocMode { { name: "op-private", devFeatureBitmap: devfeatures.OPPrivateFlag, - settlementChainID: 1337, + settlementChainID: 2, configure: func(t *testing.T, intent *state.Intent) { intent.GlobalDeployOverrides = map[string]any{ "devFeatureBitmap": devfeatures.OPPrivateFlag, } intent.Chains[0].DeployOverrides = map[string]any{ - "settlementChainId": 1337, + "settlementChainId": 2, } + // A private chain's settlement chain must come before it in the same intent. + _, _, dk := shared.DefaultPrivkey(t) + settlement := shared.NewChainIntent(t, dk, big.NewInt(900), uint256.NewInt(2), testCustomGasLimit) + settlement.DeployOverrides = map[string]any{ + "settlementChainId": 2, + } + intent.Chains = append([]*state.ChainIntent{settlement}, intent.Chains...) }, }, { @@ -154,17 +161,20 @@ func generateL2Genesis(t *testing.T, mode allocMode) generatedL2Genesis { DeployMockSP1Verifier: true, })) - require.NotEmpty(t, st.Chains) - require.NotNil(t, st.Chains[0].Allocs) + chainIntent, err := intent.Chain(l2ChainID.Bytes32()) + require.NoError(t, err) + chainState, err := st.Chain(l2ChainID.Bytes32()) + require.NoError(t, err) + require.NotNil(t, chainState.Allocs) - cfg, err := state.CombineDeployConfig(intent, intent.Chains[0], st, st.Chains[0]) + cfg, err := state.CombineDeployConfig(intent, chainIntent, st, chainState) require.NoError(t, err) return generatedL2Genesis{ mode: mode, - allocs: st.Chains[0].Allocs.Data.Accounts, + allocs: chainState.Allocs.Data.Accounts, cfg: cfg, - chainIntent: intent.Chains[0], + chainIntent: chainIntent, } } diff --git a/op-deployer/pkg/deployer/integration_test/settlement_test.go b/op-deployer/pkg/deployer/integration_test/settlement_test.go new file mode 100644 index 00000000000..485d04341e7 --- /dev/null +++ b/op-deployer/pkg/deployer/integration_test/settlement_test.go @@ -0,0 +1,202 @@ +package integration_test + +import ( + "context" + "math/big" + "testing" + + "github.com/ethereum-optimism/optimism/op-chain-ops/devkeys" + "github.com/ethereum-optimism/optimism/op-core/devfeatures" + "github.com/ethereum-optimism/optimism/op-core/predeploys" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/inspect" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/integration_test/shared" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/state" + op_e2e "github.com/ethereum-optimism/optimism/op-e2e" + "github.com/ethereum-optimism/optimism/op-service/testutils/devnet" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/holiman/uint256" + "github.com/stretchr/testify/require" +) + +// settlementGroup sets up a genesis deployment with the OP_PRIVATE dev feature, where chain 1 is +// a settlement chain. +func settlementGroup(t *testing.T) (deployer.ApplyPipelineOpts, *state.Intent, *state.State, *devkeys.MnemonicDevKeys) { + opts, intent, st := setupGenesisChain(t, devnet.DefaultChainID) + dk, err := devkeys.NewMnemonicDevKeys(devkeys.TestMnemonic) + require.NoError(t, err) + intent.GlobalDeployOverrides = map[string]any{ + "devFeatureBitmap": devfeatures.EnableDevFeature(common.Hash{}, devfeatures.OPPrivateFlag), + } + intent.Chains[0].DeployOverrides = map[string]any{"settlementChainId": 1} + return opts, intent, st, dk +} + +// addChain appends a chain with the given ID and deploy overrides to the intent. +func addChain(t *testing.T, intent *state.Intent, dk *devkeys.MnemonicDevKeys, id uint64, overrides map[string]any) *state.ChainIntent { + chain := shared.NewChainIntent(t, dk, new(big.Int).SetUint64(devnet.DefaultChainID), uint256.NewInt(id), testCustomGasLimit) + chain.DeployOverrides = overrides + intent.Chains = append(intent.Chains, chain) + return chain +} + +// settlementSlot returns the settlement chain ID in the chain's ChainConfig predeploy. +func settlementSlot(t *testing.T, st *state.State, id common.Hash) *big.Int { + chain, err := st.Chain(id) + require.NoError(t, err) + account, ok := chain.Allocs.Data.Accounts[predeploys.ChainConfigAddr] + require.True(t, ok) + return account.Storage[settlementChainIDSlot].Big() +} + +// requireSharesSettlement checks that the private chain shares the settlement chain's L1 +// contracts and has an L2 genesis of its own. +func requireSharesSettlement(t *testing.T, st *state.State, settlementID, privateID common.Hash) { + t.Helper() + settlement, err := st.Chain(settlementID) + require.NoError(t, err) + private, err := st.Chain(privateID) + require.NoError(t, err) + require.Equal(t, settlement.OpChainContracts, private.OpChainContracts) + require.NotNil(t, private.Allocs) +} + +// TestApplySettlementGroup applies a settlement chain and one of its private chains. The private +// chain gets no L1 contracts of its own: it shares the settlement chain's contracts, and its +// rollup config points at them. +func TestApplySettlementGroup(t *testing.T) { + op_e2e.InitParallel(t) + + opts, intent, st, dk := settlementGroup(t) + settlement := intent.Chains[0] + private := addChain(t, intent, dk, 2, map[string]any{"settlementChainId": 1}) + require.NoError(t, deployer.ApplyPipeline(context.Background(), opts)) + + requireSharesSettlement(t, st, settlement.ID, private.ID) + require.Equal(t, int64(1), settlementSlot(t, st, settlement.ID).Int64()) + require.Equal(t, int64(1), settlementSlot(t, st, private.ID).Int64()) + + _, settlementRollup, err := inspect.GenesisAndRollup(st, settlement.ID) + require.NoError(t, err) + _, privateRollup, err := inspect.GenesisAndRollup(st, private.ID) + require.NoError(t, err) + require.Equal(t, settlementRollup.L1SystemConfigAddress, privateRollup.L1SystemConfigAddress) + require.Equal(t, settlementRollup.DepositContractAddress, privateRollup.DepositContractAddress, "both derive from the shared portal") + require.Equal(t, int64(2), privateRollup.L2ChainID.Int64()) +} + +// TestApplySettlementGroupAddPrivateChain adds a private chain to an applied settlement chain and +// applies again. The new chain sets its own genesis time. +func TestApplySettlementGroupAddPrivateChain(t *testing.T) { + op_e2e.InitParallel(t) + + opts, intent, st, dk := settlementGroup(t) + settlement := intent.Chains[0] + require.NoError(t, deployer.ApplyPipeline(context.Background(), opts)) + before, err := st.Chain(settlement.ID) + require.NoError(t, err) + contracts := before.OpChainContracts + + // The genesis target seals a new L1 genesis on every apply, which moves every chain's start + // block. The live target keeps a start block once set. + _, settlementRollup, err := inspect.GenesisAndRollup(st, settlement.ID) + require.NoError(t, err) + genesisTime := settlementRollup.Genesis.L2Time + 600 + private := addChain(t, intent, dk, 2, map[string]any{ + "settlementChainId": 1, + "l2GenesisBlockTimestamp": hexutil.Uint64(genesisTime), + }) + require.NoError(t, deployer.ApplyPipeline(context.Background(), opts)) + + after, err := st.Chain(settlement.ID) + require.NoError(t, err) + require.Equal(t, contracts, after.OpChainContracts, "the settlement chain is not deployed again") + requireSharesSettlement(t, st, settlement.ID, private.ID) + require.Equal(t, int64(1), settlementSlot(t, st, private.ID).Int64()) + _, privateRollup, err := inspect.GenesisAndRollup(st, private.ID) + require.NoError(t, err) + require.Equal(t, genesisTime, privateRollup.Genesis.L2Time) +} + +// TestApplySettlementGroupRejectsSettlementChainIDChange applies a public chain, then tries to +// make it a settlement chain. Its L2 genesis would keep settlementChainId 0, so apply refuses. +func TestApplySettlementGroupRejectsSettlementChainIDChange(t *testing.T) { + op_e2e.InitParallel(t) + + opts, intent, st, dk := settlementGroup(t) + intent.Chains[0].DeployOverrides = nil + require.NoError(t, deployer.ApplyPipeline(context.Background(), opts)) + require.Zero(t, settlementSlot(t, st, intent.Chains[0].ID).Sign()) + + // Edit a copy, as a new intent.toml would be: the state holds the applied intent itself. + next, err := intent.Clone() + require.NoError(t, err) + next.Chains[0].DeployOverrides = map[string]any{"settlementChainId": 1} + private := addChain(t, next, dk, 2, map[string]any{"settlementChainId": 1}) + opts.Intent = next + require.ErrorContains(t, deployer.ApplyPipeline(context.Background(), opts), + "settlementChainId changed from 0 to 1 after apply") + _, err = st.Chain(private.ID) + require.Error(t, err, "nothing is deployed for the private chain") +} + +// TestApplySettlementGroupTwoPrivateChains applies a settlement chain with two private chains and +// a public chain. +func TestApplySettlementGroupTwoPrivateChains(t *testing.T) { + op_e2e.InitParallel(t) + + opts, intent, st, dk := settlementGroup(t) + settlement := intent.Chains[0] + private2 := addChain(t, intent, dk, 2, map[string]any{"settlementChainId": 1}) + private3 := addChain(t, intent, dk, 3, map[string]any{"settlementChainId": 1}) + public := addChain(t, intent, dk, 4, nil) + require.NoError(t, deployer.ApplyPipeline(context.Background(), opts)) + + requireSharesSettlement(t, st, settlement.ID, private2.ID) + requireSharesSettlement(t, st, settlement.ID, private3.ID) + settlementState, err := st.Chain(settlement.ID) + require.NoError(t, err) + publicState, err := st.Chain(public.ID) + require.NoError(t, err) + require.NotEqual(t, settlementState.SystemConfigProxy, publicState.SystemConfigProxy, "the public chain deploys its own contracts") + require.Equal(t, int64(1), settlementSlot(t, st, private2.ID).Int64()) + require.Equal(t, int64(1), settlementSlot(t, st, private3.ID).Int64()) + require.Zero(t, settlementSlot(t, st, public.ID).Sign()) + + _, rollup2, err := inspect.GenesisAndRollup(st, private2.ID) + require.NoError(t, err) + _, rollup3, err := inspect.GenesisAndRollup(st, private3.ID) + require.NoError(t, err) + require.NotEqual(t, rollup2.Genesis.L2.Hash, rollup3.Genesis.L2.Hash) +} + +// TestApplySettlementGroupRejectsInvalidIntents checks that apply refuses an invalid settlement +// group before it deploys anything. +func TestApplySettlementGroupRejectsInvalidIntents(t *testing.T) { + op_e2e.InitParallel(t) + + tests := []struct { + name string + mutate func(*state.Intent, *devkeys.MnemonicDevKeys) + err string + }{ + {"without OP_PRIVATE", func(intent *state.Intent, dk *devkeys.MnemonicDevKeys) { + intent.GlobalDeployOverrides = nil + addChain(t, intent, dk, 2, map[string]any{"settlementChainId": 1}) + }, "needs the OP_PRIVATE dev feature"}, + {"global override", func(intent *state.Intent, dk *devkeys.MnemonicDevKeys) { + intent.Chains[0].DeployOverrides = nil + intent.GlobalDeployOverrides["settlementChainId"] = 1 + addChain(t, intent, dk, 2, nil) + }, `globalDeployOverrides key "settlementChainId" is not allowed`}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + opts, intent, st, dk := settlementGroup(t) + tt.mutate(intent, dk) + require.ErrorContains(t, deployer.ApplyPipeline(context.Background(), opts), tt.err) + require.Nil(t, st.SuperchainDeployment, "nothing is deployed") + }) + } +} diff --git a/op-deployer/pkg/deployer/pipeline/init.go b/op-deployer/pkg/deployer/pipeline/init.go index 151e8a052fe..9ba888b7168 100644 --- a/op-deployer/pkg/deployer/pipeline/init.go +++ b/op-deployer/pkg/deployer/pipeline/init.go @@ -24,6 +24,12 @@ func ValidateInputs(intent *state.Intent, st *state.State) error { if err := intent.Check(); err != nil { return err } + if err := checkSettlementGroups(intent); err != nil { + return err + } + if err := checkSettlementChainIDsUnchanged(intent, st); err != nil { + return err + } if intent.OPCMAddress != nil { if _, ok := intent.GlobalDeployOverrides["sp1Verifier"]; ok { return fmt.Errorf("sp1Verifier must not be specified when using a predeployed OPCM") diff --git a/op-deployer/pkg/deployer/pipeline/l2genesis.go b/op-deployer/pkg/deployer/pipeline/l2genesis.go index 125acefbb08..a9860a16e8a 100644 --- a/op-deployer/pkg/deployer/pipeline/l2genesis.go +++ b/op-deployer/pkg/deployer/pipeline/l2genesis.go @@ -198,6 +198,12 @@ func calculateL2GenesisOverrides(intent *state.Intent, thisIntent *state.ChainIn } } + // Read through the one accessor, so the precedence here and in the settlement checks agree. + overrides.SettlementChainID, err = SettlementChainIDOverride(intent, thisIntent) + if err != nil { + return l2GenesisOverrides{}, nil, err + } + return overrides, schedule, nil } diff --git a/op-deployer/pkg/deployer/pipeline/opchain.go b/op-deployer/pkg/deployer/pipeline/opchain.go index a1a6ffa9ac5..063ddb9ecb6 100644 --- a/op-deployer/pkg/deployer/pipeline/opchain.go +++ b/op-deployer/pkg/deployer/pipeline/opchain.go @@ -42,6 +42,18 @@ func DeployOPChain(env *Env, intent *state.Intent, st *state.State, chainID comm return fmt.Errorf("failed to get chain intent: %w", err) } + settlementID, private, err := PrivateChainSettlement(intent, thisIntent) + if err != nil { + return err + } + if private { + if err := reuseSettlementContracts(st, chainID, settlementID); err != nil { + return err + } + lgr.Info("opchain deployment not needed, the private chain shares its settlement chain's L1 contracts", "settlement", settlementID.Hex()) + return nil + } + dci, err := makeDCI(intent, thisIntent, chainID, st) if err != nil { return fmt.Errorf("error making deploy OP chain input: %w", err) diff --git a/op-deployer/pkg/deployer/pipeline/settlement.go b/op-deployer/pkg/deployer/pipeline/settlement.go new file mode 100644 index 00000000000..b6cefaef9b5 --- /dev/null +++ b/op-deployer/pkg/deployer/pipeline/settlement.go @@ -0,0 +1,193 @@ +package pipeline + +import ( + "fmt" + "math/big" + "reflect" + "strings" + + "github.com/ethereum/go-ethereum/common" + + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/state" + "github.com/ethereum-optimism/optimism/op-service/bigs" + "github.com/ethereum-optimism/optimism/op-service/jsonutil" +) + +// settlementChainIDKey is the deploy override that names a chain's OP Private settlement chain. +const settlementChainIDKey = "settlementChainId" + +// SettlementChainIDOverride returns the chain's settlementChainId deploy override: 0 on a public +// chain, the chain's own ID on a settlement chain, and its settlement chain's ID on a private +// chain. It is the only reader of the override. A global override is refused, because it would +// make every other chain of the intent a private chain. +// +// TODO(#23978): replace this override with a typed intent schema when OP_PRIVATE graduates. +func SettlementChainIDOverride(intent *state.Intent, chain *state.ChainIntent) (uint64, error) { + for key := range intent.GlobalDeployOverrides { + if strings.EqualFold(key, settlementChainIDKey) { + return 0, fmt.Errorf("globalDeployOverrides key %q is not allowed: set %s in each chain's deployOverrides", key, settlementChainIDKey) + } + } + overrides, err := jsonutil.MergeJSON( + struct { + SettlementChainID uint64 `json:"settlementChainId"` + }{}, + chain.DeployOverrides, + ) + if err != nil { + return 0, fmt.Errorf("chain %s: failed to read the %s override: %w", chain.ID.Hex(), settlementChainIDKey, err) + } + return overrides.SettlementChainID, nil +} + +// PrivateChainSettlement returns the settlement chain of an OP Private private chain: a chain +// whose settlementChainId deploy override names another chain. A private chain shares the L1 +// contracts of its settlement chain, which must be in the same intent. +func PrivateChainSettlement(intent *state.Intent, chain *state.ChainIntent) (common.Hash, bool, error) { + settlementID, err := settlementChainOf(intent, chain) + if err != nil { + return common.Hash{}, false, err + } + if settlementID == (common.Hash{}) || settlementID == chain.ID { + return common.Hash{}, false, nil + } + return settlementID, true, nil +} + +// settlementChainOf returns the chain's settlementChainId deploy override as a chain ID, or the +// zero hash if there is none. +func settlementChainOf(intent *state.Intent, chain *state.ChainIntent) (common.Hash, error) { + id, err := SettlementChainIDOverride(intent, chain) + if err != nil || id == 0 { + return common.Hash{}, err + } + return common.BigToHash(new(big.Int).SetUint64(id)), nil +} + +// checkSettlementGroups checks the OP Private chains of the intent. A private chain's settlement +// chain must be earlier in the same intent and must be its own settlement chain, so groups have +// one level and no cycles. A private chain must configure its shared L1 contracts as its +// settlement chain does. +func checkSettlementGroups(intent *state.Intent) error { + position := make(map[common.Hash]int, len(intent.Chains)) + settlementOf := make(map[common.Hash]common.Hash, len(intent.Chains)) + for i, chain := range intent.Chains { + settlementID, err := settlementChainOf(intent, chain) + if err != nil { + return err + } + position[chain.ID] = i + settlementOf[chain.ID] = settlementID + } + + for i, chain := range intent.Chains { + settlementID := settlementOf[chain.ID] + if settlementID == (common.Hash{}) { + continue + } + if err := checkSettlementChainIDOverride(devFeatureBitmapOverride(intent), bigs.Uint64Strict(settlementID.Big())); err != nil { + return fmt.Errorf("chain %s: %w", chain.ID.Hex(), err) + } + if settlementID == chain.ID { + continue + } + + j, ok := position[settlementID] + if !ok { + return fmt.Errorf("private chain %s: settlement chain %s must be in the same intent", chain.ID.Hex(), settlementID.Hex()) + } + if j > i { + return fmt.Errorf("private chain %s: settlement chain %s must come before it in the intent", chain.ID.Hex(), settlementID.Hex()) + } + if settlementOf[settlementID] != settlementID { + return fmt.Errorf("private chain %s: chain %s is not a settlement chain; its %s override must be its own chain ID", chain.ID.Hex(), settlementID.Hex(), settlementChainIDKey) + } + if err := checkPrivateChainL1Config(intent, chain, intent.Chains[j]); err != nil { + return err + } + } + return nil +} + +// checkPrivateChainL1Config checks that a private chain configures its L1 contracts as its +// settlement chain does. op-deployer deploys no L1 contracts for the private chain, so any other +// value would never reach L1. The chain's own values, such as its batcher, gas limit, EIP-1559 +// and operator fee parameters, start block and genesis time, are left alone. +func checkPrivateChainL1Config(intent *state.Intent, chain *state.ChainIntent, settlement *state.ChainIntent) error { + if chain.DangerousAltDAConfig.UseAltDA || len(chain.AdditionalDisputeGames) > 0 { + return fmt.Errorf("%w: private chain %s: alt-DA and additional dispute games must be unset; the chain shares its settlement chain's L1 contracts", state.ErrIncompatibleValue, chain.ID.Hex()) + } + + mismatch := func(field string) error { + return fmt.Errorf("%w: private chain %s: %s must equal that of settlement chain %s, whose L1 contracts it shares", state.ErrIncompatibleValue, chain.ID.Hex(), field, settlement.ID.Hex()) + } + roles := []struct { + name string + chain, settlement common.Address + }{ + {"roles.l1ProxyAdminOwner", chain.Roles.L1ProxyAdminOwner, settlement.Roles.L1ProxyAdminOwner}, + {"roles.systemConfigOwner", chain.Roles.SystemConfigOwner, settlement.Roles.SystemConfigOwner}, + {"roles.proposer", chain.Roles.Proposer, settlement.Roles.Proposer}, + {"roles.challenger", chain.Roles.Challenger, settlement.Roles.Challenger}, + } + for _, role := range roles { + if role.chain != role.settlement { + return mismatch(role.name) + } + } + if !reflect.DeepEqual(chain.CustomGasToken, settlement.CustomGasToken) { + return mismatch("customGasToken") + } + + chainProofParams, err := ResolveChainProofParams(intent, chain) + if err != nil { + return fmt.Errorf("private chain %s: failed to resolve dispute params: %w", chain.ID.Hex(), err) + } + settlementProofParams, err := ResolveChainProofParams(intent, settlement) + if err != nil { + return fmt.Errorf("settlement chain %s: failed to resolve dispute params: %w", settlement.ID.Hex(), err) + } + if chainProofParams != settlementProofParams { + return mismatch("the dispute game deploy overrides") + } + return nil +} + +// checkSettlementChainIDsUnchanged refuses a change of an applied chain's settlementChainId. The +// chain's L2 genesis records the value and is not generated again. +func checkSettlementChainIDsUnchanged(intent *state.Intent, st *state.State) error { + if st.AppliedIntent == nil { + return nil + } + for _, chain := range intent.Chains { + applied, err := st.AppliedIntent.Chain(chain.ID) + if err != nil || !st.IsChainDeployed(chain.ID) { + continue + } + was, err := SettlementChainIDOverride(st.AppliedIntent, applied) + if err != nil { + return fmt.Errorf("applied intent: %w", err) + } + is, err := SettlementChainIDOverride(intent, chain) + if err != nil { + return err + } + if was != is { + return fmt.Errorf("chain %s: %s changed from %d to %d after apply; the chain's L2 genesis records it and is not generated again", chain.ID.Hex(), settlementChainIDKey, was, is) + } + } + return nil +} + +// reuseSettlementContracts records the settlement chain's L1 contracts as the private chain's. +func reuseSettlementContracts(st *state.State, chainID common.Hash, settlementID common.Hash) error { + if !st.IsChainDeployed(settlementID) { + return fmt.Errorf("settlement chain %s of private chain %s is not deployed", settlementID.Hex(), chainID.Hex()) + } + settlement, err := st.Chain(settlementID) + if err != nil { + return err + } + st.SetChainContracts(chainID, settlement.OpChainContracts, true) + return nil +} diff --git a/op-deployer/pkg/deployer/pipeline/settlement_test.go b/op-deployer/pkg/deployer/pipeline/settlement_test.go new file mode 100644 index 00000000000..882f7868c0b --- /dev/null +++ b/op-deployer/pkg/deployer/pipeline/settlement_test.go @@ -0,0 +1,193 @@ +package pipeline + +import ( + "log/slog" + "math/big" + "testing" + + "github.com/ethereum-optimism/optimism/op-chain-ops/addresses" + "github.com/ethereum-optimism/optimism/op-core/devfeatures" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/artifacts" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/state" + "github.com/ethereum-optimism/optimism/op-service/testlog" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/common/hexutil" + "github.com/stretchr/testify/require" +) + +var ( + settlementID = common.BigToHash(big.NewInt(901)) + privateID = common.BigToHash(big.NewInt(902)) + publicID = common.BigToHash(big.NewInt(903)) +) + +// settlementGroupIntent returns an intent with a settlement chain, one of its private chains and +// a public chain, with the OP_PRIVATE dev feature. +func settlementGroupIntent() *state.Intent { + return &state.Intent{ + L1ContractsLocator: &artifacts.Locator{}, + GlobalDeployOverrides: map[string]any{ + "devFeatureBitmap": devfeatures.EnableDevFeature(common.Hash{}, devfeatures.OPPrivateFlag), + }, + Chains: []*state.ChainIntent{ + {ID: settlementID, DeployOverrides: map[string]any{"settlementChainId": 901}}, + {ID: privateID, DeployOverrides: map[string]any{"settlementChainId": 901}}, + {ID: publicID}, + }, + } +} + +func TestSettlementChainIDOverride_Accessor(t *testing.T) { + intent := settlementGroupIntent() + for i, want := range []uint64{901, 901, 0} { + id, err := SettlementChainIDOverride(intent, intent.Chains[i]) + require.NoError(t, err) + require.Equal(t, want, id) + } + + intent.Chains[2].DeployOverrides = map[string]any{"settlementChainId": 0} + _, private, err := PrivateChainSettlement(intent, intent.Chains[2]) + require.NoError(t, err) + require.False(t, private, "a per-chain 0 is a public chain") + require.NoError(t, checkSettlementGroups(intent)) + + intent.GlobalDeployOverrides["SettlementChainId"] = 901 + _, err = SettlementChainIDOverride(intent, intent.Chains[2]) + require.ErrorContains(t, err, `globalDeployOverrides key "SettlementChainId" is not allowed`) + _, _, err = calculateL2GenesisOverrides(intent, intent.Chains[2]) + require.ErrorContains(t, err, "is not allowed", "L2 genesis reads the override through the same accessor") +} + +func TestPrivateChainSettlement(t *testing.T) { + intent := settlementGroupIntent() + for i, want := range []bool{false, true, false} { + id, private, err := PrivateChainSettlement(intent, intent.Chains[i]) + require.NoError(t, err) + require.Equal(t, want, private, "chain %s", intent.Chains[i].ID.Hex()) + if private { + require.Equal(t, settlementID, id) + } + } +} + +func TestCheckSettlementGroups(t *testing.T) { + require.NoError(t, checkSettlementGroups(settlementGroupIntent())) + + tests := []struct { + name string + mutate func(*state.Intent) + err string + }{ + {"without OP_PRIVATE", func(in *state.Intent) { + delete(in.GlobalDeployOverrides, "devFeatureBitmap") + }, "needs the OP_PRIVATE dev feature"}, + {"global override", func(in *state.Intent) { + in.GlobalDeployOverrides["settlementChainId"] = 901 + }, `globalDeployOverrides key "settlementChainId" is not allowed`}, + {"settlement chain missing", func(in *state.Intent) { + in.Chains = in.Chains[1:] + }, "settlement chain " + settlementID.Hex() + " must be in the same intent"}, + {"settlement chain after its private chain", func(in *state.Intent) { + in.Chains[0], in.Chains[1] = in.Chains[1], in.Chains[0] + }, "settlement chain " + settlementID.Hex() + " must come before it"}, + {"settlement chain without its own override", func(in *state.Intent) { + in.Chains[0].DeployOverrides = nil + }, "chain " + settlementID.Hex() + " is not a settlement chain"}, + {"settlement chain is itself private", func(in *state.Intent) { + in.Chains[2].DeployOverrides = map[string]any{"settlementChainId": 903} + in.Chains[0].DeployOverrides["settlementChainId"] = 903 + in.Chains = []*state.ChainIntent{in.Chains[2], in.Chains[0], in.Chains[1]} + }, "chain " + settlementID.Hex() + " is not a settlement chain"}, + {"private chain with alt-DA", func(in *state.Intent) { + in.Chains[1].DangerousAltDAConfig.UseAltDA = true + }, "alt-DA and additional dispute games must be unset"}, + {"private chain with another L1 ProxyAdmin owner", func(in *state.Intent) { + in.Chains[1].Roles.L1ProxyAdminOwner = common.Address{1} + }, "roles.l1ProxyAdminOwner must equal that of settlement chain"}, + {"private chain with another SystemConfig owner", func(in *state.Intent) { + in.Chains[1].Roles.SystemConfigOwner = common.Address{1} + }, "roles.systemConfigOwner must equal that of settlement chain"}, + {"private chain with another proposer", func(in *state.Intent) { + in.Chains[1].Roles.Proposer = common.Address{1} + }, "roles.proposer must equal that of settlement chain"}, + {"private chain with another challenger", func(in *state.Intent) { + in.Chains[1].Roles.Challenger = common.Address{1} + }, "roles.challenger must equal that of settlement chain"}, + {"private chain with a custom gas token", func(in *state.Intent) { + in.Chains[1].CustomGasToken = state.CustomGasToken{Name: "Gas", Symbol: "GAS", InitialLiquidity: (*hexutil.Big)(big.NewInt(1))} + }, "customGasToken must equal that of settlement chain"}, + {"private chain with other dispute params", func(in *state.Intent) { + in.Chains[1].DeployOverrides["proofMaturityDelaySeconds"] = 1 + }, "the dispute game deploy overrides must equal that of settlement chain"}, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + intent := settlementGroupIntent() + tt.mutate(intent) + require.ErrorContains(t, checkSettlementGroups(intent), tt.err) + }) + } + + t.Run("L2 values are the private chain's own", func(t *testing.T) { + intent := settlementGroupIntent() + intent.Chains[1].Roles.Batcher = common.Address{1} + intent.Chains[1].Roles.UnsafeBlockSigner = common.Address{2} + intent.Chains[1].GasLimit = 1 + intent.Chains[1].Eip1559Elasticity = 1 + intent.Chains[1].OperatorFeeScalar = 1 + require.NoError(t, checkSettlementGroups(intent)) + }) + + t.Run("each chain of a group sets its own start", func(t *testing.T) { + intent := settlementGroupIntent() + intent.Chains[0].L1StartBlockHash = &common.Hash{1} + intent.Chains[0].DeployOverrides["l1StartingBlockTag"] = "latest" + intent.Chains[1].L1StartBlockHash = &common.Hash{2} + intent.Chains[1].DeployOverrides["l2GenesisBlockTimestamp"] = "0x1" + require.NoError(t, checkSettlementGroups(intent)) + }) + + t.Run("a bitmap read back from intent.toml", func(t *testing.T) { + intent := settlementGroupIntent() + intent.GlobalDeployOverrides["devFeatureBitmap"] = devfeatures.EnableDevFeature(common.Hash{}, devfeatures.OPPrivateFlag).Hex() + require.NoError(t, checkSettlementGroups(intent)) + }) +} + +func TestCheckSettlementChainIDsUnchanged(t *testing.T) { + applied := settlementGroupIntent() + applied.Chains[0].DeployOverrides = nil + applied.Chains = applied.Chains[:1] + st := &state.State{AppliedIntent: applied} + st.SetChainContracts(settlementID, addresses.OpChainContracts{}, true) + + unchanged := settlementGroupIntent() + unchanged.Chains[0].DeployOverrides = nil + require.NoError(t, checkSettlementChainIDsUnchanged(unchanged, st)) + + promoted := settlementGroupIntent() + require.ErrorContains(t, checkSettlementChainIDsUnchanged(promoted, st), + "chain "+settlementID.Hex()+": settlementChainId changed from 0 to 901 after apply") + + st.SetChainContracts(settlementID, addresses.OpChainContracts{}, false) + require.NoError(t, checkSettlementChainIDsUnchanged(promoted, st), "an undeployed chain may change") +} + +func TestDeployOPChainReusesSettlementContracts(t *testing.T) { + intent := settlementGroupIntent() + env := &Env{Logger: testlog.Logger(t, slog.LevelInfo)} + st := &state.State{} + + require.ErrorContains(t, DeployOPChain(env, intent, st, privateID), "settlement chain "+settlementID.Hex()+" of private chain "+privateID.Hex()+" is not deployed") + + contracts := addresses.OpChainContracts{} + contracts.OptimismPortalProxy = common.HexToAddress("0xaa") + contracts.SystemConfigProxy = common.HexToAddress("0xbb") + st.SetChainContracts(settlementID, contracts, true) + + require.NoError(t, DeployOPChain(env, intent, st, privateID)) + require.True(t, st.IsChainDeployed(privateID)) + private, err := st.Chain(privateID) + require.NoError(t, err) + require.Equal(t, contracts, private.OpChainContracts) +} diff --git a/op-deployer/pkg/deployer/prepare.go b/op-deployer/pkg/deployer/prepare.go index c952018b125..1e1bfb253fc 100644 --- a/op-deployer/pkg/deployer/prepare.go +++ b/op-deployer/pkg/deployer/prepare.go @@ -115,6 +115,9 @@ func Prepare(ctx context.Context, cfg PrepareConfig) error { if err := pipeline.ValidateInputs(intent, st); err != nil { return err } + if err := checkNoPrivateChains(intent); err != nil { + return err + } // A state produced by the apply pipeline MUST NOT be prepared. if err := st.CheckNotApplied(); err != nil { @@ -523,6 +526,21 @@ func checkReservedOverrides(intent *state.Intent, st *state.State) error { return nil } +// checkNoPrivateChains refuses OP Private private chains, which prepare does not support yet. +// TODO(#23980): support private chains in prepare. +func checkNoPrivateChains(intent *state.Intent) error { + for _, chain := range intent.Chains { + _, private, err := pipeline.PrivateChainSettlement(intent, chain) + if err != nil { + return err + } + if private { + return fmt.Errorf("private chain %s: prepare does not support OP Private private chains; use apply", chain.ID.Hex()) + } + } + return nil +} + // pinnedAnchorState returns the chain's state when a prior prepare run committed both // its anchor block and genesis time, and nil otherwise. func pinnedAnchorState(st *state.State, id common.Hash) *state.ChainState { diff --git a/op-deployer/pkg/deployer/prepare_settlement_test.go b/op-deployer/pkg/deployer/prepare_settlement_test.go new file mode 100644 index 00000000000..f011058279d --- /dev/null +++ b/op-deployer/pkg/deployer/prepare_settlement_test.go @@ -0,0 +1,47 @@ +package deployer + +import ( + "context" + "log/slog" + "math/big" + "path/filepath" + "testing" + + "github.com/ethereum-optimism/optimism/op-core/devfeatures" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/integration_test/shared" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/standard" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/testutil" + "github.com/ethereum-optimism/optimism/op-service/testlog" + "github.com/ethereum/go-ethereum/common" + "github.com/holiman/uint256" + "github.com/stretchr/testify/require" +) + +// TestPrepare_RejectsPrivateChains checks that prepare refuses an intent with an OP Private +// private chain, read back from intent.toml. +func TestPrepare_RejectsPrivateChains(t *testing.T) { + _, _, dk := shared.DefaultPrivkey(t) + l1ChainID := big.NewInt(900) + loc, _ := testutil.LocalArtifacts(t) + + intent, st := shared.NewIntent(t, l1ChainID, dk, uint256.NewInt(1), loc, loc, standard.GasLimit) + intent.GlobalDeployOverrides = map[string]any{ + "devFeatureBitmap": devfeatures.EnableDevFeature(common.Hash{}, devfeatures.OPPrivateFlag), + } + intent.Chains[0].DeployOverrides = map[string]any{"settlementChainId": 1} + private := shared.NewChainIntent(t, dk, l1ChainID, uint256.NewInt(2), standard.GasLimit) + private.DeployOverrides = map[string]any{"settlementChainId": 1} + intent.Chains = append(intent.Chains, private) + + workdir := t.TempDir() + require.NoError(t, intent.WriteToFile(filepath.Join(workdir, "intent.toml"))) + require.NoError(t, st.WriteToFile(filepath.Join(workdir, "state.json"))) + + err := Prepare(context.Background(), PrepareConfig{ + Workdir: workdir, + Logger: testlog.Logger(t, slog.LevelWarn), + PrivateKey: testPrivKey, + L1RPCUrl: testL1RPCUrl, + }) + require.ErrorContains(t, err, "private chain "+private.ID.Hex()+": prepare does not support OP Private private chains") +} diff --git a/op-deployer/pkg/deployer/validate/validate.go b/op-deployer/pkg/deployer/validate/validate.go index ac780cb66f0..7168e48e6fb 100644 --- a/op-deployer/pkg/deployer/validate/validate.go +++ b/op-deployer/pkg/deployer/validate/validate.go @@ -83,6 +83,14 @@ func ValidateAuto(cliCtx *cli.Context) error { for _, chain := range chainsToValidate { chainID := chain.ID + settlementID, private, err := pipeline.PrivateChainSettlement(st.AppliedIntent, chain) + if err != nil { + return err + } + if private { + logger.Info("Skipping private chain, it shares the L1 contracts of its settlement chain and is validated with it", "chain-id", chainID.Hex(), "settlement-chain-id", settlementID.Hex()) + continue + } logger.Info("Validating chain", "chain-id", chainID.Hex()) chainState, err := st.Chain(chainID) diff --git a/op-deployer/pkg/deployer/validate/validate_test.go b/op-deployer/pkg/deployer/validate/validate_test.go new file mode 100644 index 00000000000..327f1a012e5 --- /dev/null +++ b/op-deployer/pkg/deployer/validate/validate_test.go @@ -0,0 +1,45 @@ +package validate + +import ( + "bytes" + "math/big" + "path/filepath" + "testing" + + "github.com/ethereum-optimism/optimism/op-chain-ops/addresses" + "github.com/ethereum-optimism/optimism/op-core/devfeatures" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/state" + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + "github.com/urfave/cli/v2" +) + +func TestValidateAutoSkipsPrivateChains(t *testing.T) { + settlementID := common.BigToHash(big.NewInt(901)) + privateID := common.BigToHash(big.NewInt(902)) + st := &state.State{AppliedIntent: &state.Intent{ + GlobalDeployOverrides: map[string]any{ + "devFeatureBitmap": devfeatures.EnableDevFeature(common.Hash{}, devfeatures.OPPrivateFlag), + }, + Chains: []*state.ChainIntent{ + {ID: settlementID, DeployOverrides: map[string]any{"settlementChainId": 901}}, + {ID: privateID, DeployOverrides: map[string]any{"settlementChainId": 901}}, + }, + }} + st.SetChainContracts(settlementID, addresses.OpChainContracts{}, true) + st.SetChainContracts(privateID, addresses.OpChainContracts{}, true) + workdir := t.TempDir() + require.NoError(t, st.WriteToFile(filepath.Join(workdir, "state.json"))) + + // Without --fail, contracts the unreachable L1 cannot confirm are only warnings. + var out bytes.Buffer + app := cli.NewApp() + app.Writer = &out + app.Commands = Commands() + require.NoError(t, app.Run([]string{"op-deployer", "auto", "--l1-rpc-url", "http://127.0.0.1:1", "--workdir", workdir})) + + logs := out.String() + require.Contains(t, logs, `msg="Validating chain" chain-id=`+settlementID.Hex()) + require.NotContains(t, logs, `msg="Validating chain" chain-id=`+privateID.Hex()) + require.Contains(t, logs, `msg="Skipping private chain, it shares the L1 contracts of its settlement chain and is validated with it" chain-id=`+privateID.Hex()+` settlement-chain-id=`+settlementID.Hex()) +} diff --git a/op-deployer/pkg/deployer/verify/auto_verify.go b/op-deployer/pkg/deployer/verify/auto_verify.go index 3ac5edcb522..9d5bdbfb35d 100644 --- a/op-deployer/pkg/deployer/verify/auto_verify.go +++ b/op-deployer/pkg/deployer/verify/auto_verify.go @@ -24,7 +24,7 @@ func AutoVerify(ctx context.Context, logger log.Logger, rpcUrl string, chainID u return fmt.Errorf("failed to download artifacts: %w", err) } - bundle, err := GetBundleFromFile(stateFile) + bundle, err := GetBundleFromFile(logger, stateFile) if err != nil { return fmt.Errorf("failed to get contract bundle: %w", err) } diff --git a/op-deployer/pkg/deployer/verify/state_bundle.go b/op-deployer/pkg/deployer/verify/state_bundle.go index 5e37f48398e..fb1954d5352 100644 --- a/op-deployer/pkg/deployer/verify/state_bundle.go +++ b/op-deployer/pkg/deployer/verify/state_bundle.go @@ -7,11 +7,13 @@ import ( "reflect" "strings" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/pipeline" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/state" + "github.com/ethereum-optimism/optimism/op-service/log" "github.com/ethereum/go-ethereum/common" ) -func getContractBundleFromState(filepath string) (map[string]common.Address, error) { +func getContractBundleFromState(logger log.Logger, filepath string) (map[string]common.Address, error) { _, err := os.Stat(filepath) if err != nil { return nil, fmt.Errorf("input file not found: %s", filepath) @@ -42,6 +44,19 @@ func getContractBundleFromState(filepath string) (map[string]common.Address, err if chain.Deployed != nil && !*chain.Deployed { continue } + // A private chain's contracts are its settlement chain's, which are verified with it. + if st.AppliedIntent != nil { + if chainIntent, err := st.AppliedIntent.Chain(chain.ID); err == nil { + settlementID, private, err := pipeline.PrivateChainSettlement(st.AppliedIntent, chainIntent) + if err != nil { + return nil, err + } + if private { + logger.Info("Skipping private chain, it shares the L1 contracts of its settlement chain and is verified with it", "chain", chain.ID.Hex(), "settlement", settlementID.Hex()) + continue + } + } + } chainPrefix := fmt.Sprintf("opchain_%s", chain.ID.Hex()) addContractsFromStruct(chainPrefix, &chain.OpChainContracts, bundle) } @@ -113,9 +128,9 @@ func isStateFile(filepath string) bool { return st.SuperchainDeployment != nil || st.ImplementationsDeployment != nil || len(st.Chains) > 0 } -func GetBundleFromFile(filepath string) (map[string]common.Address, error) { +func GetBundleFromFile(logger log.Logger, filepath string) (map[string]common.Address, error) { if isStateFile(filepath) { - return getContractBundleFromState(filepath) + return getContractBundleFromState(logger, filepath) } return getContractBundle(filepath) diff --git a/op-deployer/pkg/deployer/verify/state_bundle_test.go b/op-deployer/pkg/deployer/verify/state_bundle_test.go new file mode 100644 index 00000000000..ab050ac6063 --- /dev/null +++ b/op-deployer/pkg/deployer/verify/state_bundle_test.go @@ -0,0 +1,52 @@ +package verify + +import ( + "log/slog" + "math/big" + "path/filepath" + "strings" + "testing" + + "github.com/ethereum-optimism/optimism/op-chain-ops/addresses" + "github.com/ethereum-optimism/optimism/op-core/devfeatures" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/state" + "github.com/ethereum-optimism/optimism/op-service/testlog" + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" +) + +func TestGetBundleFromFileSkipsPrivateChains(t *testing.T) { + settlementID := common.BigToHash(big.NewInt(901)) + privateID := common.BigToHash(big.NewInt(902)) + contracts := addresses.OpChainContracts{} + contracts.SystemConfigProxy = common.HexToAddress("0xaa") + contracts.OptimismPortalProxy = common.HexToAddress("0xbb") + + st := &state.State{AppliedIntent: &state.Intent{ + GlobalDeployOverrides: map[string]any{ + "devFeatureBitmap": devfeatures.EnableDevFeature(common.Hash{}, devfeatures.OPPrivateFlag), + }, + Chains: []*state.ChainIntent{ + {ID: settlementID, DeployOverrides: map[string]any{"settlementChainId": 901}}, + {ID: privateID, DeployOverrides: map[string]any{"settlementChainId": 901}}, + }, + }} + st.SetChainContracts(settlementID, contracts, true) + st.SetChainContracts(privateID, contracts, true) + stateFile := filepath.Join(t.TempDir(), "state.json") + require.NoError(t, st.WriteToFile(stateFile)) + + logger, logs := testlog.CaptureLogger(t, slog.LevelInfo) + bundle, err := GetBundleFromFile(logger, stateFile) + require.NoError(t, err) + + require.Equal(t, contracts.SystemConfigProxy, bundle["opchain_"+settlementID.Hex()+"_"+fieldNameToContractName("SystemConfigProxy")]) + for name := range bundle { + require.False(t, strings.HasPrefix(name, "opchain_"+privateID.Hex()), "private chain contract %s is verified with its settlement chain", name) + } + require.NotNil(t, logs.FindLog( + testlog.NewLevelFilter(slog.LevelInfo), + testlog.NewMessageContainsFilter("Skipping private chain"), + testlog.NewAttributesContainsFilter("chain", privateID.Hex()), + )) +} diff --git a/op-deployer/pkg/deployer/verify/verifier.go b/op-deployer/pkg/deployer/verify/verifier.go index c0fadab6019..1837a698eee 100644 --- a/op-deployer/pkg/deployer/verify/verifier.go +++ b/op-deployer/pkg/deployer/verify/verifier.go @@ -119,7 +119,7 @@ func VerifyCLI(cliCtx *cli.Context) error { } l.Info("Downloaded artifacts") - bundle, err := GetBundleFromFile(inputFile) + bundle, err := GetBundleFromFile(l, inputFile) if err != nil { return fmt.Errorf("failed to retrieve bundle: %w", err) } From fa3efe5b49ecc42007dfd4fcb79bd5d70f78f98f Mon Sep 17 00:00:00 2001 From: Karl Floersch <karl@oplabs.co> Date: Fri, 6 Nov 2026 22:05:21 +0000 Subject: [PATCH 15/21] op-node,op-deployer,kona: add settlement_chain_id to the rollup config (#23958) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --- op-chain-ops/genesis/config.go | 4 +++ .../l2_genesis_allocs_oracle_test.go | 7 +++++ .../pkg/deployer/state/deploy_config_test.go | 8 ++++++ op-node/rollup/types.go | 3 +++ op-node/rollup/types_test.go | 17 ++++++++++++ op-node/superchain/superchain_test.go | 6 +++++ .../protocol/genesis/src/chain/config.rs | 1 + .../crates/protocol/genesis/src/rollup.rs | 26 +++++++++++++++++++ .../registry/src/test_utils/op_mainnet.rs | 1 + .../registry/src/test_utils/op_sepolia.rs | 1 + 10 files changed, 74 insertions(+) diff --git a/op-chain-ops/genesis/config.go b/op-chain-ops/genesis/config.go index 3fc2eabc88b..8ec347e9388 100644 --- a/op-chain-ops/genesis/config.go +++ b/op-chain-ops/genesis/config.go @@ -718,6 +718,9 @@ type L2CoreDeployConfig struct { // from. It is an override to set this value on legacy networks where it is not set by // default. It can be removed once all networks have this value set in their storage. SystemConfigStartBlock uint64 `json:"systemConfigStartBlock"` + + // SettlementChainID is written into the ChainConfig predeploy and the rollup config. + SettlementChainID uint64 `json:"settlementChainId,omitempty"` } var _ ConfigChecker = (*L2CoreDeployConfig)(nil) @@ -1184,6 +1187,7 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *eth.BlockRef, l2GenesisBlockHa KeepKarstUpgradeGas: d.KeepKarstUpgradeGas, AltDAConfig: altDA, ChainOpConfig: chainOpConfig, + SettlementChainID: d.SettlementChainID, }, nil } diff --git a/op-deployer/pkg/deployer/integration_test/l2_genesis_allocs_oracle_test.go b/op-deployer/pkg/deployer/integration_test/l2_genesis_allocs_oracle_test.go index 20ebe10856b..667f4f9400c 100644 --- a/op-deployer/pkg/deployer/integration_test/l2_genesis_allocs_oracle_test.go +++ b/op-deployer/pkg/deployer/integration_test/l2_genesis_allocs_oracle_test.go @@ -12,11 +12,13 @@ import ( "github.com/ethereum-optimism/optimism/op-core/devfeatures" "github.com/ethereum-optimism/optimism/op-core/predeploys" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer" + "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/inspect" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/integration_test/shared" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/pipeline" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/state" "github.com/ethereum-optimism/optimism/op-deployer/pkg/deployer/testutil" op_e2e "github.com/ethereum-optimism/optimism/op-e2e" + "github.com/ethereum-optimism/optimism/op-node/rollup" "github.com/ethereum-optimism/optimism/op-service/testlog" "github.com/ethereum-optimism/optimism/op-service/testutils" "github.com/ethereum/go-ethereum/common" @@ -51,6 +53,7 @@ type generatedL2Genesis struct { mode allocMode allocs types.GenesisAlloc cfg genesis.DeployConfig + rollupCfg *rollup.Config chainIntent *state.ChainIntent } @@ -169,11 +172,14 @@ func generateL2Genesis(t *testing.T, mode allocMode) generatedL2Genesis { cfg, err := state.CombineDeployConfig(intent, chainIntent, st, chainState) require.NoError(t, err) + _, rollupCfg, err := inspect.GenesisAndRollup(st, chainIntent.ID) + require.NoError(t, err) return generatedL2Genesis{ mode: mode, allocs: chainState.Allocs.Data.Accounts, cfg: cfg, + rollupCfg: rollupCfg, chainIntent: chainIntent, } } @@ -348,6 +354,7 @@ func assertProxyConfig(t *testing.T, gen generatedL2Genesis) { assertUintSlot(t, gen, predeploys.ChainConfigAddr, settlementChainIDSlot, new(big.Int).SetUint64(gen.mode.settlementChainID)) } + require.Equal(t, gen.mode.settlementChainID, gen.rollupCfg.SettlementChainID, "rollup config settlement chain ID") if gen.mode.customGasToken { assertAddressSlot(t, gen, predeploys.LiquidityControllerAddr, slot(51), gasToken.LiquidityControllerOwner) diff --git a/op-deployer/pkg/deployer/state/deploy_config_test.go b/op-deployer/pkg/deployer/state/deploy_config_test.go index 862f57cbf56..32621ebdb2e 100644 --- a/op-deployer/pkg/deployer/state/deploy_config_test.go +++ b/op-deployer/pkg/deployer/state/deploy_config_test.go @@ -70,6 +70,14 @@ func TestCombineDeployConfig(t *testing.T) { require.Equal(t, *out.L2InitializationConfig.UpgradeScheduleDeployConfig.L2GenesisLagoonTimeOffset, hexutil.Uint64(7)) } +func TestCombineDeployConfig_SettlementChainID(t *testing.T) { + intent, chainIntent, state, chainState := newCombineFixture() + chainIntent.DeployOverrides = map[string]any{"settlementChainId": 1337} + out, err := CombineDeployConfig(&intent, &chainIntent, &state, &chainState) + require.NoError(t, err) + require.Equal(t, uint64(1337), out.SettlementChainID) +} + func TestCombineDeployConfig_ProofDelays(t *testing.T) { t.Run("defaults", func(t *testing.T) { intent, chainIntent, state, chainState := newCombineFixture() diff --git a/op-node/rollup/types.go b/op-node/rollup/types.go index ca984c54f68..1a4593c14da 100644 --- a/op-node/rollup/types.go +++ b/op-node/rollup/types.go @@ -192,6 +192,9 @@ type Config struct { // This feature (de)activates by L1 origin timestamp, to keep a consistent L1 block info per L2 // epoch. PectraBlobScheduleTime *uint64 `json:"pectra_blob_schedule_time,omitempty"` + + // SettlementChainID is the OP Private settlement chain ID: 0 if public, own ID if a settlement chain, else its settlement chain's ID. + SettlementChainID uint64 `json:"settlement_chain_id,omitempty"` } // ValidateL1Config checks L1 config variables for errors. diff --git a/op-node/rollup/types_test.go b/op-node/rollup/types_test.go index 38aac389b4c..e68c265b08c 100644 --- a/op-node/rollup/types_test.go +++ b/op-node/rollup/types_test.go @@ -1,6 +1,7 @@ package rollup import ( + "bytes" "context" "encoding/json" "errors" @@ -76,6 +77,22 @@ func TestConfigJSON(t *testing.T) { assert.Equal(t, &roundTripped, config) } +func TestConfigSettlementChainIDJSON(t *testing.T) { + config := randConfig() + data, err := json.Marshal(config) + require.NoError(t, err) + require.NotContains(t, string(data), "settlement_chain_id", "omitted on a public chain") + + config.SettlementChainID = 1337 + data, err = json.Marshal(config) + require.NoError(t, err) + dec := json.NewDecoder(bytes.NewReader(data)) + dec.DisallowUnknownFields() + var decoded Config + require.NoError(t, dec.Decode(&decoded)) + require.Equal(t, uint64(1337), decoded.SettlementChainID) +} + func TestAltDAConfigMaxInputSize(t *testing.T) { custom := uint64(1_000_000) diff --git a/op-node/superchain/superchain_test.go b/op-node/superchain/superchain_test.go index ca6f625e549..4361d324ea9 100644 --- a/op-node/superchain/superchain_test.go +++ b/op-node/superchain/superchain_test.go @@ -111,9 +111,15 @@ func TestRollupConfigFromRegistry(t *testing.T) { func TestRollupConfigFromRegistry_AllFieldsSet(t *testing.T) { cfg := rollupConfigFromRegistry(fullyPopulatedChainConfig(), registry.Superchain{L1: registry.L1Config{ChainID: 1}}) + // TODO(superchain-registry#1401): the registry has no settlement chain ID yet. + notFromRegistry := map[string]bool{"SettlementChainID": true} + v := reflect.ValueOf(*cfg) typ := v.Type() for i := 0; i < v.NumField(); i++ { + if notFromRegistry[typ.Field(i).Name] { + continue + } require.Falsef(t, v.Field(i).IsZero(), "rollup Config field %q is zero after conversion: map it in rollupConfigFromRegistry, and "+ "make sure fullyPopulatedChainConfig provides its source", typ.Field(i).Name) diff --git a/rust/kona/crates/protocol/genesis/src/chain/config.rs b/rust/kona/crates/protocol/genesis/src/chain/config.rs index 1361289cff4..409a8dbcc0f 100644 --- a/rust/kona/crates/protocol/genesis/src/chain/config.rs +++ b/rust/kona/crates/protocol/genesis/src/chain/config.rs @@ -186,6 +186,7 @@ impl ChainConfig { #[cfg(feature = "rollup_config_override")] fjord_max_sequencer_drift: FJORD_MAX_SEQUENCER_DRIFT, chain_op_config: self.base_fee_config(), + settlement_chain_id: 0, alt_da_config: self.alt_da.clone(), } } diff --git a/rust/kona/crates/protocol/genesis/src/rollup.rs b/rust/kona/crates/protocol/genesis/src/rollup.rs index 3d2e8547fdc..c33d991528f 100644 --- a/rust/kona/crates/protocol/genesis/src/rollup.rs +++ b/rust/kona/crates/protocol/genesis/src/rollup.rs @@ -91,6 +91,15 @@ pub struct RollupConfig { /// `chain_op_config` is the chain-specific EIP1559 config for the rollup. #[cfg_attr(feature = "serde", serde(default = "BaseFeeConfig::optimism"))] pub chain_op_config: BaseFeeConfig, + /// OP Private settlement chain ID: 0 if public, own ID if a settlement chain, else its + /// settlement chain's ID. + #[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "is_zero"))] + pub settlement_chain_id: u64, +} + +#[cfg(feature = "serde")] +const fn is_zero(v: &u64) -> bool { + *v == 0 } #[cfg(feature = "arbitrary")] @@ -125,6 +134,7 @@ impl<'a> arbitrary::Arbitrary<'a> for RollupConfig { da_challenge_address: Option::<Address>::arbitrary(u)?, chain_op_config, alt_da_config: Option::<AltDAConfig>::arbitrary(u)?, + settlement_chain_id: u.arbitrary()?, }) } } @@ -152,6 +162,7 @@ impl Default for RollupConfig { da_challenge_address: None, alt_da_config: None, chain_op_config: OP_MAINNET_BASE_FEE_CONFIG, + settlement_chain_id: 0, } } } @@ -875,6 +886,20 @@ mod tests { assert_eq!(config.max_sequencer_drift(10), FJORD_MAX_SEQUENCER_DRIFT); } + #[test] + #[cfg(feature = "serde")] + fn test_settlement_chain_id_serde() { + let config = RollupConfig { settlement_chain_id: 1337, ..Default::default() }; + let json = serde_json::to_value(&config).unwrap(); + assert_eq!(json["settlement_chain_id"], 1337); + assert_eq!(serde_json::from_value::<RollupConfig>(json).unwrap(), config); + + // A public chain omits the field, and an absent field reads as 0. + let json = serde_json::to_value(RollupConfig::default()).unwrap(); + assert!(json.get("settlement_chain_id").is_none()); + assert_eq!(serde_json::from_value::<RollupConfig>(json).unwrap().settlement_chain_id, 0); + } + fn expected_rollup_config() -> RollupConfig { use crate::{OP_MAINNET_BASE_FEE_CONFIG, SystemConfig}; RollupConfig { @@ -928,6 +953,7 @@ mod tests { da_challenge_address: None, chain_op_config: OP_MAINNET_BASE_FEE_CONFIG, alt_da_config: None, + settlement_chain_id: 0, } } diff --git a/rust/kona/crates/protocol/registry/src/test_utils/op_mainnet.rs b/rust/kona/crates/protocol/registry/src/test_utils/op_mainnet.rs index 6f158dea960..f58649648d6 100644 --- a/rust/kona/crates/protocol/registry/src/test_utils/op_mainnet.rs +++ b/rust/kona/crates/protocol/registry/src/test_utils/op_mainnet.rs @@ -51,6 +51,7 @@ pub const OP_MAINNET_CONFIG: RollupConfig = RollupConfig { l1_chain_id: 1_u64, l2_chain_id: Chain::optimism_mainnet(), chain_op_config: OP_MAINNET_BASE_FEE_CONFIG, + settlement_chain_id: 0, alt_da_config: None, hardforks: HardForkConfig { regolith_time: None, diff --git a/rust/kona/crates/protocol/registry/src/test_utils/op_sepolia.rs b/rust/kona/crates/protocol/registry/src/test_utils/op_sepolia.rs index 89f6ac5d853..e36c75aec75 100644 --- a/rust/kona/crates/protocol/registry/src/test_utils/op_sepolia.rs +++ b/rust/kona/crates/protocol/registry/src/test_utils/op_sepolia.rs @@ -51,6 +51,7 @@ pub const OP_SEPOLIA_CONFIG: RollupConfig = RollupConfig { l1_chain_id: 11155111, l2_chain_id: Chain::optimism_sepolia(), chain_op_config: OP_SEPOLIA_BASE_FEE_CONFIG, + settlement_chain_id: 0, alt_da_config: None, hardforks: HardForkConfig { regolith_time: None, From 0fb0ffb8e82852f851d82bb428c7a7053a90cc9b Mon Sep 17 00:00:00 2001 From: Matt Solomon <matt@mattsolomon.dev> Date: Sun, 8 Nov 2026 21:47:06 +0000 Subject: [PATCH 16/21] ci: run 32 fault-proof tests at once in op-e2e-cannon-tests (#23985) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --- .circleci/continue/main.yml | 9 +++++++++ justfile | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.circleci/continue/main.yml b/.circleci/continue/main.yml index 11b7490c25e..b211afe681c 100644 --- a/.circleci/continue/main.yml +++ b/.circleci/continue/main.yml @@ -2001,6 +2001,11 @@ jobs: <<parameters.environment_overrides>> export TEST_TIMEOUT=<<parameters.test_timeout>> just go-tests-fraud-proofs-ci + # memory.events counts OOM kills, which can otherwise look like flaky tests. + - run: + name: Memory summary + when: always + command: grep -H . /sys/fs/cgroup/memory.{events,pressure} || true - go-save-cache: namespace: go-tests-with-fault-proof-deps - store_test_results: @@ -2791,6 +2796,10 @@ workflows: no_output_timeout: 90m test_timeout: 480m resource_class: 2xlarge.gen2 + # The tests mostly wait, so memory is the limit: 32 at once peaked at about 23.5 of 32 GiB. + # Lower this if the memory summary shows OOM kills. OP_E2E_EXECUTOR_LIMIT has to match, or + # the cannon tests stay capped at 16. + environment_overrides: export FAULT_PROOF_TEST_PARALLEL=32 OP_E2E_EXECUTOR_LIMIT=32 context: - slack - circleci-repo-readonly-authenticated-github-token diff --git a/justfile b/justfile index 22e08c7b4b1..0e7a6bee8be 100644 --- a/justfile +++ b/justfile @@ -435,7 +435,7 @@ go-tests-fraud-proofs-ci: export OP_E2E_CANNON_ENABLED="true" export OP_E2E_USE_HTTP=true export ENABLE_ANVIL=true - export PARALLEL=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4) + export PARALLEL=${FAULT_PROOF_TEST_PARALLEL:-$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)} export OP_TESTLOG_FILE_LOGGER_OUTDIR=$(realpath ./tmp/testlogs) source ./ops/scripts/source-ci-archive-rpcs.sh export NAT_INTEROP_LOADTEST_TARGET=10 From 34625bbcb656935c0b86c2cf2ba909210318a77e Mon Sep 17 00:00:00 2001 From: Teddy Knox <teddy@oplabs.co> Date: Sun, 8 Nov 2026 22:05:51 +0000 Subject: [PATCH 17/21] kona-gossip: make block timestamp bound tests clock-safe (#23981) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> --- rust/kona/crates/node/gossip/src/block_validity.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust/kona/crates/node/gossip/src/block_validity.rs b/rust/kona/crates/node/gossip/src/block_validity.rs index b70eead0cf4..82e4a5785c9 100644 --- a/rust/kona/crates/node/gossip/src/block_validity.rs +++ b/rust/kona/crates/node/gossip/src/block_validity.rs @@ -468,7 +468,11 @@ pub(crate) mod tests { #[test] fn test_block_invalid_timestamp_too_far() { let mut block = v1_valid_block(); - block.header.timestamp += 6; + // The block is built at wall-clock second `t`, and `block_valid` reads the clock again, + // so it may read `t + 1` or later. The bound is `current + 5`. An offset of 6 is accepted + // if one second boundary passes between the two reads, so use 10: the test fails only if + // more than 4 seconds pass. + block.header.timestamp += 10; let envelope = v1_envelope(&block); assert!(matches!( From 969931cdf14fc219598f0aa44d869e718236df7f Mon Sep 17 00:00:00 2001 From: George Knee <georgeknee@googlemail.com> Date: Mon, 9 Nov 2026 10:51:20 +0000 Subject: [PATCH 18/21] op-reth: test that pool admission and the payload builder agree (#23994) Co-authored-by: Akosh Farkash <aakoshh@gmail.com> --- rust/Cargo.lock | 4 + rust/op-reth/crates/evm/src/l1.rs | 2 +- rust/op-reth/crates/node/src/node.rs | 30 +- rust/op-reth/crates/node/tests/it/main.rs | 2 + .../crates/node/tests/it/pool_limits.rs | 95 +++ rust/op-reth/crates/payload/Cargo.toml | 4 + rust/op-reth/crates/payload/src/builder.rs | 12 +- .../payload/src/builder/admission_tests.rs | 790 ++++++++++++++++++ .../crates/payload/src/builder/tests.rs | 2 +- rust/op-reth/crates/payload/src/config.rs | 31 +- rust/op-reth/crates/txpool/Cargo.toml | 1 + .../crates/txpool/src/estimated_da_size.rs | 89 ++ rust/op-reth/crates/txpool/src/lib.rs | 2 +- rust/op-reth/crates/txpool/src/validator.rs | 379 +++++++++ 14 files changed, 1400 insertions(+), 43 deletions(-) create mode 100644 rust/op-reth/crates/node/tests/it/pool_limits.rs create mode 100644 rust/op-reth/crates/payload/src/builder/admission_tests.rs diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 218d6b423b6..e49d47d4f05 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -14122,6 +14122,7 @@ dependencies = [ "op-alloy-consensus", "op-alloy-rpc-types-engine", "op-revm", + "proptest", "reth-basic-payload-builder", "reth-chainspec", "reth-evm", @@ -14138,6 +14139,7 @@ dependencies = [ "reth-payload-util", "reth-payload-validator", "reth-primitives-traits", + "reth-provider", "reth-revm", "reth-storage-api", "reth-transaction-pool", @@ -14146,6 +14148,7 @@ dependencies = [ "serde", "sha2 0.10.9", "thiserror 2.0.18", + "tokio", "tracing", ] @@ -14356,6 +14359,7 @@ dependencies = [ "op-alloy-rpc-types", "op-revm", "parking_lot", + "proptest", "reth-chain-state", "reth-chainspec", "reth-eth-wire-types", diff --git a/rust/op-reth/crates/evm/src/l1.rs b/rust/op-reth/crates/evm/src/l1.rs index ea34b9a77ce..bf7ebe4209a 100644 --- a/rust/op-reth/crates/evm/src/l1.rs +++ b/rust/op-reth/crates/evm/src/l1.rs @@ -16,7 +16,7 @@ const L1_BLOCK_ISTHMUS_SELECTOR: [u8; 4] = hex!("098999be"); /// The function selector of the "setL1BlockValuesJovian" function in the `L1Block` contract. /// This is the first 4 bytes of `keccak256("setL1BlockValuesJovian()")`. -const L1_BLOCK_JOVIAN_SELECTOR: [u8; 4] = hex!("3db6be2b"); +pub const L1_BLOCK_JOVIAN_SELECTOR: [u8; 4] = hex!("3db6be2b"); /// Extracts the [`L1BlockInfo`] from the L2 block. The L1 info transaction is always the first /// transaction in the L2 block. diff --git a/rust/op-reth/crates/node/src/node.rs b/rust/op-reth/crates/node/src/node.rs index 65d3ed00370..23f7f2bd057 100644 --- a/rust/op-reth/crates/node/src/node.rs +++ b/rust/op-reth/crates/node/src/node.rs @@ -8,6 +8,7 @@ use crate::{ payload_service::OpPayloadServiceBuilder, txpool::{OpCustomTransactionPool, OpTransactionValidator}, }; +use alloy_consensus::BlockHeader; use alloy_primitives::Sealed; use eyre::ErrReport; use futures_util::FutureExt; @@ -72,7 +73,7 @@ use reth_optimism_txpool::{ }; use reth_primitives_traits::header::HeaderMut; use reth_provider::{ - CanonStateSubscriptions, DatabaseProviderFactory, StorageSettingsCache, + BlockReaderIdExt, CanonStateSubscriptions, DatabaseProviderFactory, StorageSettingsCache, providers::ProviderFactoryBuilder, }; use reth_rpc_api::{ @@ -104,7 +105,6 @@ impl PayloadAttributesBuilder<OpPayloadAttrs> for OpLocalPayloadAttributesBuilde &self, parent: &reth_primitives_traits::SealedHeader<alloy_consensus::Header>, ) -> OpPayloadAttrs { - use alloy_consensus::BlockHeader; use alloy_primitives::{Address, B64}; let timestamp = std::cmp::max( @@ -303,7 +303,8 @@ impl OpNode { } /// The pool builder configured the way every OP node's pool expects: tx-conditional support, - /// interop endpoints and quorum, and the shared interop failsafe gate. + /// interop endpoints and quorum, the shared interop failsafe gate, and the shared operator gas + /// limit. /// /// Generic over the pooled-transaction type so a downstream node can start from this base and /// chain [`with_ordering`](OpPoolBuilder::with_ordering) / @@ -318,6 +319,7 @@ impl OpNode { self.args.interop_safety_level, ) .with_interop_failsafe(self.interop_failsafe.clone()) + .with_gas_limit_config(self.gas_limit_config.clone()) } /// Returns the payload builder stock components install. @@ -1394,6 +1396,8 @@ pub struct OpPoolBuilder< pub interop_safety_level: SafetyLevel, /// Shared interop failsafe gate, passed to the interop filter client this builder constructs. pub interop_failsafe: InteropFailsafe, + /// The operator's gas limit, shared with the payload builder. + pub gas_limit_config: OpGasLimitConfig, /// The transaction ordering used by the pool. pub ordering: O, /// The validator wrapper applied to the built [`OpTransactionValidator`]. @@ -1411,6 +1415,7 @@ impl<T> Default for OpPoolBuilder<T> { interop_min_responses: None, interop_safety_level: SafetyLevel::CrossUnsafe, interop_failsafe: InteropFailsafe::default(), + gas_limit_config: OpGasLimitConfig::default(), ordering: CoinbaseTipOrdering::default(), validator_wrapper: IdentityValidatorWrapper, _pd: Default::default(), @@ -1427,6 +1432,7 @@ impl<T, O: Clone, W: Clone> Clone for OpPoolBuilder<T, O, W> { interop_min_responses: self.interop_min_responses, interop_safety_level: self.interop_safety_level, interop_failsafe: self.interop_failsafe.clone(), + gas_limit_config: self.gas_limit_config.clone(), ordering: self.ordering.clone(), validator_wrapper: self.validator_wrapper.clone(), _pd: core::marker::PhantomData, @@ -1471,6 +1477,12 @@ impl<T, O, W> OpPoolBuilder<T, O, W> { self } + /// Shares the operator's gas limit with the pool's validator. + pub fn with_gas_limit_config(mut self, gas_limit_config: OpGasLimitConfig) -> Self { + self.gas_limit_config = gas_limit_config; + self + } + /// Sets a custom transaction ordering for the pool, replacing the default /// [`CoinbaseTipOrdering`]. pub fn with_ordering<NewO>(self, ordering: NewO) -> OpPoolBuilder<T, NewO, W> { @@ -1481,6 +1493,7 @@ impl<T, O, W> OpPoolBuilder<T, O, W> { interop_min_responses: self.interop_min_responses, interop_safety_level: self.interop_safety_level, interop_failsafe: self.interop_failsafe, + gas_limit_config: self.gas_limit_config, ordering, validator_wrapper: self.validator_wrapper, _pd: core::marker::PhantomData, @@ -1501,6 +1514,7 @@ impl<T, O, W> OpPoolBuilder<T, O, W> { interop_min_responses: self.interop_min_responses, interop_safety_level: self.interop_safety_level, interop_failsafe: self.interop_failsafe, + gas_limit_config: self.gas_limit_config, ordering: self.ordering, validator_wrapper, _pd: core::marker::PhantomData, @@ -1554,9 +1568,15 @@ where Some(builder.build().await) }; + // Reth's validator assumes a 30M block gas limit until it sees its first canonical update. + // Start it with the chain's limit. + let latest_header = + ctx.provider().latest_header()?.ok_or_else(|| eyre::eyre!("no latest header"))?; + let blob_store = reth_node_builder::components::create_blob_store(ctx)?; let validator = TransactionValidationTaskExecutor::eth_builder(ctx.provider().clone(), evm_config) + .set_block_gas_limit(latest_header.gas_limit()) .no_eip4844() .with_max_tx_input_bytes(ctx.config().txpool.max_tx_input_bytes) .kzg_settings(ctx.kzg_settings()?) @@ -1574,11 +1594,13 @@ where // moved-in wrapper is taken out of an `Option` on the single call. let mut validator_wrapper = Some(validator_wrapper); let interop_client = interop_client.clone(); + let gas_limit_config = self.gas_limit_config.clone(); move |validator| { let v = OpTransactionValidator::new(validator) // In --dev mode we can't require gas fees because we're unable to // decode the L1 block info - .require_l1_data_gas_fee(!ctx.config().dev.dev); + .require_l1_data_gas_fee(!ctx.config().dev.dev) + .with_gas_limit_config(gas_limit_config.clone()); let op_validator = if let Some(client) = interop_client.clone() { v.with_interop(client) } else { diff --git a/rust/op-reth/crates/node/tests/it/main.rs b/rust/op-reth/crates/node/tests/it/main.rs index c849c74e424..b4bc1893e2e 100644 --- a/rust/op-reth/crates/node/tests/it/main.rs +++ b/rust/op-reth/crates/node/tests/it/main.rs @@ -6,6 +6,8 @@ mod builder; mod custom_pool; +mod pool_limits; + mod priority; mod rpc; diff --git a/rust/op-reth/crates/node/tests/it/pool_limits.rs b/rust/op-reth/crates/node/tests/it/pool_limits.rs new file mode 100644 index 00000000000..2be508d6711 --- /dev/null +++ b/rust/op-reth/crates/node/tests/it/pool_limits.rs @@ -0,0 +1,95 @@ +//! Tests that the pool a node builds knows the limits its payload builder works with. + +use alloy_consensus::{SignableTransaction, TxEip1559, transaction::Recovered}; +use alloy_genesis::Genesis; +use alloy_network::eip2718::Encodable2718; +use alloy_primitives::{Address, Signature, TxKind}; +use reth_db::test_utils::create_test_rw_db_with_path; +use reth_node_builder::{EngineNodeLauncher, Node, NodeBuilder, NodeConfig}; +use reth_node_core::args::DatadirArgs; +use reth_optimism_chainspec::OpChainSpecBuilder; +use reth_optimism_node::OpNode; +use reth_optimism_primitives::OpTransactionSigned; +use reth_optimism_txpool::OpPooledTransaction; +use reth_provider::providers::BlockchainProvider; +use reth_transaction_pool::{ + TransactionOrigin, TransactionPool, + error::{InvalidPoolTransactionError, PoolErrorKind}, +}; +use std::sync::Arc; + +/// The gas limit in the test chain's genesis, unlike reth's 30M default. +const GENESIS_GAS_LIMIT: u64 = 20_000_000; + +/// A node's pool is built from the same limits as its payload builder. +#[tokio::test] +async fn pool_knows_the_node_limits() { + reth_tracing::init_test_tracing(); + + let mut genesis: Genesis = + serde_json::from_str(include_str!("../assets/genesis.json")).unwrap(); + genesis.gas_limit = GENESIS_GAS_LIMIT; + let chain_spec = Arc::new( + OpChainSpecBuilder::optimism_sepolia().genesis(genesis).ecotone_activated().build(), + ); + let mut config = + NodeConfig::new(chain_spec).with_unused_ports().with_datadir_args(DatadirArgs { + datadir: reth_db::test_utils::tempdir_path().into(), + ..Default::default() + }); + config.network.discovery.discv5_port = Some(0); + config.network.discovery.discv5_port_ipv6 = Some(0); + let db = create_test_rw_db_with_path( + config + .datadir + .datadir + .unwrap_or_chain_default(config.chain.chain(), config.datadir.clone()) + .db(), + ); + let op_node = OpNode::default(); + let runtime = reth_tasks::Runtime::test(); + let node_handle = NodeBuilder::new(config.clone()) + .with_database(db) + .with_types_and_provider::<OpNode, BlockchainProvider<_>>() + .with_components(op_node.components()) + .with_add_ons(op_node.add_ons()) + .launch_with_fn(|builder| { + let launcher = EngineNodeLauncher::new( + runtime.clone(), + builder.config.datadir(), + Default::default(), + ); + builder.launch_with(launcher) + }) + .await + .expect("Failed to launch node"); + let pool = &node_handle.node.pool; + + // `miner_setGasLimit` writes this handle after startup, and the pool must see it. + op_node.gas_limit_config.set_gas_limit(100_000); + let tx: OpTransactionSigned = TxEip1559 { + gas_limit: 200_000, + to: TxKind::Call(Address::with_last_byte(0x42)), + ..Default::default() + } + .into_signed(Signature::test_signature()) + .into(); + let encoded_len = tx.encode_2718_len(); + let tx = OpPooledTransaction::new( + Recovered::new_unchecked(tx, Address::with_last_byte(1)), + encoded_len, + ); + let err = pool.add_transaction(TransactionOrigin::External, tx).await.unwrap_err(); + assert!( + matches!( + err.kind, + PoolErrorKind::InvalidTransaction(InvalidPoolTransactionError::MaxTxGasLimitExceeded( + .. + )) + ), + "got {err:?}" + ); + + // Until its first canonical update, reth's validator would otherwise assume 30M. + assert_eq!(pool.validator().validator().block_gas_limit(), GENESIS_GAS_LIMIT); +} diff --git a/rust/op-reth/crates/payload/Cargo.toml b/rust/op-reth/crates/payload/Cargo.toml index eff40138bbd..c8d8ed80fcd 100644 --- a/rust/op-reth/crates/payload/Cargo.toml +++ b/rust/op-reth/crates/payload/Cargo.toml @@ -60,5 +60,9 @@ metrics-exporter-prometheus.workspace = true metrics-util.workspace = true reth-node-metrics.workspace = true reth-optimism-chainspec = { workspace = true, features = ["superchain-configs"] } +reth-provider = { workspace = true, features = ["test-utils"] } reth-revm = { workspace = true, features = ["test-utils"] } +reth-transaction-pool = { workspace = true, features = ["test-utils"] } +proptest.workspace = true rstest.workspace = true +tokio = { workspace = true, features = ["rt"] } diff --git a/rust/op-reth/crates/payload/src/builder.rs b/rust/op-reth/crates/payload/src/builder.rs index 46a9b5a774b..a8f01aee63b 100644 --- a/rust/op-reth/crates/payload/src/builder.rs +++ b/rust/op-reth/crates/payload/src/builder.rs @@ -1159,12 +1159,10 @@ where <<Builder::Executor as BlockExecutor>::Evm as AlloyEvm>::DB: Database, <Builder::Executor as BlockExecutor>::Result: PreRefundGasUsed, { - let mut block_gas_limit = builder.evm_mut().block().gas_limit(); - if let Some(gas_limit_config) = self.builder_config.gas_limit_config.gas_limit() { - // If a gas limit is configured, use that limit as target if it's smaller, otherwise use - // the block's actual gas limit. - block_gas_limit = gas_limit_config.min(block_gas_limit); - }; + // If a gas limit is configured, use that limit as target if it's smaller, otherwise use the + // block's actual gas limit. + let mut block_gas_limit = + self.builder_config.gas_limit_config.cap(builder.evm_mut().block().gas_limit()); if let Some(gas_limit_cap) = gas_limit_cap { // If a gas limit cap is provided, use that limit as target if it's smaller, otherwise // use the block's actual gas limit. @@ -1296,5 +1294,7 @@ where } } +#[cfg(test)] +mod admission_tests; #[cfg(test)] mod tests; diff --git a/rust/op-reth/crates/payload/src/builder/admission_tests.rs b/rust/op-reth/crates/payload/src/builder/admission_tests.rs new file mode 100644 index 00000000000..8b49aba88f5 --- /dev/null +++ b/rust/op-reth/crates/payload/src/builder/admission_tests.rs @@ -0,0 +1,790 @@ +//! Property tests that pool admission and the payload builder agree. +//! +//! Pool admission and the builder are tested separately elsewhere, and this crate is the only place +//! that can reach both. +//! +//! Each case runs a real validator and [`Pool`] and the real builder against the same head, L1 +//! info, base fee, balance and nonce, then builds an otherwise empty block on the real L1-info +//! deposit. +//! +//! Failures reproduce from the printed seed. `PROPTEST_RNG_SEED` and `PROPTEST_CASES` override the +//! fixed seed and the case count, so a scheduled job can explore further than a PR run does. + +use super::{OpPayloadBuilderCtx, RethPayloadTransactions, tests::op_pooled_tx_from}; +use crate::{ + OpPayloadBuilderAttributes, + config::{OpBuilderConfig, OpDAConfig, OpGasLimitConfig}, +}; +use alloy_consensus::{Header, Sealable, Transaction, TxEip1559}; +use alloy_eips::{ + eip1559::BaseFeeParams, + eip2718::{Encodable2718, WithEncoded}, +}; +use alloy_evm::Evm; +use alloy_primitives::{Address, B64, B256, Bytes, StorageKey, TxKind, U256, b256, map::HashMap}; +use op_alloy_consensus::{TxDeposit, encode_jovian_extra_data}; +use op_revm::{ + L1BlockInfo, OpSpecId, + constants::{ + BASE_FEE_SCALAR_OFFSET, BLOB_BASE_FEE_SCALAR_OFFSET, DA_FOOTPRINT_GAS_SCALAR_OFFSET, + DA_FOOTPRINT_GAS_SCALAR_SLOT, ECOTONE_L1_BLOB_BASE_FEE_SLOT, ECOTONE_L1_FEE_SCALARS_SLOT, + L1_BASE_FEE_SLOT, L1_BLOCK_CONTRACT, OPERATOR_FEE_CONSTANT_OFFSET, + OPERATOR_FEE_SCALAR_OFFSET, + }, +}; +use proptest::{prelude::*, test_runner::RngSeed}; +use reth_basic_payload_builder::PayloadConfig; +use reth_chainspec::EthChainSpec; +use reth_evm::execute::BlockBuilder; +use reth_optimism_chainspec::{OpChainSpec, OpChainSpecBuilder}; +use reth_optimism_evm::{L1_BLOCK_JOVIAN_SELECTOR, OpEvmConfig, extract_l1_info_from_tx}; +use reth_optimism_primitives::{OpPrimitives, OpTransactionSigned}; +use reth_optimism_txpool::{ + OpPooledTransaction, OpTransactionValidator, estimated_da_size::DataAvailabilitySized, +}; +use reth_payload_util::PayloadTransactionsFixed; +use reth_primitives_traits::{Account, SealedHeader}; +use reth_provider::test_utils::{ExtendedAccount, MockEthProvider}; +use reth_revm::{database::StateProviderDatabase, db::State, test_utils::StateProviderTest}; +use reth_transaction_pool::{ + BlockInfo, CoinbaseTipOrdering, Pool, PoolConfig, PoolTransaction, TransactionOrigin, + TransactionPool, TransactionPoolExt, blobstore::InMemoryBlobStore, + validate::EthTransactionValidatorBuilder, +}; +use revm::context::Block as _; +use std::sync::Arc; + +/// Runs of these tests are reproducible unless `PROPTEST_RNG_SEED` says otherwise. +const DEFAULT_SEED: u64 = 0xDA_F00D; + +/// The sender of the transaction under test. +const SIGNER: Address = Address::repeat_byte(0x11); +/// The sender's account nonce, which the pool and the executor both see. +const STATE_NONCE: u64 = 7; + +/// The gas limit of the L1-info deposit. +const L1_INFO_DEPOSIT_GAS: u64 = 1_000_000; +/// Mirrors the pool's reservation for the L1-info deposit (`L1_INFO_GAS_OVERHEAD`). +const L1_INFO_GAS_OVERHEAD: u64 = 70_000; +/// Every block has to fit the L1-info deposit, or it fails before any pool transaction is tried. +const MIN_BLOCK_GAS_LIMIT: u64 = 2 * L1_INFO_DEPOSIT_GAS; +/// The largest calldata that stays under reth's default 128 KiB pool limit, encoding included. +const MAX_ADMISSIBLE_CALLDATA: usize = 130_000; + +/// The block's base fee. The parent header carries it, and the parent's gas usage keeps it flat. +const BASE_FEE: u64 = 1_000; + +/// Values that the L1-info deposit sets, and which both sides must see. +#[derive(Debug, Clone, Copy)] +struct L1Params { + /// L1 base fee, in wei. + l1_base_fee: u64, + /// Scalar on the L1 base fee in the L1 data fee. + base_fee_scalar: u32, + /// L1 blob base fee, in wei. + l1_blob_base_fee: u64, + /// Scalar on the L1 blob base fee in the L1 data fee. + blob_base_fee_scalar: u32, + /// Scalar of the operator fee. + operator_fee_scalar: u32, + /// Flat part of the operator fee. + operator_fee_constant: u64, + /// Gas counted towards the DA footprint per estimated DA byte. + da_footprint_gas_scalar: u16, +} + +impl L1Params { + /// `setL1BlockValuesJovian` calldata. The validator reads this from the deposit. + fn calldata(&self) -> Bytes { + let mut data = L1_BLOCK_JOVIAN_SELECTOR.to_vec(); + data.extend_from_slice(&self.base_fee_scalar.to_be_bytes()); + data.extend_from_slice(&self.blob_base_fee_scalar.to_be_bytes()); + data.extend_from_slice(&[0; 24]); // sequence number, L1 timestamp, L1 number + data.extend_from_slice(&U256::from(self.l1_base_fee).to_be_bytes::<32>()); + data.extend_from_slice(&U256::from(self.l1_blob_base_fee).to_be_bytes::<32>()); + data.extend_from_slice(&[0; 64]); // L1 block hash, batcher hash + data.extend_from_slice(&self.operator_fee_scalar.to_be_bytes()); + data.extend_from_slice(&self.operator_fee_constant.to_be_bytes()); + data.extend_from_slice(&self.da_footprint_gas_scalar.to_be_bytes()); + data.into() + } + + /// `L1Block` storage. The executor reads this from state. + /// + /// The test state has no `L1Block` bytecode, so the deposit doesn't write these. Instead they + /// are in place from the start of the block, as they would be once the deposit has run. + fn storage(&self) -> HashMap<StorageKey, U256> { + let mut fee_scalars = [0u8; 32]; + fee_scalars[BASE_FEE_SCALAR_OFFSET..BASE_FEE_SCALAR_OFFSET + 4] + .copy_from_slice(&self.base_fee_scalar.to_be_bytes()); + fee_scalars[BLOB_BASE_FEE_SCALAR_OFFSET..BLOB_BASE_FEE_SCALAR_OFFSET + 4] + .copy_from_slice(&self.blob_base_fee_scalar.to_be_bytes()); + + let mut operator_and_da = [0u8; 32]; + operator_and_da[DA_FOOTPRINT_GAS_SCALAR_OFFSET..DA_FOOTPRINT_GAS_SCALAR_OFFSET + 2] + .copy_from_slice(&self.da_footprint_gas_scalar.to_be_bytes()); + operator_and_da[OPERATOR_FEE_SCALAR_OFFSET..OPERATOR_FEE_SCALAR_OFFSET + 4] + .copy_from_slice(&self.operator_fee_scalar.to_be_bytes()); + operator_and_da[OPERATOR_FEE_CONSTANT_OFFSET..OPERATOR_FEE_CONSTANT_OFFSET + 8] + .copy_from_slice(&self.operator_fee_constant.to_be_bytes()); + + [ + (L1_BASE_FEE_SLOT, U256::from(self.l1_base_fee)), + (ECOTONE_L1_BLOB_BASE_FEE_SLOT, U256::from(self.l1_blob_base_fee)), + (ECOTONE_L1_FEE_SCALARS_SLOT, U256::from_be_bytes(fee_scalars)), + (DA_FOOTPRINT_GAS_SCALAR_SLOT, U256::from_be_bytes(operator_and_da)), + ] + .into_iter() + .map(|(slot, value)| (StorageKey::from(slot), value)) + .collect() + } + + /// The L1-info deposit that opens the block, carrying [`Self::calldata`]. + fn deposit(&self) -> OpTransactionSigned { + OpTransactionSigned::Deposit( + TxDeposit { + source_hash: b256!( + "0x1111111111111111111111111111111111111111111111111111111111111111" + ), + from: Address::repeat_byte(0xde), + to: TxKind::Call(L1_BLOCK_CONTRACT), + gas_limit: L1_INFO_DEPOSIT_GAS, + input: self.calldata(), + ..Default::default() + } + .seal_slow(), + ) + } +} + +/// A limit set relative to the transaction, so that cases land on the boundaries of each check. +/// +/// Picking the transaction first and deriving the limit is what makes a footprint exactly at the +/// limit reachable: random limits would almost never hit it. +#[derive(Debug, Clone, Copy)] +enum Limit { + /// The footprint plus an offset. + Footprint(i64), + /// The declared gas plus the L1-info reservation, plus an offset. + Gas(i64), + /// Above both of the others by this much. + Above(u64), + /// A value unrelated to the transaction. + Fixed(u64), +} + +impl Limit { + /// The limit in gas, given the transaction's footprint and declared gas. + fn resolve(self, footprint: u64, gas: u64) -> u64 { + let gas_bound = gas + L1_INFO_GAS_OVERHEAD; + match self { + Self::Footprint(offset) => footprint.saturating_add_signed(offset), + Self::Gas(offset) => gas_bound.saturating_add_signed(offset), + Self::Above(margin) => footprint.max(gas_bound).saturating_add(margin), + Self::Fixed(limit) => limit, + } + } +} + +/// The sender's balance. +#[derive(Debug, Clone, Copy)] +enum Balance { + /// The full cost of the transaction, L1 and operator fees included, plus an offset. + Cost(i64), + /// More than the transaction could cost. + Plenty, +} + +/// Knobs that shrink independently, which keeps counterexamples readable. +#[derive(Debug, Clone)] +struct Case { + /// The fork active from genesis. + fork: Fork, + /// Calldata length in bytes. + calldata_len: usize, + /// Seed of the calldata's noise. + calldata_seed: u64, + /// Roughly what percentage of the calldata is zero bytes, and so how well it compresses. + calldata_zero_pct: u8, + /// Declared gas on top of what the calldata requires. + extra_gas: u64, + /// Max fee relative to the block's base fee. + fee_offset: i64, + /// Whether to leave a gap below this nonce, which parks the transaction in `Queued`. + nonce_gap: bool, + /// The sender's balance. + balance: Balance, + /// What the L1-info deposit sets. + l1: L1Params, + /// The header gas limit. + block_gas_limit: Limit, + /// `miner_setGasLimit`. + operator_gas_limit: Option<Limit>, + /// `miner_setMaxDASize`, per transaction. + da_tx_limit: Option<u64>, + /// `miner_setMaxDASize`, per block. + da_block_limit: Option<u64>, + /// `--rollup.max-uncompressed-block-size`. + max_uncompressed_block_size: Option<u64>, +} + +impl Case { + /// Generates the calldata from its length, seed and share of zero bytes. + fn calldata(&self) -> Bytes { + let mut state = self.calldata_seed | 1; + (0..self.calldata_len) + .map(|_| { + state ^= state << 13; + state ^= state >> 7; + state ^= state << 17; + if (state >> 8) % 100 < u64::from(self.calldata_zero_pct) { 0 } else { state as u8 } + }) + .collect() + } + + /// The transaction under test, test-signed and recovered to [`SIGNER`]. + fn tx(&self) -> OpPooledTransaction { + let input = self.calldata(); + let tx = TxEip1559 { + chain_id: self.fork.chain_spec().chain().id(), + nonce: STATE_NONCE + u64::from(self.nonce_gap), + gas_limit: min_gas(&input) + self.extra_gas, + max_fee_per_gas: u128::from(BASE_FEE.saturating_add_signed(self.fee_offset)), + max_priority_fee_per_gas: 1, + to: TxKind::Call(Address::repeat_byte(0x42)), + input, + ..Default::default() + }; + op_pooled_tx_from(SIGNER, tx) + } + + /// The DA footprint of `tx` under this case's scalar. + fn footprint(&self, tx: &OpPooledTransaction) -> u64 { + tx.estimated_da_size().saturating_mul(u64::from(self.l1.da_footprint_gas_scalar)) + } + + /// The sender's balance, relative to what `tx` costs including L1 and operator fees. + fn balance(&self, tx: &OpPooledTransaction) -> U256 { + let offset = match self.balance { + Balance::Cost(offset) => offset, + Balance::Plenty => return U256::from(u128::MAX), + }; + let mut l1_info = + extract_l1_info_from_tx(&self.l1.deposit()).expect("valid Jovian L1-info calldata"); + let op_fees = + l1_info.tx_cost(tx.encoded_2718(), U256::from(tx.gas_limit()), self.fork.spec_id()); + let cost = tx.cost().saturating_add(op_fees); + if offset < 0 { + cost.saturating_sub(U256::from(offset.unsigned_abs())) + } else { + cost.saturating_add(U256::from(offset)) + } + } + + /// Resolves this case's limits and balance against `tx` into concrete values. + fn env(&self, tx: &OpPooledTransaction) -> Env { + let footprint = self.footprint(tx); + let gas = tx.gas_limit(); + let block_gas_limit = self.block_gas_limit.resolve(footprint, gas).max(MIN_BLOCK_GAS_LIMIT); + // Zero means "unset" to `OpGasLimitConfig`. + let operator_gas_limit = self.operator_gas_limit.map(|l| l.resolve(footprint, gas).max(1)); + let builder_config = OpBuilderConfig { + da_config: OpDAConfig::new( + self.da_tx_limit.unwrap_or(0), + self.da_block_limit.unwrap_or(0), + ), + gas_limit_config: OpGasLimitConfig::new(operator_gas_limit.unwrap_or(0)), + max_uncompressed_block_size: self.max_uncompressed_block_size, + ..Default::default() + }; + Env::new(self.fork, self.l1, self.balance(tx), block_gas_limit, builder_config) + } + + /// Whether a limit that admission deliberately doesn't enforce rules out `tx`. + fn throttled(&self, tx: &OpPooledTransaction, deposit: &OpTransactionSigned) -> bool { + let da_size = tx.estimated_da_size(); + let uncompressed = tx.encoded_2718().len() as u64 + deposit.encode_2718_len() as u64; + self.da_tx_limit.is_some_and(|limit| da_size > limit) || + self.da_block_limit.is_some_and(|limit| da_size > limit) || + self.max_uncompressed_block_size.is_some_and(|limit| uncompressed > limit) + } +} + +/// The least gas a call with this calldata can declare: EIP-2028 intrinsic gas or the EIP-7623 +/// floor, whichever is higher. +fn min_gas(input: &[u8]) -> u64 { + let zeros: u64 = input.iter().map(|byte| u64::from(*byte == 0)).sum(); + let non_zeros = input.len() as u64 - zeros; + let intrinsic = 21_000 + 4 * zeros + 16 * non_zeros; + let floor = 21_000 + 10 * (zeros + 4 * non_zeros); + intrinsic.max(floor) +} + +/// The fork active from genesis. +#[derive(Debug, Clone, Copy)] +enum Fork { + /// Introduces the DA footprint limit. + Jovian, + /// What OP Mainnet runs now. Adds the EIP-7825 cap on a transaction's gas, through Osaka. + Karst, +} + +impl Fork { + /// OP Mainnet's chain spec with this fork active from genesis. + fn chain_spec(self) -> Arc<OpChainSpec> { + let builder = OpChainSpecBuilder::optimism_mainnet(); + Arc::new( + match self { + Self::Jovian => builder.jovian_activated(), + Self::Karst => builder.karst_activated(), + } + .build(), + ) + } + + /// The EVM spec of this fork. + const fn spec_id(self) -> OpSpecId { + match self { + Self::Jovian => OpSpecId::JOVIAN, + Self::Karst => OpSpecId::KARST, + } + } +} + +/// What the pool and the builder made of a case. +#[derive(Debug)] +struct Report { + /// Estimated DA size times the scalar. + footprint: u64, + /// The gas the transaction declares. + gas: u64, + /// The header gas limit, once resolved. + block_gas_limit: u64, + /// `miner_setGasLimit`, once resolved. + operator_gas_limit: Option<u64>, + /// The transaction reached the pending subpool. + reached_pending: bool, + /// Total transactions in all subpools. + pool_size: usize, + /// An otherwise empty block included it. Only tried if it reached pending. + included: bool, + /// An operator limit the admission check deliberately doesn't enforce rules it out. + throttled: bool, +} + +impl Report { + /// The block gas budget the builder works with. + fn effective_gas_limit(&self) -> u64 { + self.operator_gas_limit.map_or(self.block_gas_limit, |l| l.min(self.block_gas_limit)) + } + + /// The transaction can't fit in any block this builder would make. + fn exceeds_effective_limit(&self) -> bool { + let limit = self.effective_gas_limit(); + self.footprint > limit || self.gas > limit.saturating_sub(L1_INFO_GAS_OVERHEAD) + } +} + +/// The header of the block being built on, at `block_gas_limit`. +fn parent_header(block_gas_limit: u64) -> SealedHeader { + SealedHeader::seal_slow(Header { + gas_limit: block_gas_limit, + number: 0, + timestamp: 0, + base_fee_per_gas: Some(BASE_FEE), + // Using exactly the EIP-1559 gas target, the limit over the elasticity of 2 in + // `extra_data`, keeps the base fee flat. The transaction's fee is set before the + // builder exists, so `BASE_FEE` has to be known up front. + gas_used: block_gas_limit / 2, + extra_data: encode_jovian_extra_data(B64::ZERO, BaseFeeParams::new(250, 2), 0) + .expect("valid EIP-1559 params"), + ..Default::default() + }) +} + +/// The chain, head and accounts that a block gets built on, independent of any one transaction. +/// +/// The pool, the builder and the state are all made from this, which is what keeps them on the +/// same head, L1 info, base fee, balance and nonce. +struct Env { + /// The chain both sides run. + chain_spec: Arc<OpChainSpec>, + /// What the L1-info deposit sets. + l1: L1Params, + /// The balance of [`SIGNER`]. + balance: U256, + /// The operator's limits, shared between the builder and the pool. + builder_config: OpBuilderConfig, + /// The header gas limit. + block_gas_limit: u64, + /// The block being built on. + parent: SealedHeader, + /// The L1-info deposit that opens the block. + deposit: OpTransactionSigned, +} + +impl Env { + /// Creates an environment with these values, on a fresh chain. + fn new( + fork: Fork, + l1: L1Params, + balance: U256, + block_gas_limit: u64, + builder_config: OpBuilderConfig, + ) -> Self { + Self { + chain_spec: fork.chain_spec(), + l1, + balance, + builder_config, + block_gas_limit, + parent: parent_header(block_gas_limit), + deposit: l1.deposit(), + } + } + + /// The payload builder's context, with the L1-info deposit in its attributes. + fn payload_ctx( + &self, + ) -> OpPayloadBuilderCtx< + OpEvmConfig<OpChainSpec, OpPrimitives>, + OpChainSpec, + OpPayloadBuilderAttributes<OpTransactionSigned>, + > { + let attributes = OpPayloadBuilderAttributes { + timestamp: 2, + gas_limit: Some(self.block_gas_limit), + transactions: vec![WithEncoded::new( + self.deposit.encoded_2718().into(), + self.deposit.clone(), + )], + eip_1559_params: Some(B64::ZERO), + min_base_fee: Some(0), + parent_beacon_block_root: Some(B256::ZERO), + ..Default::default() + }; + OpPayloadBuilderCtx { + evm_config: OpEvmConfig::optimism(self.chain_spec.clone()), + builder_config: self.builder_config.clone(), + chain_spec: self.chain_spec.clone(), + config: PayloadConfig { + parent_header: Arc::new(self.parent.clone()), + parent_block_info: None, + payload_id: attributes.id, + attributes, + }, + cancel: Default::default(), + best_payload: None, + } + } + + /// The state the builder executes on: the sender's account and the `L1Block` contract. + fn state_provider(&self) -> StateProviderTest { + let mut state_provider = StateProviderTest::default(); + state_provider.insert_account( + SIGNER, + Account { balance: self.balance, nonce: STATE_NONCE, ..Default::default() }, + None, + Default::default(), + ); + // `L1Block` needs code: the deposit touches it, and EIP-161 would clear an empty account + // along with its storage. A lone `STOP` is enough, as the values are already in storage. + state_provider.insert_account( + L1_BLOCK_CONTRACT, + Account::default(), + Some(Bytes::from_static(&[0x00])), + self.l1.storage(), + ); + state_provider + } + + /// A real pool and validator that have seen the parent, with the sender's account in state. + fn pool(&self) -> impl TransactionPool<Transaction = OpPooledTransaction> { + let client = MockEthProvider::<OpPrimitives, _>::new() + .with_chain_spec(self.chain_spec.clone()) + .with_genesis_block(); + client.add_account(SIGNER, ExtendedAccount::new(STATE_NONCE, self.balance)); + let validator = OpTransactionValidator::new( + EthTransactionValidatorBuilder::new( + client, + OpEvmConfig::optimism(self.chain_spec.clone()), + ) + .set_block_gas_limit(self.block_gas_limit) + .build(InMemoryBlobStore::default()), + ) + .with_gas_limit_config(self.builder_config.gas_limit_config.clone()); + validator.update_l1_block_info(self.parent.header(), Some(&self.deposit)); + let pool = Pool::new( + validator, + CoinbaseTipOrdering::default(), + InMemoryBlobStore::default(), + PoolConfig::default(), + ); + pool.set_block_info(BlockInfo { + block_gas_limit: self.block_gas_limit, + last_seen_block_hash: self.parent.hash(), + last_seen_block_number: self.parent.number, + pending_basefee: BASE_FEE, + pending_blob_fee: None, + }); + pool + } +} + +/// Runs a case through the pool and, if it reaches pending, the builder. +fn run(case: &Case) -> Report { + let tx = case.tx(); + let env = case.env(&tx); + + // Open the block, up to and including the L1-info deposit. + let ctx = env.payload_ctx(); + let state_provider = env.state_provider(); + let mut db = State::builder() + .with_database(StateProviderDatabase::new(&state_provider)) + .with_bundle_update() + .build(); + db.load_cache_account(L1_BLOCK_CONTRACT).expect("L1Block loads"); + let mut builder = ctx.block_builder(&mut db).expect("block builder can be created"); + builder.apply_pre_execution_changes().expect("pre-execution changes apply"); + let mut info = + ctx.execute_sequencer_transactions(&mut builder, None).expect("L1-info deposit executes"); + assert_eq!( + builder.evm_mut().block().basefee(), + BASE_FEE, + "the pool must see the builder's base fee" + ); + assert_eq!( + L1BlockInfo::fetch_da_footprint_gas_scalar(builder.evm_mut().db_mut()).unwrap(), + case.l1.da_footprint_gas_scalar, + "the executor must see the same scalar as the validator" + ); + + // Offer the transaction to the pool. Rejection is one of the outcomes under test, and shows up + // as an empty pool. + let pool = env.pool(); + let hash = *tx.hash(); + let _ = tokio::runtime::Builder::new_current_thread() + .build() + .expect("runtime builds") + .block_on(pool.add_transaction(TransactionOrigin::External, tx.clone())); + let reached_pending = pool.pending_transactions().iter().any(|pending| *pending.hash() == hash); + + // Build, if the pool says it's ready. + let mut committed = Vec::new(); + if reached_pending { + let cancelled = ctx + .execute_best_transactions( + &mut info, + &mut builder, + RethPayloadTransactions(PayloadTransactionsFixed::new(vec![tx.clone()])), + None, + Some(&mut committed), + ) + .expect("the block builds"); + assert!(cancelled.is_none(), "the build isn't cancelled"); + } + + Report { + footprint: case.footprint(&tx), + gas: tx.gas_limit(), + block_gas_limit: env.block_gas_limit, + operator_gas_limit: env.builder_config.gas_limit_config.gas_limit(), + reached_pending, + pool_size: pool.pool_size().total, + included: !committed.is_empty(), + throttled: case.throttled(&tx, &env.deposit), + } +} + +/// A fixed seed by default, so that a PR only fails because of the PR. +fn config() -> ProptestConfig { + let mut config = ProptestConfig::default(); + if matches!(config.rng_seed, RngSeed::Random) { + config.rng_seed = RngSeed::Fixed(DEFAULT_SEED); + } + config +} + +/// L1 info, mostly with the default scalar, where the footprint limit is reachable. +fn l1_params() -> impl Strategy<Value = L1Params> { + ( + (0..=1_000_000_000_000u64, 0..=1_000_000u32, 0..=1_000_000_000u64, 0..=1_000_000u32), + (0..=100_000u32, 0..=1_000_000u64), + prop_oneof![ + 8 => Just(400u16), + 1 => Just(0u16), + 1 => any::<u16>(), + ], + ) + .prop_map( + |( + (l1_base_fee, base_fee_scalar, l1_blob_base_fee, blob_base_fee_scalar), + (operator_fee_scalar, operator_fee_constant), + da_footprint_gas_scalar, + )| L1Params { + l1_base_fee, + base_fee_scalar, + l1_blob_base_fee, + blob_base_fee_scalar, + operator_fee_scalar, + operator_fee_constant, + da_footprint_gas_scalar, + }, + ) +} + +/// Either fork, as chains run both. +fn fork() -> impl Strategy<Value = Fork> { + prop_oneof![Just(Fork::Jovian), Just(Fork::Karst)] +} + +/// A limit on or near a boundary of the transaction, or unrelated to it. +fn limit() -> impl Strategy<Value = Limit> { + prop_oneof![ + 3 => (-2i64..=2).prop_map(Limit::Footprint), + 3 => (-2i64..=2).prop_map(Limit::Gas), + 2 => (0u64..=1_000_000).prop_map(Limit::Above), + 2 => (MIN_BLOCK_GAS_LIMIT..=60_000_000).prop_map(Limit::Fixed), + ] +} + +/// A limit the transaction fits under, often with nothing to spare. +fn above_limit() -> impl Strategy<Value = Limit> { + prop_oneof![Just(Limit::Above(0)), (0u64..=1_000_000).prop_map(Limit::Above),] +} + +/// Anything goes: the transaction may break any number of rules, or none. +fn any_case() -> impl Strategy<Value = Case> { + ( + fork(), + (0..=MAX_ADMISSIBLE_CALLDATA + 8_000, any::<u64>(), 0..=100u8), + ( + prop_oneof![ + 1 => Just(0u64), + 8 => 0..=2_000_000u64, + // Around the EIP-7825 cap of 16.78M. + 1 => 12_000_000..=18_000_000u64, + ], + -2i64..=1_000, + any::<bool>(), + ), + prop_oneof![ + 3 => (-2i64..=2).prop_map(Balance::Cost), + 2 => Just(Balance::Plenty), + ], + l1_params(), + limit(), + prop::option::weighted(0.5, limit()), + ( + prop::option::weighted(0.1, 1..=200_000u64), + prop::option::weighted(0.1, 1..=200_000u64), + prop::option::weighted(0.1, 1..=200_000u64), + ), + ) + .prop_map( + |( + fork, + (calldata_len, calldata_seed, calldata_zero_pct), + (extra_gas, fee_offset, nonce_gap), + balance, + l1, + block_gas_limit, + operator_gas_limit, + (da_tx_limit, da_block_limit, max_uncompressed_block_size), + )| Case { + fork, + calldata_len, + calldata_seed, + calldata_zero_pct, + extra_gas, + fee_offset, + nonce_gap, + balance, + l1, + block_gas_limit, + operator_gas_limit, + da_tx_limit, + da_block_limit, + max_uncompressed_block_size, + }, + ) +} + +/// A transaction that breaks no rule, placed on as many boundaries as that allows. +fn valid_case() -> impl Strategy<Value = Case> { + ( + fork(), + (0..=MAX_ADMISSIBLE_CALLDATA - 2_000, any::<u64>(), 0..=100u8), + (prop_oneof![Just(0u64), 0..=2_000_000u64], 0i64..=1_000), + prop_oneof![ + 3 => (0i64..=2).prop_map(Balance::Cost), + 1 => Just(Balance::Plenty), + ], + l1_params(), + above_limit(), + prop::option::weighted(0.5, above_limit()), + ) + .prop_map( + |( + fork, + (calldata_len, calldata_seed, calldata_zero_pct), + (extra_gas, fee_offset), + balance, + l1, + block_gas_limit, + operator_gas_limit, + )| Case { + fork, + calldata_len, + calldata_seed, + calldata_zero_pct, + extra_gas, + fee_offset, + nonce_gap: false, + balance, + l1, + block_gas_limit, + operator_gas_limit, + da_tx_limit: None, + da_block_limit: None, + max_uncompressed_block_size: None, + }, + ) +} + +proptest! { + #![proptest_config(config())] + + /// The validator isn't too strict: a transaction that breaks no rule is admitted, and built. + /// + /// This also keeps [`pending_transactions_are_included`] honest, as that property would pass + /// if the pool simply rejected everything. + #[test] + fn valid_transactions_are_admitted_and_included(case in valid_case()) { + let report = run(&case); + prop_assert!(report.reached_pending, "did not reach pending: {report:?}"); + prop_assert!(report.included, "not included: {report:?}"); + } + + /// The core property: if the pool says a transaction is pending, an otherwise empty block + /// includes it. + /// + /// `throttled` is the written list of known exceptions: batcher throttling and the uncompressed + /// size limit aren't enforced at admission. + #[test] + fn pending_transactions_are_included(case in any_case()) { + let report = run(&case); + if report.reached_pending { + prop_assert_eq!(report.included, !report.throttled, "{:?}", report); + } + } + + /// A transaction above the block limits isn't admitted to any subpool. + #[test] + fn transactions_that_cannot_fit_enter_no_subpool(case in any_case()) { + let report = run(&case); + if report.exceeds_effective_limit() { + prop_assert_eq!(report.pool_size, 0, "{:?}", report); + } + } +} diff --git a/rust/op-reth/crates/payload/src/builder/tests.rs b/rust/op-reth/crates/payload/src/builder/tests.rs index db4c467eb93..7fcbdabd2aa 100644 --- a/rust/op-reth/crates/payload/src/builder/tests.rs +++ b/rust/op-reth/crates/payload/src/builder/tests.rs @@ -171,7 +171,7 @@ fn payload_builder_ctx( /// Signs `tx` with the test signature and wraps it as an [`OpPooledTransaction`] recovered to /// `signer`. Shared tail of every pool-tx helper. -fn op_pooled_tx_from(signer: Address, tx: TxEip1559) -> OpPooledTransaction { +pub(super) fn op_pooled_tx_from(signer: Address, tx: TxEip1559) -> OpPooledTransaction { let tx: OpTransactionSigned = tx.into_signed(Signature::test_signature()).into(); let encoded_len = tx.encode_2718_len(); OpPooledTransaction::new(Recovered::new_unchecked(tx, signer), encoded_len) diff --git a/rust/op-reth/crates/payload/src/config.rs b/rust/op-reth/crates/payload/src/config.rs index 0ee7d70998e..0461f73a9f6 100644 --- a/rust/op-reth/crates/payload/src/config.rs +++ b/rust/op-reth/crates/payload/src/config.rs @@ -1,6 +1,7 @@ //! Additional configuration for the OP builder use crate::sdm_metrics; +pub use reth_optimism_txpool::OpGasLimitConfig; use reth_optimism_txpool::interop::InteropFailsafe; use std::sync::{ Arc, @@ -159,36 +160,6 @@ struct OpDAConfigInner { max_da_block_size: AtomicU64, } -/// Contains the Gas Limit configuration for the OP builder. -/// -/// This type is shareable and can be used to update the Gas Limit configuration for the OP payload -/// builder. -#[derive(Debug, Clone, Default)] -pub struct OpGasLimitConfig { - /// Gas limit for a transaction - /// - /// 0 means use the default gas limit. - gas_limit: Arc<AtomicU64>, -} - -impl OpGasLimitConfig { - /// Creates a new Gas Limit configuration with the given maximum gas limit. - pub fn new(max_gas_limit: u64) -> Self { - let this = Self::default(); - this.set_gas_limit(max_gas_limit); - this - } - /// Returns the gas limit for a transaction, if any. - pub fn gas_limit(&self) -> Option<u64> { - let val = self.gas_limit.load(std::sync::atomic::Ordering::Relaxed); - if val == 0 { None } else { Some(val) } - } - /// Sets the gas limit for a transaction. 0 means use the default gas limit. - pub fn set_gas_limit(&self, gas_limit: u64) { - self.gas_limit.store(gas_limit, std::sync::atomic::Ordering::Relaxed); - } -} - #[cfg(test)] mod tests { use super::*; diff --git a/rust/op-reth/crates/txpool/Cargo.toml b/rust/op-reth/crates/txpool/Cargo.toml index 761ea438495..02a615d0e4d 100644 --- a/rust/op-reth/crates/txpool/Cargo.toml +++ b/rust/op-reth/crates/txpool/Cargo.toml @@ -66,6 +66,7 @@ reth-optimism-primitives = { workspace = true, features = ["reth-codec"] } reth-provider = { workspace = true, features = ["test-utils"] } reth-transaction-pool = { workspace = true, features = ["test-utils"] } metrics-util = { workspace = true, features = ["debugging"] } +proptest.workspace = true rstest.workspace = true tokio = { workspace = true, features = ["rt", "rt-multi-thread", "macros"] } # Mock JSON-RPC server for interop filter client tests. jsonrpsee-server is already a workspace diff --git a/rust/op-reth/crates/txpool/src/estimated_da_size.rs b/rust/op-reth/crates/txpool/src/estimated_da_size.rs index 74c21d75f16..41010241088 100644 --- a/rust/op-reth/crates/txpool/src/estimated_da_size.rs +++ b/rust/op-reth/crates/txpool/src/estimated_da_size.rs @@ -7,3 +7,92 @@ pub trait DataAvailabilitySized { /// Note: it is expected that this value will be cached internally. fn estimated_da_size(&self) -> u64; } + +#[cfg(test)] +mod tests { + use super::DataAvailabilitySized; + use crate::OpPooledTransaction; + use alloy_consensus::{SignableTransaction, TxEip1559, transaction::Recovered}; + use alloy_eips::eip2718::Encodable2718; + use alloy_primitives::{Address, Bytes, Signature, TxKind}; + use proptest::prelude::*; + use reth_optimism_primitives::OpTransactionSigned; + + /// `FastLZ` only looks for matches this far back, so patterns repeating around it reach both + /// outcomes of its distance check. + const FLZ_MAX_DISTANCE: usize = 8192; + + /// Above reth's default 128 KiB transaction input limit. + const MAX_LEN: usize = 200_000; + + /// `len` bytes where about `zero_pct` percent are zero and the rest are noise. + fn noise(len: usize, seed: u64, zero_pct: u8) -> Vec<u8> { + let mut state = seed | 1; + (0..len) + .map(|_| { + state ^= state << 13; + state ^= state >> 7; + state ^= state << 17; + if (state >> 8) % 100 < u64::from(zero_pct) { 0 } else { state as u8 } + }) + .collect() + } + + /// Inputs that reach every branch of `FastLZ`, not just the literal path that random bytes + /// take. + fn flz_input() -> impl Strategy<Value = Vec<u8>> { + prop_oneof![ + // Short inputs, around the 13 byte minimum for matching. + prop::collection::vec(any::<u8>(), 0..64), + // Incompressible through compressible, up to the largest transactions. + (0..=MAX_LEN, any::<u64>(), 0..=100u8) + .prop_map(|(len, seed, zero_pct)| noise(len, seed, zero_pct)), + // Runs longer than the 262 bytes a single match can encode. + (any::<u8>(), 0..=MAX_LEN).prop_map(|(byte, len)| vec![byte; len]), + // A noise block repeated around the maximum match distance. + (FLZ_MAX_DISTANCE - 16..FLZ_MAX_DISTANCE + 16, any::<u64>(), 2..8usize).prop_map( + |(period, seed, repeats)| { + let block = noise(period, seed, 0); + block.iter().copied().cycle().take(period * repeats).collect() + } + ), + ] + } + + proptest! { + /// The pool and the executor size a transaction with separate copies of `FastLZ`: + /// `op-alloy-flz` backs `estimated_da_size`, which pool admission and the builder's limit + /// check use, and `op-revm` backs the executor's footprint check. + #[test] + fn fastlz_copies_agree(input in flz_input()) { + prop_assert_eq!( + op_alloy_flz::tx_estimated_size_fjord(&input), + op_revm::estimate_tx_compressed_size(&input) + ); + } + + /// Same as [`fastlz_copies_agree`], end to end: the footprint the pool derives for a + /// transaction equals the one the executor charges for it, so the two also encode the + /// transaction and apply the scalar the same way. + #[test] + fn pool_and_executor_footprints_agree(input in flz_input(), scalar: u16) { + let tx: OpTransactionSigned = TxEip1559 { + chain_id: 10, + gas_limit: 21_000, + to: TxKind::Call(Address::with_last_byte(0x42)), + input: Bytes::from(input), + ..Default::default() + } + .into_signed(Signature::test_signature()) + .into(); + let executor_footprint = op_revm::tx_da_footprint(&tx, u64::from(scalar)); + let encoded_len = tx.encode_2718_len(); + let pooled = OpPooledTransaction::<OpTransactionSigned, OpTransactionSigned>::new( + Recovered::new_unchecked(tx, Address::with_last_byte(1)), + encoded_len, + ); + + prop_assert_eq!(pooled.estimated_da_size() * u64::from(scalar), executor_footprint); + } + } +} diff --git a/rust/op-reth/crates/txpool/src/lib.rs b/rust/op-reth/crates/txpool/src/lib.rs index 1edc5ee92ea..a3dd6743727 100644 --- a/rust/op-reth/crates/txpool/src/lib.rs +++ b/rust/op-reth/crates/txpool/src/lib.rs @@ -9,7 +9,7 @@ #![cfg_attr(docsrs, feature(doc_cfg))] mod validator; -pub use validator::{OpL1BlockInfo, OpTransactionValidator}; +pub use validator::{OpGasLimitConfig, OpL1BlockInfo, OpTransactionValidator}; pub mod conditional; mod pool; diff --git a/rust/op-reth/crates/txpool/src/validator.rs b/rust/op-reth/crates/txpool/src/validator.rs index 691d1eeaebf..4c5e30e5468 100644 --- a/rust/op-reth/crates/txpool/src/validator.rs +++ b/rust/op-reth/crates/txpool/src/validator.rs @@ -32,6 +32,38 @@ pub(crate) const CHECK_ACCESS_LIST_TIMEOUT_SECS: u64 = 7200; /// admit transactions that could never be included. pub(crate) const L1_INFO_GAS_OVERHEAD: u64 = 70_000; +/// Contains the Gas Limit configuration for the OP builder (`miner_setGasLimit`). +/// +/// Cloning shares the value: the miner API writes it, and both the payload builder and the pool's +/// validator read it. +#[derive(Debug, Clone, Default)] +pub struct OpGasLimitConfig { + /// The gas budget of the blocks this node builds. 0 means unset. + gas_limit: Arc<AtomicU64>, +} + +impl OpGasLimitConfig { + /// Creates a new Gas Limit configuration with the given gas budget. + pub fn new(max_gas_limit: u64) -> Self { + let this = Self::default(); + this.set_gas_limit(max_gas_limit); + this + } + /// Returns the gas budget, if any. + pub fn gas_limit(&self) -> Option<u64> { + let val = self.gas_limit.load(Ordering::Relaxed); + if val == 0 { None } else { Some(val) } + } + /// Sets the gas budget. 0 means unset. + pub fn set_gas_limit(&self, gas_limit: u64) { + self.gas_limit.store(gas_limit, Ordering::Relaxed); + } + /// Caps `block_gas_limit` at the gas budget, if one is set. + pub fn cap(&self, block_gas_limit: u64) -> u64 { + self.gas_limit().map_or(block_gas_limit, |limit| limit.min(block_gas_limit)) + } +} + /// Tracks additional infos for the current block. #[derive(Debug, Default)] pub struct OpL1BlockInfo { @@ -63,6 +95,8 @@ pub struct OpTransactionValidator<Client, Tx, Evm> { interop_client: Option<InteropFilterClient>, /// tracks activated forks relevant for transaction validation fork_tracker: Arc<OpForkTracker>, + /// The operator's gas limit, shared with the payload builder. + gas_limit_config: OpGasLimitConfig, } impl<Client, Tx, Evm> OpTransactionValidator<Client, Tx, Evm> { @@ -138,9 +172,22 @@ where require_l1_data_gas_fee: true, interop_client: None, fork_tracker: Arc::new(OpForkTracker { interop: AtomicBool::from(false) }), + gas_limit_config: OpGasLimitConfig::default(), } } + /// Shares the operator's gas limit, written by `miner_setGasLimit`, with this validator. + pub fn with_gas_limit_config(mut self, gas_limit_config: OpGasLimitConfig) -> Self { + self.gas_limit_config = gas_limit_config; + self + } + + /// The gas budget of the blocks this node builds: the block gas limit, or the operator's limit + /// if that is lower. The payload builder applies this to both gas and DA footprint. + fn build_gas_limit(&self) -> u64 { + self.gas_limit_config.cap(self.inner.block_gas_limit()) + } + /// Sets the interop filter client and safety level. pub fn with_interop(mut self, interop_client: InteropFilterClient) -> Self { self.interop_client = Some(interop_client); @@ -225,6 +272,16 @@ where ); } + // Apply the operator's limit too, if that is lower, as the payload builder does. This limit + // is local to this node, so unlike the check above it isn't reported as a bad transaction. + let build_gas_limit = self.build_gas_limit().saturating_sub(L1_INFO_GAS_OVERHEAD); + if gas_limit > build_gas_limit { + return TransactionValidationOutcome::Invalid( + transaction, + InvalidPoolTransactionError::MaxTxGasLimitExceeded(gas_limit, build_gas_limit), + ); + } + // Interop cross tx validation match self.is_valid_cross_tx(&transaction).await { Some(Err(err)) => { @@ -245,10 +302,55 @@ where } let outcome = self.inner.validate_one_with_state(origin, transaction, state); + let outcome = self.apply_da_footprint_check(outcome); self.apply_op_checks(outcome) } + /// Since Jovian a block's total DA footprint must not exceed its gas limit + /// (<https://specs.optimism.io/protocol/jovian/exec-engine.html#da-footprint-block-limit>). + /// Apply that limit to a single transaction at admission, as the payload builder does + /// (`is_tx_over_limits`). Deposits don't count towards the footprint, so the full block gas + /// limit applies. Pre-Jovian L1 info carries no scalar and has no such limit. + /// + /// The operator's gas limit (`miner_setGasLimit`) applies if it is lower, because the payload + /// builder checks the footprint against it too. Batcher throttling (`miner_setMaxDASize`) is + /// not enforced here: those limits are dynamic, and transactions over them become includable + /// again once throttling eases. + /// + /// Runs on a `Valid` outcome because the footprint takes a `FastLZ` pass over the encoded + /// transaction, and only the inner validator enforces the input size limit. It stays outside + /// [`Self::apply_op_checks`], whose early return for `require_l1_data_gas_fee == false` would + /// skip it. + fn apply_da_footprint_check( + &self, + outcome: TransactionValidationOutcome<Tx>, + ) -> TransactionValidationOutcome<Tx> { + if let Some(valid_tx) = outcome.as_valid_transaction() && + let Err(err) = self.check_da_footprint(valid_tx.transaction()) + { + return TransactionValidationOutcome::Invalid(valid_tx.transaction().clone(), err); + } + outcome + } + + /// Rejects `tx` if its DA footprint alone exceeds the gas budget of the blocks this node + /// builds. + /// + /// The verdict depends on this node's view of the limits, so it uses an error that isn't + /// reported as a bad transaction. + fn check_da_footprint(&self, tx: &Tx) -> Result<(), InvalidPoolTransactionError> { + let Some(scalar) = self.block_info.l1_block_info.read().da_footprint_gas_scalar else { + return Ok(()); + }; + let footprint = tx.estimated_da_size().saturating_mul(u64::from(scalar)); + let gas_limit = self.build_gas_limit(); + if footprint > gas_limit { + return Err(InvalidPoolTransactionError::MaxTxGasLimitExceeded(footprint, gas_limit)); + } + Ok(()) + } + /// Performs the necessary opstack specific checks based on top of the regular eth outcome. fn apply_op_checks( &self, @@ -605,4 +707,281 @@ mod tests { assert_eq!(pending, vec![0], "only nonce 0 is executable"); assert_eq!(queued, vec![1], "nonce 1 cannot cover its L1 data fee after nonce 0"); } + + mod da_footprint { + use crate::{ + OpGasLimitConfig, OpL1BlockInfo, OpPooledTransaction, OpTransactionValidator, + estimated_da_size::DataAvailabilitySized, + }; + use alloy_consensus::{ + SignableTransaction, Transaction, TxEip1559, transaction::Recovered, + }; + use alloy_eips::eip2718::Encodable2718; + use alloy_primitives::{Address, B256, Bytes, Signature, TxKind, U256}; + use op_revm::L1BlockInfo; + use parking_lot::RwLock; + use reth_optimism_chainspec::{OP_MAINNET, OpChainSpec}; + use reth_optimism_evm::OpEvmConfig; + use reth_optimism_primitives::{OpPrimitives, OpTransactionSigned}; + use reth_primitives_traits::transaction::error::InvalidTransactionError; + use reth_provider::test_utils::{ExtendedAccount, MockEthProvider}; + use reth_transaction_pool::{ + TransactionOrigin, TransactionValidationOutcome, + blobstore::InMemoryBlobStore, + error::{InvalidPoolTransactionError, PoolError, PoolErrorKind}, + validate::EthTransactionValidatorBuilder, + }; + use std::sync::{Arc, atomic::AtomicU64}; + + /// OP Mainnet's block gas limit. + const BLOCK_GAS_LIMIT: u64 = 40_000_000; + /// The spec default `daFootprintGasScalar` (op-node substitutes it for a `SystemConfig` 0). + const DEFAULT_SCALAR: u16 = 400; + /// Under reth's 128 KiB input cap, yet ~100 KB DA-estimated once compressed, so the + /// default scalar puts its footprint above [`BLOCK_GAS_LIMIT`]. + const CALLDATA_LEN: usize = 120_000; + /// reth's default `--txpool.max-tx-input-bytes`. + const DEFAULT_INPUT_LIMIT: usize = 128 * 1024; + + /// Calldata that doesn't compress, so the DA size estimate tracks its length. + fn incompressible(len: usize) -> Bytes { + let mut state = 0x9E37_79B9_7F4A_7C15_u64; + (0..len) + .map(|_| { + state ^= state << 13; + state ^= state >> 7; + state ^= state << 17; + state as u8 + }) + .collect() + } + + fn large_tx(signer: Address) -> OpPooledTransaction { + large_tx_with_input_len(signer, CALLDATA_LEN) + } + + fn large_tx_with_input_len(signer: Address, input_len: usize) -> OpPooledTransaction { + let tx: OpTransactionSigned = TxEip1559 { + chain_id: 10, + gas_limit: 5_000_000, + max_fee_per_gas: 1_000_000_000, + to: TxKind::Call(Address::with_last_byte(0x42)), + input: incompressible(input_len), + ..Default::default() + } + .into_signed(Signature::test_signature()) + .into(); + let recovered = Recovered::new_unchecked(tx, signer); + let len = recovered.encode_2718_len(); + OpPooledTransaction::new(recovered, len) + } + + async fn validate( + tx: OpPooledTransaction, + da_footprint_gas_scalar: Option<u16>, + block_gas_limit: u64, + ) -> TransactionValidationOutcome<OpPooledTransaction> { + validator(&tx, U256::MAX, da_footprint_gas_scalar, block_gas_limit) + .validate_one(TransactionOrigin::External, tx) + .await + } + + fn validator( + tx: &OpPooledTransaction, + balance: U256, + da_footprint_gas_scalar: Option<u16>, + block_gas_limit: u64, + ) -> OpTransactionValidator< + MockEthProvider<OpPrimitives, Arc<OpChainSpec>>, + OpPooledTransaction, + OpEvmConfig, + > { + let signer = tx.transaction().signer(); + let client = MockEthProvider::<OpPrimitives>::new() + .with_chain_spec(OP_MAINNET.clone()) + .with_genesis_block(); + client.add_account(signer, ExtendedAccount::new(0, balance)); + let inner = EthTransactionValidatorBuilder::new( + client, + OpEvmConfig::optimism(OP_MAINNET.clone()), + ) + .set_block_gas_limit(block_gas_limit) + .build(InMemoryBlobStore::default()); + OpTransactionValidator::with_block_info( + inner, + OpL1BlockInfo { + l1_block_info: RwLock::new(L1BlockInfo { + da_footprint_gas_scalar, + ..Default::default() + }), + timestamp: AtomicU64::new(0), + }, + ) + } + + /// The footprint and limit the transaction was rejected with, if any. + fn footprint_error( + outcome: &TransactionValidationOutcome<OpPooledTransaction>, + ) -> Option<(u64, u64)> { + match outcome { + TransactionValidationOutcome::Invalid( + _, + InvalidPoolTransactionError::MaxTxGasLimitExceeded(footprint, limit), + ) => Some((*footprint, *limit)), + _ => None, + } + } + + /// A transaction whose footprint alone exceeds the block gas limit is rejected. + #[tokio::test] + async fn rejects_footprint_above_block_gas_limit() { + let tx = large_tx(Address::with_last_byte(1)); + let footprint = tx.estimated_da_size() * u64::from(DEFAULT_SCALAR); + assert!(footprint > BLOCK_GAS_LIMIT, "fixture must exceed the limit: {footprint}"); + + let outcome = validate(tx, Some(DEFAULT_SCALAR), BLOCK_GAS_LIMIT).await; + + assert_eq!( + footprint_error(&outcome), + Some((footprint, BLOCK_GAS_LIMIT)), + "got {outcome:?}" + ); + } + + /// The limit is inclusive and uses the full block gas limit, matching the executor: a + /// footprint exactly equal to the block gas limit fits in an otherwise empty block, and + /// deposits (including the L1-info deposit) don't count towards it. + #[tokio::test] + async fn footprint_limit_is_inclusive() { + let tx = large_tx(Address::with_last_byte(1)); + let footprint = tx.estimated_da_size() * u64::from(DEFAULT_SCALAR); + + let at_limit = validate(tx.clone(), Some(DEFAULT_SCALAR), footprint).await; + assert!( + at_limit.is_valid(), + "footprint equal to the limit must be admitted: {at_limit:?}" + ); + + let over_limit = validate(tx, Some(DEFAULT_SCALAR), footprint - 1).await; + assert_eq!( + footprint_error(&over_limit), + Some((footprint, footprint - 1)), + "got {over_limit:?}" + ); + } + + /// Before Jovian the L1-info deposit carries no scalar and there is no DA footprint limit. + #[tokio::test] + async fn no_footprint_check_before_jovian() { + let outcome = + validate(large_tx(Address::with_last_byte(1)), None, BLOCK_GAS_LIMIT).await; + assert!(outcome.is_valid(), "got {outcome:?}"); + } + + /// The footprint takes a `FastLZ` pass, so it runs after the inner validator: a sender who + /// can't pay is turned away by the cheap balance lookup, whatever the footprint. + #[tokio::test] + async fn unfunded_sender_is_rejected_before_footprint_check() { + let tx = large_tx(Address::with_last_byte(1)); + let footprint = tx.estimated_da_size() * u64::from(DEFAULT_SCALAR); + assert!(footprint > BLOCK_GAS_LIMIT, "fixture must exceed the limit: {footprint}"); + + let outcome = validator(&tx, U256::ZERO, Some(DEFAULT_SCALAR), BLOCK_GAS_LIMIT) + .validate_one(TransactionOrigin::External, tx) + .await; + + assert!( + matches!( + outcome, + TransactionValidationOutcome::Invalid( + _, + InvalidPoolTransactionError::Consensus( + InvalidTransactionError::InsufficientFunds(_) + ) + ) + ), + "got {outcome:?}" + ); + } + + /// Only the inner validator enforces the input size limit, so the check must not run a + /// `FastLZ` pass over input of any size. Whether the footprint fits is irrelevant here. + #[tokio::test] + async fn oversized_tx_is_rejected_before_footprint_check() { + let tx = large_tx_with_input_len(Address::with_last_byte(1), 2 * DEFAULT_INPUT_LIMIT); + + let outcome = validate(tx, Some(DEFAULT_SCALAR), BLOCK_GAS_LIMIT).await; + + assert!( + matches!( + outcome, + TransactionValidationOutcome::Invalid( + _, + InvalidPoolTransactionError::OversizedData { .. } + ) + ), + "got {outcome:?}" + ); + } + + /// Whether network gossip would take reputation from a peer that sent this transaction. + fn penalizes_peer(err: InvalidPoolTransactionError) -> bool { + PoolError::new(B256::ZERO, PoolErrorKind::InvalidTransaction(err)).is_bad_transaction() + } + + /// `miner_setGasLimit` only exists on this node, so a peer relaying a transaction above it + /// isn't misbehaving and mustn't lose reputation for it. + #[tokio::test] + async fn gas_above_operator_limit_does_not_penalize_peers() { + let tx = large_tx(Address::with_last_byte(1)); + let gas = tx.gas_limit(); + let operator_limit = gas - 1; + + let outcome = validator(&tx, U256::MAX, None, BLOCK_GAS_LIMIT) + .with_gas_limit_config(OpGasLimitConfig::new(operator_limit)) + .validate_one(TransactionOrigin::External, tx) + .await; + + let TransactionValidationOutcome::Invalid(_, err) = outcome else { + panic!("got {outcome:?}"); + }; + assert!(!penalizes_peer(err)); + } + + /// Above the block gas limit every node agrees, so the peer should have known better. + #[tokio::test] + async fn gas_above_block_limit_still_penalizes_peers() { + let tx = large_tx(Address::with_last_byte(1)); + let block_gas_limit = tx.gas_limit(); + + let outcome = validator(&tx, U256::MAX, None, block_gas_limit) + .with_gas_limit_config(OpGasLimitConfig::new(1)) + .validate_one(TransactionOrigin::External, tx) + .await; + + let TransactionValidationOutcome::Invalid(_, err) = outcome else { + panic!("got {outcome:?}"); + }; + assert!(penalizes_peer(err)); + } + + /// `--dev` turns off the L1 fee requirement. The footprint check must still apply, which + /// is why it isn't part of `apply_op_checks`. + #[tokio::test] + async fn footprint_check_applies_without_l1_fee_requirement() { + let tx = large_tx(Address::with_last_byte(1)); + let footprint = tx.estimated_da_size() * u64::from(DEFAULT_SCALAR); + + let outcome = validator(&tx, U256::MAX, Some(DEFAULT_SCALAR), BLOCK_GAS_LIMIT) + .require_l1_data_gas_fee(false) + .validate_one(TransactionOrigin::External, tx) + .await; + + assert_eq!( + footprint_error(&outcome), + Some((footprint, BLOCK_GAS_LIMIT)), + "got {outcome:?}" + ); + } + } } From 3e9cd4b49d42ab2a0e9cfe6ea41c99272c563a1f Mon Sep 17 00:00:00 2001 From: StreamingFast Chain Update Bot <chain-update-bot@streamingfast.io> Date: Tue, 10 Nov 2026 00:10:48 +0000 Subject: [PATCH 19/21] Refresh ACTIVATIONS.md for op-reth v2.8.2 --- .dev/todo/update-to-op-reth-v2.8.2.md | 54 +++++++++++++++++++++++++++ ACTIVATIONS.md | 6 +-- 2 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 .dev/todo/update-to-op-reth-v2.8.2.md diff --git a/.dev/todo/update-to-op-reth-v2.8.2.md b/.dev/todo/update-to-op-reth-v2.8.2.md new file mode 100644 index 00000000000..46ef0469156 --- /dev/null +++ b/.dev/todo/update-to-op-reth-v2.8.2.md @@ -0,0 +1,54 @@ +# op-reth bump to upstream `op-reth/v2.8.2` (op-reth-v2.8.2-fh3.1) + +## Branch layout + +- `release/op-reth-2.x` at `op-reth-v2.8.1-fh3.1` (`05c87505`). Work branch: `bump/op-reth-2.8.2`. +- `op-reth/v2.8.1` is an ancestor of `op-reth/v2.8.2`: 18 upstream commits, merged with no + conflicts. +- Tag `op-reth-v2.8.2-fh3.1`: the newest tag on the branch with its upstream version replaced. + The Firehose block model is unchanged, so `fh3.1` stays. + +## Dependencies + +Upstream changes no reth, revm, alloy-evm or op-alloy version in this range (`rust/Cargo.lock` +only gains test dependencies), so neither `streamingfast/reth` nor `streamingfast/evm` needs a +new release. + +The reth and `alloy-evm` pins move from tags to the commits they point to, with the tag in a +comment: +- `streamingfast/reth` `op-reth-v2.8.1-fh3.1` -> `93fb772a` (the merge commit of reth#90). The + lock used to resolve the PR head `1d4c8b49`; both commits have the same tree. +- `streamingfast/evm` `v0.39.0-sf` -> `52afebec` (unchanged commit). +- `firehose-tracer` stays on 5.5.0. + +Nothing else in StreamingFast pins this fork except the sf-operator deployment. + +## Upstream changes that touch op-reth + +- `fdf142b5` interop filter metrics: `endpoint.up` stays up on `-321100` answers. Transaction + pool only. +- `969931cd` and the gas limit commits: `OpGasLimitConfig` moves from `reth-optimism-payload` to + `reth-optimism-txpool` (re-exported from the payload crate) and is shared with the pool, which + now rejects transactions above the operator gas limit and starts with the chain's block gas + limit. Pool and payload builder only; the Firehose code does not use `OpGasLimitConfig`. +- `L1_BLOCK_JOVIAN_SELECTOR` becomes `pub`. No behavior change. +- kona changes (`settlement_chain_id` in the rollup config, gossip test) are outside the op-reth + binary. + +## Firehose bug patterns + +1. Serial order: none found. No change to block execution, prewarming or the engine validator. +2. Emission after acceptance: none found. No new header field or post-execution check. +3. Activations: no `OpHardfork` added, `superchain-registry` stays at `13907b9b`, and + `alloy-op-hardforks` is unchanged, so no timestamp moved. Lagoon is still unscheduled in the + code but Optimism now targets mid-December 2026 for OP Mainnet and Unichain; the `0x7D` + post-exec transaction is still unsupported by `firehose-tracer` 5.5.0 and the reth mapper + (`ACTIVATIONS.md`). +4. Fields and enums: `OpTxEnvelope`, `OpTxType`, `OpReceipt` and the header are unchanged. + `op-revm` and the fee vault formulas are unchanged. +5. Transactions without a hash: not affected. + +## Status + +- Merge, CHANGELOG, ACTIVATIONS refresh: done. +- Build, unit tests, Battlefield: see the PR description. diff --git a/ACTIVATIONS.md b/ACTIVATIONS.md index 75e0619ffb8..edd5c0e4ec4 100644 --- a/ACTIVATIONS.md +++ b/ACTIVATIONS.md @@ -4,9 +4,9 @@ Every `OpHardfork` the op-reth of this fork defines, with its status on the netw op-reth image serves and its effect on the Firehose block. Review the entries that are new or whose status changed at every upstream bump, and when an activation is announced between bumps. -Statuses come from the timestamps compiled into `op-reth-v2.8.1-fh3.1`: OP Mainnet from +Statuses come from the timestamps compiled into `op-reth-v2.8.2-fh3.1`: OP Mainnet from `rust/alloy-op-hardforks/src/optimism/mainnet.rs`, Unichain from the `superchain-registry` -submodule (`13907b9b`) that the chainspec embeds at build time. Checked 2026-11-06. "Not scheduled" +submodule (`13907b9b`) that the chainspec embeds at build time. Checked 2026-11-10. "Not scheduled" means the fork has no timestamp in the code: it reaches the tracer only once a later release, or a registry update picked up by a later release, schedules it. @@ -19,4 +19,4 @@ World Chain runs from the `release/world-chain-2.x` line and is not covered here | Isthmus | Active (2025-05-09) | Active (2025-05-09) | EIP-2935 parent hash system call; EIP-7702 transactions; the OperatorFeeVault (`0x4200…001b`) credit, emitted by `OpPostTxExtras` through upstream `operator_fee_charge`. | | Jovian | Active (2025-12-02) | Active (2025-12-02) | Operator fee formula change, followed because `OpPostTxExtras` calls upstream `operator_fee_charge` with the active spec rather than a copy. Header `blobGasUsed` carries the DA footprint and is mapped as any header value. | | Karst | Active (2026-07-08) | Active (2026-07-08) | Osaka EVM rules (EIP-7825 transaction gas cap with deposits exempt, MODEXP and P256VERIFY changes, BN254 pairing input cap). No new transaction type, fee vault or system call. | -| Lagoon | Not scheduled | Not scheduled | **Blocker before activation.** Enables the trailing `0x7D` post-exec transaction (`OpTxEnvelope::PostExec`). `firehose-tracer` 5.5.0 `TxType` has no value 125, and the reth mapper converts with `expect("All transaction types handled for now")` (`streamingfast/reth` `crates/firehose/src/mapper.rs`), so the first such transaction panics the node. Lagoon also turns on post-exec gas refunds, which make receipt `gas_used` differ from EVM gas: check the gas passed to `OpPostTxExtras` against what the handler charges the fee vaults. v2.8.1 can read `lagoon_time` from the superchain registry and adds BLS12-381 MSM and pairing input caps. | +| Lagoon | Not scheduled in the code. Optimism's [interop preparation notice](https://docs.optimism.io/notices/interop-prep) targets mid-December 2026, pending governance, with no timestamp published | Not scheduled in the code; same notice and target as OP Mainnet | **Blocker before activation.** Enables the trailing `0x7D` post-exec transaction (`OpTxEnvelope::PostExec`). `firehose-tracer` 5.5.0 `TxType` has no value 125, and the reth mapper converts with `expect("All transaction types handled for now")` (`streamingfast/reth` `crates/firehose/src/mapper.rs`), so the first such transaction panics the node. Lagoon also turns on post-exec gas refunds, which make receipt `gas_used` differ from EVM gas: check the gas passed to `OpPostTxExtras` against what the handler charges the fee vaults. v2.8.1 can read `lagoon_time` from the superchain registry and adds BLS12-381 MSM and pairing input caps. | From 03770f31361cd06ad147ff881105c110b3593fa3 Mon Sep 17 00:00:00 2001 From: StreamingFast Chain Update Bot <chain-update-bot@streamingfast.io> Date: Tue, 10 Nov 2026 00:13:57 +0000 Subject: [PATCH 20/21] Pin reth and alloy-evm by commit Same commits as tags op-reth-v2.8.1-fh3.1 and v0.39.0-sf. --- rust/Cargo.lock | 216 ++++++++++++++++++++++++------------------------ rust/Cargo.toml | 156 +++++++++++++++++----------------- 2 files changed, 186 insertions(+), 186 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 4b21875fbab..c055c209215 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -433,7 +433,7 @@ dependencies = [ [[package]] name = "alloy-evm" version = "0.39.0" -source = "git+https://github.com/streamingfast/evm.git?tag=v0.39.0-sf#52afebec62600e7c89c7a9f97a35731ce3183404" +source = "git+https://github.com/streamingfast/evm.git?rev=52afebec62600e7c89c7a9f97a35731ce3183404#52afebec62600e7c89c7a9f97a35731ce3183404" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -11996,7 +11996,7 @@ checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "reth-basic-payload-builder" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12023,7 +12023,7 @@ dependencies = [ [[package]] name = "reth-chain-state" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12054,7 +12054,7 @@ dependencies = [ [[package]] name = "reth-chainspec" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-chains", "alloy-consensus 2.4.2", @@ -12074,7 +12074,7 @@ dependencies = [ [[package]] name = "reth-cli" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-genesis", "clap", @@ -12087,7 +12087,7 @@ dependencies = [ [[package]] name = "reth-cli-commands" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-chains", "alloy-consensus 2.4.2", @@ -12177,7 +12177,7 @@ dependencies = [ [[package]] name = "reth-cli-runner" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "reth-tasks", "tokio", @@ -12187,7 +12187,7 @@ dependencies = [ [[package]] name = "reth-cli-util" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -12240,7 +12240,7 @@ dependencies = [ [[package]] name = "reth-config" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "eyre", "humantime-serde", @@ -12257,7 +12257,7 @@ dependencies = [ [[package]] name = "reth-consensus" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eip7928 0.4.10", @@ -12271,7 +12271,7 @@ dependencies = [ [[package]] name = "reth-consensus-common" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12284,7 +12284,7 @@ dependencies = [ [[package]] name = "reth-consensus-debug-client" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12309,7 +12309,7 @@ dependencies = [ [[package]] name = "reth-db" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "derive_more 2.1.1", @@ -12338,7 +12338,7 @@ dependencies = [ [[package]] name = "reth-db-api" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12365,7 +12365,7 @@ dependencies = [ [[package]] name = "reth-db-common" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-genesis", @@ -12395,7 +12395,7 @@ dependencies = [ [[package]] name = "reth-db-models" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -12410,7 +12410,7 @@ dependencies = [ [[package]] name = "reth-discv4" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -12435,7 +12435,7 @@ dependencies = [ [[package]] name = "reth-discv5" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -12459,7 +12459,7 @@ dependencies = [ [[package]] name = "reth-dns-discovery" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "dashmap", @@ -12483,7 +12483,7 @@ dependencies = [ [[package]] name = "reth-downloaders" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12520,7 +12520,7 @@ dependencies = [ [[package]] name = "reth-e2e-test-utils" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12579,7 +12579,7 @@ dependencies = [ [[package]] name = "reth-ecies" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "aes 0.8.4", "alloy-primitives", @@ -12606,7 +12606,7 @@ dependencies = [ [[package]] name = "reth-engine-local" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -12629,7 +12629,7 @@ dependencies = [ [[package]] name = "reth-engine-primitives" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12656,7 +12656,7 @@ dependencies = [ [[package]] name = "reth-engine-tree" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eip7928 0.4.10", @@ -12713,7 +12713,7 @@ dependencies = [ [[package]] name = "reth-engine-util" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -12743,7 +12743,7 @@ dependencies = [ [[package]] name = "reth-era" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12761,7 +12761,7 @@ dependencies = [ [[package]] name = "reth-era-downloader" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "bytes", @@ -12777,7 +12777,7 @@ dependencies = [ [[package]] name = "reth-era-utils" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -12801,7 +12801,7 @@ dependencies = [ [[package]] name = "reth-errors" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "reth-consensus", "reth-execution-errors", @@ -12812,7 +12812,7 @@ dependencies = [ [[package]] name = "reth-eth-wire" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-chains", "alloy-primitives", @@ -12841,7 +12841,7 @@ dependencies = [ [[package]] name = "reth-eth-wire-types" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-chains", "alloy-consensus 2.4.2", @@ -12867,7 +12867,7 @@ dependencies = [ [[package]] name = "reth-ethereum" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-rpc-types-engine", "alloy-rpc-types-eth 2.4.2", @@ -12908,7 +12908,7 @@ dependencies = [ [[package]] name = "reth-ethereum-cli" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "clap", "eyre", @@ -12931,7 +12931,7 @@ dependencies = [ [[package]] name = "reth-ethereum-consensus" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -12947,7 +12947,7 @@ dependencies = [ [[package]] name = "reth-ethereum-engine-primitives" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -12963,7 +12963,7 @@ dependencies = [ [[package]] name = "reth-ethereum-forks" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eip2124", "alloy-hardforks", @@ -12977,7 +12977,7 @@ dependencies = [ [[package]] name = "reth-ethereum-payload-builder" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13007,7 +13007,7 @@ dependencies = [ [[package]] name = "reth-ethereum-primitives" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13020,7 +13020,7 @@ dependencies = [ [[package]] name = "reth-etl" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "rayon", "reth-db-api", @@ -13030,7 +13030,7 @@ dependencies = [ [[package]] name = "reth-evm" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eip7928 0.4.10", @@ -13056,7 +13056,7 @@ dependencies = [ [[package]] name = "reth-evm-ethereum" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13076,7 +13076,7 @@ dependencies = [ [[package]] name = "reth-execution-cache" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "fixed-cache", @@ -13094,7 +13094,7 @@ dependencies = [ [[package]] name = "reth-execution-errors" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-evm", "alloy-primitives", @@ -13107,7 +13107,7 @@ dependencies = [ [[package]] name = "reth-execution-types" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13126,7 +13126,7 @@ dependencies = [ [[package]] name = "reth-exex" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13164,7 +13164,7 @@ dependencies = [ [[package]] name = "reth-exex-test-utils" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eips 2.5.0", "eyre", @@ -13196,7 +13196,7 @@ dependencies = [ [[package]] name = "reth-exex-types" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -13210,7 +13210,7 @@ dependencies = [ [[package]] name = "reth-firehose" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eip7928 0.4.10", @@ -13235,7 +13235,7 @@ dependencies = [ [[package]] name = "reth-fs-util" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "serde", "serde_json", @@ -13245,7 +13245,7 @@ dependencies = [ [[package]] name = "reth-invalid-block-hooks" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -13271,7 +13271,7 @@ dependencies = [ [[package]] name = "reth-ipc" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "bytes", "futures", @@ -13291,7 +13291,7 @@ dependencies = [ [[package]] name = "reth-libmdbx" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "bitflags 2.11.1", "byteorder", @@ -13308,7 +13308,7 @@ dependencies = [ [[package]] name = "reth-mdbx-sys" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "bindgen", "cc", @@ -13317,7 +13317,7 @@ dependencies = [ [[package]] name = "reth-metrics" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "futures", "libc", @@ -13331,7 +13331,7 @@ dependencies = [ [[package]] name = "reth-net-banlist" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "ipnet", @@ -13340,7 +13340,7 @@ dependencies = [ [[package]] name = "reth-net-nat" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "futures-util", "if-addrs 0.14.0", @@ -13354,7 +13354,7 @@ dependencies = [ [[package]] name = "reth-network" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13413,7 +13413,7 @@ dependencies = [ [[package]] name = "reth-network-api" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -13438,7 +13438,7 @@ dependencies = [ [[package]] name = "reth-network-p2p" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eip7928 0.4.10", @@ -13462,7 +13462,7 @@ dependencies = [ [[package]] name = "reth-network-peers" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -13477,7 +13477,7 @@ dependencies = [ [[package]] name = "reth-network-types" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eip2124", "humantime-serde", @@ -13491,7 +13491,7 @@ dependencies = [ [[package]] name = "reth-nippy-jar" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "anyhow", "bincode 1.3.3", @@ -13509,7 +13509,7 @@ dependencies = [ [[package]] name = "reth-node-api" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-rpc-types-engine", "eyre", @@ -13533,7 +13533,7 @@ dependencies = [ [[package]] name = "reth-node-builder" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13602,7 +13602,7 @@ dependencies = [ [[package]] name = "reth-node-core" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13657,7 +13657,7 @@ dependencies = [ [[package]] name = "reth-node-ethereum" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13710,7 +13710,7 @@ dependencies = [ [[package]] name = "reth-node-ethstats" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -13734,7 +13734,7 @@ dependencies = [ [[package]] name = "reth-node-events" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -13758,7 +13758,7 @@ dependencies = [ [[package]] name = "reth-node-metrics" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "bytes", "eyre", @@ -13788,7 +13788,7 @@ dependencies = [ [[package]] name = "reth-node-types" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "reth-chainspec", "reth-db-api", @@ -14480,7 +14480,7 @@ dependencies = [ [[package]] name = "reth-payload-builder" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -14504,7 +14504,7 @@ dependencies = [ [[package]] name = "reth-payload-builder-primitives" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "pin-project", "reth-payload-primitives", @@ -14516,7 +14516,7 @@ dependencies = [ [[package]] name = "reth-payload-primitives" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -14539,7 +14539,7 @@ dependencies = [ [[package]] name = "reth-payload-util" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -14549,7 +14549,7 @@ dependencies = [ [[package]] name = "reth-payload-validator" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-rpc-types-engine", @@ -14593,7 +14593,7 @@ dependencies = [ [[package]] name = "reth-provider" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eip7928 0.4.10", @@ -14643,7 +14643,7 @@ dependencies = [ [[package]] name = "reth-prune" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -14670,7 +14670,7 @@ dependencies = [ [[package]] name = "reth-prune-types" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "arbitrary", @@ -14686,7 +14686,7 @@ dependencies = [ [[package]] name = "reth-revm" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -14701,7 +14701,7 @@ dependencies = [ [[package]] name = "reth-rpc" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-dyn-abi", @@ -14778,7 +14778,7 @@ dependencies = [ [[package]] name = "reth-rpc-api" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eips 2.5.0", "alloy-genesis", @@ -14808,7 +14808,7 @@ dependencies = [ [[package]] name = "reth-rpc-builder" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-network 2.4.2", "alloy-provider", @@ -14851,7 +14851,7 @@ dependencies = [ [[package]] name = "reth-rpc-convert" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-evm", @@ -14871,7 +14871,7 @@ dependencies = [ [[package]] name = "reth-rpc-engine-api" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -14902,7 +14902,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-api" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-dyn-abi", @@ -14949,7 +14949,7 @@ dependencies = [ [[package]] name = "reth-rpc-eth-types" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-chains", "alloy-consensus 2.4.2", @@ -14999,7 +14999,7 @@ dependencies = [ [[package]] name = "reth-rpc-layer" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-rpc-types-engine", "http 1.4.0", @@ -15015,7 +15015,7 @@ dependencies = [ [[package]] name = "reth-rpc-server-types" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "alloy-rpc-types-engine", @@ -15045,7 +15045,7 @@ dependencies = [ [[package]] name = "reth-stages" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eip7928 0.4.10", @@ -15097,7 +15097,7 @@ dependencies = [ [[package]] name = "reth-stages-api" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -15125,7 +15125,7 @@ dependencies = [ [[package]] name = "reth-stages-types" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "arbitrary", @@ -15139,7 +15139,7 @@ dependencies = [ [[package]] name = "reth-static-file" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "parking_lot", @@ -15159,7 +15159,7 @@ dependencies = [ [[package]] name = "reth-static-file-types" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "clap", @@ -15174,7 +15174,7 @@ dependencies = [ [[package]] name = "reth-storage-api" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eip7928 0.4.10", @@ -15200,7 +15200,7 @@ dependencies = [ [[package]] name = "reth-storage-errors" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -15217,7 +15217,7 @@ dependencies = [ [[package]] name = "reth-storage-overlay" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-eips 2.5.0", "alloy-primitives", @@ -15245,7 +15245,7 @@ dependencies = [ [[package]] name = "reth-tasks" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "crossbeam-utils", "dashmap", @@ -15266,7 +15266,7 @@ dependencies = [ [[package]] name = "reth-testing-utils" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -15282,7 +15282,7 @@ dependencies = [ [[package]] name = "reth-tokio-util" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "tokio", "tokio-stream", @@ -15292,7 +15292,7 @@ dependencies = [ [[package]] name = "reth-tracing" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "clap", "eyre", @@ -15312,7 +15312,7 @@ dependencies = [ [[package]] name = "reth-tracing-otlp" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "base64 0.22.1", "clap", @@ -15331,7 +15331,7 @@ dependencies = [ [[package]] name = "reth-transaction-pool" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -15376,7 +15376,7 @@ dependencies = [ [[package]] name = "reth-trie" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-eips 2.5.0", @@ -15402,7 +15402,7 @@ dependencies = [ [[package]] name = "reth-trie-common" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-consensus 2.4.2", "alloy-primitives", @@ -15430,7 +15430,7 @@ dependencies = [ [[package]] name = "reth-trie-db" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "reth-db-api", @@ -15446,7 +15446,7 @@ dependencies = [ [[package]] name = "reth-trie-parallel" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-evm", "alloy-primitives", @@ -15469,7 +15469,7 @@ dependencies = [ [[package]] name = "reth-trie-sparse" version = "2.6.0" -source = "git+https://github.com/streamingfast/reth.git?tag=op-reth-v2.8.1-fh3.1#1d4c8b49d6e4909c287955b8164c156efb09ffa2" +source = "git+https://github.com/streamingfast/reth.git?rev=93fb772a7951e7b36cc2ba6ed4b3510577e57a74#93fb772a7951e7b36cc2ba6ed4b3510577e57a74" dependencies = [ "alloy-primitives", "alloy-trie", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 917d568516e..e14c2b86397 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -374,85 +374,85 @@ reth-primitives-traits = { version = "0.7.1", default-features = false } reth-rpc-traits = { version = "0.7.0", default-features = false } reth-zstd-compressors = { version = "0.7.0", default-features = false } -# ==================== RETH CRATES (git: streamingfast/reth tag op-reth-v2.8.1-fh3.1 (following branch release/optimism-2.x), Firehose fork of upstream ethereum-optimism/reth, op-v2.6.0-2) ==================== -reth = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-basic-payload-builder = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-chain-state = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-chainspec = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-cli = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-cli-commands = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-cli-runner = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-cli-util = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-consensus = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-consensus-common = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-db = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-db-api = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-db-common = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-downloaders = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-e2e-test-utils = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-engine-local = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-engine-primitives = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-engine-tree = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-errors = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-eth-wire = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-eth-wire-types = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-ethereum = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-ethereum-cli = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-ethereum-consensus = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-ethereum-forks = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-ethereum-primitives = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-evm = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-evm-ethereum = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-execution-cache = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-execution-errors = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-execution-types = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-exex = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-exex-test-utils = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-fs-util = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-ipc = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-metrics = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-network = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-network-api = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-network-peers = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-node-api = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-node-builder = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-node-core = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-node-ethereum = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-node-events = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-node-metrics = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-payload-builder = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-payload-builder-primitives = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-payload-primitives = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-payload-util = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-payload-validator = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-provider = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-prune = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-prune-types = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-revm = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-rpc = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-rpc-api = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-rpc-builder = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-rpc-engine-api = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-rpc-eth-api = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-rpc-eth-types = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-rpc-server-types = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-stages = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-stages-types = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-static-file = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-static-file-types = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-storage-api = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-storage-errors = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-storage-overlay = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-tasks = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-tracing = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-transaction-pool = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-trie = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-trie-common = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1", default-features = false } -reth-trie-db = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } -reth-trie-parallel = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } +# ==================== RETH CRATES (git: streamingfast/reth commit of tag op-reth-v2.8.1-fh3.1 (following branch release/optimism-2.x), Firehose fork of upstream ethereum-optimism/reth, op-v2.6.0-2) ==================== +reth = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-basic-payload-builder = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-chain-state = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-chainspec = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-cli = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-cli-commands = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-cli-runner = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-cli-util = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-consensus = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-consensus-common = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-db = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-db-api = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-db-common = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-downloaders = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-e2e-test-utils = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-engine-local = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-engine-primitives = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-engine-tree = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-errors = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-eth-wire = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-eth-wire-types = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-ethereum = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-ethereum-cli = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-ethereum-consensus = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-ethereum-forks = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-ethereum-primitives = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-evm = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-evm-ethereum = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-execution-cache = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-execution-errors = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-execution-types = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-exex = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-exex-test-utils = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-fs-util = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-ipc = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-metrics = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-network = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-network-api = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-network-peers = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-node-api = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-node-builder = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-node-core = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-node-ethereum = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-node-events = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-node-metrics = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-payload-builder = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-payload-builder-primitives = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-payload-primitives = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-payload-util = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-payload-validator = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-provider = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-prune = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-prune-types = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-revm = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-rpc = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-rpc-api = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-rpc-builder = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-rpc-engine-api = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-rpc-eth-api = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-rpc-eth-types = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-rpc-server-types = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-stages = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-stages-types = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-static-file = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-static-file-types = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-storage-api = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-storage-errors = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-storage-overlay = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-tasks = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-tracing = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-transaction-pool = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-trie = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-trie-common = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74", default-features = false } # op-reth-v2.8.1-fh3.1 +reth-trie-db = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 +reth-trie-parallel = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 # StreamingFast Firehose instrumentation crate (lives in the SF reth fork only). -reth-firehose = { git = "https://github.com/streamingfast/reth.git", tag = "op-reth-v2.8.1-fh3.1" } +reth-firehose = { git = "https://github.com/streamingfast/reth.git", rev = "93fb772a7951e7b36cc2ba6ed4b3510577e57a74" } # op-reth-v2.8.1-fh3.1 # ==================== FIREHOSE TRACER (crates.io) ==================== # Track the same major as the SF reth fork (`firehose/2.x` declares `firehose-tracer = "5"`). @@ -789,4 +789,4 @@ rocksdb = { version = "0.24.0", default-features = false } # op-reth resolves stock alloy-evm and emits zero systemCalls (the SF reth fork applies the # same patch, but git-dependency patch sections do not propagate to this workspace root). # See https://github.com/alloy-rs/evm/pull/323 for the upstream PR. -alloy-evm = { git = "https://github.com/streamingfast/evm.git", tag = "v0.39.0-sf" } +alloy-evm = { git = "https://github.com/streamingfast/evm.git", rev = "52afebec62600e7c89c7a9f97a35731ce3183404" } # v0.39.0-sf From f69d24d7b01034404d12f0c94966cd2217903b96 Mon Sep 17 00:00:00 2001 From: StreamingFast Chain Update Bot <chain-update-bot@streamingfast.io> Date: Tue, 10 Nov 2026 00:13:57 +0000 Subject: [PATCH 21/21] Add the op-reth-v2.8.2-fh3.1 changelog entry --- CHANGELOG.sf.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/CHANGELOG.sf.md b/CHANGELOG.sf.md index b859ad2bd7c..29fd701c25a 100644 --- a/CHANGELOG.sf.md +++ b/CHANGELOG.sf.md @@ -9,6 +9,22 @@ The `sf-release.yml` workflow publishes the top-most version section here as the GitHub release notes (via `sfreleaser changelog extract-section`), so keep the most recent release at the top. +## op-reth-v2.8.2-fh3.1 + +Bumps the SF op-reth fork to upstream `op-reth/v2.8.2` (18 upstream commits on top of +`op-reth/v2.8.1`). + +### Changed + +* Merged upstream `op-reth/v2.8.2`, which keeps the interop transaction pool's `endpoint.up` gauge + up when a filter answers `-321100` (out of scope) and shares the operator gas limit with the + transaction pool. Block execution, the fork schedule and the reth and alloy-evm versions are + unchanged. +* Reth and `alloy-evm` are pinned by commit instead of by tag, still on `streamingfast/reth` + `op-reth-v2.8.1-fh3.1` and `streamingfast/evm` `v0.39.0-sf`. +* `ACTIVATIONS.md` records Optimism's mid-December 2026 target for Lagoon, which still has no + timestamp in the code and still needs Firehose support for the `0x7D` post-exec transaction. + ## op-reth-v2.8.1-fh3.1 Bumps the SF op-reth fork to upstream `op-reth/v2.8.1` (307 upstream commits on top of