Several changes to improve Consensus stability: (#4505)

* Verify accepted ledger becomes validated, and retry
   with a new consensus transaction set if not.
 * Always store proposals.
 * Track proposals by ledger sequence. This helps slow peers catch
   up with the rest of the network.
 * Acquire transaction sets for proposals with future ledger sequences.
   This also helps slow peers catch up.
 * Optimize timer delay for establish phase to wait based on how
   long validators have been sending proposals. This also helps slow
   peers to catch up.
 * Fix impasse achieving close time consensus.
 * Don't wait between open and establish phases.
This commit is contained in:
Mark Travis
2023-08-18 22:11:24 -04:00
committed by Manoj Doshi
parent b580049ec0
commit e8a7b2a1fc
20 changed files with 911 additions and 188 deletions

View File

@@ -24,6 +24,7 @@
#include <ripple/basics/Slice.h>
#include <ripple/basics/StringUtilities.h>
#include <ripple/basics/base64.h>
#include <ripple/consensus/ConsensusParms.h>
#include <ripple/json/json_reader.h>
#include <ripple/overlay/Overlay.h>
#include <ripple/protocol/STValidation.h>
@@ -1761,8 +1762,10 @@ ValidatorList::calculateQuorum(
// Note that the negative UNL protocol introduced the
// AbsoluteMinimumQuorum which is 60% of the original UNL size. The
// effective quorum should not be lower than it.
static ConsensusParms const parms;
return static_cast<std::size_t>(std::max(
std::ceil(effectiveUnlSize * 0.8f), std::ceil(unlSize * 0.6f)));
std::ceil(effectiveUnlSize * parms.minCONSENSUS_FACTOR),
std::ceil(unlSize * parms.negUNL_MIN_CONSENSUS_FACTOR)));
}
TrustChanges