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
b9c037f0
Unverified
Commit
b9c037f0
authored
Feb 02, 2022
by
Matthew Slipper
Committed by
GitHub
Feb 02, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2119 from cfromknecht/bss-timestamp-fix
fix: mimic BSS timestamp bug fix from #2093
parents
f3989c03
d093a6bb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
many-seals-argue.md
.changeset/many-seals-argue.md
+5
-0
batch.go
go/batch-submitter/drivers/sequencer/batch.go
+10
-10
No files found.
.changeset/many-seals-argue.md
0 → 100644
View file @
b9c037f0
---
'
@eth-optimism/batch-submitter-service'
:
patch
---
Adds a fix for the BSS to account for the new timestamp logic in L2Geth
go/batch-submitter/drivers/sequencer/batch.go
View file @
b9c037f0
...
...
@@ -91,11 +91,10 @@ func GenSequencerBatchParams(
// Iterate over the batch elements, grouping the elements according to
// the following critera:
// - All
sequencer txs in the same group must have the same timestamp
//
and
block number.
// - All
txs in the same group must have the same timestamp.
//
- All sequencer txs in the same group must have the same
block number.
// - If sequencer txs exist in a group, they must come before all
// queued txs.
// - A group should never split consecutive queued txs.
//
// Assuming the block and timestamp criteria for sequencer txs are
// respected within each group, the following are examples of groupings:
...
...
@@ -110,17 +109,18 @@ func GenSequencerBatchParams(
// To enforce the above groupings, the following condition is
// used to determine when to create a new batch:
// - On the first pass, or
// - Whenever a sequecer tx is observed, and:
// - The preceding tx has a different timestamp, or
// - Whenever a sequencer tx is observed, and:
// - The preceding tx was a queued tx, or
// - The preceding sequencer tx has a different
//
block number/timestamp.
//
Note that a sequencer tx is required to create a new group,
//
so a queued tx may ONLY exist as the first element in a group
//
if it is the very first element
.
// - The preceding sequencer tx has a different
block number.
//
Note that a sequencer tx is usually required to create a new group,
//
so a queued tx may ONLY exist as the first element in a group if it
//
is the very first element or it has a different timestamp from the
//
preceding tx
.
needsNewGroupOnSequencerTx
:=
!
lastBlockIsSequencerTx
||
el
.
Timestamp
!=
lastTimestamp
||
el
.
BlockNumber
!=
lastBlockNumber
if
len
(
groupedBlocks
)
==
0
||
el
.
Timestamp
!=
lastTimestamp
||
(
el
.
IsSequencerTx
()
&&
needsNewGroupOnSequencerTx
)
{
groupedBlocks
=
append
(
groupedBlocks
,
groupedBlock
{})
...
...
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