From d819ea251fd5c68cedc49a5d11b9045ed3086193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Moraczy=C5=84ski?= Date: Fri, 16 Feb 2024 15:41:31 +0100 Subject: [PATCH] Refactoring (#6635) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Resolved conflicts * max body size for http json rpc (#36) * Format * Self-recovery of TxPool max capacity * fix ProcessedTransactionsDbCleanerTests * Update txPool worst value if removal unsuccessful (#6702) (cherry picked from commit f262cb26350dcdf2fd6cbceee9f5ed4f2c5f197c) * Clearer error message for missing starting block state (#6672) * Update txPool worst value if removal unsuccessful (#6702) * Add Cancun hard-fork settings for Gnosis (#6709) * Cancun spec and config for mainnet (#6679) * Add Paris release spec class for completeness (#6633) * 0.0.0.0 to + --------- Co-authored-by: smartprogrammer Co-authored-by: Marcin Sobczak Co-authored-by: Ben Adams Co-authored-by: Ruben Buniatyan Co-authored-by: Ahmad Bitar <33181301+smartprogrammer93@users.noreply.github.com> Co-authored-by: Kamil ChodoĊ‚a Co-authored-by: Lukasz Rozmej --- .github/workflows/hive-consensus-tests.yml | 6709 +---------------- .../Ethereum.Test.Base/BlockchainTestBase.cs | 7 +- .../AuRaSealValidatorTests.cs | 2 +- .../Nethermind.AuRa.Test/AuRaSealerTests.cs | 4 +- .../Validators/ListValidatorTests.cs | 2 +- .../BlockchainProcessorTests.cs | 4 +- .../InvalidBlockException.cs | 9 +- .../AuRaBlockProcessor.cs | 10 +- .../AuRaSealValidator.cs | 4 +- .../Nethermind.Consensus.AuRa/AuRaSealer.cs | 4 +- .../Validators/AuRaValidatorBase.cs | 7 +- .../Validators/IValidSealerStrategy.cs | 3 +- .../Validators/ValidSealerStrategy.cs | 3 +- .../Processing/BlockExtensions.cs | 17 +- ...sor.BlockProductionTransactionsExecutor.cs | 17 +- ...sor.BlockValidationTransactionsExecutor.cs | 16 +- .../Processing/BlockProcessor.cs | 2 +- .../Processing/BlockchainProcessor.cs | 51 +- .../TransactionProcessorAdapterExtensions.cs | 5 +- .../Builders/BlockTreeBuilder.cs | 15 +- .../Extensions/SpanExtensions.cs | 7 + .../Nethermind.Evm.Test/Eip3860Tests.cs | 18 +- .../Tracing/ParityLikeTxTracerTests.cs | 9 +- .../TransactionProcessorTests.cs | 128 +- .../TransactionSubstateTests.cs | 109 +- .../VirtualMachineTests.cs | 2 +- .../BuildUpTransactionProcessorAdapter.cs | 2 +- ...llAndRestoreTransactionProcessorAdapter.cs | 2 +- .../ChangeableTransactionProcessorAdapter.cs | 4 +- .../ExecuteTransactionProcessorAdapter.cs | 2 +- .../ITransactionProcessor.cs | 8 +- .../ITransactionProcessorAdapter.cs | 2 +- .../ReadOnlyTransactionProcessor.cs | 8 +- .../TraceTransactionProcessorAdapter.cs | 2 +- .../TransactionProcessor.cs | 310 +- .../Nethermind.Evm/TransactionSubstate.cs | 93 +- .../Nethermind.Evm/VirtualMachine.cs | 15 +- .../BlockchainBridgeTests.cs | 2 +- .../Nethermind.Facade/BlockchainBridge.cs | 17 +- .../Modules/Eth/EthRpcModuleTests.cs | 1 + .../Modules/Proof/ProofRpcModuleTests.cs | 38 +- .../Nethermind.JsonRpc/JsonRpcUrl.cs | 4 +- .../JsonRpcUrlCollection.cs | 8 +- .../Modules/Proof/ProofModuleFactory.cs | 4 +- .../Modules/Trace/TraceModuleFactory.cs | 3 +- .../Withdrawals/AuraWithdrawalProcessor.cs | 2 +- .../ProcessedTransactionsDbCleanerTests.cs | 2 +- .../OptimismTransactionProcessor.cs | 62 +- .../Nethermind.Runner/JsonRpc/Startup.cs | 4 + .../WebSocketExtensionsTests.cs | 15 +- .../Nethermind.Sockets/SocketClient.cs | 6 +- 51 files changed, 726 insertions(+), 7054 deletions(-) diff --git a/.github/workflows/hive-consensus-tests.yml b/.github/workflows/hive-consensus-tests.yml index 0f1ca2b677f..a8b0fe06fe6 100644 --- a/.github/workflows/hive-consensus-tests.yml +++ b/.github/workflows/hive-consensus-tests.yml @@ -1,6634 +1,175 @@ -name: 'Hive consensus tests' +name: 'Hive consensus tests' on: - push: - tags: ['*'] + workflow_run: + workflows: ["Publish Docker image"] + branches: ["release/*"] + types: + - completed workflow_dispatch: inputs: parallelism: - description: 'Number of concurrently running tests in each job. With 1 or 2 timeout is likely. With 4 or more false-positive fails are likely. Recommended is 3 to avoid timeouts and reduce false-positives' + description: 'Number of concurrently running tests in each job.' required: true - default: '3' + default: '8' type: choice options: ['1', '2', '3', '4', '8', '16'] jobs: - test_1: - name: 1. Combined tests (e.g. stArgsZeroOneBalance) + create_docker_image: + name: "Generate docker image" + outputs: + cleanRef: ${{ steps.prepare_ref.outputs.cleanRef }} runs-on: ubuntu-latest steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stArgsZeroOneBalance - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stArgsZeroOneBalance --sim.parallelism $PARALLELISM - - name: Run stAttackTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stAttackTest --sim.parallelism $PARALLELISM - - name: Run badOpcodes - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /badOpcodes --sim.parallelism $PARALLELISM - - name: Run eip2315NotRemoved - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /eip2315NotRemoved --sim.parallelism $PARALLELISM - - name: Run invalidAddr - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /invalidAddr --sim.parallelism $PARALLELISM - - name: Run invalidDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /invalidDiffPlaces --sim.parallelism $PARALLELISM - - name: Run measureGas - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /measureGas --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_2: - name: 2. Combined tests (e.g. opc0CDiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opc0CDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc0CDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc0DDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc0DDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc0EDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc0EDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc0FDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc0FDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc1EDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc1EDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc1FDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc1FDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc21DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc21DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc22DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc22DiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_3: - name: 3. Combined tests (e.g. opc23DiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opc23DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc23DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc24DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc24DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc25DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc25DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc26DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc26DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc27DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc27DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc28DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc28DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc29DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc29DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc2ADiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc2ADiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_4: - name: 4. Combined tests (e.g. opc2BDiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opc2BDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc2BDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc2CDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc2CDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc2DDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc2DDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc2EDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc2EDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc2FDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc2FDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc49DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc49DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc4ADiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc4ADiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc4BDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc4BDiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_5: - name: 5. Combined tests (e.g. opc4CDiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opc4CDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc4CDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc4DDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc4DDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc4EDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc4EDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc4FDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc4FDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc5CDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc5CDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc5DDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc5DDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc5EDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc5EDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opc5FDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opc5FDiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_6: - name: 6. Combined tests (e.g. opcA5DiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcA5DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcA5DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcA6DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcA6DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcA7DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcA7DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcA8DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcA8DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcA9DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcA9DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcAADiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcAADiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcABDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcABDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcACDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcACDiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_7: - name: 7. Combined tests (e.g. opcADDiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcADDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcADDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcAEDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcAEDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcAFDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcAFDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcB0DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcB0DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcB1DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcB1DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcB2DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcB2DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcB3DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcB3DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcB4DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcB4DiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_8: - name: 8. Combined tests (e.g. opcB5DiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcB5DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcB5DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcB6DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcB6DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcB7DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcB7DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcB8DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcB8DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcB9DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcB9DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcBADiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcBADiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcBBDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcBBDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcBCDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcBCDiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_9: - name: 9. Combined tests (e.g. opcBDDiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcBDDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcBDDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcBEDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcBEDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcBFDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcBFDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcC0DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcC0DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcC1DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcC1DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcC2DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcC2DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcC3DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcC3DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcC4DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcC4DiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_10: - name: 10. Combined tests (e.g. opcC5DiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcC5DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcC5DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcC6DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcC6DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcC7DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcC7DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcC8DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcC8DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcC9DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcC9DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcCADiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcCADiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcCBDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcCBDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcCCDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcCCDiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_11: - name: 11. Combined tests (e.g. opcCDDiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcCDDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcCDDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcCEDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcCEDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcCFDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcCFDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcD0DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcD0DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcD1DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcD1DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcD2DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcD2DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcD3DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcD3DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcD4DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcD4DiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_12: - name: 12. Combined tests (e.g. opcD5DiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcD5DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcD5DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcD6DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcD6DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcD7DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcD7DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcD8DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcD8DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcD9DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcD9DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcDADiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcDADiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcDBDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcDBDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcDCDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcDCDiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_13: - name: 13. Combined tests (e.g. opcDDDiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcDDDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcDDDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcDEDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcDEDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcDFDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcDFDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcE0DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcE0DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcE1DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcE1DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcE2DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcE2DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcE3DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcE3DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcE4DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcE4DiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_14: - name: 14. Combined tests (e.g. opcE5DiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcE5DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcE5DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcE6DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcE6DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcE7DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcE7DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcE8DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcE8DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcE9DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcE9DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcEADiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcEADiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcEBDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcEBDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcECDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcECDiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_15: - name: 15. Combined tests (e.g. opcEDDiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcEDDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcEDDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcEEDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcEEDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcEFDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcEFDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcF6DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcF6DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcF7DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcF7DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcF8DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcF8DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcF9DiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcF9DiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcFBDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcFBDiffPlaces --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_16: - name: 16. Combined tests (e.g. opcFCDiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run opcFCDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcFCDiffPlaces --sim.parallelism $PARALLELISM - - name: Run opcFEDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /opcFEDiffPlaces --sim.parallelism $PARALLELISM - - name: Run operationDiffGas - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /operationDiffGas --sim.parallelism $PARALLELISM - - name: Run undefinedOpcodeFirstByte - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /undefinedOpcodeFirstByte --sim.parallelism $PARALLELISM - - name: Run stBugs - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stBugs --sim.parallelism $PARALLELISM - - name: Run stCallCodes - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stCallCodes --sim.parallelism $PARALLELISM - - name: Run stCallCreateCallCodeTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stCallCreateCallCodeTest --sim.parallelism $PARALLELISM - - name: Run stCallDelegateCodesCallCodeHomestead - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stCallDelegateCodesCallCodeHomestead --sim.parallelism $PARALLELISM - - name: Run stCallDelegateCodesHomestead - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stCallDelegateCodesHomestead --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_17: - name: 17. Combined tests (e.g. stChainId) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stChainId - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stChainId --sim.parallelism $PARALLELISM - - name: Run stCodeCopyTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stCodeCopyTest --sim.parallelism $PARALLELISM - - name: Run stCodeSizeLimit - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stCodeSizeLimit --sim.parallelism $PARALLELISM - - name: Run stCreate2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stCreate2 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_18: - name: 18. Combined tests (e.g. stCreateTest) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stCreateTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stCreateTest --sim.parallelism $PARALLELISM - - name: Run stDelegatecallTestHomestead - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stDelegatecallTestHomestead --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_19: - name: 19. Combined tests (e.g. stEIP150singleCodeGasPrices) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stEIP150singleCodeGasPrices - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stEIP150singleCodeGasPrices --sim.parallelism $PARALLELISM - - name: Run stEIP150Specific - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stEIP150Specific --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_20: - name: 20. intrinsic - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run intrinsic - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /intrinsic --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_21: - name: 21. Combined tests (e.g. baseFeeDiffPlaces) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run baseFeeDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /baseFeeDiffPlaces --sim.parallelism $PARALLELISM - - name: Run gasPriceDiffPlaces - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /gasPriceDiffPlaces --sim.parallelism $PARALLELISM - - name: Run lowFeeCap - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /lowFeeCap --sim.parallelism $PARALLELISM - - name: Run lowGasLimit - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /lowGasLimit --sim.parallelism $PARALLELISM - - name: Run lowGasPriceOldTypes - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /lowGasPriceOldTypes --sim.parallelism $PARALLELISM - - name: Run outOfFunds - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /outOfFunds --sim.parallelism $PARALLELISM - - name: Run outOfFundsOldTypes - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /outOfFundsOldTypes --sim.parallelism $PARALLELISM - - name: Run senderBalance - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /senderBalance --sim.parallelism $PARALLELISM - - name: Run tipTooHigh - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /tipTooHigh --sim.parallelism $PARALLELISM - - name: Run transactionIntinsicBug - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /transactionIntinsicBug --sim.parallelism $PARALLELISM - - name: Run typeTwoBerlin - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /typeTwoBerlin --sim.parallelism $PARALLELISM - - name: Run valCausesOOF - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /valCausesOOF --sim.parallelism $PARALLELISM - - name: Run stEIP158Specific - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stEIP158Specific --sim.parallelism $PARALLELISM - - name: Run stEIP2930 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stEIP2930 --sim.parallelism $PARALLELISM - - name: Run stEIP3607 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stEIP3607 --sim.parallelism $PARALLELISM - - name: Run stExample - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stExample --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_22: - name: 22. buffer - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run buffer - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /buffer --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_23: - name: 23. Combined tests (e.g. stExtCodeHash) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stExtCodeHash - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stExtCodeHash --sim.parallelism $PARALLELISM - - name: Run stHomesteadSpecific - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stHomesteadSpecific --sim.parallelism $PARALLELISM - - name: Run stInitCodeTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stInitCodeTest --sim.parallelism $PARALLELISM - - name: Run stLogTests - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stLogTests --sim.parallelism $PARALLELISM - - name: Run stMemExpandingEIP150Calls - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stMemExpandingEIP150Calls --sim.parallelism $PARALLELISM - - name: Run stMemoryStressTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stMemoryStressTest --sim.parallelism $PARALLELISM - - name: Run bufferSrcOffset - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bufferSrcOffset --sim.parallelism $PARALLELISM - - name: Run callDataCopyOffset - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /callDataCopyOffset --sim.parallelism $PARALLELISM - - name: Run calldatacopy_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /calldatacopy_dejavu --sim.parallelism $PARALLELISM - - name: Run calldatacopy_dejavu2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /calldatacopy_dejavu2 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_24: - name: 24. Combined tests (e.g. codeCopyOffset) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run codeCopyOffset - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /codeCopyOffset --sim.parallelism $PARALLELISM - - name: Run codecopy_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /codecopy_dejavu --sim.parallelism $PARALLELISM - - name: Run codecopy_dejavu2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /codecopy_dejavu2 --sim.parallelism $PARALLELISM - - name: Run extcodecopy_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /extcodecopy_dejavu --sim.parallelism $PARALLELISM - - name: Run log1_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /log1_dejavu --sim.parallelism $PARALLELISM - - name: Run log2_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /log2_dejavu --sim.parallelism $PARALLELISM - - name: Run log3_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /log3_dejavu --sim.parallelism $PARALLELISM - - name: Run log4_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /log4_dejavu --sim.parallelism $PARALLELISM - - name: Run mem0b_singleByte - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem0b_singleByte --sim.parallelism $PARALLELISM - - name: Run mem31b_singleByte - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem31b_singleByte --sim.parallelism $PARALLELISM - - name: Run mem32b_singleByte - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32b_singleByte --sim.parallelism $PARALLELISM - - name: Run mem32kb+1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb+1 --sim.parallelism $PARALLELISM - - name: Run mem32kb+31 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb+31 --sim.parallelism $PARALLELISM - - name: Run mem32kb+32 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb+32 --sim.parallelism $PARALLELISM - - name: Run mem32kb+33 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb+33 --sim.parallelism $PARALLELISM - - name: Run mem32kb-1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb-1 --sim.parallelism $PARALLELISM - - name: Run mem32kb-31 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb-31 --sim.parallelism $PARALLELISM - - name: Run mem32kb-32 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb-32 --sim.parallelism $PARALLELISM - - name: Run mem32kb-33 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb-33 --sim.parallelism $PARALLELISM - - name: Run mem32kb - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb --sim.parallelism $PARALLELISM - - name: Run mem32kb_singleByte+1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb_singleByte+1 --sim.parallelism $PARALLELISM - - name: Run mem32kb_singleByte+31 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb_singleByte+31 --sim.parallelism $PARALLELISM - - name: Run mem32kb_singleByte+32 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb_singleByte+32 --sim.parallelism $PARALLELISM - - name: Run mem32kb_singleByte+33 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb_singleByte+33 --sim.parallelism $PARALLELISM - - name: Run mem32kb_singleByte-1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb_singleByte-1 --sim.parallelism $PARALLELISM - - name: Run mem32kb_singleByte-31 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb_singleByte-31 --sim.parallelism $PARALLELISM - - name: Run mem32kb_singleByte-32 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb_singleByte-32 --sim.parallelism $PARALLELISM - - name: Run mem32kb_singleByte-33 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb_singleByte-33 --sim.parallelism $PARALLELISM - - name: Run mem32kb_singleByte - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem32kb_singleByte --sim.parallelism $PARALLELISM - - name: Run mem33b_singleByte - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem33b_singleByte --sim.parallelism $PARALLELISM - - name: Run mem64kb+1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb+1 --sim.parallelism $PARALLELISM - - name: Run mem64kb+31 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb+31 --sim.parallelism $PARALLELISM - - name: Run mem64kb+32 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb+32 --sim.parallelism $PARALLELISM - - name: Run mem64kb+33 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb+33 --sim.parallelism $PARALLELISM - - name: Run mem64kb-1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb-1 --sim.parallelism $PARALLELISM - - name: Run mem64kb-31 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb-31 --sim.parallelism $PARALLELISM - - name: Run mem64kb-32 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb-32 --sim.parallelism $PARALLELISM - - name: Run mem64kb-33 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb-33 --sim.parallelism $PARALLELISM - - name: Run mem64kb - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb --sim.parallelism $PARALLELISM - - name: Run mem64kb_singleByte+1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb_singleByte+1 --sim.parallelism $PARALLELISM - - name: Run mem64kb_singleByte+31 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb_singleByte+31 --sim.parallelism $PARALLELISM - - name: Run mem64kb_singleByte+32 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb_singleByte+32 --sim.parallelism $PARALLELISM - - name: Run mem64kb_singleByte+33 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb_singleByte+33 --sim.parallelism $PARALLELISM - - name: Run mem64kb_singleByte-1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb_singleByte-1 --sim.parallelism $PARALLELISM - - name: Run mem64kb_singleByte-31 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb_singleByte-31 --sim.parallelism $PARALLELISM - - name: Run mem64kb_singleByte-32 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb_singleByte-32 --sim.parallelism $PARALLELISM - - name: Run mem64kb_singleByte-33 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb_singleByte-33 --sim.parallelism $PARALLELISM - - name: Run mem64kb_singleByte - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mem64kb_singleByte --sim.parallelism $PARALLELISM - - name: Run memCopySelf - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /memCopySelf --sim.parallelism $PARALLELISM - - name: Run memReturn - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /memReturn --sim.parallelism $PARALLELISM - - name: Run mload16bitBound - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mload16bitBound --sim.parallelism $PARALLELISM - - name: Run mload8bitBound - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mload8bitBound --sim.parallelism $PARALLELISM - - name: Run mload_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mload_dejavu --sim.parallelism $PARALLELISM - - name: Run mstore_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mstore_dejavu --sim.parallelism $PARALLELISM - - name: Run mstroe8_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /mstroe8_dejavu --sim.parallelism $PARALLELISM - - name: Run oog - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /oog --sim.parallelism $PARALLELISM - - name: Run sha3_dejavu - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sha3_dejavu --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_25: - name: 25. Combined tests (e.g. stackLimitGas_1023) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stackLimitGas_1023 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackLimitGas_1023 --sim.parallelism $PARALLELISM - - name: Run stackLimitGas_1024 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackLimitGas_1024 --sim.parallelism $PARALLELISM - - name: Run stackLimitGas_1025 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackLimitGas_1025 --sim.parallelism $PARALLELISM - - name: Run stackLimitPush31_1023 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackLimitPush31_1023 --sim.parallelism $PARALLELISM - - name: Run stackLimitPush31_1024 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackLimitPush31_1024 --sim.parallelism $PARALLELISM - - name: Run stackLimitPush31_1025 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackLimitPush31_1025 --sim.parallelism $PARALLELISM - - name: Run stackLimitPush32_1023 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackLimitPush32_1023 --sim.parallelism $PARALLELISM - - name: Run stackLimitPush32_1024 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackLimitPush32_1024 --sim.parallelism $PARALLELISM - - name: Run stackLimitPush32_1025 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackLimitPush32_1025 --sim.parallelism $PARALLELISM - - name: Run stNonZeroCallsTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stNonZeroCallsTest --sim.parallelism $PARALLELISM - - name: Run blake2B - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /blake2B --sim.parallelism $PARALLELISM - - name: Run delegatecall09Undefined - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /delegatecall09Undefined --sim.parallelism $PARALLELISM - - name: Run identity_to_bigger - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /identity_to_bigger --sim.parallelism $PARALLELISM - - name: Run identity_to_smaller - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /identity_to_smaller --sim.parallelism $PARALLELISM - - name: Run idPrecomps - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /idPrecomps --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_26: - name: 26. precompsEIP2929 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run precompsEIP2929 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /precompsEIP2929 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_27: - name: 27. Combined tests (e.g. modexp) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run modexp - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /modexp --sim.parallelism $PARALLELISM - - name: Run modexpTests - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /modexpTests --sim.parallelism $PARALLELISM - - name: Run sec80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sec80 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_28: - name: 28. Combined tests (e.g. stPreCompiledContracts2) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stPreCompiledContracts2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stPreCompiledContracts2 --sim.parallelism $PARALLELISM - - name: Run stQuadraticComplexityTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stQuadraticComplexityTest --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_29: - name: 29. stRandom - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stRandom - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stRandom --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_30: - name: 30. Combined tests (e.g. stRandom2) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stRandom2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stRandom2 --sim.parallelism $PARALLELISM - - name: Run stRecursiveCreate - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stRecursiveCreate --sim.parallelism $PARALLELISM - - name: Run stRefundTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stRefundTest --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_31: - name: 31. stReturnDataTest - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stReturnDataTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stReturnDataTest --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_32: - name: 32. Combined tests (e.g. stRevertTest) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stRevertTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stRevertTest --sim.parallelism $PARALLELISM - - name: Run stSelfBalance - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stSelfBalance --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_33: - name: 33. stSStoreTest - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stSStoreTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stSStoreTest --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_34: - name: 34. Combined tests (e.g. stShift) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stShift - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stShift --sim.parallelism $PARALLELISM - - name: Run stSLoadTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stSLoadTest --sim.parallelism $PARALLELISM - - name: Run stSolidityTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stSolidityTest --sim.parallelism $PARALLELISM - - name: Run stSpecialTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stSpecialTest --sim.parallelism $PARALLELISM - - name: Run shallowStack - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /shallowStack --sim.parallelism $PARALLELISM - - name: Run stackOverflow - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackOverflow --sim.parallelism $PARALLELISM - - name: Run stackOverflowDUP - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackOverflowDUP --sim.parallelism $PARALLELISM - - name: Run stackOverflowM1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackOverflowM1 --sim.parallelism $PARALLELISM - - name: Run stackOverflowM1DUP - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackOverflowM1DUP --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_35: - name: 35. stackOverflowM1PUSH - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stackOverflowM1PUSH - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackOverflowM1PUSH --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_36: - name: 36. underflowTest - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run underflowTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /underflowTest --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_37: - name: 37. Combined tests (e.g. stackOverflowPUSH) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stackOverflowPUSH - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackOverflowPUSH --sim.parallelism $PARALLELISM - - name: Run stackOverflowSWAP - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stackOverflowSWAP --sim.parallelism $PARALLELISM - - name: Run stacksanitySWAP - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stacksanitySWAP --sim.parallelism $PARALLELISM - - name: Run StaticcallToPrecompileFromCalledContract - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /StaticcallToPrecompileFromCalledContract --sim.parallelism $PARALLELISM - - name: Run StaticcallToPrecompileFromContractInitialization - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /StaticcallToPrecompileFromContractInitialization --sim.parallelism $PARALLELISM - - name: Run StaticcallToPrecompileFromTransaction - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /StaticcallToPrecompileFromTransaction --sim.parallelism $PARALLELISM - - name: Run static_ABAcalls0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ABAcalls0 --sim.parallelism $PARALLELISM - - name: Run static_ABAcalls1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ABAcalls1 --sim.parallelism $PARALLELISM - - name: Run static_ABAcalls2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ABAcalls2 --sim.parallelism $PARALLELISM - - name: Run static_ABAcalls3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ABAcalls3 --sim.parallelism $PARALLELISM - - name: Run static_ABAcallsSuicide0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ABAcallsSuicide0 --sim.parallelism $PARALLELISM - - name: Run static_ABAcallsSuicide1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ABAcallsSuicide1 --sim.parallelism $PARALLELISM - - name: Run static_Call10 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call10 --sim.parallelism $PARALLELISM - - name: Run static_Call1024BalanceTooLow - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call1024BalanceTooLow --sim.parallelism $PARALLELISM - - name: Run static_Call1024BalanceTooLow2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call1024BalanceTooLow2 --sim.parallelism $PARALLELISM - - name: Run static_Call1024OOG - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call1024OOG --sim.parallelism $PARALLELISM - - name: Run static_Call1024PreCalls - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call1024PreCalls --sim.parallelism $PARALLELISM - - name: Run static_Call1024PreCalls2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call1024PreCalls2 --sim.parallelism $PARALLELISM - - name: Run static_Call1024PreCalls3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call1024PreCalls3 --sim.parallelism $PARALLELISM - - name: Run static_Call1MB1024Calldepth - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call1MB1024Calldepth --sim.parallelism $PARALLELISM - - name: Run static_Call50000 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call50000 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_38: - name: 38. Combined tests (e.g. static_Call50000bytesContract50_1) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run static_Call50000bytesContract50_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call50000bytesContract50_1 --sim.parallelism $PARALLELISM - - name: Run static_Call50000bytesContract50_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call50000bytesContract50_2 --sim.parallelism $PARALLELISM - - name: Run static_Call50000bytesContract50_3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call50000bytesContract50_3 --sim.parallelism $PARALLELISM - - name: Run static_Call50000_ecrec - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call50000_ecrec --sim.parallelism $PARALLELISM - - name: Run static_Call50000_identity - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call50000_identity --sim.parallelism $PARALLELISM - - name: Run static_Call50000_identity2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call50000_identity2 --sim.parallelism $PARALLELISM - - name: Run static_Call50000_rip160 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call50000_rip160 --sim.parallelism $PARALLELISM - - name: Run static_CallAndCallcodeConsumeMoreGasThenTransactionHas - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallAndCallcodeConsumeMoreGasThenTransactionHas --sim.parallelism $PARALLELISM - - name: Run static_CallAskMoreGasOnDepth2ThenTransactionHas - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallAskMoreGasOnDepth2ThenTransactionHas --sim.parallelism $PARALLELISM - - name: Run static_callBasic - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callBasic --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001 --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_OOGE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_OOGE --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_OOGE_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_OOGE_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_OOGMAfter - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_OOGMAfter --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_OOGMAfter2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_OOGMAfter2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_OOGMAfter_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_OOGMAfter_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_OOGMAfter_3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_OOGMAfter_3 --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_OOGMBefore - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_OOGMBefore --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_OOGMBefore2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_OOGMBefore2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_SuicideEnd --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_39: - name: 39. Combined tests (e.g. static_callcallcallcode_001_SuicideEnd2) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run static_callcallcallcode_001_SuicideEnd2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_SuicideEnd2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_SuicideMiddle - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_SuicideMiddle --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_001_SuicideMiddle2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_001_SuicideMiddle2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_ABCB_RECURSIVE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_ABCB_RECURSIVE --sim.parallelism $PARALLELISM - - name: Run static_callcallcallcode_ABCB_RECURSIVE2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcallcode_ABCB_RECURSIVE2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcall_000 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcall_000 --sim.parallelism $PARALLELISM - - name: Run static_callcallcall_000_OOGE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcall_000_OOGE --sim.parallelism $PARALLELISM - - name: Run static_callcallcall_000_OOGMAfter - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcall_000_OOGMAfter --sim.parallelism $PARALLELISM - - name: Run static_callcallcall_000_OOGMAfter2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcall_000_OOGMAfter2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcall_000_OOGMBefore - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcall_000_OOGMBefore --sim.parallelism $PARALLELISM - - name: Run static_callcallcall_000_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcall_000_SuicideEnd --sim.parallelism $PARALLELISM - - name: Run static_callcallcall_000_SuicideMiddle - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcall_000_SuicideMiddle --sim.parallelism $PARALLELISM - - name: Run static_callcallcall_ABCB_RECURSIVE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcall_ABCB_RECURSIVE --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_OOGE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_OOGE --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_OOGE_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_OOGE_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_OOGMAfter - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_OOGMAfter --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_OOGMAfter2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_OOGMAfter2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_OOGMAfter_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_OOGMAfter_1 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_OOGMAfter_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_OOGMAfter_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_OOGMBefore - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_OOGMBefore --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_OOGMBefore2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_OOGMBefore2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_SuicideEnd --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_SuicideEnd2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_SuicideEnd2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_SuicideMiddle - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_SuicideMiddle --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_011_SuicideMiddle2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_011_SuicideMiddle2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_ABCB_RECURSIVE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_ABCB_RECURSIVE --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecallcode_ABCB_RECURSIVE2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecallcode_ABCB_RECURSIVE2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_OOGE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_OOGE --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_OOGE_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_OOGE_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_OOGMAfter - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_OOGMAfter --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_OOGMAfter2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_OOGMAfter2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_OOGMAfter_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_OOGMAfter_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_OOGMAfter_3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_OOGMAfter_3 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_OOGMBefore - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_OOGMBefore --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_OOGMBefore2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_OOGMBefore2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_SuicideEnd --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_SuicideEnd2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_SuicideEnd2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_SuicideMiddle - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_SuicideMiddle --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_010_SuicideMiddle2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_010_SuicideMiddle2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_ABCB_RECURSIVE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_ABCB_RECURSIVE --sim.parallelism $PARALLELISM - - name: Run static_callcallcodecall_ABCB_RECURSIVE2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcodecall_ABCB_RECURSIVE2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcode_01_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcode_01_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcode_01_OOGE_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcode_01_OOGE_2 --sim.parallelism $PARALLELISM - - name: Run static_callcallcode_01_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcode_01_SuicideEnd --sim.parallelism $PARALLELISM - - name: Run static_callcallcode_01_SuicideEnd2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcallcode_01_SuicideEnd2 --sim.parallelism $PARALLELISM - - name: Run static_callcall_00 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcall_00 --sim.parallelism $PARALLELISM - - name: Run static_callcall_00_OOGE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcall_00_OOGE --sim.parallelism $PARALLELISM - - name: Run static_callcall_00_OOGE_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcall_00_OOGE_1 --sim.parallelism $PARALLELISM - - name: Run static_callcall_00_OOGE_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcall_00_OOGE_2 --sim.parallelism $PARALLELISM - - name: Run static_callcall_00_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcall_00_SuicideEnd --sim.parallelism $PARALLELISM - - name: Run static_callChangeRevert - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callChangeRevert --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_OOGE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_OOGE --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_OOGE_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_OOGE_2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_OOGMAfter - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_OOGMAfter --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_40: - name: 40. Combined tests (e.g. static_callcodecallcallcode_101_OOGMAfter2) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run static_callcodecallcallcode_101_OOGMAfter2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_OOGMAfter2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_OOGMAfter_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_OOGMAfter_1 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_OOGMAfter_3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_OOGMAfter_3 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_OOGMBefore - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_OOGMBefore --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_OOGMBefore2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_OOGMBefore2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_SuicideEnd --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_SuicideEnd2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_SuicideEnd2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_SuicideMiddle - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_SuicideMiddle --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_101_SuicideMiddle2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_101_SuicideMiddle2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_ABCB_RECURSIVE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_ABCB_RECURSIVE --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcallcode_ABCB_RECURSIVE2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcallcode_ABCB_RECURSIVE2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_OOGE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_OOGE --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_OOGE2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_OOGE2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_OOGMAfter - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_OOGMAfter --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_OOGMAfter2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_OOGMAfter2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_OOGMAfter_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_OOGMAfter_2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_OOGMAfter_3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_OOGMAfter_3 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_OOGMBefore - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_OOGMBefore --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_OOGMBefore2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_OOGMBefore2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_SuicideEnd --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_SuicideEnd2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_SuicideEnd2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_SuicideMiddle - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_SuicideMiddle --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_100_SuicideMiddle2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_100_SuicideMiddle2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_ABCB_RECURSIVE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_ABCB_RECURSIVE --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcall_ABCB_RECURSIVE2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcall_ABCB_RECURSIVE2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecallcode_111_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecallcode_111_SuicideEnd --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_1102 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_1102 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_OOGE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_OOGE --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_OOGE2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_OOGE2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_OOGMAfter - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_OOGMAfter --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_OOGMAfter2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_OOGMAfter2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_OOGMAfter_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_OOGMAfter_2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_OOGMAfter_3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_OOGMAfter_3 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_OOGMBefore - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_OOGMBefore --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_OOGMBefore2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_OOGMBefore2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_SuicideEnd --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_SuicideEnd2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_SuicideEnd2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_SuicideMiddle - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_SuicideMiddle --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_110_SuicideMiddle2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_110_SuicideMiddle2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_ABCB_RECURSIVE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_ABCB_RECURSIVE --sim.parallelism $PARALLELISM - - name: Run static_callcodecallcodecall_ABCB_RECURSIVE2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecallcodecall_ABCB_RECURSIVE2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecall_10 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecall_10 --sim.parallelism $PARALLELISM - - name: Run static_callcodecall_10_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecall_10_2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecall_10_OOGE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecall_10_OOGE --sim.parallelism $PARALLELISM - - name: Run static_callcodecall_10_OOGE_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecall_10_OOGE_2 --sim.parallelism $PARALLELISM - - name: Run static_callcodecall_10_SuicideEnd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecall_10_SuicideEnd --sim.parallelism $PARALLELISM - - name: Run static_callcodecall_10_SuicideEnd2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcodecall_10_SuicideEnd2 --sim.parallelism $PARALLELISM - - name: Run static_callcode_checkPC - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callcode_checkPC --sim.parallelism $PARALLELISM - - name: Run static_CallContractToCreateContractAndCallItOOG - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallContractToCreateContractAndCallItOOG --sim.parallelism $PARALLELISM - - name: Run static_CallContractToCreateContractOOG - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallContractToCreateContractOOG --sim.parallelism $PARALLELISM - - name: Run static_CallContractToCreateContractOOGBonusGas - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallContractToCreateContractOOGBonusGas --sim.parallelism $PARALLELISM - - name: Run static_CallContractToCreateContractWhichWouldCreateContractIfCalled - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallContractToCreateContractWhichWouldCreateContractIfCalled --sim.parallelism $PARALLELISM - - name: Run static_callCreate - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callCreate --sim.parallelism $PARALLELISM - - name: Run static_callCreate2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callCreate2 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_41: - name: 41. Combined tests (e.g. static_callCreate3) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run static_callCreate3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callCreate3 --sim.parallelism $PARALLELISM - - name: Run static_calldelcode_01 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_calldelcode_01 --sim.parallelism $PARALLELISM - - name: Run static_calldelcode_01_OOGE - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_calldelcode_01_OOGE --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover0 --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover0_0input - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover0_0input --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover0_completeReturnValue - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover0_completeReturnValue --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover0_Gas2999 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover0_Gas2999 --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover0_gas3000 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover0_gas3000 --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover0_NoGas - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover0_NoGas --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover0_overlappingInputOutput - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover0_overlappingInputOutput --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover1 --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover2 --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover3 --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecover80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecover80 --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecoverCheckLength - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecoverCheckLength --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecoverCheckLengthWrongV - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecoverCheckLengthWrongV --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecoverH_prefixed0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecoverH_prefixed0 --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecoverR_prefixed0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecoverR_prefixed0 --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecoverS_prefixed0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecoverS_prefixed0 --sim.parallelism $PARALLELISM - - name: Run static_CallEcrecoverV_prefixed0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallEcrecoverV_prefixed0 --sim.parallelism $PARALLELISM - - name: Run static_CallGoesOOGOnSecondLevel - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallGoesOOGOnSecondLevel --sim.parallelism $PARALLELISM - - name: Run static_CallGoesOOGOnSecondLevel2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallGoesOOGOnSecondLevel2 --sim.parallelism $PARALLELISM - - name: Run static_CallIdentitiy_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallIdentitiy_1 --sim.parallelism $PARALLELISM - - name: Run static_CallIdentity_1_nonzeroValue - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallIdentity_1_nonzeroValue --sim.parallelism $PARALLELISM - - name: Run static_CallIdentity_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallIdentity_2 --sim.parallelism $PARALLELISM - - name: Run static_CallIdentity_3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallIdentity_3 --sim.parallelism $PARALLELISM - - name: Run static_CallIdentity_4 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallIdentity_4 --sim.parallelism $PARALLELISM - - name: Run static_CallIdentity_4_gas17 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallIdentity_4_gas17 --sim.parallelism $PARALLELISM - - name: Run static_CallIdentity_4_gas18 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallIdentity_4_gas18 --sim.parallelism $PARALLELISM - - name: Run static_CallIdentity_5 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallIdentity_5 --sim.parallelism $PARALLELISM - - name: Run static_CallLoseGasOOG - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallLoseGasOOG --sim.parallelism $PARALLELISM - - name: Run static_callOutput1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callOutput1 --sim.parallelism $PARALLELISM - - name: Run static_callOutput2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callOutput2 --sim.parallelism $PARALLELISM - - name: Run static_callOutput3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callOutput3 --sim.parallelism $PARALLELISM - - name: Run static_callOutput3Fail - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callOutput3Fail --sim.parallelism $PARALLELISM - - name: Run static_callOutput3partial - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callOutput3partial --sim.parallelism $PARALLELISM - - name: Run static_callOutput3partialFail - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callOutput3partialFail --sim.parallelism $PARALLELISM - - name: Run static_CallRecursiveBomb0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRecursiveBomb0 --sim.parallelism $PARALLELISM - - name: Run static_CallRecursiveBomb0_OOG_atMaxCallDepth - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRecursiveBomb0_OOG_atMaxCallDepth --sim.parallelism $PARALLELISM - - name: Run static_CallRecursiveBomb1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRecursiveBomb1 --sim.parallelism $PARALLELISM - - name: Run static_CallRecursiveBomb2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRecursiveBomb2 --sim.parallelism $PARALLELISM - - name: Run static_CallRecursiveBomb3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRecursiveBomb3 --sim.parallelism $PARALLELISM - - name: Run static_CallRecursiveBombLog - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRecursiveBombLog --sim.parallelism $PARALLELISM - - name: Run static_CallRecursiveBombLog2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRecursiveBombLog2 --sim.parallelism $PARALLELISM - - name: Run static_CallRecursiveBombPreCall - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRecursiveBombPreCall --sim.parallelism $PARALLELISM - - name: Run static_CallRecursiveBombPreCall2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRecursiveBombPreCall2 --sim.parallelism $PARALLELISM - - name: Run static_CallRipemd160_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRipemd160_1 --sim.parallelism $PARALLELISM - - name: Run static_CallRipemd160_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRipemd160_2 --sim.parallelism $PARALLELISM - - name: Run static_CallRipemd160_3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRipemd160_3 --sim.parallelism $PARALLELISM - - name: Run static_CallRipemd160_3_postfixed0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRipemd160_3_postfixed0 --sim.parallelism $PARALLELISM - - name: Run static_CallRipemd160_3_prefixed0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRipemd160_3_prefixed0 --sim.parallelism $PARALLELISM - - name: Run static_CallRipemd160_4 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRipemd160_4 --sim.parallelism $PARALLELISM - - name: Run static_CallRipemd160_4_gas719 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRipemd160_4_gas719 --sim.parallelism $PARALLELISM - - name: Run static_CallRipemd160_5 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallRipemd160_5 --sim.parallelism $PARALLELISM - - name: Run static_CallSha256_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallSha256_1 --sim.parallelism $PARALLELISM - - name: Run static_CallSha256_1_nonzeroValue - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallSha256_1_nonzeroValue --sim.parallelism $PARALLELISM - - name: Run static_CallSha256_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallSha256_2 --sim.parallelism $PARALLELISM - - name: Run static_CallSha256_3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallSha256_3 --sim.parallelism $PARALLELISM - - name: Run static_CallSha256_3_postfix0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallSha256_3_postfix0 --sim.parallelism $PARALLELISM - - name: Run static_CallSha256_3_prefix0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallSha256_3_prefix0 --sim.parallelism $PARALLELISM - - name: Run static_CallSha256_4 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallSha256_4 --sim.parallelism $PARALLELISM - - name: Run static_CallSha256_4_gas99 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallSha256_4_gas99 --sim.parallelism $PARALLELISM - - name: Run static_CallSha256_5 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallSha256_5 --sim.parallelism $PARALLELISM - - name: Run static_callToCallCodeOpCodeCheck - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callToCallCodeOpCodeCheck --sim.parallelism $PARALLELISM - - name: Run static_callToCallOpCodeCheck - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callToCallOpCodeCheck --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_42: - name: 42. Combined tests (e.g. static_callToDelCallOpCodeCheck) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run static_callToDelCallOpCodeCheck - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callToDelCallOpCodeCheck --sim.parallelism $PARALLELISM - - name: Run static_CallToNameRegistrator0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallToNameRegistrator0 --sim.parallelism $PARALLELISM - - name: Run static_CallToReturn1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CallToReturn1 --sim.parallelism $PARALLELISM - - name: Run static_CalltoReturn2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CalltoReturn2 --sim.parallelism $PARALLELISM - - name: Run static_callToStaticOpCodeCheck - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callToStaticOpCodeCheck --sim.parallelism $PARALLELISM - - name: Run static_callWithHighValue - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callWithHighValue --sim.parallelism $PARALLELISM - - name: Run static_callWithHighValueAndGasOOG - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callWithHighValueAndGasOOG --sim.parallelism $PARALLELISM - - name: Run static_callWithHighValueAndOOGatTxLevel - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callWithHighValueAndOOGatTxLevel --sim.parallelism $PARALLELISM - - name: Run static_callWithHighValueOOGinCall - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_callWithHighValueOOGinCall --sim.parallelism $PARALLELISM - - name: Run static_CALL_OneVCallSuicide - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CALL_OneVCallSuicide --sim.parallelism $PARALLELISM - - name: Run static_call_OOG_additionalGasCosts1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_call_OOG_additionalGasCosts1 --sim.parallelism $PARALLELISM - - name: Run static_call_OOG_additionalGasCosts2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_call_OOG_additionalGasCosts2 --sim.parallelism $PARALLELISM - - name: Run static_call_value_inherit - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_call_value_inherit --sim.parallelism $PARALLELISM - - name: Run static_call_value_inherit_from_call - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_call_value_inherit_from_call --sim.parallelism $PARALLELISM - - name: Run static_CALL_ZeroVCallSuicide - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CALL_ZeroVCallSuicide --sim.parallelism $PARALLELISM - - name: Run static_CheckCallCostOOG - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CheckCallCostOOG --sim.parallelism $PARALLELISM - - name: Run static_CheckOpcodes - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CheckOpcodes --sim.parallelism $PARALLELISM - - name: Run static_CheckOpcodes2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CheckOpcodes2 --sim.parallelism $PARALLELISM - - name: Run static_CheckOpcodes3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CheckOpcodes3 --sim.parallelism $PARALLELISM - - name: Run static_CheckOpcodes4 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CheckOpcodes4 --sim.parallelism $PARALLELISM - - name: Run static_CheckOpcodes5 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CheckOpcodes5 --sim.parallelism $PARALLELISM - - name: Run static_contractCreationMakeCallThatAskMoreGasThenTransactionProvided - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_contractCreationMakeCallThatAskMoreGasThenTransactionProvided --sim.parallelism $PARALLELISM - - name: Run static_contractCreationOOGdontLeaveEmptyContractViaTransaction - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_contractCreationOOGdontLeaveEmptyContractViaTransaction --sim.parallelism $PARALLELISM - - name: Run static_CREATE_ContractSuicideDuringInit - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CREATE_ContractSuicideDuringInit --sim.parallelism $PARALLELISM - - name: Run static_CREATE_ContractSuicideDuringInit_ThenStoreThenReturn - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CREATE_ContractSuicideDuringInit_ThenStoreThenReturn --sim.parallelism $PARALLELISM - - name: Run static_CREATE_ContractSuicideDuringInit_WithValue - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CREATE_ContractSuicideDuringInit_WithValue --sim.parallelism $PARALLELISM - - name: Run static_CREATE_EmptyContractAndCallIt_0wei - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CREATE_EmptyContractAndCallIt_0wei --sim.parallelism $PARALLELISM - - name: Run static_CREATE_EmptyContractWithStorageAndCallIt_0wei - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_CREATE_EmptyContractWithStorageAndCallIt_0wei --sim.parallelism $PARALLELISM - - name: Run static_ExecuteCallThatAskForeGasThenTrabsactionHas - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ExecuteCallThatAskForeGasThenTrabsactionHas --sim.parallelism $PARALLELISM - - name: Run static_InternalCallHittingGasLimit - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_InternalCallHittingGasLimit --sim.parallelism $PARALLELISM - - name: Run static_InternalCallHittingGasLimit2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_InternalCallHittingGasLimit2 --sim.parallelism $PARALLELISM - - name: Run static_InternlCallStoreClearsOOG - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_InternlCallStoreClearsOOG --sim.parallelism $PARALLELISM - - name: Run static_log0_emptyMem - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log0_emptyMem --sim.parallelism $PARALLELISM - - name: Run static_log0_logMemsizeTooHigh - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log0_logMemsizeTooHigh --sim.parallelism $PARALLELISM - - name: Run static_log0_logMemsizeZero - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log0_logMemsizeZero --sim.parallelism $PARALLELISM - - name: Run static_log0_logMemStartTooHigh - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log0_logMemStartTooHigh --sim.parallelism $PARALLELISM - - name: Run static_log0_nonEmptyMem - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log0_nonEmptyMem --sim.parallelism $PARALLELISM - - name: Run static_log0_nonEmptyMem_logMemSize1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log0_nonEmptyMem_logMemSize1 --sim.parallelism $PARALLELISM - - name: Run static_log0_nonEmptyMem_logMemSize1_logMemStart31 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log0_nonEmptyMem_logMemSize1_logMemStart31 --sim.parallelism $PARALLELISM - - name: Run static_log1_emptyMem - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log1_emptyMem --sim.parallelism $PARALLELISM - - name: Run static_log1_logMemsizeTooHigh - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log1_logMemsizeTooHigh --sim.parallelism $PARALLELISM - - name: Run static_log1_logMemsizeZero - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log1_logMemsizeZero --sim.parallelism $PARALLELISM - - name: Run static_log1_logMemStartTooHigh - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log1_logMemStartTooHigh --sim.parallelism $PARALLELISM - - name: Run static_log1_MaxTopic - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log1_MaxTopic --sim.parallelism $PARALLELISM - - name: Run static_log_Caller - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_log_Caller --sim.parallelism $PARALLELISM - - name: Run static_LoopCallsDepthThenRevert - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_LoopCallsDepthThenRevert --sim.parallelism $PARALLELISM - - name: Run static_LoopCallsDepthThenRevert2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_LoopCallsDepthThenRevert2 --sim.parallelism $PARALLELISM - - name: Run static_LoopCallsDepthThenRevert3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_LoopCallsDepthThenRevert3 --sim.parallelism $PARALLELISM - - name: Run static_LoopCallsThenRevert - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_LoopCallsThenRevert --sim.parallelism $PARALLELISM - - name: Run static_makeMoney - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_makeMoney --sim.parallelism $PARALLELISM - - name: Run static_PostToReturn1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_PostToReturn1 --sim.parallelism $PARALLELISM - - name: Run static_RawCallGasAsk - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_RawCallGasAsk --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_43: - name: 43. sstore_combinations_initial00 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial00 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial00 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_44: - name: 44. sstore_combinations_initial00_2 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial00_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial00_2 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_45: - name: 45. sstore_combinations_initial01 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial01 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial01 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_46: - name: 46. sstore_combinations_initial01_2 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial01_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial01_2 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_47: - name: 47. sstore_combinations_initial10 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial10 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial10 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_48: - name: 48. sstore_combinations_initial10_2 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial10_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial10_2 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_49: - name: 49. sstore_combinations_initial11 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial11 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial11 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_50: - name: 50. sstore_combinations_initial11_2 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial11_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial11_2 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_51: - name: 51. sstore_combinations_initial20 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial20 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial20 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_52: - name: 52. sstore_combinations_initial20_2 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial20_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial20_2 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_53: - name: 53. sstore_combinations_initial21 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial21 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial21 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_54: - name: 54. sstore_combinations_initial21_2 - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run sstore_combinations_initial21_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /sstore_combinations_initial21_2 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_55: - name: 55. Combined tests (e.g. static_refund_CallA) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run static_refund_CallA - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_refund_CallA --sim.parallelism $PARALLELISM - - name: Run static_refund_CallToSuicideNoStorage - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_refund_CallToSuicideNoStorage --sim.parallelism $PARALLELISM - - name: Run static_refund_CallToSuicideTwice - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_refund_CallToSuicideTwice --sim.parallelism $PARALLELISM - - name: Run static_Return50000_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Return50000_2 --sim.parallelism $PARALLELISM - - name: Run static_ReturnTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ReturnTest --sim.parallelism $PARALLELISM - - name: Run static_ReturnTest2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ReturnTest2 --sim.parallelism $PARALLELISM - - name: Run static_RETURN_Bounds - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_RETURN_Bounds --sim.parallelism $PARALLELISM - - name: Run static_RETURN_BoundsOOG - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_RETURN_BoundsOOG --sim.parallelism $PARALLELISM - - name: Run static_RevertDepth2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_RevertDepth2 --sim.parallelism $PARALLELISM - - name: Run static_RevertOpcodeCalls - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_RevertOpcodeCalls --sim.parallelism $PARALLELISM - - name: Run static_ZeroValue_CALL_OOGRevert - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ZeroValue_CALL_OOGRevert --sim.parallelism $PARALLELISM - - name: Run static_ZeroValue_SUICIDE_OOGRevert - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_ZeroValue_SUICIDE_OOGRevert --sim.parallelism $PARALLELISM - - name: Run stStaticFlagEnabled - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stStaticFlagEnabled --sim.parallelism $PARALLELISM - - name: Run stSystemOperationsTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stSystemOperationsTest --sim.parallelism $PARALLELISM - - name: Run CALLBlake2f_MaxRounds - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /CALLBlake2f_MaxRounds --sim.parallelism $PARALLELISM - - name: Run static_Call50000_sha256 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /static_Call50000_sha256 --sim.parallelism $PARALLELISM - - name: Run stTransactionTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stTransactionTest --sim.parallelism $PARALLELISM - - name: Run stTransitionTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stTransitionTest --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_56: - name: 56. Combined tests (e.g. stWalletTest) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run stWalletTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stWalletTest --sim.parallelism $PARALLELISM - - name: Run stZeroCallsRevert - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stZeroCallsRevert --sim.parallelism $PARALLELISM - - name: Run stZeroCallsTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stZeroCallsTest --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_2_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_2_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_2_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_2_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_340282366920938463463374607431768211456_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_340282366920938463463374607431768211456_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_340282366920938463463374607431768211456_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_340282366920938463463374607431768211456_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_340282366920938463463374607431768211456_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_340282366920938463463374607431768211456_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_340282366920938463463374607431768211456_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_340282366920938463463374607431768211456_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_340282366920938463463374607431768211456_28000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_340282366920938463463374607431768211456_28000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_340282366920938463463374607431768211456_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_340282366920938463463374607431768211456_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_5616_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_5616_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_5616_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_5616_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_5616_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_5616_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_5617_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_5617_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_5617_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_5617_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_5617_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_5617_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_5617_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_5617_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_616_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_616_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_9935_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_9935_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_9935_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_9935_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_9935_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_9935_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_9935_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_9935_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_9_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_9_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_9_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_9_21000_96 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_57: - name: 57. Combined tests (e.g. ecmul_1-2_9_28000_128) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run ecmul_1-2_9_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_9_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_9_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_9_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_0_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_0_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_0_21000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_0_21000_64 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_0_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_0_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_0_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_0_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_0_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_0_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_0_28000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_0_28000_64 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_0_28000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_0_28000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_0_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_0_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_1_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_1_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_1_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_1_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_1_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_1_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_1_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_1_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_2_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_2_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_2_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_2_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_2_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_2_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_2_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_2_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_340282366920938463463374607431768211456_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_340282366920938463463374607431768211456_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_340282366920938463463374607431768211456_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_340282366920938463463374607431768211456_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_340282366920938463463374607431768211456_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_340282366920938463463374607431768211456_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_340282366920938463463374607431768211456_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_340282366920938463463374607431768211456_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_340282366920938463463374607431768211456_28000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_340282366920938463463374607431768211456_28000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_340282366920938463463374607431768211456_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_340282366920938463463374607431768211456_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_5616_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_5616_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_5616_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_5616_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_5616_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_5616_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_5616_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_5616_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_5617_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_5617_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_5617_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_5617_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_5617_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_5617_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_5617_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_5617_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_9935_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_9935_21000_128 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_58: - name: 58. Combined tests (e.g. ecmul_1-3_9935_21000_96) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run ecmul_1-3_9935_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_9935_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_9935_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_9935_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_9935_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_9935_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_9_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_9_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_9_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_9_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_9_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_9_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-3_9_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-3_9_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_0_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_0_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_0_21000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_0_21000_64 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_0_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_0_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_0_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_0_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_0_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_0_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_0_28000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_0_28000_64 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_0_28000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_0_28000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_0_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_0_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_1456_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_1456_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_1456_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_1456_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_1456_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_1456_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_1456_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_1456_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_1456_28000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_1456_28000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_1456_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_1456_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_1_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_1_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_1_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_1_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_1_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_1_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_1_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_1_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_2_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_2_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_2_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_2_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_2_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_2_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_2_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_2_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_5616_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_5616_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_5616_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_5616_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_5616_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_5616_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_5616_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_5616_28000_96 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_59: - name: 59. Combined tests (e.g. ecmul_7827-6598_5617_21000_128) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run ecmul_7827-6598_5617_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_5617_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_5617_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_5617_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_5617_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_5617_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_5617_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_5617_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_9935_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_9935_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_9935_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_9935_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_9935_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_9935_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_9935_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_9935_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_9_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_9_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_9_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_9_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_9_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_9_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_7827-6598_9_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_7827-6598_9_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecpairing_bad_length_191 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_bad_length_191 --sim.parallelism $PARALLELISM - - name: Run ecpairing_bad_length_193 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_bad_length_193 --sim.parallelism $PARALLELISM - - name: Run ecpairing_empty_data - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_empty_data --sim.parallelism $PARALLELISM - - name: Run ecpairing_empty_data_insufficient_gas - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_empty_data_insufficient_gas --sim.parallelism $PARALLELISM - - name: Run ecpairing_one_point_fail - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_one_point_fail --sim.parallelism $PARALLELISM - - name: Run ecpairing_one_point_insufficient_gas - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_one_point_insufficient_gas --sim.parallelism $PARALLELISM - - name: Run ecpairing_one_point_not_in_subgroup - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_one_point_not_in_subgroup --sim.parallelism $PARALLELISM - - name: Run ecpairing_one_point_with_g1_zero - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_one_point_with_g1_zero --sim.parallelism $PARALLELISM - - name: Run ecpairing_one_point_with_g2_zero - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_one_point_with_g2_zero --sim.parallelism $PARALLELISM - - name: Run ecpairing_one_point_with_g2_zero_and_g1_invalid - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_one_point_with_g2_zero_and_g1_invalid --sim.parallelism $PARALLELISM - - name: Run ecpairing_perturb_g2_by_curve_order - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_perturb_g2_by_curve_order --sim.parallelism $PARALLELISM - - name: Run ecpairing_perturb_g2_by_field_modulus - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_perturb_g2_by_field_modulus --sim.parallelism $PARALLELISM - - name: Run ecpairing_perturb_g2_by_field_modulus_again - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_perturb_g2_by_field_modulus_again --sim.parallelism $PARALLELISM - - name: Run ecpairing_perturb_g2_by_one - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_perturb_g2_by_one --sim.parallelism $PARALLELISM - - name: Run ecpairing_perturb_zeropoint_by_curve_order - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_perturb_zeropoint_by_curve_order --sim.parallelism $PARALLELISM - - name: Run ecpairing_perturb_zeropoint_by_field_modulus - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_perturb_zeropoint_by_field_modulus --sim.parallelism $PARALLELISM - - name: Run ecpairing_perturb_zeropoint_by_one - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_perturb_zeropoint_by_one --sim.parallelism $PARALLELISM - - name: Run ecpairing_three_point_fail_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_three_point_fail_1 --sim.parallelism $PARALLELISM - - name: Run ecpairing_three_point_match_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_three_point_match_1 --sim.parallelism $PARALLELISM - - name: Run ecpairing_two_points_with_one_g2_zero - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_two_points_with_one_g2_zero --sim.parallelism $PARALLELISM - - name: Run ecpairing_two_point_fail_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_two_point_fail_1 --sim.parallelism $PARALLELISM - - name: Run ecpairing_two_point_fail_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_two_point_fail_2 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_60: - name: 60. Combined tests (e.g. ecpairing_two_point_match_1) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run ecpairing_two_point_match_1 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_two_point_match_1 --sim.parallelism $PARALLELISM - - name: Run ecpairing_two_point_match_2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_two_point_match_2 --sim.parallelism $PARALLELISM - - name: Run ecpairing_two_point_match_3 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_two_point_match_3 --sim.parallelism $PARALLELISM - - name: Run ecpairing_two_point_match_4 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_two_point_match_4 --sim.parallelism $PARALLELISM - - name: Run ecpairing_two_point_match_5 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_two_point_match_5 --sim.parallelism $PARALLELISM - - name: Run ecpairing_two_point_oog - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecpairing_two_point_oog --sim.parallelism $PARALLELISM - - name: Run pairingTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /pairingTest --sim.parallelism $PARALLELISM - - name: Run pointAdd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /pointAdd --sim.parallelism $PARALLELISM - - name: Run pointAddTrunc - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /pointAddTrunc --sim.parallelism $PARALLELISM - - name: Run pointMulAdd - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /pointMulAdd --sim.parallelism $PARALLELISM - - name: Run pointMulAdd2 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /pointMulAdd2 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_0-0_21000_0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_0-0_21000_0 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_0-0_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_0-0_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_0-0_21000_192 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_0-0_21000_192 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_61: - name: 61. Combined tests (e.g. ecadd_0-0_0-0_21000_64) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run ecadd_0-0_0-0_21000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_0-0_21000_64 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_0-0_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_0-0_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_0-0_25000_0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_0-0_25000_0 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_0-0_25000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_0-0_25000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_0-0_25000_192 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_0-0_25000_192 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_0-0_25000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_0-0_25000_64 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_0-0_25000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_0-0_25000_80 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_1-2_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_1-2_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_1-2_21000_192 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_1-2_21000_192 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_1-2_25000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_1-2_25000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_1-2_25000_192 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_1-2_25000_192 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_1-3_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_1-3_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-0_1-3_25000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-0_1-3_25000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-3_1-2_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-3_1-2_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_0-3_1-2_25000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_0-3_1-2_25000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-2_0-0_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-2_0-0_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-2_0-0_21000_192 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-2_0-0_21000_192 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-2_0-0_21000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-2_0-0_21000_64 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-2_0-0_25000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-2_0-0_25000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-2_0-0_25000_192 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-2_0-0_25000_192 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-2_0-0_25000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-2_0-0_25000_64 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-2_1-2_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-2_1-2_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-2_1-2_21000_192 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-2_1-2_21000_192 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-2_1-2_25000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-2_1-2_25000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-2_1-2_25000_192 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-2_1-2_25000_192 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-3_0-0_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-3_0-0_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecadd_1-3_0-0_25000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1-3_0-0_25000_80 --sim.parallelism $PARALLELISM - - name: Run ecadd_1145-3932_1145-4651_21000_192 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1145-3932_1145-4651_21000_192 --sim.parallelism $PARALLELISM - - name: Run ecadd_1145-3932_1145-4651_25000_192 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1145-3932_1145-4651_25000_192 --sim.parallelism $PARALLELISM - - name: Run ecadd_1145-3932_2969-1336_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1145-3932_2969-1336_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_1145-3932_2969-1336_25000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_1145-3932_2969-1336_25000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_6-9_19274124-124124_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_6-9_19274124-124124_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecadd_6-9_19274124-124124_25000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecadd_6-9_19274124-124124_25000_128 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_62: - name: 62. Combined tests (e.g. ecmul_0-0_0_21000_0) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run ecmul_0-0_0_21000_0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_21000_0 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_21000_40 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_21000_40 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_21000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_21000_64 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_28000_0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_28000_0 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_28000_40 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_28000_40 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_28000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_28000_64 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_28000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_28000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_0_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_0_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_1_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_1_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_1_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_1_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_1_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_1_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_1_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_1_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_2_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_2_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_2_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_2_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_2_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_2_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_2_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_2_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_340282366920938463463374607431768211456_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_340282366920938463463374607431768211456_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_340282366920938463463374607431768211456_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_340282366920938463463374607431768211456_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_340282366920938463463374607431768211456_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_340282366920938463463374607431768211456_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_340282366920938463463374607431768211456_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_340282366920938463463374607431768211456_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_340282366920938463463374607431768211456_28000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_340282366920938463463374607431768211456_28000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_340282366920938463463374607431768211456_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_340282366920938463463374607431768211456_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_5616_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_5616_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_5616_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_5616_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_5616_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_5616_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_5616_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_5616_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_5617_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_5617_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_5617_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_5617_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_5617_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_5617_28000_128 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_63: - name: 63. Combined tests (e.g. ecmul_0-0_5617_28000_96) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run ecmul_0-0_5617_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_5617_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_9935_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_9935_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_9935_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_9935_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_9935_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_9935_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_9935_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_9935_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_9_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_9_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_9_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_9_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_9_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_9_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-0_9_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-0_9_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_0_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_0_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_0_21000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_0_21000_64 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_0_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_0_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_0_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_0_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_0_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_0_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_0_28000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_0_28000_64 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_0_28000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_0_28000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_0_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_0_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_1_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_1_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_1_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_1_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_1_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_1_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_1_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_1_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_2_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_2_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_2_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_2_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_2_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_2_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_2_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_2_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_340282366920938463463374607431768211456_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_340282366920938463463374607431768211456_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_340282366920938463463374607431768211456_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_340282366920938463463374607431768211456_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_340282366920938463463374607431768211456_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_340282366920938463463374607431768211456_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_340282366920938463463374607431768211456_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_340282366920938463463374607431768211456_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_340282366920938463463374607431768211456_28000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_340282366920938463463374607431768211456_28000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_340282366920938463463374607431768211456_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_340282366920938463463374607431768211456_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_5616_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_5616_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_5616_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_5616_21000_96 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_64: - name: 64. Combined tests (e.g. ecmul_0-3_5616_28000_128) + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_branch || github.ref }} + + - name: Prepare docker tag + id: prepare_ref + run: | + REF_NAME=${{ github.event.workflow_run.head_branch || github.ref }} + CLEAN_REF=$(echo "${REF_NAME/refs\/heads\//}" | sed 's/[^a-zA-Z0-9._-]/-/g') + echo "CLEAN_REF=$CLEAN_REF" >> $GITHUB_ENV + echo "cleanRef=$CLEAN_REF" >> $GITHUB_OUTPUT + + - name: Set Repo and Org Variables + id: cleanup + run: | + echo "ORG_NAME=${{ github.repository_owner }}" >> $GITHUB_ENV + echo "REPO_NAME=${{ github.event.repository.name }}" >> $GITHUB_ENV + + - name: Check if master or release branch + id: check_conditions + run: | + ref="${{ github.event.workflow_run.head_branch || github.ref }}" + + # Append "refs/heads/" prefix if it's not already there + if [[ $ref != refs/heads/* ]]; then + ref="refs/heads/$ref" + fi + + if [[ "$ref" == "refs/heads/master" || $ref == refs/heads/release* ]]; then + echo "skip_docker_build=true" >> $GITHUB_OUTPUT + else + echo "skip_docker_build=false" >> $GITHUB_OUTPUT + fi + + - name: Trigger Docker Build Action with Cleaned Ref + if: steps.check_conditions.outputs.skip_docker_build != 'true' + uses: benc-uk/workflow-dispatch@v1 + env: + ADDITIONAL_OPTIONS: ${{ inputs.additional_options }} + with: + workflow: publish-docker.yml + ref: "${{ github.ref }}" + token: "${{ secrets.REPOSITORY_DISPATCH_TOKEN }}" + inputs: '{ + "tag": "${{ env.CLEAN_REF }}", + "dockerfile": "Dockerfile", + "build-config": "release" + }' + + - name: Wait for Docker Build Action to complete + if: steps.check_conditions.outputs.skip_docker_build != 'true' + env: + GITHUB_TOKEN: ${{ secrets.REPOSITORY_DISPATCH_TOKEN }} + WORKFLOW_ID: 'publish-docker.yml' + MAX_WAIT_MINUTES: '5' + INTERVAL: '5' + TIMEOUT: '10' + ORG_NAME: ${{ env.ORG_NAME }} + REPO_NAME: ${{ env.REPO_NAME }} + REF: ${{ github.ref }} + run: | + chmod +x scripts/wait-for-workflow-completed.sh + ./scripts/wait-for-workflow-completed.sh + working-directory: ${{ github.workspace }} + + generate_hive_consensus_tests: + name: "Prepare all hive tests to be started" runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + needs: [create_docker_image] steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - name: Check out Nethermind repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages - run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run ecmul_0-3_5616_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_5616_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_5616_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_5616_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_5617_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_5617_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_5617_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_5617_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_5617_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_5617_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_5617_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_5617_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_9935_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_9935_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_9935_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_9935_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_9935_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_9935_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_9935_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_9935_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_9_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_9_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_9_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_9_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_9_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_9_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_0-3_9_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_0-3_9_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_0_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_0_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_0_21000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_0_21000_64 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_0_21000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_0_21000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_0_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_0_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_0_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_0_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_0_28000_64 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_0_28000_64 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_0_28000_80 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_0_28000_80 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_0_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_0_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_1_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_1_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_1_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_1_21000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_1_28000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_1_28000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_1_28000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_1_28000_96 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_2_21000_128 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_2_21000_128 --sim.parallelism $PARALLELISM - - name: Run ecmul_1-2_2_21000_96 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /ecmul_1-2_2_21000_96 --sim.parallelism $PARALLELISM - - name: Run stEIP3651-warmcoinbase - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stEIP3651-warmcoinbase --sim.parallelism $PARALLELISM - - name: Run stEIP3855-push0 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stEIP3855-push0 --sim.parallelism $PARALLELISM - - name: Run stEIP3860-limitmeterinitcode - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /stEIP3860-limitmeterinitcode --sim.parallelism $PARALLELISM - - name: Run bc4895-withdrawals - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bc4895-withdrawals --sim.parallelism $PARALLELISM - - name: Run bcBlockGasLimitTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcBlockGasLimitTest --sim.parallelism $PARALLELISM - - name: Run bcEIP1559 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcEIP1559 --sim.parallelism $PARALLELISM - - name: Print results + submodules: 'recursive' + - name: Generate Hive Json For Matrix + id: set-matrix run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_65: - name: 65. Combined tests (e.g. bcEIP3675) + cd nethermind/tools/HiveConsensusWorkflowGenerator + dotnet run + cat matrix.json + echo "matrix=$(jq -c . matrix.json)" >> $GITHUB_OUTPUT + + run_hive_tests: runs-on: ubuntu-latest + needs: [generate_hive_consensus_tests, create_docker_image] + strategy: + fail-fast: false + matrix: + hiveTests: ${{fromJson(needs.generate_hive_consensus_tests.outputs.matrix)}} steps: - name: Set up parameters run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV + echo "PARALLELISM=${{ github.event.inputs.parallelism || '8' }}" >> $GITHUB_ENV + - name: Check out Nethermind repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar + - name: Install Linux packages run: | sudo apt-get update sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential + - name: Set up Go environment uses: actions/setup-go@v3.0.0 with: go-version: '>=1.17.0' + - name: Check out Hive repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: ethereum/hive ref: master path: hive + - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run bcEIP3675 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcEIP3675 --sim.parallelism $PARALLELISM - - name: Run bcForgedTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcForgedTest --sim.parallelism $PARALLELISM - - name: Run bcInvalidHeaderTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcInvalidHeaderTest --sim.parallelism $PARALLELISM - - name: Run bcMultiChainTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcMultiChainTest --sim.parallelism $PARALLELISM - - name: Run bcUncleHeaderValidity - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcUncleHeaderValidity --sim.parallelism $PARALLELISM - - name: Run bcUncleSpecialTests - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcUncleSpecialTests --sim.parallelism $PARALLELISM - - name: Run bcUncleTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcUncleTest --sim.parallelism $PARALLELISM - - name: Run bcArrowGlacierToMerge - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcArrowGlacierToMerge --sim.parallelism $PARALLELISM - - name: Run bcBerlinToLondon - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcBerlinToLondon --sim.parallelism $PARALLELISM - - name: Run bcByzantiumToConstantinopleFix - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcByzantiumToConstantinopleFix --sim.parallelism $PARALLELISM - - name: Run bcEIP158ToByzantium - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcEIP158ToByzantium --sim.parallelism $PARALLELISM - - name: Run bcFrontierToHomestead - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcFrontierToHomestead --sim.parallelism $PARALLELISM - - name: Run bcHomesteadToDao - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcHomesteadToDao --sim.parallelism $PARALLELISM - - name: Run bcHomesteadToEIP150 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcHomesteadToEIP150 --sim.parallelism $PARALLELISM - - name: Run bcMergeToShanghai - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcMergeToShanghai --sim.parallelism $PARALLELISM - - name: Run bcBlockGasLimitTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcBlockGasLimitTest --sim.parallelism $PARALLELISM - - name: Run bcEIP1559 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcEIP1559 --sim.parallelism $PARALLELISM - - name: Run bcEIP3675 - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcEIP3675 --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_66: - name: 66. bcExploitTest - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile + tag=${{ needs.create_docker_image.outputs.cleanRef }} + sed -i -e "s|^ARG baseimage=.*|ARG baseimage=nethermindeth/nethermind|" -e "s|^ARG tag=.*|ARG tag=$tag|" hive/clients/nethermind/Dockerfile + - name: Build Hive working-directory: hive run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run bcExploitTest + + - name: Run hive for tests - ${{ join(matrix.hiveTests.testNames, ', ') }} continue-on-error: true working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcExploitTest --sim.parallelism $PARALLELISM - - name: Print results - run: | - chmod +x nethermind/scripts/hive-results.sh - nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - test_67: - name: 67. Combined tests (e.g. bcExample) - runs-on: ubuntu-latest - steps: - - name: Set up parameters - run: | - echo "PARALLELISM=${{ github.event.inputs.parallelism || '3' }}" >> $GITHUB_ENV - - name: Check out Nethermind repository - uses: actions/checkout@v3 - with: - path: nethermind - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker image - uses: docker/build-push-action@v3 - with: - context: nethermind - file: nethermind/Dockerfile - tags: nethermind:test-${{ github.sha }} - outputs: type=docker,dest=/tmp/image.tar - - name: Install Linux packages run: | - sudo apt-get update - sudo apt-get install libsnappy-dev libc6-dev libc6 build-essential - - name: Set up Go environment - uses: actions/setup-go@v3.0.0 - with: - go-version: '>=1.17.0' - - name: Check out Hive repository - uses: actions/checkout@v3 - with: - repository: ethereum/hive - ref: master - path: hive - - name: Patch Hive Dockerfile - run: sed -i 's#FROM $baseimage:$tag#FROM nethermind:test-${{ github.sha }}#g' hive/clients/nethermind/Dockerfile - - name: Build Hive - working-directory: hive - run: go build . - - name: Load Docker image - run: docker load --input /tmp/image.tar - - name: Run bcExample - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcExample --sim.parallelism $PARALLELISM - - name: Run bcForkStressTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcForkStressTest --sim.parallelism $PARALLELISM - - name: Run bcGasPricerTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcGasPricerTest --sim.parallelism $PARALLELISM - - name: Run bcMultiChainTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcMultiChainTest --sim.parallelism $PARALLELISM - - name: Run bcRandomBlockhashTest - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcRandomBlockhashTest --sim.parallelism $PARALLELISM - - name: Run bcStateTests - continue-on-error: true - working-directory: hive - run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcStateTests --sim.parallelism $PARALLELISM + IFS=',' read -ra TEST_NAMES <<< "${{ join(matrix.hiveTests.testNames, ',') }}" + for testName in "${TEST_NAMES[@]}" + do + ./hive --client nethermind --sim ethereum/consensus --sim.limit /$testName --sim.parallelism $PARALLELISM + done - name: Print results run: | chmod +x nethermind/scripts/hive-results.sh nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json" - - name: Send results to dashboard - continue-on-error: true - uses: appleboy/scp-action@master - with: - host: ${{ secrets.HIVE_HOST }} - username: ${{ secrets.HIVE_USERNAME }} - key: ${{ secrets.HIVE_KEY }} - port: ${{ secrets.HIVE_PORT }} - source: hive/workspace/logs/* - target: ${{ secrets.HIVE_DIR }}/ + # - name: Send results to dashboard + # uses: appleboy/scp-action@master + # with: + # host: ${{ secrets.HIVE_HOST }} + # username: ${{ secrets.HIVE_USERNAME }} + # key: ${{ secrets.HIVE_KEY }} + # port: ${{ secrets.HIVE_PORT }} + # source: hive/workspace/logs/* + # target: ${{ secrets.HIVE_DIR }}/ diff --git a/src/Nethermind/Ethereum.Test.Base/BlockchainTestBase.cs b/src/Nethermind/Ethereum.Test.Base/BlockchainTestBase.cs index 52a04b019ec..12587140b6d 100644 --- a/src/Nethermind/Ethereum.Test.Base/BlockchainTestBase.cs +++ b/src/Nethermind/Ethereum.Test.Base/BlockchainTestBase.cs @@ -181,15 +181,13 @@ protected async Task RunTest(BlockchainTest test, Stopwatch? stopwatch?.Start(); List<(Block Block, string ExpectedException)> correctRlp = DecodeRlps(test, failOnInvalidRlp); - if (test.GenesisRlp == null) - { - test.GenesisRlp = Rlp.Encode(new Block(JsonToEthereumTest.Convert(test.GenesisBlockHeader))); - } + test.GenesisRlp ??= Rlp.Encode(new Block(JsonToEthereumTest.Convert(test.GenesisBlockHeader))); Block genesisBlock = Rlp.Decode(test.GenesisRlp.Bytes); Assert.That(genesisBlock.Header.Hash, Is.EqualTo(new Hash256(test.GenesisBlockHeader.Hash))); ManualResetEvent genesisProcessed = new(false); + blockTree.NewHeadBlock += (_, args) => { if (args.Block.Number == 0) @@ -271,7 +269,6 @@ protected async Task RunTest(BlockchainTest test, Stopwatch? { Assert.That(suggestedBlock.Header.Hash, Is.EqualTo(new Hash256(testBlockJson.BlockHeader.Hash))); - for (int uncleIndex = 0; uncleIndex < suggestedBlock.Uncles.Length; uncleIndex++) { Assert.That(suggestedBlock.Uncles[uncleIndex].Hash, Is.EqualTo(new Hash256(testBlockJson.UncleHeaders[uncleIndex].Hash))); diff --git a/src/Nethermind/Nethermind.AuRa.Test/AuRaSealValidatorTests.cs b/src/Nethermind/Nethermind.AuRa.Test/AuRaSealValidatorTests.cs index 1dda8bf9cee..c4395f5c961 100644 --- a/src/Nethermind/Nethermind.AuRa.Test/AuRaSealValidatorTests.cs +++ b/src/Nethermind/Nethermind.AuRa.Test/AuRaSealValidatorTests.cs @@ -144,7 +144,7 @@ TestCaseData GetTestCaseData( public (bool, object) validate_params(BlockHeader parentBlock, BlockHeader block, Action modifyParameters, Repeat repeat, bool parentIsHead, bool isValidSealer) { _blockTree.Head.Returns(parentIsHead ? new Block(parentBlock) : new Block(Build.A.BlockHeader.WithNumber(parentBlock.Number - 1).TestObject)); - _validSealerStrategy.IsValidSealer(Arg.Any>(), block.Beneficiary, block.AuRaStep.Value).Returns(isValidSealer); + _validSealerStrategy.IsValidSealer(Arg.Any>(), block.Beneficiary, block.AuRaStep.Value, out _).Returns(isValidSealer); object cause = null; diff --git a/src/Nethermind/Nethermind.AuRa.Test/AuRaSealerTests.cs b/src/Nethermind/Nethermind.AuRa.Test/AuRaSealerTests.cs index 3386d8b8b32..156a0517116 100644 --- a/src/Nethermind/Nethermind.AuRa.Test/AuRaSealerTests.cs +++ b/src/Nethermind/Nethermind.AuRa.Test/AuRaSealerTests.cs @@ -60,7 +60,7 @@ public void Setup() public bool can_seal(long auRaStep, bool validSealer) { _auRaStepCalculator.CurrentStep.Returns(auRaStep); - _validSealerStrategy.IsValidSealer(Arg.Any>(), _address, auRaStep).Returns(validSealer); + _validSealerStrategy.IsValidSealer(Arg.Any>(), _address, auRaStep, out _).Returns(validSealer); return _auRaSealer.CanSeal(10, _blockTree.Head.Hash); } @@ -68,7 +68,7 @@ public bool can_seal(long auRaStep, bool validSealer) public async Task seal_can_recover_address() { _auRaStepCalculator.CurrentStep.Returns(11); - _validSealerStrategy.IsValidSealer(Arg.Any>(), _address, 11).Returns(true); + _validSealerStrategy.IsValidSealer(Arg.Any>(), _address, 11, out _).Returns(true); Block block = Build.A.Block.WithHeader(Build.A.BlockHeader.WithBeneficiary(_address).WithAura(11, null).TestObject).TestObject; block = await _auRaSealer.SealBlock(block, CancellationToken.None); diff --git a/src/Nethermind/Nethermind.AuRa.Test/Validators/ListValidatorTests.cs b/src/Nethermind/Nethermind.AuRa.Test/Validators/ListValidatorTests.cs index 79d8dbde6b8..b24b0a06020 100644 --- a/src/Nethermind/Nethermind.AuRa.Test/Validators/ListValidatorTests.cs +++ b/src/Nethermind/Nethermind.AuRa.Test/Validators/ListValidatorTests.cs @@ -48,7 +48,7 @@ private static IEnumerable ValidateTestCases [TestCaseSource(nameof(ValidateTestCases))] public bool should_validate_correctly(Address address, long index) => - _validSealerStrategy.IsValidSealer(GetListValidator(TestItem.AddressA, TestItem.AddressB).Validators, address, index); + _validSealerStrategy.IsValidSealer(GetListValidator(TestItem.AddressA, TestItem.AddressB).Validators, address, index, out _); [TestCase(1)] [TestCase(2)] diff --git a/src/Nethermind/Nethermind.Blockchain.Test/BlockchainProcessorTests.cs b/src/Nethermind/Nethermind.Blockchain.Test/BlockchainProcessorTests.cs index aa50d09e96d..a5dc4884c80 100644 --- a/src/Nethermind/Nethermind.Blockchain.Test/BlockchainProcessorTests.cs +++ b/src/Nethermind/Nethermind.Blockchain.Test/BlockchainProcessorTests.cs @@ -78,7 +78,7 @@ public Block[] Process(Hash256 newBranchStateRoot, List suggestedBlocks, if (blockTracer != NullBlockTracer.Instance) { // this is for block reruns on failure for diag tracing - throw new InvalidBlockException(suggestedBlocks[0]); + throw new InvalidBlockException(suggestedBlocks[0], "wrong tracer"); } _logger.Info($"Processing {suggestedBlocks.Last().ToString(Block.Format.Short)}"); @@ -96,7 +96,7 @@ public Block[] Process(Hash256 newBranchStateRoot, List suggestedBlocks, { _allowedToFail.Remove(hash); BlockProcessed?.Invoke(this, new BlockProcessedEventArgs(suggestedBlocks.Last(), Array.Empty())); - throw new InvalidBlockException(suggestedBlock); + throw new InvalidBlockException(suggestedBlock, "allowed to fail"); } notYet = true; diff --git a/src/Nethermind/Nethermind.Blockchain/InvalidBlockException.cs b/src/Nethermind/Nethermind.Blockchain/InvalidBlockException.cs index c31e8887318..e589cf8bae5 100644 --- a/src/Nethermind/Nethermind.Blockchain/InvalidBlockException.cs +++ b/src/Nethermind/Nethermind.Blockchain/InvalidBlockException.cs @@ -8,8 +8,11 @@ namespace Nethermind.Blockchain; public class InvalidBlockException : BlockchainException { - public InvalidBlockException(Block block, Exception? innerException = null) - : base($"Invalid block: {block}", innerException) => InvalidBlock = block; + public InvalidBlockException(Block block, string message, Exception? innerException = null) + : base($"Invalid block: {block} : {message}", innerException) => InvalidBlock = block.Header; - public Block InvalidBlock { get; } + public InvalidBlockException(BlockHeader block, string message, Exception? innerException = null) + : base($"Invalid block: {block} : {message}", innerException) => InvalidBlock = block; + + public BlockHeader InvalidBlock { get; } } diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/AuRaBlockProcessor.cs b/src/Nethermind/Nethermind.Consensus.AuRa/AuRaBlockProcessor.cs index 1c4c5b44b22..5eff1e0fed9 100644 --- a/src/Nethermind/Nethermind.Consensus.AuRa/AuRaBlockProcessor.cs +++ b/src/Nethermind/Nethermind.Consensus.AuRa/AuRaBlockProcessor.cs @@ -108,8 +108,9 @@ private void ValidateGasLimit(Block block) BlockHeader parentHeader = GetParentHeader(block); if (_gasLimitOverride?.IsGasLimitValid(parentHeader, block.GasLimit, out long? expectedGasLimit) == false) { - if (_logger.IsWarn) _logger.Warn($"Invalid gas limit for block {block.Number}, hash {block.Hash}, expected value from contract {expectedGasLimit}, but found {block.GasLimit}."); - throw new InvalidBlockException(block); + string reason = $"Invalid gas limit, expected value from contract {expectedGasLimit}, but found {block.GasLimit}"; + if (_logger.IsWarn) _logger.Warn($"Proposed block is not valid {block.ToString(Block.Format.FullHashAndNumber)}. {reason}."); + throw new InvalidBlockException(block, reason); } } @@ -121,8 +122,9 @@ private void ValidateTxs(Block block) AddingTxEventArgs args = CheckTxPosdaoRules(new AddingTxEventArgs(i, tx, block, block.Transactions)); if (args.Action != TxAction.Add) { - if (_logger.IsWarn) _logger.Warn($"Proposed block is not valid {block.ToString(Block.Format.FullHashAndNumber)}. {tx.ToShortString()} doesn't have required permissions. Reason: {args.Reason}."); - throw new InvalidBlockException(block); + string reason = $"{tx.ToShortString()} doesn't have required permissions: {args.Reason}"; + if (_logger.IsWarn) _logger.Warn($"Proposed block is not valid {block.ToString(Block.Format.FullHashAndNumber)}. {reason}."); + throw new InvalidBlockException(block, reason); } } } diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/AuRaSealValidator.cs b/src/Nethermind/Nethermind.Consensus.AuRa/AuRaSealValidator.cs index f23dd406a1f..b4dd5cc757c 100644 --- a/src/Nethermind/Nethermind.Consensus.AuRa/AuRaSealValidator.cs +++ b/src/Nethermind/Nethermind.Consensus.AuRa/AuRaSealValidator.cs @@ -75,9 +75,9 @@ public bool ValidateParams(BlockHeader parent, BlockHeader header, bool isUncle // no worries we do this validation later before processing the block if (parent.Hash == _blockTree.Head?.Hash) { - if (!_validSealerStrategy.IsValidSealer(_validatorStore.GetValidators(), header.Beneficiary, step)) + if (!_validSealerStrategy.IsValidSealer(_validatorStore.GetValidators(), header.Beneficiary, step, out Address expectedAddress)) { - if (_logger.IsError) _logger.Error($"Block from incorrect proposer at block {header.ToString(BlockHeader.Format.FullHashAndNumber)}, step {step} from author {header.Beneficiary}."); + if (_logger.IsError) _logger.Error($"Proposed block is not valid {header.ToString(BlockHeader.Format.FullHashAndNumber)}. Incorrect proposer at step {step}, expected {expectedAddress}, but found {header.Beneficiary}."); return false; } } diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/AuRaSealer.cs b/src/Nethermind/Nethermind.Consensus.AuRa/AuRaSealer.cs index cfe6f992706..52903ed3d79 100644 --- a/src/Nethermind/Nethermind.Consensus.AuRa/AuRaSealer.cs +++ b/src/Nethermind/Nethermind.Consensus.AuRa/AuRaSealer.cs @@ -74,8 +74,8 @@ bool StepNotYetProduced(long step) => !_blockTree.Head.Header.AuRaStep.HasValue bool IsThisNodeTurn(long step) { - var validators = _validatorStore.GetValidators(); - return _validSealerStrategy.IsValidSealer(validators, _signer.Address, step); + Address[] validators = _validatorStore.GetValidators(); + return _validSealerStrategy.IsValidSealer(validators, _signer.Address, step, out _); } long currentStep = _auRaStepCalculator.CurrentStep; diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/Validators/AuRaValidatorBase.cs b/src/Nethermind/Nethermind.Consensus.AuRa/Validators/AuRaValidatorBase.cs index d673c1c5f33..b0fe7e7c540 100644 --- a/src/Nethermind/Nethermind.Consensus.AuRa/Validators/AuRaValidatorBase.cs +++ b/src/Nethermind/Nethermind.Consensus.AuRa/Validators/AuRaValidatorBase.cs @@ -49,11 +49,12 @@ public virtual void OnBlockProcessingStart(Block block, ProcessingOptions option if (!options.ContainsFlag(ProcessingOptions.ProducingBlock) && !block.IsGenesis) { var auRaStep = block.Header.AuRaStep.Value; - if (!_validSealerStrategy.IsValidSealer(Validators, block.Beneficiary, auRaStep)) + if (!_validSealerStrategy.IsValidSealer(Validators, block.Beneficiary, auRaStep, out Address expectedAddress)) { - if (_logger.IsError) _logger.Error($"Block from incorrect proposer at block {block.ToString(Block.Format.FullHashAndNumber)}, step {auRaStep} from author {block.Beneficiary}."); + string reason = $"Incorrect proposer at step {auRaStep}, expected {expectedAddress}, but found {block.Beneficiary}"; + if (_logger.IsError) _logger.Error($"Proposed block is not valid {block.ToString(Block.Format.FullHashAndNumber)}. {reason}."); this.GetReportingValidator().ReportBenign(block.Beneficiary, block.Number, IReportingValidator.BenignCause.IncorrectProposer); - throw new InvalidBlockException(block); + throw new InvalidBlockException(block, reason); } } } diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/Validators/IValidSealerStrategy.cs b/src/Nethermind/Nethermind.Consensus.AuRa/Validators/IValidSealerStrategy.cs index 37565cc748a..d09c0ada06a 100644 --- a/src/Nethermind/Nethermind.Consensus.AuRa/Validators/IValidSealerStrategy.cs +++ b/src/Nethermind/Nethermind.Consensus.AuRa/Validators/IValidSealerStrategy.cs @@ -14,7 +14,8 @@ public interface IValidSealerStrategy /// Validators at given step. /// Address to be checked if its a sealer at this step. /// Step to be checked. + /// Address which should create block in current step. /// 'true' if should seal a block at for supplied collection. Otherwise 'false'. - bool IsValidSealer(IList
validators, Address address, long step); + bool IsValidSealer(IList
validators, Address address, long step, out Address expectedAddress); } } diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/Validators/ValidSealerStrategy.cs b/src/Nethermind/Nethermind.Consensus.AuRa/Validators/ValidSealerStrategy.cs index c5746fdbc9e..6bb19756386 100644 --- a/src/Nethermind/Nethermind.Consensus.AuRa/Validators/ValidSealerStrategy.cs +++ b/src/Nethermind/Nethermind.Consensus.AuRa/Validators/ValidSealerStrategy.cs @@ -9,6 +9,7 @@ namespace Nethermind.Consensus.AuRa.Validators { public class ValidSealerStrategy : IValidSealerStrategy { - public bool IsValidSealer(IList
validators, Address address, long step) => validators.GetItemRoundRobin(step) == address; + public bool IsValidSealer(IList
validators, Address address, long step, out Address expectedAddress) => + (expectedAddress = validators.GetItemRoundRobin(step)) == address; } } diff --git a/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs b/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs index 5e95773c62d..9bcf6cfc631 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs @@ -39,16 +39,11 @@ public static bool TrySetTransactions(this Block block, Transaction[] transactio return false; } - public static bool IsByNethermindNode(this Block block) - { - try - { - return Encoding.ASCII.GetString(block.ExtraData).Contains(BlocksConfig.DefaultExtraData, StringComparison.InvariantCultureIgnoreCase); - } - catch (Exception) - { - return false; - } - } + public static bool IsByNethermindNode(this Block block) => block.Header.IsByNethermindNode(); + + public static bool IsByNethermindNode(this BlockHeader block) => + Ascii.IsValid(block.ExtraData) + && Encoding.ASCII.GetString(block.ExtraData ?? Array.Empty()) + .Contains(BlocksConfig.DefaultExtraData, StringComparison.InvariantCultureIgnoreCase); } } diff --git a/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.BlockProductionTransactionsExecutor.cs b/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.BlockProductionTransactionsExecutor.cs index f794d3b64b6..9363cd00b1e 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.BlockProductionTransactionsExecutor.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.BlockProductionTransactionsExecutor.cs @@ -109,13 +109,20 @@ protected TxAction ProcessTransaction( } else { - _transactionProcessor.ProcessTransaction(blkCtx, currentTx, receiptsTracer, processingOptions, _stateProvider); + TransactionResult result = _transactionProcessor.ProcessTransaction(blkCtx, currentTx, receiptsTracer, processingOptions, _stateProvider); - if (addToBlock) + if (result) { - transactionsInBlock.Add(currentTx); - _transactionProcessed?.Invoke(this, - new TxProcessedEventArgs(index, currentTx, receiptsTracer.TxReceipts[index])); + if (addToBlock) + { + transactionsInBlock.Add(currentTx); + _transactionProcessed?.Invoke(this, + new TxProcessedEventArgs(index, currentTx, receiptsTracer.TxReceipts[index])); + } + } + else + { + args.Set(TxAction.Skip, result.Error!); } } diff --git a/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.BlockValidationTransactionsExecutor.cs b/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.BlockValidationTransactionsExecutor.cs index 116ba87a90c..c67f54c7a8f 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.BlockValidationTransactionsExecutor.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.BlockValidationTransactionsExecutor.cs @@ -2,13 +2,17 @@ // SPDX-License-Identifier: LGPL-3.0-only using System; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Linq; +using Nethermind.Blockchain; using Nethermind.Core; using Nethermind.Core.Specs; using Nethermind.Evm; using Nethermind.Evm.Tracing; using Nethermind.Evm.TransactionProcessing; using Nethermind.State; +using Metrics = Nethermind.Evm.Metrics; namespace Nethermind.Consensus.Processing { @@ -34,7 +38,7 @@ public BlockValidationTransactionsExecutor(ITransactionProcessorAdapter transact public TxReceipt[] ProcessTransactions(Block block, ProcessingOptions processingOptions, BlockReceiptsTracer receiptsTracer, IReleaseSpec spec) { - Evm.Metrics.ResetBlockStats(); + Metrics.ResetBlockStats(); BlockExecutionContext blkCtx = new(block.Header); for (int i = 0; i < block.Transactions.Length; i++) { @@ -46,9 +50,17 @@ public TxReceipt[] ProcessTransactions(Block block, ProcessingOptions processing private void ProcessTransaction(BlockExecutionContext blkCtx, Transaction currentTx, int index, BlockReceiptsTracer receiptsTracer, ProcessingOptions processingOptions) { - _transactionProcessor.ProcessTransaction(blkCtx, currentTx, receiptsTracer, processingOptions, _stateProvider); + TransactionResult result = _transactionProcessor.ProcessTransaction(blkCtx, currentTx, receiptsTracer, processingOptions, _stateProvider); + if (!result) ThrowInvalidBlockException(result, blkCtx.Header, currentTx, index); TransactionProcessed?.Invoke(this, new TxProcessedEventArgs(index, currentTx, receiptsTracer.TxReceipts[index])); } + + [DoesNotReturn] + [StackTraceHidden] + private void ThrowInvalidBlockException(TransactionResult result, BlockHeader header, Transaction currentTx, int index) + { + throw new InvalidBlockException(header, $"Transaction {currentTx.Hash} at index {index} failed with error {result.Error}"); + } } } } diff --git a/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs b/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs index 70777da28b5..7e3b8c7604a 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs @@ -214,7 +214,7 @@ private void ValidateProcessedBlock(Block suggestedBlock, ProcessingOptions opti { if (_logger.IsError) _logger.Error($"Processed block is not valid {suggestedBlock.ToString(Block.Format.FullHashAndNumber)}"); if (_logger.IsError) _logger.Error($"Suggested block TD: {suggestedBlock.TotalDifficulty}, Suggested block IsPostMerge {suggestedBlock.IsPostMerge}, Block TD: {block.TotalDifficulty}, Block IsPostMerge {block.IsPostMerge}"); - throw new InvalidBlockException(suggestedBlock); + throw new InvalidBlockException(suggestedBlock, "invalid hash after block processing"); } } diff --git a/src/Nethermind/Nethermind.Consensus/Processing/BlockchainProcessor.cs b/src/Nethermind/Nethermind.Consensus/Processing/BlockchainProcessor.cs index 9a75824c50f..12c33009e95 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/BlockchainProcessor.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/BlockchainProcessor.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Text; +using System.Linq; using System.Threading; using System.Threading.Tasks; using Nethermind.Blockchain; @@ -497,32 +498,38 @@ void DeleteInvalidBlocks(in ProcessingBranch processingBranch, Hash256 invalidBl } catch (InvalidBlockException ex) { - InvalidBlock?.Invoke(this, new IBlockchainProcessor.InvalidBlockEventArgs { InvalidBlock = ex.InvalidBlock, }); - invalidBlockHash = ex.InvalidBlock.Hash; + Block? invalidBlock = processingBranch.BlocksToProcess.FirstOrDefault(b => b.Hash == invalidBlockHash); + if (invalidBlock is not null) + { + InvalidBlock?.Invoke(this, new IBlockchainProcessor.InvalidBlockEventArgs { InvalidBlock = invalidBlock, }); + BlockTraceDumper.LogDiagnosticRlp(invalidBlock, _logger, + (_options.DumpOptions & DumpOptions.Rlp) != 0, + (_options.DumpOptions & DumpOptions.RlpLog) != 0); - BlockTraceDumper.LogDiagnosticRlp(ex.InvalidBlock, _logger, - (_options.DumpOptions & DumpOptions.Rlp) != 0, - (_options.DumpOptions & DumpOptions.RlpLog) != 0); - - TraceFailingBranch( - processingBranch, - options, - new BlockReceiptsTracer(), - DumpOptions.Receipts); + TraceFailingBranch( + processingBranch, + options, + new BlockReceiptsTracer(), + DumpOptions.Receipts); - TraceFailingBranch( - processingBranch, - options, - new ParityLikeBlockTracer(ParityTraceTypes.StateDiff | ParityTraceTypes.Trace), - DumpOptions.Parity); + TraceFailingBranch( + processingBranch, + options, + new ParityLikeBlockTracer(ParityTraceTypes.StateDiff | ParityTraceTypes.Trace), + DumpOptions.Parity); - TraceFailingBranch( - processingBranch, - options, - new GethLikeBlockMemoryTracer(GethTraceOptions.Default), - DumpOptions.Geth); + TraceFailingBranch( + processingBranch, + options, + new GethLikeBlockMemoryTracer(GethTraceOptions.Default), + DumpOptions.Geth); + } + else + { + if (_logger.IsError) _logger.Error($"Unexpected situation occurred during the handling of an invalid block {ex.InvalidBlock}", ex); + } processedBlocks = null; } @@ -566,7 +573,7 @@ private void PrepareBlocksToProcess(Block suggestedBlock, ProcessingOptions opti if (!blocksToProcess[0].IsGenesis) { BlockHeader? parentOfFirstBlock = _blockTree.FindHeader(blocksToProcess[0].ParentHash!, BlockTreeLookupOptions.None); - if (parentOfFirstBlock == null) + if (parentOfFirstBlock is null) { throw new InvalidOperationException("Attempted to process a disconnected blockchain"); } diff --git a/src/Nethermind/Nethermind.Consensus/Processing/TransactionProcessorAdapterExtensions.cs b/src/Nethermind/Nethermind.Consensus/Processing/TransactionProcessorAdapterExtensions.cs index 7e92e41dd13..d907d46a0c7 100644 --- a/src/Nethermind/Nethermind.Consensus/Processing/TransactionProcessorAdapterExtensions.cs +++ b/src/Nethermind/Nethermind.Consensus/Processing/TransactionProcessorAdapterExtensions.cs @@ -11,7 +11,7 @@ namespace Nethermind.Consensus.Processing; internal static class TransactionProcessorAdapterExtensions { - public static void ProcessTransaction(this ITransactionProcessorAdapter transactionProcessor, + public static TransactionResult ProcessTransaction(this ITransactionProcessorAdapter transactionProcessor, BlockExecutionContext blkCtx, Transaction currentTx, BlockReceiptsTracer receiptsTracer, @@ -24,7 +24,8 @@ public static void ProcessTransaction(this ITransactionProcessorAdapter transact } using ITxTracer tracer = receiptsTracer.StartNewTxTrace(currentTx); - transactionProcessor.Execute(currentTx, blkCtx, receiptsTracer); + TransactionResult result = transactionProcessor.Execute(currentTx, blkCtx, receiptsTracer); receiptsTracer.EndTxTrace(); + return result; } } diff --git a/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs b/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs index b61e4b993f7..df1c2cd2100 100644 --- a/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs +++ b/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs @@ -19,6 +19,7 @@ using Nethermind.State.Proofs; using Nethermind.State.Repositories; using Nethermind.Db.Blooms; +using Nethermind.Evm; using NSubstitute; using NUnit.Framework; @@ -259,8 +260,18 @@ private Block CreateBlock(int splitVariant, int splitFrom, int blockIndex, Block { Transaction[] transactions = new[] { - Build.A.Transaction.WithValue(1).WithData(Rlp.Encode(blockIndex).Bytes).Signed(_ecdsa!, TestItem.PrivateKeyA, _specProvider!.GetSpec(blockIndex + 1, null).IsEip155Enabled).TestObject, - Build.A.Transaction.WithValue(2).WithData(Rlp.Encode(blockIndex + 1).Bytes).Signed(_ecdsa!, TestItem.PrivateKeyA, _specProvider!.GetSpec(blockIndex + 1, null).IsEip155Enabled).TestObject + Build.A.Transaction + .WithValue(1) + .WithData(Rlp.Encode(blockIndex).Bytes) + .WithGasLimit(GasCostOf.Transaction * 2) + .Signed(_ecdsa!, TestItem.PrivateKeyA, _specProvider.GetSpec(blockIndex + 1, null).IsEip155Enabled) + .TestObject, + Build.A.Transaction + .WithValue(2) + .WithData(Rlp.Encode(blockIndex + 1).Bytes) + .WithGasLimit(GasCostOf.Transaction * 2) + .Signed(_ecdsa!, TestItem.PrivateKeyA, _specProvider.GetSpec(blockIndex + 1, null).IsEip155Enabled) + .TestObject }; currentBlock = currentBlockBuilder diff --git a/src/Nethermind/Nethermind.Core/Extensions/SpanExtensions.cs b/src/Nethermind/Nethermind.Core/Extensions/SpanExtensions.cs index ca0eafc0f78..dae00fd1841 100644 --- a/src/Nethermind/Nethermind.Core/Extensions/SpanExtensions.cs +++ b/src/Nethermind/Nethermind.Core/Extensions/SpanExtensions.cs @@ -138,6 +138,13 @@ private static string ToHexStringWithEip55Checksum(ReadOnlySpan bytes, boo return result; } + public static ReadOnlySpan TakeAndMove(this ref ReadOnlySpan span, int length) + { + ReadOnlySpan s = span[..length]; + span = span[length..]; + return s; + } + public static bool IsNullOrEmpty(this in Span span) => span.Length == 0; public static bool IsNull(this in Span span) => Unsafe.IsNullRef(ref MemoryMarshal.GetReference(span)); public static bool IsNullOrEmpty(this in ReadOnlySpan span) => span.Length == 0; diff --git a/src/Nethermind/Nethermind.Evm.Test/Eip3860Tests.cs b/src/Nethermind/Nethermind.Evm.Test/Eip3860Tests.cs index 47bce166226..2cde8be9d0f 100644 --- a/src/Nethermind/Nethermind.Evm.Test/Eip3860Tests.cs +++ b/src/Nethermind/Nethermind.Evm.Test/Eip3860Tests.cs @@ -6,6 +6,7 @@ using Nethermind.Core.Test.Builders; using NUnit.Framework; using Nethermind.Core; +using Nethermind.Evm.TransactionProcessing; using Nethermind.Int256; namespace Nethermind.Evm.Test @@ -71,7 +72,7 @@ public void Test_EIP_3860_InitCode_Create_Exceeds_Limit(string createCode) [Test] public void Test_EIP_3860_Disabled_InitCode_TxCreation_Exceeds_Limit_Succeeds() { - var tracer = PrepExecuteCreateTransaction(MainnetSpecProvider.ShanghaiBlockTimestamp - 1, Spec.MaxInitCodeSize + 1); + (_, var tracer) = PrepExecuteCreateTransaction(MainnetSpecProvider.ShanghaiBlockTimestamp - 1, Spec.MaxInitCodeSize + 1); Assert.That(tracer.StatusCode, Is.EqualTo(StatusCode.Success)); } @@ -79,22 +80,22 @@ public void Test_EIP_3860_Disabled_InitCode_TxCreation_Exceeds_Limit_Succeeds() [Test] public void Test_EIP_3860_Enabled_InitCode_TxCreation_Exceeds_Limit_Fails() { - var tracer = PrepExecuteCreateTransaction(MainnetSpecProvider.ShanghaiBlockTimestamp, Spec.MaxInitCodeSize + 1); + (var result, _) = PrepExecuteCreateTransaction(MainnetSpecProvider.ShanghaiBlockTimestamp, Spec.MaxInitCodeSize + 1); - Assert.That(tracer.StatusCode, Is.EqualTo(StatusCode.Failure)); - Assert.That(tracer.Error, Is.EqualTo("EIP-3860 - transaction size over max init code size")); + Assert.That(result.Fail, Is.True); + Assert.That(result.Error, Is.EqualTo("EIP-3860 - transaction size over max init code size")); } [Test] public void Test_EIP_3860_Enabled_InitCode_TxCreation_Within_Limit_Succeeds() { //7680 is the size of create instructions - Prepare.EvmCode.Create - var tracer = PrepExecuteCreateTransaction(MainnetSpecProvider.ShanghaiBlockTimestamp, Spec.MaxInitCodeSize - 7680); + (_, var tracer) = PrepExecuteCreateTransaction(MainnetSpecProvider.ShanghaiBlockTimestamp, Spec.MaxInitCodeSize - 7680); Assert.That(tracer.StatusCode, Is.EqualTo(StatusCode.Success)); } - protected TestAllTracerWithOutput PrepExecuteCreateTransaction(ulong timestamp, long byteCodeSize) + protected (TransactionResult, TestAllTracerWithOutput tracer) PrepExecuteCreateTransaction(ulong timestamp, long byteCodeSize) { var byteCode = new byte[byteCodeSize]; @@ -108,9 +109,8 @@ protected TestAllTracerWithOutput PrepExecuteCreateTransaction(ulong timestamp, transaction.To = null; transaction.Data = createCode; TestAllTracerWithOutput tracer = CreateTracer(); - _processor.Execute(transaction, block.Header, tracer); - - return tracer; + TransactionResult result = _processor.Execute(transaction, block.Header, tracer); + return (result, tracer); } } } diff --git a/src/Nethermind/Nethermind.Evm.Test/Tracing/ParityLikeTxTracerTests.cs b/src/Nethermind/Nethermind.Evm.Test/Tracing/ParityLikeTxTracerTests.cs index 8867edb930b..a9a4e54b844 100644 --- a/src/Nethermind/Nethermind.Evm.Test/Tracing/ParityLikeTxTracerTests.cs +++ b/src/Nethermind/Nethermind.Evm.Test/Tracing/ParityLikeTxTracerTests.cs @@ -11,6 +11,8 @@ using Nethermind.Int256; using Nethermind.Evm.Precompiles; using Nethermind.Evm.Tracing.ParityStyle; +using Nethermind.Evm.TransactionProcessing; +using Nethermind.State; using NUnit.Framework; namespace Nethermind.Evm.Test.Tracing @@ -525,9 +527,10 @@ public void Can_trace_failed_action() .PushData(push2Hex) .Done; - (ParityLikeTxTrace trace, _, _) = ExecuteAndTraceParityCall(code, 1000000.Ether()); + UInt256 value = 2.Ether(); + (ParityLikeTxTrace trace, _, _) = ExecuteAndTraceParityCall(code, value); Assert.Null(trace.VmTrace); - Assert.That(trace.Action.Value, Is.EqualTo(1000000.Ether())); + Assert.That(trace.Action.Value, Is.EqualTo(value)); } [Test] @@ -840,7 +843,7 @@ public void Is_tracing_rewards_only_when_rewards_trace_type_selected() { (Block block, Transaction transaction) = PrepareTx(BlockNumber, 100000, code, input, value); ParityLikeTxTracer tracer = new(block, transaction, ParityTraceTypes.Trace | ParityTraceTypes.StateDiff); - _processor.Execute(transaction, block.Header, tracer); + TransactionResult result = _processor.Execute(transaction, block.Header, tracer); return (tracer.BuildResult(), block, transaction); } } diff --git a/src/Nethermind/Nethermind.Evm.Test/TransactionProcessorTests.cs b/src/Nethermind/Nethermind.Evm.Test/TransactionProcessorTests.cs index 286829ec99d..46a36502703 100644 --- a/src/Nethermind/Nethermind.Evm.Test/TransactionProcessorTests.cs +++ b/src/Nethermind/Nethermind.Evm.Test/TransactionProcessorTests.cs @@ -67,13 +67,9 @@ public void Setup() public void Can_process_simple_transaction(bool withStateDiff, bool withTrace) { Transaction tx = Build.A.Transaction.SignedAndResolved(_ethereumEcdsa, TestItem.PrivateKeyA, _isEip155Enabled).WithGasLimit(100000).TestObject; - Block block = Build.A.Block.WithNumber(1).WithTransactions(tx).TestObject; - - BlockReceiptsTracer tracer = BuildTracer(block, tx, withStateDiff, withTrace); - Execute(tracer, tx, block); - - Assert.That(tracer.TxReceipts[0].StatusCode, Is.EqualTo(StatusCode.Success)); + TransactionResult result = Execute(tx, block); + Assert.That(result.Success, Is.True); } [TestCase(true, true)] @@ -90,7 +86,7 @@ public void Sets_state_root_on_receipts_before_eip658(bool withStateDiff, bool w Block block = Build.A.Block.WithNumber(blockNumber).WithTransactions(tx).TestObject; BlockReceiptsTracer tracer = BuildTracer(block, tx, withStateDiff, withTrace); - Execute(tracer, tx, block); + TransactionResult result = Execute(tx, block, tracer); if (_isEip155Enabled) // we use eip155 check just as a proxy on 658 { @@ -109,13 +105,9 @@ public void Sets_state_root_on_receipts_before_eip658(bool withStateDiff, bool w public void Can_handle_quick_fail_on_intrinsic_gas(bool withStateDiff, bool withTrace) { Transaction tx = Build.A.Transaction.SignedAndResolved(_ethereumEcdsa, TestItem.PrivateKeyA, _isEip155Enabled).WithGasLimit(20000).TestObject; - Block block = Build.A.Block.WithNumber(1).WithTransactions(tx).TestObject; - - BlockReceiptsTracer tracer = BuildTracer(block, tx, withStateDiff, withTrace); - Execute(tracer, tx, block); - - Assert.That(tracer.TxReceipts[0].StatusCode, Is.EqualTo(StatusCode.Failure)); + TransactionResult result = Execute(tx, block); + Assert.That(result.Fail, Is.True); } [TestCase(true, true)] @@ -125,13 +117,9 @@ public void Can_handle_quick_fail_on_intrinsic_gas(bool withStateDiff, bool with public void Can_handle_quick_fail_on_missing_sender(bool withStateDiff, bool withTrace) { Transaction tx = Build.A.Transaction.Signed(_ethereumEcdsa, TestItem.PrivateKeyA, _isEip155Enabled).WithGasLimit(100000).TestObject; - Block block = Build.A.Block.WithNumber(1).WithTransactions(tx).TestObject; - - BlockReceiptsTracer tracer = BuildTracer(block, tx, withStateDiff, withTrace); - Execute(tracer, tx, block); - - Assert.That(tracer.TxReceipts[0].StatusCode, Is.EqualTo(StatusCode.Failure)); + TransactionResult result = Execute(tx, block); + Assert.That(result.Fail, Is.True); } [TestCase(true, true)] @@ -141,13 +129,9 @@ public void Can_handle_quick_fail_on_missing_sender(bool withStateDiff, bool wit public void Can_handle_quick_fail_on_non_existing_sender_account(bool withStateDiff, bool withTrace) { Transaction tx = Build.A.Transaction.SignedAndResolved(_ethereumEcdsa, TestItem.PrivateKeyB, _isEip155Enabled).WithGasLimit(100000).TestObject; - Block block = Build.A.Block.WithNumber(1).WithTransactions(tx).TestObject; - - BlockReceiptsTracer tracer = BuildTracer(block, tx, withStateDiff, withTrace); - Execute(tracer, tx, block); - - Assert.That(tracer.TxReceipts[0].StatusCode, Is.EqualTo(StatusCode.Failure)); + TransactionResult result = Execute(tx, block); + Assert.That(result.Fail, Is.True); } [TestCase(true, true)] @@ -157,13 +141,9 @@ public void Can_handle_quick_fail_on_non_existing_sender_account(bool withStateD public void Can_handle_quick_fail_on_invalid_nonce(bool withStateDiff, bool withTrace) { Transaction tx = Build.A.Transaction.SignedAndResolved(_ethereumEcdsa, TestItem.PrivateKeyA, _isEip155Enabled).WithGasLimit(100000).WithNonce(100).TestObject; - Block block = Build.A.Block.WithNumber(1).WithTransactions(tx).TestObject; - - BlockReceiptsTracer tracer = BuildTracer(block, tx, withStateDiff, withTrace); - Execute(tracer, tx, block); - - Assert.That(tracer.TxReceipts[0].StatusCode, Is.EqualTo(StatusCode.Failure)); + TransactionResult result = Execute(tx, block); + Assert.That(result.Fail, Is.True); } [TestCase(true, true)] @@ -188,10 +168,8 @@ public void Can_handle_quick_fail_on_not_enough_balance_on_intrinsic_gas(bool wi Block block = Build.A.Block.WithNumber(MainnetSpecProvider.BerlinBlockNumber).WithTransactions(tx).TestObject; - BlockReceiptsTracer tracer = BuildTracer(block, tx, withStateDiff, withTrace); - Execute(tracer, tx, block); - - Assert.That(tracer.TxReceipts[0].StatusCode, Is.EqualTo(StatusCode.Failure)); + TransactionResult result = Execute(tx, block); + Assert.That(result.Fail, Is.True); } [TestCase(true, true)] @@ -208,11 +186,8 @@ public void Can_handle_quick_fail_on_not_enough_balance_on_reserved_gas_payment( tx.Value = 1.Ether() - GasCostOf.Transaction; Block block = Build.A.Block.WithNumber(MainnetSpecProvider.BerlinBlockNumber).WithTransactions(tx).TestObject; - - BlockReceiptsTracer tracer = BuildTracer(block, tx, withStateDiff, withTrace); - Execute(tracer, tx, block); - - Assert.That(tracer.TxReceipts[0].StatusCode, Is.EqualTo(StatusCode.Failure)); + TransactionResult result = Execute(tx, block); + Assert.That(result.Fail, Is.True); } [TestCase(true, true)] @@ -228,11 +203,8 @@ public void Can_handle_quick_fail_when_balance_is_lower_than_fee_cap_times_gas(b .WithGasLimit(100000).TestObject; Block block = Build.A.Block.WithNumber(MainnetSpecProvider.LondonBlockNumber).WithTransactions(tx).TestObject; - - BlockReceiptsTracer tracer = BuildTracer(block, tx, withStateDiff, withTrace); - Execute(tracer, tx, block); - - Assert.That(tracer.TxReceipts[0].StatusCode, Is.EqualTo(StatusCode.Failure)); + TransactionResult result = Execute(tx, block); + Assert.That(result.Fail, Is.True); } [TestCase(true, true)] @@ -242,13 +214,9 @@ public void Can_handle_quick_fail_when_balance_is_lower_than_fee_cap_times_gas(b public void Can_handle_quick_fail_on_above_block_gas_limit(bool withStateDiff, bool withTrace) { Transaction tx = Build.A.Transaction.SignedAndResolved(_ethereumEcdsa, TestItem.PrivateKeyA, _isEip155Enabled).WithGasLimit(100000).TestObject; - Block block = Build.A.Block.WithNumber(1).WithTransactions(tx).WithGasLimit(20000).TestObject; - - BlockReceiptsTracer tracer = BuildTracer(block, tx, withTrace, withTrace); - Execute(tracer, tx, block); - - Assert.That(tracer.TxReceipts[0].StatusCode, Is.EqualTo(StatusCode.Failure)); + TransactionResult result = Execute(tx, block); + Assert.That(result.Fail, Is.True); } [TestCase(true, true)] @@ -258,13 +226,9 @@ public void Can_handle_quick_fail_on_above_block_gas_limit(bool withStateDiff, b public void Will_not_cause_quick_fail_above_block_gas_limit_during_calls(bool withStateDiff, bool withTrace) { Transaction tx = Build.A.Transaction.SignedAndResolved(_ethereumEcdsa, TestItem.PrivateKeyA, _isEip155Enabled).WithGasLimit(100000).TestObject; - Block block = Build.A.Block.WithNumber(1).WithTransactions(tx).WithGasLimit(20000).TestObject; - - BlockReceiptsTracer tracer = BuildTracer(block, tx, withTrace, withTrace); - CallAndRestore(tracer, tx, block); - - Assert.That(tracer.TxReceipts[0].StatusCode, Is.EqualTo(StatusCode.Success)); + TransactionResult result = CallAndRestore(tx, block); + Assert.That(result.Success, Is.True); } [TestCase] @@ -340,11 +304,8 @@ public void Should_reject_tx_with_high_value() ? MainnetSpecProvider.ByzantiumBlockNumber : MainnetSpecProvider.ByzantiumBlockNumber - 1; Block block = Build.A.Block.WithNumber(blockNumber).WithTransactions(tx).TestObject; - BlockReceiptsTracer tracer = BuildTracer(block, tx, true, true); - - Execute(tracer, tx, block); - - tracer.TxReceipts[0].StatusCode.Should().Be(StatusCode.Failure); + TransactionResult result = Execute(tx, block); + Assert.That(result.Fail, Is.True); } [TestCase(562949953421312ul)] @@ -358,11 +319,8 @@ public void Should_reject_tx_with_high_max_fee_per_gas(ulong topDigit) long blockNumber = MainnetSpecProvider.LondonBlockNumber; Block block = Build.A.Block.WithNumber(blockNumber).WithTransactions(tx).TestObject; - BlockReceiptsTracer tracer = BuildTracer(block, tx, true, true); - - Execute(tracer, tx, block); - - tracer.TxReceipts[0].StatusCode.Should().Be(StatusCode.Failure); + TransactionResult result = Execute(tx, block); + Assert.That(result.Fail, Is.True); } [TestCase] @@ -631,7 +589,7 @@ public void Disables_Eip158_for_system_transactions() Block block = Build.A.Block.WithNumber(blockNumber).WithTransactions(tx).TestObject; BlockReceiptsTracer tracer = BuildTracer(block, tx, false, false); - Execute(tracer, tx, block); + Execute(tx, block, tracer); _stateProvider.AccountExists(tx.SenderAddress).Should().BeTrue(); } @@ -730,21 +688,31 @@ private BlockReceiptsTracer BuildTracer(Block block, Transaction tx, bool stateD return tracer; } - private void Execute(BlockReceiptsTracer tracer, Transaction tx, Block block) + private TransactionResult Execute(Transaction tx, Block block, BlockReceiptsTracer? tracer = null) { - tracer.StartNewBlockTrace(block); - tracer.StartNewTxTrace(tx); - _transactionProcessor.Execute(tx, block.Header, tracer); - tracer.EndTxTrace(); - tracer.EndBlockTrace(); + tracer?.StartNewBlockTrace(block); + tracer?.StartNewTxTrace(tx); + TransactionResult result = _transactionProcessor.Execute(tx, block.Header, tracer ?? NullTxTracer.Instance); + if (result) + { + tracer?.EndTxTrace(); + tracer?.EndBlockTrace(); + } + + return result; } - private void CallAndRestore(BlockReceiptsTracer tracer, Transaction tx, Block block) + private TransactionResult CallAndRestore(Transaction tx, Block block, BlockReceiptsTracer? tracer = null) { - tracer.StartNewBlockTrace(block); - tracer.StartNewTxTrace(tx); - _transactionProcessor.CallAndRestore(tx, block.Header, tracer); - tracer.EndTxTrace(); - tracer.EndBlockTrace(); + tracer?.StartNewBlockTrace(block); + tracer?.StartNewTxTrace(tx); + TransactionResult result = _transactionProcessor.CallAndRestore(tx, block.Header, tracer ?? NullTxTracer.Instance); + if (result) + { + tracer?.EndTxTrace(); + tracer?.EndBlockTrace(); + } + + return result; } } diff --git a/src/Nethermind/Nethermind.Evm.Test/TransactionSubstateTests.cs b/src/Nethermind/Nethermind.Evm.Test/TransactionSubstateTests.cs index a6177beaf5a..ed6c7ab99e9 100644 --- a/src/Nethermind/Nethermind.Evm.Test/TransactionSubstateTests.cs +++ b/src/Nethermind/Nethermind.Evm.Test/TransactionSubstateTests.cs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: LGPL-3.0-only using System; +using System.Collections.Generic; +using System.Linq; using FluentAssertions; using Nethermind.Core; using Nethermind.Core.Extensions; @@ -14,12 +16,15 @@ public class TransactionSubstateTests [Test] public void should_return_proper_revert_error_when_there_is_no_exception() { - byte[] data = {0, 0, 0, 0, + byte[] data = + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x5, - 0x05, 0x06, 0x07, 0x08, 0x09}; + 0x05, 0x06, 0x07, 0x08, 0x09 + }; ReadOnlyMemory readOnlyMemory = new(data); TransactionSubstate transactionSubstate = new(readOnlyMemory, 0, @@ -27,7 +32,7 @@ public void should_return_proper_revert_error_when_there_is_no_exception() new LogEntry[] { }, true, true); - transactionSubstate.Error.Should().Be("Reverted 0x0506070809"); + transactionSubstate.Error.Should().Be("Reverted \u0005\u0006\u0007\u0008\t"); } [Test] @@ -41,7 +46,21 @@ public void should_return_proper_revert_error_when_there_is_exception() new LogEntry[] { }, true, true); - transactionSubstate.Error.Should().Be("Reverted 0x0506070809"); + transactionSubstate.Error.Should().Be("Reverted \u0005\u0006\u0007\u0008\t"); + } + + [Test] + public void should_return_weird_revert_error_when_there_is_exception() + { + byte[] data = TransactionSubstate.ErrorFunctionSelector.Concat(Bytes.FromHexString("0x00000001000000000000000000000000000000000000000012a9d65e7d180cfcf3601b6d00000000000000000000000000000000000000000000000000000001000276a400000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000006a000000000300000000000115859c410282f6600012efb47fcfcad4f96c83d4ca676842fb03ef20a4770000000015f762bdaa80f6d9dc5518ff64cb7ba5717a10dabc4be3a41acd2c2f95ee22000012a9d65e7d180cfcf3601b6df0000000000000185594dac7eb0828ff000000000000000000000000")).ToArray(); + ReadOnlyMemory readOnlyMemory = new(data); + TransactionSubstate transactionSubstate = new(readOnlyMemory, + 0, + new ArraySegment
(), + new LogEntry[] { }, + true, + true); + transactionSubstate.Error.Should().Be("Reverted 0x08c379a000000001000000000000000000000000000000000000000012a9d65e7d180cfcf3601b6d00000000000000000000000000000000000000000000000000000001000276a400000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000006a000000000300000000000115859c410282f6600012efb47fcfcad4f96c83d4ca676842fb03ef20a4770000000015f762bdaa80f6d9dc5518ff64cb7ba5717a10dabc4be3a41acd2c2f95ee22000012a9d65e7d180cfcf3601b6df0000000000000185594dac7eb0828ff000000000000000000000000"); } [Test] @@ -61,19 +80,95 @@ public void should_return_proper_revert_error_when_revert_custom_error_badly_imp new LogEntry[] { }, true, true); - transactionSubstate.Error.Should().Be($"Reverted {hex}"); + transactionSubstate.Error.Should().Be("Reverted 0x220266b600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001741413231206469646e2774207061792070726566756e64000000000000000000"); + } + + private static IEnumerable<(byte[], string)> ErrorFunctionTestCases() + { + yield return ( + new byte[] + { + 0x08, 0xc3, 0x79, 0xa0, // Function selector for Error(string) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, // Data offset + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, // String length + 0x4e, 0x6f, 0x74, 0x20, 0x65, 0x6e, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x45, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x2e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // String data + }, + "Reverted Not enough Ether provided."); + + yield return ( + new byte[] + { + 0x08, 0xc3, 0x79, 0xa0, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, + 0x52, 0x65, 0x71, 0x3a, 0x3a, 0x55, 0x6e, 0x41, 0x75, 0x74, 0x68, 0x41, 0x75, 0x64, 0x69, 0x74, 0x6f, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }, + "Reverted Req::UnAuthAuditor"); + + // Invalid case + yield return (new byte[] { 0x08, 0xc3, 0x79, 0xa0, 0xFF }, "Reverted 0x08c379a0ff"); + } + + private static IEnumerable<(byte[], string)> PanicFunctionTestCases() + { + yield return ( + new byte[] + { + 0x4e, 0x48, 0x7b, 0x71, // Function selector for Panic(uint256) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Panic code 0x0 + }, + "Reverted generic panic"); + + yield return ( + new byte[] + { + 0x4e, 0x48, 0x7b, 0x71, // Function selector for Panic(uint256) + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22 // Panic code 0x22 + }, + "Reverted invalid encoded storage byte array accessed"); + + yield return ( + new byte[] + { + 0x4e, 0x48, 0x7b, 0x71, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF // Unknown panic code + }, + "Reverted unknown panic code (0xff)"); + + // Invalid case + yield return (new byte[] { 0x4e, 0x48, 0x7b, 0x71 }, "Reverted NH{q"); + } + + [Test] + [TestCaseSource(nameof(ErrorFunctionTestCases))] + [TestCaseSource(nameof(PanicFunctionTestCases))] + public void should_return_proper_revert_error_when_using_special_functions((byte[] data, string expected) tc) + { + // See: https://docs.soliditylang.org/en/latest/control-structures.html#revert + ReadOnlyMemory readOnlyMemory = new(tc.data); + TransactionSubstate transactionSubstate = new( + readOnlyMemory, + 0, + new ArraySegment
(), + new LogEntry[] { }, + true, + true); + + transactionSubstate.Error.Should().Be(tc.expected); } [Test] [Ignore("Badly implemented")] public void should_return_proper_revert_error_when_revert_custom_error() { - byte[] data = { + byte[] data = + { 0x22, 0x02, 0x66, 0xb6, // Keccak of `FailedOp(uint256,string)` == 0x220266b6 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x17, 0x41, 0x41, 0x32, 0x31, 0x20, 0x64, 0x69, 0x64, 0x6e, 0x27, 0x74, 0x20, 0x70, 0x61, 0x79, 0x20, 0x70, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, // "AA21 didn't pay prefund" - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; ReadOnlyMemory readOnlyMemory = new(data); TransactionSubstate transactionSubstate = new( readOnlyMemory, diff --git a/src/Nethermind/Nethermind.Evm.Test/VirtualMachineTests.cs b/src/Nethermind/Nethermind.Evm.Test/VirtualMachineTests.cs index 78e1f27729e..3d16808a35c 100644 --- a/src/Nethermind/Nethermind.Evm.Test/VirtualMachineTests.cs +++ b/src/Nethermind/Nethermind.Evm.Test/VirtualMachineTests.cs @@ -554,7 +554,7 @@ public void Revert() byte[] code = Bytes.FromHexString("0x6c726576657274656420646174616000557f726576657274206d657373616765000000000000000000000000000000000000600052600e6000fd"); TestAllTracerWithOutput receipt = Execute(blockNumber: MainnetSpecProvider.ByzantiumBlockNumber, 100_000, code); - Assert.That(receipt.Error, Is.EqualTo("Reverted 0x726576657274206d657373616765")); + Assert.That(receipt.Error, Is.EqualTo("Reverted revert message")); Assert.That(receipt.GasSpent, Is.EqualTo(GasCostOf.Transaction + 20024)); } } diff --git a/src/Nethermind/Nethermind.Evm/TransactionProcessing/BuildUpTransactionProcessorAdapter.cs b/src/Nethermind/Nethermind.Evm/TransactionProcessing/BuildUpTransactionProcessorAdapter.cs index 3583b6480b9..ae5ecc9b496 100644 --- a/src/Nethermind/Nethermind.Evm/TransactionProcessing/BuildUpTransactionProcessorAdapter.cs +++ b/src/Nethermind/Nethermind.Evm/TransactionProcessing/BuildUpTransactionProcessorAdapter.cs @@ -15,7 +15,7 @@ public BuildUpTransactionProcessorAdapter(ITransactionProcessor transactionProce _transactionProcessor = transactionProcessor; } - public void Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer) => + public TransactionResult Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer) => _transactionProcessor.BuildUp(transaction, blkCtx, txTracer); } } diff --git a/src/Nethermind/Nethermind.Evm/TransactionProcessing/CallAndRestoreTransactionProcessorAdapter.cs b/src/Nethermind/Nethermind.Evm/TransactionProcessing/CallAndRestoreTransactionProcessorAdapter.cs index 7042c9337a1..4d6972f380d 100644 --- a/src/Nethermind/Nethermind.Evm/TransactionProcessing/CallAndRestoreTransactionProcessorAdapter.cs +++ b/src/Nethermind/Nethermind.Evm/TransactionProcessing/CallAndRestoreTransactionProcessorAdapter.cs @@ -15,7 +15,7 @@ public CallAndRestoreTransactionProcessorAdapter(ITransactionProcessor transacti _transactionProcessor = transactionProcessor; } - public void Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer) => + public TransactionResult Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer) => _transactionProcessor.CallAndRestore(transaction, blkCtx, txTracer); } } diff --git a/src/Nethermind/Nethermind.Evm/TransactionProcessing/ChangeableTransactionProcessorAdapter.cs b/src/Nethermind/Nethermind.Evm/TransactionProcessing/ChangeableTransactionProcessorAdapter.cs index 231950c656c..c297c7e08c1 100644 --- a/src/Nethermind/Nethermind.Evm/TransactionProcessing/ChangeableTransactionProcessorAdapter.cs +++ b/src/Nethermind/Nethermind.Evm/TransactionProcessing/ChangeableTransactionProcessorAdapter.cs @@ -22,9 +22,7 @@ public ChangeableTransactionProcessorAdapter(ITransactionProcessor transactionPr TransactionProcessor = transactionProcessor; } - public void Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer) - { + public TransactionResult Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer) => CurrentAdapter.Execute(transaction, blkCtx, txTracer); - } } } diff --git a/src/Nethermind/Nethermind.Evm/TransactionProcessing/ExecuteTransactionProcessorAdapter.cs b/src/Nethermind/Nethermind.Evm/TransactionProcessing/ExecuteTransactionProcessorAdapter.cs index 2b4967dd3cd..5752bd85e11 100644 --- a/src/Nethermind/Nethermind.Evm/TransactionProcessing/ExecuteTransactionProcessorAdapter.cs +++ b/src/Nethermind/Nethermind.Evm/TransactionProcessing/ExecuteTransactionProcessorAdapter.cs @@ -15,7 +15,7 @@ public ExecuteTransactionProcessorAdapter(ITransactionProcessor transactionProce _transactionProcessor = transactionProcessor; } - public void Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer) => + public TransactionResult Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer) => _transactionProcessor.Execute(transaction, blkCtx, txTracer); } } diff --git a/src/Nethermind/Nethermind.Evm/TransactionProcessing/ITransactionProcessor.cs b/src/Nethermind/Nethermind.Evm/TransactionProcessing/ITransactionProcessor.cs index 972ac5be1d8..a79714bb764 100644 --- a/src/Nethermind/Nethermind.Evm/TransactionProcessing/ITransactionProcessor.cs +++ b/src/Nethermind/Nethermind.Evm/TransactionProcessing/ITransactionProcessor.cs @@ -11,21 +11,21 @@ public interface ITransactionProcessor /// /// Execute transaction, commit state /// - void Execute(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer); + TransactionResult Execute(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer); /// /// Call transaction, rollback state /// - void CallAndRestore(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer); + TransactionResult CallAndRestore(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer); /// /// Execute transaction, keep the state uncommitted /// - void BuildUp(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer); + TransactionResult BuildUp(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer); /// /// Call transaction, no validations, commit state /// Will NOT charge gas from sender account, so stateDiff will miss gas fee /// - void Trace(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer); + TransactionResult Trace(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer); } diff --git a/src/Nethermind/Nethermind.Evm/TransactionProcessing/ITransactionProcessorAdapter.cs b/src/Nethermind/Nethermind.Evm/TransactionProcessing/ITransactionProcessorAdapter.cs index 06ab48f127e..47846193483 100644 --- a/src/Nethermind/Nethermind.Evm/TransactionProcessing/ITransactionProcessorAdapter.cs +++ b/src/Nethermind/Nethermind.Evm/TransactionProcessing/ITransactionProcessorAdapter.cs @@ -8,6 +8,6 @@ namespace Nethermind.Evm.TransactionProcessing { public interface ITransactionProcessorAdapter { - void Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer); + TransactionResult Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer); } } diff --git a/src/Nethermind/Nethermind.Evm/TransactionProcessing/ReadOnlyTransactionProcessor.cs b/src/Nethermind/Nethermind.Evm/TransactionProcessing/ReadOnlyTransactionProcessor.cs index 97c68f0aec2..78e054cd033 100644 --- a/src/Nethermind/Nethermind.Evm/TransactionProcessing/ReadOnlyTransactionProcessor.cs +++ b/src/Nethermind/Nethermind.Evm/TransactionProcessing/ReadOnlyTransactionProcessor.cs @@ -23,16 +23,16 @@ public ReadOnlyTransactionProcessor(ITransactionProcessor transactionProcessor, _stateProvider.StateRoot = startState ?? throw new ArgumentNullException(nameof(startState)); } - public void Execute(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => + public TransactionResult Execute(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => _transactionProcessor.Execute(transaction, blCtx, txTracer); - public void CallAndRestore(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => + public TransactionResult CallAndRestore(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => _transactionProcessor.CallAndRestore(transaction, blCtx, txTracer); - public void BuildUp(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => + public TransactionResult BuildUp(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => _transactionProcessor.BuildUp(transaction, blCtx, txTracer); - public void Trace(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => + public TransactionResult Trace(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => _transactionProcessor.Trace(transaction, blCtx, txTracer); diff --git a/src/Nethermind/Nethermind.Evm/TransactionProcessing/TraceTransactionProcessorAdapter.cs b/src/Nethermind/Nethermind.Evm/TransactionProcessing/TraceTransactionProcessorAdapter.cs index 3b51b89ccee..73c5c07484a 100644 --- a/src/Nethermind/Nethermind.Evm/TransactionProcessing/TraceTransactionProcessorAdapter.cs +++ b/src/Nethermind/Nethermind.Evm/TransactionProcessing/TraceTransactionProcessorAdapter.cs @@ -15,7 +15,7 @@ public TraceTransactionProcessorAdapter(ITransactionProcessor transactionProcess _transactionProcessor = transactionProcessor; } - public void Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer) => + public TransactionResult Execute(Transaction transaction, BlockExecutionContext blkCtx, ITxTracer txTracer) => _transactionProcessor.Trace(transaction, blkCtx, txTracer); } } diff --git a/src/Nethermind/Nethermind.Evm/TransactionProcessing/TransactionProcessor.cs b/src/Nethermind/Nethermind.Evm/TransactionProcessing/TransactionProcessor.cs index 8eb05afb4be..8a4999ffc46 100644 --- a/src/Nethermind/Nethermind.Evm/TransactionProcessing/TransactionProcessor.cs +++ b/src/Nethermind/Nethermind.Evm/TransactionProcessing/TransactionProcessor.cs @@ -2,6 +2,8 @@ // SPDX-License-Identifier: LGPL-3.0-only using System; +using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; using System.Runtime.CompilerServices; @@ -65,37 +67,36 @@ public TransactionProcessor( IVirtualMachine? virtualMachine, ILogManager? logManager) { - Logger = logManager?.GetClassLogger() ?? throw new ArgumentNullException(nameof(logManager)); - SpecProvider = specProvider ?? throw new ArgumentNullException(nameof(specProvider)); - WorldState = worldState ?? throw new ArgumentNullException(nameof(worldState)); - VirtualMachine = virtualMachine ?? throw new ArgumentNullException(nameof(virtualMachine)); + ArgumentNullException.ThrowIfNull(logManager, nameof(logManager)); + ArgumentNullException.ThrowIfNull(specProvider, nameof(specProvider)); + ArgumentNullException.ThrowIfNull(worldState, nameof(worldState)); + ArgumentNullException.ThrowIfNull(virtualMachine, nameof(virtualMachine)); + + Logger = logManager.GetClassLogger(); + SpecProvider = specProvider; + WorldState = worldState; + VirtualMachine = virtualMachine; Ecdsa = new EthereumEcdsa(specProvider.ChainId, logManager); } - public void CallAndRestore(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) - { + public TransactionResult CallAndRestore(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => Execute(transaction, blCtx, txTracer, ExecutionOptions.CommitAndRestore); - } - public void BuildUp(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) + public TransactionResult BuildUp(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) { // we need to treat the result of previous transaction as the original value of next transaction // when we do not commit WorldState.TakeSnapshot(true); - Execute(transaction, blCtx, txTracer, ExecutionOptions.None); + return Execute(transaction, blCtx, txTracer, ExecutionOptions.None); } - public void Execute(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) - { + public TransactionResult Execute(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => Execute(transaction, blCtx, txTracer, ExecutionOptions.Commit); - } - public void Trace(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) - { + public TransactionResult Trace(Transaction transaction, BlockExecutionContext blCtx, ITxTracer txTracer) => Execute(transaction, blCtx, txTracer, ExecutionOptions.NoValidation); - } - protected virtual void Execute(Transaction tx, BlockExecutionContext blCtx, ITxTracer tracer, ExecutionOptions opts) + protected virtual TransactionResult Execute(Transaction tx, BlockExecutionContext blCtx, ITxTracer tracer, ExecutionOptions opts) { BlockHeader header = blCtx.Header; IReleaseSpec spec = SpecProvider.GetSpec(header); @@ -109,52 +110,26 @@ protected virtual void Execute(Transaction tx, BlockExecutionContext blCtx, ITxT // we commit only after all block is constructed bool commit = opts.HasFlag(ExecutionOptions.Commit) || !spec.IsEip658Enabled; - if (!ValidateStatic(tx, header, spec, tracer, opts, out long intrinsicGas)) - return; - - UInt256 effectiveGasPrice = - tx.CalculateEffectiveGasPrice(spec.IsEip1559Enabled, header.BaseFeePerGas); - - if (opts == ExecutionOptions.Commit || opts == ExecutionOptions.None) - { - decimal gasPrice = (decimal)effectiveGasPrice / 1_000_000_000m; - Metrics.MinGasPrice = Math.Min(gasPrice, Metrics.MinGasPrice); - Metrics.MaxGasPrice = Math.Max(gasPrice, Metrics.MaxGasPrice); + TransactionResult result; + if (!(result = ValidateStatic(tx, header, spec, tracer, opts, out long intrinsicGas))) return result; - Metrics.BlockMinGasPrice = Math.Min(gasPrice, Metrics.BlockMinGasPrice); - Metrics.BlockMaxGasPrice = Math.Max(gasPrice, Metrics.BlockMaxGasPrice); + UInt256 effectiveGasPrice = tx.CalculateEffectiveGasPrice(spec.IsEip1559Enabled, header.BaseFeePerGas); - Metrics.AveGasPrice = (Metrics.AveGasPrice * Metrics.Transactions + gasPrice) / (Metrics.Transactions + 1); - Metrics.EstMedianGasPrice += Metrics.AveGasPrice * 0.01m * decimal.Sign(gasPrice - Metrics.EstMedianGasPrice); - Metrics.Transactions++; - - Metrics.BlockAveGasPrice = (Metrics.BlockAveGasPrice * Metrics.BlockTransactions + gasPrice) / (Metrics.BlockTransactions + 1); - Metrics.BlockEstMedianGasPrice += Metrics.BlockAveGasPrice * 0.01m * decimal.Sign(gasPrice - Metrics.BlockEstMedianGasPrice); - Metrics.BlockTransactions++; - } + UpdateMetrics(opts, effectiveGasPrice); bool deleteCallerAccount = RecoverSenderIfNeeded(tx, spec, opts, effectiveGasPrice); - if (!ValidateSender(tx, header, spec, tracer, opts)) - return; + if (!(result = ValidateSender(tx, header, spec, tracer, opts))) return result; + if (!(result = BuyGas(tx, header, spec, tracer, opts, effectiveGasPrice, out UInt256 premiumPerGas, out UInt256 senderReservedGasPayment))) return result; + if (!(result = IncrementNonce(tx, header, spec, tracer, opts))) return result; - if (!BuyGas(tx, header, spec, tracer, opts, effectiveGasPrice, out UInt256 premiumPerGas, out UInt256 senderReservedGasPayment)) - return; + if (commit) WorldState.Commit(spec, tracer.IsTracingState ? tracer : NullTxTracer.Instance); - if (!IncrementNonce(tx, header, spec, tracer, opts)) - return; - - if (commit) - WorldState.Commit(spec, tracer.IsTracingState ? tracer : NullTxTracer.Instance); - - ExecutionEnvironment env = BuildExecutionEnvironmnet(tx, blCtx, spec, tracer, opts, effectiveGasPrice); + ExecutionEnvironment env = BuildExecutionEnvironment(tx, blCtx, spec, effectiveGasPrice); long gasAvailable = tx.GasLimit - intrinsicGas; - if (!ExecuteEVMCall(tx, header, spec, tracer, opts, gasAvailable, env, out TransactionSubstate? substate, out long spentGas, out byte statusCode)) - return; - - if (!PayFees(tx, header, spec, tracer, substate, spentGas, premiumPerGas, statusCode)) - return; + ExecuteEvmCall(tx, header, spec, tracer, opts, gasAvailable, env, out TransactionSubstate? substate, out long spentGas, out byte statusCode); + PayFees(tx, header, spec, tracer, substate, spentGas, premiumPerGas, statusCode); // Finalize if (restore) @@ -199,30 +174,31 @@ protected virtual void Execute(Transaction tx, BlockExecutionContext blCtx, ITxT tracer.MarkAsSuccess(env.ExecutingAccount, spentGas, substate.Output.ToArray(), logs, stateRoot); } } + + return TransactionResult.Ok; } - protected void QuickFail(Transaction tx, BlockHeader block, IReleaseSpec spec, ITxTracer txTracer, string? reason) + private static void UpdateMetrics(ExecutionOptions opts, UInt256 effectiveGasPrice) { - block.GasUsed += tx.GasLimit; + if (opts == ExecutionOptions.Commit || opts == ExecutionOptions.None) + { + decimal gasPrice = (decimal)effectiveGasPrice / 1_000_000_000m; + Metrics.MinGasPrice = Math.Min(gasPrice, Metrics.MinGasPrice); + Metrics.MaxGasPrice = Math.Max(gasPrice, Metrics.MaxGasPrice); - Address recipient = tx.To ?? ContractAddress.From( - tx.SenderAddress ?? Address.Zero, - WorldState.GetNonce(tx.SenderAddress ?? Address.Zero)); + Metrics.BlockMinGasPrice = Math.Min(gasPrice, Metrics.BlockMinGasPrice); + Metrics.BlockMaxGasPrice = Math.Max(gasPrice, Metrics.BlockMaxGasPrice); - if (txTracer.IsTracingReceipt) - { - Hash256? stateRoot = null; - if (!spec.IsEip658Enabled) - { - WorldState.RecalculateStateRoot(); - stateRoot = WorldState.StateRoot; - } + Metrics.AveGasPrice = (Metrics.AveGasPrice * Metrics.Transactions + gasPrice) / (Metrics.Transactions + 1); + Metrics.EstMedianGasPrice += Metrics.AveGasPrice * 0.01m * decimal.Sign(gasPrice - Metrics.EstMedianGasPrice); + Metrics.Transactions++; - txTracer.MarkAsFailed(recipient, tx.GasLimit, Array.Empty(), reason ?? "invalid", stateRoot); + Metrics.BlockAveGasPrice = (Metrics.BlockAveGasPrice * Metrics.BlockTransactions + gasPrice) / (Metrics.BlockTransactions + 1); + Metrics.BlockEstMedianGasPrice += Metrics.BlockAveGasPrice * 0.01m * decimal.Sign(gasPrice - Metrics.BlockEstMedianGasPrice); + Metrics.BlockTransactions++; } } - /// /// Validates the transaction, in a static manner (i.e. without accesing state/storage). /// It basically ensures the transaction is well formed (i.e. no null values where not allowed, no overflows, etc). @@ -236,7 +212,7 @@ protected void QuickFail(Transaction tx, BlockHeader block, IReleaseSpec spec, I /// Options (Flags) to use for execution /// Computed premium per gas /// - protected virtual bool ValidateStatic(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts, out long intrinsicGas) + protected virtual TransactionResult ValidateStatic(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts, out long intrinsicGas) { intrinsicGas = IntrinsicGasCalculator.Calculate(tx, spec); @@ -245,8 +221,7 @@ protected virtual bool ValidateStatic(Transaction tx, BlockHeader header, IRelea if (tx.SenderAddress is null) { TraceLogInvalidTx(tx, "SENDER_NOT_SPECIFIED"); - QuickFail(tx, header, spec, tracer, "sender not specified"); - return false; + return "sender not specified"; } if (validate && tx.Nonce >= ulong.MaxValue - 1) @@ -256,16 +231,14 @@ protected virtual bool ValidateStatic(Transaction tx, BlockHeader header, IRelea if (tx.IsContractCreation || tx.Nonce == ulong.MaxValue) { TraceLogInvalidTx(tx, "NONCE_OVERFLOW"); - QuickFail(tx, header, spec, tracer, "nonce overflow"); - return false; + return "nonce overflow"; } } if (tx.IsAboveInitCode(spec)) { TraceLogInvalidTx(tx, $"CREATE_TRANSACTION_SIZE_EXCEEDS_MAX_INIT_CODE_SIZE {tx.DataLength} > {spec.MaxInitCodeSize}"); - QuickFail(tx, header, spec, tracer, "EIP-3860 - transaction size over max init code size"); - return false; + return "EIP-3860 - transaction size over max init code size"; } if (!tx.IsSystem()) @@ -273,19 +246,17 @@ protected virtual bool ValidateStatic(Transaction tx, BlockHeader header, IRelea if (tx.GasLimit < intrinsicGas) { TraceLogInvalidTx(tx, $"GAS_LIMIT_BELOW_INTRINSIC_GAS {tx.GasLimit} < {intrinsicGas}"); - QuickFail(tx, header, spec, tracer, "gas limit below intrinsic gas"); - return false; + return "gas limit below intrinsic gas"; } if (validate && tx.GasLimit > header.GasLimit - header.GasUsed) { TraceLogInvalidTx(tx, $"BLOCK_GAS_LIMIT_EXCEEDED {tx.GasLimit} > {header.GasLimit} - {header.GasUsed}"); - QuickFail(tx, header, spec, tracer, "block gas limit exceeded"); - return false; + return "block gas limit exceeded"; } } - return true; + return TransactionResult.Ok; } // TODO Should we remove this already @@ -297,33 +268,34 @@ protected bool RecoverSenderIfNeeded(Transaction tx, IReleaseSpec spec, Executio bool deleteCallerAccount = false; - if (!WorldState.AccountExists(tx.SenderAddress)) + Address sender = tx.SenderAddress; + if (sender is null || !WorldState.AccountExists(sender)) { - if (Logger.IsDebug) Logger.Debug($"TX sender account does not exist {tx.SenderAddress} - trying to recover it"); + if (Logger.IsDebug) Logger.Debug($"TX sender account does not exist {sender} - trying to recover it"); - Address prevSender = tx.SenderAddress; // hacky fix for the potential recovery issue if (tx.Signature is not null) tx.SenderAddress = Ecdsa.RecoverAddress(tx, !spec.ValidateChainId); - if (prevSender != tx.SenderAddress) + if (sender != tx.SenderAddress) { if (Logger.IsWarn) - Logger.Warn($"TX recovery issue fixed - tx was coming with sender {prevSender} and the now it recovers to {tx.SenderAddress}"); + Logger.Warn($"TX recovery issue fixed - tx was coming with sender {sender} and the now it recovers to {tx.SenderAddress}"); + sender = tx.SenderAddress; } else { - TraceLogInvalidTx(tx, $"SENDER_ACCOUNT_DOES_NOT_EXIST {tx.SenderAddress}"); - if (!commit || noValidation || effectiveGasPrice == UInt256.Zero) + TraceLogInvalidTx(tx, $"SENDER_ACCOUNT_DOES_NOT_EXIST {sender}"); + if (!commit || noValidation || effectiveGasPrice.IsZero) { deleteCallerAccount = !commit || restore; - WorldState.CreateAccount(tx.SenderAddress, UInt256.Zero); + WorldState.CreateAccount(sender, in UInt256.Zero); } } - if (tx.SenderAddress is null) + if (sender is null) { - throw new InvalidDataException($"Failed to recover sender address on tx {tx.Hash} when previously recovered sender account did not exist."); + ThrowInvalidDataException($"Failed to recover sender address on tx {tx.Hash} when previously recovered sender account did not exist."); } } @@ -331,21 +303,20 @@ protected bool RecoverSenderIfNeeded(Transaction tx, IReleaseSpec spec, Executio } - protected virtual bool ValidateSender(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts) + protected virtual TransactionResult ValidateSender(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts) { bool validate = !opts.HasFlag(ExecutionOptions.NoValidation); if (validate && WorldState.IsInvalidContractSender(spec, tx.SenderAddress)) { TraceLogInvalidTx(tx, "SENDER_IS_CONTRACT"); - QuickFail(tx, header, spec, tracer, "sender has deployed code"); - return false; + return "sender has deployed code"; } - return true; + return TransactionResult.Ok; } - protected virtual bool BuyGas(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts, + protected virtual TransactionResult BuyGas(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts, in UInt256 effectiveGasPrice, out UInt256 premiumPerGas, out UInt256 senderReservedGasPayment) { premiumPerGas = UInt256.Zero; @@ -357,19 +328,16 @@ protected virtual bool BuyGas(Transaction tx, BlockHeader header, IReleaseSpec s if (!tx.TryCalculatePremiumPerGas(header.BaseFeePerGas, out premiumPerGas)) { TraceLogInvalidTx(tx, "MINER_PREMIUM_IS_NEGATIVE"); - QuickFail(tx, header, spec, tracer, "miner premium is negative"); - return false; + return "miner premium is negative"; } UInt256 senderBalance = WorldState.GetBalance(tx.SenderAddress); if (UInt256.SubtractUnderflow(senderBalance, tx.Value, out UInt256 balanceLeft)) { TraceLogInvalidTx(tx, $"INSUFFICIENT_SENDER_BALANCE: ({tx.SenderAddress})_BALANCE = {senderBalance}"); - QuickFail(tx, header, spec, tracer, "insufficient sender balance"); - return false; + return "insufficient sender balance"; } - bool overflows; if (spec.IsEip1559Enabled && !tx.IsFree()) { @@ -377,8 +345,7 @@ protected virtual bool BuyGas(Transaction tx, BlockHeader header, IReleaseSpec s if (overflows || balanceLeft < maxGasFee) { TraceLogInvalidTx(tx, $"INSUFFICIENT_MAX_FEE_PER_GAS_FOR_SENDER_BALANCE: ({tx.SenderAddress})_BALANCE = {senderBalance}, MAX_FEE_PER_GAS: {tx.MaxFeePerGas}"); - QuickFail(tx, header, spec, tracer, "insufficient MaxFeePerGas for sender balance"); - return false; + return "insufficient MaxFeePerGas for sender balance"; } if (tx.SupportsBlobs) { @@ -386,8 +353,7 @@ protected virtual bool BuyGas(Transaction tx, BlockHeader header, IReleaseSpec s if (overflows || UInt256.AddOverflow(maxGasFee, maxBlobGasFee, out UInt256 multidimGasFee) || multidimGasFee > balanceLeft) { TraceLogInvalidTx(tx, $"INSUFFICIENT_MAX_FEE_PER_BLOB_GAS_FOR_SENDER_BALANCE: ({tx.SenderAddress})_BALANCE = {senderBalance}"); - QuickFail(tx, header, spec, tracer, "insufficient sender balance"); - return false; + return "insufficient sender balance"; } } } @@ -405,46 +371,42 @@ protected virtual bool BuyGas(Transaction tx, BlockHeader header, IReleaseSpec s if (overflows || senderReservedGasPayment > balanceLeft) { TraceLogInvalidTx(tx, $"INSUFFICIENT_SENDER_BALANCE: ({tx.SenderAddress})_BALANCE = {senderBalance}"); - QuickFail(tx, header, spec, tracer, "insufficient sender balance"); - return false; + return "insufficient sender balance"; } } - if (validate) - WorldState.SubtractFromBalance(tx.SenderAddress, senderReservedGasPayment, spec); + if (validate) WorldState.SubtractFromBalance(tx.SenderAddress, senderReservedGasPayment, spec); - return true; + return TransactionResult.Ok; } - protected virtual bool IncrementNonce(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts) + protected virtual TransactionResult IncrementNonce(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts) { - if (tx.IsSystem()) - return true; + if (tx.IsSystem()) return TransactionResult.Ok; if (tx.Nonce != WorldState.GetNonce(tx.SenderAddress)) { TraceLogInvalidTx(tx, $"WRONG_TRANSACTION_NONCE: {tx.Nonce} (expected {WorldState.GetNonce(tx.SenderAddress)})"); - QuickFail(tx, header, spec, tracer, "wrong transaction nonce"); - return false; + return "wrong transaction nonce"; } WorldState.IncrementNonce(tx.SenderAddress); - return true; + return TransactionResult.Ok; } - protected virtual ExecutionEnvironment BuildExecutionEnvironmnet( - Transaction tx, BlockExecutionContext blCtx, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts, + protected ExecutionEnvironment BuildExecutionEnvironment( + Transaction tx, + BlockExecutionContext blCtx, + IReleaseSpec spec, in UInt256 effectiveGasPrice) { - Address recipient = tx.GetRecipient(tx.IsContractCreation ? WorldState.GetNonce(tx.SenderAddress) : 0) ?? - // this transaction is not a contract creation so it should have the recipient known and not null - throw new InvalidDataException("Recipient has not been resolved properly before tx execution"); + Address recipient = tx.GetRecipient(tx.IsContractCreation ? WorldState.GetNonce(tx.SenderAddress) : 0); + if (recipient is null) ThrowInvalidDataException("Recipient has not been resolved properly before tx execution"); - TxExecutionContext executionContext = - new(blCtx, tx.SenderAddress, effectiveGasPrice, tx.BlobVersionedHashes); + TxExecutionContext executionContext = new(blCtx, tx.SenderAddress, effectiveGasPrice, tx.BlobVersionedHashes); - CodeInfo codeInfo = tx.IsContractCreation ? new(tx.Data.AsArray()) - : VirtualMachine.GetCachedCodeInfo(WorldState, recipient, spec); + CodeInfo codeInfo = tx.IsContractCreation ? new(tx.Data?.AsArray() ?? Array.Empty()) + : VirtualMachine.GetCachedCodeInfo(WorldState, recipient, spec); byte[] inputData = tx.IsMessageCall ? tx.Data.AsArray() ?? Array.Empty() : Array.Empty(); @@ -461,10 +423,17 @@ protected virtual ExecutionEnvironment BuildExecutionEnvironmnet( ); } - protected virtual bool ExecuteEVMCall( - Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts, - in long gasAvailable, in ExecutionEnvironment env, - out TransactionSubstate? substate, out long spentGas, out byte statusCode) + protected void ExecuteEvmCall( + Transaction tx, + BlockHeader header, + IReleaseSpec spec, + ITxTracer tracer, + ExecutionOptions opts, + in long gasAvailable, + in ExecutionEnvironment env, + out TransactionSubstate? substate, + out long spentGas, + out byte statusCode) { bool validate = !opts.HasFlag(ExecutionOptions.NoValidation); @@ -489,8 +458,7 @@ protected virtual bool ExecuteEVMCall( PrepareAccountForContractDeployment(env.ExecutingAccount, spec); } - ExecutionType executionType = - tx.IsContractCreation ? ExecutionType.CREATE : ExecutionType.TRANSACTION; + ExecutionType executionType = tx.IsContractCreation ? ExecutionType.CREATE : ExecutionType.TRANSACTION; using (EvmState state = new(unspentGas, env, executionType, true, snapshot, false)) { @@ -510,14 +478,9 @@ protected virtual bool ExecuteEVMCall( state.WarmUp(header.GasBeneficiary); } - if (!tracer.IsTracingActions) - { - substate = VirtualMachine.Run(state, WorldState, tracer); - } - else - { - substate = VirtualMachine.Run(state, WorldState, tracer); - } + substate = !tracer.IsTracingActions + ? VirtualMachine.Run(state, WorldState, tracer) + : VirtualMachine.Run(state, WorldState, tracer); unspentGas = state.GasAvailable; @@ -542,12 +505,12 @@ protected virtual bool ExecuteEVMCall( long codeDepositGasCost = CodeDepositHandler.CalculateCost(substate.Output.Length, spec); if (unspentGas < codeDepositGasCost && spec.ChargeForTopLevelCreate) { - throw new OutOfGasException(); + ThrowOutOfGasException(); } if (CodeDepositHandler.CodeIsInvalid(spec, substate.Output)) { - throw new InvalidCodeException(); + ThrowInvalidCodeException(); } if (unspentGas >= codeDepositGasCost) @@ -574,41 +537,35 @@ protected virtual bool ExecuteEVMCall( spentGas = Refund(tx, header, spec, opts, substate, unspentGas, env.TxExecutionContext.GasPrice); } - catch (Exception ex) when (ex is EvmException || ex is OverflowException) // TODO: OverflowException? still needed? hope not + catch (Exception ex) when (ex is EvmException or OverflowException) // TODO: OverflowException? still needed? hope not { - if (Logger.IsTrace) - Logger.Trace($"EVM EXCEPTION: {ex.GetType().Name}"); + if (Logger.IsTrace) Logger.Trace($"EVM EXCEPTION: {ex.GetType().Name}:{ex.Message}"); WorldState.Restore(snapshot); } if (validate && !tx.IsSystem()) header.GasUsed += spentGas; - - return true; } - protected virtual bool PayFees(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, in TransactionSubstate substate, in long spentGas, in UInt256 premiumPerGas, in byte statusCode) + protected virtual void PayFees(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, in TransactionSubstate substate, in long spentGas, in UInt256 premiumPerGas, in byte statusCode) { - if (tx.IsSystem()) - return true; - - bool gasBeneficiaryNotDestroyed = substate?.DestroyList.Contains(header.GasBeneficiary) != true; - if (statusCode == StatusCode.Failure || gasBeneficiaryNotDestroyed) + if (!tx.IsSystem()) { + bool gasBeneficiaryNotDestroyed = substate?.DestroyList.Contains(header.GasBeneficiary) != true; + if (statusCode == StatusCode.Failure || gasBeneficiaryNotDestroyed) + { + UInt256 fees = (UInt256)spentGas * premiumPerGas; + UInt256 burntFees = !tx.IsFree() ? (UInt256)spentGas * header.BaseFeePerGas : 0; - UInt256 fees = (UInt256)spentGas * premiumPerGas; - UInt256 burntFees = !tx.IsFree() ? (UInt256)spentGas * header.BaseFeePerGas : 0; - - WorldState.AddToBalanceAndCreateIfNotExists(header.GasBeneficiary, fees, spec); + WorldState.AddToBalanceAndCreateIfNotExists(header.GasBeneficiary, fees, spec); - if (spec.IsEip1559Enabled && spec.Eip1559FeeCollector is not null && !burntFees.IsZero) - WorldState.AddToBalanceAndCreateIfNotExists(spec.Eip1559FeeCollector, burntFees, spec); ; + if (spec.IsEip1559Enabled && spec.Eip1559FeeCollector is not null && !burntFees.IsZero) + WorldState.AddToBalanceAndCreateIfNotExists(spec.Eip1559FeeCollector, burntFees, spec); - if (tracer.IsTracingFees) - tracer.ReportFees(fees, burntFees); + if (tracer.IsTracingFees) + tracer.ReportFees(fees, burntFees); + } } - - return true; } protected void PrepareAccountForContractDeployment(Address contractAddress, IReleaseSpec spec) @@ -628,7 +585,7 @@ protected void PrepareAccountForContractDeployment(Address contractAddress, IRel Logger.Trace($"Contract collision at {contractAddress}"); } - throw new TransactionCollisionException(); + ThrowTransactionCollisionException(); } // we clean any existing storage (in case of a previously called self destruct) @@ -664,5 +621,34 @@ protected virtual long Refund(Transaction tx, BlockHeader header, IReleaseSpec s return spentGas; } + + [DoesNotReturn] + [StackTraceHidden] + private static void ThrowInvalidDataException(string message) => throw new InvalidDataException(message); + + [DoesNotReturn] + [StackTraceHidden] + private static void ThrowInvalidCodeException() => throw new InvalidCodeException(); + + [DoesNotReturn] + [StackTraceHidden] + private static void ThrowOutOfGasException() => throw new OutOfGasException(); + + [DoesNotReturn] + [StackTraceHidden] + private static void ThrowTransactionCollisionException() => throw new TransactionCollisionException(); + } + + public readonly struct TransactionResult(string? error) + { + public static readonly TransactionResult Ok = new(); + public static readonly TransactionResult MalformedTransaction = new("malformed"); + [MemberNotNullWhen(true, nameof(Fail))] + [MemberNotNullWhen(false, nameof(Success))] + public string? Error { get; } = error; + public bool Fail => Error is not null; + public bool Success => Error is null; + public static implicit operator TransactionResult(string? error) => new(error); + public static implicit operator bool(TransactionResult result) => result.Success; } } diff --git a/src/Nethermind/Nethermind.Evm/TransactionSubstate.cs b/src/Nethermind/Nethermind.Evm/TransactionSubstate.cs index 04a8c663a67..32e40f6a175 100644 --- a/src/Nethermind/Nethermind.Evm/TransactionSubstate.cs +++ b/src/Nethermind/Nethermind.Evm/TransactionSubstate.cs @@ -2,15 +2,21 @@ // SPDX-License-Identifier: LGPL-3.0-only using System; +using System.Collections.Frozen; using System.Collections.Generic; +using System.Text; +using System.Text.Unicode; using Nethermind.Core; +using Nethermind.Core.Crypto; using Nethermind.Core.Extensions; using Nethermind.Int256; +using Nethermind.Logging; namespace Nethermind.Evm; public class TransactionSubstate { + private readonly ILogger _logger; private static readonly List
_emptyDestroyList = new(0); private static readonly List _emptyLogs = new(0); @@ -18,8 +24,25 @@ public class TransactionSubstate private const string Revert = "revert"; private const int RevertPrefix = 4; + private const int WordSize = EvmPooledMemory.WordSize; private const string RevertedErrorMessagePrefix = "Reverted "; + public static readonly byte[] ErrorFunctionSelector = Keccak.Compute("Error(string)").BytesToArray()[..RevertPrefix]; + public static readonly byte[] PanicFunctionSelector = Keccak.Compute("Panic(uint256)").BytesToArray()[..RevertPrefix]; + + private static readonly FrozenDictionary PanicReasons = new Dictionary + { + { 0x00, "generic panic" }, + { 0x01, "assert(false)" }, + { 0x11, "arithmetic underflow or overflow" }, + { 0x12, "division or modulo by zero" }, + { 0x21, "enum overflow" }, + { 0x22, "invalid encoded storage byte array accessed" }, + { 0x31, "out-of-bounds array access; popping on an empty array" }, + { 0x32, "out-of-bounds access of an array or bytesN" }, + { 0x41, "out of memory" }, + { 0x51, "uninitialized function" }, + }.ToFrozenDictionary(); public bool IsError => Error is not null && !ShouldRevert; public string? Error { get; } @@ -38,14 +61,15 @@ public TransactionSubstate(EvmExceptionType exceptionType, bool isTracerConnecte ShouldRevert = false; } - public TransactionSubstate( - ReadOnlyMemory output, + public TransactionSubstate(ReadOnlyMemory output, long refund, IReadOnlyCollection
destroyList, IReadOnlyCollection logs, bool shouldRevert, - bool isTracerConnected) + bool isTracerConnected, + ILogger logger = default) { + _logger = logger; Output = output; Refund = refund; DestroyList = destroyList; @@ -67,40 +91,63 @@ public TransactionSubstate( return; ReadOnlySpan span = Output.Span; - Error = TryGetErrorMessage(span) - ?? DefaultErrorMessage(span); + Error = string.Concat( + RevertedErrorMessagePrefix, + TryGetErrorMessage(span) ?? EncodeErrorMessage(span) + ); } - private string DefaultErrorMessage(ReadOnlySpan span) - { - return string.Concat(RevertedErrorMessagePrefix, span.ToHexString(true)); - } + private static string EncodeErrorMessage(ReadOnlySpan span) => + Utf8.IsValid(span) ? Encoding.UTF8.GetString(span) : span.ToHexString(true); - private unsafe string? TryGetErrorMessage(ReadOnlySpan span) + private string? TryGetErrorMessage(ReadOnlySpan span) { - if (span.Length < RevertPrefix + sizeof(UInt256) * 2) - { - return null; - } - try { - int start = (int)new UInt256(span.Slice(RevertPrefix, sizeof(UInt256)), isBigEndian: true); - if (checked(RevertPrefix + start + sizeof(UInt256)) > span.Length) + if (span.Length < RevertPrefix) return null; + ReadOnlySpan prefix = span.TakeAndMove(RevertPrefix); + UInt256 start, length; + + if (prefix.SequenceEqual(PanicFunctionSelector)) { - return null; + if (span.Length < WordSize) return null; + + UInt256 panicCode = new(span.TakeAndMove(WordSize), isBigEndian: true); + if (!PanicReasons.TryGetValue(panicCode, out string panicReason)) + { + return $"unknown panic code ({panicCode.ToHexString(skipLeadingZeros: true)})"; + } + + return panicReason; } - int length = (int)new UInt256(span.Slice(RevertPrefix + start, sizeof(UInt256)), isBigEndian: true); - if (checked(RevertPrefix + start + sizeof(UInt256) + length) != span.Length) + if (span.Length < WordSize * 2) return null; + + if (prefix.SequenceEqual(ErrorFunctionSelector)) { - return null; + start = new UInt256(span.TakeAndMove(WordSize), isBigEndian: true); + if (start != WordSize) return null; + + length = new UInt256(span.TakeAndMove(WordSize), isBigEndian: true); + if (length > span.Length) return null; + + ReadOnlySpan binaryMessage = span.TakeAndMove((int)length); + return EncodeErrorMessage(binaryMessage); + } - return string.Concat(RevertedErrorMessagePrefix, span.Slice(RevertPrefix + start + sizeof(UInt256), length).ToHexString(true)); + start = new UInt256(span.Slice(0, WordSize), isBigEndian: true); + if (UInt256.AddOverflow(start, WordSize, out UInt256 lengthOffset) || lengthOffset > span.Length) return null; + + length = new UInt256(span.Slice((int)start, WordSize), isBigEndian: true); + if (UInt256.AddOverflow(lengthOffset, length, out UInt256 endOffset) || endOffset != span.Length) return null; + + span = span.Slice((int)lengthOffset, (int)length); + return EncodeErrorMessage(span); } - catch (OverflowException) + catch (Exception e) // shouldn't happen, just for being safe { + if (_logger.IsError == true) _logger.Error("Couldn't parse revert message", e); return null; } } diff --git a/src/Nethermind/Nethermind.Evm/VirtualMachine.cs b/src/Nethermind/Nethermind.Evm/VirtualMachine.cs index 3ddd12fbc2d..d11645ecab0 100644 --- a/src/Nethermind/Nethermind.Evm/VirtualMachine.cs +++ b/src/Nethermind/Nethermind.Evm/VirtualMachine.cs @@ -60,7 +60,7 @@ public CodeInfo GetCachedCodeInfo(IWorldState worldState, Address codeSource, IR => _evm.GetCachedCodeInfo(worldState, codeSource, spec); public TransactionSubstate Run(EvmState state, IWorldState worldState, ITxTracer txTracer) - where TTracingActions : struct, IIsTracing + where TTracingActions : struct, VirtualMachine.IIsTracing => _evm.Run(state, worldState, txTracer); internal readonly ref struct CallResult @@ -70,18 +70,10 @@ internal readonly ref struct CallResult public static CallResult OutOfGasException => new(EvmExceptionType.OutOfGas); public static CallResult AccessViolationException => new(EvmExceptionType.AccessViolation); public static CallResult InvalidJumpDestination => new(EvmExceptionType.InvalidJumpDestination); - public static CallResult InvalidInstructionException - { - get - { - return new(EvmExceptionType.BadInstruction); - } - } - + public static CallResult InvalidInstructionException => new(EvmExceptionType.BadInstruction); public static CallResult StaticCallViolationException => new(EvmExceptionType.StaticCallViolation); public static CallResult StackOverflowException => new(EvmExceptionType.StackOverflow); // TODO: use these to avoid CALL POP attacks public static CallResult StackUnderflowException => new(EvmExceptionType.StackUnderflow); // TODO: use these to avoid CALL POP attacks - public static CallResult InvalidCodeException => new(EvmExceptionType.InvalidCode); public static CallResult Empty => new(Array.Empty(), null); @@ -330,7 +322,8 @@ public TransactionSubstate Run(EvmState state, IWorldState worl (IReadOnlyCollection
)currentState.DestroyList, (IReadOnlyCollection)currentState.Logs, callResult.ShouldRevert, - isTracerConnected: isTracing); + isTracerConnected: isTracing, + _logger); } Address callCodeOwner = currentState.Env.ExecutingAccount; diff --git a/src/Nethermind/Nethermind.Facade.Test/BlockchainBridgeTests.cs b/src/Nethermind/Nethermind.Facade.Test/BlockchainBridgeTests.cs index ec3713b966b..9abe5a44755 100644 --- a/src/Nethermind/Nethermind.Facade.Test/BlockchainBridgeTests.cs +++ b/src/Nethermind/Nethermind.Facade.Test/BlockchainBridgeTests.cs @@ -157,7 +157,7 @@ public void Call_uses_valid_post_merge_and_random_value() _transactionProcessor.Received().CallAndRestore( tx, Arg.Is(blkCtx => - blkCtx.Header.IsPostMerge && blkCtx.Header.Random == TestItem.KeccakA), + blkCtx.Header.IsPostMerge && blkCtx.Header.Random == TestItem.KeccakA), Arg.Any()); } diff --git a/src/Nethermind/Nethermind.Facade/BlockchainBridge.cs b/src/Nethermind/Nethermind.Facade/BlockchainBridge.cs index 5a40fd961f1..6fd77d79d86 100644 --- a/src/Nethermind/Nethermind.Facade/BlockchainBridge.cs +++ b/src/Nethermind/Nethermind.Facade/BlockchainBridge.cs @@ -155,7 +155,7 @@ public CallOutput(byte[] outputData, long gasSpent, string error, bool inputErro public CallOutput Call(BlockHeader header, Transaction tx, CancellationToken cancellationToken) { CallOutputTracer callOutputTracer = new(); - (bool Success, string Error) tryCallResult = TryCallAndRestore(header, tx, false, + TransactionResult tryCallResult = TryCallAndRestore(header, tx, false, callOutputTracer.WithCancellation(cancellationToken)); return new CallOutput { @@ -171,7 +171,7 @@ public CallOutput EstimateGas(BlockHeader header, Transaction tx, CancellationTo using IReadOnlyTransactionProcessor? readOnlyTransactionProcessor = _processingEnv.Build(header.StateRoot!); EstimateGasTracer estimateGasTracer = new(); - (bool Success, string Error) tryCallResult = TryCallAndRestore( + TransactionResult tryCallResult = TryCallAndRestore( header, tx, true, @@ -197,7 +197,7 @@ public CallOutput CreateAccessList(BlockHeader header, Transaction tx, Cancellat tx.GetRecipient(tx.IsContractCreation ? _processingEnv.StateReader.GetNonce(header.StateRoot, tx.SenderAddress) : 0)) : new(); - (bool Success, string Error) tryCallResult = TryCallAndRestore(header, tx, false, + TransactionResult tryCallResult = TryCallAndRestore(header, tx, false, new CompositeTxTracer(callOutputTracer, accessTxTracer).WithCancellation(cancellationToken)); return new CallOutput @@ -210,7 +210,7 @@ public CallOutput CreateAccessList(BlockHeader header, Transaction tx, Cancellat }; } - private (bool Success, string Error) TryCallAndRestore( + private TransactionResult TryCallAndRestore( BlockHeader blockHeader, Transaction transaction, bool treatBlockHeaderAsParentBlock, @@ -218,16 +218,15 @@ public CallOutput CreateAccessList(BlockHeader header, Transaction tx, Cancellat { try { - CallAndRestore(blockHeader, transaction, treatBlockHeaderAsParentBlock, tracer); - return (true, string.Empty); + return CallAndRestore(blockHeader, transaction, treatBlockHeaderAsParentBlock, tracer); } catch (InsufficientBalanceException ex) { - return (false, ex.Message); + return new TransactionResult(ex.Message); } } - private void CallAndRestore( + private TransactionResult CallAndRestore( BlockHeader blockHeader, Transaction transaction, bool treatBlockHeaderAsParentBlock, @@ -278,7 +277,7 @@ private void CallAndRestore( callHeader.MixHash = blockHeader.MixHash; callHeader.IsPostMerge = blockHeader.Difficulty == 0; transaction.Hash = transaction.CalculateHash(); - transactionProcessor.CallAndRestore(transaction, new(callHeader), tracer); + return transactionProcessor.CallAndRestore(transaction, new(callHeader), tracer); } public ulong GetChainId() diff --git a/src/Nethermind/Nethermind.JsonRpc.Test/Modules/Eth/EthRpcModuleTests.cs b/src/Nethermind/Nethermind.JsonRpc.Test/Modules/Eth/EthRpcModuleTests.cs index ddf1ed2da5b..da8d5dc2aec 100644 --- a/src/Nethermind/Nethermind.JsonRpc.Test/Modules/Eth/EthRpcModuleTests.cs +++ b/src/Nethermind/Nethermind.JsonRpc.Test/Modules/Eth/EthRpcModuleTests.cs @@ -41,6 +41,7 @@ namespace Nethermind.JsonRpc.Test.Modules.Eth; [Parallelizable(ParallelScope.All)] [TestFixture] +[Culture("en-US")] public partial class EthRpcModuleTests { [TestCase("earliest", "0x3635c9adc5dea00000")] diff --git a/src/Nethermind/Nethermind.JsonRpc.Test/Modules/Proof/ProofRpcModuleTests.cs b/src/Nethermind/Nethermind.JsonRpc.Test/Modules/Proof/ProofRpcModuleTests.cs index aabb92d9c02..5b30719b0be 100644 --- a/src/Nethermind/Nethermind.JsonRpc.Test/Modules/Proof/ProofRpcModuleTests.cs +++ b/src/Nethermind/Nethermind.JsonRpc.Test/Modules/Proof/ProofRpcModuleTests.cs @@ -26,6 +26,7 @@ using Nethermind.TxPool; using NUnit.Framework; using System.Threading.Tasks; +using FluentAssertions; using Nethermind.Consensus.Processing; using Nethermind.State.Tracing; using NSubstitute; @@ -33,7 +34,7 @@ namespace Nethermind.JsonRpc.Test.Modules.Proof { [Parallelizable(ParallelScope.None)] - [TestFixture(true, true)] + // [TestFixture(true, true)] TODO fix or remove test? [TestFixture(true, false)] [TestFixture(false, false)] public class ProofRpcModuleTests @@ -44,7 +45,7 @@ public class ProofRpcModuleTests private IBlockTree _blockTree = null!; private IDbProvider _dbProvider = null!; private TestSpecProvider _specProvider = null!; - private ReadOnlyWorldStateManager _readOnlyWorldStateManager = null!; + private WorldStateManager _worldStateManager = null!; public ProofRpcModuleTests(bool createSystemAccount, bool useNonZeroGasPrice) { @@ -55,16 +56,23 @@ public ProofRpcModuleTests(bool createSystemAccount, bool useNonZeroGasPrice) [SetUp] public async Task Setup() { - InMemoryReceiptStorage receiptStorage = new(); - _specProvider = new TestSpecProvider(London.Instance); - _blockTree = Build.A.BlockTree(_specProvider).WithTransactions(receiptStorage).OfChainLength(10).TestObject; _dbProvider = await TestMemDbProvider.InitAsync(); - ITrieStore trieStore = new TrieStore(_dbProvider.StateDb, LimboLogs.Instance); - _readOnlyWorldStateManager = new ReadOnlyWorldStateManager(_dbProvider, trieStore.AsReadOnly(), LimboLogs.Instance); + WorldState worldState = new WorldState(trieStore, _dbProvider.CodeDb, LimboLogs.Instance); + worldState.CreateAccount(TestItem.AddressA, 100000); + worldState.Commit(London.Instance); + worldState.CommitTree(0); + + InMemoryReceiptStorage receiptStorage = new(); + _specProvider = new TestSpecProvider(London.Instance); + _blockTree = Build.A.BlockTree(new Block(Build.A.BlockHeader.WithStateRoot(worldState.StateRoot).TestObject, new BlockBody()), _specProvider) + .WithTransactions(receiptStorage) + .OfChainLength(10) + .TestObject; + _worldStateManager = new WorldStateManager(worldState, trieStore, _dbProvider, LimboLogs.Instance); ProofModuleFactory moduleFactory = new( - _readOnlyWorldStateManager, + _worldStateManager, _blockTree, new CompositeBlockPreprocessorStep(new RecoverSignatures(new EthereumEcdsa(TestBlockchainIds.ChainId, LimboLogs.Instance), NullTxPool.Instance, _specProvider, LimboLogs.Instance)), receiptStorage, @@ -139,8 +147,8 @@ public async Task On_incorrect_params_returns_correct_error_code() Assert.True(response.Contains($"{ErrorCodes.InvalidParams}"), "missing"); } - [TestCase(true, "{\"jsonrpc\":\"2.0\",\"result\":{\"receipt\":{\"transactionHash\":\"0x6db23e4d6e1f23a0f67ae8637cd675363ec59aea22acd86300ac1f1cb42c9011\",\"transactionIndex\":\"0x0\",\"blockHash\":\"0x77f368c23226eee1583f671719f117df588fc5bf19c2a73e190e404a8be570f1\",\"blockNumber\":\"0x1\",\"cumulativeGasUsed\":\"0x0\",\"gasUsed\":\"0x0\",\"effectiveGasPrice\":\"0x1\",\"to\":null,\"contractAddress\":null,\"logs\":[],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\"status\":\"0x0\",\"type\":\"0x0\"},\"txProof\":[\"0xf851a0e244ea69b68d9f3fd5eff812a4a7e1e105a8c1143ff82206458ad45fe1801c9b80808080808080a08a1641bd871a8d574e81653362ae89e549a9ab0660bd5b180328d00f13e9c6bb8080808080808080\",\"0xf86530b862f860800182520894000000000000000000000000000000000000000001818025a0e7b18371f1b94890bd11e7f67ba7e7a3a6b263d68b2d18e258f6e063d6abd90ea00a015b31944dee0bde211cec1636a3f05bfea0678e240ae8dfe309b2aac22d93\"],\"receiptProof\":[\"0xf851a053e4a8d7d8438fa45d6b75bbd6fb699b08049c1caf1c21ada42a746ddfb61d0b80808080808080a04de834bd23b53a3d82923ae5f359239b326c66758f2ae636ab934844dba2b9658080808080808080\",\"0xf9010f30b9010bf9010880825208b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0\"],\"blockHeader\":\"0xf901f9a0b3157bcccab04639f6393042690a6c9862deebe88c781f911e8dfd265531e9ffa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a038b96dec209c13afedbb48916f68cb38a423d13c469f5f1e338ad7415c9cf5e3a0e1b1585a222beceb3887dc6701802facccf186c2d0f6aa69e26ae0c431fc2b5db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830f424001833d090080830f424183010203a02ba5557a4c62a513c7e56d1bf13373e0da6bec016755483e91589fe1c6d212e28800000000000003e8\"},\"id\":67}")] - [TestCase(false, "{\"jsonrpc\":\"2.0\",\"result\":{\"receipt\":{\"transactionHash\":\"0x6db23e4d6e1f23a0f67ae8637cd675363ec59aea22acd86300ac1f1cb42c9011\",\"transactionIndex\":\"0x0\",\"blockHash\":\"0x77f368c23226eee1583f671719f117df588fc5bf19c2a73e190e404a8be570f1\",\"blockNumber\":\"0x1\",\"cumulativeGasUsed\":\"0x0\",\"gasUsed\":\"0x0\",\"effectiveGasPrice\":\"0x1\",\"to\":null,\"contractAddress\":null,\"logs\":[],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\"status\":\"0x0\",\"type\":\"0x0\"},\"txProof\":[\"0xf851a0e244ea69b68d9f3fd5eff812a4a7e1e105a8c1143ff82206458ad45fe1801c9b80808080808080a08a1641bd871a8d574e81653362ae89e549a9ab0660bd5b180328d00f13e9c6bb8080808080808080\",\"0xf86530b862f860800182520894000000000000000000000000000000000000000001818025a0e7b18371f1b94890bd11e7f67ba7e7a3a6b263d68b2d18e258f6e063d6abd90ea00a015b31944dee0bde211cec1636a3f05bfea0678e240ae8dfe309b2aac22d93\"],\"receiptProof\":[\"0xf851a053e4a8d7d8438fa45d6b75bbd6fb699b08049c1caf1c21ada42a746ddfb61d0b80808080808080a04de834bd23b53a3d82923ae5f359239b326c66758f2ae636ab934844dba2b9658080808080808080\",\"0xf9010f30b9010bf9010880825208b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0\"]},\"id\":67}")] + [TestCase(true, "{\"jsonrpc\":\"2.0\",\"result\":{\"receipt\":{\"transactionHash\":\"0x9d335cdd632432bc4181dabfc07b9a614f1fcf9f0d2c0c1340e35a403875fdb1\",\"transactionIndex\":\"0x0\",\"blockHash\":\"0xda4b917515655b1aabcc9b01125df34a76c6ebb3e7e2f2b060d4daa70d9f813d\",\"blockNumber\":\"0x1\",\"cumulativeGasUsed\":\"0x0\",\"gasUsed\":\"0x0\",\"effectiveGasPrice\":\"0x1\",\"to\":null,\"contractAddress\":null,\"logs\":[],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\"status\":\"0x0\",\"type\":\"0x0\"},\"txProof\":[\"0xf851a0eb9c9ef295ba68ff22c85763176dabc05773d58ef77ce34e4a23bf9516c706bc80808080808080a0850e08970f6beee9bd3687c74e591429cf6f65d5faf9db298ddc627ac4a26a1b8080808080808080\",\"0xf86530b862f860800182a41094000000000000000000000000000000000000000001818026a0e4830571029d291f22478cbb60a04115f783fb687f9c3a98bf9d4a008f909817a010f0f7a1c274747616522ea29771cb026bf153362227563e2657d25fa57816bd\"],\"receiptProof\":[\"0xf851a0460919cda4f025e4e91b9540e4a0fb8a2cf07e4ad8b2379a053efe2f98b1789980808080808080a0bc8717240b46db28e32bc834f8c34f4d70c2e9ba880eb68de904351fd5ef158f8080808080808080\",\"0xf9010d30b90109f901060180b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0\"],\"blockHeader\":\"0xf901f9a0a3e31eb259593976b3717142a5a9e90637f614d33e2ad13f01134ea00c24ca5aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a009e11c477e0a0dfdfe036492b9bce7131991eb23bcf9575f9bff1e4016f90447a0e1b1585a222beceb3887dc6701802facccf186c2d0f6aa69e26ae0c431fc2b5db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830f424001833d090080830f424183010203a02ba5557a4c62a513c7e56d1bf13373e0da6bec016755483e91589fe1c6d212e28800000000000003e8\"},\"id\":67}")] + [TestCase(false, "{\"jsonrpc\":\"2.0\",\"result\":{\"receipt\":{\"transactionHash\":\"0x9d335cdd632432bc4181dabfc07b9a614f1fcf9f0d2c0c1340e35a403875fdb1\",\"transactionIndex\":\"0x0\",\"blockHash\":\"0xda4b917515655b1aabcc9b01125df34a76c6ebb3e7e2f2b060d4daa70d9f813d\",\"blockNumber\":\"0x1\",\"cumulativeGasUsed\":\"0x0\",\"gasUsed\":\"0x0\",\"effectiveGasPrice\":\"0x1\",\"to\":null,\"contractAddress\":null,\"logs\":[],\"logsBloom\":\"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\",\"status\":\"0x0\",\"type\":\"0x0\"},\"txProof\":[\"0xf851a0eb9c9ef295ba68ff22c85763176dabc05773d58ef77ce34e4a23bf9516c706bc80808080808080a0850e08970f6beee9bd3687c74e591429cf6f65d5faf9db298ddc627ac4a26a1b8080808080808080\",\"0xf86530b862f860800182a41094000000000000000000000000000000000000000001818026a0e4830571029d291f22478cbb60a04115f783fb687f9c3a98bf9d4a008f909817a010f0f7a1c274747616522ea29771cb026bf153362227563e2657d25fa57816bd\"],\"receiptProof\":[\"0xf851a0460919cda4f025e4e91b9540e4a0fb8a2cf07e4ad8b2379a053efe2f98b1789980808080808080a0bc8717240b46db28e32bc834f8c34f4d70c2e9ba880eb68de904351fd5ef158f8080808080808080\",\"0xf9010d30b90109f901060180b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0\"]},\"id\":67}")] public async Task Can_get_receipt(bool withHeader, string expectedResult) { Hash256 txHash = _blockTree.FindBlock(1)!.Transactions[0].Hash!; @@ -158,11 +166,11 @@ public async Task Can_get_receipt(bool withHeader, string expectedResult) } string response = await RpcTest.TestSerializedRequest(_proofRpcModule, "proof_getTransactionReceipt", $"{txHash}", $"{withHeader}"); - Assert.That(response, Is.EqualTo(expectedResult)); + response.Should().Be(expectedResult); } - [TestCase(true, "{\"jsonrpc\":\"2.0\",\"result\":{\"receipt\":{\"transactionHash\":\"0x1d4bacd3b4db06677ec7f43b6be43a6c1c4285ba7c8e2e63021b53701cf8189b\",\"transactionIndex\":\"0x1\",\"blockHash\":\"0x77f368c23226eee1583f671719f117df588fc5bf19c2a73e190e404a8be570f1\",\"blockNumber\":\"0x1\",\"cumulativeGasUsed\":\"0x7d0\",\"gasUsed\":\"0x3e8\",\"effectiveGasPrice\":\"0x1\",\"from\":\"0x475674cb523a0a2736b7f7534390288fce16982c\",\"to\":\"0x76e68a8696537e4141926f3e528733af9e237d69\",\"contractAddress\":\"0x76e68a8696537e4141926f3e528733af9e237d69\",\"logs\":[{\"removed\":false,\"logIndex\":\"0x2\",\"transactionIndex\":\"0x1\",\"transactionHash\":\"0x1d4bacd3b4db06677ec7f43b6be43a6c1c4285ba7c8e2e63021b53701cf8189b\",\"blockHash\":\"0x77f368c23226eee1583f671719f117df588fc5bf19c2a73e190e404a8be570f1\",\"blockNumber\":\"0x1\",\"address\":\"0x0000000000000000000000000000000000000000\",\"data\":\"0x\",\"topics\":[\"0x0000000000000000000000000000000000000000000000000000000000000000\"]},{\"removed\":false,\"logIndex\":\"0x3\",\"transactionIndex\":\"0x1\",\"transactionHash\":\"0x1d4bacd3b4db06677ec7f43b6be43a6c1c4285ba7c8e2e63021b53701cf8189b\",\"blockHash\":\"0x77f368c23226eee1583f671719f117df588fc5bf19c2a73e190e404a8be570f1\",\"blockNumber\":\"0x1\",\"address\":\"0x0000000000000000000000000000000000000000\",\"data\":\"0x\",\"topics\":[\"0x0000000000000000000000000000000000000000000000000000000000000000\"]}],\"logsBloom\":\"0x00000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000\",\"status\":\"0x0\",\"type\":\"0x0\"},\"txProof\":[\"0xf851a0e244ea69b68d9f3fd5eff812a4a7e1e105a8c1143ff82206458ad45fe1801c9b80808080808080a08a1641bd871a8d574e81653362ae89e549a9ab0660bd5b180328d00f13e9c6bb8080808080808080\",\"0xf86431b861f85f8001825208940000000000000000000000000000000000000000020125a00861eb73c37c3560fc40047523506de00ecfa6b96dff7d37e5ce75dc3986078da032e161403eae434b0f94a36fcc7e6ad46ccffc00fe90f0756118506e918eaef9\"],\"receiptProof\":[\"0xf851a053e4a8d7d8438fa45d6b75bbd6fb699b08049c1caf1c21ada42a746ddfb61d0b80808080808080a04de834bd23b53a3d82923ae5f359239b326c66758f2ae636ab934844dba2b9658080808080808080\",\"0xf9010f31b9010bf901088082a410b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0\"],\"blockHeader\":\"0xf901f9a0b3157bcccab04639f6393042690a6c9862deebe88c781f911e8dfd265531e9ffa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a038b96dec209c13afedbb48916f68cb38a423d13c469f5f1e338ad7415c9cf5e3a0e1b1585a222beceb3887dc6701802facccf186c2d0f6aa69e26ae0c431fc2b5db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830f424001833d090080830f424183010203a02ba5557a4c62a513c7e56d1bf13373e0da6bec016755483e91589fe1c6d212e28800000000000003e8\"},\"id\":67}")] - [TestCase(false, "{\"jsonrpc\":\"2.0\",\"result\":{\"receipt\":{\"transactionHash\":\"0x1d4bacd3b4db06677ec7f43b6be43a6c1c4285ba7c8e2e63021b53701cf8189b\",\"transactionIndex\":\"0x1\",\"blockHash\":\"0x77f368c23226eee1583f671719f117df588fc5bf19c2a73e190e404a8be570f1\",\"blockNumber\":\"0x1\",\"cumulativeGasUsed\":\"0x7d0\",\"gasUsed\":\"0x3e8\",\"effectiveGasPrice\":\"0x1\",\"from\":\"0x475674cb523a0a2736b7f7534390288fce16982c\",\"to\":\"0x76e68a8696537e4141926f3e528733af9e237d69\",\"contractAddress\":\"0x76e68a8696537e4141926f3e528733af9e237d69\",\"logs\":[{\"removed\":false,\"logIndex\":\"0x2\",\"transactionIndex\":\"0x1\",\"transactionHash\":\"0x1d4bacd3b4db06677ec7f43b6be43a6c1c4285ba7c8e2e63021b53701cf8189b\",\"blockHash\":\"0x77f368c23226eee1583f671719f117df588fc5bf19c2a73e190e404a8be570f1\",\"blockNumber\":\"0x1\",\"address\":\"0x0000000000000000000000000000000000000000\",\"data\":\"0x\",\"topics\":[\"0x0000000000000000000000000000000000000000000000000000000000000000\"]},{\"removed\":false,\"logIndex\":\"0x3\",\"transactionIndex\":\"0x1\",\"transactionHash\":\"0x1d4bacd3b4db06677ec7f43b6be43a6c1c4285ba7c8e2e63021b53701cf8189b\",\"blockHash\":\"0x77f368c23226eee1583f671719f117df588fc5bf19c2a73e190e404a8be570f1\",\"blockNumber\":\"0x1\",\"address\":\"0x0000000000000000000000000000000000000000\",\"data\":\"0x\",\"topics\":[\"0x0000000000000000000000000000000000000000000000000000000000000000\"]}],\"logsBloom\":\"0x00000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000\",\"status\":\"0x0\",\"type\":\"0x0\"},\"txProof\":[\"0xf851a0e244ea69b68d9f3fd5eff812a4a7e1e105a8c1143ff82206458ad45fe1801c9b80808080808080a08a1641bd871a8d574e81653362ae89e549a9ab0660bd5b180328d00f13e9c6bb8080808080808080\",\"0xf86431b861f85f8001825208940000000000000000000000000000000000000000020125a00861eb73c37c3560fc40047523506de00ecfa6b96dff7d37e5ce75dc3986078da032e161403eae434b0f94a36fcc7e6ad46ccffc00fe90f0756118506e918eaef9\"],\"receiptProof\":[\"0xf851a053e4a8d7d8438fa45d6b75bbd6fb699b08049c1caf1c21ada42a746ddfb61d0b80808080808080a04de834bd23b53a3d82923ae5f359239b326c66758f2ae636ab934844dba2b9658080808080808080\",\"0xf9010f31b9010bf901088082a410b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0\"]},\"id\":67}")] + [TestCase(true, "{\"jsonrpc\":\"2.0\",\"result\":{\"receipt\":{\"transactionHash\":\"0x4901390ae91e8a4286f7ae9053440c48eb5c2bca11ca83439f0088a4af90ceb8\",\"transactionIndex\":\"0x1\",\"blockHash\":\"0xda4b917515655b1aabcc9b01125df34a76c6ebb3e7e2f2b060d4daa70d9f813d\",\"blockNumber\":\"0x1\",\"cumulativeGasUsed\":\"0x7d0\",\"gasUsed\":\"0x3e8\",\"effectiveGasPrice\":\"0x1\",\"from\":\"0x475674cb523a0a2736b7f7534390288fce16982c\",\"to\":\"0x76e68a8696537e4141926f3e528733af9e237d69\",\"contractAddress\":\"0x76e68a8696537e4141926f3e528733af9e237d69\",\"logs\":[{\"removed\":false,\"logIndex\":\"0x2\",\"transactionIndex\":\"0x1\",\"transactionHash\":\"0x4901390ae91e8a4286f7ae9053440c48eb5c2bca11ca83439f0088a4af90ceb8\",\"blockHash\":\"0xda4b917515655b1aabcc9b01125df34a76c6ebb3e7e2f2b060d4daa70d9f813d\",\"blockNumber\":\"0x1\",\"address\":\"0x0000000000000000000000000000000000000000\",\"data\":\"0x\",\"topics\":[\"0x0000000000000000000000000000000000000000000000000000000000000000\"]},{\"removed\":false,\"logIndex\":\"0x3\",\"transactionIndex\":\"0x1\",\"transactionHash\":\"0x4901390ae91e8a4286f7ae9053440c48eb5c2bca11ca83439f0088a4af90ceb8\",\"blockHash\":\"0xda4b917515655b1aabcc9b01125df34a76c6ebb3e7e2f2b060d4daa70d9f813d\",\"blockNumber\":\"0x1\",\"address\":\"0x0000000000000000000000000000000000000000\",\"data\":\"0x\",\"topics\":[\"0x0000000000000000000000000000000000000000000000000000000000000000\"]}],\"logsBloom\":\"0x00000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000\",\"status\":\"0x0\",\"type\":\"0x0\"},\"txProof\":[\"0xf851a0eb9c9ef295ba68ff22c85763176dabc05773d58ef77ce34e4a23bf9516c706bc80808080808080a0850e08970f6beee9bd3687c74e591429cf6f65d5faf9db298ddc627ac4a26a1b8080808080808080\",\"0xf86431b861f85f010182a410940000000000000000000000000000000000000000020126a0872929cb57ab6d88d0004a60f00df3dd9e0755860549aea25e559bce3d4a66dba01c06266ee2085ae815c258dd9dbb601bfc08c35c13b7cc9cd4ed88a16c3eb3f0\"],\"receiptProof\":[\"0xf851a0460919cda4f025e4e91b9540e4a0fb8a2cf07e4ad8b2379a053efe2f98b1789980808080808080a0bc8717240b46db28e32bc834f8c34f4d70c2e9ba880eb68de904351fd5ef158f8080808080808080\",\"0xf9010d31b90109f901060180b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0\"],\"blockHeader\":\"0xf901f9a0a3e31eb259593976b3717142a5a9e90637f614d33e2ad13f01134ea00c24ca5aa01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a009e11c477e0a0dfdfe036492b9bce7131991eb23bcf9575f9bff1e4016f90447a0e1b1585a222beceb3887dc6701802facccf186c2d0f6aa69e26ae0c431fc2b5db9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000830f424001833d090080830f424183010203a02ba5557a4c62a513c7e56d1bf13373e0da6bec016755483e91589fe1c6d212e28800000000000003e8\"},\"id\":67}")] + [TestCase(false, "{\"jsonrpc\":\"2.0\",\"result\":{\"receipt\":{\"transactionHash\":\"0x4901390ae91e8a4286f7ae9053440c48eb5c2bca11ca83439f0088a4af90ceb8\",\"transactionIndex\":\"0x1\",\"blockHash\":\"0xda4b917515655b1aabcc9b01125df34a76c6ebb3e7e2f2b060d4daa70d9f813d\",\"blockNumber\":\"0x1\",\"cumulativeGasUsed\":\"0x7d0\",\"gasUsed\":\"0x3e8\",\"effectiveGasPrice\":\"0x1\",\"from\":\"0x475674cb523a0a2736b7f7534390288fce16982c\",\"to\":\"0x76e68a8696537e4141926f3e528733af9e237d69\",\"contractAddress\":\"0x76e68a8696537e4141926f3e528733af9e237d69\",\"logs\":[{\"removed\":false,\"logIndex\":\"0x2\",\"transactionIndex\":\"0x1\",\"transactionHash\":\"0x4901390ae91e8a4286f7ae9053440c48eb5c2bca11ca83439f0088a4af90ceb8\",\"blockHash\":\"0xda4b917515655b1aabcc9b01125df34a76c6ebb3e7e2f2b060d4daa70d9f813d\",\"blockNumber\":\"0x1\",\"address\":\"0x0000000000000000000000000000000000000000\",\"data\":\"0x\",\"topics\":[\"0x0000000000000000000000000000000000000000000000000000000000000000\"]},{\"removed\":false,\"logIndex\":\"0x3\",\"transactionIndex\":\"0x1\",\"transactionHash\":\"0x4901390ae91e8a4286f7ae9053440c48eb5c2bca11ca83439f0088a4af90ceb8\",\"blockHash\":\"0xda4b917515655b1aabcc9b01125df34a76c6ebb3e7e2f2b060d4daa70d9f813d\",\"blockNumber\":\"0x1\",\"address\":\"0x0000000000000000000000000000000000000000\",\"data\":\"0x\",\"topics\":[\"0x0000000000000000000000000000000000000000000000000000000000000000\"]}],\"logsBloom\":\"0x00000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000\",\"status\":\"0x0\",\"type\":\"0x0\"},\"txProof\":[\"0xf851a0eb9c9ef295ba68ff22c85763176dabc05773d58ef77ce34e4a23bf9516c706bc80808080808080a0850e08970f6beee9bd3687c74e591429cf6f65d5faf9db298ddc627ac4a26a1b8080808080808080\",\"0xf86431b861f85f010182a410940000000000000000000000000000000000000000020126a0872929cb57ab6d88d0004a60f00df3dd9e0755860549aea25e559bce3d4a66dba01c06266ee2085ae815c258dd9dbb601bfc08c35c13b7cc9cd4ed88a16c3eb3f0\"],\"receiptProof\":[\"0xf851a0460919cda4f025e4e91b9540e4a0fb8a2cf07e4ad8b2379a053efe2f98b1789980808080808080a0bc8717240b46db28e32bc834f8c34f4d70c2e9ba880eb68de904351fd5ef158f8080808080808080\",\"0xf9010d31b90109f901060180b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0\"]},\"id\":67}")] public async Task Get_receipt_when_block_has_few_receipts(bool withHeader, string expectedResult) { IReceiptFinder _receiptFinder = Substitute.For(); @@ -208,7 +216,7 @@ public async Task Get_receipt_when_block_has_few_receipts(bool withHeader, strin _receiptFinder.FindBlockHash(Arg.Any()).Returns(_blockTree.FindBlock(1)!.Hash); ProofModuleFactory moduleFactory = new ProofModuleFactory( - _readOnlyWorldStateManager, + _worldStateManager, _blockTree, new CompositeBlockPreprocessorStep(new RecoverSignatures(new EthereumEcdsa(TestBlockchainIds.ChainId, LimboLogs.Instance), NullTxPool.Instance, _specProvider, LimboLogs.Instance)), _receiptFinder, @@ -228,7 +236,7 @@ public async Task Get_receipt_when_block_has_few_receipts(bool withHeader, strin } string response = await RpcTest.TestSerializedRequest(_proofRpcModule, "proof_getTransactionReceipt", $"{txHash}", $"{withHeader}"); - Assert.That(response, Is.EqualTo(expectedResult)); + response.Should().Be(expectedResult); } [TestCase] diff --git a/src/Nethermind/Nethermind.JsonRpc/JsonRpcUrl.cs b/src/Nethermind/Nethermind.JsonRpc/JsonRpcUrl.cs index 4221fb7b4e2..8d3fb8498bd 100644 --- a/src/Nethermind/Nethermind.JsonRpc/JsonRpcUrl.cs +++ b/src/Nethermind/Nethermind.JsonRpc/JsonRpcUrl.cs @@ -13,7 +13,7 @@ namespace Nethermind.JsonRpc { public class JsonRpcUrl : IEquatable, ICloneable { - public JsonRpcUrl(string scheme, string host, int port, RpcEndpoint rpcEndpoint, bool isAuthenticated, string[] enabledModules) + public JsonRpcUrl(string scheme, string host, int port, RpcEndpoint rpcEndpoint, bool isAuthenticated, string[] enabledModules, long? maxRequestBodySize = null) { Scheme = scheme; Host = host; @@ -21,6 +21,7 @@ public JsonRpcUrl(string scheme, string host, int port, RpcEndpoint rpcEndpoint, RpcEndpoint = rpcEndpoint; EnabledModules = new HashSet(enabledModules, StringComparer.InvariantCultureIgnoreCase); IsAuthenticated = isAuthenticated; + MaxRequestBodySize = maxRequestBodySize; } public static JsonRpcUrl Parse(string packedUrlValue) @@ -75,6 +76,7 @@ public static JsonRpcUrl Parse(string packedUrlValue) return result; } + public long? MaxRequestBodySize { get; } public bool IsAuthenticated { get; } public string Scheme { get; set; } public string Host { get; set; } diff --git a/src/Nethermind/Nethermind.JsonRpc/JsonRpcUrlCollection.cs b/src/Nethermind/Nethermind.JsonRpc/JsonRpcUrlCollection.cs index 4f926288776..0f32db786fc 100644 --- a/src/Nethermind/Nethermind.JsonRpc/JsonRpcUrlCollection.cs +++ b/src/Nethermind/Nethermind.JsonRpc/JsonRpcUrlCollection.cs @@ -6,6 +6,7 @@ using System.Linq; using Nethermind.Logging; using Nethermind.JsonRpc.Modules; +using Nethermind.Sockets; namespace Nethermind.JsonRpc { @@ -31,8 +32,8 @@ public JsonRpcUrlCollection(ILogManager logManager, IJsonRpcConfig jsonRpcConfig private void BuildUrls(bool includeWebSockets) { - bool isAuthenticated = _jsonRpcConfig.EnabledModules.Any(m => m.Equals(ModuleType.Engine, StringComparison.InvariantCultureIgnoreCase)); - JsonRpcUrl defaultUrl = new(Uri.UriSchemeHttp, _jsonRpcConfig.Host, _jsonRpcConfig.Port, RpcEndpoint.Http, isAuthenticated, _jsonRpcConfig.EnabledModules); + bool HasEngineApi = _jsonRpcConfig.EnabledModules.Any(m => m.Equals(ModuleType.Engine, StringComparison.InvariantCultureIgnoreCase)); + JsonRpcUrl defaultUrl = new(Uri.UriSchemeHttp, _jsonRpcConfig.Host, _jsonRpcConfig.Port, RpcEndpoint.Http, HasEngineApi, _jsonRpcConfig.EnabledModules, HasEngineApi ? SocketClient.MAX_REQUEST_BODY_SIZE_FOR_ENGINE_API : _jsonRpcConfig.MaxRequestBodySize); string environmentVariableUrl = Environment.GetEnvironmentVariable(NethermindUrlVariable); if (!string.IsNullOrWhiteSpace(environmentVariableUrl)) { @@ -85,7 +86,8 @@ private void BuildEngineUrls(bool includeWebSockets) return; } JsonRpcUrl url = new(Uri.UriSchemeHttp, _jsonRpcConfig.EngineHost, _jsonRpcConfig.EnginePort.Value, - RpcEndpoint.Http, true, _jsonRpcConfig.EngineEnabledModules.Append(ModuleType.Engine).ToArray()); + RpcEndpoint.Http, true, _jsonRpcConfig.EngineEnabledModules.Append(ModuleType.Engine).ToArray(), + SocketClient.MAX_REQUEST_BODY_SIZE_FOR_ENGINE_API); if (ContainsKey(url.Port)) { diff --git a/src/Nethermind/Nethermind.JsonRpc/Modules/Proof/ProofModuleFactory.cs b/src/Nethermind/Nethermind.JsonRpc/Modules/Proof/ProofModuleFactory.cs index bca0e9a34b0..0aeaeb2e336 100644 --- a/src/Nethermind/Nethermind.JsonRpc/Modules/Proof/ProofModuleFactory.cs +++ b/src/Nethermind/Nethermind.JsonRpc/Modules/Proof/ProofModuleFactory.cs @@ -48,8 +48,10 @@ public override IProofRpcModule Create() ReadOnlyTxProcessingEnv txProcessingEnv = new( _worldStateManager, _blockTree, _specProvider, _logManager); + RpcBlockTransactionsExecutor traceExecutor = new(txProcessingEnv.TransactionProcessor, txProcessingEnv.StateProvider); + ReadOnlyChainProcessingEnv chainProcessingEnv = new( - txProcessingEnv, Always.Valid, _recoveryStep, NoBlockRewards.Instance, new InMemoryReceiptStorage(), _specProvider, _logManager); + txProcessingEnv, Always.Valid, _recoveryStep, NoBlockRewards.Instance, new InMemoryReceiptStorage(), _specProvider, _logManager, traceExecutor); Tracer tracer = new( txProcessingEnv.StateProvider, diff --git a/src/Nethermind/Nethermind.JsonRpc/Modules/Trace/TraceModuleFactory.cs b/src/Nethermind/Nethermind.JsonRpc/Modules/Trace/TraceModuleFactory.cs index 3235754eba1..9d34f031e44 100644 --- a/src/Nethermind/Nethermind.JsonRpc/Modules/Trace/TraceModuleFactory.cs +++ b/src/Nethermind/Nethermind.JsonRpc/Modules/Trace/TraceModuleFactory.cs @@ -64,8 +64,7 @@ public override ITraceRpcModule Create() _poSSwitcher); RpcBlockTransactionsExecutor rpcBlockTransactionsExecutor = new(txProcessingEnv.TransactionProcessor, txProcessingEnv.StateProvider); - BlockProcessor.BlockValidationTransactionsExecutor executeBlockTransactionsExecutor = new(txProcessingEnv.TransactionProcessor, - txProcessingEnv.StateProvider); + BlockProcessor.BlockValidationTransactionsExecutor executeBlockTransactionsExecutor = new(txProcessingEnv.TransactionProcessor, txProcessingEnv.StateProvider); ReadOnlyChainProcessingEnv CreateChainProcessingEnv(IBlockProcessor.IBlockTransactionsExecutor transactionsExecutor) => new( txProcessingEnv, diff --git a/src/Nethermind/Nethermind.Merge.AuRa/Withdrawals/AuraWithdrawalProcessor.cs b/src/Nethermind/Nethermind.Merge.AuRa/Withdrawals/AuraWithdrawalProcessor.cs index 99d11de6f5c..85776645e9a 100644 --- a/src/Nethermind/Nethermind.Merge.AuRa/Withdrawals/AuraWithdrawalProcessor.cs +++ b/src/Nethermind/Nethermind.Merge.AuRa/Withdrawals/AuraWithdrawalProcessor.cs @@ -56,7 +56,7 @@ public void ProcessWithdrawals(Block block, IReleaseSpec spec) } catch (Exception ex) when (ex is ArgumentNullException || ex is EvmException) { - throw new InvalidBlockException(block, ex); + throw new InvalidBlockException(block, "failed to execute withdrawals contract", ex); } if (_logger.IsTrace) _logger.Trace($"Withdrawals applied for block {block}"); diff --git a/src/Nethermind/Nethermind.Merge.Plugin.Test/ProcessedTransactionsDbCleanerTests.cs b/src/Nethermind/Nethermind.Merge.Plugin.Test/ProcessedTransactionsDbCleanerTests.cs index 8e0b754b1a8..ee17433c037 100644 --- a/src/Nethermind/Nethermind.Merge.Plugin.Test/ProcessedTransactionsDbCleanerTests.cs +++ b/src/Nethermind/Nethermind.Merge.Plugin.Test/ProcessedTransactionsDbCleanerTests.cs @@ -19,7 +19,7 @@ namespace Nethermind.Merge.Plugin.Test; [TestFixture] -[Parallelizable(ParallelScope.All)] +[Parallelizable(ParallelScope.Self)] public class ProcessedTransactionsDbCleanerTests { private readonly ILogManager _logManager = LimboLogs.Instance; diff --git a/src/Nethermind/Nethermind.Optimism/OptimismTransactionProcessor.cs b/src/Nethermind/Nethermind.Optimism/OptimismTransactionProcessor.cs index ac0f4c4f2e4..6bc9e1a44c4 100644 --- a/src/Nethermind/Nethermind.Optimism/OptimismTransactionProcessor.cs +++ b/src/Nethermind/Nethermind.Optimism/OptimismTransactionProcessor.cs @@ -31,7 +31,7 @@ public OptimismTransactionProcessor( private UInt256? _currentTxL1Cost; - protected override void Execute(Transaction tx, BlockExecutionContext blCtx, ITxTracer tracer, ExecutionOptions opts) + protected override TransactionResult Execute(Transaction tx, BlockExecutionContext blCtx, ITxTracer tracer, ExecutionOptions opts) { IReleaseSpec spec = SpecProvider.GetSpec(blCtx.Header); _currentTxL1Cost = null; @@ -43,13 +43,13 @@ protected override void Execute(Transaction tx, BlockExecutionContext blCtx, ITx WorldState.Commit(spec); } - base.Execute(tx, blCtx, tracer, opts); + return base.Execute(tx, blCtx, tracer, opts); } - protected override bool ValidateStatic(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts, + protected override TransactionResult ValidateStatic(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts, out long intrinsicGas) { - bool result = base.ValidateStatic(tx, header, spec, tracer, opts, out intrinsicGas); + TransactionResult result = base.ValidateStatic(tx, header, spec, tracer, opts, out intrinsicGas); if (tx.IsDeposit() && !tx.IsOPSystemTransaction && !result) { if (!WorldState.AccountExists(tx.SenderAddress!)) @@ -65,7 +65,7 @@ protected override bool ValidateStatic(Transaction tx, BlockHeader header, IRele return result; } - protected override bool BuyGas(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts, + protected override TransactionResult BuyGas(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts, in UInt256 effectiveGasPrice, out UInt256 premiumPerGas, out UInt256 senderReservedGasPayment) { premiumPerGas = UInt256.Zero; @@ -85,8 +85,7 @@ protected override bool BuyGas(Transaction tx, BlockHeader header, IReleaseSpec { WorldState.IncrementNonce(tx.SenderAddress!); } - QuickFail(tx, header, spec, tracer, "insufficient sender balance"); - return false; + return "insufficient sender balance"; } if (validate && !tx.IsDeposit()) @@ -94,39 +93,34 @@ protected override bool BuyGas(Transaction tx, BlockHeader header, IReleaseSpec if (!tx.TryCalculatePremiumPerGas(header.BaseFeePerGas, out premiumPerGas)) { TraceLogInvalidTx(tx, "MINER_PREMIUM_IS_NEGATIVE"); - QuickFail(tx, header, spec, tracer, "miner premium is negative"); - return false; + return "miner premium is negative"; } if (UInt256.SubtractUnderflow(senderBalance, tx.Value, out UInt256 balanceLeft)) { TraceLogInvalidTx(tx, $"INSUFFICIENT_SENDER_BALANCE: ({tx.SenderAddress})_BALANCE = {senderBalance}"); - QuickFail(tx, header, spec, tracer, "insufficient sender balance"); - return false; + return "insufficient sender balance"; } UInt256 l1Cost = _currentTxL1Cost ??= _l1CostHelper.ComputeL1Cost(tx, header, WorldState); if (UInt256.SubtractUnderflow(balanceLeft, l1Cost, out balanceLeft)) { TraceLogInvalidTx(tx, $"INSUFFICIENT_SENDER_BALANCE: ({tx.SenderAddress})_BALANCE = {senderBalance}"); - QuickFail(tx, header, spec, tracer, "insufficient sender balance"); - return false; + return "insufficient sender balance"; } bool overflows = UInt256.MultiplyOverflow((UInt256)tx.GasLimit, tx.MaxFeePerGas, out UInt256 maxGasFee); if (spec.IsEip1559Enabled && !tx.IsFree() && (overflows || balanceLeft < maxGasFee)) { TraceLogInvalidTx(tx, $"INSUFFICIENT_MAX_FEE_PER_GAS_FOR_SENDER_BALANCE: ({tx.SenderAddress})_BALANCE = {senderBalance}, MAX_FEE_PER_GAS: {tx.MaxFeePerGas}"); - QuickFail(tx, header, spec, tracer, "insufficient MaxFeePerGas for sender balance"); - return false; + return "insufficient MaxFeePerGas for sender balance"; } overflows = UInt256.MultiplyOverflow((UInt256)tx.GasLimit, effectiveGasPrice, out senderReservedGasPayment); if (overflows || senderReservedGasPayment > balanceLeft) { TraceLogInvalidTx(tx, $"INSUFFICIENT_SENDER_BALANCE: ({tx.SenderAddress})_BALANCE = {senderBalance}"); - QuickFail(tx, header, spec, tracer, "insufficient sender balance"); - return false; + return "insufficient sender balance"; } senderReservedGasPayment += l1Cost; // no overflow here, otherwise previous check would fail @@ -135,43 +129,35 @@ protected override bool BuyGas(Transaction tx, BlockHeader header, IReleaseSpec if (validate) WorldState.SubtractFromBalance(tx.SenderAddress!, senderReservedGasPayment, spec); - return true; + return TransactionResult.Ok; } - protected override bool IncrementNonce(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts) + protected override TransactionResult IncrementNonce(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts) { if (!tx.IsDeposit()) return base.IncrementNonce(tx, header, spec, tracer, opts); WorldState.IncrementNonce(tx.SenderAddress!); - return true; + return TransactionResult.Ok; } - protected override bool ValidateSender(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts) - { - return tx.IsDeposit() || base.ValidateSender(tx, header, spec, tracer, opts); - } + protected override TransactionResult ValidateSender(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, ExecutionOptions opts) => + tx.IsDeposit() ? TransactionResult.Ok : base.ValidateSender(tx, header, spec, tracer, opts); - protected override bool PayFees(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, + protected override void PayFees(Transaction tx, BlockHeader header, IReleaseSpec spec, ITxTracer tracer, in TransactionSubstate substate, in long spentGas, in UInt256 premiumPerGas, in byte statusCode) { - if (tx.IsDeposit()) + if (!tx.IsDeposit()) { // Skip coinbase payments for deposit tx in Regolith - return true; - } - - if (!base.PayFees(tx, header, spec, tracer, substate, spentGas, premiumPerGas, statusCode)) - // this should never happen, but just to be consistent - return false; + base.PayFees(tx, header, spec, tracer, substate, spentGas, premiumPerGas, statusCode); - if (_opConfigHelper.IsBedrock(header)) - { - UInt256 l1Cost = _currentTxL1Cost ??= _l1CostHelper.ComputeL1Cost(tx, header, WorldState); - WorldState.AddToBalanceAndCreateIfNotExists(_opConfigHelper.L1FeeReceiver, l1Cost, spec); + if (_opConfigHelper.IsBedrock(header)) + { + UInt256 l1Cost = _currentTxL1Cost ??= _l1CostHelper.ComputeL1Cost(tx, header, WorldState); + WorldState.AddToBalanceAndCreateIfNotExists(_opConfigHelper.L1FeeReceiver, l1Cost, spec); + } } - - return true; } protected override long Refund(Transaction tx, BlockHeader header, IReleaseSpec spec, ExecutionOptions opts, diff --git a/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs b/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs index 41ea95377d1..d16fb4a9850 100644 --- a/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs +++ b/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs @@ -17,6 +17,7 @@ using Microsoft.AspNetCore.Diagnostics.HealthChecks; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; using Microsoft.AspNetCore.ResponseCompression; using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.Extensions.DependencyInjection; @@ -151,6 +152,9 @@ void SerializeTimeoutException(IJsonRpcService service, IBufferWriter resu jsonRpcUrlCollection.TryGetValue(ctx.Connection.LocalPort, out JsonRpcUrl jsonRpcUrl) && jsonRpcUrl.RpcEndpoint.HasFlag(RpcEndpoint.Http)) { + if (jsonRpcUrl.MaxRequestBodySize is not null) + ctx.Features.Get().MaxRequestBodySize = jsonRpcUrl.MaxRequestBodySize; + if (jsonRpcUrl.IsAuthenticated && !rpcAuthentication!.Authenticate(ctx.Request.Headers.Authorization)) { JsonRpcErrorResponse? response = jsonRpcService.GetErrorResponse(ErrorCodes.InvalidRequest, "Authentication error"); diff --git a/src/Nethermind/Nethermind.Sockets.Test/WebSocketExtensionsTests.cs b/src/Nethermind/Nethermind.Sockets.Test/WebSocketExtensionsTests.cs index 178f8e1facb..b795d317ea5 100644 --- a/src/Nethermind/Nethermind.Sockets.Test/WebSocketExtensionsTests.cs +++ b/src/Nethermind/Nethermind.Sockets.Test/WebSocketExtensionsTests.cs @@ -50,17 +50,10 @@ public override void Dispose() throw new NotImplementedException(); } - private byte byteIndex = 0; - public override Task ReceiveAsync(ArraySegment buffer, CancellationToken cancellationToken) { - for (int i = 0; i < buffer.Count; i++) - { - unchecked - { - buffer[i] = byteIndex++; - } - } + // Had to use Array.Fill as it is more performant + Array.Fill(buffer.Array, (byte)0, buffer.Offset, buffer.Count); if (_receiveResults.Count == 0 && ReturnTaskWithFaultOnEmptyQueue) { @@ -203,9 +196,9 @@ public async Task Can_receive_whole_message_non_buffer_sizes() public async Task Throws_on_too_long_message() { Queue receiveResult = new Queue(); - for (int i = 0; i < 1024; i++) + for (int i = 0; i < 128 * 1024; i++) { - receiveResult.Enqueue(new WebSocketReceiveResult(5 * 1024, WebSocketMessageType.Text, false)); + receiveResult.Enqueue(new WebSocketReceiveResult(1024, WebSocketMessageType.Text, false)); } receiveResult.Enqueue(new WebSocketReceiveResult(1, WebSocketMessageType.Text, true)); diff --git a/src/Nethermind/Nethermind.Sockets/SocketClient.cs b/src/Nethermind/Nethermind.Sockets/SocketClient.cs index e3ad031ff56..4588b5fbd54 100644 --- a/src/Nethermind/Nethermind.Sockets/SocketClient.cs +++ b/src/Nethermind/Nethermind.Sockets/SocketClient.cs @@ -11,7 +11,7 @@ namespace Nethermind.Sockets { public class SocketClient : ISocketsClient { - public const int MAX_POOLED_SIZE = 5 * 1024 * 1024; // TODO: Either resize down or change to LargerArrayPool + public const int MAX_REQUEST_BODY_SIZE_FOR_ENGINE_API = 128 * 1024 * 1024; protected readonly ISocketHandler _handler; protected readonly IJsonSerializer _jsonSerializer; @@ -56,7 +56,7 @@ public async Task ReceiveAsync() { currentMessageLength += result.Read; - if (currentMessageLength >= MAX_POOLED_SIZE) + if (currentMessageLength >= MAX_REQUEST_BODY_SIZE_FOR_ENGINE_API) { throw new InvalidOperationException("Message too long"); } @@ -77,7 +77,7 @@ public async Task ReceiveAsync() else if (buffer.Length - currentMessageLength < standardBufferLength) // there is little room in current buffer { // grow the buffer 4x, but not more than max - int newLength = Math.Min(buffer.Length * 4, MAX_POOLED_SIZE); + int newLength = Math.Min(buffer.Length * 4, MAX_REQUEST_BODY_SIZE_FOR_ENGINE_API); if (newLength > buffer.Length) { byte[] newBuffer = ArrayPool.Shared.Rent(newLength);