@@ -31,6 +31,7 @@ import type { ENR } from '@chainsafe/enr'
31
31
import type { Debugger } from 'debug'
32
32
import type { BaseNetworkConfig , ContentLookupResponse , FindContentMessage } from '../../index.js'
33
33
import { RunStatusCode } from '@lodestar/light-client'
34
+
34
35
export class HistoryNetwork extends BaseNetwork {
35
36
networkId : NetworkId . HistoryNetwork
36
37
networkName = 'HistoryNetwork'
@@ -182,17 +183,15 @@ export class HistoryNetwork extends BaseNetwork {
182
183
}
183
184
}
184
185
else {
186
+ // TODO: Check proof slot to ensure header is from previous sync period and handle ephemeral headers separately
185
187
if ( proof . value === null ) {
186
188
this . logger ( 'Received post-merge block without proof' )
187
189
}
188
190
const beacon = this . portal . network ( ) [ '0x500c' ]
189
191
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
194
192
try {
195
193
verifyPostCapellaHeaderProof ( proof . value as any , header . hash ( ) , beacon . historicalSummaries , beacon . beaconConfig )
194
+ this . logger ( `Successfully verified proof for block header ${ header . number } ` )
196
195
} catch {
197
196
this . logger ( 'Received post-capella block header with invalid proof' )
198
197
// TODO: throw new Error('Received post-merge block header with invalid proof')
0 commit comments