Context
trackedSlots in pkg/service/bootstrapper/beacon_block_measures.go is updated from two paths:
composeBlockTelemetry — sets EthSeenAtMs / MumSeenAtMs (block seen)
RecordMumPublishedAt — sets only MumPublishedAtMs (block published to mump2p on the CL path)
The blocks_first_seen_{mump2p,libp2p}_total counters (dashboard: "mump2p boost %") use map presence as "already seen":
firstForSlot := true
Upsert(slot, func(v) { firstForSlot = false; ... }, zeroVal)
if firstForSlot { IncBlocksFirstSeen(source) }
Problem
On the CL path, RecordMumPublishedAt runs synchronously after publish, while HandleBeaconBlock → composeBlockTelemetry is async. The map entry can exist (with both seen fields still 0) before the libp2p seen timestamp is written. LibP2P may then miss first-seen credit even when it arrived first → possible undercount of libp2p-first / inflated mump2p boost %.
Open question: should an entry ever exist with both EthSeenAtMs == 0 and MumSeenAtMs == 0? Today it can, because RecordMumPublishedAt creates one.
Options
- Count first-seen when
EthSeenAtMs == 0 && MumSeenAtMs == 0
- Store publish times separately so
trackedSlots presence means seen
- Leave as-is if the race is negligible in practice
Note
An in-flight fix was reverted until we agree on intended semantics and validate dashboard impact.
Context
trackedSlotsinpkg/service/bootstrapper/beacon_block_measures.gois updated from two paths:composeBlockTelemetry— setsEthSeenAtMs/MumSeenAtMs(block seen)RecordMumPublishedAt— sets onlyMumPublishedAtMs(block published to mump2p on the CL path)The
blocks_first_seen_{mump2p,libp2p}_totalcounters (dashboard: "mump2p boost %") use map presence as "already seen":Problem
On the CL path,
RecordMumPublishedAtruns synchronously after publish, whileHandleBeaconBlock→composeBlockTelemetryis async. The map entry can exist (with both seen fields still0) before the libp2p seen timestamp is written. LibP2P may then miss first-seen credit even when it arrived first → possible undercount of libp2p-first / inflated mump2p boost %.Open question: should an entry ever exist with both
EthSeenAtMs == 0andMumSeenAtMs == 0? Today it can, becauseRecordMumPublishedAtcreates one.Options
EthSeenAtMs == 0 && MumSeenAtMs == 0trackedSlotspresence means seenNote
An in-flight fix was reverted until we agree on intended semantics and validate dashboard impact.