From 9c9f2df0ca90c5caf6191e387af65e463d366419 Mon Sep 17 00:00:00 2001 From: Etan Kissling Date: Thu, 25 Jul 2024 23:03:57 +0200 Subject: [PATCH] `Opt[seq[Forky]]` --- beacon_chain/spec/forks.nim | 3 +++ beacon_chain/validators/beacon_validators.nim | 2 +- beacon_chain/validators/message_router.nim | 2 +- beacon_chain/validators/message_router_mev.nim | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/beacon_chain/spec/forks.nim b/beacon_chain/spec/forks.nim index f0c749a2d..7f5150082 100644 --- a/beacon_chain/spec/forks.nim +++ b/beacon_chain/spec/forks.nim @@ -280,6 +280,9 @@ type ForkyBlobSidecar* = deneb.BlobSidecar + OptSeqForkyBlobSidecar* = + Opt[seq[deneb.BlobSidecar]] + ForkyBlobSidecars* = deneb.BlobSidecars diff --git a/beacon_chain/validators/beacon_validators.nim b/beacon_chain/validators/beacon_validators.nim index 8397b3ba7..058182f1a 100644 --- a/beacon_chain/validators/beacon_validators.nim +++ b/beacon_chain/validators/beacon_validators.nim @@ -1292,7 +1292,7 @@ proc proposeBlockAux( Opt.some(signedBlock.create_blob_sidecars( blobsBundle.proofs, blobsBundle.blobs)) else: - Opt.none(seq[BlobSidecar]) + Opt.none(seq[deneb.BlobSidecar]) newBlockRef = ( await node.router.routeSignedBeaconBlock(signedBlock, blobsOpt, checkValidator = false) diff --git a/beacon_chain/validators/message_router.nim b/beacon_chain/validators/message_router.nim index 3fb0ecb94..df8f303f8 100644 --- a/beacon_chain/validators/message_router.nim +++ b/beacon_chain/validators/message_router.nim @@ -84,7 +84,7 @@ template getCurrentBeaconTime(router: MessageRouter): BeaconTime = type RouteBlockResult = Result[Opt[BlockRef], string] proc routeSignedBeaconBlock*( router: ref MessageRouter, blck: ForkySignedBeaconBlock, - blobsOpt: Opt[seq[ForkyBlobSidecar]], checkValidator: bool): + blobsOpt: OptSeqForkyBlobSidecar, checkValidator: bool): Future[RouteBlockResult] {.async: (raises: [CancelledError]).} = ## Validate and broadcast beacon block, then add it to the block database ## Returns the new Head when block is added successfully to dag, none when diff --git a/beacon_chain/validators/message_router_mev.nim b/beacon_chain/validators/message_router_mev.nim index 049b956b4..8324184d7 100644 --- a/beacon_chain/validators/message_router_mev.nim +++ b/beacon_chain/validators/message_router_mev.nim @@ -138,7 +138,7 @@ proc unblindAndRouteBlockMEV*( Opt.some(signedBlock.create_blob_sidecars( blobs_bundle.proofs, blobs_bundle.blobs)) else: - Opt.none(seq[BlobSidecar]) + Opt.none(seq[deneb.BlobSidecar]) debug "unblindAndRouteBlockMEV: proposing unblinded block", blck = shortLog(signedBlock)