Review feedbac from #5106 (#5141)

This commit is contained in:
henridf 2023-06-29 03:17:54 +02:00 committed by GitHub
parent 3c3a4ff3f3
commit 7b0e3b1c04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -63,5 +63,5 @@ const
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.0/specs/phase0/fork-choice.md#configuration
PROPOSER_SCORE_BOOST*: uint64 = 40
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-alpha.3/specs/deneb/p2p-interface.md#configuration
# https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.0/specs/deneb/p2p-interface.md#configuration
BLOB_SIDECAR_SUBNET_COUNT*: uint64 = 6

View File

@ -111,7 +111,7 @@ proc routeSignedBeaconBlock*(
let kzgCommits = blck.message.body.blob_kzg_commitments.asSeq
if blobs.len > 0 or kzgCommits.len > 0:
let res = validate_blobs(kzgCommits, blobs.mapIt(it.message.blob),
blobs.mapIt(it.message.kzg_proof))
blobs.mapIt(it.message.kzg_proof))
if res.isErr():
warn "blobs failed validation",
blockRoot = shortLog(blck.root),
@ -161,7 +161,6 @@ proc routeSignedBeaconBlock*(
notice "Blob sent", blob = shortLog(signedBlobs[i]), error = res.error[]
blobs = Opt.some(blobsOpt.get().mapIt(newClone(it.message)))
let newBlockRef = await router[].blockProcessor.storeBlock(
MsgSource.api, sendTime, blck, blobs)

View File

@ -976,11 +976,11 @@ proc proposeBlockAux(
elif blck is deneb.BeaconBlock:
# TODO: also route blobs
deneb.SignedBeaconBlock(message: blck, signature: signature, root: blockRoot)
else:
else:
static: doAssert "Unknown SignedBeaconBlock type"
newBlockRef =
(await node.router.routeSignedBeaconBlock(signedBlock, Opt.none(SignedBlobSidecars))).valueOr:
return head # Errors logged in router
newBlockRef = (await node.router.routeSignedBeaconBlock(
signedBlock, Opt.none(SignedBlobSidecars))).valueOr:
return head # Errors logged in router
if newBlockRef.isNone():
return head # Validation errors logged in router