superchain-ops icon indicating copy to clipboard operation
superchain-ops copied to clipboard

SAFE_NONCE detection issues

Open maurelian opened this issue 2 years ago • 1 comments

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.

maurelian avatar Feb 27 '24 21:02 maurelian

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.

mds1 avatar Feb 28 '24 22:02 mds1

I believe this was due to the foundry version, so closing this issue, and we can investigate if we come across this again

mds1 avatar Oct 02 '24 00:10 mds1