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
31927933
Unverified
Commit
31927933
authored
Mar 21, 2023
by
protolambda
Committed by
GitHub
Mar 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: RPC alt-sync comment review fixes
Co-authored-by:
Adrian Sutton
<
adrian@oplabs.co
>
parent
cdac0970
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
node.go
op-node/node/node.go
+0
-1
driver.go
op-node/rollup/driver/driver.go
+1
-0
state.go
op-node/rollup/driver/state.go
+2
-2
No files found.
op-node/node/node.go
View file @
31927933
...
@@ -215,7 +215,6 @@ func (n *OpNode) initRPCSync(ctx context.Context, cfg *Config) error {
...
@@ -215,7 +215,6 @@ func (n *OpNode) initRPCSync(ctx context.Context, cfg *Config) error {
return
nil
return
nil
}
}
// The sync client's RPC is always trusted
config
:=
sources
.
SyncClientDefaultConfig
(
&
cfg
.
Rollup
,
trustRPC
)
config
:=
sources
.
SyncClientDefaultConfig
(
&
cfg
.
Rollup
,
trustRPC
)
syncClient
,
err
:=
sources
.
NewSyncClient
(
n
.
OnUnsafeL2Payload
,
rpcSyncClient
,
n
.
log
,
n
.
metrics
.
L2SourceCache
,
config
)
syncClient
,
err
:=
sources
.
NewSyncClient
(
n
.
OnUnsafeL2Payload
,
rpcSyncClient
,
n
.
log
,
n
.
metrics
.
L2SourceCache
,
config
)
...
...
op-node/rollup/driver/driver.go
View file @
31927933
...
@@ -84,6 +84,7 @@ type Network interface {
...
@@ -84,6 +84,7 @@ type Network interface {
type
AltSync
interface
{
type
AltSync
interface
{
// RequestL2Range informs the sync source that the given range of L2 blocks is missing,
// RequestL2Range informs the sync source that the given range of L2 blocks is missing,
// and should be retrieved from any available alternative syncing source.
// and should be retrieved from any available alternative syncing source.
// The start of the range is inclusive, the end is exclusive.
// The sync results should be returned back to the driver via the OnUnsafeL2Payload(ctx, payload) method.
// The sync results should be returned back to the driver via the OnUnsafeL2Payload(ctx, payload) method.
// The latest requested range should always take priority over previous requests.
// The latest requested range should always take priority over previous requests.
// There may be overlaps in requested ranges.
// There may be overlaps in requested ranges.
...
...
op-node/rollup/driver/state.go
View file @
31927933
...
@@ -199,8 +199,8 @@ func (s *Driver) eventLoop() {
...
@@ -199,8 +199,8 @@ func (s *Driver) eventLoop() {
sequencerTimer
.
Reset
(
delay
)
sequencerTimer
.
Reset
(
delay
)
}
}
// Create a ticker to check if there is a gap in the engine queue
, w
henever
// Create a ticker to check if there is a gap in the engine queue
. W
henever
//
If
there is, we send requests to sync source to retrieve the missing payloads.
// there is, we send requests to sync source to retrieve the missing payloads.
syncCheckInterval
:=
time
.
Duration
(
s
.
config
.
BlockTime
)
*
time
.
Second
*
2
syncCheckInterval
:=
time
.
Duration
(
s
.
config
.
BlockTime
)
*
time
.
Second
*
2
altSyncTicker
:=
time
.
NewTicker
(
syncCheckInterval
)
altSyncTicker
:=
time
.
NewTicker
(
syncCheckInterval
)
defer
altSyncTicker
.
Stop
()
defer
altSyncTicker
.
Stop
()
...
...
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