diff --git a/src/ripple/app/hook/impl/HookAPI.cpp b/src/ripple/app/hook/impl/HookAPI.cpp index d65dd3c3a..e8107cdfe 100644 --- a/src/ripple/app/hook/impl/HookAPI.cpp +++ b/src/ripple/app/hook/impl/HookAPI.cpp @@ -927,7 +927,13 @@ HookAPI::etxn_fee_base(ripple::Slice const& txBlob) const SerialIter sitTrans(txBlob); std::unique_ptr stpTrans = std::make_unique(std::ref(sitTrans)); - return Transactor::calculateBaseFee( + + if (!hookCtx.applyCtx.view().rules().enabled(fixEtxnFeeBase)) + return Transactor::calculateBaseFee( + *(applyCtx.app.openLedger().current()), *stpTrans) + .drops(); + + return invoke_calculateBaseFee( *(applyCtx.app.openLedger().current()), *stpTrans) .drops(); } diff --git a/src/ripple/app/misc/impl/TxQ.cpp b/src/ripple/app/misc/impl/TxQ.cpp index dbd690a45..5c4af9f8b 100644 --- a/src/ripple/app/misc/impl/TxQ.cpp +++ b/src/ripple/app/misc/impl/TxQ.cpp @@ -1482,9 +1482,13 @@ TxQ::accept(Application& app, OpenView& view) { uint32_t currentTime = view.parentCloseTime().time_since_epoch().count(); - uint256 klStart = keylet::cron(0, AccountID(beast::zero)).key; - uint256 const klEnd = - keylet::cron(currentTime + 1, AccountID(beast::zero)).key; + bool fixCron = view.rules().enabled(fixCronStacking); + std::optional accountID = std::nullopt; + if (!fixCron) + accountID = AccountID(beast::zero); + + uint256 klStart = keylet::cron(0, accountID).key; + uint256 const klEnd = keylet::cron(currentTime + 1, accountID).key; std::set cronAccs; diff --git a/src/ripple/app/tx/impl/Cron.cpp b/src/ripple/app/tx/impl/Cron.cpp index 67826b408..da1db821f 100644 --- a/src/ripple/app/tx/impl/Cron.cpp +++ b/src/ripple/app/tx/impl/Cron.cpp @@ -93,6 +93,16 @@ Cron::doApply() auto& view = ctx_.view(); auto const& tx = ctx_.tx; + if (view.rules().enabled(fixCronStacking)) + { + if (auto const seq = tx.getFieldU32(sfLedgerSequence); + seq != view.info().seq) + { + JLOG(j_.warn()) << "Cron: wrong ledger seq=" << seq; + return tefFAILURE; + } + } + AccountID const& id = tx.getAccountID(sfOwner); auto sle = view.peek(keylet::account(id)); diff --git a/src/ripple/app/tx/impl/Transactor.cpp b/src/ripple/app/tx/impl/Transactor.cpp index 75a26747d..0cdc22e09 100644 --- a/src/ripple/app/tx/impl/Transactor.cpp +++ b/src/ripple/app/tx/impl/Transactor.cpp @@ -1515,9 +1515,27 @@ Transactor::doTSH( // add the extra TSH marked out by the specific transactor (if applicable) if (!strong) + { for (auto& weakTsh : additionalWeakTSH_) tsh.emplace_back(weakTsh, false); + if (view.rules().enabled(fixEtxnFeeBase)) + { + // if account_ is not included in tsh , add it only once + bool found = false; + for (auto& tshPair : tsh) + { + if (tshPair.first == account_) + { + found = true; + break; + } + } + if (!found) + tsh.emplace_back(account_, false); + } + } + // we use a vector above for order preservation // but we also don't want to execute any hooks // twice, so keep track as we go with a map @@ -1529,8 +1547,11 @@ 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 (tshAccountID == account_) - continue; + if (!view.rules().enabled(fixEtxnFeeBase)) + { + if (tshAccountID == account_) + continue; + } if (alreadyProcessed.find(tshAccountID) != alreadyProcessed.end()) continue; @@ -1543,6 +1564,14 @@ Transactor::doTSH( touchAccount(view, tshAccountID); + if (view.rules().enabled(fixEtxnFeeBase)) + { + // After fixEtxnFeeBase, the otxn account is prosessed as touched + // account + if (tshAccountID == account_) + continue; + } + auto klTshHook = keylet::hook(tshAccountID); auto tshHook = view.read(klTshHook); diff --git a/src/ripple/protocol/Feature.h b/src/ripple/protocol/Feature.h index ed6b4e73f..42ac7c237 100644 --- a/src/ripple/protocol/Feature.h +++ b/src/ripple/protocol/Feature.h @@ -74,7 +74,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 = 88; +static constexpr std::size_t numFeatures = 90; /** Amendments that this server supports and the default voting behavior. Whether they are enabled depends on the Rules defined in the validated @@ -376,6 +376,8 @@ extern uint256 const featureIOUIssuerWeakTSH; extern uint256 const featureCron; extern uint256 const fixInvalidTxFlags; extern uint256 const featureExtendedHookState; +extern uint256 const fixCronStacking; +extern uint256 const fixEtxnFeeBase; } // namespace ripple diff --git a/src/ripple/protocol/Indexes.h b/src/ripple/protocol/Indexes.h index 597a90414..03f9dc2a4 100644 --- a/src/ripple/protocol/Indexes.h +++ b/src/ripple/protocol/Indexes.h @@ -298,7 +298,7 @@ Keylet uritoken(AccountID const& issuer, Blob const& uri); Keylet -cron(uint32_t timestamp, AccountID const& id); +cron(uint32_t timestamp, std::optional const& id = std::nullopt); } // namespace keylet diff --git a/src/ripple/protocol/impl/Feature.cpp b/src/ripple/protocol/impl/Feature.cpp index 64d05f134..44998a4d0 100644 --- a/src/ripple/protocol/impl/Feature.cpp +++ b/src/ripple/protocol/impl/Feature.cpp @@ -482,6 +482,8 @@ REGISTER_FEATURE(IOUIssuerWeakTSH, Supported::yes, VoteBehavior::De REGISTER_FEATURE(Cron, Supported::yes, VoteBehavior::DefaultNo); REGISTER_FIX (fixInvalidTxFlags, Supported::yes, VoteBehavior::DefaultYes); REGISTER_FEATURE(ExtendedHookState, Supported::yes, VoteBehavior::DefaultNo); +REGISTER_FIX (fixCronStacking, Supported::yes, VoteBehavior::DefaultYes); +REGISTER_FIX (fixEtxnFeeBase, Supported::yes, VoteBehavior::DefaultYes); // The following amendments are obsolete, but must remain supported // because they could potentially get enabled. diff --git a/src/ripple/protocol/impl/Indexes.cpp b/src/ripple/protocol/impl/Indexes.cpp index c09070574..f75faf165 100644 --- a/src/ripple/protocol/impl/Indexes.cpp +++ b/src/ripple/protocol/impl/Indexes.cpp @@ -466,7 +466,7 @@ uritoken(AccountID const& issuer, Blob const& uri) // Examples: 100M → ~5.4e-12, 1B → ~5.4e-11, 10B → ~5.4e-10, 100B → ~5.4e-9 // (negligible). Keylet -cron(uint32_t timestamp, AccountID const& id) +cron(uint32_t timestamp, std::optional const& id) { static const uint256 ns = indexHash(LedgerNameSpace::CRON); @@ -481,7 +481,14 @@ cron(uint32_t timestamp, AccountID const& id) h[10] = static_cast((timestamp >> 8) & 0xFFU); h[11] = static_cast((timestamp >> 0) & 0xFFU); - const uint256 accHash = indexHash(LedgerNameSpace::CRON, timestamp, id); + if (!id.has_value()) + { + // final 20 bytes are zero + std::memset(h + 12, 0, 20); + return {ltCRON, uint256::fromVoid(h)}; + } + + const uint256 accHash = indexHash(LedgerNameSpace::CRON, timestamp, *id); // final 20 bytes are account ID std::memcpy(h + 12, accHash.cdata(), 20); diff --git a/src/test/app/GenesisMint_test.cpp b/src/test/app/GenesisMint_test.cpp index 9904f3715..4f45ff9b6 100644 --- a/src/test/app/GenesisMint_test.cpp +++ b/src/test/app/GenesisMint_test.cpp @@ -133,7 +133,12 @@ struct GenesisMint_test : public beast::unit_test::suite using namespace jtx; using namespace std::literals::chrono_literals; - Env env{*this, envconfig(), features}; + Env env{ + *this, + envconfig(), + features, + nullptr, + beast::severities::kDisabled}; auto const alice = Account("alice"); auto const bob = Account("bob"); auto const invoker = Account("invoker"); @@ -186,9 +191,11 @@ struct GenesisMint_test : public beast::unit_test::suite 10123000000ULL); } auto const postCoins = env.current()->info().drops; + auto const txnFee = + env.current()->rules().enabled(fixEtxnFeeBase) ? 0 : 10; BEAST_EXPECT( initCoins - 1'000'000 /* txn fee */ - - 10 /* emitted txn fee */ + - txnFee /* emitted txn fee */ + 123'000'000 /* minted */ == postCoins); } @@ -622,8 +629,11 @@ struct GenesisMint_test : public beast::unit_test::suite le->getFieldAmount(sfBalance).xrp().drops() == amtResult); auto const postCoins = env.current()->info().drops; + auto const txnFee = + env.current()->rules().enabled(fixEtxnFeeBase) ? 0 : 10; BEAST_EXPECT( - initCoins - 1'000'000 /* txn fee */ - 10 /* emitted txn fee */ + initCoins - 1'000'000 /* txn fee */ - + txnFee /* emitted txn fee */ == postCoins); } } @@ -689,10 +699,11 @@ public: auto const sa = supported_amendments(); testWithFeats(sa); testWithFeats(sa - fixXahauV1); + testWithFeats(sa - fixEtxnFeeBase); } }; BEAST_DEFINE_TESTSUITE(GenesisMint, app, ripple); } // namespace test -} // namespace ripple \ No newline at end of file +} // namespace ripple diff --git a/src/test/app/SetHook_test.cpp b/src/test/app/SetHook_test.cpp index 146696d61..1a24c3a9c 100644 --- a/src/test/app/SetHook_test.cpp +++ b/src/test/app/SetHook_test.cpp @@ -3178,12 +3178,8 @@ public: testcase("Test etxn_fee_base"); using namespace jtx; - Env env{*this, features}; - auto const alice = Account{"alice"}; auto const bob = Account{"bob"}; - env.fund(XRP(10000), alice); - env.fund(XRP(10000), bob); TestHook hook = wasm[R"[test.hook]( #include @@ -3200,6 +3196,23 @@ public: #define ASSERT(x)\ if (!(x))\ rollback((uint32_t)#x, sizeof(#x), __LINE__); + + // { + // "TransactionType": "Invoke", + // "Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn", + // "Blob": "DEADBEEF", + // "Sequence": 0, + // "Fee": "0", + // "SigningPubKey": "" + // } + uint8_t tx[48] = { + 0x12U,0x00U,0x63U,0x24U,0x00U,0x00U,0x00U,0x00U,0x68U,0x40U, + 0x00U,0x00U,0x00U,0x00U,0x00U,0x00U,0x00U,0x73U,0x00U,0x70U, + 0x1AU,0x04U,0xDEU,0xADU,0xBEU,0xEFU,0x81U,0x14U,0xAEU,0x12U, + 0x3AU,0x85U,0x56U,0xF3U,0xCFU,0x91U,0x15U,0x47U,0x11U,0x37U, + 0x6AU,0xFBU,0x0FU,0x89U,0x4FU,0x83U,0x2BU,0x3DU + }; + int64_t hook(uint32_t reservmaed ) { _g(1,1); @@ -3214,18 +3227,49 @@ public: etxn_reserve(1); ASSERT(etxn_fee_base((uint32_t)det, 116) == INVALID_TXN); - return accept(0,0,0); + int64_t fee = etxn_fee_base((uint32_t)tx, sizeof(tx)); + return accept(0,0,fee); } )[test.hook]"]; - // install the hook on alice - env(ripple::test::jtx::hook(alice, {{hso(hook, overrideFlag)}}, 0), - M("set etxn_fee_base"), - HSFEE); - env.close(); + for (auto hasFix : {true, false}) + { + auto f = features; + if (!hasFix) + f = f - fixEtxnFeeBase; - // invoke the hook - env(pay(bob, alice, XRP(1)), M("test etxn_fee_base"), fee(XRP(1))); + Env env{*this, f}; + + env.fund(XRP(10000), alice); + env.fund(XRP(10000), bob); + // install the hook on alice + auto hsobj = hso(hook, overrideFlag); + hsobj[jss::HookOn] = + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFF" + "FE"; // payment high + env(ripple::test::jtx::hook(alice, {{hsobj}}, 0), + M("set etxn_fee_base"), + HSFEE); + env.close(); + + // invoke the hook + env(pay(bob, alice, XRP(1)), M("test etxn_fee_base"), fee(XRP(1))); + env.close(); + + BEAST_EXPECT(env.meta()); + auto const meta = env.meta(); + // sfHookExecution + BEAST_REQUIRE(meta->isFieldPresent(sfHookExecutions)); + auto const hookExecutions = meta->getFieldArray(sfHookExecutions); + BEAST_REQUIRE(hookExecutions.size() == 1); + auto const hookExecution = hookExecutions[0]; + BEAST_REQUIRE(hookExecution.isFieldPresent(sfHookReturnCode)); + auto const returnCode = hookExecution.getFieldU64(sfHookReturnCode); + if (hasFix) + BEAST_EXPECT(returnCode == 14); + else + BEAST_EXPECT(returnCode == 10); + } } void diff --git a/src/test/app/SetHook_wasm.h b/src/test/app/SetHook_wasm.h index d0cb86858..159fa6bdd 100644 --- a/src/test/app/SetHook_wasm.h +++ b/src/test/app/SetHook_wasm.h @@ -1381,6 +1381,23 @@ std::map> wasm = { #define ASSERT(x)\ if (!(x))\ rollback((uint32_t)#x, sizeof(#x), __LINE__); + + // { + // "TransactionType": "Invoke", + // "Account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn", + // "Blob": "DEADBEEF", + // "Sequence": 0, + // "Fee": "0", + // "SigningPubKey": "" + // } + uint8_t tx[48] = { + 0x12U,0x00U,0x63U,0x24U,0x00U,0x00U,0x00U,0x00U,0x68U,0x40U, + 0x00U,0x00U,0x00U,0x00U,0x00U,0x00U,0x00U,0x73U,0x00U,0x70U, + 0x1AU,0x04U,0xDEU,0xADU,0xBEU,0xEFU,0x81U,0x14U,0xAEU,0x12U, + 0x3AU,0x85U,0x56U,0xF3U,0xCFU,0x91U,0x15U,0x47U,0x11U,0x37U, + 0x6AU,0xFBU,0x0FU,0x89U,0x4FU,0x83U,0x2BU,0x3DU + }; + int64_t hook(uint32_t reservmaed ) { _g(1,1); @@ -1395,7 +1412,8 @@ std::map> wasm = { etxn_reserve(1); ASSERT(etxn_fee_base((uint32_t)det, 116) == INVALID_TXN); - return accept(0,0,0); + int64_t fee = etxn_fee_base((uint32_t)tx, sizeof(tx)); + return accept(0,0,fee); } )[test.hook]", { @@ -1411,55 +1429,62 @@ std::map> wasm = { 0x6EU, 0x5FU, 0x72U, 0x65U, 0x73U, 0x65U, 0x72U, 0x76U, 0x65U, 0x00U, 0x03U, 0x03U, 0x65U, 0x6EU, 0x76U, 0x06U, 0x61U, 0x63U, 0x63U, 0x65U, 0x70U, 0x74U, 0x00U, 0x02U, 0x03U, 0x02U, 0x01U, 0x03U, 0x05U, 0x03U, - 0x01U, 0x00U, 0x02U, 0x06U, 0x21U, 0x05U, 0x7FU, 0x01U, 0x41U, 0xD0U, - 0x89U, 0x04U, 0x0BU, 0x7FU, 0x00U, 0x41U, 0xC3U, 0x09U, 0x0BU, 0x7FU, - 0x00U, 0x41U, 0x80U, 0x08U, 0x0BU, 0x7FU, 0x00U, 0x41U, 0xD0U, 0x89U, - 0x04U, 0x0BU, 0x7FU, 0x00U, 0x41U, 0x80U, 0x08U, 0x0BU, 0x07U, 0x08U, - 0x01U, 0x04U, 0x68U, 0x6FU, 0x6FU, 0x6BU, 0x00U, 0x05U, 0x0AU, 0xDFU, - 0x81U, 0x00U, 0x01U, 0xDBU, 0x81U, 0x00U, 0x02U, 0x01U, 0x7FU, 0x01U, - 0x7EU, 0x23U, 0x80U, 0x80U, 0x80U, 0x80U, 0x00U, 0x41U, 0x80U, 0x01U, - 0x6BU, 0x22U, 0x01U, 0x24U, 0x80U, 0x80U, 0x80U, 0x80U, 0x00U, 0x41U, - 0x01U, 0x41U, 0x01U, 0x10U, 0x80U, 0x80U, 0x80U, 0x80U, 0x00U, 0x1AU, - 0x02U, 0x40U, 0x41U, 0xC0U, 0x84U, 0x3DU, 0x41U, 0xF4U, 0x00U, 0x10U, - 0x81U, 0x80U, 0x80U, 0x80U, 0x00U, 0x42U, 0x7FU, 0x51U, 0x0DU, 0x00U, - 0x41U, 0x80U, 0x88U, 0x80U, 0x80U, 0x00U, 0x41U, 0x2DU, 0x42U, 0x16U, - 0x10U, 0x82U, 0x80U, 0x80U, 0x80U, 0x00U, 0x1AU, 0x0BU, 0x02U, 0x40U, - 0x41U, 0x00U, 0x41U, 0xC0U, 0x84U, 0x3DU, 0x10U, 0x81U, 0x80U, 0x80U, - 0x80U, 0x00U, 0x42U, 0x7FU, 0x51U, 0x0DU, 0x00U, 0x41U, 0xADU, 0x88U, - 0x80U, 0x80U, 0x00U, 0x41U, 0x2BU, 0x42U, 0x17U, 0x10U, 0x82U, 0x80U, - 0x80U, 0x80U, 0x00U, 0x1AU, 0x0BU, 0x02U, 0x40U, 0x20U, 0x01U, 0x41U, - 0xF4U, 0x00U, 0x10U, 0x81U, 0x80U, 0x80U, 0x80U, 0x00U, 0x42U, 0x77U, - 0x51U, 0x0DU, 0x00U, 0x41U, 0xD8U, 0x88U, 0x80U, 0x80U, 0x00U, 0x41U, - 0x3AU, 0x42U, 0x19U, 0x10U, 0x82U, 0x80U, 0x80U, 0x80U, 0x00U, 0x1AU, - 0x0BU, 0x41U, 0x01U, 0x10U, 0x83U, 0x80U, 0x80U, 0x80U, 0x00U, 0x1AU, - 0x02U, 0x40U, 0x20U, 0x01U, 0x41U, 0xF4U, 0x00U, 0x10U, 0x81U, 0x80U, - 0x80U, 0x80U, 0x00U, 0x42U, 0x5BU, 0x51U, 0x0DU, 0x00U, 0x41U, 0x92U, - 0x89U, 0x80U, 0x80U, 0x00U, 0x41U, 0x31U, 0x42U, 0x1CU, 0x10U, 0x82U, - 0x80U, 0x80U, 0x80U, 0x00U, 0x1AU, 0x0BU, 0x41U, 0x00U, 0x41U, 0x00U, - 0x42U, 0x00U, 0x10U, 0x84U, 0x80U, 0x80U, 0x80U, 0x00U, 0x21U, 0x02U, - 0x20U, 0x01U, 0x41U, 0x80U, 0x01U, 0x6AU, 0x24U, 0x80U, 0x80U, 0x80U, - 0x80U, 0x00U, 0x20U, 0x02U, 0x0BU, 0x0BU, 0xCBU, 0x01U, 0x01U, 0x00U, - 0x41U, 0x80U, 0x08U, 0x0BU, 0xC3U, 0x01U, 0x65U, 0x74U, 0x78U, 0x6EU, + 0x01U, 0x00U, 0x02U, 0x06U, 0x27U, 0x06U, 0x7FU, 0x01U, 0x41U, 0x80U, + 0x8AU, 0x04U, 0x0BU, 0x7FU, 0x00U, 0x41U, 0xF3U, 0x09U, 0x0BU, 0x7FU, + 0x00U, 0x41U, 0x80U, 0x08U, 0x0BU, 0x7FU, 0x00U, 0x41U, 0x80U, 0x8AU, + 0x04U, 0x0BU, 0x7FU, 0x00U, 0x41U, 0x80U, 0x08U, 0x0BU, 0x7FU, 0x00U, + 0x41U, 0x80U, 0x08U, 0x0BU, 0x07U, 0x08U, 0x01U, 0x04U, 0x68U, 0x6FU, + 0x6FU, 0x6BU, 0x00U, 0x05U, 0x0AU, 0xEBU, 0x81U, 0x00U, 0x01U, 0xE7U, + 0x81U, 0x00U, 0x02U, 0x01U, 0x7FU, 0x01U, 0x7EU, 0x23U, 0x80U, 0x80U, + 0x80U, 0x80U, 0x00U, 0x41U, 0x80U, 0x01U, 0x6BU, 0x22U, 0x01U, 0x24U, + 0x80U, 0x80U, 0x80U, 0x80U, 0x00U, 0x41U, 0x01U, 0x41U, 0x01U, 0x10U, + 0x80U, 0x80U, 0x80U, 0x80U, 0x00U, 0x1AU, 0x02U, 0x40U, 0x41U, 0xC0U, + 0x84U, 0x3DU, 0x41U, 0xF4U, 0x00U, 0x10U, 0x81U, 0x80U, 0x80U, 0x80U, + 0x00U, 0x42U, 0x7FU, 0x51U, 0x0DU, 0x00U, 0x41U, 0xB0U, 0x88U, 0x80U, + 0x80U, 0x00U, 0x41U, 0x2DU, 0x42U, 0x27U, 0x10U, 0x82U, 0x80U, 0x80U, + 0x80U, 0x00U, 0x1AU, 0x0BU, 0x02U, 0x40U, 0x41U, 0x00U, 0x41U, 0xC0U, + 0x84U, 0x3DU, 0x10U, 0x81U, 0x80U, 0x80U, 0x80U, 0x00U, 0x42U, 0x7FU, + 0x51U, 0x0DU, 0x00U, 0x41U, 0xDDU, 0x88U, 0x80U, 0x80U, 0x00U, 0x41U, + 0x2BU, 0x42U, 0x28U, 0x10U, 0x82U, 0x80U, 0x80U, 0x80U, 0x00U, 0x1AU, + 0x0BU, 0x02U, 0x40U, 0x20U, 0x01U, 0x41U, 0xF4U, 0x00U, 0x10U, 0x81U, + 0x80U, 0x80U, 0x80U, 0x00U, 0x42U, 0x77U, 0x51U, 0x0DU, 0x00U, 0x41U, + 0x88U, 0x89U, 0x80U, 0x80U, 0x00U, 0x41U, 0x3AU, 0x42U, 0x2AU, 0x10U, + 0x82U, 0x80U, 0x80U, 0x80U, 0x00U, 0x1AU, 0x0BU, 0x41U, 0x01U, 0x10U, + 0x83U, 0x80U, 0x80U, 0x80U, 0x00U, 0x1AU, 0x02U, 0x40U, 0x20U, 0x01U, + 0x41U, 0xF4U, 0x00U, 0x10U, 0x81U, 0x80U, 0x80U, 0x80U, 0x00U, 0x42U, + 0x5BU, 0x51U, 0x0DU, 0x00U, 0x41U, 0xC2U, 0x89U, 0x80U, 0x80U, 0x00U, + 0x41U, 0x31U, 0x42U, 0x2DU, 0x10U, 0x82U, 0x80U, 0x80U, 0x80U, 0x00U, + 0x1AU, 0x0BU, 0x41U, 0x00U, 0x41U, 0x00U, 0x41U, 0x80U, 0x88U, 0x80U, + 0x80U, 0x00U, 0x41U, 0x30U, 0x10U, 0x81U, 0x80U, 0x80U, 0x80U, 0x00U, + 0x10U, 0x84U, 0x80U, 0x80U, 0x80U, 0x00U, 0x21U, 0x02U, 0x20U, 0x01U, + 0x41U, 0x80U, 0x01U, 0x6AU, 0x24U, 0x80U, 0x80U, 0x80U, 0x80U, 0x00U, + 0x20U, 0x02U, 0x0BU, 0x0BU, 0x81U, 0x02U, 0x02U, 0x00U, 0x41U, 0x80U, + 0x08U, 0x0BU, 0x30U, 0x12U, 0x00U, 0x63U, 0x24U, 0x00U, 0x00U, 0x00U, + 0x00U, 0x68U, 0x40U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, 0x00U, + 0x73U, 0x00U, 0x70U, 0x1AU, 0x04U, 0xDEU, 0xADU, 0xBEU, 0xEFU, 0x81U, + 0x14U, 0xAEU, 0x12U, 0x3AU, 0x85U, 0x56U, 0xF3U, 0xCFU, 0x91U, 0x15U, + 0x47U, 0x11U, 0x37U, 0x6AU, 0xFBU, 0x0FU, 0x89U, 0x4FU, 0x83U, 0x2BU, + 0x3DU, 0x00U, 0x41U, 0xB0U, 0x08U, 0x0BU, 0xC3U, 0x01U, 0x65U, 0x74U, + 0x78U, 0x6EU, 0x5FU, 0x66U, 0x65U, 0x65U, 0x5FU, 0x62U, 0x61U, 0x73U, + 0x65U, 0x28U, 0x31U, 0x30U, 0x30U, 0x30U, 0x30U, 0x30U, 0x30U, 0x2CU, + 0x20U, 0x31U, 0x31U, 0x36U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x4FU, + 0x55U, 0x54U, 0x5FU, 0x4FU, 0x46U, 0x5FU, 0x42U, 0x4FU, 0x55U, 0x4EU, + 0x44U, 0x53U, 0x00U, 0x65U, 0x74U, 0x78U, 0x6EU, 0x5FU, 0x66U, 0x65U, + 0x65U, 0x5FU, 0x62U, 0x61U, 0x73U, 0x65U, 0x28U, 0x30U, 0x2CU, 0x20U, + 0x31U, 0x30U, 0x30U, 0x30U, 0x30U, 0x30U, 0x30U, 0x29U, 0x20U, 0x3DU, + 0x3DU, 0x20U, 0x4FU, 0x55U, 0x54U, 0x5FU, 0x4FU, 0x46U, 0x5FU, 0x42U, + 0x4FU, 0x55U, 0x4EU, 0x44U, 0x53U, 0x00U, 0x65U, 0x74U, 0x78U, 0x6EU, 0x5FU, 0x66U, 0x65U, 0x65U, 0x5FU, 0x62U, 0x61U, 0x73U, 0x65U, 0x28U, - 0x31U, 0x30U, 0x30U, 0x30U, 0x30U, 0x30U, 0x30U, 0x2CU, 0x20U, 0x31U, - 0x31U, 0x36U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x4FU, 0x55U, 0x54U, - 0x5FU, 0x4FU, 0x46U, 0x5FU, 0x42U, 0x4FU, 0x55U, 0x4EU, 0x44U, 0x53U, - 0x00U, 0x65U, 0x74U, 0x78U, 0x6EU, 0x5FU, 0x66U, 0x65U, 0x65U, 0x5FU, - 0x62U, 0x61U, 0x73U, 0x65U, 0x28U, 0x30U, 0x2CU, 0x20U, 0x31U, 0x30U, - 0x30U, 0x30U, 0x30U, 0x30U, 0x30U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, - 0x4FU, 0x55U, 0x54U, 0x5FU, 0x4FU, 0x46U, 0x5FU, 0x42U, 0x4FU, 0x55U, - 0x4EU, 0x44U, 0x53U, 0x00U, 0x65U, 0x74U, 0x78U, 0x6EU, 0x5FU, 0x66U, + 0x28U, 0x75U, 0x69U, 0x6EU, 0x74U, 0x33U, 0x32U, 0x5FU, 0x74U, 0x29U, + 0x64U, 0x65U, 0x74U, 0x2CU, 0x20U, 0x31U, 0x31U, 0x36U, 0x29U, 0x20U, + 0x3DU, 0x3DU, 0x20U, 0x50U, 0x52U, 0x45U, 0x52U, 0x45U, 0x51U, 0x55U, + 0x49U, 0x53U, 0x49U, 0x54U, 0x45U, 0x5FU, 0x4EU, 0x4FU, 0x54U, 0x5FU, + 0x4DU, 0x45U, 0x54U, 0x00U, 0x65U, 0x74U, 0x78U, 0x6EU, 0x5FU, 0x66U, 0x65U, 0x65U, 0x5FU, 0x62U, 0x61U, 0x73U, 0x65U, 0x28U, 0x28U, 0x75U, 0x69U, 0x6EU, 0x74U, 0x33U, 0x32U, 0x5FU, 0x74U, 0x29U, 0x64U, 0x65U, 0x74U, 0x2CU, 0x20U, 0x31U, 0x31U, 0x36U, 0x29U, 0x20U, 0x3DU, 0x3DU, - 0x20U, 0x50U, 0x52U, 0x45U, 0x52U, 0x45U, 0x51U, 0x55U, 0x49U, 0x53U, - 0x49U, 0x54U, 0x45U, 0x5FU, 0x4EU, 0x4FU, 0x54U, 0x5FU, 0x4DU, 0x45U, - 0x54U, 0x00U, 0x65U, 0x74U, 0x78U, 0x6EU, 0x5FU, 0x66U, 0x65U, 0x65U, - 0x5FU, 0x62U, 0x61U, 0x73U, 0x65U, 0x28U, 0x28U, 0x75U, 0x69U, 0x6EU, - 0x74U, 0x33U, 0x32U, 0x5FU, 0x74U, 0x29U, 0x64U, 0x65U, 0x74U, 0x2CU, - 0x20U, 0x31U, 0x31U, 0x36U, 0x29U, 0x20U, 0x3DU, 0x3DU, 0x20U, 0x49U, - 0x4EU, 0x56U, 0x41U, 0x4CU, 0x49U, 0x44U, 0x5FU, 0x54U, 0x58U, 0x4EU, - 0x00U, + 0x20U, 0x49U, 0x4EU, 0x56U, 0x41U, 0x4CU, 0x49U, 0x44U, 0x5FU, 0x54U, + 0x58U, 0x4EU, 0x00U, }}, /* ==== WASM: 9 ==== */ diff --git a/src/test/app/Touch_test.cpp b/src/test/app/Touch_test.cpp index 2d59a8cd4..9f1906f8e 100644 --- a/src/test/app/Touch_test.cpp +++ b/src/test/app/Touch_test.cpp @@ -1400,12 +1400,13 @@ public: { using namespace test::jtx; auto const sa = supported_amendments(); - testAllTxns(sa - featureTouch); testAllTxns(sa); + testAllTxns(sa - fixEtxnFeeBase); + testAllTxns(sa - featureTouch - fixEtxnFeeBase); } }; BEAST_DEFINE_TESTSUITE(Touch, app, ripple); } // namespace test -} // namespace ripple \ No newline at end of file +} // namespace ripple diff --git a/src/test/app/TxQ_test.cpp b/src/test/app/TxQ_test.cpp index 7bc0ca71e..71a06bb83 100644 --- a/src/test/app/TxQ_test.cpp +++ b/src/test/app/TxQ_test.cpp @@ -5052,7 +5052,7 @@ public: testMultiTxnPerAccount(all); // fragile: hardcoded ordering by txID XOR parentHash // parentHash < txTree Hash < txMeta < PreviousTxnID - testTieBreaking(all - fixProvisionalDoubleThreading); + testTieBreaking(all - fixProvisionalDoubleThreading - fixEtxnFeeBase); testAcctTxnID(all); testMaximum(all); testUnexpectedBalanceChange(all); @@ -5072,7 +5072,8 @@ public: testExpirationReplacement(all); // fragile: hardcoded ordering by txID XOR parentHash // parentHash < txTree Hash < txMeta < PreviousTxnID - testFullQueueGapFill(all - fixProvisionalDoubleThreading); + testFullQueueGapFill( + all - fixProvisionalDoubleThreading - fixEtxnFeeBase); testSignAndSubmitSequence(all); testAccountInfo(all); testServerInfo(all); diff --git a/src/test/rpc/LedgerRPC_test.cpp b/src/test/rpc/LedgerRPC_test.cpp index 6c0819377..efb3b196b 100644 --- a/src/test/rpc/LedgerRPC_test.cpp +++ b/src/test/rpc/LedgerRPC_test.cpp @@ -290,7 +290,9 @@ public: { testcase("ledger_entry Request AccountRoot"); using namespace test::jtx; - Env env{*this, supported_amendments() - featureXahauGenesis}; + Env env{ + *this, + supported_amendments() - featureXahauGenesis - fixEtxnFeeBase}; Account const alice{"alice"}; env.fund(XRP(10000), alice); env.close(); @@ -2171,7 +2173,7 @@ public: return cfg; }), supported_amendments() - featureXahauGenesis - - fixProvisionalDoubleThreading}; + fixProvisionalDoubleThreading - fixEtxnFeeBase}; Json::Value jv; jv[jss::ledger_index] = "current";