mirror of
https://github.com/Xahau/xahaud.git
synced 2026-08-23 16:30:52 +00:00
docs(consensus): add export apply projection markers
This commit is contained in:
@@ -523,13 +523,13 @@ ConsensusExtensions::selectEntropy(
|
||||
auto const digest = sha512Half(s.slice());
|
||||
auto const count = static_cast<std::uint16_t>(sorted.size());
|
||||
|
||||
//@@start entropy-selector-tier-ladder
|
||||
// Tier ladder over the AGREED participant count — deterministic on every
|
||||
// node holding this entropySetHash. quorumThreshold() = ceil(0.8 *
|
||||
// effective view); tier2Threshold() = the equivocation-safe intersection
|
||||
// floor over the original view (~0.6*n; see calculateParticipantThreshold).
|
||||
// Below tier2Threshold too few aligned participants contributed to trust
|
||||
// the result — fall back.
|
||||
//@@start entropy-selector-tier-ladder
|
||||
if (count >= quorumThreshold())
|
||||
return {digest, entropyTierValidatorQuorum, count};
|
||||
if (count >= tier2Threshold())
|
||||
|
||||
@@ -172,6 +172,7 @@ Export::doApply()
|
||||
|
||||
if (!ctx_.app.config().standalone())
|
||||
{
|
||||
//@@start export-doapply-agreed-signature-snapshot
|
||||
std::size_t const threshold =
|
||||
unlSize == 0 ? 1 : calculateQuorumThreshold(unlSize);
|
||||
|
||||
@@ -187,6 +188,7 @@ Export::doApply()
|
||||
collectedSigs = consensusExtensions.agreedExportSignatures(
|
||||
ctx_.tx, txId, *validatorView, threshold);
|
||||
}
|
||||
//@@end export-doapply-agreed-signature-snapshot
|
||||
|
||||
if (!collectedSigs)
|
||||
{
|
||||
@@ -228,6 +230,7 @@ Export::doApply()
|
||||
|
||||
upgradeUnverifiedForNextRound();
|
||||
|
||||
//@@start export-doapply-retry-without-signature-quorum
|
||||
JLOG(j_.info())
|
||||
<< "Export: insufficient signatures"
|
||||
<< " txHash=" << txId << " ledgerSeq=" << currentSeq
|
||||
@@ -237,6 +240,7 @@ Export::doApply()
|
||||
: "no")
|
||||
<< " result=terRETRY_EXPORT";
|
||||
return terRETRY_EXPORT;
|
||||
//@@end export-doapply-retry-without-signature-quorum
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user