diff --git a/src/bridge/AbsInbox.sol b/src/bridge/AbsInbox.sol index 35256220..6f67ba69 100644 --- a/src/bridge/AbsInbox.sol +++ b/src/bridge/AbsInbox.sol @@ -297,7 +297,10 @@ abstract contract AbsInbox is DelegateCallAware, PausableUpgradeable, IInboxBase revert GasLimitTooLarge(); } - uint256 submissionFee = calculateRetryableSubmissionFee(data.length, block.basefee); + // we use 0 instead of block.basefee to workaround a geth gas estimation quirk where + // the code path (and hence gas usage) would be different depending on block.basefee + // the final behavior is the same since block.basefee is used when 0 is specified to calculateRetryableSubmissionFee + uint256 submissionFee = calculateRetryableSubmissionFee(data.length, 0); if (maxSubmissionCost < submissionFee) revert InsufficientSubmissionCost(submissionFee, maxSubmissionCost);