mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 18:32:42 +00:00
Make BeaconChain::kzg field mandatory (#6267)
* make kzg field required * update todo * always load trusted setup WIP * fmt * use new rust_eth_kzg version * merge conlficts * add kzg fn with trusted setup disabled * as_slice * add kzg with no precomp * ignore udep for kzg * refactor kzg init * fix peerdas kzg schedule * fix * udeps * uuuudeps * merge conflict resolved * merge conflict * merge conflicts * resolve TODO * update * move kzg to a test util fn * remove trusted setup default impl * lint fmt * fix failing test * lint * fix test * Merge branch 'unstable' into beacon-chain-kzg-field-required
This commit is contained in:
@@ -396,13 +396,15 @@ pub fn get_config<E: EthSpec>(
|
||||
}
|
||||
|
||||
// 4844 params
|
||||
client_config.trusted_setup = context
|
||||
if let Some(trusted_setup) = context
|
||||
.eth2_network_config
|
||||
.as_ref()
|
||||
.and_then(|config| config.kzg_trusted_setup.as_ref())
|
||||
.map(|trusted_setup_bytes| serde_json::from_slice(trusted_setup_bytes))
|
||||
.map(|config| serde_json::from_slice(&config.kzg_trusted_setup))
|
||||
.transpose()
|
||||
.map_err(|e| format!("Unable to read trusted setup file: {}", e))?;
|
||||
.map_err(|e| format!("Unable to read trusted setup file: {}", e))?
|
||||
{
|
||||
client_config.trusted_setup = trusted_setup;
|
||||
};
|
||||
|
||||
// Override default trusted setup file if required
|
||||
if let Some(trusted_setup_file_path) = cli_args.get_one::<String>("trusted-setup-file-override")
|
||||
@@ -411,7 +413,7 @@ pub fn get_config<E: EthSpec>(
|
||||
.map_err(|e| format!("Failed to open trusted setup file: {}", e))?;
|
||||
let trusted_setup: TrustedSetup = serde_json::from_reader(file)
|
||||
.map_err(|e| format!("Unable to read trusted setup file: {}", e))?;
|
||||
client_config.trusted_setup = Some(trusted_setup);
|
||||
client_config.trusted_setup = trusted_setup;
|
||||
}
|
||||
|
||||
if let Some(freezer_dir) = cli_args.get_one::<String>("freezer-dir") {
|
||||
|
||||
Reference in New Issue
Block a user