optimism
optimism copied to clipboard
contracts-bedrock: invariant test flake
The invariant tests can flake because they sometimes utilize contracts that they should not. This started happening after we added the ability to import L2 state using loadAllocs(string)
. forge-std
has a method assumeNoPrecompiles
here that we should be using. If this doesn't fix the flakes, we may also need to implement an addition to assumeNoPrecompiles
that also avoids calling the L2 implementations. Another solution would be to move the L1 contracts and L2 contracts into their own "chains" and be deliberate about switching between chains when interacting with the two. This is likely what we want to do long term, see here.
https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/35957/workflows/4ca544ed-faef-499b-9129-969b79d38f6d/jobs/1631834
Encountered 1 failing test in test/invariants/CrossDomainMessenger.t.sol:XDM_MinGasLimits_Succeeds
[FAIL. Reason: <no data>]
[Sequence]
sender=0x000000000000000000000000000000000000017a addr=[test/invariants/CrossDomainMessenger.t.sol:RelayActor]0x1E964AC317b4cAD5E2178E3B98752f08A1d2B9E7 calldata=relay(uint8,uint8,bytes) args=[253, 0, 0x0603c07e27e7c582dd318d07332e38bf6786e06e4f970005ebd4b1a2fe4951d759d703dc47dd6c941e5526f38b41e42815a35236d22021f8f42243ba231124cc1dc4c780bfee64e1dad80fc66cf5bcef]
sender=0x40fF5f219b95bF6Ac9dc48454FAD9266F0C6130a addr=[test/invariants/CrossDomainMessenger.t.sol:RelayActor]0x1E964AC317b4cAD5E2178E3B98752f08A1d2B9E7 calldata=relay(uint8,uint8,bytes) args=[101, 128, 0x0000000000000000000000000000000000000000000000000000000000002db6]
sender=0x4200000000000000000000000000000000000630 addr=[test/invariants/CrossDomainMessenger.t.sol:RelayActor]0x1E964AC317b4cAD5E2178E3B98752f08A1d2B9E7 calldata=relay(uint8,uint8,bytes) args=[94, 253, 0xd06f159705442bd32ef616b12f81e2cb22393f2182add8caace4665244bdad20b9efab1eec7ffe7c1f5e4c81582179ec1ccd83e3f4548b95]
sender=0x96d3F6c20EEd2697647F543fE6C08bC2Fbf39758 addr=0x4200000000000000000000000000000000000630 calldata=0x8f283970000000000000000000000000207b8adf30e1bfd8d15b99598d4116a51b70aee2 args=[]
sender=0x0000000000000000000000000000000000002fFa addr=[test/invariants/CrossDomainMessenger.t.sol:RelayActor]0x1E964AC317b4cAD5E2178E3B98752f08A1d2B9E7 calldata=relay(uint8,uint8,bytes) args=[233, 255, 0x5a1b3074836bcf5f4c63632e765a3efcf516e3db7203e997663751f4b6ade57309d69ba75289751cce14bb5c8be662fc2af9520190fe5173e7ac3801]
invariant_minGasLimits() (runs: 64, calls: 956, reverts: 217)
@tynes what's the status of this?
Not sure if fixed, I did add a commit trying to fix this