-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(engine api): [1/3] error on engine API errors #2485
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2485 +/- ##
==========================================
+ Coverage 32.24% 32.35% +0.10%
==========================================
Files 350 350
Lines 15653 15595 -58
Branches 20 20
==========================================
- Hits 5047 5045 -2
+ Misses 10243 10187 -56
Partials 363 363
|
s.logger.Error( | ||
"failed to send forkchoice update without attributes", | ||
"error", err, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced logs with more expressive errors
@@ -96,13 +96,13 @@ func (ee *Engine) NotifyForkchoiceUpdate( | |||
// We do not bubble the error up, since we want to handle it | |||
// in the same way as the other cases. | |||
ee.metrics.markForkchoiceUpdateSyncing(req.State, err) | |||
return payloadID, nil, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why we should return anything other than nil payload and latestValidaHash when it errs
@@ -181,8 +183,7 @@ func (s *Service) executeStateTransition( | |||
WithVerifyPayload(true). | |||
WithVerifyRandao(false). | |||
WithVerifyResult(false). | |||
WithMeterGas(true). | |||
WithOptimisticEngine(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropped WithOptimisticEngine
since we don't silence any error anymore
), | ||
) | ||
if err != nil { | ||
return fmt.Errorf("failed sending forkchoice update without attributes: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we decorate the error with information about the hashes as well, could be useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -79,7 +80,7 @@ func (pb *PayloadBuilder) RequestPayloadAsync( | |||
}, | |||
) | |||
if err != nil { | |||
return nil, err | |||
return nil, fmt.Errorf("RequestPayloadAsync failed sending forkchoice update: %w", err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not for this pr but we should consider renaming RequestPayloadAsync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to see the concept of Optimistic
reconciled to just payload builds.
nits, but otherwise LGTM. We should let these sequence of PRs soak for a few days before release
30e1cb9
to
12cf8d9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK, confirming with testing of EL un-aliveness, bad peering on full node
Noting behavior of full node:
|
)" (#…" This reverts commit 7d43017.
Co-authored-by: aBear <[email protected]> Co-authored-by: Cal Bera <[email protected]>
Co-authored-by: aBear <[email protected]> Co-authored-by: Cal Bera <[email protected]>
FinalizeBlock
'sengine_forkchoiceUpdated
call.engine_newPayload
andengine_forkchoiceUpdated
failures. Thereforetransaction.Context
and the engine.With both of these, we ensure that the CL will fail when it goes out of sync with the EL.
In future PRs, we should attempt retries on these engine API calls to allow for easier recovery.