-
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
feat(sync): Basic sync logging improvement. #142
Conversation
WalkthroughThe changes focus on enhancing synchronization and context handling in the Beacon module. Updates include refining the Changes
Poem
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #142 +/- ##
==========================================
+ Coverage 28.04% 28.05% +0.01%
==========================================
Files 102 102
Lines 3791 3793 +2
Branches 4 4
==========================================
+ Hits 1063 1064 +1
- Misses 2650 2651 +1
Partials 78 78
|
@@ -168,10 +168,10 @@ func (s *Service) CheckSyncStatusAndForkchoice(ctx context.Context) error { | |||
|
|||
// If the beacon chain is ahead of the execution chain, we need to trigger a forkchoice | |||
// update to get the execution chain to start syncing, otherwise we can just return. | |||
if bss.status != StatusBeaconAhead { | |||
if bss.Status == StatusExecutionAhead { |
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.
The above comment is confusing, consider change it to "If the execution chain is ahead of the beacon chain, we can just return, otherwise ..."
app.BeaconKitRunner.StartServices(ctx) | ||
|
||
// Initial check for execution client sync. | ||
if err := app.BeaconKitRunner.InitialSyncCheck( |
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.
DoingInitialSyncCheck
here makes more sense to me!
// ErrValidatorClientNotSynced is an error for when a | ||
// validator tries to propose a block with an out of sync | ||
// execution client. | ||
ErrValidatorClientNotSynced = errors.New(`your validator tried to propose a |
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.
ErrValidatorClientNotSynced = errors.New(`your validator tried to propose a | |
ErrProposerClientNotSynced = errors.New(`your validator tried to propose a |
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.
lgtm! I left some minor comments which can be addressed later if we don't have time rn.
…lock deposits (#142) * fix(state-transition): Correctly enforce local validation of beacon block deposits * lint cleanup * Update state-transition/core/validation_deposits_test.go Signed-off-by: Cal Bera <[email protected]> * nit clean for loop * nosec --------- Signed-off-by: Cal Bera <[email protected]>
We will need to refactor this later.
Summary by CodeRabbit
BeaconSyncProgress
struct to useStatus
instead ofstatus
.RegisterAPIRoutes
function.syncStatus
inPreBlocker
method.syncService
field to check synchronization status in proposal handling methods.