File tree Expand file tree Collapse file tree 7 files changed +47
-16
lines changed Expand file tree Collapse file tree 7 files changed +47
-16
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ impl Default for ChainConfig {
124
124
genesis_backfill : false ,
125
125
always_prepare_payload : false ,
126
126
epochs_per_migration : crate :: migrate:: DEFAULT_EPOCHS_PER_MIGRATION ,
127
- enable_light_client_server : false ,
127
+ enable_light_client_server : true ,
128
128
malicious_withhold_count : 0 ,
129
129
enable_sampling : false ,
130
130
blob_publication_batches : 4 ,
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ impl Default for Config {
171
171
sse_capacity_multiplier : 1 ,
172
172
enable_beacon_processor : true ,
173
173
duplicate_block_status_code : StatusCode :: ACCEPTED ,
174
- enable_light_client_server : false ,
174
+ enable_light_client_server : true ,
175
175
target_peers : 100 ,
176
176
}
177
177
}
Original file line number Diff line number Diff line change @@ -367,7 +367,7 @@ impl Default for Config {
367
367
topics : Vec :: new ( ) ,
368
368
proposer_only : false ,
369
369
metrics_enabled : false ,
370
- enable_light_client_server : false ,
370
+ enable_light_client_server : true ,
371
371
outbound_rate_limiter_config : None ,
372
372
invalid_block_storage : None ,
373
373
inbound_rate_limiter_config : None ,
Original file line number Diff line number Diff line change @@ -1494,9 +1494,18 @@ pub fn cli_app() -> Command {
1494
1494
. arg (
1495
1495
Arg :: new ( "light-client-server" )
1496
1496
. long ( "light-client-server" )
1497
- . help ( "Act as a full node supporting light clients on the p2p network \
1498
- [experimental]")
1497
+ . help ( "DEPRECATED" )
1498
+ . action ( ArgAction :: SetTrue )
1499
+
1500
+ . help_heading ( FLAG_HEADER )
1501
+ . display_order ( 0 )
1502
+ )
1503
+ . arg (
1504
+ Arg :: new ( "disable-light-client-server" )
1505
+ . long ( "disable-light-client-server" )
1506
+ . help ( "Disables light client support on the p2p network" )
1499
1507
. action ( ArgAction :: SetTrue )
1508
+
1500
1509
. help_heading ( FLAG_HEADER )
1501
1510
. display_order ( 0 )
1502
1511
)
Original file line number Diff line number Diff line change @@ -176,11 +176,19 @@ pub fn get_config<E: EthSpec>(
176
176
parse_required ( cli_args, "http-duplicate-block-status" ) ?;
177
177
178
178
client_config. http_api . enable_light_client_server =
179
- cli_args. get_flag ( "light-client-server" ) ;
179
+ ! cli_args. get_flag ( "disable- light-client-server" ) ;
180
180
}
181
181
182
182
if cli_args. get_flag ( "light-client-server" ) {
183
- client_config. chain . enable_light_client_server = true ;
183
+ warn ! (
184
+ log,
185
+ "The --light-client-server flag is deprecated. The light client server is enabled \
186
+ by default"
187
+ ) ;
188
+ }
189
+
190
+ if cli_args. get_flag ( "disable-light-client-server" ) {
191
+ client_config. chain . enable_light_client_server = false ;
184
192
}
185
193
186
194
if let Some ( cache_size) = clap_utils:: parse_optional ( cli_args, "shuffling-cache-size" ) ? {
@@ -1431,7 +1439,7 @@ pub fn set_network_config(
1431
1439
}
1432
1440
1433
1441
// Light client server config.
1434
- config. enable_light_client_server = parse_flag ( cli_args, "light-client-server" ) ;
1442
+ config. enable_light_client_server = ! parse_flag ( cli_args, "disable- light-client-server" ) ;
1435
1443
1436
1444
// The self limiter is enabled by default. If the `self-limiter-protocols` flag is not provided,
1437
1445
// the default params will be used.
Original file line number Diff line number Diff line change @@ -459,6 +459,8 @@ Flags:
459
459
boot.
460
460
--disable-inbound-rate-limiter
461
461
Disables the inbound rate limiter (requests received by this node).
462
+ --disable-light-client-server
463
+ Disables light client support on the p2p network
462
464
--disable-log-timestamp
463
465
If present, do not include timestamps in logging output.
464
466
--disable-malloc-tuning
@@ -512,8 +514,7 @@ Flags:
512
514
already-subscribed subnets, use with --subscribe-all-subnets to ensure
513
515
all attestations are received for import.
514
516
--light-client-server
515
- Act as a full node supporting light clients on the p2p network
516
- [experimental]
517
+ DEPRECATED
517
518
--log-color
518
519
Force outputting colors when emitting logs to the terminal.
519
520
--logfile-compress
Original file line number Diff line number Diff line change @@ -2504,9 +2504,9 @@ fn light_client_server_default() {
2504
2504
CommandLineTest :: new ( )
2505
2505
. run_with_zero_port ( )
2506
2506
. with_config ( |config| {
2507
- assert ! ( ! config. network. enable_light_client_server) ;
2508
- assert ! ( ! config. chain. enable_light_client_server) ;
2509
- assert ! ( ! config. http_api. enable_light_client_server) ;
2507
+ assert ! ( config. network. enable_light_client_server) ;
2508
+ assert ! ( config. chain. enable_light_client_server) ;
2509
+ assert ! ( config. http_api. enable_light_client_server) ;
2510
2510
} ) ;
2511
2511
}
2512
2512
@@ -2522,13 +2522,26 @@ fn light_client_server_enabled() {
2522
2522
}
2523
2523
2524
2524
#[ test]
2525
- fn light_client_http_server_enabled ( ) {
2525
+ fn light_client_server_disabled ( ) {
2526
+ CommandLineTest :: new ( )
2527
+ . flag ( "disable-light-client-server" , None )
2528
+ . run_with_zero_port ( )
2529
+ . with_config ( |config| {
2530
+ assert ! ( !config. network. enable_light_client_server) ;
2531
+ assert ! ( !config. chain. enable_light_client_server) ;
2532
+ } ) ;
2533
+ }
2534
+
2535
+ #[ test]
2536
+ fn light_client_http_server_disabled ( ) {
2526
2537
CommandLineTest :: new ( )
2527
2538
. flag ( "http" , None )
2528
- . flag ( "light-client-server" , None )
2539
+ . flag ( "disable- light-client-server" , None )
2529
2540
. run_with_zero_port ( )
2530
2541
. with_config ( |config| {
2531
- assert ! ( config. http_api. enable_light_client_server) ;
2542
+ assert ! ( !config. http_api. enable_light_client_server) ;
2543
+ assert ! ( !config. network. enable_light_client_server) ;
2544
+ assert ! ( !config. chain. enable_light_client_server) ;
2532
2545
} ) ;
2533
2546
}
2534
2547
You can’t perform that action at this time.
0 commit comments