taiko-mono icon indicating copy to clipboard operation
taiko-mono copied to clipboard

fix(protocol): fix two bridge bugs with additional tests

Open dantaik opened this issue 9 months ago • 1 comments

Bugs

  • When message.destOwner calls processMessage, gasleft() should be used to invoke the message call, not _invocationGasLimit(_message, true).

  • If the following statement is evaluated to be true, it will always be true, thus retryMessage won't work. The fix makes sure we send ether to message.destOwner instead.

 _message.data.length >= 4
&& bytes4(_message.data) != IMessageInvocable.onMessageInvocation.selector
&& _message.to.isContract()

Improvements

  • checks src and dest chain IDs more carefully

dantaik avatar May 04 '24 15:05 dantaik

fix(protocol): fix two bridge bugs with additional tests

Generated at commit: bdd09a2a3a1ef7e40b8fcac0db5806e14a604ed2

🚨 Report Summary

Severity Level Results
Contracts Critical High Medium Low Note Total 2 2 0 5 41 50
Dependencies Critical High Medium Low Note Total 0 0 0 0 0 0

For more details view the full report in OpenZeppelin Code Inspector

openzeppelin-code[bot] avatar May 04 '24 15:05 openzeppelin-code[bot]