ethereum-optimism / superchain-ops

29 stars 23 forks source link

SAFE_NONCE detection issues #91

Open maurelian opened 4 months ago

maurelian commented 4 months ago

In the 003 ceremony, one of the signers initially signed the wrong data, because the script set the SAFE_NONCE to 0.

ie. the output included this line:

Safe current nonce: 89
Creating transaction with nonce: 0

While debugging, we identified that this was fixed by removing this line from the .env file:

SAFE_NONCE=""

It seems that an empty string results in this try statement passing:

https://github.com/base-org/contracts/blob/3a566fcc0e01535cf93dbcef6704640cbde222aa/script/universal/MultisigBase.sol#L32-L35

However this is only observed on one signers' computer, whereas other signers, although using the same .env file, did not have this issue.

This signer has also had the same issue before.

mds1 commented 4 months ago

Can you check what forge version they are on? My guess is they're on an old foundry version that has a bug in the cheat where an empty string is parsed into 0.