Skip to content
Merged
Changes from all 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
11 changes: 11 additions & 0 deletions packages/beacon-node/src/api/impl/beacon/blocks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ export function getBeaconBlockApi({
const sentPeersArr = await promiseAllMaybeAsync<number | void>(publishPromises);

if (isForkPostFulu(fork)) {
let columnsPublishedWithZeroPeers = 0;
// sent peers per topic are logged in network.publishGossip(), here we only track metrics for it
// starting from fulu, we have to push to 128 subnets so need to make sure we have enough sent peers per topic
// + 1 because we publish to beacon_block first
Expand All @@ -289,6 +290,16 @@ export function getBeaconBlockApi({
const sentPeers = sentPeersArr[i + 1] as number;
// sent peers could be 0 as we set `allowPublishToZeroTopicPeers=true` in network.publishDataColumnSidecar() api
metrics?.dataColumns.sentPeersPerSubnet.observe(sentPeers);
if (sentPeers === 0) {
columnsPublishedWithZeroPeers++;
}
}
if (columnsPublishedWithZeroPeers > 0) {
chain.logger.warn("Published data columns to 0 peers, increased risk of reorg", {
slot,
blockRoot,
columns: columnsPublishedWithZeroPeers,
});
}
}

Expand Down
Loading