@@ -908,19 +908,19 @@ mod tests {
908908 use alloy_primitives:: { B256 , FixedBytes } ;
909909 #[ cfg( feature = "devnet1" ) ]
910910 use ream_consensus_lean:: attestation:: Attestation ;
911+ #[ cfg( feature = "devnet1" ) ]
912+ use ream_consensus_lean:: block:: { BlockBody , BlockHeader } ;
913+ #[ cfg( feature = "devnet1" ) ]
914+ use ream_consensus_lean:: config:: Config ;
911915 #[ cfg( feature = "devnet2" ) ]
912916 use ream_consensus_lean:: {
913917 attestation:: { AggregatedAttestation , AggregatedAttestations } ,
914918 block:: BlockSignatures ,
915919 } ;
916920 use ream_consensus_lean:: {
917921 attestation:: { AttestationData , SignedAttestation } ,
918- block:: {
919- Block , BlockBody , BlockHeader , BlockWithAttestation , BlockWithSignatures ,
920- SignedBlockWithAttestation ,
921- } ,
922+ block:: { Block , BlockWithAttestation , BlockWithSignatures , SignedBlockWithAttestation } ,
922923 checkpoint:: Checkpoint ,
923- config:: Config ,
924924 state:: LeanState ,
925925 utils:: generate_default_validators,
926926 validator:: is_proposer,
@@ -1014,6 +1014,7 @@ mod tests {
10141014
10151015 /// Test basic block production by authorized proposer.
10161016 #[ tokio:: test]
1017+ #[ cfg( feature = "devnet1" ) ]
10171018 async fn test_produce_block_basic ( ) {
10181019 let ( mut store, mut genesis_state) = sample_store ( 10 ) . await ;
10191020
@@ -1187,6 +1188,7 @@ mod tests {
11871188
11881189 /// Test that produced block's state is consistent with block content
11891190 #[ tokio:: test]
1191+ #[ cfg( feature = "devnet1" ) ]
11901192 pub async fn test_produce_block_state_consistency ( ) {
11911193 let ( mut store, _) = sample_store ( 10 ) . await ;
11921194
@@ -1203,7 +1205,6 @@ mod tests {
12031205 let head_block = block_provider. get ( head) . unwrap ( ) . unwrap ( ) ;
12041206
12051207 let attestation = SignedAttestation {
1206- #[ cfg( feature = "devnet1" ) ]
12071208 message : Attestation {
12081209 validator_id : 7 ,
12091210 data : AttestationData {
@@ -1216,19 +1217,7 @@ mod tests {
12161217 source : store. get_attestation_target ( ) . await . unwrap ( ) ,
12171218 } ,
12181219 } ,
1219- #[ cfg( feature = "devnet2" ) ]
1220- message : AttestationData {
1221- slot : head_block. message . block . slot ,
1222- head : Checkpoint {
1223- root : head,
1224- slot : head_block. message . block . slot ,
1225- } ,
1226- target : latest_justified_provider. get ( ) . unwrap ( ) ,
1227- source : store. get_attestation_target ( ) . await . unwrap ( ) ,
1228- } ,
12291220 signature : Signature :: blank ( ) ,
1230- #[ cfg( feature = "devnet2" ) ]
1231- validator_id : 7 ,
12321221 } ;
12331222 latest_known_attestations. insert ( 7 , attestation) . unwrap ( ) ;
12341223
@@ -1456,6 +1445,7 @@ mod tests {
14561445
14571446 /// Test producing a block then creating attestation for it.
14581447 #[ tokio:: test]
1448+ #[ cfg( feature = "devnet1" ) ]
14591449 pub async fn test_block_production_then_attestation ( ) {
14601450 let ( mut store, _) = sample_store ( 10 ) . await ;
14611451
@@ -1479,42 +1469,22 @@ mod tests {
14791469
14801470 store. update_head ( ) . await . unwrap ( ) ;
14811471
1482- #[ cfg( feature = "devnet1" ) ]
14831472 let attestation = Attestation {
14841473 validator_id : 7 ,
14851474 data : store. produce_attestation_data ( 2 ) . await . unwrap ( ) ,
14861475 } ;
14871476
1488- #[ cfg( feature = "devnet2" ) ]
1489- let mut aggregation_bits = BitList :: < U4096 > :: with_capacity ( 32 ) . unwrap ( ) ;
1490- #[ cfg( feature = "devnet2" ) ]
1491- aggregation_bits. set ( 0 , true ) . unwrap ( ) ;
1492-
1493- #[ cfg( feature = "devnet2" ) ]
1494- let attestation = AggregatedAttestation {
1495- aggregation_bits,
1496- message : store. produce_attestation_data ( 2 ) . await . unwrap ( ) ,
1497- } ;
1498-
1499- #[ cfg( feature = "devnet1" ) ]
15001477 assert_eq ! ( attestation. validator_id, 7 ) ;
1501- #[ cfg( feature = "devnet2" ) ]
1502- assert_eq ! ( attestation. aggregation_bits, attestation. aggregation_bits) ;
15031478 assert_eq ! ( attestation. slot( ) , 2 ) ;
1504- #[ cfg( feature = "devnet1" ) ]
15051479 assert_eq ! (
15061480 attestation. data. source,
15071481 latest_justified_provider. get( ) . unwrap( )
15081482 ) ;
1509- #[ cfg( feature = "devnet2" ) ]
1510- assert_eq ! (
1511- attestation. message. source,
1512- latest_justified_provider. get( ) . unwrap( )
1513- ) ;
15141483 }
15151484
15161485 /// Test producing a block then creating attestation for it.
15171486 #[ tokio:: test]
1487+ #[ cfg( feature = "devnet1" ) ]
15181488 pub async fn test_multiple_validators_coordination ( ) {
15191489 let ( mut store, _) = sample_store ( 10 ) . await ;
15201490
@@ -1543,17 +1513,11 @@ mod tests {
15431513
15441514 let mut attestations = Vec :: new ( ) ;
15451515 for i in 2 ..6 {
1546- #[ cfg( feature = "devnet1" ) ]
15471516 let attestation = Attestation {
15481517 validator_id : i,
15491518 data : store. produce_attestation_data ( 2 ) . await . unwrap ( ) ,
15501519 } ;
15511520
1552- #[ cfg( feature = "devnet2" ) ]
1553- let attestation = AggregatedAttestations {
1554- validator_id : i,
1555- data : store. produce_attestation_data ( 2 ) . await . unwrap ( ) ,
1556- } ;
15571521 attestations. push ( attestation) ;
15581522 }
15591523
@@ -1602,6 +1566,7 @@ mod tests {
16021566
16031567 /// Test edge cases in validator operations.
16041568 #[ tokio:: test]
1569+ #[ cfg( feature = "devnet1" ) ]
16051570 pub async fn test_validator_edge_cases ( ) {
16061571 let ( mut store, _) = sample_store ( 10 ) . await ;
16071572
@@ -1620,31 +1585,18 @@ mod tests {
16201585 . await
16211586 . unwrap ( ) ;
16221587
1623- #[ cfg( feature = "devnet1" ) ]
16241588 let attestation = Attestation {
16251589 validator_id : 9 ,
16261590 data : store. produce_attestation_data ( 10 ) . await . unwrap ( ) ,
16271591 } ;
16281592
1629- #[ cfg( feature = "devnet2" ) ]
1630- let mut aggregation_bits = BitList :: < U4096 > :: with_capacity ( 32 ) . unwrap ( ) ;
1631- #[ cfg( feature = "devnet2" ) ]
1632- aggregation_bits. set ( 0 , true ) . unwrap ( ) ;
1633-
1634- #[ cfg( feature = "devnet2" ) ]
1635- let attestation = AggregatedAttestation {
1636- aggregation_bits,
1637- message : store. produce_attestation_data ( 10 ) . await . unwrap ( ) ,
1638- } ;
1639- #[ cfg( feature = "devnet1" ) ]
16401593 assert_eq ! ( attestation. validator_id, 9 ) ;
1641- #[ cfg( feature = "devnet2" ) ]
1642- assert_eq ! ( attestation. aggregation_bits, attestation. aggregation_bits) ;
16431594 assert_eq ! ( attestation. slot( ) , 10 ) ;
16441595 }
16451596
16461597 /// Test validator operations with minimal store state.
16471598 #[ tokio:: test]
1599+ #[ cfg( feature = "devnet1" ) ]
16481600 pub async fn test_validator_operations_empty_store ( ) {
16491601 let empty_checkpoint = Checkpoint {
16501602 slot : 0 ,
0 commit comments