Skip to content

Commit 0e0b949

Browse files
authored
tests: Pin anvil to version 1.2.3 (#6112)
It seems that anvil 1.2.3 is the last version to produce deterministic block hashes reliably. The 'grafted' test really needs deterministic block hashes as they influence the PoI which this test checks. If [this foundry bug](foundry-rs/foundry#9570) gets fixed, we should try again with latest stable foundry.
1 parent 8195721 commit 0e0b949

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ jobs:
160160

161161
- name: Install Foundry
162162
uses: foundry-rs/foundry-toolchain@v1
163+
with:
164+
# Pinned to specific version since newer versions do not produce
165+
# deterministic block hashes. Unpin once that's fixed upstream
166+
version: v1.2.3
163167
- name: Start anvil
164168
run: anvil --gas-limit 100000000000 --base-fee 1 --block-time 2 --timestamp 1743944919 --port 3021 &
165169

tests/docker-compose.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ services:
2020
POSTGRES_DB: graph-node
2121
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C"
2222
anvil:
23-
image: ghcr.io/foundry-rs/foundry:stable
23+
# Pinned to specific version since newer versions do not produce
24+
# deterministic block hashes. Unpin once that's fixed upstream
25+
image: ghcr.io/foundry-rs/foundry:v1.2.3
2426
ports:
2527
- '3021:8545'
2628
command: "'anvil --host 0.0.0.0 --gas-limit 100000000000 --base-fee 1 --block-time 2 --timestamp 1743944919 --mnemonic \"test test test test test test test test test test test junk\"'"

0 commit comments

Comments
 (0)