@@ -15,7 +15,9 @@ use e2store::{
15
15
} ;
16
16
use ethportal_api:: {
17
17
types:: {
18
- execution:: header_with_proof:: HeaderWithProof , network:: Subnetwork , portal_wire:: OfferTrace ,
18
+ execution:: header_with_proof:: { BlockHeaderProof , HeaderWithProof } ,
19
+ network:: Subnetwork ,
20
+ portal_wire:: OfferTrace ,
19
21
} ,
20
22
BlockBody , ContentValue , HistoryContentKey , HistoryContentValue , OverlayContentKey ,
21
23
RawContentValue , Receipts ,
@@ -95,7 +97,7 @@ impl E2HSBridge {
95
97
Ok ( Self {
96
98
gossiper,
97
99
block_semaphore,
98
- header_validator : HeaderValidator :: new ( ) ,
100
+ header_validator : HeaderValidator :: new_without_historical_summaries ( ) ,
99
101
block_range,
100
102
random_fill,
101
103
e2hs_files,
@@ -171,7 +173,7 @@ impl E2HSBridge {
171
173
continue ;
172
174
}
173
175
}
174
- if let Err ( err) = self . validate_block_tuple ( & block_tuple) {
176
+ if let Err ( err) = self . validate_block_tuple ( & block_tuple) . await {
175
177
error ! ( "Failed to validate block tuple: {err:?}" ) ;
176
178
continue ;
177
179
}
@@ -206,10 +208,19 @@ impl E2HSBridge {
206
208
. unwrap_or_else ( |err| panic ! ( "unable to read e2hs file at path: {e2hs_path:?} : {err}" ) )
207
209
}
208
210
209
- fn validate_block_tuple ( & self , block_tuple : & BlockTuple ) -> anyhow:: Result < ( ) > {
211
+ async fn validate_block_tuple ( & self , block_tuple : & BlockTuple ) -> anyhow:: Result < ( ) > {
210
212
let header_with_proof = & block_tuple. header_with_proof . header_with_proof ;
211
- self . header_validator
212
- . validate_header_with_proof ( header_with_proof) ?;
213
+ // The E2HS bridge doesn't have access to a provider so it can't validate historical summary
214
+ // Header with Proofs
215
+ if !matches ! (
216
+ header_with_proof. proof,
217
+ BlockHeaderProof :: HistoricalSummariesCapella ( _)
218
+ | BlockHeaderProof :: HistoricalSummariesDeneb ( _)
219
+ ) {
220
+ self . header_validator
221
+ . validate_header_with_proof ( header_with_proof)
222
+ . await ?;
223
+ }
213
224
let body = & block_tuple. body . body ;
214
225
body. validate_against_header ( & header_with_proof. header ) ?;
215
226
let receipts = & block_tuple. receipts . receipts ;
0 commit comments