Merge remote-tracking branch 'origin/unstable' into tree-states

This commit is contained in:
Michael Sproul
2023-07-03 15:01:21 +10:00
115 changed files with 3678 additions and 548 deletions

View File

@@ -306,7 +306,7 @@ fn initialize_state_with_validators<T: EthSpec>(
}
// Now that we have our validators, initialize the caches (including the committees)
state.build_all_caches(spec).unwrap();
state.build_caches(spec).unwrap();
// Set genesis validators root for domain separation and chain versioning
*state.genesis_validators_root_mut() = state.update_validators_tree_hash_cache().unwrap();

View File

@@ -109,7 +109,7 @@ pub fn run<T: EthSpec>(env: Environment<T>, matches: &ArgMatches) -> Result<(),
let target_slot = initial_slot + slots;
state
.build_all_caches(spec)
.build_caches(spec)
.map_err(|e| format!("Unable to build caches: {:?}", e))?;
let state_root = if let Some(root) = cli_state_root.or(state_root) {

View File

@@ -209,7 +209,7 @@ pub fn run<T: EthSpec>(env: Environment<T>, matches: &ArgMatches) -> Result<(),
if config.exclude_cache_builds {
pre_state
.build_all_caches(spec)
.build_caches(spec)
.map_err(|e| format!("Unable to build caches: {:?}", e))?;
let state_root = pre_state
.update_tree_hash_cache()
@@ -313,7 +313,7 @@ fn do_transition<T: EthSpec>(
if !config.exclude_cache_builds {
let t = Instant::now();
pre_state
.build_all_caches(spec)
.build_caches(spec)
.map_err(|e| format!("Unable to build caches: {:?}", e))?;
debug!("Build caches: {:?}", t.elapsed());
@@ -345,7 +345,7 @@ fn do_transition<T: EthSpec>(
let t = Instant::now();
pre_state
.build_all_caches(spec)
.build_caches(spec)
.map_err(|e| format!("Unable to build caches: {:?}", e))?;
debug!("Build all caches (again): {:?}", t.elapsed());