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
0d46735a
Commit
0d46735a
authored
Feb 15, 2023
by
Joshua Gutow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more logging in the batch queue
parent
996e8b64
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
batch_queue.go
op-node/rollup/derive/batch_queue.go
+6
-0
No files found.
op-node/rollup/derive/batch_queue.go
View file @
0d46735a
...
...
@@ -221,6 +221,10 @@ batchLoop:
expiryEpoch
:=
epoch
.
Number
+
bq
.
config
.
SeqWindowSize
forceEmptyBatches
:=
(
expiryEpoch
==
bq
.
origin
.
Number
&&
outOfData
)
||
expiryEpoch
<
bq
.
origin
.
Number
bq
.
log
.
Trace
(
"Potentially generating an empty batch"
,
"expiryEpoch"
,
expiryEpoch
,
"forceEmptyBatches"
,
forceEmptyBatches
,
"nextTimestamp"
,
nextTimestamp
,
"epoch_time"
,
epoch
.
Time
,
"len_l1_blocks"
,
len
(
bq
.
l1Blocks
))
if
!
forceEmptyBatches
{
// sequence window did not expire yet, still room to receive batches for the current epoch,
// no need to force-create empty batch(es) towards the next epoch yet.
...
...
@@ -235,6 +239,7 @@ batchLoop:
// Fill with empty L2 blocks of the same epoch until we meet the time of the next L1 origin,
// to preserve that L2 time >= L1 time
if
nextTimestamp
<
nextEpoch
.
Time
{
bq
.
log
.
Trace
(
"Generating next batch"
,
"epoch"
,
epoch
,
"timestamp"
,
nextTimestamp
)
return
&
BatchData
{
BatchV1
{
ParentHash
:
l2SafeHead
.
Hash
,
...
...
@@ -248,6 +253,7 @@ batchLoop:
// At this point we have auto generated every batch for the current epoch
// that we can, so we can advance to the next epoch.
bq
.
log
.
Trace
(
"Advancing internal L1 blocks"
,
"next_timestamp"
,
nextTimestamp
,
"next_epoch_time"
,
nextEpoch
.
Time
)
bq
.
l1Blocks
=
bq
.
l1Blocks
[
1
:
]
return
nil
,
io
.
EOF
}
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