Skip to content

feat: rebase onto foundry v1.7.1#84

Draft
lean-apple wants to merge 84 commits into
mainfrom
lea/eng-3168-featphoundry-update-revm-and-alloy-dependencies
Draft

feat: rebase onto foundry v1.7.1#84
lean-apple wants to merge 84 commits into
mainfrom
lea/eng-3168-featphoundry-update-revm-and-alloy-dependencies

Conversation

@lean-apple
Copy link
Copy Markdown

@lean-apple lean-apple commented May 25, 2026

Target version : revm 38 / alloy 2

Ref ENG-3169

odyslam and others added 30 commits December 22, 2025 11:54
* feat: surface tx revert msg

* chore: cargo fmt

* fix: remove explicit lifetimes

* feat: surface assertion revert reasons

* fix: update tests

* fix: update signature

* nit: add fixme

* feat: print error as logs and use fail_slot instead of bail

* fix: accept single assertion contract

* chore: cleanup

* fix: Revert on Assertion execution fail

* fix: dependency

* chore: cargo fmt
Signed-off-by: odysseas.eth <odyslam@gmail.com>
* fix: use assertin executor from branch

* fix: assex version

* chore: add rust toolchain
* nit: update default src/test

* nit: make field pub

* fix: libs assertion defa

* fix: assertions not in lib
* fix: use unified interface

* fix: add comments

* chore: pin to rev
Signed-off-by: odysseas.eth <odyslam@gmail.com>
mateo-mro and others added 3 commits April 14, 2026 13:43
* Improve CI action (foundry-rs#14484)

* fix(config): warn instead of erroring on unknown FOUNDRY_PROFILE (foundry-rs#14486)

* fix(config): warn instead of erroring on unknown FOUNDRY_PROFILE

When the selected profile (via `FOUNDRY_PROFILE` or otherwise) does
not exist in `foundry.toml`, fall back to the default profile and
emit a `Warning::UnknownProfile` instead of returning a hard error.

This matches the lenient behaviour used for nested lib configs and
keeps commands like `FOUNDRY_PROFILE=ci forge build` working when
`[profile.ci]` happens to be missing.

Amp-Thread-ID: https://ampcode.com/threads/T-019dd43e-e2d0-723e-bc03-03b0467dc68e
Co-authored-by: Amp <amp@ampcode.com>

* fix fmt

---------

Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
* fix(cheatcodes): fix solc 0.8.35 error keyword warning (foundry-rs#14509)

fix(cheatcodes): avoid solc error keyword warning

(cherry picked from commit f0bd9bb)

* chore: bump compiler version to 0.8.35 for tests (foundry-rs#14524)

* bump compiler version for tests

* fix CI: update gas snapshots and bump svm-rs to 0.5.25

Amp-Thread-ID: https://ampcode.com/threads/T-019dddbd-7f28-72cc-965b-d5a23ecb37ce
Co-authored-by: Amp <amp@ampcode.com>

* make fmt

Amp-Thread-ID: https://ampcode.com/threads/T-019dddbd-7f28-72cc-965b-d5a23ecb37ce
Co-authored-by: Amp <amp@ampcode.com>

* fix: add blockTimestamp to LegacyTransactionResult for testRpcTransactionByHash

DRPC now returns a blockTimestamp field, which shifts ABI decoding offsets
and breaks the test.

Amp-Thread-ID: https://ampcode.com/threads/T-019dddbd-7f28-72cc-965b-d5a23ecb37ce
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
(cherry picked from commit 470d048)

* fix(ci): use `PATH_USD` fallback fee token in Mail templates (foundry-rs#14546)

(cherry picked from commit e8d0d89)

* fix(forge): ignore ETH_RPC_URL for test forking (foundry-rs#14555)

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: Mablr <59505383+mablr@users.noreply.github.com>
(cherry picked from commit 6c9bbea)

* fix(cli): fix jsonwebtoken panic (foundry-rs#14562)

`cast` panicked with this message coming from jsonwebtoken:

```
Call CryptoProvider::install_default() before this point to select a provider manually, or make sure exactly one of the
'rust_crypto' and 'aws_lc_rs' features is enabled.
See the documentation of the CryptoProvider type for more information.
```

This seemingly was introduced with the bump of jsonwebtoken to 10. Now
it requires you to pick one backend used by default controlled by the
compile time cargo features or call `CryptoProvider::install_default()`
at the beginning.

I realized that probably it would be better to just select the feature
and I picked `aws_lc_rs` as it seems to be increasingly a default and
we already are using the C toolchain.

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
(cherry picked from commit 6e40f56)

* ci: sign release archives, docker images, and publish SBOMs (foundry-rs#14563)

- release.yml: emit per-archive sha256 + SPDX SBOM (Syft), cosign
  keyless sign-blob of the archive, and use actions/attest@v4 for both
  build provenance and SBOM attestations. Upload all artifacts to the
  draft release.
- docker-publish.yml: enable BuildKit SBOM, capture the build digest,
  cosign keyless sign each pushed tag, and publish a Sigstore-signed
  SLSA provenance attestation via actions/attest with push-to-registry.
- SECURITY.md: document how external users verify archives and the
  docker image (gh attestation, cosign, plain sha256, buildx imagetools).
- README.md: link to the new verification section.

(cherry picked from commit 3e7f0ed)

* fix(ci): increase permissions for the enhanced attestation writing (foundry-rs#14584)

* increase permissions for artifact writing

* apply write permissions to release-docker

(cherry picked from commit 1fd6466)

* fix(forge): encode Tempo creates as AA calls (foundry-rs#14585)

(cherry picked from commit 8b44ae6)

* fix(cli): fix release version strings for immutable tags, bump to 1.7.1 (foundry-rs#14496)

* Fix release version metadata for immutable tags

Amp-Thread-ID: https://ampcode.com/threads/T-019dd617-b29f-7409-8523-9858a1504f17
Co-authored-by: Amp <amp@ampcode.com>

* Derive nightly release suffix from commit SHA

Amp-Thread-ID: https://ampcode.com/threads/T-019dd617-b29f-7409-8523-9858a1504f17
Co-authored-by: Amp <amp@ampcode.com>

* Apply suggestion from @zerosnacks

* Apply suggestion from @zerosnacks

* Apply suggestion from @zerosnacks

* bump to v1.7.1

* avoid appending whole sha hash, not necessary, handle version cmp correctly. after v1.7.1 release we need to bump to v1.7.2 for nightlies following it to compare correctly

* Make foundryVersionCmp tolerate new version format and add tests

- Strip both pre-release ('-nightly', '-dev') and build metadata ('+<sha>.<ts>.<profile>') from SEMVER_VERSION before comparison so the cheatcode keeps working for tagged releases (which have no '-' separator).
- Extract strip_semver_metadata helper and add Rust unit tests covering all SEMVER_VERSION shapes, version_cmp ordering, and parse_version rejection of pre-release/build/garbage input.
- Extend the Solidity test suite for vm.getFoundryVersion()/foundryVersionCmp/foundryVersionAtLeast: validate MAJOR.MINOR.PATCH parseability, build profile value, cmp/atLeast invariant, and error paths for invalid user-supplied versions.

Amp-Thread-ID: https://ampcode.com/threads/T-019dd971-fcb7-7149-9680-f0134130844c
Co-authored-by: Amp <amp@ampcode.com>

* fix(test): drop view from solidity tests using assert helpers and fix fmt

- assertTrue/assertEq aren't view, so testGetFoundryVersionBuildProfile and testFoundryVersionCmpAndAtLeastAreConsistent can't be view either.
- Collapse the buildType assertion onto one line to satisfy forge fmt.

Amp-Thread-ID: https://ampcode.com/threads/T-019dd971-fcb7-7149-9680-f0134130844c
Co-authored-by: Amp <amp@ampcode.com>

* test(version): assert build profile is non-empty instead of debug|release

The dist profile (used for distributed release binaries) is also valid; just require non-empty so any future profile works.

Amp-Thread-ID: https://ampcode.com/threads/T-019dd971-fcb7-7149-9680-f0134130844c
Co-authored-by: Amp <amp@ampcode.com>

* Normalize nightly-<sha> to nightly in release_version

Ensures tarball and Docker nightly artifacts produce the same version
string. The commit identifier is already included in the SemVer build
metadata (after `+`), so collapsing `nightly-<sha>` to `nightly`
avoids duplicating the SHA in the pre-release tag.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019df79e-d4c9-707c-85eb-2efbf59160b3

---------

Co-authored-by: Centaur AI <ai@centaur.local>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: zerosnacks <zerosnacks@protonmail.com>
(cherry picked from commit a70d4aa)

* fix(evm): query `state_snapshot.storage` in `ForkDbStateSnapshot::storage_ref` (foundry-rs#14007)

* fix(evm): query `state_snapshot.storage` in `ForkDbStateSnapshot::storage_ref`

* test(evm): cover `ForkDbStateSnapshot::storage_ref` snapshot lookup

(cherry picked from commit fa5429a)

* fix(cast): consistent `--json` output for `keychain` subcommands (foundry-rs#14590)

- `keychain rl`: wrap remaining limit in `{"remaining":"..."}` object
  instead of emitting a bare JSON string
- `keychain policy add-call`: emit
  `{"status":"already_present","target":"..."}`
  when the rule already exists, instead of plain text
- `send_keychain_tx`: wrap sponsor hash in `{"sponsor_hash":"0x..."}`
  object when --tempo.print-sponsor-hash is used with --json

Add CLI tests covering the rl and sponsor-hash JSON output shapes.

(cherry picked from commit 7916719)

* fix(cheatcodes): transfer value for payable mock calls (foundry-rs#14547)

* test: updated tests

* fix: execute value transfer

* test: improve

* imp: review item

* test: vm.prank test

* imp: moved mocked-call handling after prank application

---------

Co-authored-by: Mablr <59505383+mablr@users.noreply.github.com>
(cherry picked from commit f2e09d2)

* fix(forge): `--fuzz-seed` parameter is not effective in `forge coverage` (foundry-rs#14610)

fix --fuzz-seed not effective in forge coverage

(cherry picked from commit bd9cf55)

* fix(cheatcodes): enforce `expectRevert` reverter address for CREATE frames (foundry-rs#14615)

* fix(cheatcodes): enforce `expectRevert` reverter address for CREATE
frames

The reverter address argument to `vm.expectRevert` was silently ignored
when the innermost reverting frame was a CREATE (top-level or nested),
because create_end never populated `expected_revert.reverted_by`.

Mirror call_end's logic in create_end: when the outcome reverts and a
reverter address is expected, record outcome.address (revm guarantees
this is Some(would-be address) whenever the constructor executed).

Adds positive regression tests for top-level and nested-CREATE reverts,
and a negative regression test asserting wrong-reverter now fails.

Co-authored-by: Amp <amp@ampcode.com>

* improve coverage

* add Derek's suggested test cases

* fix: forge fmt for ExpectRevert.t.sol

Amp-Thread-ID: https://ampcode.com/threads/T-019dfdc5-5414-70b6-9f49-cb5797a37a29
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
(cherry picked from commit 85cd75c)

* fix(cheatcodes): preserve reverts with `expectEmit` (foundry-rs#14619)

* test: added regression test

* fix: re-order revert handling

* refactor: simplify

* lint: fmt

* polish: tighten comment, extend test with revert reason and custom error

Amp-Thread-ID: https://ampcode.com/threads/T-019dfd96-7a03-7249-8c10-af20ee2729f5
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
Co-authored-by: Amp <amp@ampcode.com>
(cherry picked from commit 2e8ae6c)

* fix(evm): preserve `CREATE` address on revert in isolation mode (foundry-rs#14637)

(cherry picked from commit 9584c6c)

* chore(clippy): fix for_kv_map and useless_borrows_in_formatting (foundry-rs#14554)

* chore(clippy): fix for_kv_map and useless_borrows_in_formatting

Amp-Thread-ID: https://ampcode.com/threads/T-019df0f9-62e7-74b8-bd5e-da2acce678fb
Co-authored-by: Amp <amp@ampcode.com>

* chore(clippy): drop redundant borrows in cheatcodes assert formatters

Amp-Thread-ID: https://ampcode.com/threads/T-019df0f9-62e7-74b8-bd5e-da2acce678fb
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
(cherry picked from commit 84d3873)

* fix(ext): bump forge-std commit in external integration tests (foundry-rs#14504)

bump forge commit

(cherry picked from commit 024820c)

* chore(tests): bump forge-std version (foundry-rs#14510)

chore: bump forge-std version used for tests

Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com>
(cherry picked from commit 5766929)

* fix(config): suppress spurious unknown-key warning for `network` (foundry-rs#14534)

* fix(config): suppress spurious unknown-key warning for `network`

The `network` field in `NetworkConfigs` had `skip_serializing_if =
"Option::is_none"`, so it was missing from the serialized default
`Config`. The warnings provider builds its allowed-keys set from that
serialized default, so a valid `network = "tempo"` entry in
foundry.toml triggered:

    Warning: Found unknown `network` config for profile `default`
    defined in foundry.toml.

Replace `skip_serializing_if` with `#[serde(default)]` so `network`
appears (as null) in the default config and is recognized as a known
profile key. TOML output is unchanged (None is omitted by toml-rs);
only the JSON snapshot in `test_default_config` needed updating.

Amp-Thread-ID: https://ampcode.com/threads/T-019ddec8-2f04-7255-b8bf-70c1ce2a996d
Co-authored-by: Amp <amp@ampcode.com>

* test(config): add regression tests for network/tempo unknown-key warnings

Cover both the new `network = "tempo"` form and the legacy
`tempo = true` alias to ensure neither triggers UnknownKey warnings.

Amp-Thread-ID: https://ampcode.com/threads/T-019ddec8-2f04-7255-b8bf-70c1ce2a996d
Co-authored-by: Amp <amp@ampcode.com>

* fix(config): canonicalize network field on serialization

Previously, with `network = "tempo"` set, `forge config` would emit
both:

    network = "tempo"
    tempo = false

which is misleading — the legacy boolean alias contradicts the resolved
network. Conversely, with `tempo = true` (legacy), the output omitted
`network` entirely, hiding the actual resolved network.

Make `NetworkConfigs` use a custom `Serialize` impl that:

- Always emits the *resolved* network as the canonical `network = "..."`
  field.
- Never emits the legacy `tempo` / `optimism` boolean aliases (they are
  still accepted as deserialize-only aliases for backward compatibility).
- Continues to emit `celo` and `bypass_prevrandao` as before.

This ensures consistent output regardless of input form:

    network = "tempo"  (canonical)   →  network = "tempo"
    tempo = true        (legacy)       →  network = "tempo"
    optimism = true     (legacy)       →  network = "optimism"

Both legacy keys are added to `BACKWARD_COMPATIBLE_KEYS` in the
warnings provider so they don't trigger unknown-key warnings on input.
Test snapshots updated accordingly.

Amp-Thread-ID: https://ampcode.com/threads/T-019ddec8-2f04-7255-b8bf-70c1ce2a996d
Co-authored-by: Amp <amp@ampcode.com>

* style: cargo fmt

Amp-Thread-ID: https://ampcode.com/threads/T-019ddec8-2f04-7255-b8bf-70c1ce2a996d
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
(cherry picked from commit 95bf101)

* feat(forge): use network = "tempo" and add rpc_endpoints in tempo template (foundry-rs#14528)

* feat(forge): use network = "tempo" and add rpc_endpoints in tempo template

Amp-Thread-ID: https://ampcode.com/threads/T-019dddff-1855-752f-b136-bd0465462ac8
Co-authored-by: Amp <amp@ampcode.com>

* feat(forge): add eth_rpc_url = "tempo" to tempo template

Amp-Thread-ID: https://ampcode.com/threads/T-019dddff-1855-752f-b136-bd0465462ac8
Co-authored-by: Amp <amp@ampcode.com>

* style: cargo fmt

Amp-Thread-ID: https://ampcode.com/threads/T-019dddff-1855-752f-b136-bd0465462ac8
Co-authored-by: Amp <amp@ampcode.com>

* fix: drop eth_rpc_url from tempo template (would silently fork all tests)

Amp-Thread-ID: https://ampcode.com/threads/T-019dddff-1855-752f-b136-bd0465462ac8
Co-authored-by: Amp <amp@ampcode.com>

* refactor: build tempo template foundry.toml in a single toml serialize

Amp-Thread-ID: https://ampcode.com/threads/T-019dddff-1855-752f-b136-bd0465462ac8
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
(cherry picked from commit 323bceb)

* ci(tempo): align ci-tempo workflow with master, drop fork-schedule test step

Backport of CI Tempo workflow updates (foundry-rs#14501, foundry-rs#14537, foundry-rs#14556) so the
v1.7.1 release branch matches master:

- Devnet checks run on PR and push (re-enabled)
- Devnet wallet tests run on PR and push
- Testnet/mainnet checks moved to nightly schedule only
- Nightly failure issue creation

The 'Check Tempo fork schedule compatibility' step is intentionally
omitted: the underlying tempo::tests::test_fork_schedule_parses_configured_rpcs
test was added in foundry-rs#14485 (Tempo deps bump) which is not part of v1.7.1.

Amp-Thread-ID: https://ampcode.com/threads/T-019e01cd-cea5-72e8-8338-5f0594e06335
Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: figtracer <me@figtracer.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Mablr <59505383+mablr@users.noreply.github.com>
Co-authored-by: Sergei Shulepov <s.pepyakin@gmail.com>
Co-authored-by: grandizzy <38490174+grandizzy@users.noreply.github.com>
Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
Co-authored-by: Centaur AI <ai@centaur.local>
Co-authored-by: zerosnacks <zerosnacks@protonmail.com>
Co-authored-by: Nikki <gutonosa@protonmail.com>
Co-authored-by: srdtrk <59252793+srdtrk@users.noreply.github.com>
Co-authored-by: lazymio <mio@lazym.io>
Co-authored-by: stevencartavia <112043913+stevencartavia@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 25, 2026

ENG-3168

ENG-3169

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 25, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 14 committers have signed the CLA.

✅ lean-apple
❌ ArshLabs
❌ Perico-perica46
❌ 0xrusowsky
❌ grandizzy
❌ stevencartavia
❌ figtracer
❌ github-actions[bot]
❌ brendanjryan
❌ cuiweixie
❌ dependabot[bot]
❌ ndavd
❌ zerosnacks
❌ mablr


github-actions[bot] seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@lean-apple lean-apple changed the title wip: rebase onto foundry v1.7.1 (revm 38 / alloy 2) wip: rebase onto foundry v1.7.1 May 25, 2026
@lean-apple lean-apple force-pushed the lea/eng-3168-featphoundry-update-revm-and-alloy-dependencies branch from f6c71b6 to b835ddd Compare May 25, 2026 10:55
- Port ExecutionResult test fixtures to revm 38 (gas: ResultGas, add logs)
- Drop unused tempo-contracts/tempo-precompiles deps from foundry-evm-traces
- Mark trivial setters as const fn (with_verbosity, with_label_disabled,
  with_chain_id, without_label, is_assertion_trigger, is_assertion)
- Simplify if/else with bool::then in credible.rs and decoder
- Replace Default + field assignment with struct literal in build_tx_env,
  build_block_env (alloy/revm Block trait has no blanket Into<BlockEnv>)
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 25, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​types/​node@​25.6.01001008196100
Updatednpm/​typescript@​5.9.3 ⏵ 6.0.3100 +110090 +19590
Addedcargo/​pretty_assertions@​1.4.110010090100100

View full report

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 25, 2026

All alerts resolved. Learn more about Socket for GitHub.

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report

- Ignore new advisories: RUSTSEC-2026-0012 (keccak ARMv8 asm), -0098/-0099
  (rustls-webpki name constraints), -0103 (thin-vec UAF), -0104 (rustls-webpki
  CRL panic). All awaiting upstream updates.
- Allow CC-BY-4.0 for font-awesome-as-a-crate (transitive doc icon set).
- Allow git sources for ethereum-optimism/optimism (OP fork: op-revm,
  alloy-op-*, op-alloy-*), tempoxyz/mpp-rs, paradigmxyz/reth-core.
@lean-apple lean-apple changed the title wip: rebase onto foundry v1.7.1 feat: rebase onto foundry v1.7.1 May 25, 2026
…vm test

- Regenerate testdata/utils/Vm.sol after cheatcodes spec drift
  (foundry-cheatcodes-spec::iface_up_to_date test was failing)
- Restore RUSTSEC-2026-0097 (rand unsoundness): still present at both
  rand 0.8.5 and 0.9.2 in lockfile; my prior prune was based on stale local DB
- Drop unused evm-glue entries from licenses.private and allow-git;
  the crate is no longer in the dep graph
- Skip test_svm_releases_linux_aarch64 with #[ignore]: svm-builds has not
  yet published linux-aarch64 binaries for LATEST_SOLC (0.8.34)
svm-rs 0.5.25 picks up the published linux-aarch64 binary entry for solc
0.8.34, which the older 0.5.22 release index was missing. Restores the
unmodified upstream svm test set (no #[ignore] hack needed).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants