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
21244893
Commit
21244893
authored
Aug 10, 2023
by
Joshua Gutow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-node: Add better logging
parent
8656961e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
node.go
op-node/node/node.go
+10
-10
No files found.
op-node/node/node.go
View file @
21244893
...
@@ -76,32 +76,32 @@ func New(ctx context.Context, cfg *Config, log log.Logger, snapshotLog log.Logge
...
@@ -76,32 +76,32 @@ func New(ctx context.Context, cfg *Config, log log.Logger, snapshotLog log.Logge
func
(
n
*
OpNode
)
init
(
ctx
context
.
Context
,
cfg
*
Config
,
snapshotLog
log
.
Logger
)
error
{
func
(
n
*
OpNode
)
init
(
ctx
context
.
Context
,
cfg
*
Config
,
snapshotLog
log
.
Logger
)
error
{
if
err
:=
n
.
initTracer
(
ctx
,
cfg
);
err
!=
nil
{
if
err
:=
n
.
initTracer
(
ctx
,
cfg
);
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to init the trace: %w"
,
err
)
}
}
if
err
:=
n
.
initL1
(
ctx
,
cfg
);
err
!=
nil
{
if
err
:=
n
.
initL1
(
ctx
,
cfg
);
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to init L1: %w"
,
err
)
}
}
if
err
:=
n
.
initRuntimeConfig
(
ctx
,
cfg
);
err
!=
nil
{
if
err
:=
n
.
initRuntimeConfig
(
ctx
,
cfg
);
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to init the runtime config: %w"
,
err
)
}
}
if
err
:=
n
.
initL2
(
ctx
,
cfg
,
snapshotLog
);
err
!=
nil
{
if
err
:=
n
.
initL2
(
ctx
,
cfg
,
snapshotLog
);
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to init L2: %w"
,
err
)
}
}
if
err
:=
n
.
initRPCSync
(
ctx
,
cfg
);
err
!=
nil
{
if
err
:=
n
.
initRPCSync
(
ctx
,
cfg
);
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to init RPC sync: %w"
,
err
)
}
}
if
err
:=
n
.
initP2PSigner
(
ctx
,
cfg
);
err
!=
nil
{
if
err
:=
n
.
initP2PSigner
(
ctx
,
cfg
);
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to init the P2P signer: %w"
,
err
)
}
}
if
err
:=
n
.
initP2P
(
ctx
,
cfg
);
err
!=
nil
{
if
err
:=
n
.
initP2P
(
ctx
,
cfg
);
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to init the P2P stack: %w"
,
err
)
}
}
// Only expose the server at the end, ensuring all RPC backend components are initialized.
// Only expose the server at the end, ensuring all RPC backend components are initialized.
if
err
:=
n
.
initRPCServer
(
ctx
,
cfg
);
err
!=
nil
{
if
err
:=
n
.
initRPCServer
(
ctx
,
cfg
);
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to init the RPC server: %w"
,
err
)
}
}
if
err
:=
n
.
initMetricsServer
(
ctx
,
cfg
);
err
!=
nil
{
if
err
:=
n
.
initMetricsServer
(
ctx
,
cfg
);
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to init the metrics server: %w"
,
err
)
}
}
return
nil
return
nil
}
}
...
@@ -128,7 +128,7 @@ func (n *OpNode) initL1(ctx context.Context, cfg *Config) error {
...
@@ -128,7 +128,7 @@ func (n *OpNode) initL1(ctx context.Context, cfg *Config) error {
}
}
if
err
:=
cfg
.
Rollup
.
ValidateL1Config
(
ctx
,
n
.
l1Source
);
err
!=
nil
{
if
err
:=
cfg
.
Rollup
.
ValidateL1Config
(
ctx
,
n
.
l1Source
);
err
!=
nil
{
return
err
return
fmt
.
Errorf
(
"failed to validate the L1 config: %w"
,
err
)
}
}
// Keep subscribed to the L1 heads, which keeps the L1 maintainer pointing to the best headers to sync
// Keep subscribed to the L1 heads, which keeps the L1 maintainer pointing to the best headers to sync
...
...
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