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
54e3cfe2
Commit
54e3cfe2
authored
Oct 31, 2023
by
Tei Im
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add commets for advancing epoch
parent
7005d12c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
batch_queue.go
op-node/rollup/derive/batch_queue.go
+3
-0
No files found.
op-node/rollup/derive/batch_queue.go
View file @
54e3cfe2
...
@@ -108,6 +108,9 @@ func (bq *BatchQueue) NextBatch(ctx context.Context, parent eth.L2BlockRef) (*Si
...
@@ -108,6 +108,9 @@ func (bq *BatchQueue) NextBatch(ctx context.Context, parent eth.L2BlockRef) (*Si
}
}
// If the epoch is advanced, update bq.l1Blocks
// If the epoch is advanced, update bq.l1Blocks
// Advancing epoch must be done after the pipeline successfully apply the entire span batch to the chain.
// Because the span batch can be reverted during processing the batch, then we must preserve existing l1Blocks
// to verify the epochs of the next candidate batch.
if
len
(
bq
.
l1Blocks
)
>
0
&&
parent
.
L1Origin
.
Number
>
bq
.
l1Blocks
[
0
]
.
Number
{
if
len
(
bq
.
l1Blocks
)
>
0
&&
parent
.
L1Origin
.
Number
>
bq
.
l1Blocks
[
0
]
.
Number
{
for
i
,
l1Block
:=
range
bq
.
l1Blocks
{
for
i
,
l1Block
:=
range
bq
.
l1Blocks
{
if
parent
.
L1Origin
.
Number
==
l1Block
.
Number
{
if
parent
.
L1Origin
.
Number
==
l1Block
.
Number
{
...
...
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