Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/shaggy-stingrays-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@eth-optimism/batch-submitter': patch
---

Adds a fix for the BSS to account for new timestamp logic in L2Geth
Original file line number Diff line number Diff line change
Expand Up @@ -685,17 +685,26 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
queued: BatchElement[]
}> = []
for (const block of blocks) {
// Create a new context in certain situations
if (
(lastBlockIsSequencerTx === false && block.isSequencerTx === true) ||
// If there are no contexts yet, create a new context.
groupedBlocks.length === 0 ||
(block.timestamp !== lastTimestamp && block.isSequencerTx === true) ||
// If the last block was an L1 to L2 transaction, but the next block is a Sequencer
// transaction, create a new context.
(lastBlockIsSequencerTx === false && block.isSequencerTx === true) ||
// If the timestamp of the last block differs from the timestamp of the current block,
// create a new context. Applies to both L1 to L2 transactions and Sequencer transactions.
block.timestamp !== lastTimestamp ||
// If the block number of the last block differs from the block number of the current block,
// create a new context. ONLY applies to Sequencer transactions.
(block.blockNumber !== lastBlockNumber && block.isSequencerTx === true)
) {
groupedBlocks.push({
sequenced: [],
queued: [],
})
}

const cur = groupedBlocks.length - 1
block.isSequencerTx
? groupedBlocks[cur].sequenced.push(block)
Expand Down