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
1ee7e175
Commit
1ee7e175
authored
Sep 13, 2023
by
Andrew Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cancel any inflight block building when stopping the sequencer, to avoid intermediate state.
parent
0bf53e73
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
driver.go
op-node/rollup/driver/driver.go
+1
-0
state.go
op-node/rollup/driver/state.go
+3
-0
No files found.
op-node/rollup/driver/driver.go
View file @
1ee7e175
...
@@ -81,6 +81,7 @@ type SequencerIface interface {
...
@@ -81,6 +81,7 @@ type SequencerIface interface {
PlanNextSequencerAction
()
time
.
Duration
PlanNextSequencerAction
()
time
.
Duration
RunNextSequencerAction
(
ctx
context
.
Context
)
(
*
eth
.
ExecutionPayload
,
error
)
RunNextSequencerAction
(
ctx
context
.
Context
)
(
*
eth
.
ExecutionPayload
,
error
)
BuildingOnto
()
eth
.
L2BlockRef
BuildingOnto
()
eth
.
L2BlockRef
CancelBuildingBlock
(
ctx
context
.
Context
)
}
}
type
Network
interface
{
type
Network
interface
{
...
...
op-node/rollup/driver/state.go
View file @
1ee7e175
...
@@ -381,6 +381,9 @@ func (s *Driver) eventLoop() {
...
@@ -381,6 +381,9 @@ func (s *Driver) eventLoop() {
}
}
s
.
log
.
Warn
(
"Sequencer has been stopped"
)
s
.
log
.
Warn
(
"Sequencer has been stopped"
)
s
.
driverConfig
.
SequencerStopped
=
true
s
.
driverConfig
.
SequencerStopped
=
true
// Cancel any inflight block building. If we don't cancel this, we can resume sequencing an old block
// even if we've received new unsafe heads in the interim, causing us to introduce a re-org.
s
.
sequencer
.
CancelBuildingBlock
(
ctx
)
respCh
<-
hashAndError
{
hash
:
s
.
derivation
.
UnsafeL2Head
()
.
Hash
}
respCh
<-
hashAndError
{
hash
:
s
.
derivation
.
UnsafeL2Head
()
.
Hash
}
}
}
case
respCh
:=
<-
s
.
sequencerActive
:
case
respCh
:=
<-
s
.
sequencerActive
:
...
...
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