1717 ../ spec/ [helpers, forks],
1818 ../ consensus_object_pools/ [
1919 blob_quarantine, block_clearance, block_quarantine, blockchain_dag,
20- attestation_pool, full_block_pool, light_client_pool,
20+ attestation_pool, light_client_pool,
2121 sync_committee_msg_pool, validator_change_pool],
2222 ../ validators/ validator_pool,
2323 ../ beacon_clock,
131131 validatorPool* : ref ValidatorPool
132132 syncCommitteeMsgPool: ref SyncCommitteeMsgPool
133133 lightClientPool: ref LightClientPool
134- fullBlockPool: ref FullBlockPool
135134
136135 doppelgangerDetection* : DoppelgangerProtection
137136
@@ -179,7 +178,6 @@ proc new*(T: type Eth2Processor,
179178 validatorPool: ref ValidatorPool ,
180179 syncCommitteeMsgPool: ref SyncCommitteeMsgPool ,
181180 lightClientPool: ref LightClientPool ,
182- fullBlockPool: ref FullBlockPool ,
183181 quarantine: ref Quarantine ,
184182 blobQuarantine: ref BlobQuarantine ,
185183 dataColumnQuarantine: ref ColumnQuarantine ,
@@ -199,7 +197,6 @@ proc new*(T: type Eth2Processor,
199197 validatorPool: validatorPool,
200198 syncCommitteeMsgPool: syncCommitteeMsgPool,
201199 lightClientPool: lightClientPool,
202- fullBlockPool: fullBlockPool,
203200 quarantine: quarantine,
204201 blobQuarantine: blobQuarantine,
205202 dataColumnQuarantine: dataColumnQuarantine,
@@ -218,65 +215,6 @@ proc new*(T: type Eth2Processor,
218215# any side effects until the message is fully validated, or invalid messages
219216# could be used to push out valid messages.
220217
221- proc processExecutionPayloadEnvelope (
222- self: var Eth2Processor ,
223- signedBlock: gloas.SignedBeaconBlock ,
224- signedEnvelope: SignedExecutionPayloadEnvelope ) =
225- # # Process execution payload when both the block and envelope are found.
226-
227- logScope:
228- blockRoot = shortLog (signedBlock.root)
229- builderIdx = signedEnvelope.message.builder_index
230-
231- # only process once
232- if self.fullBlockPool[].isEnvelopeProcessed (signedEnvelope):
233- return
234-
235- trace " Execution payload processing"
236- debugGloasComment (" " )
237-
238- # process complete
239- debug " Execution payload processed"
240- self.fullBlockPool[].markEnvelopeProcessed (signedEnvelope)
241- self.fullBlockPool[].markBlockExecutionEnabled (signedBlock)
242-
243- proc processExecutionPayloadEnvelope (
244- self: var Eth2Processor ,
245- signedBlock: gloas.SignedBeaconBlock ) =
246- # # Received a valid block and checking if the envelope arrives
247-
248- # check if the envelope exists
249- let signedEnvelope = self.fullBlockPool[].getEnvelope (signedBlock).valueOr:
250- return
251-
252- # validate the envelope again as it wasn't validated without the block
253- if not self.fullBlockPool[].isEnvelopeValid (signedEnvelope):
254- self.dag.validateExecutionPayload (self.fullBlockPool, signedEnvelope).isOkOr:
255- return
256- self.fullBlockPool[].markEnvelopeValid (signedEnvelope)
257-
258- # process
259- self.processExecutionPayloadEnvelope (signedBlock, signedEnvelope)
260-
261- proc processExecutionPayloadEnvelope (
262- self: var Eth2Processor ,
263- signedEnvelope: SignedExecutionPayloadEnvelope ) =
264- # # Received a valid envelope and the block should be in the chain
265-
266- # find the block from the chain
267- let signedBlock =
268- block :
269- let forkedBlock = self.dag.getForkedBlock (signedEnvelope.toBlockId ()).valueOr:
270- return
271- withBlck (forkedBlock):
272- when consensusFork >= ConsensusFork .Gloas :
273- forkyBlck.asSigned ()
274- else :
275- return
276-
277- # process
278- self.processExecutionPayloadEnvelope (signedBlock, signedEnvelope)
279-
280218proc processSignedBeaconBlock * (
281219 self: var Eth2Processor , src: MsgSource ,
282220 signedBlock: ForkySignedBeaconBlock ,
@@ -342,9 +280,6 @@ proc processSignedBeaconBlock*(
342280 else :
343281 {.error : " Unknown fork " & $ consensusFork.}
344282
345- when type (signedBlock).kind >= ConsensusFork .Gloas :
346- self.processExecutionPayloadEnvelope (signedBlock)
347-
348283 let validationDur = nanoseconds ((self.getCurrentBeaconTime () - wallTime).nanoseconds)
349284 self.blockProcessor.enqueueBlock (
350285 src, signedBlock, sidecarsOpt, maybeFinalized, validationDur
@@ -356,37 +291,6 @@ proc processSignedBeaconBlock*(
356291
357292 ok ()
358293
359- proc processExecutionPayload * (
360- self: var Eth2Processor , src: MsgSource ,
361- signedEnvelope: SignedExecutionPayloadEnvelope ):
362- ValidationRes =
363- let
364- wallTime = self.getCurrentBeaconTime ()
365- (_, wallSlot) = wallTime.toSlot (self.dag.timeParams)
366-
367- logScope:
368- blockRoot = shortLog (signedEnvelope.message.beacon_block_root)
369- builderIdx = signedEnvelope.message.builder_index
370- signature = shortLog (signedEnvelope.signature)
371- wallSlot
372-
373- let delay = wallTime -
374- signedEnvelope.message.slot.start_beacon_time (self.dag.timeParams)
375- debug " Execution payload received" , delay
376-
377- # always save the envelope in case the block arrives later
378- self.fullBlockPool[].addEnvelope (signedEnvelope)
379-
380- self.dag.validateExecutionPayload (self.fullBlockPool, signedEnvelope).isOkOr:
381- return err (error)
382-
383- trace " Execution payload validated"
384-
385- self.fullBlockPool[].markEnvelopeValid (signedEnvelope)
386- self.processExecutionPayloadEnvelope (signedEnvelope)
387-
388- ok ()
389-
390294proc processBlobSidecar * (
391295 self: var Eth2Processor , src: MsgSource ,
392296 blobSidecar: deneb.BlobSidecar , subnet_id: BlobId ): ValidationRes =
0 commit comments