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
46a7936c
Unverified
Commit
46a7936c
authored
Oct 30, 2022
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: catch up L2 sequencing based on time, not L1 origins
parent
055e4e7c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
state.go
op-node/rollup/driver/state.go
+3
-2
No files found.
op-node/rollup/driver/state.go
View file @
46a7936c
...
...
@@ -279,8 +279,9 @@ func (s *Driver) eventLoop() {
// requesting a new block ASAP instead of waiting for the next tick.
// We don't request a block if the confirmation depth is not met.
l2Head
:=
s
.
derivation
.
UnsafeL2Head
()
if
l1Head
.
Number
>
l2Head
.
L1Origin
.
Number
+
s
.
driverConfig
.
SequencerConfDepth
{
s
.
log
.
Trace
(
"Building another L2 block asap to catch up with L1 head"
,
"l2_unsafe"
,
l2Head
,
"l2_unsafe_l1_origin"
,
l2Head
.
L1Origin
,
"l1_head"
,
l1Head
)
if
wallClock
:=
uint64
(
time
.
Now
()
.
Unix
());
l2Head
.
Time
+
s
.
config
.
BlockTime
<=
wallClock
{
s
.
log
.
Trace
(
"Building another L2 block asap to catch up with wallclock"
,
"l2_unsafe"
,
l2Head
,
"l2_unsafe_time"
,
l2Head
.
Time
,
"wallclock"
,
wallClock
)
// But not too quickly to minimize busy-waiting for new blocks
time
.
AfterFunc
(
time
.
Millisecond
*
10
,
reqL2BlockCreation
)
}
...
...
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