You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Is your feature request related to a problem? Please describe. xDomainMessageSender will continue to return the sender of the last message until the next message is relayed.
This shouldn't be an issue for the most part since relayMessage has a reentrancy guard and every contract consuming xDomainMessageSender should also be checking that msg.sender is the Optimism messenger. That being said, it could lead to some weird behavior and is easy to fix.
Describe the solution you'd like
Consider either zeroing out xDomainMessageSender after the calls here and here or setting is to an address like 0x000000000000000000000000000000000000dead. Either one should result in some gas savings since the transaction will always reset the storage slot to the same value that it was at the beginning of the transaction. Each option will have slightly different gas implications (I'd recommend setting to the dead address).
Basically, it should improve security and save a bit of gas.
Describe alternatives you've considered
Leave as is
Is your feature request related to a problem? Please describe.
xDomainMessageSenderwill continue to return the sender of the last message until the next message is relayed.This shouldn't be an issue for the most part since
relayMessagehas a reentrancy guard and every contract consumingxDomainMessageSendershould also be checking thatmsg.senderis the Optimism messenger. That being said, it could lead to some weird behavior and is easy to fix.Describe the solution you'd like
Consider either zeroing out xDomainMessageSender after the calls here and here or setting is to an address like
0x000000000000000000000000000000000000dead. Either one should result in some gas savings since the transaction will always reset the storage slot to the same value that it was at the beginning of the transaction. Each option will have slightly different gas implications (I'd recommend setting to the dead address).Basically, it should improve security and save a bit of gas.
Describe alternatives you've considered
Leave as is