mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-15 19:02:42 +00:00
Merge branch 'master' into proto-array + more changes
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
use clap::{App, Arg, SubCommand};
|
||||
use store::StoreConfig;
|
||||
|
||||
pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
App::new("beacon_node")
|
||||
@@ -189,21 +188,15 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.value_name("HTTP-ENDPOINT")
|
||||
.help("Specifies the server for a web3 connection to the Eth1 chain.")
|
||||
.takes_value(true)
|
||||
.default_value("https://goerli.public.sigp.io")
|
||||
.default_value("http://127.0.0.1:8545")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("slots-per-restore-point")
|
||||
.long("slots-per-restore-point")
|
||||
.value_name("SLOT_COUNT")
|
||||
.help("Specifies how often a freezer DB restore point should be stored. \
|
||||
DO NOT CHANGE AFTER INITIALIZATION.")
|
||||
DO NOT DECREASE AFTER INITIALIZATION. [default: 2048 (mainnet) or 64 (minimal)]")
|
||||
.takes_value(true)
|
||||
.default_value(
|
||||
Box::leak(
|
||||
format!("{}", StoreConfig::default().slots_per_restore_point)
|
||||
.into_boxed_str()
|
||||
)
|
||||
)
|
||||
)
|
||||
/*
|
||||
* The "testnet" sub-command.
|
||||
|
||||
@@ -258,6 +258,11 @@ pub fn get_configs<E: EthSpec>(
|
||||
client_config.store.slots_per_restore_point = slots_per_restore_point
|
||||
.parse()
|
||||
.map_err(|_| "slots-per-restore-point is not a valid integer".to_string())?;
|
||||
} else {
|
||||
client_config.store.slots_per_restore_point = std::cmp::min(
|
||||
E::slots_per_historical_root() as u64,
|
||||
store::config::DEFAULT_SLOTS_PER_RESTORE_POINT,
|
||||
);
|
||||
}
|
||||
|
||||
if eth2_config.spec_constants != client_config.spec_constants {
|
||||
@@ -357,6 +362,13 @@ fn init_new_client<E: EthSpec>(
|
||||
|
||||
let spec = &mut eth2_config.spec;
|
||||
|
||||
// For now, assume that all networks will use the lighthouse genesis fork.
|
||||
spec.genesis_fork = Fork {
|
||||
previous_version: [0, 0, 0, 0],
|
||||
current_version: [1, 3, 3, 7],
|
||||
epoch: Epoch::new(0),
|
||||
};
|
||||
|
||||
client_config.eth1.deposit_contract_address =
|
||||
format!("{:?}", eth2_testnet_config.deposit_contract_address()?);
|
||||
client_config.eth1.deposit_contract_deploy_block =
|
||||
|
||||
Reference in New Issue
Block a user