@@ -29,7 +29,7 @@ import {
29
29
import { CheckpointWithHex , ExecutionStatus , IForkChoice , ProtoBlock } from "@lodestar/fork-choice" ;
30
30
import { ProcessShutdownCallback } from "@lodestar/validator" ;
31
31
import { Logger , isErrorAborted , pruneSetToMax , sleep , toHex } from "@lodestar/utils" ;
32
- import { ForkSeq , SLOTS_PER_EPOCH , MAX_BLOBS_PER_BLOCK } from "@lodestar/params" ;
32
+ import { ForkSeq , SLOTS_PER_EPOCH , MAX_BLOBS_PER_BLOCK , GENESIS_SLOT } from "@lodestar/params" ;
33
33
34
34
import { toHexString } from "@lodestar/utils" ;
35
35
import { GENESIS_EPOCH , ZERO_HASH } from "../constants/index.js" ;
@@ -43,7 +43,6 @@ import {isOptimisticBlock} from "../util/forkChoice.js";
43
43
import {
44
44
blindedOrFullBlockToFull ,
45
45
deserializeFullOrBlindedSignedBeaconBlock ,
46
- getEth1BlockHashFromSerializedBlock ,
47
46
serializeFullOrBlindedSignedBeaconBlock ,
48
47
} from "../util/fullOrBlindedBlock.js" ;
49
48
import { ExecutionPayloadBody } from "../execution/engine/types.js" ;
@@ -471,6 +470,7 @@ export class BeaconChain implements IBeaconChain {
471
470
}
472
471
473
472
async blindedOrFullBlockToFull ( block : allForks . FullOrBlindedSignedBeaconBlock ) : Promise < allForks . SignedBeaconBlock > {
473
+ if ( block . message . slot === GENESIS_SLOT ) return block ;
474
474
const info = this . config . getForkInfo ( block . message . slot ) ;
475
475
return blindedOrFullBlockToFull (
476
476
this . config ,
@@ -480,15 +480,10 @@ export class BeaconChain implements IBeaconChain {
480
480
) ;
481
481
}
482
482
483
- async blindedOrFullBlockToFullBytes ( forkSeq : ForkSeq , block : Uint8Array ) : Promise < Uint8Array > {
483
+ async blindedOrFullBlockToFullBytes ( block : Uint8Array ) : Promise < Uint8Array > {
484
484
return serializeFullOrBlindedSignedBeaconBlock (
485
485
this . config ,
486
- blindedOrFullBlockToFull (
487
- this . config ,
488
- forkSeq ,
489
- deserializeFullOrBlindedSignedBeaconBlock ( this . config , block ) ,
490
- await this . getTransactionsAndWithdrawals ( forkSeq , toHexString ( getEth1BlockHashFromSerializedBlock ( block ) ) )
491
- )
486
+ await this . blindedOrFullBlockToFull ( deserializeFullOrBlindedSignedBeaconBlock ( this . config , block ) )
492
487
) ;
493
488
}
494
489
0 commit comments