-
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
Better log fee recipient mismatch #11395
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Logs if the returned payload from the engine does not have the fee recipient set in the validator. Also warn the user if he's proposing a block with the burner fee recipient address.
rauljordan
previously approved these changes
Sep 2, 2022
terencechain
reviewed
Sep 2, 2022
@@ -41,11 +42,37 @@ var ( | |||
// The payload is computed given the respected time of merge. | |||
func (vs *Server) getExecutionPayload(ctx context.Context, slot types.Slot, vIdx types.ValidatorIndex, headRoot [32]byte) (*enginev1.ExecutionPayload, error) { | |||
proposerID, payloadId, ok := vs.ProposerSlotIndexCache.GetProposerPayloadIDs(slot, headRoot) | |||
feeRecipient := params.BeaconConfig().DefaultFeeRecipient | |||
recipient, err := vs.BeaconDB.FeeRecipientByValidatorID(ctx, vIdx) | |||
switch 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.
Can you make it a slightly different style?
switch {
case err != nil
case error.As()
default
}
terencechain
previously approved these changes
Sep 3, 2022
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.
Took a second look and it looked good to me. Thanks!
Although a test failed
terencechain
approved these changes
Sep 3, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Logs if the returned payload from the engine does not have the fee
recipient set in the validator.
Also warn the user if he's proposing a block with the burner fee
recipient address.