diff --git a/.github/actions/cache-docker-images/action.yaml b/.github/actions/cache-docker-images/action.yaml index 19cc98eb425..54e2631ff6b 100644 --- a/.github/actions/cache-docker-images/action.yaml +++ b/.github/actions/cache-docker-images/action.yaml @@ -23,29 +23,29 @@ runs: id: cache-restore uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: /tmp/docker-images + path: ${{ github.workspace }}/tmp/docker-images key: ${{ inputs.cache-key-prefix }}-week${{ steps.week.outputs.num }}-${{ hashFiles('.github/actions/cache-docker-images/action.yaml', 'execution-specs/.github/actions/cache-docker-images/action.yaml') }} - name: Pull and save Docker images shell: bash run: | - mkdir -p /tmp/docker-images + mkdir -p "${{ github.workspace }}/tmp/docker-images" for image in ${{ inputs.images }}; do # Create a safe filename from image name filename=$(echo "$image" | sed 's/[\/:]/-/g').tar.gz - if [ ! -f "/tmp/docker-images/$filename" ]; then + if [ ! -f "${{ github.workspace }}/tmp/docker-images/$filename" ]; then echo "Pulling $image..." docker pull "$image" - echo "Saving $image to /tmp/docker-images/$filename..." - docker save "$image" | gzip > "/tmp/docker-images/$filename" + echo "Saving $image to ${{ github.workspace }}/tmp/docker-images/$filename..." + docker save "$image" | gzip > "${{ github.workspace }}/tmp/docker-images/$filename" else echo "Cache hit for $image, skipping pull" fi done - - name: Save Docker image cache + - name: Save Docker image cache if: steps.cache-restore.outputs.cache-hit != 'true' uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: /tmp/docker-images + path: ${{ github.workspace }}/tmp/docker-images key: ${{ inputs.cache-key-prefix }}-week${{ steps.week.outputs.num }}-${{ hashFiles('.github/actions/cache-docker-images/action.yaml', 'execution-specs/.github/actions/cache-docker-images/action.yaml') }} diff --git a/.github/actions/load-docker-images/action.yaml b/.github/actions/load-docker-images/action.yaml index 68ee3e8c8a7..711161a71c2 100644 --- a/.github/actions/load-docker-images/action.yaml +++ b/.github/actions/load-docker-images/action.yaml @@ -18,14 +18,14 @@ runs: - name: Restore Docker image cache uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 with: - path: /tmp/docker-images + path: ${{ github.workspace }}/tmp/docker-images key: ${{ inputs.cache-key-prefix }}-week${{ steps.week.outputs.num }}-${{ hashFiles('.github/actions/cache-docker-images/action.yaml', 'execution-specs/.github/actions/cache-docker-images/action.yaml') }} - name: Load cached Docker images shell: bash run: | - if [ -d /tmp/docker-images ]; then - for file in /tmp/docker-images/*.tar.gz; do + if [ -d "${{ github.workspace }}/tmp/docker-images" ]; then + for file in "${{ github.workspace }}/tmp/docker-images"/*.tar.gz; do if [ -f "$file" ]; then echo "Loading $file..." gunzip -c "$file" | docker load diff --git a/.github/configs/evm.yaml b/.github/configs/evm.yaml index c295d43bb86..8c8ccf7327a 100644 --- a/.github/configs/evm.yaml +++ b/.github/configs/evm.yaml @@ -9,5 +9,5 @@ static: targets: ["evmone-t8n"] benchmark: impl: geth - repo: ethereum/go-ethereum - ref: master \ No newline at end of file + repo: gnosischain/go-ethereum + ref: release-1.17.3-gc diff --git a/.github/configs/feature.yaml b/.github/configs/feature.yaml index 42788e4e981..25c95c5862b 100644 --- a/.github/configs/feature.yaml +++ b/.github/configs/feature.yaml @@ -13,13 +13,7 @@ benchmark_fast: fill-params: --fork=Osaka --generate-all-formats --gas-benchmark-values 100 ./tests/benchmark/compute feature_only: true -fusaka: - evm-type: eels - fill-params: --fork=Osaka - feature_only: true - bal: evm-type: eels fill-params: --fork=Amsterdam feature_only: true - diff --git a/.github/configs/fork-ranges.yaml b/.github/configs/fork-ranges.yaml index dcb4ea65ba1..4195d3b853d 100644 --- a/.github/configs/fork-ranges.yaml +++ b/.github/configs/fork-ranges.yaml @@ -13,9 +13,6 @@ - label: osaka from: Osaka until: Osaka -- label: bpo - from: BPO1 - until: BPO2 - label: amsterdam from: Amsterdam until: Amsterdam diff --git a/.github/scripts/generate_build_matrix.py b/.github/scripts/generate_build_matrix.py index de8b3b5144a..9cacd7d2ed3 100644 --- a/.github/scripts/generate_build_matrix.py +++ b/.github/scripts/generate_build_matrix.py @@ -35,7 +35,7 @@ "TangerineWhistle", "SpuriousDragon", "Byzantium", - "Constantinople", + "ConstantinopleFix", "Istanbul", "MuirGlacier", "Berlin", @@ -47,8 +47,6 @@ "Cancun", "Prague", "Osaka", - "BPO1", - "BPO2", "Amsterdam", ] diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index f6ac39271d7..6c8eaa99d89 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -88,7 +88,7 @@ jobs: name: Build Benchmark Fixture Artifact needs: [sanity-checks] # TODO: Add execute remote jobs when implemented if: github.event_name == 'push' - runs-on: ubuntu-latest + runs-on: self-hosted timeout-minutes: 720 steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/hive-fusaka.yaml b/.github/workflows/hive-bal.yaml similarity index 61% rename from .github/workflows/hive-fusaka.yaml rename to .github/workflows/hive-bal.yaml index 49c16dfc543..2eaee39a132 100644 --- a/.github/workflows/hive-fusaka.yaml +++ b/.github/workflows/hive-bal.yaml @@ -1,5 +1,4 @@ -name: Hive - Gnosis (Fusaka) - +name: Hive - BAL on: schedule: - cron: '0 0 * * *' # Run every day at 00:00 UTC @@ -7,17 +6,18 @@ on: inputs: client: type: string - default: '"go-ethereum-gnosis","reth-gnosis","nethermind-gnosis","erigon-gnosis"' - description: Comma-separated list of clients to test e.g. go-ethereum-gnosis, reth-gnosis, nethermind-gnosis, erigon-gnosis + default: '"go-ethereum","nethermind","erigon","reth"' + description: Comma-separated list of clients to test e.g. go-ethereum, reth, nethermind, erigon simulator: type: string default: >- - "gnosis/eels/consume-engine", - "gnosis/eels/consume-rlp", - "gnosis/eels/consume-sync" + [ + "gnosis/eels/consume-engine", + "gnosis/eels/consume-rlp" + ] description: >- Comma-separated list of simulators to test - e.g. gnosis/eels/consume-engine, gnosis/eels/consume-rlp, gnosis/eels/consume-sync + e.g. gnosis/eels/consume-engine, gnosis/eels/consume-rlp hive_version: type: string default: gnosischain/hive@master @@ -31,11 +31,16 @@ on: options: - docker - git + common_client_tag: + type: string + description: >- + If provided, this tag will be used for all clients, overriding individual tags/branches in client_repos and client_images + default: "bal-devnet-7" client_repos: type: string default: | { - "geth": "gnosischain/go-ethereum@v1.16.8-gc", + "geth": "gnosischain/go-ethereum@release-1.17.3-gc", "reth": "gnosischain/reth_gnosis@master", "nethermind": "NethermindEth/nethermind@master", "erigon": "erigontech/erigon@main" @@ -45,21 +50,21 @@ on: type: string default: | { - "geth": "ghcr.io/gnosischain/geth:latest", + "geth": "ghcr.io/chetna-mittal/geth:latest", "reth": "ghcr.io/gnosischain/reth_gnosis:latest", - "nethermind": "nethermind/nethermind:1.36.1", + "nethermind": "nethermind/nethermind:latest", "erigon": "erigontech/erigon:latest" } description: 'JSON object containing client docker images in format {"client": "registry:tag", ...}' env: + # Proxy GOPROXY: "${{ vars.GOPROXY }}" + # Hive action environment variables GCS_BUCKET: gnosis-hive-ui-staging - GCS_PATH: fusaka - GCS_PUBLIC_URL: https://storage.googleapis.com/gnosis-hive-ui-staging/fusaka + GCS_PATH: bal + GCS_PUBLIC_URL: https://storage.googleapis.com/gnosis-hive-ui-staging/bal INSTALL_RCLONE_VERSION: v1.68.2 - EELS_BUILD_ARG_FIXTURES: https://github.com/gnosischain/execution-spec-tests/releases/download/v0.1.0/fixtures_osaka.tar.gz - EELS_BUILD_ARG_BRANCH: forks/amsterdam # Flags used for all simulators GLOBAL_EXTRA_FLAGS: >- --client.checktimelimit=300s @@ -69,20 +74,29 @@ env: --sim.parallelism=6 --sim.buildarg fixtures=${EELS_BUILD_ARG_FIXTURES} --sim.buildarg branch=${EELS_BUILD_ARG_BRANCH} + --sim.limit='.*fork_(Amsterdam|OsakaToAmsterdamAtTime15k|Osaka).*' + --sim.limit.exact=false --sim.loglevel=3 - --sim.limit=.*Osaka.* # Flags used for the gnosis/eels/consume-rlp simulator EELS_RLP_FLAGS: >- --sim.parallelism=6 --sim.buildarg fixtures=${EELS_BUILD_ARG_FIXTURES} --sim.buildarg branch=${EELS_BUILD_ARG_BRANCH} + --sim.limit='.*fork_(Amsterdam|OsakaToAmsterdamAtTime15k|Osaka).*' + --sim.limit.exact=false + --sim.loglevel=3 + # Flags used for the gnosis/eels/execute simulator + EELS_EXECUTE_FLAGS: >- + --sim.buildarg branch=${EELS_BUILD_ARG_BRANCH} + # Flags used for the gnosis/rpc-compat simulator + RPC_COMPAT_FLAGS: >- --sim.loglevel=3 - --sim.limit=.*Osaka.* jobs: prepare: runs-on: ubuntu-latest outputs: + # Hive version hive_repo: >- ${{ steps.client_config_schedule.outputs.hive_repo || @@ -93,63 +107,80 @@ jobs: steps.client_config_schedule.outputs.hive_tag || steps.client_config_dispatch.outputs.hive_tag }} + # client_config contains the YAML client config for Hive client_config: >- ${{ steps.client_config_schedule.outputs.client_config || steps.client_config_dispatch.outputs.client_config }} steps: - - uses: gnosischain/hive-github-action/helpers/client-config@9f65ec1bd266757a681c38d38b7fc9e341b08f0a + - uses: gnosischain/hive-github-action/helpers/client-config@fd3538daf961800fee4544c882c892e6601ae2f4 if: github.event_name == 'schedule' - name: 'Client config: schedule' + name: "Client config: schedule" id: client_config_schedule with: - client_source: 'git' - hive_version: 'gnosischain/hive@master' + client_repos: | + { + "geth": "gnosischain/go-ethereum@release-1.17.3-gc", + "reth": "gnosischain/reth_gnosis@master", + "nethermind": "NethermindEth/nethermind@master", + "erigon": "erigontech/erigon@main" + } + client_source: "git" + hive_version: "gnosischain/hive@master" goproxy: ${{ env.GOPROXY }} - - uses: gnosischain/hive-github-action/helpers/client-config@9f65ec1bd266757a681c38d38b7fc9e341b08f0a + - uses: gnosischain/hive-github-action/helpers/client-config@fd3538daf961800fee4544c882c892e6601ae2f4 if: github.event_name == 'workflow_dispatch' - name: 'Client config: workflow_dispatch' + name: "Client config: workflow_dispatch" id: client_config_dispatch with: client_repos: ${{ inputs.client_repos }} client_images: ${{ inputs.client_images }} + common_client_tag: ${{ inputs.common_client_tag }} client_source: ${{ inputs.client_source }} hive_version: ${{ inputs.hive_version }} goproxy: ${{ env.GOPROXY }} test: - timeout-minutes: 2160 + timeout-minutes: 4320 needs: prepare - if: >- - github.event_name == 'schedule' || - !contains(inputs.simulator, 'consume-sync') || - (contains(inputs.simulator, 'consume-engine') || contains(inputs.simulator, 'consume-rlp')) - runs-on: ubuntu-latest + env: + # BAL-specific environment variables + HIVE_PARALLEL_TX_PROCESSING_DISABLED: "true" + HIVE_AMSTERDAM_TIMESTAMP: "1777456800" + # Hardcoded EELS build args pinned to bal@v0.1.0 + EELS_BUILD_ARG_FIXTURES: "https://github.com/gnosischain/execution-spec-tests/releases/download/bal@v0.1.0/fixtures_bal.tar.gz" + EELS_BUILD_ARG_BRANCH: "forks/amsterdam" + runs-on: >- + ${{ + matrix.simulator == 'gnosis/rpc-compat' && 'ubuntu-latest' || + contains(matrix.simulator, 'gnosis/eels/') && 'self-hosted' || + 'ubuntu-latest' + }} concurrency: group: >- - ${{ github.head_ref || inputs }}-${{ matrix.client }}-${{ matrix.simulator }} + ${{ github.head_ref || inputs || github.workflow }}-${{ matrix.client }}-${{ matrix.simulator }} strategy: fail-fast: false matrix: client: >- ${{ fromJSON(format('[{0}]', inputs.client || ' - "go-ethereum-gnosis", - "reth-gnosis", - "nethermind-gnosis", - "erigon-gnosis" + "go-ethereum", + "nethermind", + "reth", + "erigon" '))}} simulator: >- ${{ fromJSON(format('[{0}]', inputs.simulator || ' "gnosis/eels/consume-engine", "gnosis/eels/consume-rlp" '))}} - exclude: - - simulator: 'gnosis/eels/consume-sync' steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - uses: gnosischain/hive-github-action@1d88652e508626aaefa085d830ea05f422384300 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: gnosischain/hive-github-action/helpers/self-hosted-runner-dependencies@fd3538daf961800fee4544c882c892e6601ae2f4 + if: runner.environment != 'github-hosted' + - uses: gnosischain/hive-github-action@fd3538daf961800fee4544c882c892e6601ae2f4 with: hive_repository: ${{ needs.prepare.outputs.hive_repo }} hive_version: ${{ needs.prepare.outputs.hive_tag }} @@ -168,33 +199,3 @@ jobs: rclone_version: ${{ env.INSTALL_RCLONE_VERSION }} workflow_artifact_upload: true website_upload: true - - test-consume-sync-matrix: - timeout-minutes: 2160 - needs: prepare - runs-on: ubuntu-latest - concurrency: - group: ${{ github.head_ref || inputs }}-sync-matrix - if: contains(inputs.simulator || 'gnosis/eels/consume-sync', 'gnosis/eels/consume-sync') - steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - uses: gnosischain/hive-github-action@1d88652e508626aaefa085d830ea05f422384300 - with: - hive_repository: ${{ needs.prepare.outputs.hive_repo }} - hive_version: ${{ needs.prepare.outputs.hive_tag }} - client: >- - ${{ - inputs.client || '"go-ethereum-gnosis","reth-gnosis","nethermind-gnosis","erigon-gnosis"' - }} - simulator: 'gnosis/eels/consume-sync' - client_config: ${{ needs.prepare.outputs.client_config }} - extra_flags: >- - ${{ env.GLOBAL_EXTRA_FLAGS }} - gcs_upload: true - gcs_bucket: ${{ env.GCS_BUCKET }} - gcs_path: ${{ env.GCS_PATH }} - gcs_public_url: ${{ env.GCS_PUBLIC_URL }} - rclone_config: ${{ secrets.HIVE_RCLONE_CONFIG }} - rclone_version: ${{ env.INSTALL_RCLONE_VERSION }} - workflow_artifact_upload: true - website_upload: true diff --git a/.github/workflows/hive-consume.yaml b/.github/workflows/hive-consume.yaml index 4f85eccdcc6..6e96f2ed890 100644 --- a/.github/workflows/hive-consume.yaml +++ b/.github/workflows/hive-consume.yaml @@ -138,7 +138,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: gnosischain/hive - ref: fix/neth-client + ref: master path: hive # Redirect Go's caches to a per-job temp dir so the setup-go cache diff --git a/.github/workflows/hive-execute.yaml b/.github/workflows/hive-execute.yaml index bc170d73b76..7a6a12aeeaa 100644 --- a/.github/workflows/hive-execute.yaml +++ b/.github/workflows/hive-execute.yaml @@ -24,7 +24,7 @@ concurrency: jobs: cache-docker-images: name: Cache Docker Images - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout execution-specs uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 @@ -32,12 +32,12 @@ jobs: - name: Cache Docker images uses: ./.github/actions/cache-docker-images with: - images: "ghcr.io/gnosischain/geth:latest docker.io/alpine:latest docker.io/library/golang:1-alpine" + images: "ghcr.io/chetna-mittal/geth:latest docker.io/alpine:latest docker.io/library/golang:1-alpine" test-execute-remote: name: Execute Remote E2E needs: cache-docker-images - runs-on: ubuntu-latest + runs-on: self-hosted steps: - name: Checkout execution-specs uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 diff --git a/.github/workflows/hive-generic.yaml b/.github/workflows/hive-generic.yaml new file mode 100644 index 00000000000..fe41d030500 --- /dev/null +++ b/.github/workflows/hive-generic.yaml @@ -0,0 +1,181 @@ +name: Hive - Generic +on: + workflow_dispatch: + inputs: + client: + type: string + default: '["go-ethereum","reth","nethermind","erigon"]' + description: JSON array of clients to test e.g. go-ethereum, reth, nethermind, erigon + client_matrix: + type: choice + options: + - "true" + - "false" + default: "true" + description: If "true", run each client in a separate matrix job. If "false", run all clients together in a single job. + simulator: + type: string + # Disabled for now: devp2p, gnosis/consensus, gnosis/graphql + default: >- + [ + "gnosis/eels/consume-engine", + "gnosis/eels/consume-rlp", + "gnosis/engine", + "gnosis/rpc-compat" + ] + description: JSON array of simulators to test e.g. gnosis/rpc-compat, gnosis/eels/consume-engine, gnosis/eels/consume-rlp + hive_version: + type: string + default: gnosischain/hive@master + description: GitHub repository and tag for hive (repo@tag) + client_source: + type: choice + description: >- + How client images should be sourced. + 'git' will use the github repo and tag (See client_config repos). + 'docker' will use the docker registry and tag (See client_config images). + options: + - docker + - git + default: git + client_config: + type: string + default: | + { + "repos": { + "geth": "gnosischain/go-ethereum@release-1.17.3-gc", + "reth": "gnosischain/reth_gnosis@master", + "nethermind": "NethermindEth/nethermind@master", + "erigon": "erigontech/erigon@main" + }, + "images": { + "geth": "ghcr.io/chetna-mittal/geth:latest", + "reth": "ghcr.io/gnosischain/reth_gnosis:latest", + "nethermind": "nethermind/nethermind:latest", + "erigon": "erigontech/erigon:latest" + } + } + description: 'JSON object containing client configuration with "repos" and "images" objects for git and docker sources respectively' + extra_flags: + type: string + default: "" + description: Additional flags to append to the hive command + concurrency_group: + type: string + default: "default" + description: Concurrency group for the workflow + workflow_artifact_upload: + description: "Upload test results as an workflow artifact" + required: false + default: "false" + timeout_minutes: + type: string + default: "2880" + description: "Timeout in minutes for the test job (default: 2880 = 2 days)" + + +env: + # Proxy + GOPROXY: "${{ vars.GOPROXY }}" + # Hive action environment variables + GCS_BUCKET: gnosis-hive-ui-staging + GCS_PATH: generic + GCS_PUBLIC_URL: https://storage.googleapis.com/gnosis-hive-ui-staging/generic + INSTALL_RCLONE_VERSION: v1.68.2 + EELS_BUILD_ARG_FIXTURES: https://github.com/gnosischain/execution-spec-tests/releases/download/mainnet@v0.1.0/fixtures_mainnet.tar.gz + EELS_BUILD_ARG_BRANCH: forks/amsterdam + # Flags used for all simulators + GLOBAL_EXTRA_FLAGS: >- + --client.checktimelimit=180s + --sim.parallelism=4 + --docker.buildoutput + # Flags used for the gnosis/eels/consume-engine simulator + EELS_ENGINE_FLAGS: >- + --sim.buildarg fixtures=${EELS_BUILD_ARG_FIXTURES} + --sim.buildarg branch=${EELS_BUILD_ARG_BRANCH} + --sim.loglevel=3 + # Flags used for the gnosis/eels/consume-rlp simulator + EELS_RLP_FLAGS: >- + --sim.buildarg fixtures=${EELS_BUILD_ARG_FIXTURES} + --sim.buildarg branch=${EELS_BUILD_ARG_BRANCH} + --sim.loglevel=3 + # Flags used for the gnosis/rpc-compat simulator + RPC_COMPAT_FLAGS: >- + --sim.loglevel=3 + # Flags used for the gnosis/consensus simulator + # CONSENSUS_FLAGS: >- + # --sim.loglevel=3 + # Flags used for the gnosis/graphql simulator + # GRAPHQL_FLAGS: >- + # --sim.loglevel=3 + +jobs: + prepare: + runs-on: ubuntu-latest + outputs: + # Hive version + hive_repo: ${{ steps.client_config.outputs.hive_repo }} + hive_tag: ${{ steps.client_config.outputs.hive_tag }} + # client_config contains the YAML client config for Hive + client_config: ${{ steps.client_config.outputs.client_config }} + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: gnosischain/hive-github-action/helpers/client-config@fd3538daf961800fee4544c882c892e6601ae2f4 + name: "Client config" + id: client_config + with: + client_repos: ${{ toJSON(fromJSON(inputs.client_config).repos) }} + client_images: ${{ toJSON(fromJSON(inputs.client_config).images) }} + client_source: ${{ inputs.client_source }} + hive_version: ${{ inputs.hive_version }} + goproxy: ${{ env.GOPROXY }} + + test: + timeout-minutes: ${{ fromJSON(inputs.timeout_minutes) }} + needs: prepare + runs-on: >- + ${{ + matrix.simulator == 'gnosis/engine' && 'self-hosted' || + contains(matrix.simulator, 'gnosis/eels/') && 'self-hosted' || + 'ubuntu-latest' + }} + concurrency: + group: >- + ${{ github.head_ref || inputs.concurrency_group }}-${{ matrix.client }}-${{ matrix.simulator }} + strategy: + fail-fast: false + matrix: + client: >- + ${{ + inputs.client_matrix == 'true' && fromJSON(inputs.client) || + fromJSON(format('["{0}"]', join(fromJSON(inputs.client), '-'))) + }} + simulator: ${{ fromJSON(inputs.simulator)}} + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + + - uses: gnosischain/hive-github-action/helpers/self-hosted-runner-dependencies@fd3538daf961800fee4544c882c892e6601ae2f4 + if: runner.environment != 'github-hosted' + + - uses: gnosischain/hive-github-action@fd3538daf961800fee4544c882c892e6601ae2f4 + with: + hive_repository: ${{ needs.prepare.outputs.hive_repo }} + hive_version: ${{ needs.prepare.outputs.hive_tag }} + client: ${{ inputs.client_matrix == 'true' && matrix.client || join(fromJSON(inputs.client), ',') }} + simulator: ${{ matrix.simulator }} + client_config: ${{ needs.prepare.outputs.client_config }} + extra_flags: >- + ${{ env.GLOBAL_EXTRA_FLAGS }} + ${{ matrix.simulator == 'gnosis/rpc-compat' && env.RPC_COMPAT_FLAGS || '' }} + ${{ matrix.simulator == 'gnosis/eels/consume-engine' && env.EELS_ENGINE_FLAGS || '' }} + ${{ matrix.simulator == 'gnosis/eels/consume-rlp' && env.EELS_RLP_FLAGS || '' }} + ${{ inputs.extra_flags }} + gcs_upload: true + gcs_bucket: ${{ env.GCS_BUCKET }} + gcs_path: ${{ env.GCS_PATH }} + gcs_public_url: ${{ env.GCS_PUBLIC_URL }} + rclone_config: ${{ secrets.HIVE_RCLONE_CONFIG }} + rclone_version: ${{ env.INSTALL_RCLONE_VERSION }} + workflow_artifact_upload: ${{ inputs.workflow_artifact_upload }} + website_upload: true + website_index_generation: true diff --git a/.github/workflows/release_fixture_feature.yaml b/.github/workflows/release_fixture_feature.yaml index b82f4de9844..b429b65804d 100644 --- a/.github/workflows/release_fixture_feature.yaml +++ b/.github/workflows/release_fixture_feature.yaml @@ -30,7 +30,7 @@ jobs: build: name: fill (${{ matrix.label || matrix.feature }}) needs: setup - runs-on: ubuntu-latest + runs-on: self-hosted timeout-minutes: 1440 strategy: fail-fast: true diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 168322671f7..077698aba4a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -76,7 +76,7 @@ jobs: fill: name: fill (${{ matrix.label }}) - runs-on: ubuntu-latest + runs-on: self-hosted needs: static strategy: fail-fast: false @@ -117,7 +117,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} fill-pypy: - runs-on: ubuntu-latest + runs-on: self-hosted needs: static steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -134,7 +134,7 @@ jobs: PYPY_GC_MIN: "1G" json-loader: - runs-on: ubuntu-latest + runs-on: self-hosted needs: static steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -148,7 +148,7 @@ jobs: PYTEST_XDIST_AUTO_NUM_WORKERS: auto test-tests: - runs-on: ubuntu-latest + runs-on: self-hosted needs: static steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 @@ -163,7 +163,7 @@ jobs: PYTEST_XDIST_AUTO_NUM_WORKERS: auto test-tests-pypy: - runs-on: ubuntu-latest + runs-on: self-hosted needs: static steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/packages/testing/src/execution_testing/__init__.py b/packages/testing/src/execution_testing/__init__.py index 998f31b1d21..e8a5b2e3211 100644 --- a/packages/testing/src/execution_testing/__init__.py +++ b/packages/testing/src/execution_testing/__init__.py @@ -22,7 +22,6 @@ BenchmarkCodeGenerator, ExtCallGenerator, JumpLoopGenerator, - StubConfig, ) from .checklists import EIPChecklist from .exceptions import ( @@ -53,6 +52,7 @@ EOA, Alloc, AuthorizationTuple, + BalAccountAbsentValues, BalAccountChange, BalAccountExpectation, BalBalanceChange, @@ -126,6 +126,7 @@ "Address", "Alloc", "AuthorizationTuple", + "BalAccountAbsentValues", "BalAccountChange", "BalAccountExpectation", "BalBalanceChange", @@ -191,7 +192,6 @@ "StateTest", "StateTestFiller", "Storage", - "StubConfig", "Switch", "TestAddress", "TestAddress2", diff --git a/packages/testing/src/execution_testing/test_types/__init__.py b/packages/testing/src/execution_testing/test_types/__init__.py index 979a76d49ba..b9029ceb3ad 100644 --- a/packages/testing/src/execution_testing/test_types/__init__.py +++ b/packages/testing/src/execution_testing/test_types/__init__.py @@ -3,6 +3,7 @@ from .account_types import EOA, Alloc from .blob_types import Blob from .block_access_list import ( + BalAccountAbsentValues, BalAccountChange, BalAccountExpectation, BalBalanceChange, @@ -54,6 +55,7 @@ "DETERMINISTIC_FACTORY_ADDRESS", "Alloc", "AuthorizationTuple", + "BalAccountAbsentValues", "BalAccountChange", "BalAccountExpectation", "BalBalanceChange", diff --git a/plan.md b/plan.md index 3b77996c33b..82d5ee18d85 100644 --- a/plan.md +++ b/plan.md @@ -8,7 +8,7 @@ Gnosis fork of Ethereum EELS. Branch structure: `forks/osaka` (shipped), `forks/ ### 1. Extend Hive consume to multi-client -**Status**: Single-client consume (nethermind-gnosis) implemented in PR [#12](https://github.com/gnosischain/execution-specs/pull/12). Next step is extending to all 4 Gnosis clients (reth, geth, nethermind, erigon) — either as a matrix in `hive-consume.yaml` or keeping the multi-client variant as a separate manual workflow. +**Status**: Single-client consume (nethermind) implemented in PR [#12](https://github.com/gnosischain/execution-specs/pull/12). Next step is extending to all 4 Gnosis clients (reth, geth, nethermind, erigon) — either as a matrix in `hive-consume.yaml` or keeping the multi-client variant as a separate manual workflow. ### 2. Optimize fill scope for PR vs release @@ -58,4 +58,4 @@ The `gnosis-osaka` branch is based on upstream `forks/osaka`. As upstream evolve - [x] CI workflow adaptation to Gnosis infrastructure (hive repo, client configs, Docker images) - [x] CLAUDE.md created with full project documentation - [x] Branch structure: `forks/osaka`, `forks/amsterdam`, `mainnet` (upstream merge strategy) -- [x] Hive consume fix: fill+consume with nethermind-gnosis — PR [#12](https://github.com/gnosischain/execution-specs/pull/12) +- [x] Hive consume fix: fill+consume with nethermind — PR [#12](https://github.com/gnosischain/execution-specs/pull/12) diff --git a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py index 29097c49453..b276d04f74a 100644 --- a/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py +++ b/tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists.py @@ -9,6 +9,7 @@ Address, Alloc, AuthorizationTuple, + BalAccountAbsentValues, BalAccountExpectation, BalBalanceChange, BalCodeChange, @@ -3757,3 +3758,158 @@ def test_bal_gas_limit_boundary( base_fee_per_gas=base_fee_per_gas, gas_limit=gas_limit ), ) + + +@pytest.mark.parametrize( + "pre_value", + [ + pytest.param(0x00, id="slot_starts_empty"), + pytest.param(0x11, id="slot_starts_nonzero"), + pytest.param(0xBB, id="intermediate_equals_pre"), + ], +) +def test_bal_intra_tx_multiple_sstores_same_slot( + pre: Alloc, + blockchain_test: BlockchainTestFiller, + pre_value: int, +) -> None: + """ + Test that consecutive SSTOREs to the same slot within one tx produce a + single storage change with the final post-value; intermediate writes + (0xAA, 0xBB) must not appear in the BAL. + """ + alice = pre.fund_eoa(amount=10**18) + + code = ( + Op.SSTORE(0x01, 0xAA) + Op.SSTORE(0x01, 0xBB) + Op.SSTORE(0x01, 0xCC) + ) + contract = pre.deploy_contract(code=code, storage={0x01: pre_value}) + + tx = Transaction( + sender=alice, + to=contract, + gas_limit=200_000, + ) + + blockchain_test( + pre=pre, + blocks=[ + Block( + txs=[tx], + expected_block_access_list=BlockAccessListExpectation( + account_expectations={ + alice: BalAccountExpectation( + nonce_changes=[ + BalNonceChange( + block_access_index=1, post_nonce=1 + ), + ], + ), + contract: BalAccountExpectation( + storage_changes=[ + BalStorageSlot( + slot=0x01, + slot_changes=[ + BalStorageChange( + block_access_index=1, + post_value=0xCC, + ), + ], + ), + ], + storage_reads=[], + balance_changes=[], + code_changes=[], + absent_values=BalAccountAbsentValues( + storage_changes=[ + BalStorageSlot( + slot=0x01, + slot_changes=[ + BalStorageChange( + block_access_index=1, + post_value=0xAA, + ), + BalStorageChange( + block_access_index=1, + post_value=0xBB, + ), + ], + ), + ], + ), + ), + } + ), + ) + ], + post={ + alice: Account(nonce=1), + contract: Account(storage={0x01: 0xCC}), + }, + ) + + +@pytest.mark.parametrize( + "pre_value,writes", + [ + pytest.param( + 0xCC, [0xAA, 0xBB, 0xCC], id="nonzero_pre_returns_to_pre" + ), + pytest.param( + 0x00, [0xAA, 0xBB, 0x00], id="empty_pre_ephemeral_writes" + ), + ], +) +def test_bal_intra_tx_sstores_same_slot_net_zero( + pre: Alloc, + blockchain_test: BlockchainTestFiller, + pre_value: int, + writes: list[int], +) -> None: + """ + Test that consecutive SSTOREs to the same slot within one tx with a + net-zero result are filtered: the slot must appear in storage_reads + (it was accessed) but must not appear in storage_changes. + """ + alice = pre.fund_eoa(amount=10**18) + + code = Op.SSTORE(0x01, writes[0]) + for v in writes[1:]: + code += Op.SSTORE(0x01, v) + contract = pre.deploy_contract(code=code, storage={0x01: pre_value}) + + tx = Transaction( + sender=alice, + to=contract, + gas_limit=200_000, + ) + + blockchain_test( + pre=pre, + blocks=[ + Block( + txs=[tx], + expected_block_access_list=BlockAccessListExpectation( + account_expectations={ + alice: BalAccountExpectation( + nonce_changes=[ + BalNonceChange( + block_access_index=1, post_nonce=1 + ), + ], + ), + contract: BalAccountExpectation( + storage_reads=[0x01], + storage_changes=[], + balance_changes=[], + code_changes=[], + ), + } + ), + ) + ], + post={ + alice: Account(nonce=1), + contract: Account(storage={0x01: pre_value}), + }, + )