Skip to content

Commit 82aad25

Browse files
ludamadclaude
andcommitted
chore: upgrade foundry to 1.5.1 and use --slow for forge deployments
Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 812da54 commit 82aad25

File tree

4 files changed

+12
-25
lines changed

4 files changed

+12
-25
lines changed

bootstrap.sh

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -111,24 +111,13 @@ function check_toolchains {
111111
echo " curl -s -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-27/wasi-sdk-27.0-x86_64-linux.tar.gz | tar zxf - && sudo mv wasi-sdk-27.0-x86_64-linux /opt/wasi-sdk"
112112
exit 1
113113
fi
114-
# Check foundry version.
115-
local foundry_version="v1.4.1"
116-
for tool in forge anvil; do
117-
if ! $tool --version 2> /dev/null | grep "${foundry_version#nightly-}" > /dev/null; then
118-
echo "$tool not in PATH or incorrect version (requires $foundry_version)."
119-
if [ "${CI:-0}" -eq 1 ]; then
120-
echo "Attempting install of required foundry version $foundry_version"
121-
curl -L https://foundry.paradigm.xyz | bash
122-
~/.foundry/bin/foundryup -i $foundry_version
123-
else
124-
encourage_dev_container
125-
echo "Installation: https://book.getfoundry.sh/getting-started/installation"
126-
echo " curl -L https://foundry.paradigm.xyz | bash"
127-
echo " foundryup -i $foundry_version"
128-
exit 1
129-
fi
130-
fi
131-
done
114+
# Check foundry version and install if needed.
115+
local foundry_version="v1.5.1"
116+
if ! forge --version 2> /dev/null | grep "${foundry_version#nightly-}" > /dev/null; then
117+
echo "forge not in PATH or incorrect version (requires $foundry_version). Installing..."
118+
curl -L https://foundry.paradigm.xyz | bash
119+
~/.foundry/bin/foundryup -i $foundry_version
120+
fi
132121
# Check Node.js version.
133122
local node_min_version="24.12.0"
134123
local node_installed_version=$(node --version | cut -d 'v' -f 2)

build-images/src/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --de
3434
########################################################################################################################
3535
# Build foundry.
3636
FROM base-build AS foundry
37-
ENV FOUNDRY_VERSION=v1.4.1
37+
ENV FOUNDRY_VERSION=v1.5.1
3838
ENV FOUNDRY_BIN_DIR="/root/.foundry/bin"
3939
ENV RUSTUP_HOME=/opt/rust/rustup
4040
ENV CARGO_HOME=/opt/rust/cargo

spartan/scripts/install_deps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ if command -v gcloud &> /dev/null; then
121121
fi
122122
fi
123123

124-
FOUNDRY_VERSION="v1.4.1"
124+
FOUNDRY_VERSION="v1.5.1"
125125
if ! command -v cast &> /dev/null; then
126126
log "Installing cast (foundry $FOUNDRY_VERSION)..."
127127
export FOUNDRY_DIR="$HOME/.foundry"

yarn-project/ethereum/src/deploy_aztec_l1_contracts.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { tmpdir } from 'os';
1515
import { dirname, join, resolve } from 'path';
1616
import readline from 'readline';
1717
import type { Hex } from 'viem';
18-
import { foundry, mainnet, sepolia } from 'viem/chains';
18+
import { mainnet, sepolia } from 'viem/chains';
1919

2020
import { createEthereumChain, isAnvilTestChain } from './chain.js';
2121
import { createExtendedL1Client } from './client.js';
@@ -318,9 +318,6 @@ export async function deployAztecL1Contracts(
318318
);
319319
}
320320

321-
// From heuristic testing. More caused issues with anvil.
322-
const MAGIC_ANVIL_BATCH_SIZE = 8;
323-
// Anvil seems to stall with unbounded batch size. Otherwise no max batch size is desirable.
324321
const forgeArgs = [
325322
'script',
326323
FORGE_SCRIPT,
@@ -331,7 +328,7 @@ export async function deployAztecL1Contracts(
331328
'--rpc-url',
332329
rpcUrl,
333330
'--broadcast',
334-
...(chainId === foundry.id ? ['--batch-size', MAGIC_ANVIL_BATCH_SIZE.toString()] : []),
331+
...(isAnvilTestChain(chainId) ? ['--batch-size', '8'] : []),
335332
...(shouldVerify ? ['--verify'] : []),
336333
];
337334
const forgeEnv = {
@@ -592,6 +589,7 @@ export const deployRollupForUpgrade = async (
592589
'--rpc-url',
593590
rpcUrl,
594591
'--broadcast',
592+
...(isAnvilTestChain(chainId) ? ['--batch-size', '8'] : []),
595593
];
596594
const forgeEnv = {
597595
FOUNDRY_PROFILE: chainId === mainnet.id ? 'production' : undefined,

0 commit comments

Comments
 (0)