-
Notifications
You must be signed in to change notification settings - Fork 2
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
Handle inbox error #22
base: op-es
Are you sure you want to change the base?
Handle inbox error #22
Conversation
TODO: handle failure when derive
} | ||
|
||
// only set GasLimit when inbox is EOA so that later on `EstimateGas` will be called | ||
if *l.inboxIsEOA { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When inboxIsEOA
, what is the GasLimit of the batchTx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core.IntrinsicGas(candidate.TxData, nil, false, true, true, false)
, the same as the GasLimit before this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry. I mean !inboxInEOA
case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be set later here by EstimateGas
.
When submiting, as
eth-client
is readily available so we check whetherbatchInboxAddr
isEOA
. If it'sEOA
then nothing is changed. Otherwise theGasLimit
is unset so later onestimate_gas
will be called to check for possible error.When deriving, in theory, we only need to check receipt status if
batchInboxAddr
is a contract.But the api provided by
L1Fetcher
is quite limited(noCodeAt
api) as it's also called byop-programe
.It doesn't seem worth it to add another key type to the hint/oracle just to save a call to
FetchReceipts
, and it's only called once every L1 block, so should not impact performance too much in general.