@@ -4,8 +4,7 @@ use crate::http::{
4
4
ENGINE_GET_BLOBS_V1 , ENGINE_GET_BLOBS_V2 , ENGINE_GET_CLIENT_VERSION_V1 ,
5
5
ENGINE_GET_PAYLOAD_BODIES_BY_HASH_V1 , ENGINE_GET_PAYLOAD_BODIES_BY_RANGE_V1 ,
6
6
ENGINE_GET_PAYLOAD_V1 , ENGINE_GET_PAYLOAD_V2 , ENGINE_GET_PAYLOAD_V3 , ENGINE_GET_PAYLOAD_V4 ,
7
- ENGINE_GET_PAYLOAD_V5 , ENGINE_NEW_PAYLOAD_V1 , ENGINE_NEW_PAYLOAD_V2 , ENGINE_NEW_PAYLOAD_V3 ,
8
- ENGINE_NEW_PAYLOAD_V4 , ENGINE_NEW_PAYLOAD_V5 ,
7
+ ENGINE_NEW_PAYLOAD_V1 , ENGINE_NEW_PAYLOAD_V2 , ENGINE_NEW_PAYLOAD_V3 , ENGINE_NEW_PAYLOAD_V4 ,
9
8
} ;
10
9
use eth2:: types:: {
11
10
BlobsBundle , SsePayloadAttributes , SsePayloadAttributesV1 , SsePayloadAttributesV2 ,
@@ -24,8 +23,8 @@ pub use types::{
24
23
Uint256 , VariableList , Withdrawal , Withdrawals ,
25
24
} ;
26
25
use types:: {
27
- ExecutionPayloadBellatrix , ExecutionPayloadCapella , ExecutionPayloadDeneb ,
28
- ExecutionPayloadElectra , ExecutionPayloadFulu , ExecutionRequests , KzgProofs ,
26
+ ExecutionPayloadBellatrix , ExecutionPayloadCapella , ExecutionPayloadDeneb , ExecutionRequests ,
27
+ KzgProofs ,
29
28
} ;
30
29
use types:: { Graffiti , GRAFFITI_BYTES_LEN } ;
31
30
@@ -36,7 +35,7 @@ mod new_payload_request;
36
35
37
36
pub use new_payload_request:: {
38
37
NewPayloadRequest , NewPayloadRequestBellatrix , NewPayloadRequestCapella ,
39
- NewPayloadRequestDeneb , NewPayloadRequestElectra , NewPayloadRequestFulu ,
38
+ NewPayloadRequestDeneb , NewPayloadRequestElectra ,
40
39
} ;
41
40
42
41
pub const LATEST_TAG : & str = "latest" ;
@@ -269,10 +268,8 @@ pub struct ProposeBlindedBlockResponse {
269
268
}
270
269
271
270
#[ superstruct(
272
- variants( Bellatrix , Capella , Deneb , Electra , Fulu ) ,
271
+ variants( Bellatrix , Capella , Deneb , Electra ) ,
273
272
variant_attributes( derive( Clone , Debug , PartialEq ) , ) ,
274
- map_into( ExecutionPayload ) ,
275
- map_ref_into( ExecutionPayloadRef ) ,
276
273
cast_error( ty = "Error" , expr = "Error::IncorrectStateVariant" ) ,
277
274
partial_getter_error( ty = "Error" , expr = "Error::IncorrectStateVariant" )
278
275
) ]
@@ -288,15 +285,13 @@ pub struct GetPayloadResponse<E: EthSpec> {
288
285
#[ superstruct( only( Deneb ) , partial_getter( rename = "execution_payload_deneb" ) ) ]
289
286
pub execution_payload : ExecutionPayloadDeneb < E > ,
290
287
#[ superstruct( only( Electra ) , partial_getter( rename = "execution_payload_electra" ) ) ]
291
- pub execution_payload : ExecutionPayloadElectra < E > ,
292
- #[ superstruct( only( Fulu ) , partial_getter( rename = "execution_payload_fulu" ) ) ]
293
- pub execution_payload : ExecutionPayloadFulu < E > ,
288
+ pub execution_payload : ExecutionPayloadDeneb < E > ,
294
289
pub block_value : Uint256 ,
295
- #[ superstruct( only( Deneb , Electra , Fulu ) ) ]
290
+ #[ superstruct( only( Deneb , Electra ) ) ]
296
291
pub blobs_bundle : BlobsBundle < E > ,
297
- #[ superstruct( only( Deneb , Electra , Fulu ) , partial_getter( copy) ) ]
292
+ #[ superstruct( only( Deneb , Electra ) , partial_getter( copy) ) ]
298
293
pub should_override_builder : bool ,
299
- #[ superstruct( only( Electra , Fulu ) ) ]
294
+ #[ superstruct( only( Electra ) ) ]
300
295
pub requests : ExecutionRequests < E > ,
301
296
}
302
297
@@ -316,17 +311,35 @@ impl<E: EthSpec> GetPayloadResponse<E> {
316
311
317
312
impl < ' a , E : EthSpec > From < GetPayloadResponseRef < ' a , E > > for ExecutionPayloadRef < ' a , E > {
318
313
fn from ( response : GetPayloadResponseRef < ' a , E > ) -> Self {
319
- map_get_payload_response_ref_into_execution_payload_ref ! ( & ' a _, response, |inner, cons| {
320
- cons( & inner. execution_payload)
321
- } )
314
+ match response {
315
+ GetPayloadResponseRef :: Bellatrix ( inner) => {
316
+ ExecutionPayloadRef :: Bellatrix ( & inner. execution_payload )
317
+ }
318
+ GetPayloadResponseRef :: Capella ( inner) => {
319
+ ExecutionPayloadRef :: Capella ( & inner. execution_payload )
320
+ }
321
+ GetPayloadResponseRef :: Deneb ( inner) => {
322
+ ExecutionPayloadRef :: Deneb ( & inner. execution_payload )
323
+ }
324
+ GetPayloadResponseRef :: Electra ( inner) => {
325
+ ExecutionPayloadRef :: Deneb ( & inner. execution_payload )
326
+ }
327
+ }
322
328
}
323
329
}
324
330
325
331
impl < E : EthSpec > From < GetPayloadResponse < E > > for ExecutionPayload < E > {
326
332
fn from ( response : GetPayloadResponse < E > ) -> Self {
327
- map_get_payload_response_into_execution_payload ! ( response, |inner, cons| {
328
- cons( inner. execution_payload)
329
- } )
333
+ match response {
334
+ GetPayloadResponse :: Bellatrix ( inner) => {
335
+ ExecutionPayload :: Bellatrix ( inner. execution_payload )
336
+ }
337
+ GetPayloadResponse :: Capella ( inner) => {
338
+ ExecutionPayload :: Capella ( inner. execution_payload )
339
+ }
340
+ GetPayloadResponse :: Deneb ( inner) => ExecutionPayload :: Deneb ( inner. execution_payload ) ,
341
+ GetPayloadResponse :: Electra ( inner) => ExecutionPayload :: Deneb ( inner. execution_payload ) ,
342
+ }
330
343
}
331
344
}
332
345
@@ -359,13 +372,7 @@ impl<E: EthSpec> From<GetPayloadResponse<E>>
359
372
None ,
360
373
) ,
361
374
GetPayloadResponse :: Electra ( inner) => (
362
- ExecutionPayload :: Electra ( inner. execution_payload ) ,
363
- inner. block_value ,
364
- Some ( inner. blobs_bundle ) ,
365
- Some ( inner. requests ) ,
366
- ) ,
367
- GetPayloadResponse :: Fulu ( inner) => (
368
- ExecutionPayload :: Fulu ( inner. execution_payload ) ,
375
+ ExecutionPayload :: Deneb ( inner. execution_payload ) ,
369
376
inner. block_value ,
370
377
Some ( inner. blobs_bundle ) ,
371
378
Some ( inner. requests ) ,
@@ -475,62 +482,6 @@ impl<E: EthSpec> ExecutionPayloadBodyV1<E> {
475
482
) )
476
483
}
477
484
}
478
- ExecutionPayloadHeader :: Electra ( header) => {
479
- if let Some ( withdrawals) = self . withdrawals {
480
- Ok ( ExecutionPayload :: Electra ( ExecutionPayloadElectra {
481
- parent_hash : header. parent_hash ,
482
- fee_recipient : header. fee_recipient ,
483
- state_root : header. state_root ,
484
- receipts_root : header. receipts_root ,
485
- logs_bloom : header. logs_bloom ,
486
- prev_randao : header. prev_randao ,
487
- block_number : header. block_number ,
488
- gas_limit : header. gas_limit ,
489
- gas_used : header. gas_used ,
490
- timestamp : header. timestamp ,
491
- extra_data : header. extra_data ,
492
- base_fee_per_gas : header. base_fee_per_gas ,
493
- block_hash : header. block_hash ,
494
- transactions : self . transactions ,
495
- withdrawals,
496
- blob_gas_used : header. blob_gas_used ,
497
- excess_blob_gas : header. excess_blob_gas ,
498
- } ) )
499
- } else {
500
- Err ( format ! (
501
- "block {} is post capella but payload body doesn't have withdrawals" ,
502
- header. block_hash
503
- ) )
504
- }
505
- }
506
- ExecutionPayloadHeader :: Fulu ( header) => {
507
- if let Some ( withdrawals) = self . withdrawals {
508
- Ok ( ExecutionPayload :: Fulu ( ExecutionPayloadFulu {
509
- parent_hash : header. parent_hash ,
510
- fee_recipient : header. fee_recipient ,
511
- state_root : header. state_root ,
512
- receipts_root : header. receipts_root ,
513
- logs_bloom : header. logs_bloom ,
514
- prev_randao : header. prev_randao ,
515
- block_number : header. block_number ,
516
- gas_limit : header. gas_limit ,
517
- gas_used : header. gas_used ,
518
- timestamp : header. timestamp ,
519
- extra_data : header. extra_data ,
520
- base_fee_per_gas : header. base_fee_per_gas ,
521
- block_hash : header. block_hash ,
522
- transactions : self . transactions ,
523
- withdrawals,
524
- blob_gas_used : header. blob_gas_used ,
525
- excess_blob_gas : header. excess_blob_gas ,
526
- } ) )
527
- } else {
528
- Err ( format ! (
529
- "block {} is post capella but payload body doesn't have withdrawals" ,
530
- header. block_hash
531
- ) )
532
- }
533
- }
534
485
}
535
486
}
536
487
}
@@ -541,7 +492,6 @@ pub struct EngineCapabilities {
541
492
pub new_payload_v2 : bool ,
542
493
pub new_payload_v3 : bool ,
543
494
pub new_payload_v4 : bool ,
544
- pub new_payload_v5 : bool ,
545
495
pub forkchoice_updated_v1 : bool ,
546
496
pub forkchoice_updated_v2 : bool ,
547
497
pub forkchoice_updated_v3 : bool ,
@@ -551,7 +501,6 @@ pub struct EngineCapabilities {
551
501
pub get_payload_v2 : bool ,
552
502
pub get_payload_v3 : bool ,
553
503
pub get_payload_v4 : bool ,
554
- pub get_payload_v5 : bool ,
555
504
pub get_client_version_v1 : bool ,
556
505
pub get_blobs_v1 : bool ,
557
506
pub get_blobs_v2 : bool ,
@@ -572,9 +521,6 @@ impl EngineCapabilities {
572
521
if self . new_payload_v4 {
573
522
response. push ( ENGINE_NEW_PAYLOAD_V4 ) ;
574
523
}
575
- if self . new_payload_v5 {
576
- response. push ( ENGINE_NEW_PAYLOAD_V5 ) ;
577
- }
578
524
if self . forkchoice_updated_v1 {
579
525
response. push ( ENGINE_FORKCHOICE_UPDATED_V1 ) ;
580
526
}
@@ -602,9 +548,6 @@ impl EngineCapabilities {
602
548
if self . get_payload_v4 {
603
549
response. push ( ENGINE_GET_PAYLOAD_V4 ) ;
604
550
}
605
- if self . get_payload_v5 {
606
- response. push ( ENGINE_GET_PAYLOAD_V5 ) ;
607
- }
608
551
if self . get_client_version_v1 {
609
552
response. push ( ENGINE_GET_CLIENT_VERSION_V1 ) ;
610
553
}
0 commit comments