fix(CI): Fail CI if contracts-bedrock tests fail#5475
Conversation
|
✅ Deploy Preview for opstack-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
|
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
06d244d to
f8a747b
Compare
f8a747b to
a526d8a
Compare
maurelian
left a comment
There was a problem hiding this comment.
Left a nit, but overall LGTM.
packages/contracts-bedrock/contracts/test/invariants/CrossDomainMessenger.t.sol
Show resolved
Hide resolved
|
This PR has been added to the merge queue, and will be merged soon. |
|
This PR is next in line to be merged, and will be merged as soon as checks pass. |
|
This PR is next in line to be merged, and will be merged as soon as checks pass. |
`CrossDomainMessager` whereby `relayMessage` naively reset the `xDomainMsgSender` after a call. The issue here was that a nested call would reset this value to the `Constants.DEFAULT_L2_SENDER` which deviates from the expected behavior that the `xDomainMsgSender` is set to the `_sender` for the entirety of the subcall. This change sets a message as failed upon re-entry to the `relayMessage` function by checking the value of `xDomainMsgSender`. We then also remove the `reentrancyLocks` from storage and don't have to worry about re-entrency here since any subcall through the `SafeCall` lib to the XDM `relayMessage` will be caught and recorded as failed by the aforementioned `xDomainMsgSender` check. Also removes the revert in `relayMessage` when the minimum gas threshold is not met. See: - ethereum-optimism/optimism#5475 - ethereum-optimism/optimism#5444 - ethereum-optimism/optimism#5493 - ethereum-optimism/optimism#5508

Overview
Adds a new task to CI,
contracts-bedrock-tests, which runsforge testrather thanforge coverage.forge coveragewill not return an error exit code if any tests that it runs fail.