mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-05 09:14:28 +00:00
Increase validator client startup proposer settings deadline (#12533)
Co-authored-by: james-prysm <90280386+james-prysm@users.noreply.github.com>
This commit is contained in:
parent
3bc808352f
commit
0b10263dd5
@ -58,7 +58,7 @@ func run(ctx context.Context, v iface.Validator) {
|
|||||||
if v.ProposerSettings() != nil {
|
if v.ProposerSettings() != nil {
|
||||||
log.Infof("Validator client started with provided proposer settings that sets options such as fee recipient"+
|
log.Infof("Validator client started with provided proposer settings that sets options such as fee recipient"+
|
||||||
" and will periodically update the beacon node and custom builder (if --%s)", flags.EnableBuilderFlag.Name)
|
" and will periodically update the beacon node and custom builder (if --%s)", flags.EnableBuilderFlag.Name)
|
||||||
deadline := time.Now().Add(time.Duration(params.BeaconConfig().SecondsPerSlot) * time.Second)
|
deadline := time.Now().Add(5 * time.Minute)
|
||||||
if err := v.PushProposerSettings(ctx, km, headSlot, deadline); err != nil {
|
if err := v.PushProposerSettings(ctx, km, headSlot, deadline); err != nil {
|
||||||
if errors.Is(err, ErrBuilderValidatorRegistration) {
|
if errors.Is(err, ErrBuilderValidatorRegistration) {
|
||||||
log.WithError(err).Warn("Push proposer settings error")
|
log.WithError(err).Warn("Push proposer settings error")
|
||||||
|
@ -248,31 +248,6 @@ func TestUpdateProposerSettingsAt_EpochStart(t *testing.T) {
|
|||||||
assert.LogsContain(t, hook, "updated proposer settings")
|
assert.LogsContain(t, hook, "updated proposer settings")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestUpdateProposerSettingsAt_EpochEndExceeded(t *testing.T) {
|
|
||||||
v := &testutil.FakeValidator{Km: &mockKeymanager{accountsChangedFeed: &event.Feed{}}, ProposerSettingWait: time.Duration(params.BeaconConfig().SecondsPerSlot+1) * time.Second}
|
|
||||||
err := v.SetProposerSettings(context.Background(), &validatorserviceconfig.ProposerSettings{
|
|
||||||
DefaultConfig: &validatorserviceconfig.ProposerOption{
|
|
||||||
FeeRecipientConfig: &validatorserviceconfig.FeeRecipientConfig{
|
|
||||||
FeeRecipient: common.HexToAddress("0x046Fb65722E7b2455012BFEBf6177F1D2e9738D9"),
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
require.NoError(t, err)
|
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
|
||||||
hook := logTest.NewGlobal()
|
|
||||||
slot := params.BeaconConfig().SlotsPerEpoch - 1 //have it set close to the end of epoch
|
|
||||||
ticker := make(chan primitives.Slot)
|
|
||||||
v.NextSlotRet = ticker
|
|
||||||
go func() {
|
|
||||||
ticker <- slot
|
|
||||||
cancel()
|
|
||||||
}()
|
|
||||||
|
|
||||||
run(ctx, v)
|
|
||||||
// can't test "Failed to update proposer settings" because of log.fatal
|
|
||||||
assert.LogsContain(t, hook, "deadline exceeded")
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestUpdateProposerSettingsAt_EpochEndOk(t *testing.T) {
|
func TestUpdateProposerSettingsAt_EpochEndOk(t *testing.T) {
|
||||||
v := &testutil.FakeValidator{Km: &mockKeymanager{accountsChangedFeed: &event.Feed{}}, ProposerSettingWait: time.Duration(params.BeaconConfig().SecondsPerSlot-1) * time.Second}
|
v := &testutil.FakeValidator{Km: &mockKeymanager{accountsChangedFeed: &event.Feed{}}, ProposerSettingWait: time.Duration(params.BeaconConfig().SecondsPerSlot-1) * time.Second}
|
||||||
err := v.SetProposerSettings(context.Background(), &validatorserviceconfig.ProposerSettings{
|
err := v.SetProposerSettings(context.Background(), &validatorserviceconfig.ProposerSettings{
|
||||||
|
Loading…
Reference in New Issue
Block a user