diff --git a/src/test/consensus/ConsensusExtensions_test.cpp b/src/test/consensus/ConsensusExtensions_test.cpp index 5e273fdd6..6069ba850 100644 --- a/src/test/consensus/ConsensusExtensions_test.cpp +++ b/src/test/consensus/ConsensusExtensions_test.cpp @@ -1193,8 +1193,6 @@ class ConsensusExtensions_test : public beast::unit_test::suite entropyTierConsensusFallback); BEAST_EXPECT( ConsensusExtensions::exportRootAlignmentThreshold(cappedView) == 6); - BEAST_EXPECT( - ConsensusExtensions::exportWitnessThreshold(cappedView) == 6); } void @@ -4174,7 +4172,6 @@ class ConsensusExtensions_test : public beast::unit_test::suite auto const ledger = env.app().getLedgerMaster().getClosedLedger(); ce.cacheUNLReport(ledger); BEAST_EXPECT(ce.exportRootAlignmentThreshold() == 1); - BEAST_EXPECT(ce.exportWitnessThreshold() == 1); ce.setExportSigConvergenceFailed(); BEAST_EXPECT(ce.exportSigConvergenceFailed()); diff --git a/src/test/csf/Peer.h b/src/test/csf/Peer.h index 9e9536c84..9b38701f6 100644 --- a/src/test/csf/Peer.h +++ b/src/test/csf/Peer.h @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -482,13 +483,16 @@ struct Peer } std::size_t - exportWitnessThreshold() const + exportCommitteeThreshold() const { if (!enableExportConsensus_) return (std::numeric_limits::max)() / 4; + // CSF models the full simulated UNL as the configured Export + // committee. Production reads this threshold from each intent's + // ledger-anchored committee instead of the active validation view. auto const base = unlNodes_.empty() ? std::size_t{1} : unlNodes_.size(); - return calculateQuorumThreshold(base); + return ExportLimits::committeeQuorumThreshold(base); } std::size_t @@ -1023,7 +1027,7 @@ struct Peer }); } - lastExportSucceeded_ = activeSigCount >= exportWitnessThreshold(); + lastExportSucceeded_ = activeSigCount >= exportCommitteeThreshold(); lastExportRetried_ = !lastExportSucceeded_; if (lastExportSucceeded_ && acceptedExportSigSetHash_) lastExportWitnessEffect_ = *acceptedExportSigSetHash_; diff --git a/src/xrpld/app/consensus/ConsensusExtensions.cpp b/src/xrpld/app/consensus/ConsensusExtensions.cpp index bb60468ff..49415d556 100644 --- a/src/xrpld/app/consensus/ConsensusExtensions.cpp +++ b/src/xrpld/app/consensus/ConsensusExtensions.cpp @@ -1012,22 +1012,6 @@ ConsensusExtensions::exportRootAlignmentThreshold( return safeQuorumThreshold(base); } -std::size_t -ConsensusExtensions::exportWitnessThreshold() const -{ - return exportWitnessThreshold(*activeValidatorView()); -} - -std::size_t -ConsensusExtensions::exportWitnessThreshold( - ActiveValidatorView const& validatorView) -{ - // The full active view is also the witness authority today. Keep this - // authorization threshold separate from root alignment so a bounded - // committee can replace the witness authority without weakening qV. - return safeQuorumThreshold(validatorView.size()); -} - std::size_t ConsensusExtensions::tier2Threshold() const { diff --git a/src/xrpld/app/consensus/ConsensusExtensions.h b/src/xrpld/app/consensus/ConsensusExtensions.h index e9d830723..eb4071617 100644 --- a/src/xrpld/app/consensus/ConsensusExtensions.h +++ b/src/xrpld/app/consensus/ConsensusExtensions.h @@ -278,12 +278,6 @@ public: static std::size_t exportRootAlignmentThreshold(ActiveValidatorView const& validatorView); - std::size_t - exportWitnessThreshold() const; - - static std::size_t - exportWitnessThreshold(ActiveValidatorView const& validatorView); - /// Tier 2 (participant_aligned) alignment floor: the smallest cohort whose /// pairwise intersection exceeds the tolerated Byzantine count (~0.6 of the /// ORIGINAL pre-nUNL view; exact value from calculateParticipantThreshold).