-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
missed adding electra process epoch on state replay - devnet 1 #14272
Conversation
} | ||
} else if err != nil { | ||
return nil, err | ||
} | ||
defer func() { | ||
SkipSlotCache.MarkNotInProgress(key) | ||
}() | ||
|
||
for state.Slot() < slot { | ||
customErrFn := func(ctx context.Context, st state.BeaconState) error { |
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.
reviewer please carefully look at the use of this function and let me know if this works well for our usecase
func ProcessEpoch(ctx context.Context, state state.BeaconState) (state.BeaconState, error) { | ||
var err error | ||
if time.CanProcessEpoch(state) { | ||
if state.Version() == version.Phase0 { |
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 switch the order of these ones?
if fn != nil { | ||
if err = fn(ctx, state); err != 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.
if fn != nil { | |
if err = fn(ctx, state); err != nil { | |
if fn != nil && (err = fn(ctx, state)) != nil { |
@@ -231,42 +222,63 @@ func ProcessSlots(ctx context.Context, state state.BeaconState, slot primitives. | |||
defer func() { | |||
SkipSlotCache.MarkNotInProgress(key) | |||
}() | |||
state, err = ProcessSlotsCore(ctx, span, state, slot, cacheBestBeaconStateOnErrFn(highestSlot, key)) |
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.
please look at the use of cacheBestBeaconStateOnErrFn carefully
What type of PR is this?
Other
What does this PR do? Why is it needed?
The core logic of process slots was duplicated in the replay function,so we forgot to update epoch processing in the replay function for the electra process slot. This PR refactors the core logic to be reusable and adds the corrected electra process epoch
Which issues(s) does this PR fix?
Fixes #
Other notes for review