Compare commits

...

1 Commits

Author SHA1 Message Date
Jingchen
f28ba57b81 refactor: Retire HardenedValidations amendment (#5988)
Amendments activated for more than 2 years can be retired. This change retires the HardenedValidations amendment.
2025-11-04 17:04:01 +00:00
4 changed files with 14 additions and 19 deletions

View File

@@ -68,7 +68,6 @@ XRPL_FEATURE(CheckCashMakesTrustLine, Supported::yes, VoteBehavior::DefaultNo
XRPL_FEATURE(FlowSortStrands, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(TicketBatch, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(NegativeUNL, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(HardenedValidations, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(RequireFullyCanonicalSig, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(DeletableAccounts, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FIX (PayChanRecipientOwnerDir, Supported::yes, VoteBehavior::DefaultYes)
@@ -125,6 +124,7 @@ XRPL_RETIRE(Escrow)
XRPL_RETIRE(EnforceInvariants)
XRPL_RETIRE(FeeEscalation)
XRPL_RETIRE(FlowCross)
XRPL_RETIRE(HardenedValidations)
XRPL_RETIRE(ImmediateOfferKilled)
XRPL_RETIRE(MultiSign)
XRPL_RETIRE(NonFungibleTokensV1_1)

View File

@@ -51,7 +51,6 @@ STValidation::validationFormat()
{sfSigningPubKey, soeREQUIRED},
{sfSignature, soeREQUIRED},
{sfConsensusHash, soeOPTIONAL},
// featureHardenedValidations
{sfCookie, soeDEFAULT},
{sfValidatedHash, soeOPTIONAL},
{sfServerVersion, soeOPTIONAL},

View File

@@ -831,21 +831,17 @@ RCLConsensus::Adaptor::validate(
if (proposing)
v.setFlag(vfFullValidation);
if (ledger.ledger_->rules().enabled(featureHardenedValidations))
{
// Attest to the hash of what we consider to be the last fully
// validated ledger. This may be the hash of the ledger we are
// validating here, and that's fine.
if (auto const vl = ledgerMaster_.getValidatedLedger())
v.setFieldH256(sfValidatedHash, vl->info().hash);
// Attest to the hash of what we consider to be the last fully
// validated ledger. This may be the hash of the ledger we are
// validating here, and that's fine.
if (auto const vl = ledgerMaster_.getValidatedLedger())
v.setFieldH256(sfValidatedHash, vl->info().hash);
v.setFieldU64(sfCookie, valCookie_);
v.setFieldU64(sfCookie, valCookie_);
// Report our server version every flag ledger:
if (ledger.ledger_->isVotingLedger())
v.setFieldU64(
sfServerVersion, BuildInfo::getEncodedVersion());
}
// Report our server version every flag ledger:
if (ledger.ledger_->isVotingLedger())
v.setFieldU64(sfServerVersion, BuildInfo::getEncodedVersion());
// Report our load
{

View File

@@ -993,10 +993,10 @@ LedgerMaster::checkAccept(std::shared_ptr<Ledger const> const& ledger)
// Check if the majority of validators run a higher version rippled
// software. If so print a warning.
//
// Once the HardenedValidations amendment is enabled, validators include
// their rippled software version in the validation messages of every
// (flag - 1) ledger. We wait for one ledger time before checking the
// version information to accumulate more validation messages.
// Validators include their rippled software version in the validation
// messages of every (flag - 1) ledger. We wait for one ledger time
// before checking the version information to accumulate more validation
// messages.
auto currentTime = app_.timeKeeper().now();
bool needPrint = false;