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
fe205654
Commit
fe205654
authored
Apr 12, 2023
by
Joshua Gutow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: Explain check in engine queue
parent
a5b1b5a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
engine_queue.go
op-node/rollup/derive/engine_queue.go
+10
-8
No files found.
op-node/rollup/derive/engine_queue.go
View file @
fe205654
...
...
@@ -437,15 +437,17 @@ func (eq *EngineQueue) tryNextSafeAttributes(ctx context.Context) error {
}
// validate the safe attributes before processing them. The engine may have completed processing them through other means.
if
eq
.
safeHead
!=
eq
.
safeAttributes
.
parent
{
// TODO: when is this condition true? It appears to be so in tests, but shouldn't be true otherwise.
if
eq
.
safeHead
.
ParentHash
!=
eq
.
safeAttributes
.
parent
.
Hash
{
return
NewResetError
(
fmt
.
Errorf
(
"safe head changed to %s with parent %s, conflicting with queued safe attributes on top of %s"
,
eq
.
safeHead
,
eq
.
safeHead
.
ParentID
(),
eq
.
safeAttributes
.
parent
))
// Previously the attribute's parent was the safe head. If the safe head advances so safe head's parent is the same as the
// attribute's parent then we need to cancel the attributes.
if
eq
.
safeHead
.
ParentHash
==
eq
.
safeAttributes
.
parent
.
Hash
{
eq
.
log
.
Warn
(
"queued safe attributes are stale, safehead progressed"
,
"safe_head"
,
eq
.
safeHead
,
"safe_head_parent"
,
eq
.
safeHead
.
ParentID
(),
"attributes_parent"
,
eq
.
safeAttributes
.
parent
)
eq
.
safeAttributes
=
nil
return
nil
}
eq
.
log
.
Warn
(
"queued safe attributes are stale, safehead progressed"
,
"safe_head"
,
eq
.
safeHead
,
"safe_head_parent"
,
eq
.
safeHead
.
ParentID
(),
"attributes_parent"
,
eq
.
safeAttributes
.
parent
)
eq
.
safeAttributes
=
nil
return
nil
// If something other than a simple advance occurred, perform a full reset
return
NewResetError
(
fmt
.
Errorf
(
"safe head changed to %s with parent %s, conflicting with queued safe attributes on top of %s"
,
eq
.
safeHead
,
eq
.
safeHead
.
ParentID
(),
eq
.
safeAttributes
.
parent
))
}
if
eq
.
safeHead
.
Number
<
eq
.
unsafeHead
.
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