mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-24 07:14:46 +00:00
Embed trusted setup in network config (#3851)
* Load trusted setup in network config * Fix trusted setup serialize and deserialize * Load trusted setup from hardcoded preset instead of a file * Truncate after deserialising trusted setup * Fix beacon node script * Remove hardcoded setup file * Add length checks
This commit is contained in:
@@ -185,8 +185,8 @@ where
|
||||
builder
|
||||
};
|
||||
|
||||
let builder = if let Some(trusted_setup_file) = config.trusted_setup_file {
|
||||
builder.trusted_setup(trusted_setup_file)
|
||||
let builder = if let Some(trusted_setup) = config.trusted_setup {
|
||||
builder.trusted_setup(trusted_setup)
|
||||
} else {
|
||||
builder
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
use beacon_chain::TrustedSetup;
|
||||
use directory::DEFAULT_ROOT_DIR;
|
||||
use environment::LoggerConfig;
|
||||
use network::NetworkConfig;
|
||||
@@ -68,7 +69,7 @@ pub struct Config {
|
||||
pub chain: beacon_chain::ChainConfig,
|
||||
pub eth1: eth1::Config,
|
||||
pub execution_layer: Option<execution_layer::Config>,
|
||||
pub trusted_setup_file: Option<PathBuf>,
|
||||
pub trusted_setup: Option<TrustedSetup>,
|
||||
pub http_api: http_api::Config,
|
||||
pub http_metrics: http_metrics::Config,
|
||||
pub monitoring_api: Option<monitoring_api::Config>,
|
||||
@@ -91,7 +92,7 @@ impl Default for Config {
|
||||
sync_eth1_chain: false,
|
||||
eth1: <_>::default(),
|
||||
execution_layer: None,
|
||||
trusted_setup_file: None,
|
||||
trusted_setup: None,
|
||||
graffiti: Graffiti::default(),
|
||||
http_api: <_>::default(),
|
||||
http_metrics: <_>::default(),
|
||||
|
||||
Reference in New Issue
Block a user