@@ -31,6 +31,7 @@ import type { ENR } from '@chainsafe/enr'
3131import type { Debugger } from 'debug'
3232import type { BaseNetworkConfig , ContentLookupResponse , FindContentMessage } from '../../index.js'
3333import { RunStatusCode } from '@lodestar/light-client'
34+
3435export class HistoryNetwork extends BaseNetwork {
3536 networkId : NetworkId . HistoryNetwork
3637 networkName = 'HistoryNetwork'
@@ -182,17 +183,15 @@ export class HistoryNetwork extends BaseNetwork {
182183 }
183184 }
184185 else {
186+ // TODO: Check proof slot to ensure header is from previous sync period and handle ephemeral headers separately
185187 if ( proof . value === null ) {
186188 this . logger ( 'Received post-merge block without proof' )
187189 }
188190 const beacon = this . portal . network ( ) [ '0x500c' ]
189191 if ( beacon !== undefined && beacon . lightClient ?. status === RunStatusCode . started ) {
190- // TODO: Determine how to only require proofs for blocsk from previous sync periods
191- // We don't currently have a mapping of EL block numbers to slots so cannot determine precisely
192- // if a given EL block is from a previous period or not
193- // TODO: Add handlng for ephemeral blocks in the current sync period
194192 try {
195193 verifyPostCapellaHeaderProof ( proof . value as any , header . hash ( ) , beacon . historicalSummaries , beacon . beaconConfig )
194+ this . logger ( `Successfully verified proof for block header ${ header . number } ` )
196195 } catch {
197196 this . logger ( 'Received post-capella block header with invalid proof' )
198197 // TODO: throw new Error('Received post-merge block header with invalid proof')
0 commit comments