Skip to content

Commit

Permalink
Replace ganache-cli with anvil (sigp#3555)
Browse files Browse the repository at this point in the history
## Issue Addressed

N/A

## Proposed Changes

Replace ganache-cli with anvil https://github.com/foundry-rs/foundry/blob/master/anvil/README.md
We can lose all js dependencies in CI as a consequence.

## Additional info
Also changes the ethers-rs version used in the execution layer (for the transaction reconstruction) to a newer one. This was necessary to get use the ethers utils for anvil. The fixed execution engine integration tests should catch any potential issues with the payload reconstruction after sigp#3592 


Co-authored-by: Michael Sproul <michael@sigmaprime.io>
  • Loading branch information
2 people authored and isaac.asimov committed Jul 13, 2023
1 parent 5f2c507 commit b939894
Show file tree
Hide file tree
Showing 24 changed files with 466 additions and 507 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/local-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ganache
run: npm install ganache@latest --global
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil

# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
- uses: actions/cache@v3
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ganache
run: sudo npm install -g ganache
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Run tests in release
run: make test-release
release-tests-windows:
Expand All @@ -78,8 +78,8 @@ jobs:
run: |
choco install python protoc visualstudio2019-workload-vctools -y
npm config set msvs_version 2019
- name: Install ganache
run: npm install -g ganache --loglevel verbose
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Install make
run: choco install -y make
- uses: KyleMayes/install-llvm-action@v1
Expand Down Expand Up @@ -140,8 +140,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ganache
run: sudo npm install -g ganache
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Run tests in debug
run: make test-debug
state-transition-vectors-ubuntu:
Expand Down Expand Up @@ -196,8 +196,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ganache
run: sudo npm install -g ganache
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Run the beacon chain sim that starts from an eth1 contract
run: cargo run --release --bin simulator eth1-sim
merge-transition-ubuntu:
Expand All @@ -212,8 +212,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ganache
run: sudo npm install -g ganache
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Run the beacon chain sim and go through the merge transition
run: cargo run --release --bin simulator eth1-sim --post-merge
no-eth1-simulator-ubuntu:
Expand All @@ -228,8 +228,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ganache
run: sudo npm install -g ganache
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Run the beacon chain sim without an eth1 connection
run: cargo run --release --bin simulator no-eth1-sim
syncing-simulator-ubuntu:
Expand All @@ -244,8 +244,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ganache
run: sudo npm install -g ganache
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Run the syncing simulator
run: cargo run --release --bin simulator syncing-sim
doppelganger-protection-test:
Expand All @@ -260,8 +260,8 @@ jobs:
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install ganache
run: sudo npm install -g ganache
- name: Install anvil
run: cargo install --git https://github.com/foundry-rs/foundry --locked anvil
- name: Install lighthouse and lcli
run: |
make
Expand Down
Loading

0 comments on commit b939894

Please sign in to comment.