Optimisations and bug fixes for state advance

This commit is reasonably performant on Prater!
This commit is contained in:
Michael Sproul
2022-02-17 14:00:57 +11:00
parent f5dae9106e
commit 1db0e32bfb
13 changed files with 171 additions and 56 deletions

View File

@@ -1462,6 +1462,15 @@ fn load_parent<T: BeaconChainTypes>(
BeaconChainError::DBInconsistent(format!("Missing state {:?}", parent_state_root))
})?;
if block.slot() != state.slot() {
slog::warn!(
chain.log,
"Parent state is not advanced";
"block_slot" => block.slot(),
"state_slot" => state.slot(),
);
}
let beacon_state_root = if parent_state_root == advanced_state_root {
Some(parent_state_root)
} else {