Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently sequencer needs to
preparePayloadAttributes
before start building the next L2 block.optimism/op-node/rollup/sequencing/sequencer.go
Line 495 in ec45f66
However,
preparePayloadAttributes
functions rely oneth_getBlockByHash
JSON-RPC to fetch the L2 system config by obtaining the sequenced L2 block:optimism/op-service/sources/l2_client.go
Line 161 in 9480fcd
However, L2 block may be too large so that
eth_getBlockByHash
JSON-RPC takes a long time, blocking the process of the sequencer.In fact, only the first transaction in the previous L2 block is needed to fetch the L2 system config.
Therefore, this PR avoids
eth_getBlockByHash
JSON-RPC and useeth_getTransactionByBlockHashAndIndex
to fetch only the first transaction in the previous L2 block.Thus reducing latency in sequencing process.
This PR relies on https://github.com/megaeth-labs/mega-reth/pull/115