Skip to content

Commit

Permalink
Don't assert if ike was not done after state transfer (#2740)
Browse files Browse the repository at this point in the history
In case we have a VC before the initial KE, the replicas fill their active window with no-ops. Hence, a late replica may start state transfer. However, this replica will assert when state transfer is done because the initial key exchange has not been completed yet.
The solution is not to assert if the initial key exchange has not been done yet.
Testing Done
CI
  • Loading branch information
Yehonatan Buchnik authored Jul 20, 2022
1 parent b20cfda commit a7a8bfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bftengine/src/bftengine/KeyExchangeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void KeyExchangeManager::loadPublicKeys() {
// after State Transfer public keys for all replicas are expected to exist
auto num_loaded = publicKeys_.loadAllReplicasKeyStoresFromReservedPages();
uint32_t liveQuorumSize = ReplicaConfig::instance().waitForFullCommOnStartup ? clusterSize_ : quorumSize_;
if (ReplicaConfig::instance().getkeyExchangeOnStart()) {
if (ReplicaConfig::instance().getkeyExchangeOnStart() && exchanged()) {
ConcordAssertGE(num_loaded, liveQuorumSize);
}
LOG_INFO(KEY_EX_LOG, "building crypto system after state transfer");
Expand Down

0 comments on commit a7a8bfe

Please sign in to comment.