-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(L2toL2CDM): revert on target call failure in relayMessage
#12526
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @tremarkley and the rest of your teammates on Graphite |
19855aa
to
64e261a
Compare
Semgrep found 1 No |
64e261a
to
6baaa61
Compare
L2ToL2CrossDomainMessenger#relayMessage
L2ToL2CrossDomainMessenger#relayMessage
relayMessage
fe96cba
to
24aa0e4
Compare
relayMessage
relayMessage
24aa0e4
to
87b9e70
Compare
This may impact the rollback feature, if its problematic then we can figure out how to make the rollback feature work well on top of this given the gas estimation issues using the old scheme |
Closes Issue #143
Summary:
This PR updates the
L2ToL2CrossDomainMessenger#relayMessage
to revert when the target contract call fails.Problem:
Previously, when the target contract call within
relayMessage
failed, it would only emit aFailedRelayedMessage
. This caused gas estimation tools to produce unreliable estimates. Specifically, gas estimators would return the minimum amount of gas required forrelayMessage
itself to succeed, without accounting for the actual gas needed by the target contract call.Solution:
By introducing a revert when the target call fails, we ensure that gas estimation tools are forced to include the gas required for the target call to succeed. This leads to more accurate and consistent gas estimates across different tools and scenarios, particularly when interacting with complex contracts where gas usage can vary significantly.
Impact: