-
Notifications
You must be signed in to change notification settings - Fork 487
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
[NIT-2570] Avoids fetching batch in execution layer, consensus layer fills all necessary information regarding a batch to the execution layer #2377
Changes from all commits
095c5c8
4ca023e
3fca09b
c6bd24a
89fd178
17d04ec
4b71218
65fc8ea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -355,8 +355,7 @@ func (s *ExecutionEngine) resequenceReorgedMessages(messages []*arbostypes.Messa | |
log.Warn("skipping non-standard sequencer message found from reorg", "header", header) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want Lee's take on this, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As discussed in a meeting, this behavior will not be changed in this PR. |
||
continue | ||
} | ||
// We don't need a batch fetcher as this is an L2 message | ||
txes, err := arbos.ParseL2Transactions(msg.Message, s.bc.Config().ChainID, nil) | ||
txes, err := arbos.ParseL2Transactions(msg.Message, s.bc.Config().ChainID) | ||
if err != nil { | ||
log.Warn("failed to parse sequencer message found from reorg", "err", err) | ||
continue | ||
|
@@ -625,19 +624,13 @@ func (s *ExecutionEngine) createBlockFromNextMessage(msg *arbostypes.MessageWith | |
statedb.StartPrefetcher("TransactionStreamer") | ||
defer statedb.StopPrefetcher() | ||
|
||
batchFetcher := func(num uint64) ([]byte, error) { | ||
data, _, err := s.consensus.FetchBatch(s.GetContext(), num) | ||
return data, err | ||
} | ||
|
||
block, receipts, err := arbos.ProduceBlock( | ||
msg.Message, | ||
msg.DelayedMessagesRead, | ||
currentHeader, | ||
statedb, | ||
s.bc, | ||
s.bc.Config(), | ||
batchFetcher, | ||
isMsgForPrefetch, | ||
) | ||
|
||
|
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.
We want to make absolutley sure that in every way we can get a message to consensus client, it will always have the batchGasCost Filled.
I think there are other cases we want to cover, specifically:
legacyGetDelayedMessageAndAccumulator
GetDelayedMessageAccumulatorAndParentChainBlockNumber
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.
Covered those other cases.
We don't have tests covering L1MessageType_BatchPostingReport today, right?