added dataColumnSidecar on deneb fork

This commit is contained in:
Agnish Ghosh 2024-05-27 18:15:41 +05:30
parent aa2ce79770
commit eb0e40a5f0
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8
1 changed files with 15 additions and 5 deletions

View File

@ -1866,16 +1866,26 @@ proc installMessageValidators(node: BeaconNode) =
when consensusFork >= ConsensusFork.Deneb: when consensusFork >= ConsensusFork.Deneb:
# blob_sidecar_{subnet_id} # blob_sidecar_{subnet_id}
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/deneb/p2p-interface.md#blob_sidecar_subnet_id # https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.5/specs/deneb/p2p-interface.md#blob_sidecar_subnet_id
for it in BlobId: # for it in BlobId:
# closureScope: # Needed for inner `proc`; don't lift it out of loop.
# let subnet_id = it
# node.network.addValidator(
# getBlobSidecarTopic(digest, subnet_id), proc (
# blobSidecar: deneb.BlobSidecar
# ): ValidationResult =
# toValidationResult(
# node.processor[].processBlobSidecar(
# MsgSource.gossip, blobSidecar, subnet_id)))
for it in 0'u64..<DATA_COLUMN_SIDECAR_SUBNET_COUNT:
closureScope: # Needed for inner `proc`; don't lift it out of loop. closureScope: # Needed for inner `proc`; don't lift it out of loop.
let subnet_id = it let subnet_id = it
node.network.addValidator( node.network.addValidator(
getBlobSidecarTopic(digest, subnet_id), proc ( getDataColumnSidecarTopic(digest, subnet_id), proc (
blobSidecar: deneb.BlobSidecar dataColumnSidecar: DataColumnSidecar
): ValidationResult = ): ValidationResult =
toValidationResult( toValidationResult(
node.processor[].processBlobSidecar( node.processor[].processDataColumnSidecar(
MsgSource.gossip, blobSidecar, subnet_id))) MsgSource.gossip, dataColumnSidecar, subnet_id)))
node.installLightClientMessageValidators() node.installLightClientMessageValidators()