diff --git a/crates/sui-node/src/lib.rs b/crates/sui-node/src/lib.rs index 9c2f226db3440d..c9a213745853bd 100644 --- a/crates/sui-node/src/lib.rs +++ b/crates/sui-node/src/lib.rs @@ -1459,17 +1459,18 @@ impl SuiNode { /// This function awaits the completion of checkpoint execution of the current epoch, /// after which it iniitiates reconfiguration of the entire system. pub async fn monitor_reconfiguration(self: Arc) -> Result<()> { - let mut checkpoint_executor = CheckpointExecutor::new( - self.state_sync_handle.subscribe_to_synced_checkpoints(), - self.checkpoint_store.clone(), - self.state.clone(), - self.accumulator.clone(), - self.config.checkpoint_executor_config.clone(), - &self.registry_service.default_registry(), - ); - - let run_with_range = self.config.run_with_range; loop { + let mut checkpoint_executor = CheckpointExecutor::new( + self.state_sync_handle.subscribe_to_synced_checkpoints(), + self.checkpoint_store.clone(), + self.state.clone(), + self.accumulator.clone(), + self.config.checkpoint_executor_config.clone(), + &self.registry_service.default_registry(), + ); + + let run_with_range = self.config.run_with_range; + let cur_epoch_store = self.state.load_epoch_store_one_call_per_task(); // Advertise capabilities to committee, if we are a validator. @@ -1568,6 +1569,7 @@ impl SuiNode { // The following code handles 4 different cases, depending on whether the node // was a validator in the previous epoch, and whether the node is a validator // in the new epoch. + let new_validator_components = if let Some(ValidatorComponents { validator_server_handle, validator_overload_monitor_handle, @@ -1594,6 +1596,10 @@ impl SuiNode { &checkpoint_executor, ) .await; + self.accumulator = Arc::new(StateAccumulator::new( + self.cache_traits.accumulator_store.clone(), + self.state.get_accumulator_store(), + )); consensus_epoch_data_remover .remove_old_data(next_epoch - 1)