prevent blob proposal in pd devnet

This commit is contained in:
Agnish Ghosh 2024-08-17 23:42:31 +05:30
parent cd5532c078
commit 7c33d3f0f4
No known key found for this signature in database
GPG Key ID: 7BDDA05D1B25E9F8

View File

@ -148,22 +148,22 @@ proc routeSignedBeaconBlock*(
# PREVENT PROPOSING BLOB SIDECARS IN PEERDAS DEVNET
var blobRefs = Opt.none(BlobSidecars)
if blobsOpt.isSome():
let blobs = blobsOpt.get()
var workers = newSeq[Future[SendResult]](blobs.len)
for i in 0..<blobs.lenu64:
let subnet_id = compute_subnet_for_blob_sidecar(i)
workers[i] = router[].network.broadcastBlobSidecar(subnet_id, blobs[i])
let allres = await allFinished(workers)
for i in 0..<allres.len:
let res = allres[i]
doAssert res.finished()
if res.failed():
notice "Blob not sent",
blob = shortLog(blobs[i]), error = res.error[]
else:
notice "Blob sent", blob = shortLog(blobs[i])
blobRefs = Opt.some(blobs.mapIt(newClone(it)))
# if blobsOpt.isSome():
# let blobs = blobsOpt.get()
# var workers = newSeq[Future[SendResult]](blobs.len)
# for i in 0..<blobs.lenu64:
# let subnet_id = compute_subnet_for_blob_sidecar(i)
# workers[i] = router[].network.broadcastBlobSidecar(subnet_id, blobs[i])
# let allres = await allFinished(workers)
# for i in 0..<allres.len:
# let res = allres[i]
# doAssert res.finished()
# if res.failed():
# notice "Blob not sent",
# blob = shortLog(blobs[i]), error = res.error[]
# else:
# notice "Blob sent", blob = shortLog(blobs[i])
# blobRefs = Opt.some(blobs.mapIt(newClone(it)))
var dataColumnRefs = Opt.none(DataColumnSidecars)
when typeof(blck).kind >= ConsensusFork.Deneb: