From a5626422786ccb4576a5dc032dde0e5feb030bdb Mon Sep 17 00:00:00 2001 From: gzeon Date: Thu, 3 Oct 2024 00:13:05 +0800 Subject: [PATCH] docs: explain tofork no code size check --- src/bridge/Inbox.sol | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bridge/Inbox.sol b/src/bridge/Inbox.sol index 8559bf21..079a9f8a 100644 --- a/src/bridge/Inbox.sol +++ b/src/bridge/Inbox.sol @@ -109,6 +109,7 @@ contract Inbox is AbsInbox, IInbox { if (!_chainIdChanged()) revert NotForked(); // solhint-disable-next-line avoid-tx-origin if (msg.sender != tx.origin) revert NotOrigin(); + // no code size check required because we only want to know if msg.sender is an EOA to undo alias // arbos will discard unsigned tx with gas limit too large if (gasLimit > type(uint64).max) { revert GasLimitTooLarge(); @@ -142,6 +143,7 @@ contract Inbox is AbsInbox, IInbox { if (!_chainIdChanged()) revert NotForked(); // solhint-disable-next-line avoid-tx-origin if (msg.sender != tx.origin) revert NotOrigin(); + // no code size check required because we only want to know if msg.sender is an EOA to undo alias // arbos will discard unsigned tx with gas limit too large if (gasLimit > type(uint64).max) { revert GasLimitTooLarge(); @@ -174,6 +176,7 @@ contract Inbox is AbsInbox, IInbox { if (!_chainIdChanged()) revert NotForked(); // solhint-disable-next-line avoid-tx-origin if (msg.sender != tx.origin) revert NotOrigin(); + // no code size check required because we only want to know if msg.sender is an EOA to undo alias // arbos will discard unsigned tx with gas limit too large if (gasLimit > type(uint64).max) { revert GasLimitTooLarge();