Skip to content
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

Open
wants to merge 5 commits into
base: op-es
Choose a base branch
from

Conversation

blockchaindevsh
Copy link

@blockchaindevsh blockchaindevsh commented Apr 4, 2024

When submiting, as eth-client is readily available so we check whether batchInboxAddr is EOA. If it's EOA then nothing is changed. Otherwise the GasLimit is unset so later on estimate_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(no CodeAt api) as it's also called by op-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.

}

// only set GasLimit when inbox is EOA so that later on `EstimateGas` will be called
if *l.inboxIsEOA {
Copy link

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?

Copy link
Author

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.

Copy link

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.

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants