-
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
Insert stored fee recipient for ForkchoiceUpdated
call
#10349
Conversation
@@ -24,7 +25,7 @@ import ( | |||
|
|||
// This returns the execution payload of a given slot. The function has full awareness of pre and post merge. | |||
// The payload is computed given the respected time of merge. | |||
func (vs *Server) getExecutionPayload(ctx context.Context, slot types.Slot) (*enginev1.ExecutionPayload, error) { | |||
func (vs *Server) getExecutionPayload(ctx context.Context, slot types.Slot, vIdx types.ValidatorIndex) (*enginev1.ExecutionPayload, 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.
this makes sense now
case true: | ||
feeRecipient = recipient | ||
case errors.As(err, kv.ErrNotFoundFeeRecipient): // If fee recipient is not found, use the default fee recipient. | ||
logrus.WithError(err).WithField("validatorIndex", vIdx).Error("Fee recipient not found. Using default fee recipient.") |
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.
wonder if you should print what the default fee recipient address is.
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!
beacon-chain/node/config.go
Outdated
@@ -108,7 +108,7 @@ func configureInteropConfig(cliCtx *cli.Context) { | |||
func configureExecutionSetting(cliCtx *cli.Context) { | |||
if cliCtx.IsSet(flags.FeeRecipient.Name) { | |||
c := params.BeaconConfig() | |||
c.FeeRecipient = common.HexToAddress(cliCtx.String(flags.FeeRecipient.Name)) | |||
c.DefaultFeeRecipient = common.HexToAddress(cliCtx.String(flags.FeeRecipient.Name)) |
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 called my flag SuggestedFeeRecipient similar to lighthouse, wondering if i should change it to default as well.
beacon-chain/node/config.go
Outdated
@@ -108,7 +108,7 @@ func configureInteropConfig(cliCtx *cli.Context) { | |||
func configureExecutionSetting(cliCtx *cli.Context) { | |||
if cliCtx.IsSet(flags.FeeRecipient.Name) { | |||
c := params.BeaconConfig() | |||
c.FeeRecipient = common.HexToAddress(cliCtx.String(flags.FeeRecipient.Name)) | |||
c.DefaultFeeRecipient = common.HexToAddress(cliCtx.String(flags.FeeRecipient.Name)) |
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 think we should validate here using ^0x[0-9a-fA-F]{40}$
for the hex
params.OverrideBeaconConfig(c) | ||
func configureExecutionSetting(cliCtx *cli.Context) error { | ||
if !cliCtx.IsSet(flags.FeeRecipient.Name) { | ||
return 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.
maybe we can add a log here to inform the user that the validator will be sending the address or else it defaults to burn address.
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 besides the items discussed in discord for a later PR
This PR uses the stored fee recipient in DB to construct
PayloadAttributes
and to make aForkchoiceUpdated
call. If the fee recipient is in DB then it uses the default fee recipientrelated to #10292