diff --git a/packages/api/src/beacon/routes/beacon/block.ts b/packages/api/src/beacon/routes/beacon/block.ts index b56006fe4191..95a32097028d 100644 --- a/packages/api/src/beacon/routes/beacon/block.ts +++ b/packages/api/src/beacon/routes/beacon/block.ts @@ -39,6 +39,14 @@ export type BlockHeaderResponse = { }; export enum BroadcastValidation { + /* + NOTE: The value `none` is not part of the spec. + + In case a node is configured only with the unknownBlockSync, it needs to know the unknown parent blocks on the network + to initiate the syncing process. Such cases can be covered only if we publish blocks and make sure no gossip validation + is performed on those. But this behavior is not the default. + */ + none = "none", gossip = "gossip", consensus = "consensus", consensusAndEquivocation = "consensus_and_equivocation", diff --git a/packages/beacon-node/src/api/impl/beacon/blocks/index.ts b/packages/beacon-node/src/api/impl/beacon/blocks/index.ts index 89565426426e..f2e29f00fe57 100644 --- a/packages/beacon-node/src/api/impl/beacon/blocks/index.ts +++ b/packages/beacon-node/src/api/impl/beacon/blocks/index.ts @@ -149,6 +149,11 @@ export function getBeaconBlockApi({ break; } + case routes.beacon.BroadcastValidation.none: { + chain.logger.debug("Skipping broadcast validation", valLogMeta); + break; + } + default: { // error or log warning we do not support this validation const message = `Broadcast validation of ${broadcastValidation} type not implemented yet`;