mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-31 16:58:31 +00:00
enable logging of columns, conditionally subscribe to only topics that i custody for
This commit is contained in:
parent
da735abd35
commit
6a2ba50c19
@ -1149,9 +1149,14 @@ proc fetchCustodySubnetCount* (node: BeaconNode): uint64=
|
||||
proc addDenebMessageHandlers(
|
||||
node: BeaconNode, forkDigest: ForkDigest, slot: Slot) =
|
||||
node.addCapellaMessageHandlers(forkDigest, slot)
|
||||
let targetSubnets = node.fetchCustodySubnetCount()
|
||||
for topic in dataColumnSidecarTopics(forkDigest, targetSubnets):
|
||||
node.network.subscribe(topic, basicParams)
|
||||
let
|
||||
targetSubnets = node.fetchCustodySubnetCount()
|
||||
custody_subnets = node.network.nodeId.get_custody_column_subnet(targetSubnets)
|
||||
|
||||
for i in 0'u64 ..< targetSubnets:
|
||||
if i in custody_subnets.get:
|
||||
let topic = getDataColumnSidecarTopic(forkDigest, i)
|
||||
node.network.subscribe(topic, basicParams)
|
||||
|
||||
if node.config.subscribeAllSubnets:
|
||||
node.network.loadCscnetsMetadata(DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint8)
|
||||
@ -1183,9 +1188,14 @@ proc removeCapellaMessageHandlers(node: BeaconNode, forkDigest: ForkDigest) =
|
||||
|
||||
proc removeDenebMessageHandlers(node: BeaconNode, forkDigest: ForkDigest) =
|
||||
node.removeCapellaMessageHandlers(forkDigest)
|
||||
let targetSubnets = node.fetchCustodySubnetCount()
|
||||
for topic in dataColumnSidecarTopics(forkDigest, targetSubnets):
|
||||
node.network.unsubscribe(topic)
|
||||
let
|
||||
targetSubnets = node.fetchCustodySubnetCount()
|
||||
custody_subnets = node.network.nodeId.get_custody_column_subnet(targetSubnets)
|
||||
|
||||
for i in 0'u64 ..< targetSubnets:
|
||||
if i in custody_subnets.get:
|
||||
let topic = getDataColumnSidecarTopic(forkDigest, i)
|
||||
node.network.unsubscribe(topic, basicParams)
|
||||
|
||||
proc removeElectraMessageHandlers(node: BeaconNode, forkDigest: ForkDigest) =
|
||||
node.removeDenebMessageHandlers(forkDigest)
|
||||
|
@ -103,6 +103,7 @@ type
|
||||
func shortLog*(v: DataColumnSidecar): auto =
|
||||
(
|
||||
index: v.index,
|
||||
data_column: v.column,
|
||||
kzg_commitments: v.kzg_commitments.len,
|
||||
kzg_proofs: v.kzg_proofs.len,
|
||||
block_header: shortLog(v.signed_block_header.message),
|
||||
|
@ -371,7 +371,7 @@ proc verify_data_column_sidecar_kzg_proofs*(sidecar: DataColumnSidecar): Result[
|
||||
sidecarCol = sidecar.column.asSeq
|
||||
kzgProofs = sidecar.kzg_proofs.asSeq
|
||||
|
||||
let res = validate_data_column_sidecar(kzgCommits, cellIndices, sidecarCol, kzgProofs)
|
||||
let res = verifyCellKzgProofBatch(kzgCommits, cellIndices, sidecarCol, kzgProofs)
|
||||
|
||||
if res.isErr():
|
||||
return err("DataColumnSidecar: validation failed")
|
||||
|
Loading…
x
Reference in New Issue
Block a user