Skip to content

Commit

Permalink
core/tracker: fix inclusion checker bug (#2670)
Browse files Browse the repository at this point in the history
Fixes inclusion checker bug which was reporting false negatives about the inclusion blinded blocks. This happened because of misconfiguration between deadline of a duty and inclusion checker lag. Duty deadline of `builder_proposer` is 5 slots while inclusion lag is 4 slots. Inclusion checker should start checking after duty deadline is hit to avoid getting any submissions after that.
Which is why even the blinded block was _actually_ proposed successfully, inclusion checker marked it failed as duty was still active and retryer was busy retrying `blinded_block` submission request.

category: bug
ticket: #2661
  • Loading branch information
dB2510 authored Nov 1, 2023
1 parent 642fd6b commit e4f2047
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions core/tracker/inclusion.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ import (

const (
// InclCheckLag is the number of slots to lag before checking inclusion.
// We wait for 4 slots to mitigate against reorgs as it should cover almost all reorg scenarios.
// Reorgs of more than 4 slots are very rare in ethereum PoS.
InclCheckLag = 4
// We wait for 6 slots to mitigate against reorgs as it should cover almost all reorg scenarios.
// Reorgs of more than 6 slots are very rare in ethereum PoS.
// The inclusion checker should begin checking for the inclusion of duties after the duty deadline is reached,
// i.e., after 5 slots.
InclCheckLag = 6

// InclMissedLag is the number of slots after which we assume the duty was not included and we
// delete cached submissions.
InclMissedLag = 32
Expand Down Expand Up @@ -194,6 +197,17 @@ func (i *inclusionCore) CheckBlock(ctx context.Context, block block) {
continue
}

msg := "Broadcasted block included on-chain"
if sub.Duty.Type == core.DutyBuilderProposer {
msg = "Broadcasted blinded block included on-chain"
}

log.Info(ctx, msg,
z.I64("block_slot", block.Slot),
z.Any("pubkey", sub.Pubkey),
z.Any("broadcast_delay", sub.Delay),
)

// Just report block inclusions to tracker and trim
i.trackerInclFunc(sub.Duty, sub.Pubkey, sub.Data, nil)
delete(i.submissions, key)
Expand Down

0 comments on commit e4f2047

Please sign in to comment.