Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
cdc4ddd8
Unverified
Commit
cdc4ddd8
authored
Jan 28, 2022
by
Matthew Slipper
Committed by
GitHub
Jan 28, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2093 from ethereum-optimism/sc/bss-ts-fix
fix(bss): have BSS correctly create new contexts
parents
5c5dc0c9
b8b59319
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
shaggy-stingrays-compare.md
.changeset/shaggy-stingrays-compare.md
+5
-0
tx-batch-submitter.ts
...batch-submitter/src/batch-submitter/tx-batch-submitter.ts
+11
-2
No files found.
.changeset/shaggy-stingrays-compare.md
0 → 100644
View file @
cdc4ddd8
---
'
@eth-optimism/batch-submitter'
:
patch
---
Adds a fix for the BSS to account for new timestamp logic in L2Geth
packages/batch-submitter/src/batch-submitter/tx-batch-submitter.ts
View file @
cdc4ddd8
...
@@ -685,10 +685,18 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
...
@@ -685,10 +685,18 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
queued
:
BatchElement
[]
queued
:
BatchElement
[]
}
>
=
[]
}
>
=
[]
for
(
const
block
of
blocks
)
{
for
(
const
block
of
blocks
)
{
// Create a new context in certain situations
if
(
if
(
(
lastBlockIsSequencerTx
===
false
&&
block
.
isSequencerTx
===
true
)
||
// If there are no contexts yet, create a new context.
groupedBlocks
.
length
===
0
||
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
)
(
block
.
blockNumber
!==
lastBlockNumber
&&
block
.
isSequencerTx
===
true
)
)
{
)
{
groupedBlocks
.
push
({
groupedBlocks
.
push
({
...
@@ -696,6 +704,7 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
...
@@ -696,6 +704,7 @@ export class TransactionBatchSubmitter extends BatchSubmitter {
queued
:
[],
queued
:
[],
})
})
}
}
const
cur
=
groupedBlocks
.
length
-
1
const
cur
=
groupedBlocks
.
length
-
1
block
.
isSequencerTx
block
.
isSequencerTx
?
groupedBlocks
[
cur
].
sequenced
.
push
(
block
)
?
groupedBlocks
[
cur
].
sequenced
.
push
(
block
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment