From c5edcdbbcd4dd822e681d002826a00c055ca1cdc Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Mon, 13 Jul 2026 10:13:14 +0700 Subject: [PATCH] docs: mark account incarnation allocation evidence --- include/xrpl/protocol/detail/ledger_entries.macro | 4 ++++ src/xrpld/app/tx/detail/DeleteAccount.cpp | 2 ++ src/xrpld/app/tx/detail/GenesisMint.cpp | 2 ++ src/xrpld/app/tx/detail/Import.cpp | 2 ++ src/xrpld/app/tx/detail/Payment.cpp | 2 ++ src/xrpld/app/tx/detail/Remit.cpp | 2 ++ 6 files changed, 14 insertions(+) diff --git a/include/xrpl/protocol/detail/ledger_entries.macro b/include/xrpl/protocol/detail/ledger_entries.macro index b79b6d02e..e6173620f 100644 --- a/include/xrpl/protocol/detail/ledger_entries.macro +++ b/include/xrpl/protocol/detail/ledger_entries.macro @@ -274,7 +274,9 @@ LEDGER_ENTRY(ltACCOUNT_ROOT, 0x0061, AccountRoot, account, ({ {sfImportSequence, soeOPTIONAL}, {sfGovernanceFlags, soeOPTIONAL}, {sfGovernanceMarks, soeOPTIONAL}, + //@@start account-index-optional-accountroot-field {sfAccountIndex, soeOPTIONAL}, + //@@end account-index-optional-accountroot-field {sfTouchCount, soeOPTIONAL}, {sfHookStateScale, soeOPTIONAL}, {sfCron, soeOPTIONAL}, @@ -434,7 +436,9 @@ LEDGER_ENTRY(ltFEE_SETTINGS, 0x0073, FeeSettings, fee, ({ {sfReserveBaseDrops, soeOPTIONAL}, {sfReserveIncrementDrops, soeOPTIONAL}, {sfXahauActivationLgrSeq, soeOPTIONAL}, + //@@start account-count-optional-fees-field {sfAccountCount, soeOPTIONAL}, + //@@end account-count-optional-fees-field {sfNetworkID, soeOPTIONAL}, {sfPreviousTxnID, soeOPTIONAL}, {sfPreviousTxnLgrSeq, soeOPTIONAL}, diff --git a/src/xrpld/app/tx/detail/DeleteAccount.cpp b/src/xrpld/app/tx/detail/DeleteAccount.cpp index 1f1906fdf..48286ff5f 100644 --- a/src/xrpld/app/tx/detail/DeleteAccount.cpp +++ b/src/xrpld/app/tx/detail/DeleteAccount.cpp @@ -477,8 +477,10 @@ DeleteAccount::doApply() if (mSourceBalance > XRPAmount(0) && dst->isFlag(lsfPasswordSpent)) dst->clearFlag(lsfPasswordSpent); + //@@start account-delete-erases-account-root view().update(dst); view().erase(src); + //@@end account-delete-erases-account-root return tesSUCCESS; } diff --git a/src/xrpld/app/tx/detail/GenesisMint.cpp b/src/xrpld/app/tx/detail/GenesisMint.cpp index f467bf1e6..b94008656 100644 --- a/src/xrpld/app/tx/detail/GenesisMint.cpp +++ b/src/xrpld/app/tx/detail/GenesisMint.cpp @@ -199,6 +199,7 @@ GenesisMint::doApply() bool const created = !sle; + //@@start genesis-mint-account-without-account-index if (created) { // Create the account. @@ -357,6 +358,7 @@ GenesisMint::doApply() sle->setFieldAmount(sfBalance, amt); } + //@@end genesis-mint-account-without-account-index else if (amt > beast::zero) { // Credit the account diff --git a/src/xrpld/app/tx/detail/Import.cpp b/src/xrpld/app/tx/detail/Import.cpp index 251b05118..14ed1e1bb 100644 --- a/src/xrpld/app/tx/detail/Import.cpp +++ b/src/xrpld/app/tx/detail/Import.cpp @@ -1513,6 +1513,7 @@ Import::doApply() sle->setFieldU32(sfSequence, seqno); sle->setFieldU32(sfOwnerCount, 0); + //@@start import-account-index-allocation if (sleFees && view().rules().enabled(featureXahauGenesis)) { uint64_t accIdx = sleFees->isFieldPresent(sfAccountCount) @@ -1521,6 +1522,7 @@ Import::doApply() sle->setFieldU64(sfAccountIndex, accIdx); sleFees->setFieldU64(sfAccountCount, accIdx + 1); } + //@@end import-account-index-allocation if (ctx_.tx.getSigningPubKey().empty() || calcAccountID(PublicKey(makeSlice(ctx_.tx.getSigningPubKey()))) != diff --git a/src/xrpld/app/tx/detail/Payment.cpp b/src/xrpld/app/tx/detail/Payment.cpp index 316a309b9..cf4ad0074 100644 --- a/src/xrpld/app/tx/detail/Payment.cpp +++ b/src/xrpld/app/tx/detail/Payment.cpp @@ -253,6 +253,7 @@ Payment::preclaim(PreclaimContext const& ctx) auto const k = keylet::account(dstAccountID); auto const sleDst = ctx.view.read(k); + //@@start payment-account-index-allocation if (!sleDst) { // Destination account does not exist. @@ -379,6 +380,7 @@ Payment::doApply() view().insert(sleDst); } + //@@end payment-account-index-allocation else { // Tell the engine that we are intending to change the destination diff --git a/src/xrpld/app/tx/detail/Remit.cpp b/src/xrpld/app/tx/detail/Remit.cpp index 36a4a7ad2..953e62aea 100644 --- a/src/xrpld/app/tx/detail/Remit.cpp +++ b/src/xrpld/app/tx/detail/Remit.cpp @@ -318,6 +318,7 @@ Remit::doApply() } // if the destination doesn't exist, create it. + //@@start remit-account-index-allocation bool const createDst = !sleDstAcc; if (createDst) { @@ -356,6 +357,7 @@ Remit::doApply() sleDstAcc->setFieldAmount(sfBalance, STAmount{XRPAmount{0}}); sb.insert(sleDstAcc); } + //@@end remit-account-index-allocation // if theres a minted uritoken the sender pays for that if (ctx_.tx.isFieldPresent(sfMintURIToken))