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
c0d92e66
Unverified
Commit
c0d92e66
authored
Oct 16, 2023
by
pcw109550
Committed by
protolambda
Oct 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comments for l1Blocks field of batch queue
parent
c6d39019
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
batch_queue.go
op-node/rollup/derive/batch_queue.go
+6
-0
batches.go
op-node/rollup/derive/batches.go
+1
-0
No files found.
op-node/rollup/derive/batch_queue.go
View file @
c0d92e66
...
...
@@ -45,6 +45,12 @@ type BatchQueue struct {
prev
NextBatchProvider
origin
eth
.
L1BlockRef
// l1Blocks contains consecutive eth.L1BlockRef sorted by time.
// Every L1 origin of unsafe L2 blocks must be eventually included in l1Blocks.
// Batch queue's job is to ensure below two rules:
// If every L2 block corresponding to single L1 block becomes safe, it will be popped from l1Blocks.
// If new L2 block's L1 origin is not included in l1Blocks, fetch and push to l1Blocks.
// length of l1Blocks never exceeds SequencerWindowSize
l1Blocks
[]
eth
.
L1BlockRef
// batches in order of when we've first seen them
...
...
op-node/rollup/derive/batches.go
View file @
c0d92e66
...
...
@@ -236,6 +236,7 @@ func checkSpanBatch(ctx context.Context, cfg *rollup.Config, log log.Logger, l1B
endEpochNum
:=
batch
.
GetBlockEpochNum
(
batch
.
GetBlockCount
()
-
1
)
originChecked
:=
false
// l1Blocks is supplied from batch queue and its length is limited to SequencerWindowSize.
for
_
,
l1Block
:=
range
l1Blocks
{
if
l1Block
.
Number
==
endEpochNum
{
if
!
batch
.
CheckOriginHash
(
l1Block
.
Hash
)
{
...
...
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