diff --git a/cmake/RippledCompiler.cmake b/cmake/RippledCompiler.cmake index 705d04b7a..0612605ea 100644 --- a/cmake/RippledCompiler.cmake +++ b/cmake/RippledCompiler.cmake @@ -17,7 +17,9 @@ target_compile_features (common INTERFACE cxx_std_20) target_compile_definitions (common INTERFACE $<$:DEBUG _DEBUG> - $<$,$>>:NDEBUG>) + $<$,$>>:NDEBUG> + # TODO: Remove once we have migrated functions from OpenSSL 1.x to 3.x. + OPENSSL_SUPPRESS_DEPRECATED) # ^^^^ NOTE: CMAKE release builds already have NDEBUG # defined, so no need to add it explicitly except for # this special case of (profile ON) and (assert OFF) diff --git a/include/xrpl/protocol/Feature.h b/include/xrpl/protocol/Feature.h index 144c59a96..823bc03a2 100644 --- a/include/xrpl/protocol/Feature.h +++ b/include/xrpl/protocol/Feature.h @@ -80,7 +80,7 @@ namespace detail { // Feature.cpp. Because it's only used to reserve storage, and determine how // large to make the FeatureBitset, it MAY be larger. It MUST NOT be less than // the actual number of amendments. A LogicError on startup will verify this. -static constexpr std::size_t numFeatures = 112; +static constexpr std::size_t numFeatures = 110; /** Amendments that this server supports and the default voting behavior. Whether they are enabled depends on the Rules defined in the validated diff --git a/include/xrpl/protocol/detail/features.macro b/include/xrpl/protocol/detail/features.macro index fd888cb45..1dfe26779 100644 --- a/include/xrpl/protocol/detail/features.macro +++ b/include/xrpl/protocol/detail/features.macro @@ -50,9 +50,7 @@ XRPL_FEATURE(DID, Supported::no, VoteBehavior::DefaultNo XRPL_FIX (DisallowIncomingV1, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(XChainBridge, Supported::no, VoteBehavior::DefaultNo) XRPL_FEATURE(AMM, Supported::yes, VoteBehavior::DefaultNo) -XRPL_FIX (StoSubarray, Supported::yes, VoteBehavior::DefaultYes) -XRPL_FIX (StoEmplaceFieldIdCheck, Supported::yes, VoteBehavior::DefaultYes) -XRPL_FIX (EtxnFeeBase, Supported::yes, VoteBehavior::DefaultYes) +XRPL_FIX (HookAPI20251128, Supported::yes, VoteBehavior::DefaultYes) XRPL_FIX (CronStacking, Supported::yes, VoteBehavior::DefaultYes) XRPL_FEATURE(ExtendedHookState, Supported::yes, VoteBehavior::DefaultNo) XRPL_FEATURE(Cron, Supported::yes, VoteBehavior::DefaultNo) diff --git a/src/test/app/GenesisMint_test.cpp b/src/test/app/GenesisMint_test.cpp index f7c4dd2a6..9ae21ca3e 100644 --- a/src/test/app/GenesisMint_test.cpp +++ b/src/test/app/GenesisMint_test.cpp @@ -192,7 +192,7 @@ struct GenesisMint_test : public beast::unit_test::suite } auto const postCoins = env.current()->info().drops; auto const txnFee = - env.current()->rules().enabled(fixEtxnFeeBase) ? 0 : 10; + env.current()->rules().enabled(fixHookAPI20251128) ? 0 : 10; BEAST_EXPECT( initCoins - 1'000'000 /* txn fee */ - txnFee /* emitted txn fee */ @@ -630,7 +630,7 @@ struct GenesisMint_test : public beast::unit_test::suite auto const postCoins = env.current()->info().drops; auto const txnFee = - env.current()->rules().enabled(fixEtxnFeeBase) ? 0 : 10; + env.current()->rules().enabled(fixHookAPI20251128) ? 0 : 10; BEAST_EXPECT( initCoins - 1'000'000 /* txn fee */ - txnFee /* emitted txn fee */ @@ -699,7 +699,7 @@ public: auto const sa = supported_amendments(); testWithFeats(sa); testWithFeats(sa - fixXahauV1); - testWithFeats(sa - fixEtxnFeeBase); + testWithFeats(sa - fixHookAPI20251128); } }; diff --git a/src/test/app/SetHook_test.cpp b/src/test/app/SetHook_test.cpp index fbbaf4585..5f6bf0b52 100644 --- a/src/test/app/SetHook_test.cpp +++ b/src/test/app/SetHook_test.cpp @@ -3195,7 +3195,7 @@ public: { auto f = features; if (!hasFix) - f = f - fixEtxnFeeBase; + f = f - fixHookAPI20251128; Env env{*this, f}; @@ -10392,11 +10392,11 @@ public: } )[test.hook]"]; - for (auto f : {features, features - fixStoEmplaceFieldIdCheck}) + for (auto f : {features, features - fixHookAPI20251128}) { Env env{*this, f}; bool const hasFix = - env.current()->rules().enabled(fixStoEmplaceFieldIdCheck); + env.current()->rules().enabled(fixHookAPI20251128); env.fund(XRP(10000), alice); env.fund(XRP(10000), bob); @@ -10676,12 +10676,12 @@ public: } )[test.hook]"]; - for (auto isFixStoSubarray : {true, false}) + for (auto isfixHookAPI20251128 : {true, false}) { Env env{ *this, - isFixStoSubarray ? features | fixStoSubarray - : features - fixStoSubarray}; + isfixHookAPI20251128 ? features | fixHookAPI20251128 + : features - fixHookAPI20251128}; env.fund(XRP(10000), alice, bob); env.close(); @@ -10708,7 +10708,7 @@ public: BEAST_REQUIRE(hookExecution.isFieldPresent(sfHookReturnCode)); auto const returnCode = hookExecution.getFieldU64(sfHookReturnCode); - if (isFixStoSubarray) + if (isfixHookAPI20251128) { auto const doesntExistError = -5; auto const position = 2; diff --git a/src/test/app/Touch_test.cpp b/src/test/app/Touch_test.cpp index ce5a5399b..6943e5d37 100644 --- a/src/test/app/Touch_test.cpp +++ b/src/test/app/Touch_test.cpp @@ -1402,8 +1402,8 @@ public: using namespace test::jtx; auto const sa = supported_amendments(); testAllTxns(sa); - testAllTxns(sa - fixEtxnFeeBase); - testAllTxns(sa - featureTouch - fixEtxnFeeBase); + testAllTxns(sa - fixHookAPI20251128); + testAllTxns(sa - featureTouch - fixHookAPI20251128); } }; diff --git a/src/test/app/TxQ_test.cpp b/src/test/app/TxQ_test.cpp index 5e497a7bf..ecd31a68a 100644 --- a/src/test/app/TxQ_test.cpp +++ b/src/test/app/TxQ_test.cpp @@ -5067,7 +5067,8 @@ public: testMultiTxnPerAccount(all); // fragile: hardcoded ordering by txID XOR parentHash // parentHash < txTree Hash < txMeta < PreviousTxnID - testTieBreaking(all - fixProvisionalDoubleThreading - fixEtxnFeeBase); + testTieBreaking( + all - fixProvisionalDoubleThreading - fixHookAPI20251128); testAcctTxnID(all); testMaximum(all); testUnexpectedBalanceChange(all); @@ -5088,7 +5089,7 @@ public: // fragile: hardcoded ordering by txID XOR parentHash // parentHash < txTree Hash < txMeta < PreviousTxnID testFullQueueGapFill( - all - fixProvisionalDoubleThreading - fixEtxnFeeBase); + all - fixProvisionalDoubleThreading - fixHookAPI20251128); testSignAndSubmitSequence(all); testAccountInfo(all); testServerInfo(all); diff --git a/src/test/rpc/LedgerRPC_test.cpp b/src/test/rpc/LedgerRPC_test.cpp index 710beeec1..eeae35c66 100644 --- a/src/test/rpc/LedgerRPC_test.cpp +++ b/src/test/rpc/LedgerRPC_test.cpp @@ -615,7 +615,7 @@ public: using namespace test::jtx; Env env{ *this, - supported_amendments() - featureXahauGenesis - fixEtxnFeeBase}; + supported_amendments() - featureXahauGenesis - fixHookAPI20251128}; Account const alice{"alice"}; env.fund(XRP(10000), alice); env.close(); @@ -3391,7 +3391,7 @@ public: return cfg; }), supported_amendments() - featureXahauGenesis - - fixProvisionalDoubleThreading - fixEtxnFeeBase}; + fixProvisionalDoubleThreading - fixHookAPI20251128}; Json::Value jv; jv[jss::ledger_index] = "current"; diff --git a/src/xrpld/app/hook/detail/applyHook.cpp b/src/xrpld/app/hook/detail/applyHook.cpp index 3143aab80..2b0ba9f95 100644 --- a/src/xrpld/app/hook/detail/applyHook.cpp +++ b/src/xrpld/app/hook/detail/applyHook.cpp @@ -4317,7 +4317,7 @@ DEFINE_HOOK_FUNCTION( // eg) Amounts field value = 0x5C => 0xF0, 0x5C if ((*upto & 0xF0U) == 0xF0U) { - if (view.rules().enabled(fixStoSubarray) && *upto == 0xF0U) + if (view.rules().enabled(fixHookAPI20251128) && *upto == 0xF0U) { // field value > 15 upto++; @@ -4562,7 +4562,7 @@ DEFINE_HOOK_FUNCTION( return MEM_OVERLAP; } - if (fread_len > 0 && view.rules().enabled(fixStoEmplaceFieldIdCheck)) + if (fread_len > 0 && view.rules().enabled(fixHookAPI20251128)) { // inject field should be valid sto object and it's field id should // match the field_id @@ -4826,7 +4826,7 @@ DEFINE_HOOK_FUNCTION( std::unique_ptr stpTrans; stpTrans = std::make_unique(std::ref(sitTrans)); - if (!view.rules().enabled(fixEtxnFeeBase)) + if (!view.rules().enabled(fixHookAPI20251128)) return Transactor::calculateBaseFee( *(applyCtx.app.openLedger().current()), *stpTrans) .drops(); diff --git a/src/xrpld/app/tx/detail/Transactor.cpp b/src/xrpld/app/tx/detail/Transactor.cpp index 6091b42f0..0e8818fa0 100644 --- a/src/xrpld/app/tx/detail/Transactor.cpp +++ b/src/xrpld/app/tx/detail/Transactor.cpp @@ -1621,7 +1621,7 @@ Transactor::doTSH( for (auto& weakTsh : additionalWeakTSH_) tsh.emplace_back(weakTsh, false); - if (view.rules().enabled(fixEtxnFeeBase)) + if (view.rules().enabled(fixHookAPI20251128)) { // if account_ is not included in tsh , add it only once bool found = false; @@ -1649,7 +1649,7 @@ Transactor::doTSH( // blindly nominate any TSHes they find but // obviously we will never execute OTXN account // as a TSH because they already had first execution - if (!view.rules().enabled(fixEtxnFeeBase)) + if (!view.rules().enabled(fixHookAPI20251128)) { if (tshAccountID == account_) continue; @@ -1666,10 +1666,10 @@ Transactor::doTSH( touchAccount(view, tshAccountID); - if (view.rules().enabled(fixEtxnFeeBase)) + if (view.rules().enabled(fixHookAPI20251128)) { - // After fixEtxnFeeBase, the otxn account is prosessed as touched - // account + // After fixHookAPI20251128, the otxn account is prosessed as + // touched account if (tshAccountID == account_) continue; }