Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Push proposer settings every slot: builder #14155

Merged
merged 15 commits into from
Jul 30, 2024
Merged
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions validator/client/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,14 @@ func run(ctx context.Context, v iface.Validator) {
continue
}

// call push proposer setting at the start of each epoch to account for the following edge case:
// call push proposer settings often to account for the following edge cases:
// proposer is activated at the start of epoch and tries to propose immediately
if slots.IsEpochStart(slot) {
go func() {
// deadline set for 1 epoch from call to not overlap.
epochDeadline := v.SlotDeadline(slot + params.BeaconConfig().SlotsPerEpoch - 1)
if err := v.PushProposerSettings(ctx, km, slot, epochDeadline); err != nil {
log.WithError(err).Warn("Failed to update proposer settings")
}
}()
}
// account has changed in the middle of an epoch
go func() {
if err := v.PushProposerSettings(ctx, km, slot, time.Now().Add(1*time.Minute)); err != nil {
log.WithError(err).Warn("Failed to update proposer settings")
}
}()

// Start fetching domain data for the next epoch.
if slots.IsEpochEnd(slot) {
Expand Down
Loading