diff --git a/.github/workflows/hive-consensus-tests.yml b/.github/workflows/hive-consensus-tests.yml
index b7683f61dcaa..70c1fecdbdf4 100644
--- a/.github/workflows/hive-consensus-tests.yml
+++ b/.github/workflows/hive-consensus-tests.yml
@@ -1,6690 +1,166 @@
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)
- 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-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
- 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)
+ - name: Checkout repository
+ uses: actions/checkout@v4
+ with:
+ ref: ${{ inputs.nethermind_repo_ref }}
+
+ - name: Prepare docker tag
+ id: prepare_ref
+ run: |
+ REF_NAME=${{ 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 branch
+ id: check_conditions
+ run: |
+ ref="${{ 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" ]]; 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": "${{ steps.extract_dockerfile.outputs.dockerfile }}",
+ "build-config": "${{ steps.extract_dockerfile.outputs.build-config }}"
+ }'
+
+ - 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 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
+ 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_66:
- name: 66. bcExploitTest
+ 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 bcExploitTest
- 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
+ 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 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
+
+ - 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 /bcStateTests --sim.parallelism $PARALLELISM
- - name: Print results
- run: |
- chmod +x nethermind/scripts/hive-results.sh
- nethermind/scripts/hive-results.sh "hive/workspace/logs/*.json"
- test_68:
- name: 68. Combined tests (e.g. bcTotalDifficultyTest)
- 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 bcTotalDifficultyTest
- continue-on-error: true
- working-directory: hive
- run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcTotalDifficultyTest --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 bcValidBlockTest
- continue-on-error: true
- working-directory: hive
- run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcValidBlockTest --sim.parallelism $PARALLELISM
- - name: Run bcWalletTest
- continue-on-error: true
- working-directory: hive
- run: ./hive --client nethermind --sim ethereum/consensus --sim.limit /bcWalletTest --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
diff --git a/src/Nethermind/Directory.Packages.props b/src/Nethermind/Directory.Packages.props
index 35a1721c39a6..87df4f854704 100644
--- a/src/Nethermind/Directory.Packages.props
+++ b/src/Nethermind/Directory.Packages.props
@@ -3,7 +3,6 @@
true
-
@@ -14,24 +13,20 @@
-
-
-
+
+
-
-
-
-
-
+
+
@@ -39,14 +34,13 @@
-
-
+
-
+
@@ -56,38 +50,29 @@
-
+
-
+
-
-
+
-
-
-
-
-
+
-
-
-
-
diff --git a/src/Nethermind/Ethereum.Abi.Test/Ethereum.Abi.Test.csproj b/src/Nethermind/Ethereum.Abi.Test/Ethereum.Abi.Test.csproj
index 4eb0fb44dbff..d446f54a5bd9 100644
--- a/src/Nethermind/Ethereum.Abi.Test/Ethereum.Abi.Test.csproj
+++ b/src/Nethermind/Ethereum.Abi.Test/Ethereum.Abi.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.Basic.Test/Ethereum.Basic.Test.csproj b/src/Nethermind/Ethereum.Basic.Test/Ethereum.Basic.Test.csproj
index 39a8cd4e73da..55268765563e 100644
--- a/src/Nethermind/Ethereum.Basic.Test/Ethereum.Basic.Test.csproj
+++ b/src/Nethermind/Ethereum.Basic.Test/Ethereum.Basic.Test.csproj
@@ -13,7 +13,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.Blockchain.Block.Test/Ethereum.Blockchain.Block.Test.csproj b/src/Nethermind/Ethereum.Blockchain.Block.Test/Ethereum.Blockchain.Block.Test.csproj
index 71fa90990dad..087be68f5a4c 100644
--- a/src/Nethermind/Ethereum.Blockchain.Block.Test/Ethereum.Blockchain.Block.Test.csproj
+++ b/src/Nethermind/Ethereum.Blockchain.Block.Test/Ethereum.Blockchain.Block.Test.csproj
@@ -3,7 +3,7 @@
false
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.Blockchain.Pyspec.Test/Ethereum.Blockchain.Pyspec.Test.csproj b/src/Nethermind/Ethereum.Blockchain.Pyspec.Test/Ethereum.Blockchain.Pyspec.Test.csproj
index 3aa4b1ff9b1b..e450720acda3 100644
--- a/src/Nethermind/Ethereum.Blockchain.Pyspec.Test/Ethereum.Blockchain.Pyspec.Test.csproj
+++ b/src/Nethermind/Ethereum.Blockchain.Pyspec.Test/Ethereum.Blockchain.Pyspec.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.Blockchain.Pyspec.Test/LoadPyspecTestsStrategy.cs b/src/Nethermind/Ethereum.Blockchain.Pyspec.Test/LoadPyspecTestsStrategy.cs
index 24291f9fc063..ccaf096b1861 100644
--- a/src/Nethermind/Ethereum.Blockchain.Pyspec.Test/LoadPyspecTestsStrategy.cs
+++ b/src/Nethermind/Ethereum.Blockchain.Pyspec.Test/LoadPyspecTestsStrategy.cs
@@ -3,13 +3,13 @@
using System;
using System.Collections.Generic;
+using System.Formats.Tar;
using System.IO;
+using System.IO.Compression;
using System.Linq;
using System.Net.Http;
using Ethereum.Test.Base;
using Ethereum.Test.Base.Interfaces;
-using SharpCompress.Archives;
-using SharpCompress.Archives.Tar;
namespace Ethereum.Blockchain.Pyspec.Test;
@@ -35,8 +35,12 @@ private void DownloadAndExtract(string archiveVersion, string archiveName, strin
HttpResponseMessage response = httpClient.GetAsync(string.Format(Constants.ARCHIVE_URL_TEMPLATE, archiveVersion, archiveName)).GetAwaiter().GetResult();
response.EnsureSuccessStatusCode();
using Stream contentStream = response.Content.ReadAsStreamAsync().GetAwaiter().GetResult();
- using TarArchive archive = TarArchive.Open(contentStream);
- archive.ExtractToDirectory(testsDirectoryName);
+ using GZipStream gzStream = new(contentStream, CompressionMode.Decompress);
+
+ if (!Directory.Exists(testsDirectoryName))
+ Directory.CreateDirectory(testsDirectoryName);
+
+ TarFile.ExtractToDirectory(gzStream, testsDirectoryName, true);
}
private IEnumerable LoadTestsFromDirectory(string testDir, string wildcard)
diff --git a/src/Nethermind/Ethereum.Blockchain.Test/Ethereum.Blockchain.Test.csproj b/src/Nethermind/Ethereum.Blockchain.Test/Ethereum.Blockchain.Test.csproj
index 70996b142dd3..fa1f7d649113 100644
--- a/src/Nethermind/Ethereum.Blockchain.Test/Ethereum.Blockchain.Test.csproj
+++ b/src/Nethermind/Ethereum.Blockchain.Test/Ethereum.Blockchain.Test.csproj
@@ -4,12 +4,10 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
-
@@ -18,8 +16,6 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
diff --git a/src/Nethermind/Ethereum.Difficulty.Test/Ethereum.Difficulty.Test.csproj b/src/Nethermind/Ethereum.Difficulty.Test/Ethereum.Difficulty.Test.csproj
index cd56ce690bf1..acf8f06a2c7f 100644
--- a/src/Nethermind/Ethereum.Difficulty.Test/Ethereum.Difficulty.Test.csproj
+++ b/src/Nethermind/Ethereum.Difficulty.Test/Ethereum.Difficulty.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.HexPrefix.Test/Ethereum.HexPrefix.Test.csproj b/src/Nethermind/Ethereum.HexPrefix.Test/Ethereum.HexPrefix.Test.csproj
index 363c379697eb..c89af99a847c 100644
--- a/src/Nethermind/Ethereum.HexPrefix.Test/Ethereum.HexPrefix.Test.csproj
+++ b/src/Nethermind/Ethereum.HexPrefix.Test/Ethereum.HexPrefix.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.KeyAddress.Test/Ethereum.KeyAddress.Test.csproj b/src/Nethermind/Ethereum.KeyAddress.Test/Ethereum.KeyAddress.Test.csproj
index e04c80752ca5..efd09e53e295 100644
--- a/src/Nethermind/Ethereum.KeyAddress.Test/Ethereum.KeyAddress.Test.csproj
+++ b/src/Nethermind/Ethereum.KeyAddress.Test/Ethereum.KeyAddress.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.KeyStore.Test/Ethereum.KeyStore.Test.csproj b/src/Nethermind/Ethereum.KeyStore.Test/Ethereum.KeyStore.Test.csproj
index f5b861659d49..fd66daa316b2 100644
--- a/src/Nethermind/Ethereum.KeyStore.Test/Ethereum.KeyStore.Test.csproj
+++ b/src/Nethermind/Ethereum.KeyStore.Test/Ethereum.KeyStore.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.PoW.Test/Ethereum.PoW.Test.csproj b/src/Nethermind/Ethereum.PoW.Test/Ethereum.PoW.Test.csproj
index 598f7278730a..3d4b55a475fd 100644
--- a/src/Nethermind/Ethereum.PoW.Test/Ethereum.PoW.Test.csproj
+++ b/src/Nethermind/Ethereum.PoW.Test/Ethereum.PoW.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.Rlp.Test/Ethereum.Rlp.Test.csproj b/src/Nethermind/Ethereum.Rlp.Test/Ethereum.Rlp.Test.csproj
index ae824c709eab..4cad28dd45c6 100644
--- a/src/Nethermind/Ethereum.Rlp.Test/Ethereum.Rlp.Test.csproj
+++ b/src/Nethermind/Ethereum.Rlp.Test/Ethereum.Rlp.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.Test.Base/Ethereum.Test.Base.csproj b/src/Nethermind/Ethereum.Test.Base/Ethereum.Test.Base.csproj
index 8fce86d6fb72..4aa22e32cb1b 100644
--- a/src/Nethermind/Ethereum.Test.Base/Ethereum.Test.Base.csproj
+++ b/src/Nethermind/Ethereum.Test.Base/Ethereum.Test.Base.csproj
@@ -11,7 +11,6 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/src/Nethermind/Ethereum.Test.Base/EthereumTestResult.cs b/src/Nethermind/Ethereum.Test.Base/EthereumTestResult.cs
index 893a3e391d8d..eecd49c13e94 100644
--- a/src/Nethermind/Ethereum.Test.Base/EthereumTestResult.cs
+++ b/src/Nethermind/Ethereum.Test.Base/EthereumTestResult.cs
@@ -34,7 +34,7 @@ public EthereumTestResult(string? name, string? loadFailure)
public bool Pass { get; set; }
public string Fork { get; set; }
- [JsonIgnore] public int TimeInMs { get; set; }
+ public double TimeInMs { get; set; }
public Hash256 StateRoot { get; set; } = Keccak.EmptyTreeHash;
}
diff --git a/src/Nethermind/Ethereum.Test.Base/GeneralStateTestInfoJson.cs b/src/Nethermind/Ethereum.Test.Base/GeneralStateTestInfoJson.cs
index 72be593bd29f..17a520aa6d64 100644
--- a/src/Nethermind/Ethereum.Test.Base/GeneralStateTestInfoJson.cs
+++ b/src/Nethermind/Ethereum.Test.Base/GeneralStateTestInfoJson.cs
@@ -1,12 +1,57 @@
// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only
+using System;
using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
namespace Ethereum.Test.Base
{
+ [JsonConverter(typeof(GeneralStateTestInfoConverter))]
public class GeneralStateTestInfoJson
{
public Dictionary? Labels { get; set; }
}
+
+ public class GeneralStateTestInfoConverter : JsonConverter
+ {
+ public override GeneralStateTestInfoJson? Read(
+ ref Utf8JsonReader reader,
+ Type typeToConvert,
+ JsonSerializerOptions options)
+ {
+ Dictionary? labels = null;
+ if (reader.TokenType == JsonTokenType.StartObject)
+ {
+ var depth = reader.CurrentDepth;
+ while (reader.Read())
+ {
+ if (reader.TokenType == JsonTokenType.EndObject && reader.CurrentDepth == depth)
+ {
+ break;
+ }
+ if (reader.TokenType == JsonTokenType.PropertyName && reader.ValueTextEquals("labels"u8))
+ {
+ reader.Read();
+ labels = JsonSerializer.Deserialize>(ref reader, options);
+ }
+ else
+ {
+ reader.Skip();
+ }
+ }
+ }
+
+ return new GeneralStateTestInfoJson { Labels = labels };
+ }
+
+ public override void Write(
+ Utf8JsonWriter writer,
+ GeneralStateTestInfoJson info,
+ JsonSerializerOptions options)
+ {
+ JsonSerializer.Serialize(writer, info, options);
+ }
+ }
}
diff --git a/src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs b/src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs
index dd0321860595..2bc46d55f85d 100644
--- a/src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs
+++ b/src/Nethermind/Ethereum.Test.Base/GeneralTestBase.cs
@@ -140,7 +140,7 @@ protected EthereumTestResult RunTest(GeneralStateTest test, ITxTracer txTracer)
List differences = RunAssertions(test, stateProvider);
EthereumTestResult testResult = new(test.Name, test.ForkName, differences.Count == 0);
- testResult.TimeInMs = (int)stopwatch.Elapsed.TotalMilliseconds;
+ testResult.TimeInMs = stopwatch.Elapsed.TotalMilliseconds;
testResult.StateRoot = stateProvider.StateRoot;
// Assert.Zero(differences.Count, "differences");
diff --git a/src/Nethermind/Ethereum.Test.Base/JsonToEthereumTest.cs b/src/Nethermind/Ethereum.Test.Base/JsonToEthereumTest.cs
index 0dada4e545f0..51483884796d 100644
--- a/src/Nethermind/Ethereum.Test.Base/JsonToEthereumTest.cs
+++ b/src/Nethermind/Ethereum.Test.Base/JsonToEthereumTest.cs
@@ -209,7 +209,6 @@ public static IEnumerable Convert(string name, GeneralStateTes
foreach (KeyValuePair postStateBySpec in testJson.Post)
{
int iterationNumber = 0;
- int testIndex = testJson.Info?.Labels?.Select(x => System.Convert.ToInt32(x.Key)).FirstOrDefault() ?? 0;
foreach (PostStateJson stateJson in postStateBySpec.Value)
{
GeneralStateTest test = new();
@@ -219,10 +218,6 @@ public static IEnumerable Convert(string name, GeneralStateTes
{
test.Name += testJson.Info?.Labels?[iterationNumber.ToString()]?.Replace(":label ", string.Empty);
}
- else
- {
- test.Name += string.Empty;
- }
test.ForkName = postStateBySpec.Key;
test.Fork = ParseSpec(postStateBySpec.Key);
diff --git a/src/Nethermind/Ethereum.Transaction.Test/Ethereum.Transaction.Test.csproj b/src/Nethermind/Ethereum.Transaction.Test/Ethereum.Transaction.Test.csproj
index dc0835968510..4d10e3bdd6fc 100644
--- a/src/Nethermind/Ethereum.Transaction.Test/Ethereum.Transaction.Test.csproj
+++ b/src/Nethermind/Ethereum.Transaction.Test/Ethereum.Transaction.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.Transition.Test/Ethereum.Transition.Test.csproj b/src/Nethermind/Ethereum.Transition.Test/Ethereum.Transition.Test.csproj
index b636274c2fa0..9a745bd3b6c3 100644
--- a/src/Nethermind/Ethereum.Transition.Test/Ethereum.Transition.Test.csproj
+++ b/src/Nethermind/Ethereum.Transition.Test/Ethereum.Transition.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.Trie.Test/Ethereum.Trie.Test.csproj b/src/Nethermind/Ethereum.Trie.Test/Ethereum.Trie.Test.csproj
index 37a4d855b77d..8edf6f11b7ee 100644
--- a/src/Nethermind/Ethereum.Trie.Test/Ethereum.Trie.Test.csproj
+++ b/src/Nethermind/Ethereum.Trie.Test/Ethereum.Trie.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Ethereum.VM.Test/Ethereum.VM.Test.csproj b/src/Nethermind/Ethereum.VM.Test/Ethereum.VM.Test.csproj
index 2845074ea428..c0e63009ac5a 100644
--- a/src/Nethermind/Ethereum.VM.Test/Ethereum.VM.Test.csproj
+++ b/src/Nethermind/Ethereum.VM.Test/Ethereum.VM.Test.csproj
@@ -4,7 +4,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Abi.Test/Nethermind.Abi.Test.csproj b/src/Nethermind/Nethermind.Abi.Test/Nethermind.Abi.Test.csproj
index 5f5434473d3f..25b87f2c947e 100644
--- a/src/Nethermind/Nethermind.Abi.Test/Nethermind.Abi.Test.csproj
+++ b/src/Nethermind/Nethermind.Abi.Test/Nethermind.Abi.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.AccountAbstraction.Test/Nethermind.AccountAbstraction.Test.csproj b/src/Nethermind/Nethermind.AccountAbstraction.Test/Nethermind.AccountAbstraction.Test.csproj
index 57c7416365c3..39005b40e29d 100644
--- a/src/Nethermind/Nethermind.AccountAbstraction.Test/Nethermind.AccountAbstraction.Test.csproj
+++ b/src/Nethermind/Nethermind.AccountAbstraction.Test/Nethermind.AccountAbstraction.Test.csproj
@@ -22,8 +22,8 @@
-
+
diff --git a/src/Nethermind/Nethermind.AccountAbstraction/Data/UserOperationDecoder.cs b/src/Nethermind/Nethermind.AccountAbstraction/Data/UserOperationDecoder.cs
index 27c518ab0cab..45e90d670060 100644
--- a/src/Nethermind/Nethermind.AccountAbstraction/Data/UserOperationDecoder.cs
+++ b/src/Nethermind/Nethermind.AccountAbstraction/Data/UserOperationDecoder.cs
@@ -18,7 +18,7 @@ public Rlp Encode(UserOperationWithEntryPoint? item, RlpBehaviors rlpBehaviors =
RlpStream rlpStream = new(GetLength(item, rlpBehaviors));
Encode(rlpStream, item, rlpBehaviors);
- return new Rlp(rlpStream.Data!);
+ return new Rlp(rlpStream.Data.ToArray()!);
}
diff --git a/src/Nethermind/Nethermind.Api/IBasicApi.cs b/src/Nethermind/Nethermind.Api/IBasicApi.cs
index 82b3b0317ab0..3b78f16a8655 100644
--- a/src/Nethermind/Nethermind.Api/IBasicApi.cs
+++ b/src/Nethermind/Nethermind.Api/IBasicApi.cs
@@ -30,8 +30,7 @@ public interface IBasicApi
IConfigProvider ConfigProvider { get; set; }
ICryptoRandom CryptoRandom { get; }
IDbProvider? DbProvider { get; set; }
- IRocksDbFactory? RocksDbFactory { get; set; }
- IMemDbFactory? MemDbFactory { get; set; }
+ IDbFactory? DbFactory { get; set; }
IEthereumEcdsa? EthereumEcdsa { get; set; }
IJsonSerializer EthereumJsonSerializer { get; set; }
IFileSystem FileSystem { get; set; }
diff --git a/src/Nethermind/Nethermind.Api/IInitConfig.cs b/src/Nethermind/Nethermind.Api/IInitConfig.cs
index c3f8df2f5e89..92e341913eb6 100644
--- a/src/Nethermind/Nethermind.Api/IInitConfig.cs
+++ b/src/Nethermind/Nethermind.Api/IInitConfig.cs
@@ -15,7 +15,7 @@ public interface IInitConfig : IConfig
[ConfigItem(Description = "Whether to create session-only accounts and delete them on shutdown.", DefaultValue = "false")]
bool KeepDevWalletInMemory { get; set; }
- [ConfigItem(Description = "Whether to enable WebSocket service for the defaut JSON-RPC port on startup.", DefaultValue = "true")]
+ [ConfigItem(Description = "Whether to enable WebSocket service for the default JSON-RPC port on startup.", DefaultValue = "true")]
bool WebSocketsEnabled { get; set; }
[ConfigItem(Description = "Whether to enable the node discovery. If disabled, Nethermind doesn't look for other nodes beyond the bootnodes specified.", DefaultValue = "true")]
diff --git a/src/Nethermind/Nethermind.Api/NethermindApi.cs b/src/Nethermind/Nethermind.Api/NethermindApi.cs
index bc83774b48e0..8465b34e1c2b 100644
--- a/src/Nethermind/Nethermind.Api/NethermindApi.cs
+++ b/src/Nethermind/Nethermind.Api/NethermindApi.cs
@@ -112,8 +112,7 @@ public IBlockchainBridge CreateBlockchainBridge()
public IConfigProvider ConfigProvider { get; set; }
public ICryptoRandom CryptoRandom { get; }
public IDbProvider? DbProvider { get; set; }
- public IRocksDbFactory? RocksDbFactory { get; set; }
- public IMemDbFactory? MemDbFactory { get; set; }
+ public IDbFactory? DbFactory { get; set; }
public IDisconnectsAnalyzer? DisconnectsAnalyzer { get; set; }
public IDiscoveryApp? DiscoveryApp { get; set; }
public ISigner? EngineSigner { get; set; }
diff --git a/src/Nethermind/Nethermind.AuRa.Test/Nethermind.AuRa.Test.csproj b/src/Nethermind/Nethermind.AuRa.Test/Nethermind.AuRa.Test.csproj
index 9e2d4900ca70..aa8bb0c1427a 100644
--- a/src/Nethermind/Nethermind.AuRa.Test/Nethermind.AuRa.Test.csproj
+++ b/src/Nethermind/Nethermind.AuRa.Test/Nethermind.AuRa.Test.csproj
@@ -6,7 +6,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Benchmark.Runner/Nethermind.Benchmark.Runner.csproj b/src/Nethermind/Nethermind.Benchmark.Runner/Nethermind.Benchmark.Runner.csproj
index 6d8dae62d3e8..743d1e253780 100644
--- a/src/Nethermind/Nethermind.Benchmark.Runner/Nethermind.Benchmark.Runner.csproj
+++ b/src/Nethermind/Nethermind.Benchmark.Runner/Nethermind.Benchmark.Runner.csproj
@@ -5,10 +5,6 @@
true
-
-
-
-
diff --git a/src/Nethermind/Nethermind.Blockchain.Test.Runner/Program.cs b/src/Nethermind/Nethermind.Blockchain.Test.Runner/Program.cs
index 86178da35d4e..f2c6c9460048 100644
--- a/src/Nethermind/Nethermind.Blockchain.Test.Runner/Program.cs
+++ b/src/Nethermind/Nethermind.Blockchain.Test.Runner/Program.cs
@@ -14,7 +14,7 @@ namespace Nethermind.Blockchain.Test.Runner
internal class Program
{
private static readonly List AllFailingTests = new List();
- private static long _totalMs;
+ private static double _totalMs;
public static async Task Main(params string[] args)
{
@@ -79,7 +79,7 @@ private static void WrapAndRunDirectoryStateTests(IStateTestRunner stateTest)
var result = stateTest.RunTests().ToList();
var failedTestsInCategory = result.Where(r => !r.Pass).Select(t => t.Name + " " + t.LoadFailure).ToArray();
AllFailingTests.AddRange(failedTestsInCategory);
- long categoryTimeInMs = result.Sum(t => t.TimeInMs);
+ long categoryTimeInMs = (long)result.Sum(t => t.TimeInMs);
_totalMs += result.Sum(t => t.TimeInMs);
if (result.Any())
@@ -96,7 +96,7 @@ private static async Task WrapAndRunDirectoryBlockchainTestsAsync(IBlockchainTes
var failedTestsInCategory = testResults.Where(r => !r.Pass).Select(t => t.Name + " " + t.LoadFailure).ToArray();
AllFailingTests.AddRange(failedTestsInCategory);
- long categoryTimeInMs = testResults.Sum(t => t.TimeInMs);
+ long categoryTimeInMs = (long)testResults.Sum(t => t.TimeInMs);
_totalMs += testResults.Sum(t => t.TimeInMs);
if (testResults.Any())
diff --git a/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/CopyTreeVisitorTests.cs b/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/CopyTreeVisitorTests.cs
index 9c118071817f..91fe8510e109 100644
--- a/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/CopyTreeVisitorTests.cs
+++ b/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/CopyTreeVisitorTests.cs
@@ -85,10 +85,10 @@ private static IPruningContext CopyDb(IPruningContext pruningContext, MemDb trie
private static IPruningContext StartPruning(MemDb trieDb, MemDb clonedDb)
{
- IRocksDbFactory rocksDbFactory = Substitute.For();
- rocksDbFactory.CreateDb(Arg.Any()).Returns(trieDb, clonedDb);
+ IDbFactory dbFactory = Substitute.For();
+ dbFactory.CreateDb(Arg.Any()).Returns(trieDb, clonedDb);
- FullPruningDb fullPruningDb = new(new RocksDbSettings("test", "test"), rocksDbFactory);
+ FullPruningDb fullPruningDb = new(new DbSettings("test", "test"), dbFactory);
fullPruningDb.TryStartPruning(out IPruningContext pruningContext);
return pruningContext;
}
diff --git a/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/FullPrunerTests.cs b/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/FullPrunerTests.cs
index 2a0d19be7069..ec56dccccd77 100644
--- a/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/FullPrunerTests.cs
+++ b/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/FullPrunerTests.cs
@@ -225,13 +225,13 @@ public TestContext(
_clearPrunedDb = clearPrunedDb;
TrieDb = new TestMemDb();
CopyDb = new TestMemDb();
- IRocksDbFactory rocksDbFactory = Substitute.For();
- rocksDbFactory.CreateDb(Arg.Any()).Returns(TrieDb, CopyDb);
+ IDbFactory dbFactory = Substitute.For();
+ dbFactory.CreateDb(Arg.Any()).Returns(TrieDb, CopyDb);
NodeStorage storageForWrite = new NodeStorage(TrieDb, currentKeyScheme);
PatriciaTree trie = Build.A.Trie(storageForWrite).WithAccountsByIndex(0, 100).TestObject;
_stateRoot = trie.RootHash;
- FullPruningDb = new TestFullPruningDb(new RocksDbSettings("test", "test"), rocksDbFactory, successfulPruning, clearPrunedDb);
+ FullPruningDb = new TestFullPruningDb(new DbSettings("test", "test"), dbFactory, successfulPruning, clearPrunedDb);
NodeStorageFactory nodeStorageFactory = new NodeStorageFactory(preferredKeyScheme, LimboLogs.Instance);
nodeStorageFactory.DetectCurrentKeySchemeFrom(TrieDb);
NodeStorage = nodeStorageFactory.WrapKeyValueStore(FullPruningDb);
@@ -317,7 +317,7 @@ private class TestFullPruningDb : FullPruningDb
public new int PruningStarted { get; private set; }
public ManualResetEvent WaitForClearDb { get; } = new(false);
- public TestFullPruningDb(RocksDbSettings settings, IRocksDbFactory dbFactory, bool successfulPruning, bool clearPrunedDb = false)
+ public TestFullPruningDb(DbSettings settings, IDbFactory dbFactory, bool successfulPruning, bool clearPrunedDb = false)
: base(settings, dbFactory)
{
_successfulPruning = successfulPruning;
diff --git a/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/FullPruningDiskTest.cs b/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/FullPruningDiskTest.cs
index 0e80340f8a2e..79779809c1d9 100644
--- a/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/FullPruningDiskTest.cs
+++ b/src/Nethermind/Nethermind.Blockchain.Test/FullPruning/FullPruningDiskTest.cs
@@ -81,9 +81,9 @@ protected override async Task Build(
protected override async Task CreateDbProvider()
{
- IDbProvider dbProvider = new DbProvider(DbModeHint.Persisted);
+ IDbProvider dbProvider = new DbProvider();
RocksDbFactory rocksDbFactory = new(new DbConfig(), LogManager, TempDirectory.Path);
- StandardDbInitializer standardDbInitializer = new(dbProvider, rocksDbFactory, new MemDbFactory(), new FileSystem());
+ StandardDbInitializer standardDbInitializer = new(dbProvider, rocksDbFactory, new FileSystem());
await standardDbInitializer.InitStandardDbsAsync(true);
return dbProvider;
}
diff --git a/src/Nethermind/Nethermind.Blockchain.Test/Nethermind.Blockchain.Test.csproj b/src/Nethermind/Nethermind.Blockchain.Test/Nethermind.Blockchain.Test.csproj
index ddd9bbc5a82a..a4aa0b538799 100644
--- a/src/Nethermind/Nethermind.Blockchain.Test/Nethermind.Blockchain.Test.csproj
+++ b/src/Nethermind/Nethermind.Blockchain.Test/Nethermind.Blockchain.Test.csproj
@@ -6,7 +6,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
@@ -20,19 +20,13 @@
-
- {B1C9CF07-F89B-4F92-B8A5-F6949B9D3DA5}
- Nethermind.Blockchain
-
+
+
-
- {6BAD851C-B0A2-4DFE-A1F3-1C3A634C522B}
- Nethermind.Core.Test
-
+
-
diff --git a/src/Nethermind/Nethermind.Blockchain.Test/Producers/DevBlockproducerTests.cs b/src/Nethermind/Nethermind.Blockchain.Test/Producers/DevBlockproducerTests.cs
index 5a938f422067..71409777e358 100644
--- a/src/Nethermind/Nethermind.Blockchain.Test/Producers/DevBlockproducerTests.cs
+++ b/src/Nethermind/Nethermind.Blockchain.Test/Producers/DevBlockproducerTests.cs
@@ -33,7 +33,7 @@ public class DevBlockProducerTests
public void Test()
{
ISpecProvider specProvider = MainnetSpecProvider.Instance;
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.BlockInfos, new MemDb());
dbProvider.RegisterDb(DbNames.Blocks, new MemDb());
dbProvider.RegisterDb(DbNames.Headers, new MemDb());
diff --git a/src/Nethermind/Nethermind.Blockchain.Test/Receipts/KeccaksIteratorTests.cs b/src/Nethermind/Nethermind.Blockchain.Test/Receipts/KeccaksIteratorTests.cs
index 933269c12750..96be4973fcae 100644
--- a/src/Nethermind/Nethermind.Blockchain.Test/Receipts/KeccaksIteratorTests.cs
+++ b/src/Nethermind/Nethermind.Blockchain.Test/Receipts/KeccaksIteratorTests.cs
@@ -64,7 +64,7 @@ private Hash256[] EncodeDecode(Hash256[] input)
}
Span buffer = stackalloc byte[32];
- KeccaksIterator iterator = new(rlpStream.Data, buffer);
+ KeccaksIterator iterator = new(rlpStream.Data.AsSpan(), buffer);
List decoded = new();
while (iterator.TryGetNext(out Hash256StructRef kec))
@@ -92,7 +92,7 @@ private Hash256[] EncodeDecodeReDecoded(Hash256[] input)
}
Span buffer = stackalloc byte[32];
- KeccaksIterator iterator = new(rlpStream.Data, buffer);
+ KeccaksIterator iterator = new(rlpStream.Data.AsSpan(), buffer);
List decoded = new();
while (iterator.TryGetNext(out Hash256StructRef kec))
diff --git a/src/Nethermind/Nethermind.Blockchain/Nethermind.Blockchain.csproj b/src/Nethermind/Nethermind.Blockchain/Nethermind.Blockchain.csproj
index 053506dd9c75..526614a0b313 100644
--- a/src/Nethermind/Nethermind.Blockchain/Nethermind.Blockchain.csproj
+++ b/src/Nethermind/Nethermind.Blockchain/Nethermind.Blockchain.csproj
@@ -16,8 +16,6 @@
-
-
diff --git a/src/Nethermind/Nethermind.Cli.Test/Nethermind.Cli.Test.csproj b/src/Nethermind/Nethermind.Cli.Test/Nethermind.Cli.Test.csproj
index 13aacbd10efd..3dc159082a2c 100644
--- a/src/Nethermind/Nethermind.Cli.Test/Nethermind.Cli.Test.csproj
+++ b/src/Nethermind/Nethermind.Cli.Test/Nethermind.Cli.Test.csproj
@@ -5,7 +5,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Nethermind/Nethermind.Clique.Test/Nethermind.Clique.Test.csproj b/src/Nethermind/Nethermind.Clique.Test/Nethermind.Clique.Test.csproj
index 7af00f7d696d..797c60d13455 100644
--- a/src/Nethermind/Nethermind.Clique.Test/Nethermind.Clique.Test.csproj
+++ b/src/Nethermind/Nethermind.Clique.Test/Nethermind.Clique.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Config.Test/Nethermind.Config.Test.csproj b/src/Nethermind/Nethermind.Config.Test/Nethermind.Config.Test.csproj
index cc10ee7e40d5..e81ac159db0e 100644
--- a/src/Nethermind/Nethermind.Config.Test/Nethermind.Config.Test.csproj
+++ b/src/Nethermind/Nethermind.Config.Test/Nethermind.Config.Test.csproj
@@ -4,7 +4,7 @@
enable
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/Validators/PendingValidatorsDecoder.cs b/src/Nethermind/Nethermind.Consensus.AuRa/Validators/PendingValidatorsDecoder.cs
index 2fdbab109690..22e1a168e923 100644
--- a/src/Nethermind/Nethermind.Consensus.AuRa/Validators/PendingValidatorsDecoder.cs
+++ b/src/Nethermind/Nethermind.Consensus.AuRa/Validators/PendingValidatorsDecoder.cs
@@ -52,7 +52,7 @@ public Rlp Encode(PendingValidators item, RlpBehaviors rlpBehaviors = RlpBehavio
RlpStream rlpStream = new RlpStream(GetLength(item, rlpBehaviors));
Encode(rlpStream, item, rlpBehaviors);
- return new Rlp(rlpStream.Data);
+ return new Rlp(rlpStream.Data.ToArray());
}
public void Encode(RlpStream rlpStream, PendingValidators item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
diff --git a/src/Nethermind/Nethermind.Consensus.AuRa/Validators/ValidatorInfoDecoder.cs b/src/Nethermind/Nethermind.Consensus.AuRa/Validators/ValidatorInfoDecoder.cs
index 9727bd881f0a..462db51a1967 100644
--- a/src/Nethermind/Nethermind.Consensus.AuRa/Validators/ValidatorInfoDecoder.cs
+++ b/src/Nethermind/Nethermind.Consensus.AuRa/Validators/ValidatorInfoDecoder.cs
@@ -44,7 +44,7 @@ public Rlp Encode(ValidatorInfo? item, RlpBehaviors rlpBehaviors = RlpBehaviors.
RlpStream rlpStream = new(GetLength(item, rlpBehaviors));
Encode(rlpStream, item, rlpBehaviors);
- return new Rlp(rlpStream.Data);
+ return new Rlp(rlpStream.Data.ToArray());
}
public void Encode(RlpStream stream, ValidatorInfo? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
diff --git a/src/Nethermind/Nethermind.Consensus.Clique/CliqueBlockProducer.cs b/src/Nethermind/Nethermind.Consensus.Clique/CliqueBlockProducer.cs
index 3a249540dfba..a4ae46ef4e5c 100644
--- a/src/Nethermind/Nethermind.Consensus.Clique/CliqueBlockProducer.cs
+++ b/src/Nethermind/Nethermind.Consensus.Clique/CliqueBlockProducer.cs
@@ -447,7 +447,7 @@ bool IBlockProducer.IsProducingBlocks(ulong? maxProducingInterval)
Array.Empty(),
spec.WithdrawalsEnabled ? Enumerable.Empty() : null
);
- header.TxRoot = new TxTrie(block.Transactions).RootHash;
+ header.TxRoot = TxTrie.CalculateRoot(block.Transactions);
block.Header.Author = _sealer.Address;
return block;
}
diff --git a/src/Nethermind/Nethermind.Consensus.Test/Nethermind.Consensus.Test.csproj b/src/Nethermind/Nethermind.Consensus.Test/Nethermind.Consensus.Test.csproj
index 6a42f8541864..1ae4eaf97fd9 100644
--- a/src/Nethermind/Nethermind.Consensus.Test/Nethermind.Consensus.Test.csproj
+++ b/src/Nethermind/Nethermind.Consensus.Test/Nethermind.Consensus.Test.csproj
@@ -1,7 +1,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs b/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs
index 5e95773c62da..695c9129dd99 100644
--- a/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs
+++ b/src/Nethermind/Nethermind.Consensus/Processing/BlockExtensions.cs
@@ -28,7 +28,7 @@ block is BlockToProduce blockToProduce
public static bool TrySetTransactions(this Block block, Transaction[] transactions)
{
- block.Header.TxRoot = new TxTrie(transactions).RootHash;
+ block.Header.TxRoot = TxTrie.CalculateRoot(transactions);
if (block is BlockToProduce blockToProduce)
{
diff --git a/src/Nethermind/Nethermind.Consensus/Validators/BlockValidator.cs b/src/Nethermind/Nethermind.Consensus/Validators/BlockValidator.cs
index db786c1b5473..a2f4e150f41d 100644
--- a/src/Nethermind/Nethermind.Consensus/Validators/BlockValidator.cs
+++ b/src/Nethermind/Nethermind.Consensus/Validators/BlockValidator.cs
@@ -317,7 +317,7 @@ public static bool ValidateTxRootMatchesTxs(Block block, out Hash256 txRoot)
}
public static bool ValidateTxRootMatchesTxs(BlockHeader header, BlockBody body, out Hash256 txRoot)
{
- txRoot = new TxTrie(body.Transactions).RootHash;
+ txRoot = TxTrie.CalculateRoot(body.Transactions);
return txRoot == header.TxRoot;
}
diff --git a/src/Nethermind/Nethermind.Core.Test/Builders/BlockBuilder.cs b/src/Nethermind/Nethermind.Core.Test/Builders/BlockBuilder.cs
index e94a1b23ac34..1d039e5efef6 100644
--- a/src/Nethermind/Nethermind.Core.Test/Builders/BlockBuilder.cs
+++ b/src/Nethermind/Nethermind.Core.Test/Builders/BlockBuilder.cs
@@ -95,9 +95,8 @@ public BlockBuilder WithTransactions(int txCount, ISpecProvider specProvider)
}
BlockBuilder result = WithTransactions(txs);
- ReceiptTrie receiptTrie = new(specProvider.GetSpec(TestObjectInternal.Header), receipts);
- receiptTrie.UpdateRootHash();
- TestObjectInternal.Header.ReceiptsRoot = receiptTrie.RootHash;
+ Hash256 receiptHash = ReceiptTrie.CalculateRoot(specProvider.GetSpec(TestObjectInternal.Header), receipts);
+ TestObjectInternal.Header.ReceiptsRoot = receiptHash;
return result;
}
@@ -105,10 +104,8 @@ public BlockBuilder WithTransactions(params Transaction[] transactions)
{
TestObjectInternal = TestObjectInternal.WithReplacedBody(
TestObjectInternal.Body.WithChangedTransactions(transactions));
- TxTrie trie = new(transactions);
- trie.UpdateRootHash();
- TestObjectInternal.Header.TxRoot = trie.RootHash;
+ TestObjectInternal.Header.TxRoot = TxTrie.CalculateRoot(transactions);
return this;
}
diff --git a/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs b/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs
index b61e4b993f7a..360e756b5b41 100644
--- a/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs
+++ b/src/Nethermind/Nethermind.Core.Test/Builders/BlockTreeBuilder.cs
@@ -285,9 +285,9 @@ private Block CreateBlock(int splitVariant, int splitFrom, int blockIndex, Block
currentBlock.Bloom!.Add(receipt.Logs);
}
- currentBlock.Header.TxRoot = new TxTrie(currentBlock.Transactions).RootHash;
+ currentBlock.Header.TxRoot = TxTrie.CalculateRoot(currentBlock.Transactions);
TxReceipt[] txReceipts = receipts.ToArray();
- currentBlock.Header.ReceiptsRoot = new ReceiptTrie(_specProvider.GetSpec(currentBlock.Header), txReceipts).RootHash;
+ currentBlock.Header.ReceiptsRoot = ReceiptTrie.CalculateRoot(_specProvider.GetSpec(currentBlock.Header), txReceipts);
currentBlock.Header.Hash = currentBlock.CalculateHash();
foreach (TxReceipt txReceipt in txReceipts)
{
diff --git a/src/Nethermind/Nethermind.Core.Test/Encoding/AccessListDecoderTests.cs b/src/Nethermind/Nethermind.Core.Test/Encoding/AccessListDecoderTests.cs
index 76579f93489f..1adf7d797691 100644
--- a/src/Nethermind/Nethermind.Core.Test/Encoding/AccessListDecoderTests.cs
+++ b/src/Nethermind/Nethermind.Core.Test/Encoding/AccessListDecoderTests.cs
@@ -108,7 +108,7 @@ public void Roundtrip_value((string TestName, AccessList? AccessList) testCase)
RlpStream rlpStream = new(10000);
_decoder.Encode(rlpStream, testCase.AccessList);
rlpStream.Position = 0;
- Rlp.ValueDecoderContext ctx = rlpStream.Data.AsRlpValueContext();
+ Rlp.ValueDecoderContext ctx = rlpStream.Data.AsSpan().AsRlpValueContext();
AccessList decoded = _decoder.Decode(ref ctx)!;
if (testCase.AccessList is null)
{
diff --git a/src/Nethermind/Nethermind.Core.Test/Encoding/BlockInfoDecoderTests.cs b/src/Nethermind/Nethermind.Core.Test/Encoding/BlockInfoDecoderTests.cs
index 7b339aa1d0ed..c1afa9f984f5 100644
--- a/src/Nethermind/Nethermind.Core.Test/Encoding/BlockInfoDecoderTests.cs
+++ b/src/Nethermind/Nethermind.Core.Test/Encoding/BlockInfoDecoderTests.cs
@@ -102,7 +102,7 @@ public static Rlp BlockInfoEncodeDeprecated(BlockInfo? item, bool chainWithFinal
stream.Encode(item.IsFinalized);
}
- return new Rlp(stream.Data!);
+ return new Rlp(stream.Data.ToArray()!);
}
}
}
diff --git a/src/Nethermind/Nethermind.Core.Test/Encoding/TxDecoderTests.cs b/src/Nethermind/Nethermind.Core.Test/Encoding/TxDecoderTests.cs
index 3b23dcb4bf4a..3fbfd8837896 100644
--- a/src/Nethermind/Nethermind.Core.Test/Encoding/TxDecoderTests.cs
+++ b/src/Nethermind/Nethermind.Core.Test/Encoding/TxDecoderTests.cs
@@ -126,7 +126,7 @@ public void Roundtrip_ValueDecoderContext_WithMemorySlice((Transaction Tx, strin
RlpStream rlpStream = new(10000);
_txDecoder.Encode(rlpStream, testCase.Tx);
- Rlp.ValueDecoderContext decoderContext = new(rlpStream.Data, true);
+ Rlp.ValueDecoderContext decoderContext = new(rlpStream.Data.ToArray(), true);
rlpStream.Position = 0;
Transaction? decoded = _txDecoder.Decode(ref decoderContext);
decoded!.SenderAddress =
@@ -143,7 +143,7 @@ public void ValueDecoderContext_DecodeWithMemorySlice_ShouldUseSameBuffer((Trans
RlpStream rlpStream = new(10000);
_txDecoder.Encode(rlpStream, testCase.Tx);
- Rlp.ValueDecoderContext decoderContext = new(rlpStream.Data, true);
+ Rlp.ValueDecoderContext decoderContext = new(rlpStream.Data.ToArray(), true);
rlpStream.Position = 0;
Transaction? decoded = _txDecoder.Decode(ref decoderContext);
diff --git a/src/Nethermind/Nethermind.Core.Test/Nethermind.Core.Test.csproj b/src/Nethermind/Nethermind.Core.Test/Nethermind.Core.Test.csproj
index ecc07c506ae9..d277beb757b5 100644
--- a/src/Nethermind/Nethermind.Core.Test/Nethermind.Core.Test.csproj
+++ b/src/Nethermind/Nethermind.Core.Test/Nethermind.Core.Test.csproj
@@ -5,7 +5,7 @@
enable
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
@@ -24,7 +24,6 @@
-
diff --git a/src/Nethermind/Nethermind.Core.Test/RlpTests.cs b/src/Nethermind/Nethermind.Core.Test/RlpTests.cs
index 5e9b42390b34..1b49ecca8d3f 100644
--- a/src/Nethermind/Nethermind.Core.Test/RlpTests.cs
+++ b/src/Nethermind/Nethermind.Core.Test/RlpTests.cs
@@ -259,7 +259,7 @@ public void RlpContextWithSliceMemory_shouldNotCopyUnderlyingData(bool sliceValu
stream.Encode(randomBytes);
stream.Encode(randomBytes);
- Memory memory = stream.Data;
+ Memory memory = stream.Data.ToArray();
Rlp.ValueDecoderContext context = new Rlp.ValueDecoderContext(memory, sliceValue);
for (int i = 0; i < 3; i++)
diff --git a/src/Nethermind/Nethermind.Core/Buffers/CappedArray.cs b/src/Nethermind/Nethermind.Core/Buffers/CappedArray.cs
index 3a15a64b2dce..0b90b2f64fab 100644
--- a/src/Nethermind/Nethermind.Core/Buffers/CappedArray.cs
+++ b/src/Nethermind/Nethermind.Core/Buffers/CappedArray.cs
@@ -13,8 +13,13 @@ namespace Nethermind.Core.Buffers;
///
public readonly struct CappedArray
{
- private readonly T[]? _array = null;
- private readonly int _length = 0;
+ private readonly static CappedArray _null = default;
+ private readonly static CappedArray _empty = new CappedArray(Array.Empty());
+ public static ref readonly CappedArray Null => ref _null;
+ public static ref readonly CappedArray Empty => ref _empty;
+
+ private readonly T[]? _array;
+ private readonly int _length;
public CappedArray(T[]? array, int length)
{
@@ -31,27 +36,48 @@ public CappedArray(T[]? array)
}
}
- public static implicit operator ReadOnlySpan(CappedArray array)
+ public static implicit operator ReadOnlySpan(in CappedArray array)
{
return array.AsSpan();
}
public static implicit operator CappedArray(T[]? array)
{
- if (array == null) return new CappedArray(null);
+ if (array == null) return default;
return new CappedArray(array);
}
+ public T this[int index]
+ {
+ get
+ {
+ ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, _length);
+ return _array![index];
+ }
+ set
+ {
+ ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, _length);
+ _array![index] = value;
+ }
+ }
+
public readonly int Length => _length;
+ public readonly int UnderlyingLength => _array?.Length ?? 0;
- public readonly T[]? Array => _array;
+ public readonly T[]? UnderlyingArray => _array;
public readonly bool IsUncapped => _length == _array?.Length;
public readonly bool IsNull => _array is null;
public readonly bool IsNotNull => _array is not null;
+ public readonly bool IsNotNullOrEmpty => _length > 0;
public readonly Span AsSpan()
{
- return _array.AsSpan()[..Length];
+ return _array.AsSpan(0, _length);
+ }
+
+ public readonly Span AsSpan(int start, int length)
+ {
+ return _array.AsSpan(start, length);
}
public readonly T[]? ToArray()
diff --git a/src/Nethermind/Nethermind.Core/Buffers/ICappedArrayPool.cs b/src/Nethermind/Nethermind.Core/Buffers/ICappedArrayPool.cs
index 7a238b656990..cb2dd04932ee 100644
--- a/src/Nethermind/Nethermind.Core/Buffers/ICappedArrayPool.cs
+++ b/src/Nethermind/Nethermind.Core/Buffers/ICappedArrayPool.cs
@@ -7,7 +7,7 @@ public interface ICappedArrayPool
{
CappedArray Rent(int size);
- void Return(CappedArray buffer);
+ void Return(in CappedArray buffer);
}
public static class BufferPoolExtensions
@@ -18,7 +18,7 @@ public static CappedArray SafeRentBuffer(this ICappedArrayPool? pool, int
return pool.Rent(size);
}
- public static void SafeReturnBuffer(this ICappedArrayPool? pool, CappedArray buffer)
+ public static void SafeReturnBuffer(this ICappedArrayPool? pool, in CappedArray buffer)
{
pool?.Return(buffer);
}
diff --git a/src/Nethermind/Nethermind.Core/Extensions/SpanExtensions.cs b/src/Nethermind/Nethermind.Core/Extensions/SpanExtensions.cs
index dae00fd1841b..a95f462a358f 100644
--- a/src/Nethermind/Nethermind.Core/Extensions/SpanExtensions.cs
+++ b/src/Nethermind/Nethermind.Core/Extensions/SpanExtensions.cs
@@ -49,7 +49,7 @@ public static string ToHexString(this in Span span, bool withZeroX, bool n
}
[DebuggerStepThrough]
- private static string ToHexViaLookup(ReadOnlySpan bytes, bool withZeroX, bool skipLeadingZeros, bool withEip55Checksum)
+ private unsafe static string ToHexViaLookup(ReadOnlySpan bytes, bool withZeroX, bool skipLeadingZeros, bool withEip55Checksum)
{
if (withEip55Checksum)
{
@@ -65,15 +65,25 @@ private static string ToHexViaLookup(ReadOnlySpan bytes, bool withZeroX, b
return withZeroX ? "0x0" : "0";
}
- char[] charArray = ArrayPool.Shared.Rent(length);
+ fixed (byte* input = &Unsafe.Add(ref MemoryMarshal.GetReference(bytes), leadingZeros / 2))
+ {
+ var createParams = new StringParams(input, bytes.Length, leadingZeros, withZeroX);
+ return string.Create(length, createParams, static (chars, state) =>
+ {
- ref byte input = ref Unsafe.Add(ref MemoryMarshal.GetReference(bytes), leadingZeros / 2);
- Bytes.OutputBytesToCharHex(ref input, bytes.Length, ref charArray[0], withZeroX, leadingZeros);
+ Bytes.OutputBytesToCharHex(ref state.Input, state.InputLength, ref MemoryMarshal.GetReference(chars), state.WithZeroX, state.LeadingZeros);
+ });
+ }
+ }
- string result = new string(charArray.AsSpan(0, length));
- ArrayPool.Shared.Return(charArray);
+ unsafe readonly struct StringParams(byte* input, int inputLength, int leadingZeros, bool withZeroX)
+ {
+ private readonly byte* _input = input;
+ public readonly int InputLength = inputLength;
+ public readonly int LeadingZeros = leadingZeros;
+ public readonly bool WithZeroX = withZeroX;
- return result;
+ public readonly ref byte Input => ref Unsafe.AsRef(_input);
}
private static string ToHexStringWithEip55Checksum(ReadOnlySpan bytes, bool withZeroX, bool skipLeadingZeros)
diff --git a/src/Nethermind/Nethermind.Core/KeyValueStoreExtensions.cs b/src/Nethermind/Nethermind.Core/KeyValueStoreExtensions.cs
index 1f4276b934cf..282e2726f4e0 100644
--- a/src/Nethermind/Nethermind.Core/KeyValueStoreExtensions.cs
+++ b/src/Nethermind/Nethermind.Core/KeyValueStoreExtensions.cs
@@ -104,7 +104,7 @@ public static void Set(this IWriteOnlyKeyValueStore db, Hash256 key, byte[] valu
db.PutSpan(key.Bytes, value, writeFlags);
}
- public static void Set(this IWriteOnlyKeyValueStore db, Hash256 key, CappedArray value, WriteFlags writeFlags = WriteFlags.None)
+ public static void Set(this IWriteOnlyKeyValueStore db, Hash256 key, in CappedArray value, WriteFlags writeFlags = WriteFlags.None)
{
if (value.IsUncapped && db.PreferWriteByArray)
{
@@ -112,7 +112,7 @@ public static void Set(this IWriteOnlyKeyValueStore db, Hash256 key, CappedArray
return;
}
- db.PutSpan(key.Bytes, value, writeFlags);
+ db.PutSpan(key.Bytes, value.AsSpan(), writeFlags);
}
public static void Set(this IWriteOnlyKeyValueStore db, long blockNumber, Hash256 key, ReadOnlySpan value, WriteFlags writeFlags = WriteFlags.None)
diff --git a/src/Nethermind/Nethermind.Crypto/Nethermind.Crypto.csproj b/src/Nethermind/Nethermind.Crypto/Nethermind.Crypto.csproj
index 23daf0a360ee..0c5702026d57 100644
--- a/src/Nethermind/Nethermind.Crypto/Nethermind.Crypto.csproj
+++ b/src/Nethermind/Nethermind.Crypto/Nethermind.Crypto.csproj
@@ -13,7 +13,6 @@
-
diff --git a/src/Nethermind/Nethermind.Db.Rocks/ColumnsDb.cs b/src/Nethermind/Nethermind.Db.Rocks/ColumnsDb.cs
index f73091856b66..71bbc7476c02 100644
--- a/src/Nethermind/Nethermind.Db.Rocks/ColumnsDb.cs
+++ b/src/Nethermind/Nethermind.Db.Rocks/ColumnsDb.cs
@@ -17,7 +17,7 @@ public class ColumnsDb : DbOnTheRocks, IColumnsDb where T : struct, Enum
{
private readonly IDictionary _columnDbs = new Dictionary();
- public ColumnsDb(string basePath, RocksDbSettings settings, IDbConfig dbConfig, ILogManager logManager, IReadOnlyList keys, IntPtr? sharedCache = null)
+ public ColumnsDb(string basePath, DbSettings settings, IDbConfig dbConfig, ILogManager logManager, IReadOnlyList keys, IntPtr? sharedCache = null)
: base(basePath, settings, dbConfig, logManager, GetEnumKeys(keys).Select((key) => key.ToString()).ToList(), sharedCache: sharedCache)
{
keys = GetEnumKeys(keys);
diff --git a/src/Nethermind/Nethermind.Db.Rocks/Config/IDbConfig.cs b/src/Nethermind/Nethermind.Db.Rocks/Config/IDbConfig.cs
index 5bd4e092aa87..abb5227153c6 100644
--- a/src/Nethermind/Nethermind.Db.Rocks/Config/IDbConfig.cs
+++ b/src/Nethermind/Nethermind.Db.Rocks/Config/IDbConfig.cs
@@ -179,7 +179,7 @@ public interface IDbConfig : IConfig
///
/// Enables DB Statistics - https://github.com/facebook/rocksdb/wiki/Statistics
- /// It can has a RocksDB perfomance hit between 5 and 10%.
+ /// It can has a RocksDB performance hit between 5 and 10%.
///
bool EnableDbStatistics { get; set; }
bool EnableMetricsUpdater { get; set; }
diff --git a/src/Nethermind/Nethermind.Db.Rocks/Config/PerTableDbConfig.cs b/src/Nethermind/Nethermind.Db.Rocks/Config/PerTableDbConfig.cs
index ab2ae4d76291..e4cd7a672989 100644
--- a/src/Nethermind/Nethermind.Db.Rocks/Config/PerTableDbConfig.cs
+++ b/src/Nethermind/Nethermind.Db.Rocks/Config/PerTableDbConfig.cs
@@ -13,12 +13,12 @@ public class PerTableDbConfig
{
private readonly string _tableName;
private readonly IDbConfig _dbConfig;
- private readonly RocksDbSettings _settings;
+ private readonly DbSettings _settings;
- public PerTableDbConfig(IDbConfig dbConfig, RocksDbSettings rocksDbSettings, string? columnName = null)
+ public PerTableDbConfig(IDbConfig dbConfig, DbSettings dbSettings, string? columnName = null)
{
_dbConfig = dbConfig;
- _settings = rocksDbSettings;
+ _settings = dbSettings;
_tableName = _settings.DbName;
if (columnName != null)
{
diff --git a/src/Nethermind/Nethermind.Db.Rocks/DbOnTheRocks.cs b/src/Nethermind/Nethermind.Db.Rocks/DbOnTheRocks.cs
index a9bae512b642..843be1cd0913 100644
--- a/src/Nethermind/Nethermind.Db.Rocks/DbOnTheRocks.cs
+++ b/src/Nethermind/Nethermind.Db.Rocks/DbOnTheRocks.cs
@@ -55,7 +55,7 @@ public class DbOnTheRocks : IDb, ITunableDb
protected IntPtr? _cache = null;
protected IntPtr? _rowCache = null;
- private readonly RocksDbSettings _settings;
+ private readonly DbSettings _settings;
protected readonly PerTableDbConfig _perTableDbConfig;
@@ -75,7 +75,7 @@ public class DbOnTheRocks : IDb, ITunableDb
public DbOnTheRocks(
string basePath,
- RocksDbSettings rocksDbSettings,
+ DbSettings dbSettings,
IDbConfig dbConfig,
ILogManager logManager,
IList? columnFamilies = null,
@@ -84,12 +84,12 @@ public DbOnTheRocks(
IntPtr? sharedCache = null)
{
_logger = logManager.GetClassLogger();
- _settings = rocksDbSettings;
+ _settings = dbSettings;
Name = _settings.DbName;
_fileSystem = fileSystem ?? new FileSystem();
_rocksDbNative = rocksDbNative ?? RocksDbSharp.Native.Instance;
_perTableDbConfig = new PerTableDbConfig(dbConfig, _settings);
- _db = Init(basePath, rocksDbSettings.DbPath, dbConfig, logManager, columnFamilies, rocksDbSettings.DeleteOnStart, sharedCache);
+ _db = Init(basePath, dbSettings.DbPath, dbConfig, logManager, columnFamilies, dbSettings.DeleteOnStart, sharedCache);
if (_perTableDbConfig.AdditionalRocksDbOptions != null)
{
diff --git a/src/Nethermind/Nethermind.Db.Rocks/Nethermind.Db.Rocks.csproj b/src/Nethermind/Nethermind.Db.Rocks/Nethermind.Db.Rocks.csproj
index 9c3dc1db1c05..82522e506543 100644
--- a/src/Nethermind/Nethermind.Db.Rocks/Nethermind.Db.Rocks.csproj
+++ b/src/Nethermind/Nethermind.Db.Rocks/Nethermind.Db.Rocks.csproj
@@ -16,7 +16,6 @@
-
diff --git a/src/Nethermind/Nethermind.Db.Rocks/RocksDbFactory.cs b/src/Nethermind/Nethermind.Db.Rocks/RocksDbFactory.cs
index e346e0ea4180..53eb3eb7c50b 100644
--- a/src/Nethermind/Nethermind.Db.Rocks/RocksDbFactory.cs
+++ b/src/Nethermind/Nethermind.Db.Rocks/RocksDbFactory.cs
@@ -7,7 +7,7 @@
namespace Nethermind.Db.Rocks;
-public class RocksDbFactory : IRocksDbFactory
+public class RocksDbFactory : IDbFactory
{
private readonly IDbConfig _dbConfig;
@@ -33,11 +33,11 @@ public RocksDbFactory(IDbConfig dbConfig, ILogManager logManager, string basePat
_sharedCache = RocksDbSharp.Native.Instance.rocksdb_cache_create_lru(new UIntPtr(dbConfig.SharedBlockCacheSize));
}
- public IDb CreateDb(RocksDbSettings rocksDbSettings) =>
- new DbOnTheRocks(_basePath, rocksDbSettings, _dbConfig, _logManager, sharedCache: _sharedCache);
+ public IDb CreateDb(DbSettings dbSettings) =>
+ new DbOnTheRocks(_basePath, dbSettings, _dbConfig, _logManager, sharedCache: _sharedCache);
- public IColumnsDb CreateColumnsDb(RocksDbSettings rocksDbSettings) where T : struct, Enum =>
- new ColumnsDb(_basePath, rocksDbSettings, _dbConfig, _logManager, Array.Empty(), sharedCache: _sharedCache);
+ public IColumnsDb CreateColumnsDb(DbSettings dbSettings) where T : struct, Enum =>
+ new ColumnsDb(_basePath, dbSettings, _dbConfig, _logManager, Array.Empty(), sharedCache: _sharedCache);
- public string GetFullDbPath(RocksDbSettings rocksDbSettings) => DbOnTheRocks.GetFullDbPath(rocksDbSettings.DbPath, _basePath);
+ public string GetFullDbPath(DbSettings dbSettings) => DbOnTheRocks.GetFullDbPath(dbSettings.DbPath, _basePath);
}
diff --git a/src/Nethermind/Nethermind.Db.Rpc/Nethermind.Db.Rpc.csproj b/src/Nethermind/Nethermind.Db.Rpc/Nethermind.Db.Rpc.csproj
index 45983d3d9e59..abc149ac9374 100644
--- a/src/Nethermind/Nethermind.Db.Rpc/Nethermind.Db.Rpc.csproj
+++ b/src/Nethermind/Nethermind.Db.Rpc/Nethermind.Db.Rpc.csproj
@@ -1,6 +1,5 @@
-
diff --git a/src/Nethermind/Nethermind.Db.Rpc/RpcDbFactory.cs b/src/Nethermind/Nethermind.Db.Rpc/RpcDbFactory.cs
index ab1558ad44ff..f88b3d7360dc 100644
--- a/src/Nethermind/Nethermind.Db.Rpc/RpcDbFactory.cs
+++ b/src/Nethermind/Nethermind.Db.Rpc/RpcDbFactory.cs
@@ -8,55 +8,40 @@
namespace Nethermind.Db.Rpc
{
- public class RpcDbFactory : IRocksDbFactory, IMemDbFactory
+ public class RpcDbFactory : IDbFactory
{
- private readonly IMemDbFactory _wrappedMemDbFactory;
- private readonly IRocksDbFactory _wrappedRocksDbFactory;
+ private readonly IDbFactory _wrappedRocksDbFactory;
private readonly IJsonSerializer _jsonSerializer;
private readonly IJsonRpcClient _jsonRpcClient;
private readonly ILogManager _logManager;
public RpcDbFactory(
- IMemDbFactory wrappedMemDbFactory,
- IRocksDbFactory wrappedRocksDbFactory,
+ IDbFactory wrappedRocksDbFactory,
IJsonSerializer jsonSerializer,
IJsonRpcClient jsonRpcClient,
ILogManager logManager)
{
- _wrappedMemDbFactory = wrappedMemDbFactory;
_wrappedRocksDbFactory = wrappedRocksDbFactory;
_jsonSerializer = jsonSerializer;
_jsonRpcClient = jsonRpcClient;
_logManager = logManager;
}
- public IColumnsDb CreateColumnsDb(RocksDbSettings rocksDbSettings) where T : struct, Enum
+ public IColumnsDb CreateColumnsDb(DbSettings dbSettings) where T : struct, Enum
{
- IColumnsDb rocksDb = _wrappedRocksDbFactory.CreateColumnsDb(rocksDbSettings);
+ IColumnsDb rocksDb = _wrappedRocksDbFactory.CreateColumnsDb(dbSettings);
return new ReadOnlyColumnsDb(
- new RpcColumnsDb(rocksDbSettings.DbName, _jsonSerializer, _jsonRpcClient, _logManager, rocksDb),
+ new RpcColumnsDb(dbSettings.DbName, _jsonSerializer, _jsonRpcClient, _logManager, rocksDb),
true);
}
- public IColumnsDb CreateColumnsDb(string dbName) where T : struct, Enum
+ public IDb CreateDb(DbSettings dbSettings)
{
- IColumnsDb memDb = _wrappedMemDbFactory.CreateColumnsDb(dbName);
- return new ReadOnlyColumnsDb(new RpcColumnsDb(dbName, _jsonSerializer, _jsonRpcClient, _logManager, memDb), true);
- }
-
- public IDb CreateDb(RocksDbSettings rocksDbSettings)
- {
- var rocksDb = _wrappedRocksDbFactory.CreateDb(rocksDbSettings);
+ var rocksDb = _wrappedRocksDbFactory.CreateDb(dbSettings);
return WrapWithRpc(rocksDb);
}
- public IDb CreateDb(string dbName)
- {
- var memDb = _wrappedMemDbFactory.CreateDb(dbName);
- return WrapWithRpc(memDb);
- }
-
- public string GetFullDbPath(RocksDbSettings rocksDbSettings) => _wrappedRocksDbFactory.GetFullDbPath(rocksDbSettings);
+ public string GetFullDbPath(DbSettings dbSettings) => _wrappedRocksDbFactory.GetFullDbPath(dbSettings);
private IDb WrapWithRpc(IDb db) =>
new ReadOnlyDb(new RpcDb(db.Name, _jsonSerializer, _jsonRpcClient, _logManager, db), true);
diff --git a/src/Nethermind/Nethermind.Db.Test/Config/PerTableDbConfigTests.cs b/src/Nethermind/Nethermind.Db.Test/Config/PerTableDbConfigTests.cs
index d6b14b882eed..75e9b29a07e9 100644
--- a/src/Nethermind/Nethermind.Db.Test/Config/PerTableDbConfigTests.cs
+++ b/src/Nethermind/Nethermind.Db.Test/Config/PerTableDbConfigTests.cs
@@ -30,7 +30,7 @@ public void CanReadAllConfigForAllTable()
foreach (string table in tables)
{
- PerTableDbConfig config = new PerTableDbConfig(dbConfig, new RocksDbSettings(table, ""));
+ PerTableDbConfig config = new PerTableDbConfig(dbConfig, new DbSettings(table, ""));
object _ = config.CacheIndexAndFilterBlocks;
_ = config.BlockCacheSize;
@@ -47,7 +47,7 @@ public void When_PerTableConfigIsAvailable_UsePerTableConfig()
dbConfig.MaxOpenFiles = 2;
dbConfig.ReceiptsDbMaxOpenFiles = 3;
- PerTableDbConfig config = new PerTableDbConfig(dbConfig, new RocksDbSettings(DbNames.Receipts, ""));
+ PerTableDbConfig config = new PerTableDbConfig(dbConfig, new DbSettings(DbNames.Receipts, ""));
config.MaxOpenFiles.Should().Be(3);
}
@@ -57,7 +57,7 @@ public void When_PerTableConfigIsNotAvailable_UseGeneralConfig()
DbConfig dbConfig = new DbConfig();
dbConfig.MaxOpenFiles = 2;
- PerTableDbConfig config = new PerTableDbConfig(dbConfig, new RocksDbSettings(DbNames.Receipts, ""));
+ PerTableDbConfig config = new PerTableDbConfig(dbConfig, new DbSettings(DbNames.Receipts, ""));
config.MaxOpenFiles.Should().Be(2);
}
}
diff --git a/src/Nethermind/Nethermind.Db.Test/DbOnTheRocksTests.cs b/src/Nethermind/Nethermind.Db.Test/DbOnTheRocksTests.cs
index 5e70338d5e11..3048c1e78e60 100644
--- a/src/Nethermind/Nethermind.Db.Test/DbOnTheRocksTests.cs
+++ b/src/Nethermind/Nethermind.Db.Test/DbOnTheRocksTests.cs
@@ -66,7 +66,7 @@ public void WriteOptions_is_correct()
public void Throws_whenMaxWriteBufferNumIs0()
{
IDbConfig config = new DbConfig();
- RocksDbSettings settings = new("Blocks", DbPath)
+ DbSettings settings = new("Blocks", DbPath)
{
BlockCacheSize = (ulong)1.KiB(),
CacheIndexAndFilterBlocks = false,
@@ -183,7 +183,7 @@ public void If_marker_exists_on_open_then_repair_before_open()
file.Received().Delete(markerFile);
}
- private static RocksDbSettings GetRocksDbSettings(string dbPath, string dbName)
+ private static DbSettings GetRocksDbSettings(string dbPath, string dbName)
{
return new(dbName, dbPath)
{
@@ -324,7 +324,7 @@ public void Smoke_test_span_with_memory_manager()
AllocatedSpan.Should().Be(0);
}
- private static RocksDbSettings GetRocksDbSettings(string dbPath, string dbName)
+ private static DbSettings GetRocksDbSettings(string dbPath, string dbName)
{
return new(dbName, dbPath)
{
@@ -357,13 +357,13 @@ class CorruptedDbOnTheRocks : DbOnTheRocks
{
public CorruptedDbOnTheRocks(
string basePath,
- RocksDbSettings rocksDbSettings,
+ DbSettings dbSettings,
IDbConfig dbConfig,
ILogManager logManager,
IList? columnFamilies = null,
RocksDbSharp.Native? rocksDbNative = null,
IFileSystem? fileSystem = null
- ) : base(basePath, rocksDbSettings, dbConfig, logManager, columnFamilies, rocksDbNative, fileSystem)
+ ) : base(basePath, dbSettings, dbConfig, logManager, columnFamilies, rocksDbNative, fileSystem)
{
}
diff --git a/src/Nethermind/Nethermind.Db.Test/DbProviderTests.cs b/src/Nethermind/Nethermind.Db.Test/DbProviderTests.cs
index 0deafbc72f6a..1a45a8ccd80b 100644
--- a/src/Nethermind/Nethermind.Db.Test/DbProviderTests.cs
+++ b/src/Nethermind/Nethermind.Db.Test/DbProviderTests.cs
@@ -13,9 +13,9 @@ public class DbProviderTests
public void DbProvider_CanRegisterMemDb()
{
MemDbFactory memDbFactory = new MemDbFactory();
- using (DbProvider dbProvider = new DbProvider(DbModeHint.Mem))
+ using (DbProvider dbProvider = new DbProvider())
{
- IDb memDb = memDbFactory.CreateDb("MemDb");
+ IDb memDb = memDbFactory.CreateDb(new DbSettings("MemDb", "MemDb"));
dbProvider.RegisterDb("MemDb", memDb);
IDb db = dbProvider.GetDb("MemDb");
Assert.That(db, Is.EqualTo(memDb));
@@ -25,7 +25,7 @@ public void DbProvider_CanRegisterMemDb()
[Test]
public void DbProvider_CanRegisterColumnsDb()
{
- using (DbProvider dbProvider = new DbProvider(DbModeHint.Mem))
+ using (DbProvider dbProvider = new DbProvider())
{
MemDbFactory memDbFactory = new MemDbFactory();
IColumnsDb memSnapshotableDb = memDbFactory.CreateColumnsDb("ColumnsDb");
@@ -39,7 +39,7 @@ public void DbProvider_CanRegisterColumnsDb()
[Test]
public void DbProvider_ThrowExceptionOnRegisteringTheSameDb()
{
- using (DbProvider dbProvider = new DbProvider(DbModeHint.Mem))
+ using (DbProvider dbProvider = new DbProvider())
{
MemDbFactory memDbFactory = new MemDbFactory();
IColumnsDb memSnapshotableDb = memDbFactory.CreateColumnsDb("ColumnsDb");
@@ -51,7 +51,7 @@ public void DbProvider_ThrowExceptionOnRegisteringTheSameDb()
[Test]
public void DbProvider_ThrowExceptionOnGettingNotRegisteredDb()
{
- using (DbProvider dbProvider = new DbProvider(DbModeHint.Mem))
+ using (DbProvider dbProvider = new DbProvider())
{
MemDbFactory memDbFactory = new MemDbFactory();
IColumnsDb memSnapshotableDb = memDbFactory.CreateColumnsDb("ColumnsDb");
diff --git a/src/Nethermind/Nethermind.Db.Test/FullPruning/FullPruningDbTests.cs b/src/Nethermind/Nethermind.Db.Test/FullPruning/FullPruningDbTests.cs
index 18da3dabb9bd..7656307b45a6 100644
--- a/src/Nethermind/Nethermind.Db.Test/FullPruning/FullPruningDbTests.cs
+++ b/src/Nethermind/Nethermind.Db.Test/FullPruning/FullPruningDbTests.cs
@@ -112,14 +112,14 @@ private class TestContext
public int DbIndex { get; private set; } = -1;
public string Name { get; }
public long Metrics { get; private set; }
- public IRocksDbFactory RocksDbFactory { get; } = Substitute.For();
+ public IDbFactory DbFactory { get; } = Substitute.For();
public FullPruningDb FullPruningDb { get; }
public TestContext()
{
- RocksDbFactory.CreateDb(Arg.Any()).Returns(_ => CurrentMirrorDb = new MemDb((++DbIndex).ToString()));
+ DbFactory.CreateDb(Arg.Any()).Returns(_ => CurrentMirrorDb = new MemDb((++DbIndex).ToString()));
Name = "name";
- FullPruningDb = new FullPruningDb(new RocksDbSettings(Name, "path"), RocksDbFactory, () => Metrics++);
+ FullPruningDb = new FullPruningDb(new DbSettings(Name, "path"), DbFactory, () => Metrics++);
}
}
}
diff --git a/src/Nethermind/Nethermind.Db.Test/FullPruning/FullPruningInnerDbFactoryTests.cs b/src/Nethermind/Nethermind.Db.Test/FullPruning/FullPruningInnerDbFactoryTests.cs
index 09c55f2b8fed..213f3d26b51b 100644
--- a/src/Nethermind/Nethermind.Db.Test/FullPruning/FullPruningInnerDbFactoryTests.cs
+++ b/src/Nethermind/Nethermind.Db.Test/FullPruning/FullPruningInnerDbFactoryTests.cs
@@ -19,9 +19,9 @@ public void if_no_db_present_creates_0_index_db()
{
TestContext test = new();
test.Directory.Exists.Returns(false);
- test.TestedDbFactory.CreateDb(test.RocksDbSettings);
+ test.TestedDbFactory.CreateDb(test.DbSettings);
test.RocksDbFactory.Received().CreateDb(Arg.Is(MatchSettings(test, 0)));
- test.TestedDbFactory.CreateDb(test.RocksDbSettings);
+ test.TestedDbFactory.CreateDb(test.DbSettings);
test.RocksDbFactory.Received().CreateDb(Arg.Is(MatchSettings(test, 1)));
}
@@ -31,9 +31,9 @@ public void if_old_db_present_creates_no_index_db()
TestContext test = new();
test.Directory.Exists.Returns(true);
test.Directory.EnumerateFiles().Returns(new[] { Substitute.For() });
- test.TestedDbFactory.CreateDb(test.RocksDbSettings);
+ test.TestedDbFactory.CreateDb(test.DbSettings);
test.RocksDbFactory.Received().CreateDb(Arg.Is(MatchSettings(test)));
- test.TestedDbFactory.CreateDb(test.RocksDbSettings);
+ test.TestedDbFactory.CreateDb(test.DbSettings);
test.RocksDbFactory.Received().CreateDb(Arg.Is(MatchSettings(test, 0)));
}
@@ -48,16 +48,16 @@ public void if_new_db_present_creates_next_index_db()
dir11.Name.Returns(11.ToString());
IDirectoryInfo ignoredDir = Substitute.For();
test.Directory.EnumerateDirectories().Returns(new[] { dir10, ignoredDir, dir11 });
- test.TestedDbFactory.CreateDb(test.RocksDbSettings);
+ test.TestedDbFactory.CreateDb(test.DbSettings);
test.RocksDbFactory.Received().CreateDb(Arg.Is(MatchSettings(test, 10)));
- test.TestedDbFactory.CreateDb(test.RocksDbSettings);
+ test.TestedDbFactory.CreateDb(test.DbSettings);
test.RocksDbFactory.Received().CreateDb(Arg.Is(MatchSettings(test, 11)));
}
- private static Expression> MatchSettings(TestContext test, int? index = null)
+ private static Expression> MatchSettings(TestContext test, int? index = null)
{
- string dbName = test.RocksDbSettings.DbName + index;
- string combine = Combine(test.RocksDbSettings.DbPath, index);
+ string dbName = test.DbSettings.DbName + index;
+ string combine = Combine(test.DbSettings.DbPath, index);
return r => r.DbName == dbName && r.DbPath == combine;
}
@@ -67,9 +67,9 @@ private class TestContext
{
private FullPruningInnerDbFactory _testedDbFactory;
- public RocksDbSettings RocksDbSettings = new("name", "path");
+ public DbSettings DbSettings = new("name", "path");
public string Path => "path";
- public IRocksDbFactory RocksDbFactory { get; } = Substitute.For();
+ public IDbFactory RocksDbFactory { get; } = Substitute.For();
public IFileSystem FileSystem { get; } = Substitute.For();
public IDirectoryInfo Directory { get; } = Substitute.For();
@@ -79,7 +79,7 @@ public TestContext()
{
FileSystem.Path.Combine(Arg.Any(), Arg.Any()).Returns(c => Combine(c[0], c[1]));
FileSystem.DirectoryInfo.New(Path).Returns(Directory);
- RocksDbFactory.GetFullDbPath(Arg.Any()).Returns(c => c.Arg().DbPath);
+ RocksDbFactory.GetFullDbPath(Arg.Any()).Returns(c => c.Arg().DbPath);
}
}
}
diff --git a/src/Nethermind/Nethermind.Db.Test/Nethermind.Db.Test.csproj b/src/Nethermind/Nethermind.Db.Test/Nethermind.Db.Test.csproj
index b39c8f60d294..9aca1473d3cf 100644
--- a/src/Nethermind/Nethermind.Db.Test/Nethermind.Db.Test.csproj
+++ b/src/Nethermind/Nethermind.Db.Test/Nethermind.Db.Test.csproj
@@ -4,7 +4,7 @@
annotations
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Nethermind/Nethermind.Db.Test/ReadOnlyDbProviderTests.cs b/src/Nethermind/Nethermind.Db.Test/ReadOnlyDbProviderTests.cs
index 5e86110930cb..5bb30423e2d5 100644
--- a/src/Nethermind/Nethermind.Db.Test/ReadOnlyDbProviderTests.cs
+++ b/src/Nethermind/Nethermind.Db.Test/ReadOnlyDbProviderTests.cs
@@ -12,7 +12,7 @@ public class ReadOnlyDbProviderTests
[TestCase(false)]
public void Can_clear(bool localChanges)
{
- ReadOnlyDbProvider dbProvider = new(new DbProvider(DbModeHint.Mem), localChanges);
+ ReadOnlyDbProvider dbProvider = new(new DbProvider(), localChanges);
dbProvider.ClearTempChanges();
}
}
diff --git a/src/Nethermind/Nethermind.Db.Test/RocksDbSettingsTests.cs b/src/Nethermind/Nethermind.Db.Test/RocksDbSettingsTests.cs
index 13e92c8c8776..061c0705c394 100644
--- a/src/Nethermind/Nethermind.Db.Test/RocksDbSettingsTests.cs
+++ b/src/Nethermind/Nethermind.Db.Test/RocksDbSettingsTests.cs
@@ -12,7 +12,7 @@ public class RocksDbSettingsTests
[Test]
public void clone_test()
{
- RocksDbSettings settings = new("name", "path")
+ DbSettings settings = new("name", "path")
{
BlockCacheSize = 1,
UpdateReadMetrics = () => { },
@@ -22,7 +22,7 @@ public void clone_test()
CacheIndexAndFilterBlocks = true
};
- RocksDbSettings settings2 = settings.Clone("Name2", "Path2");
+ DbSettings settings2 = settings.Clone("Name2", "Path2");
settings2.Should().BeEquivalentTo(settings,
o => o.Excluding(s => s.DbName).Excluding(s => s.DbPath));
settings2.DbName.Should().Be("Name2");
diff --git a/src/Nethermind/Nethermind.Db.Test/Rpc/RpcDbFactoryTests.cs b/src/Nethermind/Nethermind.Db.Test/Rpc/RpcDbFactoryTests.cs
index cba7b13dc9bd..da572fb8cec6 100644
--- a/src/Nethermind/Nethermind.Db.Test/Rpc/RpcDbFactoryTests.cs
+++ b/src/Nethermind/Nethermind.Db.Test/Rpc/RpcDbFactoryTests.cs
@@ -29,10 +29,10 @@ void ValidateDb(params object[] dbs)
IJsonSerializer jsonSerializer = Substitute.For();
IJsonRpcClient jsonRpcClient = Substitute.For();
- IMemDbFactory rpcDbFactory = new RpcDbFactory(new MemDbFactory(), null, jsonSerializer, jsonRpcClient, LimboLogs.Instance);
+ IDbFactory rpcDbFactory = new RpcDbFactory(new MemDbFactory(), jsonSerializer, jsonRpcClient, LimboLogs.Instance);
- IDbProvider memDbProvider = new DbProvider(DbModeHint.Mem);
- StandardDbInitializer standardDbInitializer = new(memDbProvider, null, rpcDbFactory, Substitute.For());
+ IDbProvider memDbProvider = new DbProvider();
+ StandardDbInitializer standardDbInitializer = new(memDbProvider, rpcDbFactory, Substitute.For());
standardDbInitializer.InitStandardDbs(true);
ValidateDb>(
diff --git a/src/Nethermind/Nethermind.Db.Test/StandardDbInitializerTests.cs b/src/Nethermind/Nethermind.Db.Test/StandardDbInitializerTests.cs
index 74d9d66ab209..7c5dd5f15820 100644
--- a/src/Nethermind/Nethermind.Db.Test/StandardDbInitializerTests.cs
+++ b/src/Nethermind/Nethermind.Db.Test/StandardDbInitializerTests.cs
@@ -30,7 +30,7 @@ public void Initialize()
[TestCase(true)]
public async Task InitializerTests_MemDbProvider(bool useReceipts)
{
- using IDbProvider dbProvider = await InitializeStandardDb(useReceipts, DbModeHint.Mem, "mem");
+ using IDbProvider dbProvider = await InitializeStandardDb(useReceipts, true, "mem");
Type receiptsType = GetReceiptsType(useReceipts, typeof(MemColumnsDb));
AssertStandardDbs(dbProvider, typeof(MemDb), receiptsType);
dbProvider.StateDb.Should().BeOfType(typeof(FullPruningDb));
@@ -40,7 +40,7 @@ public async Task InitializerTests_MemDbProvider(bool useReceipts)
[TestCase(true)]
public async Task InitializerTests_RocksDbProvider(bool useReceipts)
{
- using IDbProvider dbProvider = await InitializeStandardDb(useReceipts, DbModeHint.Persisted, $"rocks_{useReceipts}");
+ using IDbProvider dbProvider = await InitializeStandardDb(useReceipts, false, $"rocks_{useReceipts}");
Type receiptsType = GetReceiptsType(useReceipts);
AssertStandardDbs(dbProvider, typeof(DbOnTheRocks), receiptsType);
dbProvider.StateDb.Should().BeOfType(typeof(FullPruningDb));
@@ -50,7 +50,7 @@ public async Task InitializerTests_RocksDbProvider(bool useReceipts)
[TestCase(true)]
public async Task InitializerTests_ReadonlyDbProvider(bool useReceipts)
{
- using IDbProvider dbProvider = await InitializeStandardDb(useReceipts, DbModeHint.Persisted, $"readonly_{useReceipts}");
+ using IDbProvider dbProvider = await InitializeStandardDb(useReceipts, false, $"readonly_{useReceipts}");
using ReadOnlyDbProvider readonlyDbProvider = new(dbProvider, true);
Type receiptsType = GetReceiptsType(useReceipts);
AssertStandardDbs(dbProvider, typeof(DbOnTheRocks), receiptsType);
@@ -62,15 +62,18 @@ public async Task InitializerTests_ReadonlyDbProvider(bool useReceipts)
[Test]
public async Task InitializerTests_WithPruning()
{
- using IDbProvider dbProvider = await InitializeStandardDb(false, DbModeHint.Mem, "pruning");
+ using IDbProvider dbProvider = await InitializeStandardDb(false, true, "pruning");
dbProvider.StateDb.Should().BeOfType();
}
- private async Task InitializeStandardDb(bool useReceipts, DbModeHint dbModeHint, string path)
+ private async Task InitializeStandardDb(bool useReceipts, bool useMemDb, string path)
{
- IDbProvider dbProvider = new DbProvider(dbModeHint);
- RocksDbFactory rocksDbFactory = new(new DbConfig(), LimboLogs.Instance, Path.Combine(_folderWithDbs, path));
- StandardDbInitializer initializer = new(dbProvider, rocksDbFactory, new MemDbFactory(), Substitute.For());
+ IDbProvider dbProvider = new DbProvider();
+ IDbFactory dbFactory = useMemDb
+ ? new MemDbFactory()
+ : new RocksDbFactory(new DbConfig(), LimboLogs.Instance, Path.Combine(_folderWithDbs, path));
+
+ StandardDbInitializer initializer = new(dbProvider, dbFactory, Substitute.For());
await initializer.InitStandardDbsAsync(useReceipts);
return dbProvider;
}
diff --git a/src/Nethermind/Nethermind.Db/DbProvider.cs b/src/Nethermind/Nethermind.Db/DbProvider.cs
index b7fa470f4a60..dea78d426e7e 100644
--- a/src/Nethermind/Nethermind.Db/DbProvider.cs
+++ b/src/Nethermind/Nethermind.Db/DbProvider.cs
@@ -15,13 +15,6 @@ public class DbProvider : IDbProvider
private readonly ConcurrentDictionary _registeredColumnDbs =
new(StringComparer.InvariantCultureIgnoreCase);
- public DbProvider(DbModeHint dbMode)
- {
- DbMode = dbMode;
- }
-
- public DbModeHint DbMode { get; }
-
public IDictionary RegisteredDbs => _registeredDbs;
public IDictionary RegisteredColumnDbs => _registeredColumnDbs;
diff --git a/src/Nethermind/Nethermind.Db/FullPruning/FullPruningDb.cs b/src/Nethermind/Nethermind.Db/FullPruning/FullPruningDb.cs
index 20c850ab3776..a9b7bb24572e 100755
--- a/src/Nethermind/Nethermind.Db/FullPruning/FullPruningDb.cs
+++ b/src/Nethermind/Nethermind.Db/FullPruning/FullPruningDb.cs
@@ -22,8 +22,8 @@ namespace Nethermind.Db.FullPruning
///
public class FullPruningDb : IDb, IFullPruningDb, ITunableDb
{
- private readonly RocksDbSettings _settings;
- private readonly IRocksDbFactory _dbFactory;
+ private readonly DbSettings _settings;
+ private readonly IDbFactory _dbFactory;
private readonly Action? _updateDuplicateWriteMetrics;
// current main DB, will be written to and will be main source for reading
@@ -33,7 +33,7 @@ public class FullPruningDb : IDb, IFullPruningDb, ITunableDb
// this will be null if no full pruning is in progress
private PruningContext? _pruningContext;
- public FullPruningDb(RocksDbSettings settings, IRocksDbFactory dbFactory, Action? updateDuplicateWriteMetrics = null)
+ public FullPruningDb(DbSettings settings, IDbFactory dbFactory, Action? updateDuplicateWriteMetrics = null)
{
_settings = settings;
_dbFactory = dbFactory;
@@ -41,7 +41,7 @@ public FullPruningDb(RocksDbSettings settings, IRocksDbFactory dbFactory, Action
_currentDb = CreateDb(_settings).WithEOACompressed();
}
- private IDb CreateDb(RocksDbSettings settings) => _dbFactory.CreateDb(settings);
+ private IDb CreateDb(DbSettings settings) => _dbFactory.CreateDb(settings);
public byte[]? this[ReadOnlySpan key]
{
@@ -168,9 +168,9 @@ public void Clear()
///
public virtual bool TryStartPruning(bool duplicateReads, out IPruningContext context)
{
- RocksDbSettings ClonedDbSettings()
+ DbSettings ClonedDbSettings()
{
- RocksDbSettings clonedDbSettings = _settings.Clone();
+ DbSettings clonedDbSettings = _settings.Clone();
clonedDbSettings.DeleteOnStart = true;
return clonedDbSettings;
}
diff --git a/src/Nethermind/Nethermind.Db/FullPruning/FullPruningInnerDbFactory.cs b/src/Nethermind/Nethermind.Db/FullPruning/FullPruningInnerDbFactory.cs
index d0d767c833be..f79b66e3261c 100644
--- a/src/Nethermind/Nethermind.Db/FullPruning/FullPruningInnerDbFactory.cs
+++ b/src/Nethermind/Nethermind.Db/FullPruning/FullPruningInnerDbFactory.cs
@@ -10,48 +10,48 @@ namespace Nethermind.Db.FullPruning
///
/// Factory
///
- public class FullPruningInnerDbFactory : IRocksDbFactory
+ public class FullPruningInnerDbFactory : IDbFactory
{
- private readonly IRocksDbFactory _rocksDbFactory;
+ private readonly IDbFactory _dbFactory;
private readonly IFileSystem _fileSystem;
private int _index; // current index of the inner db
///
/// Constructor
///
- /// Inner real db factory.
+ /// Inner real db factory.
/// File system.
/// Main DB path.
- public FullPruningInnerDbFactory(IRocksDbFactory rocksDbFactory, IFileSystem fileSystem, string path)
+ public FullPruningInnerDbFactory(IDbFactory dbFactory, IFileSystem fileSystem, string path)
{
- _rocksDbFactory = rocksDbFactory;
+ _dbFactory = dbFactory;
_fileSystem = fileSystem;
_index = GetStartingIndex(path); // we need to read the current state of inner DB's
}
///
- public IDb CreateDb(RocksDbSettings rocksDbSettings)
+ public IDb CreateDb(DbSettings dbSettings)
{
- RocksDbSettings settings = GetRocksDbSettings(rocksDbSettings);
- return _rocksDbFactory.CreateDb(settings);
+ DbSettings settings = GetRocksDbSettings(dbSettings);
+ return _dbFactory.CreateDb(settings);
}
///
- public IColumnsDb CreateColumnsDb(RocksDbSettings rocksDbSettings) where T : struct, Enum
+ public IColumnsDb CreateColumnsDb(DbSettings dbSettings) where T : struct, Enum
{
- RocksDbSettings settings = GetRocksDbSettings(rocksDbSettings);
- return _rocksDbFactory.CreateColumnsDb(settings);
+ DbSettings settings = GetRocksDbSettings(dbSettings);
+ return _dbFactory.CreateColumnsDb(settings);
}
///
- public string GetFullDbPath(RocksDbSettings rocksDbSettings)
+ public string GetFullDbPath(DbSettings dbSettings)
{
- RocksDbSettings settings = GetRocksDbSettings(rocksDbSettings);
- return _rocksDbFactory.GetFullDbPath(settings);
+ DbSettings settings = GetRocksDbSettings(dbSettings);
+ return _dbFactory.GetFullDbPath(settings);
}
// When creating a new DB, we need to change its inner settings
- private RocksDbSettings GetRocksDbSettings(RocksDbSettings rocksDbSettings)
+ private DbSettings GetRocksDbSettings(DbSettings originalSetting)
{
_index++;
@@ -59,9 +59,9 @@ private RocksDbSettings GetRocksDbSettings(RocksDbSettings rocksDbSettings)
bool firstDb = _index == -1;
// if first DB, then we will put it into main directory and not use indexed subdirectory
- string dbName = firstDb ? rocksDbSettings.DbName : rocksDbSettings.DbName + _index;
- string dbPath = firstDb ? rocksDbSettings.DbPath : _fileSystem.Path.Combine(rocksDbSettings.DbPath, _index.ToString());
- RocksDbSettings dbSettings = rocksDbSettings.Clone(dbName, dbPath);
+ string dbName = firstDb ? originalSetting.DbName : originalSetting.DbName + _index;
+ string dbPath = firstDb ? originalSetting.DbPath : _fileSystem.Path.Combine(originalSetting.DbPath, _index.ToString());
+ DbSettings dbSettings = originalSetting.Clone(dbName, dbPath);
dbSettings.CanDeleteFolder = !firstDb; // we cannot delete main db folder, only indexed subfolders
return dbSettings;
}
@@ -74,13 +74,13 @@ private RocksDbSettings GetRocksDbSettings(RocksDbSettings rocksDbSettings)
private int GetStartingIndex(string path)
{
// gets path to non-index DB.
- string fullPath = _rocksDbFactory.GetFullDbPath(new RocksDbSettings(string.Empty, path));
+ string fullPath = _dbFactory.GetFullDbPath(new DbSettings(string.Empty, path));
IDirectoryInfo directory = _fileSystem.DirectoryInfo.New(fullPath);
if (directory.Exists)
{
if (directory.EnumerateFiles().Any())
{
- return -2; // if there are files in the directory, then we have a main DB, marked -2.
+ return -2; // if there are files in the directory, then we have a main DB, marked -2.
}
// else we have sub-directories, which should be index based
diff --git a/src/Nethermind/Nethermind.Db/FullPruning/MemDbFactoryToRocksDbAdapter.cs b/src/Nethermind/Nethermind.Db/FullPruning/MemDbFactoryToRocksDbAdapter.cs
deleted file mode 100644
index 31bcfddcdc8e..000000000000
--- a/src/Nethermind/Nethermind.Db/FullPruning/MemDbFactoryToRocksDbAdapter.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
-// SPDX-License-Identifier: LGPL-3.0-only
-
-using System;
-
-namespace Nethermind.Db.FullPruning
-{
- public class MemDbFactoryToRocksDbAdapter : IRocksDbFactory
- {
- private readonly IMemDbFactory _memDbFactory;
-
- public MemDbFactoryToRocksDbAdapter(IMemDbFactory memDbFactory)
- {
- _memDbFactory = memDbFactory;
- }
-
- public IDb CreateDb(RocksDbSettings rocksDbSettings) => _memDbFactory.CreateDb(rocksDbSettings.DbName);
-
- public IColumnsDb CreateColumnsDb(RocksDbSettings rocksDbSettings) where T : struct, Enum => _memDbFactory.CreateColumnsDb(rocksDbSettings.DbName);
- }
-}
diff --git a/src/Nethermind/Nethermind.Db/IDbFactory.cs b/src/Nethermind/Nethermind.Db/IDbFactory.cs
new file mode 100644
index 000000000000..3a45f50e476a
--- /dev/null
+++ b/src/Nethermind/Nethermind.Db/IDbFactory.cs
@@ -0,0 +1,34 @@
+// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
+// SPDX-License-Identifier: LGPL-3.0-only
+
+using System;
+
+namespace Nethermind.Db
+{
+ ///
+ /// Allows to create a new Db instance.
+ ///
+ public interface IDbFactory
+ {
+ ///
+ /// Creates a standard Db.
+ ///
+ /// Setting to use for DB creation.
+ /// Standard DB.
+ IDb CreateDb(DbSettings dbSettings);
+
+ ///
+ /// Creates a column Db.
+ ///
+ /// Setting to use for DB creation.
+ /// Column DB.
+ IColumnsDb CreateColumnsDb(DbSettings dbSettings) where T : struct, Enum;
+
+ ///
+ /// Gets the file system path for the DB.
+ ///
+ /// Setting to use for DB creation.
+ /// File system path for the DB.
+ public string GetFullDbPath(DbSettings dbSettings) => dbSettings.DbPath;
+ }
+}
diff --git a/src/Nethermind/Nethermind.Db/IDbProvider.cs b/src/Nethermind/Nethermind.Db/IDbProvider.cs
index 7c4b764ff115..7da613627f0a 100644
--- a/src/Nethermind/Nethermind.Db/IDbProvider.cs
+++ b/src/Nethermind/Nethermind.Db/IDbProvider.cs
@@ -6,15 +6,8 @@
namespace Nethermind.Db
{
- public enum DbModeHint
- {
- Mem,
- Persisted
- }
-
public interface IDbProvider : IDisposable
{
- DbModeHint DbMode { get; }
public IDb StateDb => GetDb(DbNames.State);
public IDb CodeDb => GetDb(DbNames.Code);
public IColumnsDb ReceiptsDb => GetColumnDb(DbNames.Receipts);
diff --git a/src/Nethermind/Nethermind.Db/IMemDbFactory.cs b/src/Nethermind/Nethermind.Db/IMemDbFactory.cs
deleted file mode 100644
index 84bc452b8eef..000000000000
--- a/src/Nethermind/Nethermind.Db/IMemDbFactory.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
-// SPDX-License-Identifier: LGPL-3.0-only
-
-using System;
-
-namespace Nethermind.Db
-{
- public interface IMemDbFactory
- {
- IDb CreateDb(string dbName);
-
- IColumnsDb CreateColumnsDb(string dbName) where T : struct, Enum;
- }
-}
diff --git a/src/Nethermind/Nethermind.Db/IRocksDbFactory.cs b/src/Nethermind/Nethermind.Db/IRocksDbFactory.cs
deleted file mode 100644
index c91db2487a1c..000000000000
--- a/src/Nethermind/Nethermind.Db/IRocksDbFactory.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
-// SPDX-License-Identifier: LGPL-3.0-only
-
-using System;
-
-namespace Nethermind.Db
-{
- ///
- /// Allows to create a new Rocks instance.
- ///
- public interface IRocksDbFactory
- {
- ///
- /// Creates a standard RocksDB.
- ///
- /// Setting to use for DB creation.
- /// Standard DB.
- IDb CreateDb(RocksDbSettings rocksDbSettings);
-
- ///
- /// Creates a column RocksDB.
- ///
- /// Setting to use for DB creation.
- /// Column DB.
- IColumnsDb CreateColumnsDb(RocksDbSettings rocksDbSettings) where T : struct, Enum;
-
- ///
- /// Gets the file system path for the DB.
- ///
- /// Setting to use for DB creation.
- /// File system path for the DB.
- public string GetFullDbPath(RocksDbSettings rocksDbSettings) => rocksDbSettings.DbPath;
- }
-}
diff --git a/src/Nethermind/Nethermind.Db/MemDbFactory.cs b/src/Nethermind/Nethermind.Db/MemDbFactory.cs
index d8df04b3cf8a..51e7df538377 100644
--- a/src/Nethermind/Nethermind.Db/MemDbFactory.cs
+++ b/src/Nethermind/Nethermind.Db/MemDbFactory.cs
@@ -5,10 +5,18 @@
namespace Nethermind.Db
{
- public class MemDbFactory : IMemDbFactory
+ public class MemDbFactory : IDbFactory
{
public IColumnsDb CreateColumnsDb(string dbName) where T : struct, Enum => new MemColumnsDb(dbName);
- public IDb CreateDb(string dbName) => new MemDb(dbName);
+ public IDb CreateDb(DbSettings dbSettings)
+ {
+ return new MemDb(dbSettings.DbName);
+ }
+
+ public IColumnsDb CreateColumnsDb(DbSettings dbSettings) where T : struct, Enum
+ {
+ return new MemColumnsDb(dbSettings.DbName);
+ }
}
}
diff --git a/src/Nethermind/Nethermind.Db/Metrics.cs b/src/Nethermind/Nethermind.Db/Metrics.cs
index 114a5227bd1d..ca3197b0f492 100644
--- a/src/Nethermind/Nethermind.Db/Metrics.cs
+++ b/src/Nethermind/Nethermind.Db/Metrics.cs
@@ -79,7 +79,7 @@ public static class Metrics
public static int StateDbInPruningWrites;
[CounterMetric]
- [Description("Number of storge trie reads.")]
+ [Description("Number of storage trie reads.")]
public static long StorageTreeReads { get; set; }
[CounterMetric]
diff --git a/src/Nethermind/Nethermind.Db/Nethermind.Db.csproj b/src/Nethermind/Nethermind.Db/Nethermind.Db.csproj
index dcb4d59046ab..9da055ad5153 100644
--- a/src/Nethermind/Nethermind.Db/Nethermind.Db.csproj
+++ b/src/Nethermind/Nethermind.Db/Nethermind.Db.csproj
@@ -8,7 +8,4 @@
-
-
-
diff --git a/src/Nethermind/Nethermind.Db/NullMemDbFactory.cs b/src/Nethermind/Nethermind.Db/NullMemDbFactory.cs
deleted file mode 100644
index 237541c6d3df..000000000000
--- a/src/Nethermind/Nethermind.Db/NullMemDbFactory.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
-// SPDX-License-Identifier: LGPL-3.0-only
-
-using System;
-
-namespace Nethermind.Db
-{
- public class NullMemDbFactory : IMemDbFactory
- {
- private NullMemDbFactory() { }
-
- public static NullMemDbFactory Instance { get; } = new();
-
- public IDb CreateDb(string dbName)
- {
- throw new InvalidOperationException();
- }
-
- public IColumnsDb CreateColumnsDb(string dbName) where T : struct, Enum
- {
- throw new InvalidOperationException();
- }
- }
-}
diff --git a/src/Nethermind/Nethermind.Db/NullRocksDbFactory.cs b/src/Nethermind/Nethermind.Db/NullRocksDbFactory.cs
index c1e263dd3028..454161966d3d 100644
--- a/src/Nethermind/Nethermind.Db/NullRocksDbFactory.cs
+++ b/src/Nethermind/Nethermind.Db/NullRocksDbFactory.cs
@@ -5,18 +5,18 @@
namespace Nethermind.Db
{
- public class NullRocksDbFactory : IRocksDbFactory
+ public class NullDbFactory : IDbFactory
{
- private NullRocksDbFactory() { }
+ private NullDbFactory() { }
- public static NullRocksDbFactory Instance { get; } = new();
+ public static NullDbFactory Instance { get; } = new();
- public IDb CreateDb(RocksDbSettings rocksDbSettings)
+ public IDb CreateDb(DbSettings dbSettings)
{
throw new InvalidOperationException();
}
- public IColumnsDb CreateColumnsDb(RocksDbSettings rocksDbSettings) where T : struct, Enum
+ public IColumnsDb CreateColumnsDb(DbSettings dbSettings) where T : struct, Enum
{
throw new InvalidOperationException();
}
diff --git a/src/Nethermind/Nethermind.Db/ReadOnlyDbProvider.cs b/src/Nethermind/Nethermind.Db/ReadOnlyDbProvider.cs
index f211ca259bbc..41b92d3c0a12 100644
--- a/src/Nethermind/Nethermind.Db/ReadOnlyDbProvider.cs
+++ b/src/Nethermind/Nethermind.Db/ReadOnlyDbProvider.cs
@@ -33,8 +33,6 @@ public void Dispose()
}
}
- public DbModeHint DbMode => _wrappedProvider.DbMode;
-
public void ClearTempChanges()
{
foreach (IReadOnlyDb readonlyDb in _registeredDbs.Values)
diff --git a/src/Nethermind/Nethermind.Db/RocksDbInitializer.cs b/src/Nethermind/Nethermind.Db/RocksDbInitializer.cs
index 73b8b1b54973..9e0e61cf742d 100644
--- a/src/Nethermind/Nethermind.Db/RocksDbInitializer.cs
+++ b/src/Nethermind/Nethermind.Db/RocksDbInitializer.cs
@@ -10,17 +10,14 @@ namespace Nethermind.Db
public abstract class RocksDbInitializer
{
private readonly IDbProvider _dbProvider;
- protected IRocksDbFactory RocksDbFactory { get; }
- protected IMemDbFactory MemDbFactory { get; }
- protected bool PersistedDb => _dbProvider.DbMode == DbModeHint.Persisted;
+ protected IDbFactory DbFactory { get; }
private readonly List _registrations = new();
- protected RocksDbInitializer(IDbProvider? dbProvider, IRocksDbFactory? rocksDbFactory, IMemDbFactory? memDbFactory)
+ protected RocksDbInitializer(IDbProvider? dbProvider, IDbFactory? dbFactory)
{
_dbProvider = dbProvider ?? throw new ArgumentNullException(nameof(dbProvider));
- RocksDbFactory = rocksDbFactory ?? NullRocksDbFactory.Instance;
- MemDbFactory = memDbFactory ?? NullMemDbFactory.Instance;
+ DbFactory = dbFactory ?? NullDbFactory.Instance;
}
protected void RegisterCustomDb(string dbName, Func dbFunc)
@@ -45,10 +42,10 @@ void Action()
_registrations.Add(Action);
}
- protected void RegisterDb(RocksDbSettings settings) =>
+ protected void RegisterDb(DbSettings settings) =>
AddRegisterAction(settings.DbName, () => CreateDb(settings));
- protected void RegisterColumnsDb(RocksDbSettings settings) where T : struct, Enum =>
+ protected void RegisterColumnsDb(DbSettings settings) where T : struct, Enum =>
AddRegisterAction(settings.DbName, () => CreateColumnDb(settings));
private void AddRegisterAction(string dbName, Func dbCreation) =>
@@ -56,11 +53,10 @@ private void AddRegisterAction(string dbName, Func dbCreation) =>
private void AddRegisterAction(string dbName, Func> dbCreation) =>
_registrations.Add(() => _dbProvider.RegisterColumnDb(dbName, dbCreation()));
- private IDb CreateDb(RocksDbSettings settings) =>
- PersistedDb ? RocksDbFactory.CreateDb(settings) : MemDbFactory.CreateDb(settings.DbName);
+ private IDb CreateDb(DbSettings settings) => DbFactory.CreateDb(settings);
- private IColumnsDb CreateColumnDb(RocksDbSettings settings) where T : struct, Enum =>
- PersistedDb ? RocksDbFactory.CreateColumnsDb(settings) : MemDbFactory.CreateColumnsDb(settings.DbName);
+ private IColumnsDb CreateColumnDb(DbSettings settings) where T : struct, Enum =>
+ DbFactory.CreateColumnsDb(settings);
protected void InitAll()
{
diff --git a/src/Nethermind/Nethermind.Db/RocksDbSettings.cs b/src/Nethermind/Nethermind.Db/RocksDbSettings.cs
index 5474a11ed150..88f9b5730f33 100644
--- a/src/Nethermind/Nethermind.Db/RocksDbSettings.cs
+++ b/src/Nethermind/Nethermind.Db/RocksDbSettings.cs
@@ -5,9 +5,9 @@
namespace Nethermind.Db
{
- public class RocksDbSettings
+ public class DbSettings
{
- public RocksDbSettings(string name, string path)
+ public DbSettings(string name, string path)
{
DbName = name;
DbPath = path;
@@ -27,15 +27,15 @@ public RocksDbSettings(string name, string path)
public bool DeleteOnStart { get; set; }
public bool CanDeleteFolder { get; set; } = true;
- public RocksDbSettings Clone(string name, string path)
+ public DbSettings Clone(string name, string path)
{
- RocksDbSettings settings = (RocksDbSettings)MemberwiseClone();
+ DbSettings settings = (DbSettings)MemberwiseClone();
settings.DbName = name;
settings.DbPath = path;
return settings;
}
- public RocksDbSettings Clone() => (RocksDbSettings)MemberwiseClone();
+ public DbSettings Clone() => (DbSettings)MemberwiseClone();
public override string ToString() => $"{DbName}:{DbPath}";
}
diff --git a/src/Nethermind/Nethermind.Db/StandardDbInitializer.cs b/src/Nethermind/Nethermind.Db/StandardDbInitializer.cs
index d3832216b0d3..9b0e42b352e1 100644
--- a/src/Nethermind/Nethermind.Db/StandardDbInitializer.cs
+++ b/src/Nethermind/Nethermind.Db/StandardDbInitializer.cs
@@ -15,10 +15,9 @@ public class StandardDbInitializer : RocksDbInitializer
public StandardDbInitializer(
IDbProvider? dbProvider,
- IRocksDbFactory? rocksDbFactory,
- IMemDbFactory? memDbFactory,
+ IDbFactory? rocksDbFactory,
IFileSystem? fileSystem = null)
- : base(dbProvider, rocksDbFactory, memDbFactory)
+ : base(dbProvider, rocksDbFactory)
{
_fileSystem = fileSystem ?? new FileSystem();
}
@@ -37,40 +36,40 @@ public async Task InitStandardDbsAsync(bool useReceiptsDb, bool useBlobsDb = tru
private void RegisterAll(bool useReceiptsDb, bool useBlobsDb)
{
- RegisterDb(BuildRocksDbSettings(DbNames.Blocks, () => Metrics.BlocksDbReads++, () => Metrics.BlocksDbWrites++));
- RegisterDb(BuildRocksDbSettings(DbNames.Headers, () => Metrics.HeaderDbReads++, () => Metrics.HeaderDbWrites++));
- RegisterDb(BuildRocksDbSettings(DbNames.BlockNumbers, () => Metrics.BlockNumberDbReads++, () => Metrics.BlockNumberDbWrites++));
- RegisterDb(BuildRocksDbSettings(DbNames.BlockInfos, () => Metrics.BlockInfosDbReads++, () => Metrics.BlockInfosDbWrites++));
- RegisterDb(BuildRocksDbSettings(DbNames.BadBlocks, () => Metrics.BadBlocksDbReads++, () => Metrics.BadBlocksDbWrites++));
+ RegisterDb(BuildDbSettings(DbNames.Blocks, () => Metrics.BlocksDbReads++, () => Metrics.BlocksDbWrites++));
+ RegisterDb(BuildDbSettings(DbNames.Headers, () => Metrics.HeaderDbReads++, () => Metrics.HeaderDbWrites++));
+ RegisterDb(BuildDbSettings(DbNames.BlockNumbers, () => Metrics.BlockNumberDbReads++, () => Metrics.BlockNumberDbWrites++));
+ RegisterDb(BuildDbSettings(DbNames.BlockInfos, () => Metrics.BlockInfosDbReads++, () => Metrics.BlockInfosDbWrites++));
+ RegisterDb(BuildDbSettings(DbNames.BadBlocks, () => Metrics.BadBlocksDbReads++, () => Metrics.BadBlocksDbWrites++));
- RocksDbSettings stateDbSettings = BuildRocksDbSettings(DbNames.State, () => Metrics.StateDbReads++, () => Metrics.StateDbWrites++);
+ DbSettings stateDbSettings = BuildDbSettings(DbNames.State, () => Metrics.StateDbReads++, () => Metrics.StateDbWrites++);
RegisterCustomDb(DbNames.State, () => new FullPruningDb(
stateDbSettings,
- PersistedDb
- ? new FullPruningInnerDbFactory(RocksDbFactory, _fileSystem, stateDbSettings.DbPath)
- : new MemDbFactoryToRocksDbAdapter(MemDbFactory),
+ DbFactory is not MemDbFactory
+ ? new FullPruningInnerDbFactory(DbFactory, _fileSystem, stateDbSettings.DbPath)
+ : DbFactory,
() => Interlocked.Increment(ref Metrics.StateDbInPruningWrites)));
- RegisterDb(BuildRocksDbSettings(DbNames.Code, () => Metrics.CodeDbReads++, () => Metrics.CodeDbWrites++));
- RegisterDb(BuildRocksDbSettings(DbNames.Bloom, () => Metrics.BloomDbReads++, () => Metrics.BloomDbWrites++));
- RegisterDb(BuildRocksDbSettings(DbNames.CHT, () => Metrics.CHTDbReads++, () => Metrics.CHTDbWrites++));
- RegisterDb(BuildRocksDbSettings(DbNames.Witness, () => Metrics.WitnessDbReads++, () => Metrics.WitnessDbWrites++));
+ RegisterDb(BuildDbSettings(DbNames.Code, () => Metrics.CodeDbReads++, () => Metrics.CodeDbWrites++));
+ RegisterDb(BuildDbSettings(DbNames.Bloom, () => Metrics.BloomDbReads++, () => Metrics.BloomDbWrites++));
+ RegisterDb(BuildDbSettings(DbNames.CHT, () => Metrics.CHTDbReads++, () => Metrics.CHTDbWrites++));
+ RegisterDb(BuildDbSettings(DbNames.Witness, () => Metrics.WitnessDbReads++, () => Metrics.WitnessDbWrites++));
if (useReceiptsDb)
{
- RegisterColumnsDb(BuildRocksDbSettings(DbNames.Receipts, () => Metrics.ReceiptsDbReads++, () => Metrics.ReceiptsDbWrites++));
+ RegisterColumnsDb(BuildDbSettings(DbNames.Receipts, () => Metrics.ReceiptsDbReads++, () => Metrics.ReceiptsDbWrites++));
}
else
{
RegisterCustomColumnDb(DbNames.Receipts, () => new ReadOnlyColumnsDb(new MemColumnsDb(), false));
}
- RegisterDb(BuildRocksDbSettings(DbNames.Metadata, () => Metrics.MetadataDbReads++, () => Metrics.MetadataDbWrites++));
+ RegisterDb(BuildDbSettings(DbNames.Metadata, () => Metrics.MetadataDbReads++, () => Metrics.MetadataDbWrites++));
if (useBlobsDb)
{
- RegisterColumnsDb(BuildRocksDbSettings(DbNames.BlobTransactions, () => Metrics.BlobTransactionsDbReads++, () => Metrics.BlobTransactionsDbWrites++));
+ RegisterColumnsDb(BuildDbSettings(DbNames.BlobTransactions, () => Metrics.BlobTransactionsDbReads++, () => Metrics.BlobTransactionsDbWrites++));
}
}
- private static RocksDbSettings BuildRocksDbSettings(string dbName, Action updateReadsMetrics, Action updateWriteMetrics, bool deleteOnStart = false)
+ private static DbSettings BuildDbSettings(string dbName, Action updateReadsMetrics, Action updateWriteMetrics, bool deleteOnStart = false)
{
return new(GetTitleDbName(dbName), dbName)
{
diff --git a/src/Nethermind/Nethermind.Db/TestMemDbProvider.cs b/src/Nethermind/Nethermind.Db/TestMemDbProvider.cs
index 9eef63154e09..b8276b5a5830 100644
--- a/src/Nethermind/Nethermind.Db/TestMemDbProvider.cs
+++ b/src/Nethermind/Nethermind.Db/TestMemDbProvider.cs
@@ -10,16 +10,16 @@ public class TestMemDbProvider
{
public static async Task InitAsync()
{
- IDbProvider memDbProvider = new DbProvider(DbModeHint.Mem);
- StandardDbInitializer? standardDbInitializer = new StandardDbInitializer(memDbProvider, null, new MemDbFactory());
+ IDbProvider memDbProvider = new DbProvider();
+ StandardDbInitializer? standardDbInitializer = new StandardDbInitializer(memDbProvider, new MemDbFactory());
await standardDbInitializer.InitStandardDbsAsync(true);
return memDbProvider;
}
public static IDbProvider Init()
{
- IDbProvider memDbProvider = new DbProvider(DbModeHint.Mem);
- StandardDbInitializer? standardDbInitializer = new StandardDbInitializer(memDbProvider, null, new MemDbFactory());
+ IDbProvider memDbProvider = new DbProvider();
+ StandardDbInitializer? standardDbInitializer = new StandardDbInitializer(memDbProvider, new MemDbFactory());
standardDbInitializer.InitStandardDbs(true);
return memDbProvider;
}
diff --git a/src/Nethermind/Nethermind.EthStats.Test/Nethermind.EthStats.Test.csproj b/src/Nethermind/Nethermind.EthStats.Test/Nethermind.EthStats.Test.csproj
index 76df1a2bc7be..0a24cf9e12de 100644
--- a/src/Nethermind/Nethermind.EthStats.Test/Nethermind.EthStats.Test.csproj
+++ b/src/Nethermind/Nethermind.EthStats.Test/Nethermind.EthStats.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Ethash.Test/Nethermind.Ethash.Test.csproj b/src/Nethermind/Nethermind.Ethash.Test/Nethermind.Ethash.Test.csproj
index 48b8647fc5cf..bafc665bd12e 100644
--- a/src/Nethermind/Nethermind.Ethash.Test/Nethermind.Ethash.Test.csproj
+++ b/src/Nethermind/Nethermind.Ethash.Test/Nethermind.Ethash.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Evm.Benchmark/Nethermind.Evm.Benchmark.csproj b/src/Nethermind/Nethermind.Evm.Benchmark/Nethermind.Evm.Benchmark.csproj
index ba6f323b232a..3dad15dc2826 100644
--- a/src/Nethermind/Nethermind.Evm.Benchmark/Nethermind.Evm.Benchmark.csproj
+++ b/src/Nethermind/Nethermind.Evm.Benchmark/Nethermind.Evm.Benchmark.csproj
@@ -2,7 +2,6 @@
-
diff --git a/src/Nethermind/Nethermind.Evm.Test/CodeAnalysis/CodeDataAnalyzerHelperTests.cs b/src/Nethermind/Nethermind.Evm.Test/CodeAnalysis/CodeDataAnalyzerHelperTests.cs
deleted file mode 100644
index 729e432b1cfc..000000000000
--- a/src/Nethermind/Nethermind.Evm.Test/CodeAnalysis/CodeDataAnalyzerHelperTests.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
-// SPDX-License-Identifier: LGPL-3.0-only
-
-using FluentAssertions;
-using Nethermind.Evm.CodeAnalysis;
-using NUnit.Framework;
-
-namespace Nethermind.Evm.Test.CodeAnalysis
-{
- [TestFixture]
- public class CodeDataAnalyzerHelperTests
- {
- [Test]
- public void Validate_CodeBitmap_With_Push10()
- {
- byte[] code =
- {
- (byte)Instruction.PUSH10,
- 1,2,3,4,5,6,7,8,9,10,
- (byte)Instruction.JUMPDEST
- };
-
- var bitmap = CodeDataAnalyzerHelper.CreateCodeBitmap(code);
- bitmap[0].Should().Be(127);
- bitmap[1].Should().Be(224);
- }
-
- [Test]
- public void Validate_CodeBitmap_With_Push30()
- {
- byte[] code =
- {
- (byte)Instruction.PUSH30,
- 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,
- (byte)Instruction.JUMPDEST
- };
-
- var bitmap = CodeDataAnalyzerHelper.CreateCodeBitmap(code);
- bitmap[0].Should().Be(127);
- bitmap[1].Should().Be(255);
- bitmap[2].Should().Be(255);
- bitmap[3].Should().Be(254);
- }
- }
-}
diff --git a/src/Nethermind/Nethermind.Evm.Test/CodeAnalysis/CodeInfoTests.cs b/src/Nethermind/Nethermind.Evm.Test/CodeAnalysis/CodeInfoTests.cs
index c2cf0817de17..cf2c6e68472b 100644
--- a/src/Nethermind/Nethermind.Evm.Test/CodeAnalysis/CodeInfoTests.cs
+++ b/src/Nethermind/Nethermind.Evm.Test/CodeAnalysis/CodeInfoTests.cs
@@ -106,7 +106,7 @@ public void Validate_CodeBitmap_With_Push30()
}
[Test]
- public void Small_Jumpdest_Use_CodeDataAnalyzer()
+ public void Small_Jumpdest()
{
byte[] code =
{
@@ -116,15 +116,10 @@ public void Small_Jumpdest_Use_CodeDataAnalyzer()
CodeInfo codeInfo = new(code);
codeInfo.ValidateJump(10, false).Should().BeTrue();
-
- FieldInfo field = typeof(CodeInfo).GetField(AnalyzerField, BindingFlags.Instance | BindingFlags.NonPublic);
- var calc = field.GetValue(codeInfo);
-
- Assert.IsInstanceOf(calc);
}
[Test]
- public void Small_Push1_Use_CodeDataAnalyzer()
+ public void Small_Push1()
{
byte[] code =
{
@@ -134,45 +129,30 @@ public void Small_Push1_Use_CodeDataAnalyzer()
CodeInfo codeInfo = new(code);
codeInfo.ValidateJump(10, false).Should().BeFalse();
-
- FieldInfo field = typeof(CodeInfo).GetField(AnalyzerField, BindingFlags.Instance | BindingFlags.NonPublic);
- var calc = field.GetValue(codeInfo);
-
- Assert.IsInstanceOf(calc);
}
[Test]
- public void Jumpdest_Over10k_Use_JumpdestAnalyzer()
+ public void Jumpdest_Over10k()
{
var code = Enumerable.Repeat((byte)0x5b, 10_001).ToArray();
CodeInfo codeInfo = new(code);
codeInfo.ValidateJump(10, false).Should().BeTrue();
-
- FieldInfo field = typeof(CodeInfo).GetField(AnalyzerField, BindingFlags.Instance | BindingFlags.NonPublic);
- var calc = field.GetValue(codeInfo);
-
- Assert.IsInstanceOf(calc);
}
[Test]
- public void Push1_Over10k_Use_JumpdestAnalyzer()
+ public void Push1_Over10k()
{
var code = Enumerable.Repeat((byte)0x60, 10_001).ToArray();
CodeInfo codeInfo = new(code);
codeInfo.ValidateJump(10, false).Should().BeFalse();
-
- FieldInfo field = typeof(CodeInfo).GetField(AnalyzerField, BindingFlags.Instance | BindingFlags.NonPublic);
- var calc = field.GetValue(codeInfo);
-
- Assert.IsInstanceOf(calc);
}
[Test]
- public void Push1Jumpdest_Over10k_Use_JumpdestAnalyzer()
+ public void Push1Jumpdest_Over10k()
{
byte[] code = new byte[10_001];
for (int i = 0; i < code.Length; i++)
@@ -180,27 +160,10 @@ public void Push1Jumpdest_Over10k_Use_JumpdestAnalyzer()
code[i] = i % 2 == 0 ? (byte)0x60 : (byte)0x5b;
}
- ICodeInfoAnalyzer calc = null;
- int iterations = 1;
- while (iterations <= 10)
- {
- CodeInfo codeInfo = new(code);
-
- codeInfo.ValidateJump(10, false).Should().BeFalse();
- codeInfo.ValidateJump(11, false).Should().BeFalse(); // 0x5b but not JUMPDEST but data
-
- FieldInfo field = typeof(CodeInfo).GetField(AnalyzerField, BindingFlags.Instance | BindingFlags.NonPublic);
- calc = (ICodeInfoAnalyzer)field.GetValue(codeInfo);
-
- if (calc is JumpdestAnalyzer)
- {
- break;
- }
-
- iterations++;
- }
+ CodeInfo codeInfo = new(code);
- Assert.IsInstanceOf(calc);
+ codeInfo.ValidateJump(10, false).Should().BeFalse();
+ codeInfo.ValidateJump(11, false).Should().BeFalse(); // 0x5b but not JUMPDEST but data
}
}
}
diff --git a/src/Nethermind/Nethermind.Evm.Test/Nethermind.Evm.Test.csproj b/src/Nethermind/Nethermind.Evm.Test/Nethermind.Evm.Test.csproj
index 0d5a3c41ca66..86b59759dcca 100644
--- a/src/Nethermind/Nethermind.Evm.Test/Nethermind.Evm.Test.csproj
+++ b/src/Nethermind/Nethermind.Evm.Test/Nethermind.Evm.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Evm/CodeAnalysis/CodeDataAnalyzer.cs b/src/Nethermind/Nethermind.Evm/CodeAnalysis/CodeDataAnalyzer.cs
deleted file mode 100644
index a3dd20dcb534..000000000000
--- a/src/Nethermind/Nethermind.Evm/CodeAnalysis/CodeDataAnalyzer.cs
+++ /dev/null
@@ -1,170 +0,0 @@
-// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
-// SPDX-License-Identifier: LGPL-3.0-only
-
-using System;
-
-namespace Nethermind.Evm.CodeAnalysis
-{
- public class CodeDataAnalyzer : ICodeInfoAnalyzer
- {
- private byte[]? _codeBitmap;
- public byte[] MachineCode { get; set; }
-
- public CodeDataAnalyzer(byte[] code)
- {
- MachineCode = code;
- }
-
- public bool ValidateJump(int destination, bool isSubroutine)
- {
- _codeBitmap ??= CodeDataAnalyzerHelper.CreateCodeBitmap(MachineCode);
-
- if (destination < 0 || destination >= MachineCode.Length)
- {
- return false;
- }
-
- if (!CodeDataAnalyzerHelper.IsCodeSegment(_codeBitmap, destination))
- {
- return false;
- }
-
- if (isSubroutine)
- {
- return MachineCode[destination] == 0x5c;
- }
-
- return MachineCode[destination] == 0x5b;
- }
- }
-
- public static class CodeDataAnalyzerHelper
- {
- private const UInt16 Set2BitsMask = 0b1100_0000_0000_0000;
- private const UInt16 Set3BitsMask = 0b1110_0000_0000_0000;
- private const UInt16 Set4BitsMask = 0b1111_0000_0000_0000;
- private const UInt16 Set5BitsMask = 0b1111_1000_0000_0000;
- private const UInt16 Set6BitsMask = 0b1111_1100_0000_0000;
- private const UInt16 Set7BitsMask = 0b1111_1110_0000_0000;
-
- private static readonly byte[] _lookup = new byte[8] { 0x80, 0x40, 0x20, 0x10, 0x8, 0x4, 0x2, 0x1, };
-
- ///
- /// Collects data locations in code.
- /// An unset bit means the byte is an opcode, a set bit means it's data.
- ///
- public static byte[] CreateCodeBitmap(byte[] code)
- {
- // The bitmap is 4 bytes longer than necessary, in case the code
- // ends with a PUSH32, the algorithm will push zeroes onto the
- // bitvector outside the bounds of the actual code.
- byte[] bitvec = new byte[(code.Length / 8) + 1 + 4];
-
- byte push1 = 0x60;
- byte push32 = 0x7f;
-
- for (int pc = 0; pc < code.Length;)
- {
- byte op = code[pc];
- pc++;
-
- if (op < push1 || op > push32)
- {
- continue;
- }
-
- int numbits = op - push1 + 1;
-
- if (numbits >= 8)
- {
- for (; numbits >= 16; numbits -= 16)
- {
- bitvec.Set16(pc);
- pc += 16;
- }
-
- for (; numbits >= 8; numbits -= 8)
- {
- bitvec.Set8(pc);
- pc += 8;
- }
- }
-
- switch (numbits)
- {
- case 1:
- bitvec.Set1(pc);
- pc += 1;
- break;
- case 2:
- bitvec.SetN(pc, Set2BitsMask);
- pc += 2;
- break;
- case 3:
- bitvec.SetN(pc, Set3BitsMask);
- pc += 3;
- break;
- case 4:
- bitvec.SetN(pc, Set4BitsMask);
- pc += 4;
- break;
- case 5:
- bitvec.SetN(pc, Set5BitsMask);
- pc += 5;
- break;
- case 6:
- bitvec.SetN(pc, Set6BitsMask);
- pc += 6;
- break;
- case 7:
- bitvec.SetN(pc, Set7BitsMask);
- pc += 7;
- break;
- }
- }
-
- return bitvec;
- }
-
- ///
- /// Checks if the position is in a code segment.
- ///
- public static bool IsCodeSegment(byte[] bitvec, int pos)
- {
- return (bitvec[pos / 8] & (0x80 >> (pos % 8))) == 0;
- }
-
- private static void Set1(this byte[] bitvec, int pos)
- {
- bitvec[pos / 8] |= _lookup[pos % 8];
- }
-
- private static void SetN(this byte[] bitvec, int pos, UInt16 flag)
- {
- ushort a = (ushort)(flag >> (pos % 8));
- bitvec[pos / 8] |= (byte)(a >> 8);
- byte b = (byte)a;
- if (b != 0)
- {
- // If the bit-setting affects the neighbouring byte, we can assign - no need to OR it,
- // since it's the first write to that byte
- bitvec[pos / 8 + 1] = b;
- }
- }
-
- private static void Set8(this byte[] bitvec, int pos)
- {
- byte a = (byte)(0xFF >> (pos % 8));
- bitvec[pos / 8] |= a;
- bitvec[pos / 8 + 1] = (byte)~a;
- }
-
- private static void Set16(this byte[] bitvec, int pos)
- {
- byte a = (byte)(0xFF >> (pos % 8));
- bitvec[pos / 8] |= a;
- bitvec[pos / 8 + 1] = 0xFF;
- bitvec[pos / 8 + 2] = (byte)~a;
- }
- }
-}
diff --git a/src/Nethermind/Nethermind.Evm/CodeAnalysis/CodeInfo.cs b/src/Nethermind/Nethermind.Evm/CodeAnalysis/CodeInfo.cs
index ec8df2a58703..73d517ad78df 100644
--- a/src/Nethermind/Nethermind.Evm/CodeAnalysis/CodeInfo.cs
+++ b/src/Nethermind/Nethermind.Evm/CodeAnalysis/CodeInfo.cs
@@ -2,20 +2,17 @@
// SPDX-License-Identifier: LGPL-3.0-only
using System;
+using System.Runtime.CompilerServices;
+
using Nethermind.Evm.Precompiles;
namespace Nethermind.Evm.CodeAnalysis
{
public class CodeInfo
{
- private const int SampledCodeLength = 10_001;
- private const int PercentageOfPush1 = 40;
- private const int NumberOfSamples = 100;
- private static readonly Random _rand = new();
-
public byte[] MachineCode { get; set; }
public IPrecompile? Precompile { get; set; }
- private ICodeInfoAnalyzer? _analyzer;
+ private JumpDestinationAnalyzer? _analyzer;
public CodeInfo(byte[] code)
{
@@ -32,45 +29,20 @@ public CodeInfo(IPrecompile precompile)
public bool ValidateJump(int destination, bool isSubroutine)
{
- if (_analyzer is null)
- {
- CreateAnalyzer();
- }
+ JumpDestinationAnalyzer analyzer = _analyzer;
+ analyzer ??= CreateAnalyzer();
- return _analyzer.ValidateJump(destination, isSubroutine);
+ return analyzer.ValidateJump(destination, isSubroutine);
}
///
/// Do sampling to choose an algo when the code is big enough.
/// When the code size is small we can use the default analyzer.
///
- private void CreateAnalyzer()
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ private JumpDestinationAnalyzer CreateAnalyzer()
{
- if (MachineCode.Length >= SampledCodeLength)
- {
- byte push1Count = 0;
-
- // we check (by sampling randomly) how many PUSH1 instructions are in the code
- for (int i = 0; i < NumberOfSamples; i++)
- {
- byte instruction = MachineCode[_rand.Next(0, MachineCode.Length)];
-
- // PUSH1
- if (instruction == 0x60)
- {
- push1Count++;
- }
- }
-
- // If there are many PUSH1 ops then use the JUMPDEST analyzer.
- // The JumpdestAnalyzer can perform up to 40% better than the default Code Data Analyzer
- // in a scenario when the code consists only of PUSH1 instructions.
- _analyzer = push1Count > PercentageOfPush1 ? new JumpdestAnalyzer(MachineCode) : new CodeDataAnalyzer(MachineCode);
- }
- else
- {
- _analyzer = new CodeDataAnalyzer(MachineCode);
- }
+ return _analyzer = new JumpDestinationAnalyzer(MachineCode);
}
}
}
diff --git a/src/Nethermind/Nethermind.Evm/CodeAnalysis/ICodeInfoAnalyzer.cs b/src/Nethermind/Nethermind.Evm/CodeAnalysis/ICodeInfoAnalyzer.cs
deleted file mode 100644
index 72b2fab0c17c..000000000000
--- a/src/Nethermind/Nethermind.Evm/CodeAnalysis/ICodeInfoAnalyzer.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
-// SPDX-License-Identifier: LGPL-3.0-only
-
-namespace Nethermind.Evm.CodeAnalysis
-{
- public interface ICodeInfoAnalyzer
- {
- bool ValidateJump(int destination, bool isSubroutine);
- }
-}
diff --git a/src/Nethermind/Nethermind.Evm/CodeAnalysis/JumpDestinationAnalyzer.cs b/src/Nethermind/Nethermind.Evm/CodeAnalysis/JumpDestinationAnalyzer.cs
new file mode 100644
index 000000000000..89a8edbea980
--- /dev/null
+++ b/src/Nethermind/Nethermind.Evm/CodeAnalysis/JumpDestinationAnalyzer.cs
@@ -0,0 +1,130 @@
+// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
+// SPDX-License-Identifier: LGPL-3.0-only
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace Nethermind.Evm.CodeAnalysis
+{
+ public sealed class JumpDestinationAnalyzer
+ {
+ private const int PUSH1 = 0x60;
+ private const int PUSH32 = 0x7f;
+ private const int JUMPDEST = 0x5b;
+ private const int BEGINSUB = 0x5c;
+ private const int BitShiftPerInt32 = 5;
+
+ private int[]? _codeBitmap;
+ public byte[] MachineCode { get; set; }
+
+ public JumpDestinationAnalyzer(byte[] code)
+ {
+ MachineCode = code;
+ }
+
+ public bool ValidateJump(int destination, bool isSubroutine)
+ {
+ // Take array ref to local so Jit knows its size won't change in the method.
+ byte[] machineCode = MachineCode;
+ _codeBitmap ??= CreateJumpDestinationBitmap(machineCode);
+
+ var result = false;
+ // Cast to uint to change negative numbers to very high numbers
+ // Then do length check, this both reduces check by 1 and eliminates the bounds
+ // check from accessing the array.
+ if ((uint)destination < (uint)machineCode.Length &&
+ IsJumpDestination(_codeBitmap, destination))
+ {
+ // Store byte to int, as less expensive operations at word size
+ int codeByte = machineCode[destination];
+ if (isSubroutine)
+ {
+ result = codeByte == BEGINSUB;
+ }
+ else
+ {
+ result = codeByte == JUMPDEST;
+ }
+ }
+
+ return result;
+ }
+
+ ///
+ /// Used for conversion between different representations of bit array.
+ /// Returns (n + (32 - 1)) / 32, rearranged to avoid arithmetic overflow.
+ /// For example, in the bit to int case, the straightforward calc would
+ /// be (n + 31) / 32, but that would cause overflow. So instead it's
+ /// rearranged to ((n - 1) / 32) + 1.
+ /// Due to sign extension, we don't need to special case for n == 0, if we use
+ /// bitwise operations (since ((n - 1) >> 5) + 1 = 0).
+ /// This doesn't hold true for ((n - 1) / 32) + 1, which equals 1.
+ ///
+ /// Usage:
+ /// GetInt32ArrayLengthFromBitLength(77): returns how many ints must be
+ /// allocated to store 77 bits.
+ ///
+ ///
+ /// how many ints are required to store n bytes
+ private static int GetInt32ArrayLengthFromBitLength(int n)
+ {
+ return (int)((uint)(n - 1 + (1 << BitShiftPerInt32)) >> BitShiftPerInt32);
+ }
+
+ ///
+ /// Collects data locations in code.
+ /// An unset bit means the byte is an opcode, a set bit means it's data.
+ ///
+ private static int[] CreateJumpDestinationBitmap(byte[] code)
+ {
+ int[] bitvec = new int[GetInt32ArrayLengthFromBitLength(code.Length)];
+
+ int pc = 0;
+ while (true)
+ {
+ // Since we are using a non-standard for loop here
+ // Changing to while(true) plus below if check elides
+ // the bounds check from the array access
+ if ((uint)pc >= (uint)code.Length) break;
+ int instruction = code[pc];
+
+ if (instruction >= PUSH1 && instruction <= PUSH32)
+ {
+ pc += instruction - PUSH1 + 2;
+ }
+ else if (instruction == JUMPDEST || instruction == BEGINSUB)
+ {
+ Set(bitvec, pc);
+ pc++;
+ }
+ else
+ {
+ pc++;
+ }
+ }
+
+ return bitvec;
+ }
+
+ ///
+ /// Checks if the position is in a code segment.
+ ///
+ private static bool IsJumpDestination(int[] bitvec, int pos)
+ {
+ int vecIndex = pos >> BitShiftPerInt32;
+ // Check if in bounds, Jit will add slightly more expensive exception throwing check if we don't
+ if ((uint)vecIndex >= (uint)bitvec.Length) return false;
+
+ return (bitvec[vecIndex] & (1 << pos)) != 0;
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ private static void Set(int[] bitvec, int pos)
+ {
+ int vecIndex = pos >> BitShiftPerInt32;
+ Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(bitvec), vecIndex)
+ |= 1 << pos;
+ }
+ }
+}
diff --git a/src/Nethermind/Nethermind.Evm/CodeAnalysis/JumpdestAnalyzer.cs b/src/Nethermind/Nethermind.Evm/CodeAnalysis/JumpdestAnalyzer.cs
deleted file mode 100644
index 5753199dd4b3..000000000000
--- a/src/Nethermind/Nethermind.Evm/CodeAnalysis/JumpdestAnalyzer.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
-// SPDX-License-Identifier: LGPL-3.0-only
-
-using System.Collections;
-
-namespace Nethermind.Evm.CodeAnalysis
-{
- public class JumpdestAnalyzer : ICodeInfoAnalyzer
- {
- private byte[] MachineCode { get; set; }
-
- private BitArray? _validJumpDestinations;
- private BitArray? _validJumpSubDestinations;
-
- public JumpdestAnalyzer(byte[] code)
- {
- MachineCode = code;
- }
-
- public bool ValidateJump(int destination, bool isSubroutine)
- {
- if (_validJumpDestinations is null)
- {
- CalculateJumpDestinations();
- }
-
- if (destination < 0 || destination >= _validJumpDestinations.Length ||
- (isSubroutine ? !_validJumpSubDestinations.Get(destination) : !_validJumpDestinations.Get(destination)))
- {
- return false;
- }
-
- return true;
- }
-
- private void CalculateJumpDestinations()
- {
- _validJumpDestinations = new BitArray(MachineCode.Length);
- _validJumpSubDestinations = new BitArray(MachineCode.Length);
-
- int index = 0;
- while (index < MachineCode.Length)
- {
- byte instruction = MachineCode[index];
-
- // JUMPDEST
- if (instruction == 0x5b)
- {
- _validJumpDestinations.Set(index, true);
- }
- // BEGINSUB
- else if (instruction == 0x5c)
- {
- _validJumpSubDestinations.Set(index, true);
- }
-
- // instruction >= Instruction.PUSH1 && instruction <= Instruction.PUSH32
- if (instruction >= 0x60 && instruction <= 0x7f)
- {
- //index += instruction - Instruction.PUSH1 + 2;
- index += instruction - 0x60 + 2;
- }
- else
- {
- index++;
- }
- }
- }
- }
-}
diff --git a/src/Nethermind/Nethermind.Evm/Nethermind.Evm.csproj b/src/Nethermind/Nethermind.Evm/Nethermind.Evm.csproj
index 7933bea67e0a..8f6c31d198fb 100644
--- a/src/Nethermind/Nethermind.Evm/Nethermind.Evm.csproj
+++ b/src/Nethermind/Nethermind.Evm/Nethermind.Evm.csproj
@@ -6,12 +6,12 @@
+
+
-
-
diff --git a/src/Nethermind/Nethermind.Facade.Test/Nethermind.Facade.Test.csproj b/src/Nethermind/Nethermind.Facade.Test/Nethermind.Facade.Test.csproj
index 110733becfc1..2a8cd6d9c0ed 100644
--- a/src/Nethermind/Nethermind.Facade.Test/Nethermind.Facade.Test.csproj
+++ b/src/Nethermind/Nethermind.Facade.Test/Nethermind.Facade.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Facade/Nethermind.Facade.csproj b/src/Nethermind/Nethermind.Facade/Nethermind.Facade.csproj
index 9d3cf614a2b6..2965849390bd 100644
--- a/src/Nethermind/Nethermind.Facade/Nethermind.Facade.csproj
+++ b/src/Nethermind/Nethermind.Facade/Nethermind.Facade.csproj
@@ -8,9 +8,7 @@
-
-
diff --git a/src/Nethermind/Nethermind.HealthChecks.Test/Nethermind.HealthChecks.Test.csproj b/src/Nethermind/Nethermind.HealthChecks.Test/Nethermind.HealthChecks.Test.csproj
index be1fec5e5e96..4ea648506593 100644
--- a/src/Nethermind/Nethermind.HealthChecks.Test/Nethermind.HealthChecks.Test.csproj
+++ b/src/Nethermind/Nethermind.HealthChecks.Test/Nethermind.HealthChecks.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
@@ -25,6 +25,7 @@
+
diff --git a/src/Nethermind/Nethermind.HealthChecks/Nethermind.HealthChecks.csproj b/src/Nethermind/Nethermind.HealthChecks/Nethermind.HealthChecks.csproj
index ab4b87433a6f..304eb968ad05 100644
--- a/src/Nethermind/Nethermind.HealthChecks/Nethermind.HealthChecks.csproj
+++ b/src/Nethermind/Nethermind.HealthChecks/Nethermind.HealthChecks.csproj
@@ -3,10 +3,8 @@
-
-
diff --git a/src/Nethermind/Nethermind.Hive/Nethermind.Hive.csproj b/src/Nethermind/Nethermind.Hive/Nethermind.Hive.csproj
index b7f8e0e80d11..276b24d2554a 100644
--- a/src/Nethermind/Nethermind.Hive/Nethermind.Hive.csproj
+++ b/src/Nethermind/Nethermind.Hive/Nethermind.Hive.csproj
@@ -4,10 +4,6 @@
enable
-
-
-
-
diff --git a/src/Nethermind/Nethermind.Init.Snapshot/InitDatabaseSnapshot.cs b/src/Nethermind/Nethermind.Init.Snapshot/InitDatabaseSnapshot.cs
index 59427d94c000..4322f7554ed1 100644
--- a/src/Nethermind/Nethermind.Init.Snapshot/InitDatabaseSnapshot.cs
+++ b/src/Nethermind/Nethermind.Init.Snapshot/InitDatabaseSnapshot.cs
@@ -43,55 +43,76 @@ public override async Task Execute(CancellationToken cancellationToken)
private async Task InitDbFromSnapshot(CancellationToken cancellationToken)
{
- string dbPath = _api.Config().BaseDbPath;
- if (Path.Exists(dbPath))
- {
- if (_logger.IsInfo)
- _logger.Info($"Database already exists at {dbPath}. Skipping snapshot initialization.");
- return;
- }
ISnapshotConfig snapshotConfig = _api.Config();
+ string dbPath = _api.Config().BaseDbPath;
string snapshotUrl = snapshotConfig.DownloadUrl ??
throw new InvalidOperationException("Snapshot download URL is not configured");
-
string snapshotFileName = Path.Combine(snapshotConfig.SnapshotDirectory, snapshotConfig.SnapshotFileName);
- Directory.CreateDirectory(snapshotConfig.SnapshotDirectory);
- while (true)
+ if (Path.Exists(dbPath))
{
- try
+ if (GetCheckpoint(snapshotConfig) < Stage.Extracted)
{
- await DownloadSnapshotTo(snapshotUrl, snapshotFileName, cancellationToken);
- break;
+ if (_logger.IsInfo)
+ _logger.Info($"Extracting wasn't finished last time, restarting it. To interrupt press Ctrl^C");
+ // Wait few seconds if user wants to stop reinitialization
+ await Task.Delay(TimeSpan.FromSeconds(5), cancellationToken);
+ Directory.Delete(dbPath, true);
}
- catch (IOException e)
+ else
{
- if (_logger.IsError)
- _logger.Error($"Snapshot download failed. Retrying in 5 seconds. Error: {e}");
- await Task.Delay(TimeSpan.FromSeconds(5), cancellationToken);
+ if (_logger.IsInfo)
+ _logger.Info($"Database already exists at {dbPath}. Interrupting");
+
+ return;
}
- cancellationToken.ThrowIfCancellationRequested();
}
- if (snapshotConfig.Checksum is not null)
+ Directory.CreateDirectory(snapshotConfig.SnapshotDirectory);
+
+ if (GetCheckpoint(snapshotConfig) < Stage.Downloaded)
{
- bool isChecksumValid = await VerifyChecksum(snapshotFileName, snapshotConfig.Checksum, cancellationToken);
- if (!isChecksumValid)
+ while (true)
{
- if (_logger.IsError)
- _logger.Error("Snapshot checksum verification failed. Aborting, but will continue running.");
- return;
+ try
+ {
+ await DownloadSnapshotTo(snapshotUrl, snapshotFileName, cancellationToken);
+ break;
+ }
+ catch (IOException e)
+ {
+ if (_logger.IsError)
+ _logger.Error($"Snapshot download failed. Retrying in 5 seconds. Error: {e}");
+ await Task.Delay(TimeSpan.FromSeconds(5), cancellationToken);
+ }
+ cancellationToken.ThrowIfCancellationRequested();
}
-
- if (_logger.IsInfo)
- _logger.Info("Snapshot checksum verified.");
+ SetCheckpoint(snapshotConfig, Stage.Downloaded);
}
- else if (_logger.IsWarn)
- _logger.Warn("Snapshot checksum is not configured");
+ if (GetCheckpoint(snapshotConfig) < Stage.Verified)
+ {
+ if (snapshotConfig.Checksum is not null)
+ {
+ bool isChecksumValid = await VerifyChecksum(snapshotFileName, snapshotConfig.Checksum, cancellationToken);
+ if (!isChecksumValid)
+ {
+ if (_logger.IsError)
+ _logger.Error("Snapshot checksum verification failed. Aborting, but will continue running.");
+ return;
+ }
+
+ if (_logger.IsInfo)
+ _logger.Info("Snapshot checksum verified.");
+ }
+ else if (_logger.IsWarn)
+ _logger.Warn("Snapshot checksum is not configured");
+ SetCheckpoint(snapshotConfig, Stage.Verified);
+ }
await ExtractSnapshotTo(snapshotFileName, dbPath, cancellationToken);
+ SetCheckpoint(snapshotConfig, Stage.Extracted);
if (_logger.IsInfo)
{
@@ -100,6 +121,8 @@ private async Task InitDbFromSnapshot(CancellationToken cancellationToken)
}
File.Delete(snapshotFileName);
+
+ SetCheckpoint(snapshotConfig, Stage.End);
}
private async Task DownloadSnapshotTo(
@@ -187,4 +210,33 @@ private Task ExtractSnapshotTo(string snapshotPath, string dbPath, CancellationT
ZipFile.ExtractToDirectory(snapshotPath, dbPath);
}, cancellationToken);
+
+ private enum Stage
+ {
+ Start,
+ Downloaded,
+ Verified,
+ Extracted,
+ End,
+ }
+
+ private static void SetCheckpoint(ISnapshotConfig snapshotConfig, Stage stage)
+ {
+ string checkpointPath = Path.Combine(snapshotConfig.SnapshotDirectory, "checkpoint" + "_" + snapshotConfig.SnapshotFileName);
+ File.WriteAllText(checkpointPath, stage.ToString());
+ }
+
+ private static Stage GetCheckpoint(ISnapshotConfig snapshotConfig)
+ {
+ string checkpointPath = Path.Combine(snapshotConfig.SnapshotDirectory, "checkpoint" + "_" + snapshotConfig.SnapshotFileName);
+ if (File.Exists(checkpointPath))
+ {
+ string stringStage = File.ReadAllText(checkpointPath);
+ return (Stage)Enum.Parse(typeof(Stage), stringStage);
+ }
+ else
+ {
+ return Stage.Start;
+ }
+ }
}
diff --git a/src/Nethermind/Nethermind.Init/Steps/InitDatabase.cs b/src/Nethermind/Nethermind.Init/Steps/InitDatabase.cs
index 2a6887a9d298..ac00f249749e 100644
--- a/src/Nethermind/Nethermind.Init/Steps/InitDatabase.cs
+++ b/src/Nethermind/Nethermind.Init/Steps/InitDatabase.cs
@@ -50,7 +50,7 @@ public virtual async Task Execute(CancellationToken _)
bool useReceiptsDb = initConfig.StoreReceipts || syncConfig.DownloadReceiptsInFastSync;
bool useBlobsDb = txPoolConfig.BlobsSupport.IsPersistentStorage();
InitDbApi(initConfig, dbConfig, initConfig.StoreReceipts || syncConfig.DownloadReceiptsInFastSync);
- StandardDbInitializer dbInitializer = new(_api.DbProvider, _api.RocksDbFactory, _api.MemDbFactory, _api.FileSystem);
+ StandardDbInitializer dbInitializer = new(_api.DbProvider, _api.DbFactory, _api.FileSystem);
await dbInitializer.InitStandardDbsAsync(useReceiptsDb, useBlobsDb);
_api.BlobTxStorage = useBlobsDb
? new BlobTxStorage(_api.DbProvider!.BlobTransactionsDb)
@@ -68,28 +68,24 @@ private void InitDbApi(IInitConfig initConfig, IDbConfig dbConfig, bool storeRec
switch (initConfig.DiagnosticMode)
{
case DiagnosticMode.RpcDb:
- _api.DbProvider = new DbProvider(DbModeHint.Persisted);
+ _api.DbProvider = new DbProvider();
RocksDbFactory rocksDbFactory = new(dbConfig, _api.LogManager, Path.Combine(initConfig.BaseDbPath, "debug"));
- RpcDbFactory rpcDbFactory = new(new MemDbFactory(), rocksDbFactory, _api.EthereumJsonSerializer, new BasicJsonRpcClient(new Uri(initConfig.RpcDbUrl), _api.EthereumJsonSerializer, _api.LogManager), _api.LogManager);
- _api.RocksDbFactory = rpcDbFactory;
- _api.MemDbFactory = rpcDbFactory;
+ RpcDbFactory rpcDbFactory = new(rocksDbFactory, _api.EthereumJsonSerializer, new BasicJsonRpcClient(new Uri(initConfig.RpcDbUrl), _api.EthereumJsonSerializer, _api.LogManager), _api.LogManager);
+ _api.DbFactory = rpcDbFactory;
break;
case DiagnosticMode.ReadOnlyDb:
- DbProvider rocksDbProvider = new(DbModeHint.Persisted);
+ DbProvider rocksDbProvider = new();
_api.DbProvider = new ReadOnlyDbProvider(rocksDbProvider, storeReceipts); // ToDo storeReceipts as createInMemoryWriteStore - bug?
_api.DisposeStack.Push(rocksDbProvider);
- _api.RocksDbFactory = new RocksDbFactory(dbConfig, _api.LogManager, Path.Combine(initConfig.BaseDbPath, "debug"));
- _api.MemDbFactory = new MemDbFactory();
+ _api.DbFactory = new RocksDbFactory(dbConfig, _api.LogManager, Path.Combine(initConfig.BaseDbPath, "debug"));
break;
case DiagnosticMode.MemDb:
- _api.DbProvider = new DbProvider(DbModeHint.Mem);
- _api.RocksDbFactory = new RocksDbFactory(dbConfig, _api.LogManager, Path.Combine(initConfig.BaseDbPath, "debug"));
- _api.MemDbFactory = new MemDbFactory();
+ _api.DbProvider = new DbProvider();
+ _api.DbFactory = new MemDbFactory();
break;
default:
- _api.DbProvider = new DbProvider(DbModeHint.Persisted);
- _api.RocksDbFactory = new RocksDbFactory(dbConfig, _api.LogManager, initConfig.BaseDbPath);
- _api.MemDbFactory = new MemDbFactory();
+ _api.DbProvider = new DbProvider();
+ _api.DbFactory = new RocksDbFactory(dbConfig, _api.LogManager, initConfig.BaseDbPath);
break;
}
diff --git a/src/Nethermind/Nethermind.JsonRpc.Test/Nethermind.JsonRpc.Test.csproj b/src/Nethermind/Nethermind.JsonRpc.Test/Nethermind.JsonRpc.Test.csproj
index 6299240cf764..0d37deb6f08e 100644
--- a/src/Nethermind/Nethermind.JsonRpc.Test/Nethermind.JsonRpc.Test.csproj
+++ b/src/Nethermind/Nethermind.JsonRpc.Test/Nethermind.JsonRpc.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
@@ -20,8 +20,6 @@
-
-
{53D62515-72D1-4DEA-BC60-71BCC9C928E3}
diff --git a/src/Nethermind/Nethermind.JsonRpc.TraceStore/TraceStorePlugin.cs b/src/Nethermind/Nethermind.JsonRpc.TraceStore/TraceStorePlugin.cs
index dc91291486d4..18d551f0e721 100644
--- a/src/Nethermind/Nethermind.JsonRpc.TraceStore/TraceStorePlugin.cs
+++ b/src/Nethermind/Nethermind.JsonRpc.TraceStore/TraceStorePlugin.cs
@@ -41,7 +41,7 @@ public Task Init(INethermindApi nethermindApi)
_traceSerializer = new ParityLikeTraceSerializer(_logManager, _config.MaxDepth, _config.VerifySerialized);
// Setup DB
- _db = _api.RocksDbFactory!.CreateDb(new RocksDbSettings(DbName, DbName.ToLower()));
+ _db = _api.DbFactory!.CreateDb(new DbSettings(DbName, DbName.ToLower()));
_api.DbProvider!.RegisterDb(DbName, _db);
//Setup pruning if configured
diff --git a/src/Nethermind/Nethermind.JsonRpc/Modules/DebugModule/DebugBridge.cs b/src/Nethermind/Nethermind.JsonRpc/Modules/DebugModule/DebugBridge.cs
index c32e3b1f7cd3..fd5675bfe89c 100644
--- a/src/Nethermind/Nethermind.JsonRpc/Modules/DebugModule/DebugBridge.cs
+++ b/src/Nethermind/Nethermind.JsonRpc/Modules/DebugModule/DebugBridge.cs
@@ -102,9 +102,8 @@ public void InsertReceipts(BlockParameter blockParameter, TxReceipt[] txReceipts
}
Block block = searchResult.Object;
- ReceiptTrie receiptTrie = new(_specProvider.GetSpec(block.Header), txReceipts);
- receiptTrie.UpdateRootHash();
- if (block.ReceiptsRoot != receiptTrie.RootHash)
+ Hash256 receiptHash = ReceiptTrie.CalculateRoot(_specProvider.GetSpec(block.Header), txReceipts);
+ if (block.ReceiptsRoot != receiptHash)
{
throw new InvalidDataException("Receipts root mismatch");
}
diff --git a/src/Nethermind/Nethermind.JsonRpc/Modules/Proof/ProofRpcModule.cs b/src/Nethermind/Nethermind.JsonRpc/Modules/Proof/ProofRpcModule.cs
index c7995bf60bfb..8ac2281e2b3a 100644
--- a/src/Nethermind/Nethermind.JsonRpc/Modules/Proof/ProofRpcModule.cs
+++ b/src/Nethermind/Nethermind.JsonRpc/Modules/Proof/ProofRpcModule.cs
@@ -200,12 +200,12 @@ private byte[][] CollectHeaderBytes(ProofTxTracer proofTxTracer, BlockHeader tra
private static byte[][] BuildTxProofs(Transaction[] txs, IReleaseSpec releaseSpec, int index)
{
- return new TxTrie(txs, true).BuildProof(index);
+ return TxTrie.CalculateProof(txs, index);
}
private byte[][] BuildReceiptProofs(BlockHeader blockHeader, TxReceipt[] receipts, int index)
{
- return new ReceiptTrie(_specProvider.GetSpec(blockHeader), receipts, true).BuildProof(index);
+ return ReceiptTrie.CalculateReceiptProofs(_specProvider.GetSpec(blockHeader), receipts, index);
}
}
}
diff --git a/src/Nethermind/Nethermind.JsonRpc/Nethermind.JsonRpc.csproj b/src/Nethermind/Nethermind.JsonRpc/Nethermind.JsonRpc.csproj
index d3e2a06964dc..a7900f361f11 100644
--- a/src/Nethermind/Nethermind.JsonRpc/Nethermind.JsonRpc.csproj
+++ b/src/Nethermind/Nethermind.JsonRpc/Nethermind.JsonRpc.csproj
@@ -5,9 +5,7 @@
True
-
-
@@ -18,7 +16,6 @@
-
diff --git a/src/Nethermind/Nethermind.KeyStore.Test/Nethermind.KeyStore.Test.csproj b/src/Nethermind/Nethermind.KeyStore.Test/Nethermind.KeyStore.Test.csproj
index f042f676d499..bc2f923e03af 100644
--- a/src/Nethermind/Nethermind.KeyStore.Test/Nethermind.KeyStore.Test.csproj
+++ b/src/Nethermind/Nethermind.KeyStore.Test/Nethermind.KeyStore.Test.csproj
@@ -3,7 +3,7 @@
false
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Nethermind/Nethermind.Logging.NLog.Test/Nethermind.Logging.NLog.Test.csproj b/src/Nethermind/Nethermind.Logging.NLog.Test/Nethermind.Logging.NLog.Test.csproj
index 052255a2359b..fc5b9355a4e1 100644
--- a/src/Nethermind/Nethermind.Logging.NLog.Test/Nethermind.Logging.NLog.Test.csproj
+++ b/src/Nethermind/Nethermind.Logging.NLog.Test/Nethermind.Logging.NLog.Test.csproj
@@ -5,7 +5,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Nethermind/Nethermind.Logging/Nethermind.Logging.csproj b/src/Nethermind/Nethermind.Logging/Nethermind.Logging.csproj
index d1c07288e96a..6b512ec9245e 100644
--- a/src/Nethermind/Nethermind.Logging/Nethermind.Logging.csproj
+++ b/src/Nethermind/Nethermind.Logging/Nethermind.Logging.csproj
@@ -1,7 +1 @@
-
-
-
-
-
-
-
+
diff --git a/src/Nethermind/Nethermind.Merge.AuRa.Test/Nethermind.Merge.AuRa.Test.csproj b/src/Nethermind/Nethermind.Merge.AuRa.Test/Nethermind.Merge.AuRa.Test.csproj
index 854ed31bf86b..40bef72a3b75 100644
--- a/src/Nethermind/Nethermind.Merge.AuRa.Test/Nethermind.Merge.AuRa.Test.csproj
+++ b/src/Nethermind/Nethermind.Merge.AuRa.Test/Nethermind.Merge.AuRa.Test.csproj
@@ -18,6 +18,7 @@
+
diff --git a/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs b/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs
index 8ada5ce1885c..c0b711e81856 100644
--- a/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs
+++ b/src/Nethermind/Nethermind.Merge.Plugin.Test/EngineModuleTests.Setup.cs
@@ -20,7 +20,6 @@
using Nethermind.Core.Crypto;
using Nethermind.Core.Specs;
using Nethermind.Core.Test.Blockchain;
-using Nethermind.Core.Test.Builders;
using Nethermind.Core.Timers;
using Nethermind.Crypto;
using Nethermind.Db;
@@ -120,7 +119,8 @@ private IEngineRpcModule CreateEngineModule(MergeTestBlockchain chain, ISyncConf
chain.BeaconPivot,
peerRefresher,
chain.SpecProvider,
- chain.LogManager),
+ chain.LogManager,
+ new BlocksConfig().SecondsPerSlot),
new GetPayloadBodiesByHashV1Handler(chain.BlockTree, chain.LogManager),
new GetPayloadBodiesByRangeV1Handler(chain.BlockTree, chain.LogManager),
new ExchangeTransitionConfigurationV1Handler(chain.PoSSwitcher, chain.LogManager),
diff --git a/src/Nethermind/Nethermind.Merge.Plugin.Test/MergePluginTests.cs b/src/Nethermind/Nethermind.Merge.Plugin.Test/MergePluginTests.cs
index 33cc6895c781..60a524393780 100644
--- a/src/Nethermind/Nethermind.Merge.Plugin.Test/MergePluginTests.cs
+++ b/src/Nethermind/Nethermind.Merge.Plugin.Test/MergePluginTests.cs
@@ -43,7 +43,7 @@ public void Setup()
_context.ConfigProvider.GetConfig().Returns(miningConfig);
_context.ConfigProvider.GetConfig().Returns(jsonRpcConfig);
_context.BlockProcessingQueue?.IsEmpty.Returns(true);
- _context.MemDbFactory = new MemDbFactory();
+ _context.DbFactory = new MemDbFactory();
_context.BlockProducerEnvFactory = new BlockProducerEnvFactory(
_context.WorldStateManager!,
_context.BlockTree!,
diff --git a/src/Nethermind/Nethermind.Merge.Plugin.Test/Nethermind.Merge.Plugin.Test.csproj b/src/Nethermind/Nethermind.Merge.Plugin.Test/Nethermind.Merge.Plugin.Test.csproj
index 6a9b0e089054..b89fce1e2815 100644
--- a/src/Nethermind/Nethermind.Merge.Plugin.Test/Nethermind.Merge.Plugin.Test.csproj
+++ b/src/Nethermind/Nethermind.Merge.Plugin.Test/Nethermind.Merge.Plugin.Test.csproj
@@ -6,7 +6,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Merge.Plugin.Test/ProcessedTransactionsDbCleanerTests.cs b/src/Nethermind/Nethermind.Merge.Plugin.Test/ProcessedTransactionsDbCleanerTests.cs
index 8e0b754b1a82..ee17433c0375 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.Merge.Plugin/Data/ExecutionPayload.cs b/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayload.cs
index cedac0264f8c..5063d1dc0363 100644
--- a/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayload.cs
+++ b/src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayload.cs
@@ -145,7 +145,7 @@ public virtual bool TryGetBlock(out Block? block, UInt256? totalDifficulty = nul
Author = FeeRecipient,
IsPostMerge = true,
TotalDifficulty = totalDifficulty,
- TxRoot = new TxTrie(transactions).RootHash,
+ TxRoot = TxTrie.CalculateRoot(transactions),
WithdrawalsRoot = Withdrawals is null ? null : new WithdrawalTrie(Withdrawals).RootHash,
};
diff --git a/src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs b/src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs
index 2685c2981bb9..97f03b2199f2 100644
--- a/src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs
+++ b/src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs
@@ -46,6 +46,8 @@ public class ForkchoiceUpdatedHandler : IForkchoiceUpdatedHandler
private readonly ILogger _logger;
private readonly IPeerRefresher _peerRefresher;
private readonly ISpecProvider _specProvider;
+ private readonly bool _simulateBlockProduction;
+ private readonly ulong _secondsPerSlot;
public ForkchoiceUpdatedHandler(
IBlockTree blockTree,
@@ -59,7 +61,9 @@ public ForkchoiceUpdatedHandler(
IBeaconPivot beaconPivot,
IPeerRefresher peerRefresher,
ISpecProvider specProvider,
- ILogManager logManager)
+ ILogManager logManager,
+ ulong secondsPerSlot,
+ bool simulateBlockProduction = false)
{
_blockTree = blockTree ?? throw new ArgumentNullException(nameof(blockTree));
_manualBlockFinalizationManager = manualBlockFinalizationManager ?? throw new ArgumentNullException(nameof(manualBlockFinalizationManager));
@@ -72,6 +76,8 @@ public ForkchoiceUpdatedHandler(
_beaconPivot = beaconPivot;
_peerRefresher = peerRefresher;
_specProvider = specProvider;
+ _simulateBlockProduction = simulateBlockProduction;
+ _secondsPerSlot = secondsPerSlot;
_logger = logManager.GetClassLogger();
}
@@ -247,6 +253,19 @@ public Task> Handle(ForkchoiceStateV1 f
private ResultWrapper StartBuildingPayload(Block newHeadBlock, ForkchoiceStateV1 forkchoiceState, PayloadAttributes? payloadAttributes)
{
string? payloadId = null;
+
+ if (_simulateBlockProduction)
+ {
+ payloadAttributes ??= new PayloadAttributes()
+ {
+ Timestamp = newHeadBlock.Timestamp + _secondsPerSlot,
+ ParentBeaconBlockRoot = newHeadBlock.ParentHash, // it doesn't matter
+ PrevRandao = newHeadBlock.ParentHash ?? Keccak.Zero, // it doesn't matter
+ Withdrawals = Array.Empty(),
+ SuggestedFeeRecipient = Address.Zero
+ };
+ }
+
if (payloadAttributes is not null)
{
if (newHeadBlock.Timestamp >= payloadAttributes.Timestamp)
diff --git a/src/Nethermind/Nethermind.Merge.Plugin/IMergeConfig.cs b/src/Nethermind/Nethermind.Merge.Plugin/IMergeConfig.cs
index 36c3dcaaa38a..08e92c3c6a79 100644
--- a/src/Nethermind/Nethermind.Merge.Plugin/IMergeConfig.cs
+++ b/src/Nethermind/Nethermind.Merge.Plugin/IMergeConfig.cs
@@ -65,4 +65,7 @@ Request the garbage collector (GC) to release the process memory.
[ConfigItem(Description = "The timeout, in seconds, for the `engine_newPayload` method.", DefaultValue = "7", HiddenFromDocs = true)]
public int NewPayloadTimeout { get; }
+
+ [ConfigItem(Description = "[TECHNICAL] Simulate block production for every possible slot. Just for stress-testing purposes.", DefaultValue = "false", HiddenFromDocs = true)]
+ bool SimulateBlockProduction { get; set; }
}
diff --git a/src/Nethermind/Nethermind.Merge.Plugin/MergeConfig.cs b/src/Nethermind/Nethermind.Merge.Plugin/MergeConfig.cs
index e8a6e9f17b11..36b1226d40f7 100644
--- a/src/Nethermind/Nethermind.Merge.Plugin/MergeConfig.cs
+++ b/src/Nethermind/Nethermind.Merge.Plugin/MergeConfig.cs
@@ -32,5 +32,7 @@ public class MergeConfig : IMergeConfig
public int CollectionsPerDecommit { get; set; } = 75;
public int NewPayloadTimeout { get; set; } = 7;
+
+ public bool SimulateBlockProduction { get; set; } = false;
}
}
diff --git a/src/Nethermind/Nethermind.Merge.Plugin/MergePlugin.cs b/src/Nethermind/Nethermind.Merge.Plugin/MergePlugin.cs
index 7f9073117038..2c27ba361a6e 100644
--- a/src/Nethermind/Nethermind.Merge.Plugin/MergePlugin.cs
+++ b/src/Nethermind/Nethermind.Merge.Plugin/MergePlugin.cs
@@ -29,7 +29,6 @@
using Nethermind.Merge.Plugin.InvalidChainTracker;
using Nethermind.Merge.Plugin.Synchronization;
using Nethermind.Synchronization.ParallelSync;
-using Nethermind.Trie.Pruning;
using Nethermind.TxPool;
namespace Nethermind.Merge.Plugin;
@@ -337,7 +336,9 @@ public Task InitRpcModules()
_beaconPivot,
_peerRefresher,
_api.SpecProvider,
- _api.LogManager),
+ _api.LogManager,
+ _api.Config().SecondsPerSlot,
+ _api.Config().SimulateBlockProduction),
new GetPayloadBodiesByHashV1Handler(_api.BlockTree, _api.LogManager),
new GetPayloadBodiesByRangeV1Handler(_api.BlockTree, _api.LogManager),
new ExchangeTransitionConfigurationV1Handler(_poSSwitcher, _api.LogManager),
diff --git a/src/Nethermind/Nethermind.Merge.Plugin/Synchronization/PivotUpdator.cs b/src/Nethermind/Nethermind.Merge.Plugin/Synchronization/PivotUpdator.cs
index 65d6b1549035..7316b51658b6 100644
--- a/src/Nethermind/Nethermind.Merge.Plugin/Synchronization/PivotUpdator.cs
+++ b/src/Nethermind/Nethermind.Merge.Plugin/Synchronization/PivotUpdator.cs
@@ -234,7 +234,7 @@ private bool TryOverwritePivot(Hash256 finalizedBlockHash, long finalizedBlockNu
RlpStream pivotData = new(38); //1 byte (prefix) + 4 bytes (long) + 1 byte (prefix) + 32 bytes (Keccak)
pivotData.Encode(finalizedBlockNumber);
pivotData.Encode(finalizedBlockHash);
- _metadataDb.Set(MetadataDbKeys.UpdatedPivotData, pivotData.Data!);
+ _metadataDb.Set(MetadataDbKeys.UpdatedPivotData, pivotData.Data.ToArray()!);
if (_logger.IsInfo) _logger.Info($"New pivot block has been set based on ForkChoiceUpdate from CL. Pivot block number: {finalizedBlockNumber}, hash: {finalizedBlockHash}");
return true;
diff --git a/src/Nethermind/Nethermind.Mining.Test/Nethermind.Mining.Test.csproj b/src/Nethermind/Nethermind.Mining.Test/Nethermind.Mining.Test.csproj
index 055f40ae8d9f..2238d71fe1c5 100644
--- a/src/Nethermind/Nethermind.Mining.Test/Nethermind.Mining.Test.csproj
+++ b/src/Nethermind/Nethermind.Mining.Test/Nethermind.Mining.Test.csproj
@@ -3,7 +3,7 @@
false
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Monitoring/Config/IMetricsConfig.cs b/src/Nethermind/Nethermind.Monitoring/Config/IMetricsConfig.cs
index 27510f0ebc84..e568530f7fd6 100644
--- a/src/Nethermind/Nethermind.Monitoring/Config/IMetricsConfig.cs
+++ b/src/Nethermind/Nethermind.Monitoring/Config/IMetricsConfig.cs
@@ -8,6 +8,9 @@ namespace Nethermind.Monitoring.Config;
[ConfigCategory(Description = "Configuration of the metrics provided by a Nethermind node for both, the Prometheus and the dotnet-counters.")]
public interface IMetricsConfig : IConfig
{
+ [ConfigItem(Description = "The ip at which to expose Prometheus metrics.", DefaultValue = "127.0.0.1")]
+ string ExposeHost { get; }
+
[ConfigItem(Description = "The port to expose Prometheus metrics at.", DefaultValue = "null")]
int? ExposePort { get; }
diff --git a/src/Nethermind/Nethermind.Monitoring/Config/MetricsConfig.cs b/src/Nethermind/Nethermind.Monitoring/Config/MetricsConfig.cs
index ed59ad88e58f..50977531c5e9 100644
--- a/src/Nethermind/Nethermind.Monitoring/Config/MetricsConfig.cs
+++ b/src/Nethermind/Nethermind.Monitoring/Config/MetricsConfig.cs
@@ -5,6 +5,7 @@ namespace Nethermind.Monitoring.Config
{
public class MetricsConfig : IMetricsConfig
{
+ public string ExposeHost { get; set; } = "127.0.0.1";
public int? ExposePort { get; set; } = null;
public bool Enabled { get; set; } = false;
public bool CountersEnabled { get; set; } = false;
diff --git a/src/Nethermind/Nethermind.Monitoring/MonitoringService.cs b/src/Nethermind/Nethermind.Monitoring/MonitoringService.cs
index 08203506e878..e40540dcfbe2 100644
--- a/src/Nethermind/Nethermind.Monitoring/MonitoringService.cs
+++ b/src/Nethermind/Nethermind.Monitoring/MonitoringService.cs
@@ -19,6 +19,7 @@ public class MonitoringService : IMonitoringService
private readonly ILogger _logger;
private readonly Options _options;
+ private readonly string _exposeHost;
private readonly int? _exposePort;
private readonly string _nodeName;
private readonly bool _pushEnabled;
@@ -29,12 +30,14 @@ public MonitoringService(IMetricsController metricsController, IMetricsConfig me
{
_metricsController = metricsController ?? throw new ArgumentNullException(nameof(metricsController));
+ string exposeHost = metricsConfig.ExposeHost;
int? exposePort = metricsConfig.ExposePort;
string nodeName = metricsConfig.NodeName;
string pushGatewayUrl = metricsConfig.PushGatewayUrl;
bool pushEnabled = metricsConfig.Enabled;
int intervalSeconds = metricsConfig.IntervalSeconds;
+ _exposeHost = exposeHost;
_exposePort = exposePort;
_nodeName = string.IsNullOrWhiteSpace(nodeName)
? throw new ArgumentNullException(nameof(nodeName))
@@ -81,7 +84,7 @@ public async Task StartAsync()
}
if (_exposePort is not null)
{
- new NethermindKestrelMetricServer(_exposePort.Value).Start();
+ new NethermindKestrelMetricServer(_exposeHost, _exposePort.Value).Start();
}
await Task.Factory.StartNew(() => _metricsController.StartUpdating(), TaskCreationOptions.LongRunning);
if (_logger.IsInfo) _logger.Info($"Started monitoring for the group: {_options.Group}, instance: {_options.Instance}");
diff --git a/src/Nethermind/Nethermind.Monitoring/Nethermind.Monitoring.csproj b/src/Nethermind/Nethermind.Monitoring/Nethermind.Monitoring.csproj
index 015cce13ca3e..82ce272b94dc 100644
--- a/src/Nethermind/Nethermind.Monitoring/Nethermind.Monitoring.csproj
+++ b/src/Nethermind/Nethermind.Monitoring/Nethermind.Monitoring.csproj
@@ -1,11 +1,7 @@
-
-
-
-
diff --git a/src/Nethermind/Nethermind.Network.Enr/Nethermind.Network.Enr.csproj b/src/Nethermind/Nethermind.Network.Enr/Nethermind.Network.Enr.csproj
index 817c2373bbd3..24fcd5b1e3dc 100644
--- a/src/Nethermind/Nethermind.Network.Enr/Nethermind.Network.Enr.csproj
+++ b/src/Nethermind/Nethermind.Network.Enr/Nethermind.Network.Enr.csproj
@@ -5,10 +5,6 @@
enable
-
-
-
-
diff --git a/src/Nethermind/Nethermind.Network.Enr/NodeRecord.cs b/src/Nethermind/Nethermind.Network.Enr/NodeRecord.cs
index b10cd7daddec..dd2acffca2be 100644
--- a/src/Nethermind/Nethermind.Network.Enr/NodeRecord.cs
+++ b/src/Nethermind/Nethermind.Network.Enr/NodeRecord.cs
@@ -201,7 +201,7 @@ public string GetHex()
int totalLength = Rlp.LengthOfSequence(contentLength);
RlpStream rlpStream = new(totalLength);
Encode(rlpStream);
- return rlpStream.Data!.ToHexString();
+ return rlpStream.Data.AsSpan().ToHexString();
}
///
diff --git a/src/Nethermind/Nethermind.Network.Enr/NodeRecordSigner.cs b/src/Nethermind/Nethermind.Network.Enr/NodeRecordSigner.cs
index 6c70665ea907..4c10b4a84ac1 100644
--- a/src/Nethermind/Nethermind.Network.Enr/NodeRecordSigner.cs
+++ b/src/Nethermind/Nethermind.Network.Enr/NodeRecordSigner.cs
@@ -105,7 +105,7 @@ public NodeRecord Deserialize(RlpStream rlpStream)
originalContentStream.StartSequence(noSigContentLength);
originalContentStream.Write(rlpStream.Read(noSigContentLength));
rlpStream.Position = startPosition;
- nodeRecord.OriginalContentRlp = originalContentStream.Data!;
+ nodeRecord.OriginalContentRlp = originalContentStream.Data.ToArray()!;
}
nodeRecord.EnrSequence = enrSequence;
diff --git a/src/Nethermind/Nethermind.Network.Stats/Nethermind.Network.Stats.csproj b/src/Nethermind/Nethermind.Network.Stats/Nethermind.Network.Stats.csproj
index 13ecd7773825..92b83b4fb5b1 100644
--- a/src/Nethermind/Nethermind.Network.Stats/Nethermind.Network.Stats.csproj
+++ b/src/Nethermind/Nethermind.Network.Stats/Nethermind.Network.Stats.csproj
@@ -7,12 +7,7 @@
-
-
-
-
-
diff --git a/src/Nethermind/Nethermind.Network.Test/Nethermind.Network.Test.csproj b/src/Nethermind/Nethermind.Network.Test/Nethermind.Network.Test.csproj
index 89aace460fe2..53c6755be930 100644
--- a/src/Nethermind/Nethermind.Network.Test/Nethermind.Network.Test.csproj
+++ b/src/Nethermind/Nethermind.Network.Test/Nethermind.Network.Test.csproj
@@ -28,13 +28,12 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
-
-
+
@@ -43,7 +42,6 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
diff --git a/src/Nethermind/Nethermind.Network/Metrics.cs b/src/Nethermind/Nethermind.Network/Metrics.cs
index 97f04647899e..efbfda3bd1f4 100644
--- a/src/Nethermind/Nethermind.Network/Metrics.cs
+++ b/src/Nethermind/Nethermind.Network/Metrics.cs
@@ -33,7 +33,7 @@ public static class Metrics
public static long Handshakes { get; set; }
[CounterMetric]
- [Description("Number of devp2p handshke timeouts")]
+ [Description("Number of devp2p handshake timeouts")]
public static long HandshakeTimeouts { get; set; }
[CounterMetric]
diff --git a/src/Nethermind/Nethermind.Network/Nethermind.Network.csproj b/src/Nethermind/Nethermind.Network/Nethermind.Network.csproj
index 3a78d5c1a68d..76c0c785d8ca 100644
--- a/src/Nethermind/Nethermind.Network/Nethermind.Network.csproj
+++ b/src/Nethermind/Nethermind.Network/Nethermind.Network.csproj
@@ -7,19 +7,14 @@
-
-
-
-
-
diff --git a/src/Nethermind/Nethermind.Network/NetworkNodeDecoder.cs b/src/Nethermind/Nethermind.Network/NetworkNodeDecoder.cs
index 315b17e97911..eb252b50e035 100644
--- a/src/Nethermind/Nethermind.Network/NetworkNodeDecoder.cs
+++ b/src/Nethermind/Nethermind.Network/NetworkNodeDecoder.cs
@@ -60,7 +60,7 @@ public Rlp Encode(NetworkNode item, RlpBehaviors rlpBehaviors = RlpBehaviors.Non
stream.Encode(item.Port);
stream.Encode(string.Empty);
stream.Encode(item.Reputation);
- return new Rlp(stream.Data);
+ return new Rlp(stream.Data.ToArray());
}
public void Encode(MemoryStream stream, NetworkNode item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
diff --git a/src/Nethermind/Nethermind.Network/P2P/Subprotocols/Snap/Messages/StorageRangesMessageSerializer.cs b/src/Nethermind/Nethermind.Network/P2P/Subprotocols/Snap/Messages/StorageRangesMessageSerializer.cs
index ea7f1ddb7e89..3305091410dd 100644
--- a/src/Nethermind/Nethermind.Network/P2P/Subprotocols/Snap/Messages/StorageRangesMessageSerializer.cs
+++ b/src/Nethermind/Nethermind.Network/P2P/Subprotocols/Snap/Messages/StorageRangesMessageSerializer.cs
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only
+using System;
using DotNetty.Buffers;
using Nethermind.Core.Crypto;
using Nethermind.Serialization.Rlp;
@@ -8,8 +9,18 @@
namespace Nethermind.Network.P2P.Subprotocols.Snap.Messages
{
- public class StorageRangesMessageSerializer : IZeroMessageSerializer
+ public sealed class StorageRangesMessageSerializer : IZeroMessageSerializer
{
+ private readonly Func _decodeSlot;
+ private readonly Func _decodeSlotArray;
+
+ public StorageRangesMessageSerializer()
+ {
+ // Capture closures once
+ _decodeSlot = DecodeSlot;
+ _decodeSlotArray = s => s.DecodeArray(_decodeSlot);
+ }
+
public void Serialize(IByteBuffer byteBuffer, StorageRangeMessage message)
{
(int contentLength, int allSlotsLength, int[] accountSlotsLengths, int proofsLength) = CalculateLengths(message);
@@ -71,7 +82,7 @@ public StorageRangeMessage Deserialize(IByteBuffer byteBuffer)
stream.ReadSequenceLength();
message.RequestId = stream.DecodeLong();
- message.Slots = stream.DecodeArray(s => s.DecodeArray(DecodeSlot));
+ message.Slots = stream.DecodeArray(_decodeSlotArray);
message.Proofs = stream.DecodeArray(s => s.DecodeByteArray());
return message;
diff --git a/src/Nethermind/Nethermind.Optimism/OptimismPlugin.cs b/src/Nethermind/Nethermind.Optimism/OptimismPlugin.cs
index eba862a32fb7..010d69db61e7 100644
--- a/src/Nethermind/Nethermind.Optimism/OptimismPlugin.cs
+++ b/src/Nethermind/Nethermind.Optimism/OptimismPlugin.cs
@@ -13,7 +13,6 @@
using Nethermind.Merge.Plugin.GC;
using Nethermind.Merge.Plugin.Handlers;
using Nethermind.JsonRpc.Modules;
-using Nethermind.Core;
using Nethermind.Config;
using Nethermind.Logging;
using Nethermind.Blockchain.Synchronization;
@@ -21,13 +20,10 @@
using Nethermind.Blockchain;
using Nethermind.Consensus.Rewards;
using Nethermind.Merge.Plugin.Synchronization;
-using Nethermind.Synchronization.Reporting;
using Nethermind.Synchronization.ParallelSync;
-using System.Threading;
using Nethermind.HealthChecks;
using Nethermind.Serialization.Json;
using Nethermind.Specs.ChainSpecStyle;
-using Nethermind.Trie.Pruning;
namespace Nethermind.Optimism;
@@ -246,7 +242,9 @@ public async Task InitRpcModules()
_beaconPivot,
_peerRefresher,
_api.SpecProvider,
- _api.LogManager),
+ _api.LogManager,
+ _api.Config().SecondsPerSlot,
+ _api.Config().SimulateBlockProduction),
new GetPayloadBodiesByHashV1Handler(_api.BlockTree, _api.LogManager),
new GetPayloadBodiesByRangeV1Handler(_api.BlockTree, _api.LogManager),
new ExchangeTransitionConfigurationV1Handler(_api.PoSSwitcher, _api.LogManager),
diff --git a/src/Nethermind/Nethermind.Runner.Test/ConfigFilesTests.cs b/src/Nethermind/Nethermind.Runner.Test/ConfigFilesTests.cs
index f6ed7ececdd2..6d1436f8a9eb 100644
--- a/src/Nethermind/Nethermind.Runner.Test/ConfigFilesTests.cs
+++ b/src/Nethermind/Nethermind.Runner.Test/ConfigFilesTests.cs
@@ -20,6 +20,7 @@
using Nethermind.Db.Rocks.Config;
using Nethermind.Init;
using Nethermind.Logging;
+using Nethermind.Merge.Plugin;
using Nethermind.TxPool;
using NUnit.Framework;
@@ -326,6 +327,12 @@ public void Basic_configs_are_as_expected(string configWildcard, bool isProducti
Test(configWildcard, c => c.LogFileName, (cf, p) => p.Should().Be(cf.Replace("cfg", "logs.txt"), cf));
}
+ [TestCase("*")]
+ public void Simulating_block_production_on_every_slot_is_always_disabled(string configWildcard)
+ {
+ Test(configWildcard, c => c.SimulateBlockProduction, false);
+ }
+
[TestCase("goerli", BlobsSupportMode.StorageWithReorgs)]
[TestCase("^goerli", BlobsSupportMode.Disabled)]
[TestCase("sepolia", BlobsSupportMode.Disabled)]
diff --git a/src/Nethermind/Nethermind.Runner.Test/Nethermind.Runner.Test.csproj b/src/Nethermind/Nethermind.Runner.Test/Nethermind.Runner.Test.csproj
index bcb68a227aef..26b52154cab5 100644
--- a/src/Nethermind/Nethermind.Runner.Test/Nethermind.Runner.Test.csproj
+++ b/src/Nethermind/Nethermind.Runner.Test/Nethermind.Runner.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs b/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs
index 41ea95377d1c..7937a45a8e35 100644
--- a/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs
+++ b/src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs
@@ -59,7 +59,7 @@ public void ConfigureServices(IServiceCollection services)
options.ConfigureHttpsDefaults(co => co.SslProtocols |= SslProtocols.Tls13);
});
Bootstrap.Instance.RegisterJsonRpcServices(services);
- services.AddControllers();
+
string corsOrigins = Environment.GetEnvironmentVariable("NETHERMIND_CORS_ORIGINS") ?? "*";
services.AddCors(c => c.AddPolicy("Cors",
p => p.AllowAnyMethod().AllowAnyHeader().WithOrigins(corsOrigins)));
diff --git a/src/Nethermind/Nethermind.Runner/Nethermind.Runner.csproj b/src/Nethermind/Nethermind.Runner/Nethermind.Runner.csproj
index 77757cff5736..23463ef6ad5e 100644
--- a/src/Nethermind/Nethermind.Runner/Nethermind.Runner.csproj
+++ b/src/Nethermind/Nethermind.Runner/Nethermind.Runner.csproj
@@ -11,8 +11,6 @@
true
true
1
-
- $(NoWarn);AD0001
@@ -22,22 +20,11 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -47,30 +34,29 @@
-
+
+
+
-
+
+
-
-
-
+
+
+
+
-
-
-
-
-
diff --git a/src/Nethermind/Nethermind.Serialization.Json/Nethermind.Serialization.Json.csproj b/src/Nethermind/Nethermind.Serialization.Json/Nethermind.Serialization.Json.csproj
index ee58e74ddc30..28c5578b12f6 100644
--- a/src/Nethermind/Nethermind.Serialization.Json/Nethermind.Serialization.Json.csproj
+++ b/src/Nethermind/Nethermind.Serialization.Json/Nethermind.Serialization.Json.csproj
@@ -6,7 +6,6 @@
-
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/AccountDecoder.cs b/src/Nethermind/Nethermind.Serialization.Rlp/AccountDecoder.cs
index a1939a0a126c..05a119f53660 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/AccountDecoder.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/AccountDecoder.cs
@@ -82,7 +82,7 @@ public Rlp Encode(Account? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
Encode(item, rlpStream, contentLength);
- return new Rlp(rlpStream.Data);
+ return new Rlp(rlpStream.Data.ToArray());
}
public void Encode(Account account, RlpStream rlpStream, int? contentLength = null)
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/BlockDecoder.cs b/src/Nethermind/Nethermind.Serialization.Rlp/BlockDecoder.cs
index ef76caa47445..54c26d93d2ca 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/BlockDecoder.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/BlockDecoder.cs
@@ -224,7 +224,7 @@ public Rlp Encode(Block? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
RlpStream rlpStream = new(GetLength(item, rlpBehaviors));
Encode(rlpStream, item, rlpBehaviors);
- return new(rlpStream.Data);
+ return new(rlpStream.Data.ToArray());
}
public void Encode(RlpStream stream, Block? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/ByteArrayExtensions.cs b/src/Nethermind/Nethermind.Serialization.Rlp/ByteArrayExtensions.cs
index aff78b367c51..62a7078448c0 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/ByteArrayExtensions.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/ByteArrayExtensions.cs
@@ -13,9 +13,9 @@ public static RlpStream AsRlpStream(this byte[]? bytes)
return new(bytes ?? Array.Empty());
}
- public static RlpStream AsRlpStream(this CappedArray bytes)
+ public static RlpStream AsRlpStream(in this CappedArray bytes)
{
- return new(bytes.Array ?? Array.Empty());
+ return new(in bytes.IsNotNull ? ref bytes : ref CappedArray.Empty);
}
public static Rlp.ValueDecoderContext AsRlpValueContext(this byte[]? bytes)
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/CompactReceiptStorageDecoder.cs b/src/Nethermind/Nethermind.Serialization.Rlp/CompactReceiptStorageDecoder.cs
index 514ea3b8822d..beb6af45701d 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/CompactReceiptStorageDecoder.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/CompactReceiptStorageDecoder.cs
@@ -167,7 +167,7 @@ public Rlp Encode(TxReceipt item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
{
RlpStream rlpStream = new(GetLength(item, rlpBehaviors));
Encode(rlpStream, item, rlpBehaviors);
- return new Rlp(rlpStream.Data);
+ return new Rlp(rlpStream.Data.ToArray());
}
public void Encode(RlpStream rlpStream, TxReceipt? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/HeaderDecoder.cs b/src/Nethermind/Nethermind.Serialization.Rlp/HeaderDecoder.cs
index 0cbc8dd00209..80e1a500525c 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/HeaderDecoder.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/HeaderDecoder.cs
@@ -257,7 +257,7 @@ public Rlp Encode(BlockHeader? item, RlpBehaviors rlpBehaviors = RlpBehaviors.No
RlpStream rlpStream = new(GetLength(item, rlpBehaviors));
Encode(rlpStream, item, rlpBehaviors);
- return new Rlp(rlpStream.Data);
+ return new Rlp(rlpStream.Data.ToArray());
}
private static int GetContentLength(BlockHeader? item, RlpBehaviors rlpBehaviors)
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/LogEntryDecoder.cs b/src/Nethermind/Nethermind.Serialization.Rlp/LogEntryDecoder.cs
index b3cb93bac9bf..bb98f193cbae 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/LogEntryDecoder.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/LogEntryDecoder.cs
@@ -63,7 +63,7 @@ public Rlp Encode(LogEntry? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
RlpStream rlpStream = new(GetLength(item, rlpBehaviors));
Encode(rlpStream, item, rlpBehaviors);
- return new Rlp(rlpStream.Data);
+ return new Rlp(rlpStream.Data.ToArray());
}
public void Encode(RlpStream rlpStream, LogEntry? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/ReceiptMessageDecoder.cs b/src/Nethermind/Nethermind.Serialization.Rlp/ReceiptMessageDecoder.cs
index ce58b0c0c959..f00b749e1667 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/ReceiptMessageDecoder.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/ReceiptMessageDecoder.cs
@@ -138,7 +138,7 @@ public byte[] EncodeNew(TxReceipt? item, RlpBehaviors rlpBehaviors = RlpBehavior
int length = GetLength(item, rlpBehaviors);
RlpStream stream = new(length);
Encode(stream, item, rlpBehaviors);
- return stream.Data;
+ return stream.Data.ToArray();
}
public void Encode(RlpStream rlpStream, TxReceipt item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/ReceiptStorageDecoder.cs b/src/Nethermind/Nethermind.Serialization.Rlp/ReceiptStorageDecoder.cs
index 0aa910bcfdb2..cbbcf2343311 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/ReceiptStorageDecoder.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/ReceiptStorageDecoder.cs
@@ -175,7 +175,7 @@ public Rlp Encode(TxReceipt item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
{
RlpStream rlpStream = new(GetLength(item, rlpBehaviors));
Encode(rlpStream, item, rlpBehaviors);
- return new Rlp(rlpStream.Data);
+ return new Rlp(rlpStream.Data.ToArray());
}
public void Encode(RlpStream rlpStream, TxReceipt? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/Rlp.cs b/src/Nethermind/Nethermind.Serialization.Rlp/Rlp.cs
index 545402ae7808..ecb8d8f931c0 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/Rlp.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/Rlp.cs
@@ -183,7 +183,7 @@ public static Rlp Encode(T item, RlpBehaviors behaviors = RlpBehaviors.None)
if (item is Rlp rlp)
{
RlpStream stream = new(LengthOfSequence(rlp.Length));
- return new(stream.Data);
+ return new(stream.Data.ToArray());
}
IRlpStreamDecoder? rlpStreamDecoder = GetStreamDecoder();
@@ -192,7 +192,7 @@ public static Rlp Encode(T item, RlpBehaviors behaviors = RlpBehaviors.None)
int totalLength = rlpStreamDecoder.GetLength(item, behaviors);
RlpStream stream = new(totalLength);
rlpStreamDecoder.Encode(stream, item, behaviors);
- return new Rlp(stream.Data);
+ return new Rlp(stream.Data.ToArray());
}
IRlpObjectDecoder? rlpDecoder = GetObjectDecoder();
@@ -212,7 +212,7 @@ public static Rlp Encode(T[]? items, RlpBehaviors behaviors = RlpBehaviors.No
int totalLength = rlpStreamDecoder.GetLength(items, behaviors);
RlpStream stream = new(totalLength);
rlpStreamDecoder.Encode(stream, items, behaviors);
- return new Rlp(stream.Data);
+ return new Rlp(stream.Data.ToArray());
}
IRlpObjectDecoder rlpDecoder = GetObjectDecoder();
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/RlpDecoderExtensions.cs b/src/Nethermind/Nethermind.Serialization.Rlp/RlpDecoderExtensions.cs
index 83edad25ef0a..f2ad9ddbbb0e 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/RlpDecoderExtensions.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/RlpDecoderExtensions.cs
@@ -9,6 +9,8 @@ namespace Nethermind.Serialization.Rlp
{
public static class RlpDecoderExtensions
{
+ private readonly static CappedArray[] s_intPreEncodes = CreatePreEncodes();
+
public static T[] DecodeArray(this IRlpStreamDecoder decoder, RlpStream rlpStream, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
{
int checkPosition = rlpStream.ReadSequenceLength() + rlpStream.Position;
@@ -104,6 +106,12 @@ public static CappedArray EncodeToCappedArray(this IRlpStreamDecoder
public static CappedArray EncodeToCappedArray(this int item, ICappedArrayPool? bufferPool = null)
{
+ CappedArray[] cache = s_intPreEncodes;
+ if ((uint)item < (uint)cache.Length)
+ {
+ return cache[item];
+ }
+
CappedArray buffer = bufferPool.SafeRentBuffer(Rlp.LengthOf(item));
buffer.AsRlpStream().Encode(item);
return buffer;
@@ -175,5 +183,21 @@ public static int GetLength(this IRlpStreamDecoder decoder, T?[]? items, R
return Rlp.LengthOfSequence(decoder.GetContentLength(items, behaviors));
}
+ private static CappedArray[] CreatePreEncodes()
+ {
+ const int MaxCache = 1024;
+
+ CappedArray[] cache = new CappedArray[MaxCache];
+
+ for (int i = 0; i < cache.Length; i++)
+ {
+ int size = Rlp.LengthOf(i);
+ CappedArray buffer = new CappedArray(new byte[size]);
+ buffer.AsRlpStream().Encode(i);
+ cache[i] = buffer;
+ }
+
+ return cache;
+ }
}
}
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/RlpStream.cs b/src/Nethermind/Nethermind.Serialization.Rlp/RlpStream.cs
index 82973d77470b..021f3e00e4e2 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/RlpStream.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/RlpStream.cs
@@ -10,6 +10,7 @@
using System.Runtime.InteropServices;
using System.Text;
using Nethermind.Core;
+using Nethermind.Core.Buffers;
using Nethermind.Core.Crypto;
using Nethermind.Core.Extensions;
using Nethermind.Int256;
@@ -26,6 +27,8 @@ public class RlpStream
private static readonly WithdrawalDecoder _withdrawalDecoder = new();
private static readonly LogEntryDecoder _logEntryDecoder = LogEntryDecoder.Instance;
+ private CappedArray _data;
+
protected RlpStream()
{
}
@@ -36,12 +39,17 @@ protected RlpStream()
public RlpStream(int length)
{
- Data = new byte[length];
+ _data = new byte[length];
}
public RlpStream(byte[] data)
{
- Data = data;
+ _data = data;
+ }
+
+ public RlpStream(in CappedArray data)
+ {
+ _data = data;
}
public void Encode(Block value)
@@ -165,15 +173,15 @@ public virtual void Write(IReadOnlyList bytesToWrite)
{
for (int i = 0; i < bytesToWrite.Count; ++i)
{
- Data![_position + i] = bytesToWrite[i];
+ Data[_position + i] = bytesToWrite[i];
}
Position += bytesToWrite.Count;
}
protected virtual string Description =>
- Data?.Slice(0, Math.Min(Rlp.DebugMessageContentLength, Length)).ToHexString() ?? "0x";
+ Data.AsSpan(0, Math.Min(Rlp.DebugMessageContentLength, Length)).ToHexString() ?? "0x";
- public byte[]? Data { get; }
+ public ref readonly CappedArray Data => ref _data;
private int _position = 0;
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/TxDecoder.cs b/src/Nethermind/Nethermind.Serialization.Rlp/TxDecoder.cs
index 8b8f8148da1a..e456d5a7fd83 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/TxDecoder.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/TxDecoder.cs
@@ -590,7 +590,7 @@ public Rlp Encode(T item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
{
RlpStream rlpStream = new(GetLength(item, rlpBehaviors));
Encode(rlpStream, item, rlpBehaviors);
- return new Rlp(rlpStream.Data);
+ return new Rlp(rlpStream.Data.ToArray());
}
public void Encode(RlpStream stream, T? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None)
@@ -603,7 +603,7 @@ public Rlp EncodeTx(T? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None,
{
RlpStream rlpStream = new(GetTxLength(item, rlpBehaviors, forSigning, isEip155Enabled, chainId));
EncodeTx(rlpStream, item, rlpBehaviors, forSigning, isEip155Enabled, chainId);
- return new Rlp(rlpStream.Data);
+ return new Rlp(rlpStream.Data.ToArray());
}
private void EncodeTx(RlpStream stream, T? item, RlpBehaviors rlpBehaviors = RlpBehaviors.None,
diff --git a/src/Nethermind/Nethermind.Serialization.Rlp/WithdrawalDecoder.cs b/src/Nethermind/Nethermind.Serialization.Rlp/WithdrawalDecoder.cs
index 343f88afa5bc..6ddd0e6a6009 100644
--- a/src/Nethermind/Nethermind.Serialization.Rlp/WithdrawalDecoder.cs
+++ b/src/Nethermind/Nethermind.Serialization.Rlp/WithdrawalDecoder.cs
@@ -70,7 +70,7 @@ public Rlp Encode(Withdrawal? item, RlpBehaviors rlpBehaviors = RlpBehaviors.Non
Encode(stream, item, rlpBehaviors);
- return new(stream.Data);
+ return new(stream.Data.ToArray());
}
private static int GetContentLength(Withdrawal item) =>
diff --git a/src/Nethermind/Nethermind.Serialization.Ssz.Test/Nethermind.Serialization.Ssz.Test.csproj b/src/Nethermind/Nethermind.Serialization.Ssz.Test/Nethermind.Serialization.Ssz.Test.csproj
index c04f8248d8e9..6055d364c59f 100644
--- a/src/Nethermind/Nethermind.Serialization.Ssz.Test/Nethermind.Serialization.Ssz.Test.csproj
+++ b/src/Nethermind/Nethermind.Serialization.Ssz.Test/Nethermind.Serialization.Ssz.Test.csproj
@@ -6,7 +6,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.Serialization.Ssz/Nethermind.Serialization.Ssz.csproj b/src/Nethermind/Nethermind.Serialization.Ssz/Nethermind.Serialization.Ssz.csproj
index 274f06491b9d..52082fafa10c 100644
--- a/src/Nethermind/Nethermind.Serialization.Ssz/Nethermind.Serialization.Ssz.csproj
+++ b/src/Nethermind/Nethermind.Serialization.Ssz/Nethermind.Serialization.Ssz.csproj
@@ -5,10 +5,6 @@
enable
-
-
-
-
diff --git a/src/Nethermind/Nethermind.Sockets.Test/Nethermind.Sockets.Test.csproj b/src/Nethermind/Nethermind.Sockets.Test/Nethermind.Sockets.Test.csproj
index d2f2c196d832..f5db2a3e89d4 100644
--- a/src/Nethermind/Nethermind.Sockets.Test/Nethermind.Sockets.Test.csproj
+++ b/src/Nethermind/Nethermind.Sockets.Test/Nethermind.Sockets.Test.csproj
@@ -5,7 +5,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -17,7 +17,6 @@
-
diff --git a/src/Nethermind/Nethermind.Sockets/Extensions.cs b/src/Nethermind/Nethermind.Sockets/Extensions.cs
index b4d066cb652d..9496161195b2 100644
--- a/src/Nethermind/Nethermind.Sockets/Extensions.cs
+++ b/src/Nethermind/Nethermind.Sockets/Extensions.cs
@@ -23,7 +23,7 @@ public static void UseWebSocketsModules(this IApplicationBuilder app)
logger = scope.ServiceProvider.GetService()?.GetClassLogger();
}
- app.Use(async (context, next) =>
+ app.Run(async (context) =>
{
string id = string.Empty;
string clientName = string.Empty;
@@ -50,8 +50,8 @@ public static void UseWebSocketsModules(this IApplicationBuilder app)
if (logger?.IsDebug == true) logger.Info($"Initializing WebSockets for client: '{clientName}'.");
- var webSocket = await context.WebSockets.AcceptWebSocketAsync();
- var socketsClient =
+ using WebSocket webSocket = await context.WebSockets.AcceptWebSocketAsync();
+ using ISocketsClient socketsClient =
module.CreateClient(webSocket, clientName, context);
id = socketsClient.Id;
await socketsClient.ReceiveAsync();
diff --git a/src/Nethermind/Nethermind.Sockets/Nethermind.Sockets.csproj b/src/Nethermind/Nethermind.Sockets/Nethermind.Sockets.csproj
index c81c056fa1c2..e83063c895c3 100644
--- a/src/Nethermind/Nethermind.Sockets/Nethermind.Sockets.csproj
+++ b/src/Nethermind/Nethermind.Sockets/Nethermind.Sockets.csproj
@@ -11,8 +11,7 @@
-
-
+
diff --git a/src/Nethermind/Nethermind.State.Test/Nethermind.State.Test.csproj b/src/Nethermind/Nethermind.State.Test/Nethermind.State.Test.csproj
index d622a9a18fe5..3b93b491b8ba 100644
--- a/src/Nethermind/Nethermind.State.Test/Nethermind.State.Test.csproj
+++ b/src/Nethermind/Nethermind.State.Test/Nethermind.State.Test.csproj
@@ -5,7 +5,7 @@
-
+
runtime; build; native; contentfiles; analyzers; buildtransitive
all
diff --git a/src/Nethermind/Nethermind.State.Test/SnapSync/RecreateStateFromAccountRangesTests.cs b/src/Nethermind/Nethermind.State.Test/SnapSync/RecreateStateFromAccountRangesTests.cs
index 9ea658ba37dd..dc6aec01af24 100644
--- a/src/Nethermind/Nethermind.State.Test/SnapSync/RecreateStateFromAccountRangesTests.cs
+++ b/src/Nethermind/Nethermind.State.Test/SnapSync/RecreateStateFromAccountRangesTests.cs
@@ -111,7 +111,7 @@ public void RecreateAccountStateFromOneRangeWithNonExistenceProof()
byte[][] lastProof = accountProofCollector.BuildResult().Proof;
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -135,7 +135,7 @@ public void RecreateAccountStateFromOneRangeWithExistenceProof()
byte[][] lastProof = accountProofCollector.BuildResult().Proof;
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -152,7 +152,7 @@ public void RecreateAccountStateFromOneRangeWithoutProof()
Hash256 rootHash = _inputTree.RootHash; // "0x8c81279168edc449089449bc0f2136fc72c9645642845755633cf259cd97988b"
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -170,7 +170,7 @@ public void RecreateAccountStateFromMultipleRange()
// output state
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -220,7 +220,7 @@ public void MissingAccountFromRange()
// output state
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
diff --git a/src/Nethermind/Nethermind.State.Test/SnapSync/RecreateStateFromStorageRangesTests.cs b/src/Nethermind/Nethermind.State.Test/SnapSync/RecreateStateFromStorageRangesTests.cs
index af2190d5d256..beccedacf160 100644
--- a/src/Nethermind/Nethermind.State.Test/SnapSync/RecreateStateFromStorageRangesTests.cs
+++ b/src/Nethermind/Nethermind.State.Test/SnapSync/RecreateStateFromStorageRangesTests.cs
@@ -50,7 +50,7 @@ public void RecreateStorageStateFromOneRangeWithNonExistenceProof()
var proof = accountProofCollector.BuildResult();
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -69,7 +69,7 @@ public void RecreateAccountStateFromOneRangeWithExistenceProof()
var proof = accountProofCollector.BuildResult();
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -84,7 +84,7 @@ public void RecreateStorageStateFromOneRangeWithoutProof()
Hash256 rootHash = _inputStorageTree!.RootHash; // "..."
MemDb db = new MemDb();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -100,7 +100,7 @@ public void RecreateAccountStateFromMultipleRange()
// output state
MemDb db = new MemDb();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -135,7 +135,7 @@ public void MissingAccountFromRange()
// output state
MemDb db = new MemDb();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
diff --git a/src/Nethermind/Nethermind.State/Nethermind.State.csproj b/src/Nethermind/Nethermind.State/Nethermind.State.csproj
index 111e6b6570fe..44bc806511db 100644
--- a/src/Nethermind/Nethermind.State/Nethermind.State.csproj
+++ b/src/Nethermind/Nethermind.State/Nethermind.State.csproj
@@ -7,7 +7,6 @@
-
diff --git a/src/Nethermind/Nethermind.State/Proofs/ReceiptTrie.cs b/src/Nethermind/Nethermind.State/Proofs/ReceiptTrie.cs
index 26fe94346429..18597ce45205 100644
--- a/src/Nethermind/Nethermind.State/Proofs/ReceiptTrie.cs
+++ b/src/Nethermind/Nethermind.State/Proofs/ReceiptTrie.cs
@@ -7,12 +7,10 @@
using Nethermind.Core;
using Nethermind.Core.Buffers;
using Nethermind.Core.Crypto;
-using Nethermind.Core.Extensions;
using Nethermind.Core.Specs;
using Nethermind.Serialization.Rlp;
using Nethermind.State.Trie;
using Nethermind.Trie;
-using Nethermind.Trie.Pruning;
namespace Nethermind.State.Proofs;
@@ -46,19 +44,25 @@ private void Initialize(IEnumerable receipts, IReceiptSpec spec)
foreach (TxReceipt? receipt in receipts)
{
- CappedArray buffer = _decoder.EncodeToCappedArray(receipt, behavior, bufferPool: _bufferPool);
- CappedArray keyBuffer = (key++).EncodeToCappedArray(bufferPool: _bufferPool);
+ CappedArray buffer = _decoder.EncodeToCappedArray(receipt, behavior, _bufferPool);
+ CappedArray keyBuffer = (key++).EncodeToCappedArray(_bufferPool);
+
Set(keyBuffer.AsSpan(), buffer);
}
}
protected override void Initialize(IEnumerable list) => throw new NotSupportedException();
+ public static byte[][] CalculateReceiptProofs(IReleaseSpec spec, TxReceipt[] receipts, int index)
+ {
+ using TrackingCappedArrayPool cappedArrayPool = new(receipts.Length * 4);
+ return new ReceiptTrie(spec, receipts, canBuildProof: true, cappedArrayPool).BuildProof(index);
+ }
+
public static Hash256 CalculateRoot(IReceiptSpec receiptSpec, IList txReceipts)
{
- TrackingCappedArrayPool cappedArrayPool = new(txReceipts.Count * 4);
+ using TrackingCappedArrayPool cappedArrayPool = new(txReceipts.Count * 4);
Hash256 receiptsRoot = new ReceiptTrie(receiptSpec, txReceipts, bufferPool: cappedArrayPool).RootHash;
- cappedArrayPool.ReturnAll();
return receiptsRoot;
}
}
diff --git a/src/Nethermind/Nethermind.State/Proofs/TxTrie.cs b/src/Nethermind/Nethermind.State/Proofs/TxTrie.cs
index 368232ca2965..43aaf98b073c 100644
--- a/src/Nethermind/Nethermind.State/Proofs/TxTrie.cs
+++ b/src/Nethermind/Nethermind.State/Proofs/TxTrie.cs
@@ -9,7 +9,6 @@
using Nethermind.Serialization.Rlp;
using Nethermind.State.Trie;
using Nethermind.Trie;
-using Nethermind.Trie.Pruning;
namespace Nethermind.State.Proofs;
@@ -29,23 +28,26 @@ protected override void Initialize(IEnumerable list)
{
int key = 0;
- // 3% allocations (2GB) on a Goerli 3M blocks fast sync due to calling transaction encoder here
- // Avoiding it would require pooling byte arrays and passing them as Spans to temporary trees
- // a temporary trie would be a trie that exists to create a state root only and then be disposed of
foreach (Transaction? transaction in list)
{
- CappedArray buffer = _txDecoder.EncodeToCappedArray(transaction, RlpBehaviors.SkipTypedWrapping,
- bufferPool: _bufferPool);
- CappedArray keyBuffer = (key++).EncodeToCappedArray(bufferPool: _bufferPool);
+ CappedArray buffer = _txDecoder.EncodeToCappedArray(transaction, RlpBehaviors.SkipTypedWrapping, _bufferPool);
+ CappedArray keyBuffer = (key++).EncodeToCappedArray(_bufferPool);
+
Set(keyBuffer.AsSpan(), buffer);
}
}
+ public static byte[][] CalculateProof(IList transactions, int index)
+ {
+ using TrackingCappedArrayPool cappedArray = new TrackingCappedArrayPool(transactions.Count * 4);
+ byte[][] rootHash = new TxTrie(transactions, canBuildProof: true, bufferPool: cappedArray).BuildProof(index);
+ return rootHash;
+ }
+
public static Hash256 CalculateRoot(IList transactions)
{
- TrackingCappedArrayPool cappedArray = new TrackingCappedArrayPool(transactions.Count * 4);
- Hash256 rootHash = new TxTrie(transactions, false, bufferPool: cappedArray).RootHash;
- cappedArray.ReturnAll();
+ using TrackingCappedArrayPool cappedArray = new TrackingCappedArrayPool(transactions.Count * 4);
+ Hash256 rootHash = new TxTrie(transactions, canBuildProof: false, bufferPool: cappedArray).RootHash;
return rootHash;
}
}
diff --git a/src/Nethermind/Nethermind.State/Snap/PathWithStorageSlot.cs b/src/Nethermind/Nethermind.State/Snap/PathWithStorageSlot.cs
index 7864d661014d..6bbbacef0cc6 100644
--- a/src/Nethermind/Nethermind.State/Snap/PathWithStorageSlot.cs
+++ b/src/Nethermind/Nethermind.State/Snap/PathWithStorageSlot.cs
@@ -1,19 +1,31 @@
// SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited
// SPDX-License-Identifier: LGPL-3.0-only
+using System;
+using System.Numerics;
using Nethermind.Core.Crypto;
namespace Nethermind.State.Snap
{
- public class PathWithStorageSlot
+ public readonly struct PathWithStorageSlot(ValueHash256 keyHash, byte[] slotRlpValue)
+ : IEquatable, IEqualityOperators
{
- public PathWithStorageSlot(ValueHash256 keyHash, byte[] slotRlpValue)
+ public ValueHash256 Path { get; } = keyHash;
+ public byte[] SlotRlpValue { get; } = slotRlpValue;
+
+ public bool Equals(in PathWithStorageSlot other)
{
- Path = keyHash;
- SlotRlpValue = slotRlpValue;
+ return Path == other.Path && SlotRlpValue.AsSpan().SequenceEqual(other.SlotRlpValue);
}
- public ValueHash256 Path { get; set; }
- public byte[] SlotRlpValue { get; set; }
+ public bool Equals(PathWithStorageSlot other) => Equals(in other);
+
+ public static bool operator ==(PathWithStorageSlot left, PathWithStorageSlot right) => left.Equals(in right);
+
+ public static bool operator !=(PathWithStorageSlot left, PathWithStorageSlot right) => !left.Equals(in right);
+
+ public override bool Equals(object obj) => obj is PathWithStorageSlot pws && Equals(in pws);
+
+ public override int GetHashCode() => throw new NotImplementedException();
}
}
diff --git a/src/Nethermind/Nethermind.Synchronization.Test/BlockDownloaderTests.cs b/src/Nethermind/Nethermind.Synchronization.Test/BlockDownloaderTests.cs
index cb8f2c39c7b1..b6bb46fef536 100644
--- a/src/Nethermind/Nethermind.Synchronization.Test/BlockDownloaderTests.cs
+++ b/src/Nethermind/Nethermind.Synchronization.Test/BlockDownloaderTests.cs
@@ -1329,7 +1329,7 @@ Block BuildBlockForHeader(BlockHeader header, int txSeed)
_headers[blockHashes[i]].ReceiptsRoot = flags.HasFlag(Response.IncorrectReceiptRoot)
? Keccak.EmptyTreeHash
- : new ReceiptTrie(MainnetSpecProvider.Instance.GetSpec((ForkActivation)_headers[blockHashes[i]].Number), receipts[i]).RootHash;
+ : ReceiptTrie.CalculateRoot(MainnetSpecProvider.Instance.GetSpec((ForkActivation)_headers[blockHashes[i]].Number), receipts[i]);
}
ReceiptsMessage message = new(receipts);
diff --git a/src/Nethermind/Nethermind.Synchronization.Test/Nethermind.Synchronization.Test.csproj b/src/Nethermind/Nethermind.Synchronization.Test/Nethermind.Synchronization.Test.csproj
index bd422313c8ef..adc3e797f410 100644
--- a/src/Nethermind/Nethermind.Synchronization.Test/Nethermind.Synchronization.Test.csproj
+++ b/src/Nethermind/Nethermind.Synchronization.Test/Nethermind.Synchronization.Test.csproj
@@ -6,7 +6,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
@@ -20,7 +20,6 @@
-
diff --git a/src/Nethermind/Nethermind.Synchronization.Test/SnapSync/RecreateStateFromAccountRangesTests.cs b/src/Nethermind/Nethermind.Synchronization.Test/SnapSync/RecreateStateFromAccountRangesTests.cs
index ba750adc4c4d..b5636a4b8c59 100644
--- a/src/Nethermind/Nethermind.Synchronization.Test/SnapSync/RecreateStateFromAccountRangesTests.cs
+++ b/src/Nethermind/Nethermind.Synchronization.Test/SnapSync/RecreateStateFromAccountRangesTests.cs
@@ -116,7 +116,7 @@ public void RecreateAccountStateFromOneRangeWithNonExistenceProof()
byte[][] lastProof = CreateProofForPath(TestItem.Tree.AccountsWithPaths[5].Path.Bytes);
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -136,7 +136,7 @@ public void RecreateAccountStateFromOneRangeWithExistenceProof()
byte[][] lastProof = CreateProofForPath(TestItem.Tree.AccountsWithPaths[5].Path.Bytes);
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -153,7 +153,7 @@ public void RecreateAccountStateFromOneRangeWithoutProof()
Hash256 rootHash = _inputTree.RootHash; // "0x8c81279168edc449089449bc0f2136fc72c9645642845755633cf259cd97988b"
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -171,7 +171,7 @@ public void RecreateAccountStateFromMultipleRange()
// output state
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -209,7 +209,7 @@ public void RecreateAccountStateFromMultipleRange_InReverseOrder()
// output state
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -244,7 +244,7 @@ public void RecreateAccountStateFromMultipleRange_OutOfOrder()
// output state
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -279,7 +279,7 @@ public void RecreateAccountStateFromMultipleOverlappingRange()
// output state
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -323,7 +323,7 @@ public void CorrectlyDetermineHasMoreChildren()
// output state
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -377,7 +377,7 @@ public void CorrectlyDetermineMaxKeccakExist()
// output state
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -416,7 +416,7 @@ public void MissingAccountFromRange()
// output state
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
diff --git a/src/Nethermind/Nethermind.Synchronization.Test/SnapSync/RecreateStateFromStorageRangesTests.cs b/src/Nethermind/Nethermind.Synchronization.Test/SnapSync/RecreateStateFromStorageRangesTests.cs
index 6728832cd326..8bdd2a11d2bf 100644
--- a/src/Nethermind/Nethermind.Synchronization.Test/SnapSync/RecreateStateFromStorageRangesTests.cs
+++ b/src/Nethermind/Nethermind.Synchronization.Test/SnapSync/RecreateStateFromStorageRangesTests.cs
@@ -51,7 +51,7 @@ public void RecreateStorageStateFromOneRangeWithNonExistenceProof()
var proof = accountProofCollector.BuildResult();
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -71,7 +71,7 @@ public void RecreateAccountStateFromOneRangeWithExistenceProof()
var proof = accountProofCollector.BuildResult();
MemDb db = new();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -87,7 +87,7 @@ public void RecreateStorageStateFromOneRangeWithoutProof()
Hash256 rootHash = _inputStorageTree!.RootHash; // "..."
MemDb db = new MemDb();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -104,7 +104,7 @@ public void RecreateAccountStateFromMultipleRange()
// output state
MemDb db = new MemDb();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
@@ -139,7 +139,7 @@ public void MissingAccountFromRange()
// output state
MemDb db = new MemDb();
- DbProvider dbProvider = new(DbModeHint.Mem);
+ DbProvider dbProvider = new();
dbProvider.RegisterDb(DbNames.State, db);
ProgressTracker progressTracker = new(null, dbProvider.GetDb(DbNames.State), LimboLogs.Instance);
SnapProvider snapProvider = CreateSnapProvider(progressTracker, dbProvider);
diff --git a/src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloadContext.cs b/src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloadContext.cs
index d4a48e72056f..5f932f5d6396 100644
--- a/src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloadContext.cs
+++ b/src/Nethermind/Nethermind.Synchronization/Blocks/BlockDownloadContext.cs
@@ -125,7 +125,7 @@ public Block GetBlockByRequestIdx(int index)
private void ValidateReceipts(Block block, TxReceipt[] blockReceipts)
{
- Hash256 receiptsRoot = new ReceiptTrie(_specProvider.GetSpec(block.Header), blockReceipts).RootHash;
+ Hash256 receiptsRoot = ReceiptTrie.CalculateRoot(_specProvider.GetSpec(block.Header), blockReceipts);
if (receiptsRoot != block.ReceiptsRoot)
{
diff --git a/src/Nethermind/Nethermind.Synchronization/FastSync/DetailedProgress.cs b/src/Nethermind/Nethermind.Synchronization/FastSync/DetailedProgress.cs
index 72cdb8a94c62..17f824f9ad88 100644
--- a/src/Nethermind/Nethermind.Synchronization/FastSync/DetailedProgress.cs
+++ b/src/Nethermind/Nethermind.Synchronization/FastSync/DetailedProgress.cs
@@ -152,7 +152,7 @@ public byte[] Serialize()
{
stream.Encode(entry);
}
- return stream.Data;
+ return stream.Data.ToArray()!;
}
private static int GetLength(Span progress)
diff --git a/src/Nethermind/Nethermind.Synchronization/LesSync/CanonicalHashTrie.cs b/src/Nethermind/Nethermind.Synchronization/LesSync/CanonicalHashTrie.cs
index d6fc854566c4..2f9208a985db 100644
--- a/src/Nethermind/Nethermind.Synchronization/LesSync/CanonicalHashTrie.cs
+++ b/src/Nethermind/Nethermind.Synchronization/LesSync/CanonicalHashTrie.cs
@@ -136,7 +136,7 @@ private static Rlp GetValue(BlockHeader header)
(Hash256? Hash, UInt256 Value) item = (header.Hash, header.TotalDifficulty.Value);
RlpStream stream = new(_decoder.GetLength(item, RlpBehaviors.None));
_decoder.Encode(stream, item);
- return new Rlp(stream.Data);
+ return new Rlp(stream.Data.ToArray());
}
}
}
diff --git a/src/Nethermind/Nethermind.Synchronization/Nethermind.Synchronization.csproj b/src/Nethermind/Nethermind.Synchronization/Nethermind.Synchronization.csproj
index 2768aa316a8d..ee7087d2c59f 100644
--- a/src/Nethermind/Nethermind.Synchronization/Nethermind.Synchronization.csproj
+++ b/src/Nethermind/Nethermind.Synchronization/Nethermind.Synchronization.csproj
@@ -13,7 +13,6 @@
-
diff --git a/src/Nethermind/Nethermind.Test.Runner/Nethermind.Test.Runner.csproj b/src/Nethermind/Nethermind.Test.Runner/Nethermind.Test.Runner.csproj
index 886299977d86..fd96da1e5347 100644
--- a/src/Nethermind/Nethermind.Test.Runner/Nethermind.Test.Runner.csproj
+++ b/src/Nethermind/Nethermind.Test.Runner/Nethermind.Test.Runner.csproj
@@ -4,6 +4,12 @@
Exe
nethtest
annotations
+ true
+ true
+ false
+ false
+ true
+ true
diff --git a/src/Nethermind/Nethermind.Test.Runner/StateTestRunner.cs b/src/Nethermind/Nethermind.Test.Runner/StateTestRunner.cs
index 200c671470d6..b44812e2d8ee 100644
--- a/src/Nethermind/Nethermind.Test.Runner/StateTestRunner.cs
+++ b/src/Nethermind/Nethermind.Test.Runner/StateTestRunner.cs
@@ -4,6 +4,9 @@
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
+using System.Threading;
+using System.Threading.Tasks;
+
using Ethereum.Test.Base;
using Ethereum.Test.Base.Interfaces;
using Nethermind.Evm;
@@ -62,9 +65,21 @@ public IEnumerable RunTests()
{
if (_filter is not null && !Regex.Match(test.Name, $"^({_filter})").Success)
continue;
+
EthereumTestResult result = null;
if (_whenTrace != WhenTrace.Always)
+ {
+ // Warm up
+ Parallel.For(0, 30, (i, s) =>
+ {
+ _ = RunTest(test, NullTxTracer.Instance);
+ });
+
+ // Give time to Jit optimized version
+ Thread.Sleep(20);
+ GC.Collect(GC.MaxGeneration);
result = RunTest(test, NullTxTracer.Instance);
+ }
if (_whenTrace != WhenTrace.Never && !(result?.Pass ?? false))
{
diff --git a/src/Nethermind/Nethermind.Test.Runner/StateTestTxTraceResult.cs b/src/Nethermind/Nethermind.Test.Runner/StateTestTxTraceResult.cs
index 29c911314209..644f311b0fd3 100644
--- a/src/Nethermind/Nethermind.Test.Runner/StateTestTxTraceResult.cs
+++ b/src/Nethermind/Nethermind.Test.Runner/StateTestTxTraceResult.cs
@@ -14,7 +14,7 @@ public class StateTestTxTraceResult
public long GasUsed { get; set; }
[JsonPropertyName("time")]
- public int Time { get; set; }
+ public double Time { get; set; }
[JsonPropertyName("error")]
public string Error { get; set; }
diff --git a/src/Nethermind/Nethermind.Test.Runner/StateTestTxTracer.cs b/src/Nethermind/Nethermind.Test.Runner/StateTestTxTracer.cs
index 1c93c4bb9129..322ea016b816 100644
--- a/src/Nethermind/Nethermind.Test.Runner/StateTestTxTracer.cs
+++ b/src/Nethermind/Nethermind.Test.Runner/StateTestTxTracer.cs
@@ -3,7 +3,6 @@
using System;
using System.Collections.Generic;
-using System.Linq;
using Nethermind.Core;
using Nethermind.Core.Crypto;
using Nethermind.Core.Extensions;
@@ -110,7 +109,28 @@ public void SetOperationStack(TraceStack stack)
public void SetOperationMemory(TraceMemory memoryTrace)
{
if (IsTracingDetailedMemory)
- _traceEntry.Memory = string.Concat("0x", string.Join("", memoryTrace.ToHexWordList().Select(mt => mt.Replace("0x", string.Empty))));
+ {
+ var length = 2;
+ var wordList = memoryTrace.ToHexWordList();
+ for (int i = 0; i < wordList.Length; i++)
+ {
+ length += wordList[i].Length;
+ }
+
+ _traceEntry.Memory = string.Create(length, wordList, static (span, words) =>
+ {
+ span[1] = 'x';
+ span[0] = '0';
+
+ span = span[2..];
+ for (int i = 0; i < words.Length; i++)
+ {
+ ReadOnlySpan word = words[i].AsSpan();
+ word.CopyTo(span);
+ span = span[word.Length..];
+ }
+ });
+ }
}
public void SetOperationMemorySize(ulong newSize)
diff --git a/src/Nethermind/Nethermind.Tools.GasHistorian/Program.cs b/src/Nethermind/Nethermind.Tools.GasHistorian/Program.cs
index 74c5a40cae3b..d5931b961e5f 100644
--- a/src/Nethermind/Nethermind.Tools.GasHistorian/Program.cs
+++ b/src/Nethermind/Nethermind.Tools.GasHistorian/Program.cs
@@ -24,14 +24,14 @@ static void Main(string[] args)
string baseDir = args[0];
Console.WriteLine($"Scanning blocks in {baseDir}");
- RocksDbSettings chainDbSettings = new("blockInfos", "blockInfos");
+ DbSettings chainDbSettings = new("blockInfos", "blockInfos");
DbOnTheRocks chainDb = new(
baseDir,
chainDbSettings,
DbConfig.Default,
LimboLogs.Instance);
- RocksDbSettings blocksDbSettings = new("blocks", "blocks");
+ DbSettings blocksDbSettings = new("blocks", "blocks");
DbOnTheRocks blocksDb = new(
baseDir,
blocksDbSettings,
diff --git a/src/Nethermind/Nethermind.Trie.Test/Nethermind.Trie.Test.csproj b/src/Nethermind/Nethermind.Trie.Test/Nethermind.Trie.Test.csproj
index 8b08031475d4..e6e63e1ef27e 100644
--- a/src/Nethermind/Nethermind.Trie.Test/Nethermind.Trie.Test.csproj
+++ b/src/Nethermind/Nethermind.Trie.Test/Nethermind.Trie.Test.csproj
@@ -6,7 +6,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/Nethermind/Nethermind.Trie.Test/TrackingCappedArrayPoolTests.cs b/src/Nethermind/Nethermind.Trie.Test/TrackingCappedArrayPoolTests.cs
index 3465d66f98fa..ab01a01bbd23 100644
--- a/src/Nethermind/Nethermind.Trie.Test/TrackingCappedArrayPoolTests.cs
+++ b/src/Nethermind/Nethermind.Trie.Test/TrackingCappedArrayPoolTests.cs
@@ -29,7 +29,7 @@ public void Test_Pooling()
pool.Return(sample);
arrayPool.Received(0).Return(Arg.Any());
- pool.ReturnAll();
+ pool.Dispose();
arrayPool.Received(4).Return(Arg.Any());
}
}
diff --git a/src/Nethermind/Nethermind.Trie/PatriciaTree.cs b/src/Nethermind/Nethermind.Trie/PatriciaTree.cs
index e30a8aa4ae10..07ee5d68a0ed 100644
--- a/src/Nethermind/Nethermind.Trie/PatriciaTree.cs
+++ b/src/Nethermind/Nethermind.Trie/PatriciaTree.cs
@@ -393,7 +393,7 @@ private void SetRootHash(Hash256? value, bool resetObjects)
[..nibblesCount]; // Slice to exact size;
Nibbles.BytesToNibbleBytes(rawKey, nibbles);
- var result = Run(nibbles, nibblesCount, new CappedArray(Array.Empty()), false, startRootHash: rootHash).ToArray();
+ var result = Run(nibbles, nibblesCount, in CappedArray.Empty, isUpdate: false, startRootHash: rootHash).ToArray();
if (array is not null) ArrayPool.Shared.Return(array);
return result;
@@ -434,7 +434,7 @@ public virtual void Set(ReadOnlySpan rawKey, byte[] value)
[SkipLocalsInit]
[DebuggerStepThrough]
- public virtual void Set(ReadOnlySpan rawKey, CappedArray value)
+ public virtual void Set(ReadOnlySpan rawKey, in CappedArray value)
{
if (_isTrace) Trace(in rawKey, in value);
@@ -446,7 +446,7 @@ public virtual void Set(ReadOnlySpan rawKey, CappedArray value)
[..nibblesCount]; // Slice to exact size
Nibbles.BytesToNibbleBytes(rawKey, nibbles);
- Run(nibbles, nibblesCount, value, true);
+ Run(nibbles, nibblesCount, in value, isUpdate: true);
if (array is not null) ArrayPool.Shared.Return(array);
@@ -465,7 +465,7 @@ public void Set(ReadOnlySpan rawKey, Rlp? value)
private CappedArray Run(
Span updatePath,
int nibblesCount,
- CappedArray updateValue,
+ in CappedArray updateValue,
bool isUpdate,
bool ignoreMissingDelete = true,
Hash256? startRootHash = null)
diff --git a/src/Nethermind/Nethermind.Trie/TrackingCappedArrayPool.cs b/src/Nethermind/Nethermind.Trie/TrackingCappedArrayPool.cs
index 13aeb87fbdc1..214ab606623f 100644
--- a/src/Nethermind/Nethermind.Trie/TrackingCappedArrayPool.cs
+++ b/src/Nethermind/Nethermind.Trie/TrackingCappedArrayPool.cs
@@ -4,17 +4,18 @@
using System;
using System.Buffers;
using System.Collections.Generic;
+using System.Runtime.InteropServices;
+
using Nethermind.Core.Buffers;
-using Nethermind.Trie.Pruning;
namespace Nethermind.Trie;
///
/// Track every rented CappedArray and return them all at once
///
-public class TrackingCappedArrayPool : ICappedArrayPool
+public class TrackingCappedArrayPool : ICappedArrayPool, IDisposable
{
- private readonly List> _rentedBuffers;
+ private readonly List _rentedBuffers;
private readonly ArrayPool _arrayPool;
public TrackingCappedArrayPool() : this(0)
@@ -23,7 +24,7 @@ public TrackingCappedArrayPool() : this(0)
public TrackingCappedArrayPool(int initialCapacity, ArrayPool arrayPool = null)
{
- _rentedBuffers = new List>(initialCapacity);
+ _rentedBuffers = new List(initialCapacity);
_arrayPool = arrayPool ?? ArrayPool.Shared;
}
@@ -31,26 +32,25 @@ public CappedArray Rent(int size)
{
if (size == 0)
{
- return new CappedArray(Array.Empty());
+ return CappedArray.Empty;
}
- CappedArray rented = new CappedArray(_arrayPool.Rent(size), size);
- rented.AsSpan().Clear();
- _rentedBuffers.Add(rented);
+ byte[] array = _arrayPool.Rent(size);
+ CappedArray rented = new CappedArray(array, size);
+ array.AsSpan().Clear();
+ _rentedBuffers.Add(array);
return rented;
}
- public void Return(CappedArray buffer)
+ public void Return(in CappedArray buffer)
{
}
- public void ReturnAll()
+ public void Dispose()
{
- foreach (CappedArray rentedBuffer in _rentedBuffers)
+ foreach (byte[] rentedBuffer in CollectionsMarshal.AsSpan(_rentedBuffers))
{
- if (rentedBuffer.IsNotNull && rentedBuffer.Array.Length != 0)
- _arrayPool.Return(rentedBuffer.Array);
+ _arrayPool.Return(rentedBuffer);
}
- _rentedBuffers.Clear();
}
}
diff --git a/src/Nethermind/Nethermind.Trie/TrieNode.cs b/src/Nethermind/Nethermind.Trie/TrieNode.cs
index 7a58dd75b506..7525e791ff39 100644
--- a/src/Nethermind/Nethermind.Trie/TrieNode.cs
+++ b/src/Nethermind/Nethermind.Trie/TrieNode.cs
@@ -107,7 +107,7 @@ public CappedArray Value
if (obj is null)
{
- return new CappedArray(null);
+ return CappedArray.Null;
}
if (obj is byte[] asBytes)
@@ -121,7 +121,7 @@ public CappedArray Value
if (!AllowBranchValues)
{
// branches that we use for state will never have value set as all the keys are equal length
- return new CappedArray(Array.Empty());
+ return CappedArray.Empty;
}
obj = _data![BranchesCount];
@@ -130,7 +130,7 @@ public CappedArray Value
if (_rlpStream is null)
{
_data[BranchesCount] = Array.Empty();
- return new CappedArray(Array.Empty());
+ return CappedArray.Empty;
}
else
{
@@ -172,7 +172,7 @@ public CappedArray Value
if (value.IsUncapped)
{
// Store array directly if possible to reduce memory
- _data![IsLeaf ? 1 : BranchesCount] = value.Array;
+ _data![IsLeaf ? 1 : BranchesCount] = value.UnderlyingArray;
return;
}
@@ -230,7 +230,7 @@ public TrieNode(NodeType nodeType, Hash256 keccak)
}
}
- public TrieNode(NodeType nodeType, CappedArray rlp, bool isDirty = false)
+ public TrieNode(NodeType nodeType, in CappedArray rlp, bool isDirty = false)
{
NodeType = nodeType;
FullRlp = rlp;
@@ -248,7 +248,7 @@ public TrieNode(NodeType nodeType, Hash256 keccak, ReadOnlySpan rlp)
{
}
- public TrieNode(NodeType nodeType, Hash256 keccak, CappedArray rlp)
+ public TrieNode(NodeType nodeType, Hash256 keccak, in CappedArray rlp)
: this(nodeType, rlp)
{
Keccak = keccak;
@@ -496,7 +496,7 @@ public void ResolveKey(ITrieNodeResolver tree, ref TreePath path, bool isRoot, I
{
CappedArray oldRlp = FullRlp;
FullRlp = RlpEncode(tree, ref path, bufferPool);
- if (oldRlp.IsNotNull)
+ if (oldRlp.IsNotNullOrEmpty)
{
bufferPool.SafeReturnBuffer(oldRlp);
}
@@ -746,10 +746,10 @@ Keccak is null
: MemorySizes.RefSize + Hash256.MemorySize;
long fullRlpSize =
MemorySizes.RefSize +
- (FullRlp.IsNull ? 0 : MemorySizes.Align(FullRlp.Array.Length + MemorySizes.ArrayOverhead));
+ (FullRlp.IsNull ? 0 : MemorySizes.Align(FullRlp.UnderlyingLength + MemorySizes.ArrayOverhead));
long rlpStreamSize =
MemorySizes.RefSize + (_rlpStream?.MemorySize ?? 0)
- - (FullRlp.IsNull ? 0 : MemorySizes.Align(FullRlp.Array.Length + MemorySizes.ArrayOverhead));
+ - (FullRlp.IsNull ? 0 : MemorySizes.Align(FullRlp.UnderlyingLength + MemorySizes.ArrayOverhead));
long dataSize =
MemorySizes.RefSize +
(_data is null
@@ -779,7 +779,7 @@ Keccak is null
if (_data![i] is CappedArray cappedArray)
{
- dataSize += MemorySizes.ArrayOverhead + (cappedArray.Array?.Length ?? 0) + MemorySizes.SmallObjectOverhead;
+ dataSize += MemorySizes.ArrayOverhead + cappedArray.UnderlyingLength + MemorySizes.SmallObjectOverhead;
}
if (recursive)
@@ -830,14 +830,14 @@ public TrieNode Clone()
return trieNode;
}
- public TrieNode CloneWithChangedValue(CappedArray