Unimplement TreeHash for BeaconState (#6083)

* Unimplement `TreeHash` for `BeaconState`
This commit is contained in:
Michael Sproul
2024-07-12 23:06:08 +10:00
committed by GitHub
parent 0c0b56d9e8
commit 2f0af2be89
16 changed files with 117 additions and 70 deletions

View File

@@ -102,14 +102,17 @@ impl<E: EthSpec> BootNodeConfig<E> {
.map(Duration::from_secs)?;
if eth2_network_config.genesis_state_is_known() {
let genesis_state = eth2_network_config
let mut genesis_state = eth2_network_config
.genesis_state::<E>(genesis_state_url.as_deref(), genesis_state_url_timeout, &logger).await?
.ok_or_else(|| {
"The genesis state for this network is not known, this is an unsupported mode"
.to_string()
})?;
slog::info!(logger, "Genesis state found"; "root" => genesis_state.canonical_root().to_string());
let genesis_state_root = genesis_state
.canonical_root()
.map_err(|e| format!("Error hashing genesis state: {e:?}"))?;
slog::info!(logger, "Genesis state found"; "root" => ?genesis_state_root);
let enr_fork = spec.enr_fork_id::<E>(
types::Slot::from(0u64),
genesis_state.genesis_validators_root(),