reenable blobs in block proposal
This commit is contained in:
parent
1a857603b2
commit
c6662bd914
|
@ -24,7 +24,7 @@ const
|
|||
## Allow syncing ~64 blocks/sec (minus request costs)
|
||||
blobResponseCost = allowedOpsPerSecondCost(1000)
|
||||
## Multiple can exist per block, they are much smaller than blocks
|
||||
dataColumnResponseCost = allowedOpsPerSecondCost(250)
|
||||
dataColumnResponseCost = allowedOpsPerSecondCost(4000)
|
||||
## 1 blob has an equivalent memory of 8 data columns
|
||||
|
||||
type
|
||||
|
|
|
@ -145,23 +145,23 @@ proc routeSignedBeaconBlock*(
|
|||
blockRoot = shortLog(blck.root), blck = shortLog(blck.message),
|
||||
signature = shortLog(blck.signature), error = res.error()
|
||||
|
||||
# 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)))
|
||||
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)))
|
||||
|
||||
var dataColumnRefs = Opt.none(DataColumnSidecars)
|
||||
when typeof(blck).kind >= ConsensusFork.Deneb:
|
||||
|
|
Loading…
Reference in New Issue