foundry-rs / foundry-rs/foundry

feat(verify-bytecode): ignore immutable refs during runtime check

Open
#8,849 1 comment 0 reactions 0 assignees View on GitHub
C-forge Cmd-forge-vb T-feature T-post-V1
Dominant language
Rust
Stars
10.6k
Forks
2.6k
Avg merge
16h 38m
Merged PRs (30d)
511

Description

> By skipping immutables, do you mean we don't check the immutables that are embedded in the runtime code?
If yes, then NO; we do check them. Runtime codes are compared entirely.

Got it, in general I think that's the better and stronger approach. To take a step further, you can do: if no constructor arguments are passed AND no API key is passed (so forge has no constructor args), then it skips checking immutables. That would help cases like https://github.com/foundry-rs/foundry/issues/8617. In this case you would also want to include a message in the output indicating this difference

_Originally posted by @mds1 in https://github.com/foundry-rs/foundry/issues/8510#issuecomment-2278225473_

Contributor guide

Open the contributing guide

Research direction

The issue gives no source file, test, or entry point. Start by tracing Foundry's Rust implementation of verify-bytecode, especially runtime-code comparison, constructor arguments, and API-key handling; review issue 8617 for the motivating case. Done means the intended immutable-check behavior and its output message are specified and covered without weakening full runtime-code comparisons when inputs are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, solidity
Domain
blockchain, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.