-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge Version: 1.3.5-nightly Commit SHA: b3ee87d Build Timestamp: 2025-09-12T06:02:45.831574300Z (1757656965) Build Profile: maxperf
What version of Foundryup are you on?
No response
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
This issue probably appeared in version 1.3, it doesn't appear in 1.2.3.
Wonder if this is related to #11021
I tried to check if the address 0xffD4505B3452Dc22f8473616d50503bA9E1710Ac
has a nonce or code deployed but found that this isn't the case.
git clone --branch ab/update-alloy https://github.com/espressosystems/espresso-network
cargo build --bin diff-test
export PATH="$PWD/target/debug:$PATH"
forge test --match-test testUpgradesSameProxyAddress --match-contract LightClientUpgradeSameContractTest -vvvv
The error happens here: https://github.com/EspressoSystems/espresso-network/blob/4296090bc0f00152a8fbede1030cc7dd7547e09e/contracts/test/script/LightClientTestScript.s.sol#L206
an 1 test for contracts/test/LightClientUpgradeSameContract.t.sol:LightClientUpgradeSameContractTest
[FAIL: EvmError: Revert] testUpgradesSameProxyAddress() (gas: 1040430453)
Traces:
[2751198] LightClientUpgradeSameContractTest::setUp()
├─ [2582974] DeployLightClientContractWithoutMultiSigScript::run(5, 864000 [8.64e5])
│ ├─ [0] VM::toString(5) [staticcall]
│ │ └─ ← [Return] "5"
│ ├─ [0] VM::ffi(["diff-test", "mock-genesis", "5"])
│ │ └─ ← [Return] 0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d20000000000000000000000000000000000000000000000000000000000000006219a25b0eb67ec09251a6f5abc377de144a6e81b7f0c4a01aa8eba3801f89dce2599254c85754d3eb4cb4f899ae0a9368251832178d80a16ab726e4ad6f3839d0984356b754b1298c3e987e0023bd6be4731dfaf7f6818d7487890b3a5224428
│ ├─ [0] VM::envString("MNEMONIC") [staticcall]
│ │ └─ ← [Return] <env var value>
│ ├─ [0] VM::envUint("MNEMONIC_OFFSET") [staticcall]
│ │ └─ ← [Return] <env var value>
│ ├─ [0] VM::deriveKey(<pk>) [staticcall]
│ │ └─ ← [Return] <pk>
│ ├─ [0] VM::rememberKey(<pk>)
│ │ └─ ← [Return] 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
│ ├─ [0] VM::startBroadcast(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)
│ │ └─ ← [Return]
│ ├─ [2245945] → new LightClient@0x5FbDB2315678afecb367f032d93F642f64180aa3
│ │ ├─ emit Initialized(version: 18446744073709551615 [1.844e19])
│ │ └─ ← [Return] 11100 bytes of code
│ ├─ [258556] → new ERC1967Proxy@0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
│ │ ├─ emit Upgraded(implementation: LightClient: [0x5FbDB2315678afecb367f032d93F642f64180aa3])
│ │ ├─ [209223] LightClient::initialize(LightClientState({ viewNum: 0, blockHeight: 0, blockCommRoot: 1234 }), StakeTableState({ threshold: 6, blsKeyComm: 15198678585580246251692354046620241178086945668772252070628837665439280045518 [1.519e76], schnorrKeyComm: 17006160426117517054610525022479724455324142717962158209641183699803667923869 [1.7e76], amountComm: 4304408139423238731343082571489453362516085327388746424813874223755915576360 [4.304e75] }), 864000 [8.64e5], 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266) [delegatecall]
│ │ │ ├─ emit OwnershipTransferred(previousOwner: 0x0000000000000000000000000000000000000000, newOwner: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)
│ │ │ ├─ emit Initialized(version: 1)
│ │ │ └─ ← [Stop]
│ │ └─ ← [Return] 122 bytes of code
│ ├─ [0] VM::stopBroadcast()
│ │ └─ ← [Return]
│ └─ ← [Return] ERC1967Proxy: [0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512], 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266, LightClientState({ viewNum: 0, blockHeight: 0, blockCommRoot: 1234 }), StakeTableState({ threshold: 6, blsKeyComm: 15198678585580246251692354046620241178086945668772252070628837665439280045518 [1.519e76], schnorrKeyComm: 17006160426117517054610525022479724455324142717962158209641183699803667923869 [1.7e76], amountComm: 4304408139423238731343082571489453362516085327388746424813874223755915576360 [4.304e75] })
└─ ← [Stop]
[1040430453] LightClientUpgradeSameContractTest::testUpgradesSameProxyAddress()
├─ [5181] ERC1967Proxy::fallback() [staticcall]
│ ├─ [294] LightClient::getVersion() [delegatecall]
│ │ └─ ← [Return] 1, 0, 0
│ └─ ← [Return] 1, 0, 0
├─ [0] VM::assertEq(1, 1) [staticcall]
│ └─ ← [Return]
├─ [0] VM::assertEq(0, 0) [staticcall]
│ └─ ← [Return]
├─ [0] VM::assertEq(0, 0) [staticcall]
│ └─ ← [Return]
├─ [1040409091] UpgradeToSameLightClientWithoutMultisigAdminScript::run(ERC1967Proxy: [0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512])
│ ├─ [0] VM::envString("MNEMONIC") [staticcall]
│ │ └─ ← [Return] <env var value>
│ ├─ [0] VM::envUint("MNEMONIC_OFFSET") [staticcall]
│ │ └─ ← [Return] <env var value>
│ ├─ [0] VM::deriveKey(<pk>) [staticcall]
│ │ └─ ← [Return] <pk>
│ ├─ [0] VM::rememberKey(<pk>)
│ │ └─ ← [Return] 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
│ ├─ [0] VM::startBroadcast(0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266)
│ │ └─ ← [Return]
│ ├─ [0] → new <unknown>@0xffD4505B3452Dc22f8473616d50503bA9E1710Ac
│ │ └─ ← [CreateCollision]
│ └─ ← [Revert] EvmError: Revert
└─ ← [Revert] EvmError: Revert
Suite result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 19.43ms (1.33ms CPU time)
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Completed