-
Notifications
You must be signed in to change notification settings - Fork 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
Update head before block proposal #11992
Conversation
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 like this, we process attestations and update head on a slot ticker, this happens right before block proposal. If there's a race then it should be fixed in a different way instead of updating head and processing attestations twice immediately.
@@ -58,6 +58,9 @@ func (vs *Server) GetBeaconBlock(ctx context.Context, req *ethpb.BlockRequest) ( | |||
if err != nil { | |||
return nil, status.Errorf(codes.Internal, "Could not prepare block: %v", err) | |||
} | |||
if err := vs.HeadUpdater.UpdateHead(ctx); 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.
This should go before the check for optimistic status
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.
Approving now, but probably better to revisit this design. We are calling effectively the same forkchoice runner twice at the same time
Updating head before block proposal