diff --git a/CHANGELOG.md b/CHANGELOG.md index 762d433..1fec57b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ dev: - use multisign for contributions and proofs with enabled accounts - use multisign for signing slot selections with enabled accounts - standardise provider address format across client and strategy operations + - ensure that secondary validator registrations take place for all accounts + +1.9.1: + - ensure that secondary validator registrations take place for all accounts 1.9.0: - allow Vouch to start with some consensus nodes unavailable diff --git a/services/blockrelay/standard/submitvalidatorregistrations.go b/services/blockrelay/standard/submitvalidatorregistrations.go index 9bca3be..6e05241 100644 --- a/services/blockrelay/standard/submitvalidatorregistrations.go +++ b/services/blockrelay/standard/submitvalidatorregistrations.go @@ -120,9 +120,15 @@ func (s *Service) submitValidatorRegistrationsForAccounts(ctx context.Context, consensusRegistrations := make([]*consensusapi.VersionedSignedValidatorRegistration, 0, len(accounts)) relayRegistrations := make(map[string][]*builderapi.VersionedSignedValidatorRegistration) for _, account := range accounts { - if err := s.generateValidatorRegistrationsForAccount(ctx, account, controlledValidators, consensusRegistrations, relayRegistrations); err != nil { + accountConsensusRegistrations, err := s.generateValidatorRegistrationsForAccount(ctx, + account, + controlledValidators, + relayRegistrations, + ) + if err != nil { return err } + consensusRegistrations = append(consensusRegistrations, accountConsensusRegistrations...) } span.AddEvent("Generated registrations") @@ -155,21 +161,25 @@ func (s *Service) submitValidatorRegistrationsForAccounts(ctx context.Context, func (s *Service) generateValidatorRegistrationsForAccount(ctx context.Context, account e2wtypes.Account, controlledValidators map[phase0.BLSPubKey]struct{}, - consensusRegistrations []*consensusapi.VersionedSignedValidatorRegistration, relayRegistrations map[string][]*builderapi.VersionedSignedValidatorRegistration, -) error { +) ( + []*consensusapi.VersionedSignedValidatorRegistration, + error, +) { pubkey := util.ValidatorPubkey(account) controlledValidators[pubkey] = struct{}{} proposerConfig, err := s.executionConfig.ProposerConfig(ctx, account, pubkey, s.fallbackFeeRecipient, s.fallbackGasLimit) if err != nil { - return errors.Wrap(err, "No proposer configuration; cannot submit validator registrations") + return nil, errors.Wrap(err, "No proposer configuration; cannot submit validator registrations") } if proposerConfig.FeeRecipient.IsZero() { s.log.Error().Stringer("validator", pubkey).Msg("Received 0 execution address for validator registration; using fallback") proposerConfig.FeeRecipient = s.fallbackFeeRecipient } + consensusRegistrations := make([]*consensusapi.VersionedSignedValidatorRegistration, 0, len(proposerConfig.Relays)) + for index, relay := range proposerConfig.Relays { relayRegistration, consensusRegistration, err := s.generateValidatorRegistrationForRelay(ctx, account, pubkey, relay) if err != nil { @@ -195,7 +205,7 @@ func (s *Service) generateValidatorRegistrationsForAccount(ctx context.Context, } } - return nil + return consensusRegistrations, nil } func (s *Service) submitRelayRegistrations(ctx context.Context,