From 5dbd7b227f598a9f5b3678fc6b9bab46089e03ab Mon Sep 17 00:00:00 2001 From: Dargon789 <64915515+Dargon789@users.noreply.github.com> Date: Sat, 25 Apr 2026 16:04:37 +0700 Subject: [PATCH 1/3] Update crates/anvil/server/src/handler.rs Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> --- crates/anvil/server/src/handler.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/anvil/server/src/handler.rs b/crates/anvil/server/src/handler.rs index 250c486986240..95659d9eefbf6 100644 --- a/crates/anvil/server/src/handler.rs +++ b/crates/anvil/server/src/handler.rs @@ -49,7 +49,9 @@ pub async fn handle_request( Request::Single(call) => handle_call(call, handler).await.map(Response::Single), Request::Batch(calls) => { if calls.is_empty() { - return Some(Response::error(RpcError::invalid_request())); + return Some(Response::Batch(vec![anvil_rpc::response::RpcResponse::from( + RpcError::invalid_request(), + )])); } future::join_all(calls.into_iter().map(move |call| handle_call(call, handler.clone()))) .map(responses_as_batch) From 5e16eb3fc44328c4a0b5b8ff3e0dec0e37d81d7c Mon Sep 17 00:00:00 2001 From: Dargon789 <64915515+Dargon789@users.noreply.github.com> Date: Tue, 28 Apr 2026 06:22:07 +0700 Subject: [PATCH 2/3] fix(forge): adjust gas assertion CounterWithFallback (foundry-rs#14465 ) (#498) * chore(deps): bump rui314/setup-mold from 725a8794d15fc7563f59595bd9556495c0564878 to 9c9c13bf4c3f1adef0cc596abc155580bcb04444 (#14442) chore(deps): bump rui314/setup-mold Bumps [rui314/setup-mold](https://github.com/rui314/setup-mold) from 725a8794d15fc7563f59595bd9556495c0564878 to 9c9c13bf4c3f1adef0cc596abc155580bcb04444. - [Commits](https://github.com/rui314/setup-mold/compare/725a8794d15fc7563f59595bd9556495c0564878...9c9c13bf4c3f1adef0cc596abc155580bcb04444) --- updated-dependencies: - dependency-name: rui314/setup-mold dependency-version: 9c9c13bf4c3f1adef0cc596abc155580bcb04444 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Update flake.lock (#14458) Co-authored-by: github-actions[bot] * fix(forge): adjust gas assertion `CounterWithFallback` (#14465) * chore: update latest benchmarks (#14467) * ci: split MPP e2e into its own workflow (#14468) * ci: split MPP e2e into its own workflow Move the MPP e2e step from ci-tempo.yml into a standalone ci-mpp.yml workflow so transient HTTP 402 failures from the MPP RPC do not block the Tempo CI workflow. Amp-Thread-ID: https://ampcode.com/threads/T-019dceb8-61e5-734f-b047-17665b4ea7d3 Co-authored-by: Amp * ci: rename sanity-check job to tempo-check Amp-Thread-ID: https://ampcode.com/threads/T-019dceb8-61e5-734f-b047-17665b4ea7d3 Co-authored-by: Amp * ci: rename mpp-e2e job to mpp-check Amp-Thread-ID: https://ampcode.com/threads/T-019dceb8-61e5-734f-b047-17665b4ea7d3 Co-authored-by: Amp --------- Co-authored-by: Amp * Improve GH actions (#14473) * fix(benches): add repos + extra args support to prevent blocking errors (#14470) * fix(benches): add repos + extra args support to prevent blocking errors * fix(ci): set `inputs.repos` default to empty * fix: remove `--verbose` flags * fix: exclude `uniswap/v4-core` `TickMathTestTest` --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] Co-authored-by: Mablr <59505383+mablr@users.noreply.github.com> Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Co-authored-by: Amp Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com> --- .github/workflows/benchmarks.yml | 50 ++++++++++++--- .github/workflows/ci-mpp.yml | 55 ++++++++++++++++ .github/workflows/ci-tempo.yml | 17 +---- .github/workflows/ci.yml | 6 +- .github/workflows/crate-checks.yml | 2 +- .github/workflows/docker-publish.yml | 1 + .github/workflows/docs.yml | 5 +- .github/workflows/release.yml | 7 +- .github/workflows/test-flaky.yml | 2 +- .github/workflows/test-isolate.yml | 2 +- .github/workflows/test.yml | 2 +- benches/LATEST.md | 79 ++++++++++++----------- benches/src/lib.rs | 96 +++++++++++++++++----------- benches/src/main.rs | 12 +++- crates/forge/tests/cli/cmd.rs | 2 +- flake.lock | 18 +++--- 16 files changed, 226 insertions(+), 130 deletions(-) create mode 100644 .github/workflows/ci-mpp.yml diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 8465874854551..9b7f834c420c7 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -15,15 +15,44 @@ on: type: string default: "stable,nightly" repos: - description: "Comma-separated list of repos to benchmark (e.g., ithacaxyz/account:main,Vectorized/solady)" + description: "Comma-separated repos to benchmark. Each entry: org/repo[:rev][ ] (e.g. vectorized/solady:v0.1.26 --nmc BrokenTest). Leave empty to use the per-benchmark default repo lists." required: false type: string - default: "ithacaxyz/account:v0.3.2,Vectorized/solady:v0.1.22" + default: "" env: - ITHACAXYZ_ACCOUNT: "ithacaxyz/account:v0.3.2" - VECTORIZED_SOLADY: "Vectorized/solady:v0.1.22" - DEFAULT_REPOS: "ithacaxyz/account:v0.3.2,Vectorized/solady:v0.1.22" + # Repos to benchmark per step. Each comma-separated entry has the form + # org/repo[:rev][ ] + # where anything after the first whitespace is appended to every benchmark + # command for that repo (use this to skip a broken test contract via e.g. + # `--nmc BrokenTest`, so a single failing test does not fail the whole CI). + TEST_REPOS: >- + ithacaxyz/account:v0.5.7, + vectorized/solady:v0.1.26 --nmc 'LifebuoyTest|LibBitTest|Base58Test', + aave/aave-v4:v0.5.11, + uniswap/v4-core:46c6834698c48bc4a463a86d8420f4eb1d7f3b75 --nmc 'TickMathTestTest', + sparkdotfi/spark-psm:v1.0.0 --nmc PSMInvariants_TimeBasedRateSetting_WithTransfers_WithPocketSetting + + ISOLATE_TEST_REPOS: >- + ithacaxyz/account:v0.5.7 --nmc SimulateExecuteTest, + vectorized/solady:v0.1.26 --nmc 'SafeTransferLibTest|LifebuoyTest|LibBitTest|Base58Test', + aave/aave-v4:v0.5.11, + uniswap/v4-core:46c6834698c48bc4a463a86d8420f4eb1d7f3b75 --nmc 'TickMathTestTest', + sparkdotfi/spark-psm:v1.0.0 --nmc PSMInvariants_TimeBasedRateSetting_WithTransfers_WithPocketSetting + + BUILD_REPOS: >- + ithacaxyz/account:v0.5.7, + vectorized/solady:v0.1.26, + aave/aave-v4:v0.5.11, + uniswap/v4-core:46c6834698c48bc4a463a86d8420f4eb1d7f3b75, + sparkdotfi/spark-psm:v1.0.0 + + COVERAGE_REPOS: >- + ithacaxyz/account:v0.5.7, + aave/aave-v4:v0.5.11, + uniswap/v4-core:46c6834698c48bc4a463a86d8420f4eb1d7f3b75, + sparkdotfi/spark-psm:v1.0.0 + RUSTC_WRAPPER: "sccache" jobs: @@ -48,7 +77,7 @@ jobs: with: toolchain: stable - - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 + - uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 @@ -78,7 +107,7 @@ jobs: env: FOUNDRY_DIR: ${{ github.workspace }}/.foundry VERSIONS: ${{ github.event.inputs.versions || 'stable,nightly' }} - REPOS: ${{ github.event.inputs.repos || env.DEFAULT_REPOS }} + REPOS: ${{ github.event.inputs.repos || env.TEST_REPOS }} run: | ./target/release/foundry-bench --output-dir ./benches --force-install \ --versions "$VERSIONS" \ @@ -90,7 +119,7 @@ jobs: env: FOUNDRY_DIR: ${{ github.workspace }}/.foundry VERSIONS: ${{ github.event.inputs.versions || 'stable,nightly' }} - REPOS: ${{ github.event.inputs.repos || env.VECTORIZED_SOLADY }} + REPOS: ${{ github.event.inputs.repos || env.ISOLATE_TEST_REPOS }} run: | ./target/release/foundry-bench --output-dir ./benches --force-install \ --versions "$VERSIONS" \ @@ -102,7 +131,7 @@ jobs: env: FOUNDRY_DIR: ${{ github.workspace }}/.foundry VERSIONS: ${{ github.event.inputs.versions || 'stable,nightly' }} - REPOS: ${{ github.event.inputs.repos || env.DEFAULT_REPOS }} + REPOS: ${{ github.event.inputs.repos || env.BUILD_REPOS }} run: | ./target/release/foundry-bench --output-dir ./benches --force-install \ --versions "$VERSIONS" \ @@ -114,10 +143,11 @@ jobs: env: FOUNDRY_DIR: ${{ github.workspace }}/.foundry VERSIONS: ${{ github.event.inputs.versions || 'stable,nightly' }} + REPOS: ${{ github.event.inputs.repos || env.COVERAGE_REPOS }} run: | ./target/release/foundry-bench --output-dir ./benches --force-install \ --versions "$VERSIONS" \ - --repos ${{ env.ITHACAXYZ_ACCOUNT }} \ + --repos "$REPOS" \ --benchmarks forge_coverage \ --output-file forge_coverage_bench.md diff --git a/.github/workflows/ci-mpp.yml b/.github/workflows/ci-mpp.yml new file mode 100644 index 0000000000000..00ec35f8f8aba --- /dev/null +++ b/.github/workflows/ci-mpp.yml @@ -0,0 +1,55 @@ +name: CI MPP + +permissions: {} + +on: + push: + branches: [master] + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + RUSTC_WRAPPER: "sccache" + +jobs: + mpp-check: + runs-on: depot-ubuntu-latest + timeout-minutes: 60 + permissions: + contents: read + steps: + # Checkout the repository + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master + with: + toolchain: stable + + - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 + - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2 + + # Build and install binaries + - name: Build and install Foundry binaries + run: | + cargo build --profile dev --locked -p forge -p cast -p anvil -p chisel + echo "${{ github.workspace }}/target/debug" >> "$GITHUB_PATH" + + - name: Run MPP e2e test + env: + TEMPO_KEYS_TOML_B64: ${{ secrets.TEMPO_KEYS_TOML_B64 }} + MPP_API_KEY: ${{ secrets.MPP_API_KEY }} + MPP_DEPOSIT: "1000000" + run: | + if [ -z "${TEMPO_KEYS_TOML_B64:-}" ]; then + echo "::warning::TEMPO_KEYS_TOML_B64 secret not set, skipping MPP e2e" + exit 0 + fi + mkdir -p ~/.tempo/wallet + echo "$TEMPO_KEYS_TOML_B64" | tr -d '[:space:]' | base64 -d > ~/.tempo/wallet/keys.toml + ./.github/scripts/tempo-mpp.sh "$(which cast | xargs dirname)" diff --git a/.github/workflows/ci-tempo.yml b/.github/workflows/ci-tempo.yml index 942f595a34977..b4bc98391e72d 100644 --- a/.github/workflows/ci-tempo.yml +++ b/.github/workflows/ci-tempo.yml @@ -36,7 +36,7 @@ env: RUSTC_WRAPPER: "sccache" jobs: - sanity-check: + tempo-check: runs-on: depot-ubuntu-latest timeout-minutes: 60 permissions: @@ -59,21 +59,6 @@ jobs: cargo build --profile dev --locked -p forge -p cast -p anvil -p chisel echo "${{ github.workspace }}/target/debug" >> "$GITHUB_PATH" - - name: Run MPP e2e test - if: github.event_name == 'push' || github.event_name == 'pull_request' - env: - TEMPO_KEYS_TOML_B64: ${{ secrets.TEMPO_KEYS_TOML_B64 }} - MPP_API_KEY: ${{ secrets.MPP_API_KEY }} - MPP_DEPOSIT: "1000000" - run: | - if [ -z "${TEMPO_KEYS_TOML_B64:-}" ]; then - echo "::warning::TEMPO_KEYS_TOML_B64 secret not set, skipping MPP e2e" - exit 0 - fi - mkdir -p ~/.tempo/wallet - echo "$TEMPO_KEYS_TOML_B64" | tr -d '[:space:]' | base64 -d > ~/.tempo/wallet/keys.toml - ./.github/scripts/tempo-mpp.sh "$(which cast | xargs dirname)" - # TODO(upstream): re-enable when flaky devnet faucet is fixed # - name: Run Tempo check on devnet # if: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d5564f94a7e2..9eb90a76cdbfd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master with: toolchain: stable - - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 + - uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - run: cargo test --workspace --doc --locked @@ -89,7 +89,7 @@ jobs: with: toolchain: nightly components: clippy - - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 + - uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - run: cargo clippy --workspace --all-targets --all-features --locked @@ -123,7 +123,7 @@ jobs: - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master with: toolchain: stable - - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 + - uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 - name: forge fmt diff --git a/.github/workflows/crate-checks.yml b/.github/workflows/crate-checks.yml index ce2988f3e0260..eb865bddc10e3 100644 --- a/.github/workflows/crate-checks.yml +++ b/.github/workflows/crate-checks.yml @@ -28,7 +28,7 @@ jobs: - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master with: toolchain: stable - - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 + - uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 - uses: taiki-e/install-action@58e862542551f667fa44c8a2a4a1d64ad477c96a # v2.75.17 with: tool: cargo-hack diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 3372e816328b7..5b7cf1631fea8 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -108,3 +108,4 @@ jobs: labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 push: true + no-cache: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 288d9d127592f..45d00708394f5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,6 @@ concurrency: env: CARGO_TERM_COLOR: always RUST_BACKTRACE: full - RUSTC_WRAPPER: "sccache" jobs: docs: @@ -30,9 +29,7 @@ jobs: - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master with: toolchain: nightly - - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 - - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 - - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 + - uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 - name: Build documentation run: cargo doc --workspace --all-features --no-deps --document-private-items --locked env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 351d8a334362d..9cb1cf51dda24 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -148,12 +148,7 @@ jobs: with: toolchain: stable targets: ${{ matrix.target }} - - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 - - - uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9 - if: ${{ contains(matrix.runner, 'depot') }} - - run: printf 'RUSTC_WRAPPER=sccache\n' >> "$GITHUB_ENV" - if: ${{ contains(matrix.runner, 'depot') }} + - uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 - name: Apple M1 setup if: matrix.target == 'aarch64-apple-darwin' diff --git a/.github/workflows/test-flaky.yml b/.github/workflows/test-flaky.yml index 7e3fa21d64b9a..d6244f826887e 100644 --- a/.github/workflows/test-flaky.yml +++ b/.github/workflows/test-flaky.yml @@ -32,7 +32,7 @@ jobs: - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master with: toolchain: stable - - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 + - uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 - uses: taiki-e/install-action@58e862542551f667fa44c8a2a4a1d64ad477c96a # v2.75.17 with: tool: nextest diff --git a/.github/workflows/test-isolate.yml b/.github/workflows/test-isolate.yml index 4446cdbba8ce6..141e3a049a73b 100644 --- a/.github/workflows/test-isolate.yml +++ b/.github/workflows/test-isolate.yml @@ -36,7 +36,7 @@ jobs: - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master with: toolchain: stable - - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 + - uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 - uses: taiki-e/install-action@58e862542551f667fa44c8a2a4a1d64ad477c96a # v2.75.17 with: tool: nextest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80a32068a21e3..eaa46c8e79f7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,7 +72,7 @@ jobs: with: toolchain: stable target: ${{ matrix.target }} - - uses: rui314/setup-mold@725a8794d15fc7563f59595bd9556495c0564878 # v1 + - uses: rui314/setup-mold@9c9c13bf4c3f1adef0cc596abc155580bcb04444 # v1 - uses: taiki-e/install-action@58e862542551f667fa44c8a2a4a1d64ad477c96a # v2.75.17 with: tool: nextest diff --git a/benches/LATEST.md b/benches/LATEST.md index 7ea1049a2ac41..238a691229389 100644 --- a/benches/LATEST.md +++ b/benches/LATEST.md @@ -1,6 +1,6 @@ # Foundry Benchmark Results -**Date**: 2025-10-02 12:14:23 +**Date**: 2026-04-24 23:10:24 ## Repositories Tested @@ -8,66 +8,67 @@ 2. [Vectorized/solady](https://github.com/Vectorized/solady) 3. [Uniswap/v4-core](https://github.com/Uniswap/v4-core) 4. [sparkdotfi/spark-psm](https://github.com/sparkdotfi/spark-psm) +5. [aave/aave-v4](https://github.com/aave/aave-v4) ## Foundry Versions -- **v1.3.6**: forge Version: 1.3.6-v1.3.6 (d241588 2025-09-16) -- **v1.4.0-rc1**: forge Version: 1.4.0-v1.4.0-rc1 (bd0e4a7 2025-10-01) +- **v1.5.1**: forge Version: 1.5.1-v1.5.1 (b0a9dd9 2025-12-19) +- **nightly**: forge Version: 1.6.0-nightly (a249f5c 2026-04-24) ## Forge Test -| Repository | v1.3.6 | v1.4.0-rc1 | -| -------------------- | ------- | ---------- | -| ithacaxyz-account | 3.17 s | 2.94 s | -| solady | 2.28 s | 2.10 s | -| Uniswap-v4-core | 7.27 s | 6.13 s | -| sparkdotfi-spark-psm | 43.04 s | 44.08 s | +| Repository | v1.5.1 | nightly | +| -------------------- | -------- | -------- | +| vectorized-solady | 1.46 s | 1.38 s | +| aave-aave-v4 | 4m 14.2s | 3m 29.1s | ## Forge Fuzz Test -| Repository | v1.3.6 | v1.4.0-rc1 | -| -------------------- | ------ | ---------- | -| ithacaxyz-account | 3.18 s | 3.02 s | -| solady | 2.39 s | 2.24 s | -| Uniswap-v4-core | 6.84 s | 6.20 s | -| sparkdotfi-spark-psm | 3.07 s | 2.72 s | +| Repository | v1.5.1 | nightly | +| -------------------- | --------- | -------- | +| ithacaxyz-account | 2.81 s | 1.59 s | +| vectorized-solady | 1.40 s | 1.34 s | +| Uniswap-v4-core | 3.01 s | 2.87 s | +| sparkdotfi-spark-psm | 2.04 s | 1.87 s | +| aave-aave-v4 | 3m 46.0s | 3m 17.3s | ## Forge Test (Isolated) -| Repository | v1.3.6 | v1.4.0-rc1 | -| -------------------- | ------- | ---------- | -| solady | 2.26 s | 2.41 s | -| Uniswap-v4-core | 7.22 s | 7.71 s | -| sparkdotfi-spark-psm | 45.53 s | 50.49 s | +| Repository | v1.5.1 | nightly | +| -------------------- | -------- | -------- | +| Uniswap-v4-core | 3.50 s | 3.48 s. | +| aave-aave-v4 | 4m 14.0s | 3m 53.4s | ## Forge Build (No Cache) -| Repository | v1.3.6 | v1.4.0-rc1 | -| -------------------- | ------- | ---------- | -| ithacaxyz-account | 9.16 s | 9.08 s | -| solady | 14.62 s | 14.69 s | -| Uniswap-v4-core | 2m 3.8s | 2m 5.3s | -| sparkdotfi-spark-psm | 13.17 s | 13.14 s | +| Repository | v1.5.1 | nightly | +| -------------------- | -------- | -------- | +| ithacaxyz-account | 26.06 s | 26.61 s | +| vectorized-solady | 14.20 s | 14.26 s | +| Uniswap-v4-core | 2m 1.3s | 2m 5.0s | +| sparkdotfi-spark-psm | 15.16 s | 15.30 s | +| aave-aave-v4 | 3m 37.0s | 3m 35.1s | ## Forge Build (With Cache) -| Repository | v1.3.6 | v1.4.0-rc1 | -| -------------------- | ------- | ---------- | -| ithacaxyz-account | 0.156 s | 0.113 s | -| solady | 0.089 s | 0.094 s | -| Uniswap-v4-core | 0.133 s | 0.127 s | -| sparkdotfi-spark-psm | 0.173 s | 0.131 s | +| Repository | v1.5.1 | nightly | +| -------------------- | ------- | ------- | +| ithacaxyz-account | 0.167 s | 0.201 s | +| vectorized-solady | 0.099 s | 0.098 s | +| Uniswap-v4-core | 0.139 s | 0.140 s | +| sparkdotfi-spark-psm | 0.168 s | 0.173 s | +| aave-aave-v4 | 0.370 s | 0.357 s | ## Forge Coverage -| Repository | v1.3.6 | v1.4.0-rc1 | -| -------------------- | -------- | ---------- | -| ithacaxyz-account | 14.91 s | 13.34 s | -| Uniswap-v4-core | 1m 34.8s | 1m 30.3s | -| sparkdotfi-spark-psm | 3m 49.3s | 3m 40.2s | +| Repository | v1.5.1 | nightly | +| -------------------- | --------- | ---------- | +| Uniswap-v4-core | 1m 13.9s | 1m 10.3s | +| sparkdotfi-spark-psm | 2m 54.7s | 2m 50.0s | +| aave-aave-v4 | 11m 20.8s | 10m 58.7s | ## System Information - **OS**: macos -- **CPU**: 8 -- **Rustc**: rustc 1.90.0-nightly (3014e79f9 2025-07-15) +- **CPU**: 12 +- **Rustc**: rustc 1.95.0 (59807616e 2026-04-14) \ No newline at end of file diff --git a/benches/src/lib.rs b/benches/src/lib.rs index ab3bec614e3cd..7ed8807cbf0f5 100644 --- a/benches/src/lib.rs +++ b/benches/src/lib.rs @@ -24,46 +24,53 @@ pub struct RepoConfig { pub org: String, pub repo: String, pub rev: String, + /// Optional extra arguments appended to every benchmark command for this + /// repo (e.g. `--nmc BrokenTest` to skip a broken test contract). + pub extra_args: Option, } impl FromStr for RepoConfig { type Err = eyre::Error; + /// Parse a repo spec of the form `org/repo[:rev][ ]`. + /// + /// Anything after the first whitespace is treated as extra arguments + /// appended to every benchmark command for this repo. fn from_str(spec: &str) -> Result { - // Split by ':' first to separate repo path from optional rev - let parts: Vec<&str> = spec.splitn(2, ':').collect(); - let repo_path = parts[0]; - let custom_rev = parts.get(1).copied(); - - // Now split the repo path by '/' - let path_parts: Vec<&str> = repo_path.split('/').collect(); - if path_parts.len() != 2 { - eyre::bail!("Invalid repo format '{}'. Expected 'org/repo' or 'org/repo:rev'", spec); - } - - let org = path_parts[0]; - let repo = path_parts[1]; + let spec = spec.trim(); + // Anything after the first whitespace is per-repo extra args. + let (head, extra_args) = match spec.split_once(char::is_whitespace) { + Some((head, rest)) => (head, Some(rest.trim().to_string())), + None => (spec, None), + }; - // Try to find this repo in BENCHMARK_REPOS to get the full config - let existing_config = BENCHMARK_REPOS.iter().find(|r| r.org == org && r.repo == repo); + let (repo_path, custom_rev) = match head.split_once(':') { + Some((path, rev)) => (path, Some(rev)), + None => (head, None), + }; - let config = if let Some(existing) = existing_config { - // Use existing config but allow custom rev to override - let mut config = existing.clone(); - if let Some(rev) = custom_rev { - config.rev = rev.to_string(); - } - config - } else { - // Create new config with custom rev or default - // Name should follow the format: org-repo (with hyphen) - Self { + let (org, repo) = repo_path.split_once('/').ok_or_else(|| { + eyre::eyre!("Invalid repo format '{spec}'. Expected 'org/repo' or 'org/repo:rev'") + })?; + + // Inherit defaults from BENCHMARK_REPOS when available, otherwise build + // a fresh config. Custom rev / extra args always override. + let mut config = BENCHMARK_REPOS + .iter() + .find(|r| r.org == org && r.repo == repo) + .cloned() + .unwrap_or_else(|| Self { name: format!("{org}-{repo}"), org: org.to_string(), repo: repo.to_string(), - rev: custom_rev.unwrap_or("main").to_string(), - } - }; + rev: "main".to_string(), + extra_args: None, + }); + + if let Some(rev) = custom_rev { + config.rev = rev.to_string(); + } + config.extra_args = extra_args; let _ = sh_println!("Parsed repo spec '{spec}' -> {config:?}"); Ok(config) @@ -78,12 +85,14 @@ pub fn default_benchmark_repos() -> Vec { org: "ithacaxyz".to_string(), repo: "account".to_string(), rev: "main".to_string(), + extra_args: None, }, RepoConfig { name: "solady".to_string(), org: "Vectorized".to_string(), repo: "solady".to_string(), rev: "main".to_string(), + extra_args: None, }, ] } @@ -113,6 +122,8 @@ pub struct BenchmarkProject { pub name: String, pub temp_project: TempProject, pub root_path: PathBuf, + /// Optional extra arguments appended to every benchmark command. + pub extra_args: Option, } impl BenchmarkProject { @@ -169,7 +180,20 @@ impl BenchmarkProject { Self::install_npm_dependencies(&root_path)?; sh_println!(" ✅ Project {} setup complete at {}", config.name, root); - Ok(Self { name: config.name.clone(), root_path, temp_project }) + Ok(Self { + name: config.name.clone(), + root_path, + temp_project, + extra_args: config.extra_args.clone(), + }) + } + + /// Append `self.extra_args` to a benchmark shell command, if any. + fn cmd(&self, base: &str) -> String { + match self.extra_args.as_deref().map(str::trim).filter(|s| !s.is_empty()) { + Some(extra) => format!("{base} {extra}"), + None => base.to_string(), + } } /// Install npm dependencies if package.json exists @@ -296,7 +320,7 @@ impl BenchmarkProject { self.hyperfine( "forge_test", version, - "forge test", + &self.cmd("forge test"), runs, Some("forge build"), None, @@ -315,7 +339,7 @@ impl BenchmarkProject { self.hyperfine( "forge_build_with_cache", version, - "FOUNDRY_LINT_LINT_ON_BUILD=false forge build", + &self.cmd("FOUNDRY_LINT_LINT_ON_BUILD=false forge build"), runs, None, Some("forge build"), @@ -335,7 +359,7 @@ impl BenchmarkProject { self.hyperfine( "forge_build_no_cache", version, - "FOUNDRY_LINT_LINT_ON_BUILD=false forge build", + &self.cmd("FOUNDRY_LINT_LINT_ON_BUILD=false forge build"), runs, Some("forge clean"), None, @@ -355,7 +379,7 @@ impl BenchmarkProject { self.hyperfine( "forge_fuzz_test", version, - r#"forge test --match-test "test[^(]*\([^)]+\)""#, + &self.cmd(r#"forge test --match-test "test[^(]*\([^)]+\)""#), runs, Some("forge build"), None, @@ -376,7 +400,7 @@ impl BenchmarkProject { self.hyperfine( "forge_coverage", version, - "forge coverage --ir-minimum", + &self.cmd("forge coverage --ir-minimum"), runs, None, None, @@ -396,7 +420,7 @@ impl BenchmarkProject { self.hyperfine( "forge_isolate_test", version, - "forge test --isolate", + &self.cmd("forge test --isolate"), runs, Some("forge build"), None, diff --git a/benches/src/main.rs b/benches/src/main.rs index f3361bf30b6e6..60e815cecb0ec 100644 --- a/benches/src/main.rs +++ b/benches/src/main.rs @@ -48,8 +48,16 @@ struct Cli { #[clap(long, value_delimiter = ',')] benchmarks: Option>, - /// Run only on specific repositories (comma-separated in org/repo[:rev] format: - /// ithacaxyz/account,Vectorized/solady:main,foundry-rs/foundry:v1.0.0) + /// Comma-separated list of repositories to benchmark. + /// + /// Each entry has the form `org/repo[:rev][ ]`. Anything + /// after the first whitespace is appended to every benchmark command for + /// that repo (handy to skip a broken test contract via e.g. + /// `--nmc BrokenTest`). + /// + /// Examples: + /// `ithacaxyz/account:v0.5.7` + /// `vectorized/solady:v0.1.26 --nmc 'LifebuoyTest|LibBitTest'` #[clap(long, value_delimiter = ',')] repos: Option>, } diff --git a/crates/forge/tests/cli/cmd.rs b/crates/forge/tests/cli/cmd.rs index 13bf5cfdbacce..d3f1503faf569 100644 --- a/crates/forge/tests/cli/cmd.rs +++ b/crates/forge/tests/cli/cmd.rs @@ -3016,7 +3016,7 @@ Ran 1 test suite [ELAPSED]: 1 tests passed, 0 failed, 0 skipped (1 total tests) { "contract": "test/FallbackWithCalldataTest.sol:CounterWithFallback", "deployment": { - "gas": 132471, + "gas": 132459, "size": 396 }, "functions": { diff --git a/flake.lock b/flake.lock index 4fa81efa24f11..27f426f491da6 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1776497206, - "narHash": "sha256-Em+RSdFnwyyKPGUBFtQYtVjm+1UvIc9gOR91Y22zlzg=", + "lastModified": 1777102577, + "narHash": "sha256-ycoy9svZOQgyInu/lwO7IEQtlP5liqYhEcF9m9hPRbM=", "owner": "nix-community", "repo": "fenix", - "rev": "df2295365fb081fe0745449762a771290782c22d", + "rev": "f37403486c59376cd285f9685a8ef8ff25c09a3c", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1776329215, - "narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=", + "lastModified": 1776949667, + "narHash": "sha256-GMSVw35Q+294GlrTUKlx087E31z7KurReQ1YHSKp5iw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b86751bc4085f48661017fa226dee99fab6c651b", + "rev": "01fbdeef22b76df85ea168fbfe1bfd9e63681b30", "type": "github" }, "original": { @@ -46,11 +46,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1776441750, - "narHash": "sha256-1rVfG+mj8R4ze+lSYCa4iAv7FzrB03Cprtxmd1MfZak=", + "lastModified": 1776800521, + "narHash": "sha256-f8YJfwAOsLFpIoqZuX3yF69UvMLrkx7iVzMH1pJU7cM=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "251df518d73abb5c5d573c4d5d266a3edae9ca5a", + "rev": "8954b66d43225e62c92e8bbcc8500191b5cceb1e", "type": "github" }, "original": { From 59652c1deddfdf41280b70e25448a1a1f9dd0c66 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 May 2026 04:01:37 +0000 Subject: [PATCH 3/3] chore(deps): bump tokio-tungstenite from 0.28.0 to 0.29.0 Bumps [tokio-tungstenite](https://github.com/snapview/tokio-tungstenite) from 0.28.0 to 0.29.0. - [Changelog](https://github.com/snapview/tokio-tungstenite/blob/master/CHANGELOG.md) - [Commits](https://github.com/snapview/tokio-tungstenite/compare/v0.28.0...v0.29.0) --- updated-dependencies: - dependency-name: tokio-tungstenite dependency-version: 0.29.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 12 +++++++++--- Cargo.toml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 781b2c7f02b50..f43958dad28a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5082,7 +5082,7 @@ dependencies = [ "tempo-primitives", "thiserror 2.0.18", "tokio", - "tokio-tungstenite 0.28.0", + "tokio-tungstenite 0.29.0", "toml", "tower", "tracing", @@ -10854,7 +10854,7 @@ dependencies = [ "solar-config", "solar-data-structures", "solar-macros", - "thiserror 2.0.18", + "thiserror 1.0.69", "tracing", "unicode-width 0.2.2", ] @@ -11187,7 +11187,7 @@ dependencies = [ "serde_json", "sha2 0.10.9", "tempfile", - "thiserror 2.0.18", + "thiserror 1.0.69", "url", "zip", ] @@ -11779,8 +11779,12 @@ checksum = "8f72a05e828585856dacd553fba484c242c46e391fb0e58917c942ee9202915c" dependencies = [ "futures-util", "log", + "rustls", + "rustls-pki-types", "tokio", + "tokio-rustls", "tungstenite 0.29.0", + "webpki-roots 0.26.11", ] [[package]] @@ -12174,6 +12178,8 @@ dependencies = [ "httparse", "log", "rand 0.9.4", + "rustls", + "rustls-pki-types", "sha1", "thiserror 2.0.18", ] diff --git a/Cargo.toml b/Cargo.toml index 253ed6afdf6fe..07e17f5051f91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -487,7 +487,7 @@ soldeer-core = { version = "=0.10.1", features = ["serde"] } strum = "0.27" tempfile = "3.23" tokio = "1" -tokio-tungstenite = { version = "0.28", features = ["rustls-tls-webpki-roots"] } +tokio-tungstenite = { version = "0.29", features = ["rustls-tls-webpki-roots"] } toml = "0.9" toml_edit = "0.24" tower = "0.5"