mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 07:58:22 -05:00
changing gaslimit to validator registration (#10992)
* changing gaslimit to validator registration * adding new flag to enable validator registration for suggested fee recipient * making sure default gaslimit is set * Update cmd/validator/flags/flags.go Co-authored-by: terencechain <terence@prysmaticlabs.com> Co-authored-by: Raul Jordan <raul@prysmaticlabs.com> Co-authored-by: terencechain <terence@prysmaticlabs.com> Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -358,6 +358,13 @@ var (
|
||||
" For additional setting overrides use the --" + ProposerSettingsFlag.Name + " or --" + ProposerSettingsURLFlag.Name + " Flags. ",
|
||||
Value: params.BeaconConfig().EthBurnAddressHex,
|
||||
}
|
||||
|
||||
// EnableValidatorRegistrationFlag enables the periodic validator registration API calls that will update the custom builder with validator settings.
|
||||
EnableValidatorRegistrationFlag = &cli.StringFlag{
|
||||
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",
|
||||
Value: "",
|
||||
}
|
||||
)
|
||||
|
||||
// DefaultValidatorDir returns OS-specific default validator directory.
|
||||
|
||||
@@ -80,6 +80,7 @@ var appFlags = []cli.Flag{
|
||||
flags.SuggestedFeeRecipientFlag,
|
||||
flags.ProposerSettingsURLFlag,
|
||||
flags.ProposerSettingsFlag,
|
||||
flags.EnableValidatorRegistrationFlag,
|
||||
////////////////////
|
||||
cmd.DisableMonitoringFlag,
|
||||
cmd.MonitoringHostFlag,
|
||||
|
||||
@@ -114,6 +114,7 @@ var appHelpFlagGroups = []flagGroup{
|
||||
flags.ProposerSettingsFlag,
|
||||
flags.ProposerSettingsURLFlag,
|
||||
flags.SuggestedFeeRecipientFlag,
|
||||
flags.EnableValidatorRegistrationFlag,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -16,10 +16,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.
|
||||
// GasLimit is a number set to help the network decide on the maximum gas in each block.
|
||||
type ProposerOptionPayload struct {
|
||||
FeeRecipient string `json:"fee_recipient" yaml:"fee_recipient"`
|
||||
GasLimit uint64 `json:"gas_limit,omitempty" yaml:"gas_limit,omitempty"`
|
||||
FeeRecipient string `json:"fee_recipient" yaml:"fee_recipient"`
|
||||
ValidatorRegistration *ValidatorRegistration `json:"validator_registration" yaml:"validator_registration"`
|
||||
}
|
||||
|
||||
// ValidatorRegistration 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"`
|
||||
}
|
||||
|
||||
// ProposerSettings is a Prysm internal representation of the fee recipient config on the validator client.
|
||||
@@ -31,14 +37,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
|
||||
GasLimit uint64
|
||||
FeeRecipient common.Address
|
||||
ValidatorRegistration *ValidatorRegistration
|
||||
}
|
||||
|
||||
// DefaultProposerOption returns a Proposer Option with defaults filled
|
||||
func DefaultProposerOption() ProposerOption {
|
||||
return ProposerOption{
|
||||
FeeRecipient: params.BeaconConfig().DefaultFeeRecipient,
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
FeeRecipient: params.BeaconConfig().DefaultFeeRecipient,
|
||||
ValidatorRegistration: nil,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -994,6 +994,7 @@ func (v *validator) buildProposerSettingsRequests(ctx context.Context, pubkeys [
|
||||
var registerValidatorRequests []*ethpb.ValidatorRegistrationV1
|
||||
// need to check for pubkey to validator index mappings
|
||||
for i, key := range pubkeys {
|
||||
var enableValidatorRegistration bool
|
||||
skipAppendToFeeRecipientArray := false
|
||||
feeRecipient := common.HexToAddress(params.BeaconConfig().EthBurnAddressHex)
|
||||
gasLimit := params.BeaconConfig().DefaultBuilderGasLimit
|
||||
@@ -1012,14 +1013,25 @@ func (v *validator) buildProposerSettingsRequests(ctx context.Context, pubkeys [
|
||||
}
|
||||
if v.ProposerSettings.DefaultConfig != nil {
|
||||
feeRecipient = v.ProposerSettings.DefaultConfig.FeeRecipient
|
||||
gasLimit = v.ProposerSettings.DefaultConfig.GasLimit
|
||||
vr := v.ProposerSettings.DefaultConfig.ValidatorRegistration
|
||||
if vr != nil && vr.Enable {
|
||||
gasLimit = vr.GasLimit
|
||||
enableValidatorRegistration = true
|
||||
}
|
||||
|
||||
}
|
||||
if v.ProposerSettings.ProposeConfig != nil {
|
||||
option, ok := v.ProposerSettings.ProposeConfig[key]
|
||||
if ok && option != nil {
|
||||
// override the default if a proposeconfig is set
|
||||
feeRecipient = option.FeeRecipient
|
||||
gasLimit = option.GasLimit
|
||||
vr := option.ValidatorRegistration
|
||||
if vr != nil && vr.Enable {
|
||||
gasLimit = vr.GasLimit
|
||||
enableValidatorRegistration = true
|
||||
} else {
|
||||
enableValidatorRegistration = false
|
||||
}
|
||||
}
|
||||
}
|
||||
if hexutil.Encode(feeRecipient.Bytes()) == params.BeaconConfig().EthBurnAddressHex {
|
||||
@@ -1031,13 +1043,14 @@ func (v *validator) buildProposerSettingsRequests(ctx context.Context, pubkeys [
|
||||
FeeRecipient: feeRecipient[:],
|
||||
})
|
||||
}
|
||||
registerValidatorRequests = append(registerValidatorRequests, ðpb.ValidatorRegistrationV1{
|
||||
FeeRecipient: feeRecipient[:],
|
||||
GasLimit: gasLimit,
|
||||
Timestamp: uint64(time.Now().UTC().Unix()),
|
||||
Pubkey: pubkeys[i][:],
|
||||
})
|
||||
|
||||
if enableValidatorRegistration {
|
||||
registerValidatorRequests = append(registerValidatorRequests, ðpb.ValidatorRegistrationV1{
|
||||
FeeRecipient: feeRecipient[:],
|
||||
GasLimit: gasLimit,
|
||||
Timestamp: uint64(time.Now().UTC().Unix()),
|
||||
Pubkey: pubkeys[i][:],
|
||||
})
|
||||
}
|
||||
}
|
||||
return validatorToFeeRecipients, registerValidatorRequests, nil
|
||||
}
|
||||
|
||||
@@ -378,6 +378,10 @@ func TestWaitMultipleActivation_LogsActivationEpochOK(t *testing.T) {
|
||||
ProposeConfig: nil,
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: uint64(40000000),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -435,6 +439,10 @@ func TestWaitActivation_NotAllValidatorsActivatedOK(t *testing.T) {
|
||||
ProposeConfig: nil,
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: uint64(40000000),
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -1546,19 +1554,25 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
}).Return(nil, nil)
|
||||
config[keys[0]] = &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0x055Fb65722E7b2455043BFEBf6177F1D2e9738D9"),
|
||||
GasLimit: uint64(40000000),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: uint64(40000000),
|
||||
},
|
||||
}
|
||||
v.ProposerSettings = &validatorserviceconfig.ProposerSettings{
|
||||
ProposeConfig: config,
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress(defaultFeeHex),
|
||||
GasLimit: uint64(35000000),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: uint64(35000000),
|
||||
},
|
||||
},
|
||||
}
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Times(2).Return(&empty.Empty{}, nil)
|
||||
).Return(&empty.Empty{}, nil)
|
||||
return &v
|
||||
},
|
||||
feeRecipientMap: map[types.ValidatorIndex]string{
|
||||
@@ -1577,6 +1591,81 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: " Happy Path default doesn't send validator registration",
|
||||
validatorSetter: func(t *testing.T) *validator {
|
||||
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
db: db,
|
||||
pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]types.ValidatorIndex),
|
||||
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"),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: uint64(40000000),
|
||||
},
|
||||
}
|
||||
v.ProposerSettings = &validatorserviceconfig.ProposerSettings{
|
||||
ProposeConfig: config,
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress(defaultFeeHex),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: false,
|
||||
GasLimit: uint64(35000000),
|
||||
},
|
||||
},
|
||||
}
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Return(&empty.Empty{}, nil)
|
||||
return &v
|
||||
},
|
||||
feeRecipientMap: map[types.ValidatorIndex]string{
|
||||
1: "0x055Fb65722E7b2455043BFEBf6177F1D2e9738D9",
|
||||
2: defaultFeeHex,
|
||||
},
|
||||
mockExpectedRequests: []ExpectedValidatorRegistration{
|
||||
|
||||
{
|
||||
FeeRecipient: common.HexToAddress("0x055Fb65722E7b2455043BFEBf6177F1D2e9738D9").Bytes(),
|
||||
GasLimit: uint64(40000000),
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: " Happy Path",
|
||||
validatorSetter: func(t *testing.T) *validator {
|
||||
@@ -1605,7 +1694,10 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
ProposeConfig: nil,
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress(defaultFeeHex),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
}
|
||||
client.EXPECT().ValidatorIndex(
|
||||
@@ -1636,6 +1728,64 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: " Happy Path validator index not found in cache",
|
||||
validatorSetter: func(t *testing.T) *validator {
|
||||
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
db: db,
|
||||
pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]types.ValidatorIndex),
|
||||
useWeb: false,
|
||||
interopKeysConfig: &local.InteropKeymanagerConfig{
|
||||
NumValidatorKeys: 1,
|
||||
Offset: 1,
|
||||
},
|
||||
}
|
||||
err := v.WaitForKeymanagerInitialization(ctx)
|
||||
require.NoError(t, err)
|
||||
v.ProposerSettings = &validatorserviceconfig.ProposerSettings{
|
||||
ProposeConfig: nil,
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress(defaultFeeHex),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: uint64(40000000),
|
||||
},
|
||||
},
|
||||
}
|
||||
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().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Return(&empty.Empty{}, nil)
|
||||
client.EXPECT().PrepareBeaconProposer(gomock.Any(), ðpb.PrepareBeaconProposerRequest{
|
||||
Recipients: []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer{
|
||||
{FeeRecipient: common.HexToAddress(defaultFeeHex).Bytes(), ValidatorIndex: 1},
|
||||
},
|
||||
}).Return(nil, nil)
|
||||
return &v
|
||||
},
|
||||
feeRecipientMap: map[types.ValidatorIndex]string{
|
||||
1: defaultFeeHex,
|
||||
},
|
||||
mockExpectedRequests: []ExpectedValidatorRegistration{
|
||||
{
|
||||
FeeRecipient: byteValueAddress,
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: " Skip if no config",
|
||||
validatorSetter: func(t *testing.T) *validator {
|
||||
@@ -1655,61 +1805,6 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
return &v
|
||||
},
|
||||
},
|
||||
{
|
||||
name: " Happy Path validator index not found in cache",
|
||||
validatorSetter: func(t *testing.T) *validator {
|
||||
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
db: db,
|
||||
pubkeyToValidatorIndex: make(map[[fieldparams.BLSPubkeyLength]byte]types.ValidatorIndex),
|
||||
useWeb: false,
|
||||
interopKeysConfig: &local.InteropKeymanagerConfig{
|
||||
NumValidatorKeys: 1,
|
||||
Offset: 1,
|
||||
},
|
||||
}
|
||||
err := v.WaitForKeymanagerInitialization(ctx)
|
||||
require.NoError(t, err)
|
||||
v.ProposerSettings = &validatorserviceconfig.ProposerSettings{
|
||||
ProposeConfig: nil,
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress(defaultFeeHex),
|
||||
},
|
||||
}
|
||||
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().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Return(&empty.Empty{}, nil)
|
||||
client.EXPECT().PrepareBeaconProposer(gomock.Any(), ðpb.PrepareBeaconProposerRequest{
|
||||
Recipients: []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer{
|
||||
{FeeRecipient: common.HexToAddress(defaultFeeHex).Bytes(), ValidatorIndex: 1},
|
||||
},
|
||||
}).Return(nil, nil)
|
||||
return &v
|
||||
},
|
||||
feeRecipientMap: map[types.ValidatorIndex]string{
|
||||
1: defaultFeeHex,
|
||||
},
|
||||
mockExpectedRequests: []ExpectedValidatorRegistration{
|
||||
{
|
||||
FeeRecipient: byteValueAddress,
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: " proposer config not nil but fee recipient empty",
|
||||
validatorSetter: func(t *testing.T) *validator {
|
||||
@@ -1814,7 +1909,6 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
{
|
||||
name: "register validator batch failed",
|
||||
validatorSetter: func(t *testing.T) *validator {
|
||||
|
||||
v := validator{
|
||||
validatorClient: client,
|
||||
node: nodeClient,
|
||||
@@ -1839,21 +1933,29 @@ func TestValidator_PushProposerSettings(t *testing.T) {
|
||||
).Return(ðpb.ValidatorIndexResponse{
|
||||
Index: 1,
|
||||
}, nil)
|
||||
client.EXPECT().PrepareBeaconProposer(gomock.Any(), ðpb.PrepareBeaconProposerRequest{
|
||||
Recipients: []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer{
|
||||
{FeeRecipient: common.HexToAddress("0x0").Bytes(), ValidatorIndex: 1},
|
||||
},
|
||||
}).Return(nil, nil)
|
||||
|
||||
config[keys[0]] = &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.Address{},
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: uint64(40000000),
|
||||
},
|
||||
}
|
||||
v.ProposerSettings = &validatorserviceconfig.ProposerSettings{
|
||||
ProposeConfig: config,
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress(defaultFeeHex),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: uint64(40000000),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
client.EXPECT().PrepareBeaconProposer(gomock.Any(), ðpb.PrepareBeaconProposerRequest{
|
||||
Recipients: []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer{
|
||||
{FeeRecipient: common.HexToAddress("0x0").Bytes(), ValidatorIndex: 1},
|
||||
},
|
||||
}).Return(nil, nil)
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
|
||||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/golang/protobuf/ptypes/empty"
|
||||
"github.com/pkg/errors"
|
||||
fieldparams "github.com/prysmaticlabs/prysm/config/fieldparams"
|
||||
validatorserviceconfig "github.com/prysmaticlabs/prysm/config/validator/service"
|
||||
@@ -106,11 +105,6 @@ func TestWaitActivation_StreamSetupFails_AttemptsToReconnect(t *testing.T) {
|
||||
resp := generateMockStatusResponse([][]byte{pubKey[:]})
|
||||
resp.Statuses[0].Status.Status = ethpb.ValidatorStatus_ACTIVE
|
||||
clientStream.EXPECT().Recv().Return(resp, nil)
|
||||
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Return(&empty.Empty{}, nil)
|
||||
assert.NoError(t, v.WaitForActivation(context.Background(), nil))
|
||||
}
|
||||
|
||||
@@ -160,11 +154,6 @@ func TestWaitForActivation_ReceiveErrorFromStream_AttemptsReconnection(t *testin
|
||||
nil,
|
||||
errors.New("fails"),
|
||||
).Return(resp, nil)
|
||||
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Return(&empty.Empty{}, nil)
|
||||
assert.NoError(t, v.WaitForActivation(context.Background(), nil))
|
||||
}
|
||||
|
||||
@@ -210,11 +199,6 @@ func TestWaitActivation_LogsActivationEpochOK(t *testing.T) {
|
||||
resp,
|
||||
nil,
|
||||
)
|
||||
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Return(&empty.Empty{}, nil)
|
||||
client.EXPECT().PrepareBeaconProposer(gomock.Any(), ðpb.PrepareBeaconProposerRequest{
|
||||
Recipients: []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer{
|
||||
{FeeRecipient: common.HexToAddress("0x046Fb65722E7b2455043BFEBf6177F1D2e9738D9").Bytes(), ValidatorIndex: 1},
|
||||
@@ -265,11 +249,6 @@ func TestWaitForActivation_Exiting(t *testing.T) {
|
||||
resp,
|
||||
nil,
|
||||
)
|
||||
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Return(&empty.Empty{}, nil)
|
||||
client.EXPECT().PrepareBeaconProposer(gomock.Any(), ðpb.PrepareBeaconProposerRequest{
|
||||
Recipients: []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer{
|
||||
{FeeRecipient: common.HexToAddress("0x046Fb65722E7b2455043BFEBf6177F1D2e9738D9").Bytes(), ValidatorIndex: 1},
|
||||
@@ -327,10 +306,6 @@ func TestWaitForActivation_RefetchKeys(t *testing.T) {
|
||||
resp,
|
||||
nil)
|
||||
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Return(&empty.Empty{}, nil)
|
||||
client.EXPECT().PrepareBeaconProposer(gomock.Any(), ðpb.PrepareBeaconProposerRequest{
|
||||
Recipients: []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer{
|
||||
{FeeRecipient: common.HexToAddress("0x046Fb65722E7b2455043BFEBf6177F1D2e9738D9").Bytes(), ValidatorIndex: 1},
|
||||
@@ -412,11 +387,6 @@ func TestWaitForActivation_AccountsChanged(t *testing.T) {
|
||||
nil,
|
||||
)
|
||||
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Times(1).Return(&empty.Empty{}, nil)
|
||||
|
||||
go func() {
|
||||
// We add the active key into the keymanager and simulate a key refresh.
|
||||
time.Sleep(time.Second * 1)
|
||||
@@ -507,11 +477,6 @@ func TestWaitForActivation_AccountsChanged(t *testing.T) {
|
||||
nil,
|
||||
)
|
||||
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Times(1).Return(&empty.Empty{}, nil)
|
||||
|
||||
channel := make(chan [][fieldparams.BLSPubkeyLength]byte)
|
||||
go func() {
|
||||
// We add the active key into the keymanager and simulate a key refresh.
|
||||
@@ -588,10 +553,6 @@ func TestWaitForActivation_RemoteKeymanager(t *testing.T) {
|
||||
PublicKeys: [][]byte{inactiveKey[:], activeKey[:]},
|
||||
},
|
||||
).Return(resp, nil /* err */)
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Times(1).Return(&empty.Empty{}, nil)
|
||||
client.EXPECT().PrepareBeaconProposer(gomock.Any(), ðpb.PrepareBeaconProposerRequest{
|
||||
Recipients: []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer{
|
||||
{FeeRecipient: common.HexToAddress("0x046Fb65722E7b2455043BFEBf6177F1D2e9738D9").Bytes(), ValidatorIndex: 2},
|
||||
@@ -677,11 +638,6 @@ func TestWaitForActivation_RemoteKeymanager(t *testing.T) {
|
||||
PublicKeys: [][]byte{inactiveKey[:], activeKey[:]},
|
||||
},
|
||||
).Return(resp2, nil /* err */)
|
||||
|
||||
client.EXPECT().SubmitValidatorRegistration(
|
||||
gomock.Any(),
|
||||
gomock.Any(),
|
||||
).Times(1).Return(&empty.Empty{}, nil)
|
||||
client.EXPECT().PrepareBeaconProposer(gomock.Any(), ðpb.PrepareBeaconProposerRequest{
|
||||
Recipients: []*ethpb.PrepareBeaconProposerRequest_FeeRecipientContainer{
|
||||
{FeeRecipient: common.HexToAddress("0x046Fb65722E7b2455043BFEBf6177F1D2e9738D9").Bytes(), ValidatorIndex: 2},
|
||||
|
||||
@@ -486,13 +486,22 @@ func proposerSettings(cliCtx *cli.Context) (*validatorServiceConfig.ProposerSett
|
||||
}
|
||||
|
||||
// is overridden by file and URL flags
|
||||
if cliCtx.IsSet(flags.SuggestedFeeRecipientFlag.Name) {
|
||||
if cliCtx.IsSet(flags.SuggestedFeeRecipientFlag.Name) &&
|
||||
!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,
|
||||
GasLimit: reviewGasLimit(params.BeaconConfig().DefaultBuilderGasLimit),
|
||||
}
|
||||
}
|
||||
fileConfig = &validatorServiceConfig.ProposerSettingsPayload{
|
||||
ProposerConfig: nil,
|
||||
DefaultConfig: &validatorServiceConfig.ProposerOptionPayload{
|
||||
FeeRecipient: suggestedFee,
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
FeeRecipient: suggestedFee,
|
||||
ValidatorRegistration: vr,
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -525,7 +534,7 @@ func proposerSettings(cliCtx *cli.Context) (*validatorServiceConfig.ProposerSett
|
||||
|
||||
// default fileConfig is mandatory
|
||||
if fileConfig.DefaultConfig == nil {
|
||||
return nil, errors.New("default fileConfig is required")
|
||||
return nil, errors.New("default fileConfig is required, proposer settings file is either empty or an incorrect format")
|
||||
}
|
||||
if !common.IsHexAddress(fileConfig.DefaultConfig.FeeRecipient) {
|
||||
return nil, errors.New("default fileConfig fee recipient is not a valid eth1 address")
|
||||
@@ -534,8 +543,11 @@ func proposerSettings(cliCtx *cli.Context) (*validatorServiceConfig.ProposerSett
|
||||
return nil, err
|
||||
}
|
||||
vpSettings.DefaultConfig = &validatorServiceConfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress(fileConfig.DefaultConfig.FeeRecipient),
|
||||
GasLimit: reviewGasLimit(fileConfig.DefaultConfig.GasLimit),
|
||||
FeeRecipient: common.HexToAddress(fileConfig.DefaultConfig.FeeRecipient),
|
||||
ValidatorRegistration: fileConfig.DefaultConfig.ValidatorRegistration,
|
||||
}
|
||||
if vpSettings.DefaultConfig.ValidatorRegistration != nil {
|
||||
vpSettings.DefaultConfig.ValidatorRegistration.GasLimit = reviewGasLimit(vpSettings.DefaultConfig.ValidatorRegistration.GasLimit)
|
||||
}
|
||||
|
||||
if fileConfig.ProposerConfig != nil {
|
||||
@@ -557,10 +569,14 @@ func proposerSettings(cliCtx *cli.Context) (*validatorServiceConfig.ProposerSett
|
||||
if err := warnNonChecksummedAddress(option.FeeRecipient); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
vpSettings.ProposeConfig[bytesutil.ToBytes48(decodedKey)] = &validatorServiceConfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress(option.FeeRecipient),
|
||||
GasLimit: reviewGasLimit(option.GasLimit),
|
||||
if option.ValidatorRegistration != nil {
|
||||
option.ValidatorRegistration.GasLimit = reviewGasLimit(option.ValidatorRegistration.GasLimit)
|
||||
}
|
||||
vpSettings.ProposeConfig[bytesutil.ToBytes48(decodedKey)] = &validatorServiceConfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress(option.FeeRecipient),
|
||||
ValidatorRegistration: option.ValidatorRegistration,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -205,12 +205,13 @@ func TestProposerSettings(t *testing.T) {
|
||||
proposerSettingsFlagValues *proposerSettingsFlag
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want func() *validatorserviceconfig.ProposerSettings
|
||||
urlResponse string
|
||||
wantErr string
|
||||
wantLog string
|
||||
name string
|
||||
args args
|
||||
want func() *validatorserviceconfig.ProposerSettings
|
||||
urlResponse string
|
||||
wantErr string
|
||||
wantLog string
|
||||
validatorRegistrationEnabled bool
|
||||
}{
|
||||
{
|
||||
name: "Happy Path Config file File, bad checksum",
|
||||
@@ -228,12 +229,10 @@ func TestProposerSettings(t *testing.T) {
|
||||
ProposeConfig: map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption{
|
||||
bytesutil.ToBytes48(key1): {
|
||||
FeeRecipient: common.HexToAddress("0xae967917c465db8578ca9024c205720b1a3651A9"),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0xae967917c465db8578ca9024c205720b1a3651A9"),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -258,16 +257,25 @@ func TestProposerSettings(t *testing.T) {
|
||||
ProposeConfig: map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption{
|
||||
bytesutil.ToBytes48(key1): {
|
||||
FeeRecipient: common.HexToAddress("0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3"),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
bytesutil.ToBytes48(key2): {
|
||||
FeeRecipient: common.HexToAddress("0x60155530FCE8a85ec7055A5F8b2bE214B3DaeFd4"),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
},
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -289,12 +297,10 @@ func TestProposerSettings(t *testing.T) {
|
||||
ProposeConfig: map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption{
|
||||
bytesutil.ToBytes48(key1): {
|
||||
FeeRecipient: common.HexToAddress("0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3"),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -316,19 +322,25 @@ func TestProposerSettings(t *testing.T) {
|
||||
ProposeConfig: map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption{
|
||||
bytesutil.ToBytes48(key1): {
|
||||
FeeRecipient: common.HexToAddress("0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3"),
|
||||
GasLimit: uint64(40000000),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: uint64(40000000),
|
||||
},
|
||||
},
|
||||
},
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"),
|
||||
GasLimit: uint64(45000000),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: false,
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
wantErr: "",
|
||||
},
|
||||
{
|
||||
name: "Happy Path Suggested Fee File",
|
||||
name: "Happy Path Suggested Fee ",
|
||||
args: args{
|
||||
proposerSettingsFlagValues: &proposerSettingsFlag{
|
||||
dir: "",
|
||||
@@ -341,12 +353,35 @@ func TestProposerSettings(t *testing.T) {
|
||||
ProposeConfig: nil,
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
}
|
||||
},
|
||||
wantErr: "",
|
||||
},
|
||||
{
|
||||
name: "Happy Path Suggested Fee , validator registration enabled",
|
||||
args: args{
|
||||
proposerSettingsFlagValues: &proposerSettingsFlag{
|
||||
dir: "",
|
||||
url: "",
|
||||
defaultfee: "0x6e35733c5af9B61374A128e6F85f553aF09ff89A",
|
||||
},
|
||||
},
|
||||
want: func() *validatorserviceconfig.ProposerSettings {
|
||||
return &validatorserviceconfig.ProposerSettings{
|
||||
ProposeConfig: nil,
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"),
|
||||
ValidatorRegistration: &validatorserviceconfig.ValidatorRegistration{
|
||||
Enable: true,
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
wantErr: "",
|
||||
validatorRegistrationEnabled: true,
|
||||
},
|
||||
{
|
||||
name: "Suggested Fee does not Override Config",
|
||||
args: args{
|
||||
@@ -363,17 +398,41 @@ func TestProposerSettings(t *testing.T) {
|
||||
ProposeConfig: map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption{
|
||||
bytesutil.ToBytes48(key1): {
|
||||
FeeRecipient: common.HexToAddress("0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3"),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
},
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"),
|
||||
GasLimit: params.BeaconConfig().DefaultBuilderGasLimit,
|
||||
},
|
||||
}
|
||||
},
|
||||
wantErr: "",
|
||||
},
|
||||
{
|
||||
name: "Suggested Fee with validator registration does not Override Config",
|
||||
args: args{
|
||||
proposerSettingsFlagValues: &proposerSettingsFlag{
|
||||
dir: "./testdata/good-prepare-beacon-proposer-config.json",
|
||||
url: "",
|
||||
defaultfee: "0x6e35733c5af9B61374A128e6F85f553aF09ff89B",
|
||||
},
|
||||
},
|
||||
want: func() *validatorserviceconfig.ProposerSettings {
|
||||
key1, err := hexutil.Decode("0xa057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7a")
|
||||
require.NoError(t, err)
|
||||
return &validatorserviceconfig.ProposerSettings{
|
||||
ProposeConfig: map[[fieldparams.BLSPubkeyLength]byte]*validatorserviceconfig.ProposerOption{
|
||||
bytesutil.ToBytes48(key1): {
|
||||
FeeRecipient: common.HexToAddress("0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3"),
|
||||
},
|
||||
},
|
||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
||||
FeeRecipient: common.HexToAddress("0x6e35733c5af9B61374A128e6F85f553aF09ff89A"),
|
||||
},
|
||||
}
|
||||
},
|
||||
wantErr: "",
|
||||
validatorRegistrationEnabled: true,
|
||||
},
|
||||
{
|
||||
name: "No flags set means empty config",
|
||||
args: args{
|
||||
@@ -443,6 +502,9 @@ func TestProposerSettings(t *testing.T) {
|
||||
set.String(flags.SuggestedFeeRecipientFlag.Name, tt.args.proposerSettingsFlagValues.defaultfee, "")
|
||||
require.NoError(t, set.Set(flags.SuggestedFeeRecipientFlag.Name, tt.args.proposerSettingsFlagValues.defaultfee))
|
||||
}
|
||||
if tt.validatorRegistrationEnabled {
|
||||
set.Bool(flags.EnableValidatorRegistrationFlag.Name, true, "")
|
||||
}
|
||||
cliCtx := cli.NewContext(&app, set, nil)
|
||||
got, err := proposerSettings(cliCtx)
|
||||
if tt.wantErr != "" {
|
||||
|
||||
@@ -1,13 +1,25 @@
|
||||
{
|
||||
"proposer_config": {
|
||||
"0xa057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7a": {
|
||||
"fee_recipient": "0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3"
|
||||
"fee_recipient": "0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3",
|
||||
"validator_registration": {
|
||||
"enable": true,
|
||||
"gas_limit": 30000000
|
||||
}
|
||||
},
|
||||
"0xb057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7b": {
|
||||
"fee_recipient": "0x60155530FCE8a85ec7055A5F8b2bE214B3DaeFd4"
|
||||
"fee_recipient": "0x60155530FCE8a85ec7055A5F8b2bE214B3DaeFd4",
|
||||
"validator_registration": {
|
||||
"enable": true,
|
||||
"gas_limit": 30000000
|
||||
}
|
||||
}
|
||||
},
|
||||
"default_config": {
|
||||
"fee_recipient": "0x6e35733c5af9B61374A128e6F85f553aF09ff89A"
|
||||
"fee_recipient": "0x6e35733c5af9B61374A128e6F85f553aF09ff89A",
|
||||
"validator_registration": {
|
||||
"enable": true,
|
||||
"gas_limit": 30000000
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
proposer_config:
|
||||
'0xa057816155ad77931185101128655c0191bd0214c201ca48ed887f6c4c6adf334070efcd75140eada5ac83a92506dd7a':
|
||||
fee_recipient: '0x50155530FCE8a85ec7055A5F8b2bE214B3DaeFd3'
|
||||
gas_limit: 40000000
|
||||
validator_registration:
|
||||
enable: true
|
||||
gas_limit: 40000000
|
||||
default_config:
|
||||
fee_recipient: '0x6e35733c5af9B61374A128e6F85f553aF09ff89A'
|
||||
gas_limit: 45000000
|
||||
validator_registration:
|
||||
enable: false
|
||||
gas_limit: 30000000
|
||||
@@ -455,6 +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
|
||||
s.validatorService.ProposerSettings.ProposeConfig = map[[fieldparams.BLSPubkeyLength]byte]*validatorServiceConfig.ProposerOption{
|
||||
bytesutil.ToBytes48(validatorKey): &pOption,
|
||||
}
|
||||
@@ -463,6 +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
|
||||
s.validatorService.ProposerSettings.ProposeConfig[bytesutil.ToBytes48(validatorKey)] = &pOption
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user