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
a704a097
Unverified
Commit
a704a097
authored
Jun 29, 2022
by
protolambda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make engine API logging less verbose
parent
2b91cc6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
source.go
op-node/l2/source.go
+7
-7
No files found.
op-node/l2/source.go
View file @
a704a097
...
@@ -70,15 +70,15 @@ func (s *Source) PayloadByNumber(ctx context.Context, number uint64) (*eth.Execu
...
@@ -70,15 +70,15 @@ func (s *Source) PayloadByNumber(ctx context.Context, number uint64) (*eth.Execu
// May return an error in ForkChoiceResult, but the error is marshalled into the error return
// May return an error in ForkChoiceResult, but the error is marshalled into the error return
func
(
s
*
Source
)
ForkchoiceUpdate
(
ctx
context
.
Context
,
fc
*
eth
.
ForkchoiceState
,
attributes
*
eth
.
PayloadAttributes
)
(
*
eth
.
ForkchoiceUpdatedResult
,
error
)
{
func
(
s
*
Source
)
ForkchoiceUpdate
(
ctx
context
.
Context
,
fc
*
eth
.
ForkchoiceState
,
attributes
*
eth
.
PayloadAttributes
)
(
*
eth
.
ForkchoiceUpdatedResult
,
error
)
{
e
:=
s
.
log
.
New
(
"state"
,
fc
,
"attr"
,
attributes
)
e
:=
s
.
log
.
New
(
"state"
,
fc
,
"attr"
,
attributes
)
e
.
Debug
(
"Sharing forkchoice-updated signal"
)
e
.
Trace
(
"Sharing forkchoice-updated signal"
)
fcCtx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
time
.
Second
*
5
)
fcCtx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
time
.
Second
*
5
)
defer
cancel
()
defer
cancel
()
var
result
eth
.
ForkchoiceUpdatedResult
var
result
eth
.
ForkchoiceUpdatedResult
err
:=
s
.
rpc
.
CallContext
(
fcCtx
,
&
result
,
"engine_forkchoiceUpdatedV1"
,
fc
,
attributes
)
err
:=
s
.
rpc
.
CallContext
(
fcCtx
,
&
result
,
"engine_forkchoiceUpdatedV1"
,
fc
,
attributes
)
if
err
==
nil
{
if
err
==
nil
{
e
.
Debug
(
"Shared forkchoice-updated signal"
)
e
.
Trace
(
"Shared forkchoice-updated signal"
)
if
attributes
!=
nil
{
if
attributes
!=
nil
{
e
.
Debug
(
"Received payload id"
,
"payloadId"
,
result
.
PayloadID
)
e
.
Trace
(
"Received payload id"
,
"payloadId"
,
result
.
PayloadID
)
}
}
return
&
result
,
nil
return
&
result
,
nil
}
else
{
}
else
{
...
@@ -96,13 +96,13 @@ func (s *Source) ForkchoiceUpdate(ctx context.Context, fc *eth.ForkchoiceState,
...
@@ -96,13 +96,13 @@ func (s *Source) ForkchoiceUpdate(ctx context.Context, fc *eth.ForkchoiceState,
// ExecutePayload executes a built block on the execution engine and returns an error if it was not successful.
// ExecutePayload executes a built block on the execution engine and returns an error if it was not successful.
func
(
s
*
Source
)
NewPayload
(
ctx
context
.
Context
,
payload
*
eth
.
ExecutionPayload
)
(
*
eth
.
PayloadStatusV1
,
error
)
{
func
(
s
*
Source
)
NewPayload
(
ctx
context
.
Context
,
payload
*
eth
.
ExecutionPayload
)
(
*
eth
.
PayloadStatusV1
,
error
)
{
e
:=
s
.
log
.
New
(
"block_hash"
,
payload
.
BlockHash
)
e
:=
s
.
log
.
New
(
"block_hash"
,
payload
.
BlockHash
)
e
.
Debug
(
"sending payload for execution"
)
e
.
Trace
(
"sending payload for execution"
)
execCtx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
time
.
Second
*
5
)
execCtx
,
cancel
:=
context
.
WithTimeout
(
ctx
,
time
.
Second
*
5
)
defer
cancel
()
defer
cancel
()
var
result
eth
.
PayloadStatusV1
var
result
eth
.
PayloadStatusV1
err
:=
s
.
rpc
.
CallContext
(
execCtx
,
&
result
,
"engine_newPayloadV1"
,
payload
)
err
:=
s
.
rpc
.
CallContext
(
execCtx
,
&
result
,
"engine_newPayloadV1"
,
payload
)
e
.
Debug
(
"Received payload execution result"
,
"status"
,
result
.
Status
,
"latestValidHash"
,
result
.
LatestValidHash
,
"message"
,
result
.
ValidationError
)
e
.
Trace
(
"Received payload execution result"
,
"status"
,
result
.
Status
,
"latestValidHash"
,
result
.
LatestValidHash
,
"message"
,
result
.
ValidationError
)
if
err
!=
nil
{
if
err
!=
nil
{
e
.
Error
(
"Payload execution failed"
,
"err"
,
err
)
e
.
Error
(
"Payload execution failed"
,
"err"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to execute payload: %v"
,
err
)
return
nil
,
fmt
.
Errorf
(
"failed to execute payload: %v"
,
err
)
...
@@ -113,7 +113,7 @@ func (s *Source) NewPayload(ctx context.Context, payload *eth.ExecutionPayload)
...
@@ -113,7 +113,7 @@ func (s *Source) NewPayload(ctx context.Context, payload *eth.ExecutionPayload)
// GetPayload gets the execution payload associated with the PayloadId
// GetPayload gets the execution payload associated with the PayloadId
func
(
s
*
Source
)
GetPayload
(
ctx
context
.
Context
,
payloadId
eth
.
PayloadID
)
(
*
eth
.
ExecutionPayload
,
error
)
{
func
(
s
*
Source
)
GetPayload
(
ctx
context
.
Context
,
payloadId
eth
.
PayloadID
)
(
*
eth
.
ExecutionPayload
,
error
)
{
e
:=
s
.
log
.
New
(
"payload_id"
,
payloadId
)
e
:=
s
.
log
.
New
(
"payload_id"
,
payloadId
)
e
.
Debug
(
"getting payload"
)
e
.
Trace
(
"getting payload"
)
var
result
eth
.
ExecutionPayload
var
result
eth
.
ExecutionPayload
err
:=
s
.
rpc
.
CallContext
(
ctx
,
&
result
,
"engine_getPayloadV1"
,
payloadId
)
err
:=
s
.
rpc
.
CallContext
(
ctx
,
&
result
,
"engine_getPayloadV1"
,
payloadId
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -130,7 +130,7 @@ func (s *Source) GetPayload(ctx context.Context, payloadId eth.PayloadID) (*eth.
...
@@ -130,7 +130,7 @@ func (s *Source) GetPayload(ctx context.Context, payloadId eth.PayloadID) (*eth.
}
}
return
nil
,
err
return
nil
,
err
}
}
e
.
Debug
(
"Received payload"
)
e
.
Trace
(
"Received payload"
)
return
&
result
,
nil
return
&
result
,
nil
}
}
...
...
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