diff --git a/cmd/validator/flags/flags.go b/cmd/validator/flags/flags.go index 5cc61900f68e..ec18455a1029 100644 --- a/cmd/validator/flags/flags.go +++ b/cmd/validator/flags/flags.go @@ -345,10 +345,10 @@ var ( Value: params.BeaconConfig().EthBurnAddressHex, } - // EnableValidatorRegistrationFlag enables the periodic validator registration API calls that will update the custom builder with validator settings. - EnableValidatorRegistrationFlag = &cli.BoolFlag{ - Name: "enable-validator-registration", - Usage: "Enables validator registration APIs (MEV Builder APIs) for the validator client to update settings such as fee recipient and gas limit", + // EnableBuilderFlag enables the periodic validator registration API calls that will update the custom builder with validator settings. + EnableBuilderFlag = &cli.BoolFlag{ + Name: "enable-builder", + Usage: "Enables MEV Builder validator registration APIs for the validator client to update settings such as fee recipient and gas limit. Note* this flag is not required if using proposer settings config file", Value: false, } ) diff --git a/cmd/validator/main.go b/cmd/validator/main.go index dcb155a70a28..0d361757f01d 100644 --- a/cmd/validator/main.go +++ b/cmd/validator/main.go @@ -78,7 +78,7 @@ var appFlags = []cli.Flag{ flags.SuggestedFeeRecipientFlag, flags.ProposerSettingsURLFlag, flags.ProposerSettingsFlag, - flags.EnableValidatorRegistrationFlag, + flags.EnableBuilderFlag, //////////////////// cmd.DisableMonitoringFlag, cmd.MonitoringHostFlag, diff --git a/cmd/validator/usage.go b/cmd/validator/usage.go index 7ddf556ef17d..f8bba4585b5a 100644 --- a/cmd/validator/usage.go +++ b/cmd/validator/usage.go @@ -112,7 +112,7 @@ var appHelpFlagGroups = []flagGroup{ flags.ProposerSettingsFlag, flags.ProposerSettingsURLFlag, flags.SuggestedFeeRecipientFlag, - flags.EnableValidatorRegistrationFlag, + flags.EnableBuilderFlag, }, }, { diff --git a/config/validator/service/proposer-settings.go b/config/validator/service/proposer-settings.go index 4125f97cd9d0..1a49fc81585f 100644 --- a/config/validator/service/proposer-settings.go +++ b/config/validator/service/proposer-settings.go @@ -17,15 +17,16 @@ type ProposerSettingsPayload struct { // ProposerOptionPayload is the struct representation of the JSON config file set in the validator through the CLI. // FeeRecipient is set to an eth address in hex string format with 0x prefix. type ProposerOptionPayload struct { - FeeRecipient string `json:"fee_recipient" yaml:"fee_recipient"` - ValidatorRegistration *ValidatorRegistration `json:"validator_registration" yaml:"validator_registration"` + FeeRecipient string `json:"fee_recipient" yaml:"fee_recipient"` + BuilderConfig *BuilderConfig `json:"builder" yaml:"builder"` } -// ValidatorRegistration is the struct representation of the JSON config file set in the validator through the CLI. +// BuilderConfig is the struct representation of the JSON config file set in the validator through the CLI. // GasLimit is a number set to help the network decide on the maximum gas in each block. -type ValidatorRegistration struct { - Enable bool `json:"enable" yaml:"enable"` - GasLimit uint64 `json:"gas_limit,omitempty" yaml:"gas_limit,omitempty"` +type BuilderConfig struct { + Enabled bool `json:"enabled" yaml:"enabled"` + GasLimit uint64 `json:"gas_limit,omitempty" yaml:"gas_limit,omitempty"` + Relays []string `json:"relays" yaml:"relays"` } // ProposerSettings is a Prysm internal representation of the fee recipient config on the validator client. @@ -37,14 +38,14 @@ type ProposerSettings struct { // ProposerOption is a Prysm internal representation of the ProposerOptionPayload on the validator client in bytes format instead of hex. type ProposerOption struct { - FeeRecipient common.Address - ValidatorRegistration *ValidatorRegistration + FeeRecipient common.Address + BuilderConfig *BuilderConfig } // DefaultProposerOption returns a Proposer Option with defaults filled func DefaultProposerOption() ProposerOption { return ProposerOption{ - FeeRecipient: params.BeaconConfig().DefaultFeeRecipient, - ValidatorRegistration: nil, + FeeRecipient: params.BeaconConfig().DefaultFeeRecipient, + BuilderConfig: nil, } } diff --git a/validator/client/validator.go b/validator/client/validator.go index c883b95ebb9e..312c07ec2861 100644 --- a/validator/client/validator.go +++ b/validator/client/validator.go @@ -980,22 +980,13 @@ func (v *validator) PushProposerSettings(ctx context.Context, km keymanager.IKey log.Warnf("No valid validator indices were found, prepare beacon proposer request fee recipients array is empty") return nil } - if len(feeRecipients) != len(pubkeys) { - log.WithFields(logrus.Fields{ - "activePubkeys": len(pubkeys) - len(feeRecipients), - }).Warnln("will not prepare beacon proposer and update fee recipient until a validator index is assigned") - } if _, err := v.validatorClient.PrepareBeaconProposer(ctx, ðpb.PrepareBeaconProposerRequest{ Recipients: feeRecipients, }); err != nil { return err } log.Infoln("Prepared beacon proposer with fee recipient to validator index mapping") - if len(signedRegisterValidatorRequests) != len(pubkeys) { - log.WithFields(logrus.Fields{ - "activePubkeys": len(pubkeys) - len(signedRegisterValidatorRequests), - }).Warnln("will not be included in validator registration until a validator index is assigned") - } + if err := SubmitValidatorRegistration(ctx, v.validatorClient, signedRegisterValidatorRequests); err != nil { return err } @@ -1004,8 +995,9 @@ func (v *validator) PushProposerSettings(ctx context.Context, km keymanager.IKey } func (v *validator) buildProposerSettingsRequests(ctx context.Context, pubkeys [][fieldparams.BLSPubkeyLength]byte, signer iface.SigningFunc) ([]*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer, []*ethpb.SignedValidatorRegistrationV1, error) { - var validatorToFeeRecipients []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer + var proposerFeeRecipientRequests []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer var signedRegisterValidatorRequests []*ethpb.SignedValidatorRegistrationV1 + anyValidatorRegistrationEnabled := false // need to check for pubkey to validator index mappings for i, key := range pubkeys { var enableValidatorRegistration bool @@ -1028,8 +1020,8 @@ func (v *validator) buildProposerSettingsRequests(ctx context.Context, pubkeys [ } if v.ProposerSettings.DefaultConfig != nil { feeRecipient = v.ProposerSettings.DefaultConfig.FeeRecipient - vr := v.ProposerSettings.DefaultConfig.ValidatorRegistration - if vr != nil && vr.Enable { + vr := v.ProposerSettings.DefaultConfig.BuilderConfig + if vr != nil && vr.Enabled { gasLimit = vr.GasLimit enableValidatorRegistration = true } @@ -1040,8 +1032,8 @@ func (v *validator) buildProposerSettingsRequests(ctx context.Context, pubkeys [ if ok && option != nil { // override the default if a proposeconfig is set feeRecipient = option.FeeRecipient - vr := option.ValidatorRegistration - if vr != nil && vr.Enable { + vr := option.BuilderConfig + if vr != nil && vr.Enabled { gasLimit = vr.GasLimit enableValidatorRegistration = true } else { @@ -1055,12 +1047,13 @@ func (v *validator) buildProposerSettingsRequests(ctx context.Context, pubkeys [ // Only include requests with assigned validator index if !skipAppendToFeeRecipientArray { - validatorToFeeRecipients = append(validatorToFeeRecipients, ðpb.PrepareBeaconProposerRequest_FeeRecipientContainer{ + proposerFeeRecipientRequests = append(proposerFeeRecipientRequests, ðpb.PrepareBeaconProposerRequest_FeeRecipientContainer{ ValidatorIndex: validatorIndex, FeeRecipient: feeRecipient[:], }) } if !skipAppendToFeeRecipientArray && enableValidatorRegistration { + anyValidatorRegistrationEnabled = true unsignedRequest := ðpb.ValidatorRegistrationV1{ FeeRecipient: feeRecipient[:], GasLimit: gasLimit, @@ -1075,7 +1068,20 @@ func (v *validator) buildProposerSettingsRequests(ctx context.Context, pubkeys [ signedRegisterValidatorRequests = append(signedRegisterValidatorRequests, request) } } - return validatorToFeeRecipients, signedRegisterValidatorRequests, nil + + if len(proposerFeeRecipientRequests) != len(pubkeys) { + log.WithFields(logrus.Fields{ + "totalNonActivePubkeys": len(pubkeys) - len(proposerFeeRecipientRequests), + }).Warnln("will not prepare beacon proposer and update fee recipient until a validator index is assigned") + } + + if len(signedRegisterValidatorRequests) != len(pubkeys) && anyValidatorRegistrationEnabled { + log.WithFields(logrus.Fields{ + "totalNonActivePubkeys": len(pubkeys) - len(signedRegisterValidatorRequests), + }).Warnln("will not be included in MEV builder validator registration until a validator index is assigned") + } + + return proposerFeeRecipientRequests, signedRegisterValidatorRequests, nil } func (v *validator) cacheValidatorPubkeyHexToValidatorIndex(ctx context.Context, pubkey [fieldparams.BLSPubkeyLength]byte) (types.ValidatorIndex, bool, error) { diff --git a/validator/client/validator_test.go b/validator/client/validator_test.go index 8fa17a8378b5..f407da7d1c93 100644 --- a/validator/client/validator_test.go +++ b/validator/client/validator_test.go @@ -1461,6 +1461,7 @@ func TestValidator_PushProposerSettings(t *testing.T) { mockExpectedRequests []ExpectedValidatorRegistration err string logMessages []string + doesntContainLogs bool }{ { name: " Happy Path proposer config not nil", @@ -1505,8 +1506,8 @@ func TestValidator_PushProposerSettings(t *testing.T) { }).Return(nil, nil) config[keys[0]] = &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress("0x055Fb65722E7b2455043BFEBf6177F1D2e9738D9"), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: uint64(40000000), }, } @@ -1514,8 +1515,8 @@ func TestValidator_PushProposerSettings(t *testing.T) { ProposeConfig: config, DefaultConfig: &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress(defaultFeeHex), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: uint64(35000000), }, }, @@ -1585,8 +1586,8 @@ func TestValidator_PushProposerSettings(t *testing.T) { }).Return(nil, nil) config[keys[0]] = &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress("0x055Fb65722E7b2455043BFEBf6177F1D2e9738D9"), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: uint64(40000000), }, } @@ -1594,8 +1595,8 @@ func TestValidator_PushProposerSettings(t *testing.T) { ProposeConfig: config, DefaultConfig: &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress(defaultFeeHex), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: false, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: false, GasLimit: uint64(35000000), }, }, @@ -1617,6 +1618,66 @@ func TestValidator_PushProposerSettings(t *testing.T) { GasLimit: uint64(40000000), }, }, + logMessages: []string{"will not be included in MEV builder validator registration"}, + }, + { + name: " Happy Path default doesn't send any validator registrations", + validatorSetter: func(t *testing.T) *validator { + + v := validator{ + validatorClient: client, + node: nodeClient, + db: db, + pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]types.ValidatorIndex), + signedValidatorRegistrations: make(map[[fieldparams.BLSPubkeyLength]byte]*ethpb.SignedValidatorRegistrationV1), + useWeb: false, + interopKeysConfig: &local.InteropKeymanagerConfig{ + NumValidatorKeys: 2, + Offset: 1, + }, + } + err := v.WaitForKeymanagerInitialization(ctx) + require.NoError(t, err) + config := make(map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption) + km, err := v.Keymanager() + require.NoError(t, err) + keys, err := km.FetchValidatingPublicKeys(ctx) + require.NoError(t, err) + client.EXPECT().ValidatorIndex( + ctx, // ctx + ðpb.ValidatorIndexRequest{PublicKey: keys[0][:]}, + ).Return(ðpb.ValidatorIndexResponse{ + Index: 1, + }, nil) + client.EXPECT().ValidatorIndex( + ctx, // ctx + ðpb.ValidatorIndexRequest{PublicKey: keys[1][:]}, + ).Return(ðpb.ValidatorIndexResponse{ + Index: 2, + }, nil) + client.EXPECT().PrepareBeaconProposer(gomock.Any(), ðpb.PrepareBeaconProposerRequest{ + Recipients: []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer{ + {FeeRecipient: common.HexToAddress("0x055Fb65722E7b2455043BFEBf6177F1D2e9738D9").Bytes(), ValidatorIndex: 1}, + {FeeRecipient: common.HexToAddress(defaultFeeHex).Bytes(), ValidatorIndex: 2}, + }, + }).Return(nil, nil) + config[keys[0]] = &validatorserviceconfig.ProposerOption{ + FeeRecipient: common.HexToAddress("0x055Fb65722E7b2455043BFEBf6177F1D2e9738D9"), + } + v.ProposerSettings = &validatorserviceconfig.ProposerSettings{ + ProposeConfig: config, + DefaultConfig: &validatorserviceconfig.ProposerOption{ + FeeRecipient: common.HexToAddress(defaultFeeHex), + }, + } + return &v + }, + feeRecipientMap: map[types.ValidatorIndex]string{ + 1: "0x055Fb65722E7b2455043BFEBf6177F1D2e9738D9", + 2: defaultFeeHex, + }, + logMessages: []string{"will not be included in MEV builder validator registration"}, + doesntContainLogs: true, }, { name: " Happy Path", @@ -1647,8 +1708,8 @@ func TestValidator_PushProposerSettings(t *testing.T) { ProposeConfig: nil, DefaultConfig: &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress(defaultFeeHex), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: params.BeaconConfig().DefaultBuilderGasLimit, }, }, @@ -1703,8 +1764,8 @@ func TestValidator_PushProposerSettings(t *testing.T) { ProposeConfig: nil, DefaultConfig: &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress(defaultFeeHex), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: uint64(40000000), }, }, @@ -1895,8 +1956,8 @@ func TestValidator_PushProposerSettings(t *testing.T) { config[keys[0]] = &validatorserviceconfig.ProposerOption{ FeeRecipient: common.Address{}, - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: uint64(40000000), }, } @@ -1904,8 +1965,8 @@ func TestValidator_PushProposerSettings(t *testing.T) { ProposeConfig: config, DefaultConfig: &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress(defaultFeeHex), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: uint64(40000000), }, }, @@ -1952,8 +2013,8 @@ func TestValidator_PushProposerSettings(t *testing.T) { ProposeConfig: nil, DefaultConfig: &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress(defaultFeeHex), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: params.BeaconConfig().DefaultBuilderGasLimit, }, }, @@ -1992,7 +2053,7 @@ func TestValidator_PushProposerSettings(t *testing.T) { }, logMessages: []string{ "prepare beacon proposer and update fee recipient until a validator index is assigned", - "not be included in validator registration until a validator index is assigned", + "will not be included in MEV builder validator registration until a validator index is assigned", }, }, } @@ -2029,7 +2090,11 @@ func TestValidator_PushProposerSettings(t *testing.T) { } if len(tt.logMessages) > 0 { for _, message := range tt.logMessages { - assert.LogsContain(t, hook, message) + if tt.doesntContainLogs { + assert.LogsDoNotContain(t, hook, message) + } else { + assert.LogsContain(t, hook, message) + } } } diff --git a/validator/node/node.go b/validator/node/node.go index a667898421e5..2b92bed21e08 100644 --- a/validator/node/node.go +++ b/validator/node/node.go @@ -497,18 +497,18 @@ func proposerSettings(cliCtx *cli.Context) (*validatorServiceConfig.ProposerSett !cliCtx.IsSet(flags.ProposerSettingsFlag.Name) && !cliCtx.IsSet(flags.ProposerSettingsURLFlag.Name) { suggestedFee := cliCtx.String(flags.SuggestedFeeRecipientFlag.Name) - var vr *validatorServiceConfig.ValidatorRegistration - if cliCtx.Bool(flags.EnableValidatorRegistrationFlag.Name) { - vr = &validatorServiceConfig.ValidatorRegistration{ - Enable: true, + var vr *validatorServiceConfig.BuilderConfig + if cliCtx.Bool(flags.EnableBuilderFlag.Name) { + vr = &validatorServiceConfig.BuilderConfig{ + Enabled: true, GasLimit: reviewGasLimit(params.BeaconConfig().DefaultBuilderGasLimit), } } fileConfig = &validatorServiceConfig.ProposerSettingsPayload{ ProposerConfig: nil, DefaultConfig: &validatorServiceConfig.ProposerOptionPayload{ - FeeRecipient: suggestedFee, - ValidatorRegistration: vr, + FeeRecipient: suggestedFee, + BuilderConfig: vr, }, } } @@ -542,11 +542,11 @@ func proposerSettings(cliCtx *cli.Context) (*validatorServiceConfig.ProposerSett return nil, err } vpSettings.DefaultConfig = &validatorServiceConfig.ProposerOption{ - FeeRecipient: common.HexToAddress(fileConfig.DefaultConfig.FeeRecipient), - ValidatorRegistration: fileConfig.DefaultConfig.ValidatorRegistration, + FeeRecipient: common.HexToAddress(fileConfig.DefaultConfig.FeeRecipient), + BuilderConfig: fileConfig.DefaultConfig.BuilderConfig, } - if vpSettings.DefaultConfig.ValidatorRegistration != nil { - vpSettings.DefaultConfig.ValidatorRegistration.GasLimit = reviewGasLimit(vpSettings.DefaultConfig.ValidatorRegistration.GasLimit) + if vpSettings.DefaultConfig.BuilderConfig != nil { + vpSettings.DefaultConfig.BuilderConfig.GasLimit = reviewGasLimit(vpSettings.DefaultConfig.BuilderConfig.GasLimit) } if fileConfig.ProposerConfig != nil { @@ -568,12 +568,12 @@ func proposerSettings(cliCtx *cli.Context) (*validatorServiceConfig.ProposerSett if err := warnNonChecksummedAddress(option.FeeRecipient); err != nil { return nil, err } - if option.ValidatorRegistration != nil { - option.ValidatorRegistration.GasLimit = reviewGasLimit(option.ValidatorRegistration.GasLimit) + if option.BuilderConfig != nil { + option.BuilderConfig.GasLimit = reviewGasLimit(option.BuilderConfig.GasLimit) } vpSettings.ProposeConfig[bytesutil.ToBytes48(decodedKey)] = &validatorServiceConfig.ProposerOption{ - FeeRecipient: common.HexToAddress(option.FeeRecipient), - ValidatorRegistration: option.ValidatorRegistration, + FeeRecipient: common.HexToAddress(option.FeeRecipient), + BuilderConfig: option.BuilderConfig, } } diff --git a/validator/node/node_test.go b/validator/node/node_test.go index 934954c0274f..da94ee969ad1 100644 --- a/validator/node/node_test.go +++ b/validator/node/node_test.go @@ -279,23 +279,23 @@ func TestProposerSettings(t *testing.T) { ProposeConfig: map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption{ bytesutil.ToBytes48(key1): { FeeRecipient: common.HexToAddress("0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3"), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: params.BeaconConfig().DefaultBuilderGasLimit, }, }, bytesutil.ToBytes48(key2): { FeeRecipient: common.HexToAddress("0x60155530FCE8a85ec7055A5F8b2bE214B3DaeFd4"), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: params.BeaconConfig().DefaultBuilderGasLimit, }, }, }, DefaultConfig: &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: params.BeaconConfig().DefaultBuilderGasLimit, }, }, @@ -344,16 +344,16 @@ func TestProposerSettings(t *testing.T) { ProposeConfig: map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption{ bytesutil.ToBytes48(key1): { FeeRecipient: common.HexToAddress("0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3"), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: uint64(40000000), }, }, }, DefaultConfig: &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: false, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: false, GasLimit: params.BeaconConfig().DefaultBuilderGasLimit, }, }, @@ -394,8 +394,8 @@ func TestProposerSettings(t *testing.T) { ProposeConfig: nil, DefaultConfig: &validatorserviceconfig.ProposerOption{ FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"), - ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{ - Enable: true, + BuilderConfig: &validatorserviceconfig.BuilderConfig{ + Enabled: true, GasLimit: params.BeaconConfig().DefaultBuilderGasLimit, }, }, @@ -525,7 +525,7 @@ func TestProposerSettings(t *testing.T) { require.NoError(t, set.Set(flags.SuggestedFeeRecipientFlag.Name, tt.args.proposerSettingsFlagValues.defaultfee)) } if tt.validatorRegistrationEnabled { - set.Bool(flags.EnableValidatorRegistrationFlag.Name, true, "") + set.Bool(flags.EnableBuilderFlag.Name, true, "") } cliCtx := cli.NewContext(&app, set, nil) got, err := proposerSettings(cliCtx) diff --git a/validator/node/testdata/good-prepare-beacon-proposer-config-multiple.json b/validator/node/testdata/good-prepare-beacon-proposer-config-multiple.json index 7ed7bff42121..3cebe89b5816 100644 --- a/validator/node/testdata/good-prepare-beacon-proposer-config-multiple.json +++ b/validator/node/testdata/good-prepare-beacon-proposer-config-multiple.json @@ -2,23 +2,23 @@ "proposer_config": { "0xa057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7a": { "fee_recipient": "0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3", - "validator_registration": { - "enable": true, + "builder": { + "enabled": true, "gas_limit": 30000000 } }, "0xb057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7b": { "fee_recipient": "0x60155530FCE8a85ec7055A5F8b2bE214B3DaeFd4", - "validator_registration": { - "enable": true, + "builder": { + "enabled": true, "gas_limit": 30000000 } } }, "default_config": { "fee_recipient": "0x6e35733c5af9B61374A128e6F85f553aF09ff89A", - "validator_registration": { - "enable": true, + "builder": { + "enabled": true, "gas_limit": 30000000 } } diff --git a/validator/node/testdata/good-prepare-beacon-proposer-config.yaml b/validator/node/testdata/good-prepare-beacon-proposer-config.yaml index 51f6b676ae55..6c6ec0132b32 100644 --- a/validator/node/testdata/good-prepare-beacon-proposer-config.yaml +++ b/validator/node/testdata/good-prepare-beacon-proposer-config.yaml @@ -2,11 +2,11 @@ proposer_config: '0xa057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7a': fee_recipient: '0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3' - validator_registration: - enable: true + builder: + enabled: true gas_limit: 40000000 default_config: fee_recipient: '0x6e35733c5af9B61374A128e6F85f553aF09ff89A' - validator_registration: - enable: false + builder: + enabled: false gas_limit: 30000000 \ No newline at end of file diff --git a/validator/rpc/standard_api.go b/validator/rpc/standard_api.go index 49dc51b1d600..fe13bd8ce474 100644 --- a/validator/rpc/standard_api.go +++ b/validator/rpc/standard_api.go @@ -455,7 +455,7 @@ func (s *Server) SetFeeRecipientByPubkey(ctx context.Context, req *ethpbservice. DefaultConfig: &defaultOption, } case s.validatorService.ProposerSettings.ProposeConfig == nil: - pOption.ValidatorRegistration = s.validatorService.ProposerSettings.DefaultConfig.ValidatorRegistration + pOption.BuilderConfig = s.validatorService.ProposerSettings.DefaultConfig.BuilderConfig s.validatorService.ProposerSettings.ProposeConfig = map[[fieldparams.BLSPubkeyLength]byte]*validatorServiceConfig.ProposerOption{ bytesutil.ToBytes48(validatorKey): &pOption, } @@ -464,7 +464,7 @@ func (s *Server) SetFeeRecipientByPubkey(ctx context.Context, req *ethpbservice. if found { proposerOption.FeeRecipient = common.BytesToAddress(req.Ethaddress) } else { - pOption.ValidatorRegistration = s.validatorService.ProposerSettings.DefaultConfig.ValidatorRegistration + pOption.BuilderConfig = s.validatorService.ProposerSettings.DefaultConfig.BuilderConfig s.validatorService.ProposerSettings.ProposeConfig[bytesutil.ToBytes48(validatorKey)] = &pOption } }