From e4497240340467966ca6b6138a8ec334e722fb42 Mon Sep 17 00:00:00 2001 From: james-prysm <90280386+james-prysm@users.noreply.github.com> Date: Thu, 27 Jul 2023 11:45:16 -0500 Subject: [PATCH] Bugfix: proposer-settings edge case for activating validators (#12671) --- validator/client/runner.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/validator/client/runner.go b/validator/client/runner.go index afe548e64..45157256a 100644 --- a/validator/client/runner.go +++ b/validator/client/runner.go @@ -108,8 +108,9 @@ func run(ctx context.Context, v iface.Validator) { continue } - // create call on a separate thread to push proposer settings from the middle of an epoch. - if slots.SinceEpochStarts(slot) == params.BeaconConfig().SlotsPerEpoch/2 && v.ProposerSettings() != nil { + // call push proposer setting at the start of each epoch to account for the following edge case: + // proposer is activated at the start of epoch and tries to propose immediately + if slots.IsEpochStart(slot) && v.ProposerSettings() != nil { go func() { // deadline set for 1 epoch from call to not overlap. epochDeadline := v.SlotDeadline(slot + params.BeaconConfig().SlotsPerEpoch - 1)