@@ -87,23 +87,20 @@ void ReplicaForStateTransfer::start() {
8787 if (!config_.isReadOnly ) {
8888 // Load the public keys of the other replicas from reserved pages
8989 // so that their responses can be validated
90- cre_->halt ();
9190 KeyExchangeManager::instance ().loadPublicKeys ();
91+
92+ // Make sure to sign the reconfiguration client messages using the key
93+ // other replicas expect
94+ SigManager::instance ()->setReplicaLastExecutedSeq (checkpoint * checkpointWindowSize);
95+
9296 // Need to update private key to match the loaded public key in case they differ (key exchange was executed
9397 // on other replicas but not on this one, finishing ST does not mean that missed key exchanges are executed)
9498 // This can be done by iterating the saved cryptosystems and updating their private key if their
9599 // public key matches the candidate saved in KeyExchangeManager
96-
97- // Clear old keys
98100 CryptoManager::instance ().onCheckpoint (checkpoint);
99101 auto [priv, pub] = KeyExchangeManager::instance ().getCandidateKeyPair ();
100102 CryptoManager::instance ().syncPrivateKeyAfterST (priv, pub);
101103
102- // Make sure to sign the reconfiguration client messages using the key
103- // other replicas expect
104- SigManager::instance ()->setReplicaLastExecutedSeq (checkpoint * checkpointWindowSize);
105- cre_->resume ();
106-
107104 // At this point, we, if are not going to have another blocks in state transfer. So, we can safely stop CRE.
108105 // if there is a reconfiguration state change that prevents us from starting another state transfer (i.e.
109106 // scaling) then CRE probably won't work as well.
0 commit comments