diff --git a/build-images/Earthfile b/build-images/Earthfile index 0caa85228e0..8d3c577e459 100644 --- a/build-images/Earthfile +++ b/build-images/Earthfile @@ -88,13 +88,19 @@ osxcross: foundry-build: LET FOUNDRY_TAG = 25f24e677a6a32a62512ad4f561995589ac2c7dc FROM +base-build + # We use rustup rather than cargo to manage the cargo version via a tool-chain file + # It is done this way to avoid conflicting with noir builds + # This image should only be rebuilt when our foundry tag changes, so it should be extremely infrequent + RUN apt remove -y cargo + RUN apt update && apt install -y rustup RUN ulimit -n 65535 \ && git clone --depth 1 --branch nightly-$FOUNDRY_TAG https://github.com/foundry-rs/foundry.git \ && cd foundry \ - && cargo build --profile local \ + && echo '[toolchain]\nchannel = "1.80.0"\n' > rust-toolchain.toml \ + && cargo build --release \ && mkdir -p /opt/foundry/bin \ && for t in forge cast anvil chisel; do \ - mv ./target/local/$t /opt/foundry/bin/$t; \ + mv ./target/release/$t /opt/foundry/bin/$t; \ strip /opt/foundry/bin/$t; \ done \ && rm -rf /foundry diff --git a/l1-contracts/test/merkle/Frontier.t.sol b/l1-contracts/test/merkle/Frontier.t.sol index 719208f3c26..b6b8e3844a9 100644 --- a/l1-contracts/test/merkle/Frontier.t.sol +++ b/l1-contracts/test/merkle/Frontier.t.sol @@ -8,7 +8,10 @@ import {NaiveMerkle} from "./Naive.sol"; import {FrontierMerkle} from "../harnesses/Frontier.sol"; contract FrontierTest is Test { - function setUp() public {} + function setUp() public { + // Pause gas metering as calculating the root on each insert is expensive + vm.pauseGasMetering(); + } function testFrontier() public { uint256 depth = 10; diff --git a/l1-contracts/test/portals/TokenPortal.sol b/l1-contracts/test/portals/TokenPortal.sol index b7024677640..b6d0a503e14 100644 --- a/l1-contracts/test/portals/TokenPortal.sol +++ b/l1-contracts/test/portals/TokenPortal.sol @@ -118,7 +118,7 @@ contract TokenPortal { _amount, _withCaller ? msg.sender : address(0) ) - ) + ) }); IOutbox outbox = IRollup(registry.getRollup()).OUTBOX(); diff --git a/l1-contracts/test/portals/TokenPortal.t.sol b/l1-contracts/test/portals/TokenPortal.t.sol index 630b5106de3..d6c47232cff 100644 --- a/l1-contracts/test/portals/TokenPortal.t.sol +++ b/l1-contracts/test/portals/TokenPortal.t.sol @@ -88,7 +88,7 @@ contract TokenPortalTest is Test { abi.encodeWithSignature( "mint_private(bytes32,uint256)", secretHashForRedeemingMintedNotes, amount ) - ), + ), secretHash: secretHashForL2MessageConsumption }); } @@ -166,7 +166,7 @@ contract TokenPortalTest is Test { abi.encodeWithSignature( "withdraw(address,uint256,address)", recipient, withdrawAmount, _designatedCaller ) - ) + ) }) ); diff --git a/l1-contracts/test/portals/UniswapPortal.t.sol b/l1-contracts/test/portals/UniswapPortal.t.sol index ca30d52df47..aa3ee982ad0 100644 --- a/l1-contracts/test/portals/UniswapPortal.t.sol +++ b/l1-contracts/test/portals/UniswapPortal.t.sol @@ -90,7 +90,7 @@ contract UniswapPortalTest is Test { recipient: DataStructures.L1Actor(address(daiTokenPortal), block.chainid), content: Hash.sha256ToField( abi.encodeWithSignature("withdraw(address,uint256,address)", _recipient, amount, _caller) - ) + ) }); return message.sha256ToField(); @@ -122,7 +122,7 @@ contract UniswapPortalTest is Test { secretHash, _caller ) - ) + ) }); return message.sha256ToField(); @@ -153,7 +153,7 @@ contract UniswapPortalTest is Test { secretHash, _caller ) - ) + ) }); return message.sha256ToField(); diff --git a/yarn-project/end-to-end/scripts/docker-compose-no-sandbox.yml b/yarn-project/end-to-end/scripts/docker-compose-no-sandbox.yml index 3e59678e596..9070e754e8a 100644 --- a/yarn-project/end-to-end/scripts/docker-compose-no-sandbox.yml +++ b/yarn-project/end-to-end/scripts/docker-compose-no-sandbox.yml @@ -1,7 +1,7 @@ version: '3' services: fork: - image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc + image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-amd64 pull_policy: always entrypoint: > sh -c ' diff --git a/yarn-project/end-to-end/scripts/docker-compose-p2p.yml b/yarn-project/end-to-end/scripts/docker-compose-p2p.yml index 676c5343962..084bd0523cb 100644 --- a/yarn-project/end-to-end/scripts/docker-compose-p2p.yml +++ b/yarn-project/end-to-end/scripts/docker-compose-p2p.yml @@ -1,7 +1,7 @@ version: '3' services: fork: - image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc + image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-amd64 pull_policy: always entrypoint: 'anvil --silent -p 8545 --host 0.0.0.0 --chain-id 31337' expose: diff --git a/yarn-project/end-to-end/scripts/docker-compose-wallet.yml b/yarn-project/end-to-end/scripts/docker-compose-wallet.yml index 1934edcdf6e..b78db12fb97 100644 --- a/yarn-project/end-to-end/scripts/docker-compose-wallet.yml +++ b/yarn-project/end-to-end/scripts/docker-compose-wallet.yml @@ -1,7 +1,7 @@ version: '3' services: fork: - image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc + image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-amd64 pull_policy: always entrypoint: > sh -c ' diff --git a/yarn-project/end-to-end/scripts/docker-compose.yml b/yarn-project/end-to-end/scripts/docker-compose.yml index 273a9bf4d4a..a1c041d21c8 100644 --- a/yarn-project/end-to-end/scripts/docker-compose.yml +++ b/yarn-project/end-to-end/scripts/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: fork: - image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc + image: aztecprotocol/foundry:25f24e677a6a32a62512ad4f561995589ac2c7dc-amd64 pull_policy: always entrypoint: > sh -c '