Skip to content

Commit

Permalink
feat: unify anvil versions (#10143)
Browse files Browse the repository at this point in the history
Sandbox was pinned to a very old version. Also a few other places were
pinned to other versions.
  • Loading branch information
Thunkar authored Nov 22, 2024
1 parent db057d0 commit adae143
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 45 deletions.
16 changes: 8 additions & 8 deletions aztec-up/bin/docker-compose.sandbox.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
services:
ethereum:
image: ghcr.io/foundry-rs/foundry@sha256:29ba6e34379e79c342ec02d437beb7929c9e254261e8032b17e187be71a2609f
command: >
'
[ -n "$$FORK_URL" ] && ARGS="$$ARGS --fork-url $$FORK_URL";
[ -n "$$FORK_BLOCK_NUMBER" ] && ARGS="$$ARGS --fork-block-number $$FORK_BLOCK_NUMBER";
echo anvil -p $$ANVIL_PORT --host 0.0.0.0 --chain-id 31337 --silent $$ARGS;
anvil -p $$ANVIL_PORT --host 0.0.0.0 --chain-id 31337 --silent $$ARGS
'
image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-${ARCH_TAG:-amd64}
entrypoint: >
sh -c '
if [ -n "$$FORK_BLOCK_NUMBER" ] && [ -n "$$FORK_URL" ]; then
exec anvil --silent -p "$$ANVIL_PORT" --host 0.0.0.0 --chain-id 31337 --fork-url "$$FORK_URL" --fork-block-number "$$FORK_BLOCK_NUMBER"
else
exec anvil --silent -p "$$ANVIL_PORT" --host 0.0.0.0 --chain-id 31337
fi'
ports:
- "${ANVIL_PORT:-8545}:${ANVIL_PORT:-8545}"
environment:
Expand Down
5 changes: 2 additions & 3 deletions docker-compose.provernet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ services:

# Anvil instance that serves as L1
ethereum:
image: ghcr.io/foundry-rs/foundry@sha256:29ba6e34379e79c342ec02d437beb7929c9e254261e8032b17e187be71a2609f
command: >
'anvil --block-time 12 --host 0.0.0.0 --chain-id 31337 --port 8545 --silent'
image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-${ARCH_TAG:-amd64}
entrypoint: 'anvil --block-time 12 --silent -p 8545 --host 0.0.0.0 --chain-id 31337'
ports:
- 8545:8545

Expand Down
16 changes: 9 additions & 7 deletions yarn-project/aztec/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
version: '3'
services:
ethereum:
image: aztecprotocol/foundry-nightly-25f24e677a6a32a62512ad4f561995589ac2c7dc:latest
image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-${ARCH_TAG:-amd64}
entrypoint: >
sh -c '
if [ -n "$FORK_BLOCK_NUMBER" ] && [ -n "$FORK_URL" ]; then
exec anvil -p 8545 --host 0.0.0.0 --chain-id 31337 --silent --fork-url "$FORK_URL" --fork-block-number "$FORK_BLOCK_NUMBER"
elif [ -n "$FORK_URL" ]; then
exec anvil -p 8545 --host 0.0.0.0 --chain-id 31337 --silent --fork-url "$FORK_URL"
if [ -n "$$FORK_BLOCK_NUMBER" ] && [ -n "$$FORK_URL" ]; then
exec anvil --silent -p "$$ANVIL_PORT" --host 0.0.0.0 --chain-id 31337 --fork-url "$$FORK_URL" --fork-block-number "$$FORK_BLOCK_NUMBER"
else
exec anvil -p 8545 --host 0.0.0.0 --chain-id 31337 --silent
exec anvil --silent -p "$$ANVIL_PORT" --host 0.0.0.0 --chain-id 31337
fi'
ports:
- '${SANDBOX_ANVIL_PORT:-8545}:8545'
- "${ANVIL_PORT:-8545}:${ANVIL_PORT:-8545}"
environment:
FORK_URL:
FORK_BLOCK_NUMBER:
ANVIL_PORT: ${ANVIL_PORT:-8545}

aztec:
image: 'aztecprotocol/aztec:${SANDBOX_VERSION:-latest}'
Expand Down
12 changes: 3 additions & 9 deletions yarn-project/end-to-end/scripts/docker-compose-no-sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ services:
fork:
image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-${ARCH_TAG:-amd64}
pull_policy: always
entrypoint: >
sh -c '
if [ -n "$FORK_BLOCK_NUMBER" ] && [ -n "$FORK_URL" ]; then
exec anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337 --fork-url "$FORK_URL" --fork-block-number "$FORK_BLOCK_NUMBER"
else
exec anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337
fi'
expose:
- '8545'
entrypoint: 'anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337'
ports:
- 8545:8545

end-to-end:
image: aztecprotocol/end-to-end:${AZTEC_DOCKER_TAG:-latest}
Expand Down
12 changes: 3 additions & 9 deletions yarn-project/end-to-end/scripts/docker-compose-wallet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ services:
fork:
image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-${ARCH_TAG:-amd64}
pull_policy: always
entrypoint: >
sh -c '
if [ -n "$FORK_BLOCK_NUMBER" ] && [ -n "$FORK_URL" ]; then
exec anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337 --fork-url "$FORK_URL" --fork-block-number "$FORK_BLOCK_NUMBER"
else
exec anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337
fi'
expose:
- '8545'
entrypoint: 'anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337'
ports:
- 8545:8545

sandbox:
image: aztecprotocol/aztec:${AZTEC_DOCKER_TAG:-latest}
Expand Down
12 changes: 3 additions & 9 deletions yarn-project/end-to-end/scripts/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ services:
fork:
image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-${ARCH_TAG:-amd64}
pull_policy: always
entrypoint: >
sh -c '
if [ -n "$FORK_BLOCK_NUMBER" ] && [ -n "$FORK_URL" ]; then
exec anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337 --fork-url "$FORK_URL" --fork-block-number "$FORK_BLOCK_NUMBER"
else
exec anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337
fi'
expose:
- '8545'
entrypoint: 'anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337'
ports:
- 8545:8545

sandbox:
image: aztecprotocol/aztec:${AZTEC_DOCKER_TAG:-latest}
Expand Down

0 comments on commit adae143

Please sign in to comment.