1#include <xrpl/tx/Transactor.h>
3#include <xrpl/basics/Blob.h>
4#include <xrpl/basics/Log.h>
5#include <xrpl/basics/Slice.h>
6#include <xrpl/basics/base_uint.h>
7#include <xrpl/basics/contract.h>
8#include <xrpl/beast/utility/Zero.h>
9#include <xrpl/beast/utility/instrumentation.h>
10#include <xrpl/core/NetworkIDService.h>
11#include <xrpl/core/ServiceRegistry.h>
12#include <xrpl/json/to_string.h>
13#include <xrpl/ledger/ApplyView.h>
14#include <xrpl/ledger/ReadView.h>
15#include <xrpl/ledger/helpers/AccountRootHelpers.h>
16#include <xrpl/ledger/helpers/CredentialHelpers.h>
17#include <xrpl/ledger/helpers/DelegateHelpers.h>
18#include <xrpl/ledger/helpers/NFTokenHelpers.h>
19#include <xrpl/ledger/helpers/OfferHelpers.h>
20#include <xrpl/ledger/helpers/RippleStateHelpers.h>
21#include <xrpl/protocol/AccountID.h>
22#include <xrpl/protocol/Feature.h>
23#include <xrpl/protocol/Indexes.h>
24#include <xrpl/protocol/LedgerFormats.h>
25#include <xrpl/protocol/Permissions.h>
26#include <xrpl/protocol/Protocol.h>
27#include <xrpl/protocol/PublicKey.h>
28#include <xrpl/protocol/Rules.h>
29#include <xrpl/protocol/SField.h>
30#include <xrpl/protocol/STAmount.h>
31#include <xrpl/protocol/STLedgerEntry.h>
32#include <xrpl/protocol/STTx.h>
33#include <xrpl/protocol/Serializer.h>
34#include <xrpl/protocol/SystemParameters.h>
35#include <xrpl/protocol/TER.h>
36#include <xrpl/protocol/TxFlags.h>
37#include <xrpl/protocol/TxMeta.h>
38#include <xrpl/protocol/XRPAmount.h>
39#include <xrpl/server/LoadFeeTrack.h>
40#include <xrpl/tx/ApplyContext.h>
41#include <xrpl/tx/SignerEntries.h>
42#include <xrpl/tx/apply.h>
43#include <xrpl/tx/applySteps.h>
64 JLOG(ctx.
j.
warn()) <<
"Pseudo transactions cannot contain the "
65 "tfInnerBatchTxn flag.";
71 uint32_t
const nodeNID = ctx.
registry.get().getNetworkIDService().getNetworkID();
88 if (*txNID != nodeNID)
95 if (txID == beast::kZero)
97 JLOG(ctx.
j.
warn()) <<
"applyTransaction: transaction id may not be zero";
104 <<
": invalid flags.";
120 if (
auto const spk = sigObject.
getFieldVL(sfSigningPubKey);
123 JLOG(j.
debug()) <<
"preflightCheckSigningKey: invalid signing key";
135 if (signature && !signature->empty())
148 for (
auto const& signer : sigObject.
getFieldArray(sfSigners))
150 if (signer.isFieldPresent(sfTxnSignature) && !signer[sfTxnSignature].empty())
158 Slice const signingPubKey = sigObject[sfSigningPubKey];
159 if (!signingPubKey.
empty())
177 if (!ctx.
rules.
enabled(featurePermissionDelegationV1_1))
180 if (ctx.
tx[sfDelegate] == ctx.
tx[sfAccount])
190 !perm.hasGranularPermissions(txType))
194 if (
auto const ret =
preflight0(ctx, flagMask))
198 if (
id == beast::kZero)
200 JLOG(ctx.
j.
warn()) <<
"preflight1: bad account id";
206 if (!fee.native() || fee.negative() || !
isLegalAmount(fee.xrp()))
208 JLOG(ctx.
j.
debug()) <<
"preflight1: invalid fee";
230 "Inner batch transaction must have a parent batch ID.");
250 "xrpl::Transactor::preflight2",
251 "InnerBatch flag only set if feature enabled");
261 JLOG(ctx.
j.
debug()) <<
"preflight2: bad signature. " << sigValid.second;
296 return !slice->empty() && slice->length() <= maxLength;
317 auto const delegate = tx[~sfDelegate];
332 if (heldGranularPermissions.
empty())
356 return baseFee + (signerCount * baseFee);
383 view.fees().increment >
view.fees().base * 100,
384 "xrpl::Transactor::calculateOwnerReserveFee : Owner reserve is "
386 return view.fees().increment;
402 if (!ctx.
tx[sfFee].native())
405 auto const feePaid = ctx.
tx[sfFee].xrp();
409 if (feePaid == beast::kZero)
412 JLOG(ctx.
j.
trace()) <<
"Batch: Fee must be zero.";
424 if (feePaid < feeDue)
426 JLOG(ctx.
j.
trace()) <<
"Insufficient fee paid: " <<
to_string(feePaid) <<
"/"
432 if (feePaid == beast::kZero)
440 auto const balance = (*sle)[sfBalance].xrp();
449 if (balance < feePaid)
451 JLOG(ctx.
j.
trace()) <<
"Insufficient balance:" <<
" balance=" <<
to_string(balance)
454 if ((balance > beast::kZero) && !ctx.
view.
open())
469 auto const feePaid =
ctx_.tx[sfFee].xrp();
471 auto const feePayer =
ctx_.tx.getFeePayer();
478 sle->setFieldAmount(sfBalance, sle->getFieldAmount(sfBalance) - feePaid);
495 JLOG(j.
trace()) <<
"applyTransaction: delay: source account does not exist "
503 if (tSeqProx.
isSeq())
507 JLOG(j.
trace()) <<
"applyTransaction: has both a TicketSequence "
508 "and a non-zero Sequence number";
511 if (tSeqProx != aSeq)
515 JLOG(j.
trace()) <<
"applyTransaction: has future sequence number "
516 <<
"a_seq=" << aSeq <<
" t_seq=" << tSeqProx;
520 JLOG(j.
trace()) <<
"applyTransaction: has past sequence number "
521 <<
"a_seq=" << aSeq <<
" t_seq=" << tSeqProx;
534 JLOG(j.
trace()) <<
"applyTransaction: has future ticket id "
535 <<
"a_seq=" << aSeq <<
" t_seq=" << tSeqProx;
542 JLOG(j.
trace()) <<
"applyTransaction: ticket already used or never created "
543 <<
"a_seq=" << aSeq <<
" t_seq=" << tSeqProx;
560 JLOG(ctx.
j.
trace()) <<
"applyTransaction: delay: source account does not exist "
566 (sle->getFieldH256(sfAccountTxnID) != ctx.
tx.
getFieldH256(sfAccountTxnID)))
582 XRPL_ASSERT(sleAccount,
"xrpl::Transactor::consumeSeqProxy : non-null account");
589 sleAccount->setFieldU32(sfSequence, seqProx.
value() + 1);
609 JLOG(j.
fatal()) <<
"Ticket disappeared from ledger.";
618 JLOG(j.
fatal()) <<
"Unable to delete Ticket from owner.";
629 JLOG(j.
fatal()) <<
"Could not find Ticket owner account root.";
634 if (
auto ticketCount = (*sleAccount)[~sfTicketCount])
636 if (*ticketCount == 1)
638 sleAccount->makeFieldAbsent(sfTicketCount);
642 ticketCount = *ticketCount - 1;
648 JLOG(j.
fatal()) <<
"TicketCount field missing from account root.";
657 view.erase(sleTicket);
665 XRPL_ASSERT(
accountID_ != beast::kZero,
"xrpl::Transactor::preCompute : nonzero account");
681 "xrpl::Transactor::apply : non-null SLE or zero account");
695 if (sle->isFieldPresent(sfAccountTxnID))
696 sle->setFieldH256(sfAccountTxnID,
ctx_.tx.getTransactionID());
725 auto const pkSigner = sigObject.
getFieldVL(sfSigningPubKey);
727 if (parentBatchId &&
view.rules().enabled(featureBatch))
730 if (sigObject.
isFieldPresent(sfTxnSignature) || !pkSigner.empty() ||
753 XRPL_ASSERT(!pkSigner.empty(),
"xrpl::Transactor::checkSign : non-empty signer");
757 JLOG(j.
trace()) <<
"checkSign: signing public key type is unknown";
783 for (
auto const& signer : signers)
785 auto const idAccount = signer.getAccountID(sfAccount);
787 Blob const& pkSigner = signer.getFieldVL(sfSigningPubKey);
788 if (pkSigner.
empty())
808 if (idAccount != idSigner)
830 bool const isMasterDisabled = sleAccount->isFlag(lsfDisableMaster);
833 if ((*sleAccount)[~sfRegularKey] == idSigner)
839 if (!isMasterDisabled && idAccount == idSigner)
845 if (isMasterDisabled && idAccount == idSigner)
865 if (!sleAccountSigners)
867 JLOG(j.
trace()) <<
"applyTransaction: Invalid: Not a multi-signing account.";
874 sleAccountSigners->isFieldPresent(sfSignerListID),
875 "xrpl::Transactor::checkMultiSign : has signer list ID");
877 sleAccountSigners->getFieldU32(sfSignerListID) == 0,
878 "xrpl::Transactor::checkMultiSign : signer list ID is 0");
882 return accountSigners.error();
894 auto iter = accountSigners->begin();
895 for (
auto const& txSigner : txSigners)
897 AccountID const txSignerAcctID = txSigner.getAccountID(sfAccount);
900 while (iter->account < txSignerAcctID)
902 if (++iter == accountSigners->end())
904 JLOG(j.
trace()) <<
"applyTransaction: Invalid SigningAccount.Account.";
908 if (iter->account != txSignerAcctID)
911 JLOG(j.
trace()) <<
"applyTransaction: Invalid SigningAccount.Account.";
918 auto const spk = txSigner.getFieldVL(sfSigningPubKey);
924 JLOG(j.
trace()) <<
"checkMultiSign: signing public key type is unknown";
930 "xrpl::Transactor::checkMultiSign : non-empty signer or "
932 AccountID const signingAcctIDFromPubKey =
962 if (signingAcctIDFromPubKey == txSignerAcctID)
968 std::uint32_t const signerAccountFlags = sleTxSignerRoot->getFieldU32(sfFlags);
970 if ((signerAccountFlags & lsfDisableMaster) != 0u)
972 JLOG(j.
trace()) <<
"applyTransaction: Signer:Account lsfDisableMaster.";
981 if (!sleTxSignerRoot)
983 JLOG(j.
trace()) <<
"applyTransaction: Non-phantom signer "
984 "lacks account root.";
988 if (!sleTxSignerRoot->isFieldPresent(sfRegularKey))
990 JLOG(j.
trace()) <<
"applyTransaction: Account lacks RegularKey.";
993 if (signingAcctIDFromPubKey != sleTxSignerRoot->getAccountID(sfRegularKey))
995 JLOG(j.
trace()) <<
"applyTransaction: Account doesn't match RegularKey.";
1000 weightSum += iter->weight;
1004 if (weightSum < sleAccountSigners->getFieldU32(sfSignerQuorum))
1006 JLOG(j.
trace()) <<
"applyTransaction: Signers failed to meet quorum.";
1021 for (
auto const& index : offers)
1041 for (
auto const& index : offers)
1055 for (
auto const& index : creds)
1062 <<
"removeExpiredCredentials: failed to delete expired credential. Err: "
1077 JLOG(viewJ.
error()) <<
"removeDeletedTrustLines: deleted trustlines exceed max "
1078 << trustLines.
size();
1082 for (
auto const& index : trustLines)
1084 if (
auto const sleState = view.
peek({ltRIPPLE_STATE, index});
1087 JLOG(viewJ.
error()) <<
"removeDeletedTrustLines: failed to delete AMM trustline";
1113 auto const balance = payerSle->getFieldAmount(sfBalance).xrp();
1117 balance != beast::kZero && (!
view().
open() || balance >= fee),
1118 "xrpl::Transactor::reset : valid balance");
1132 payerSle->setFieldAmount(sfBalance, balance - fee);
1134 XRPL_ASSERT(
isTesSuccess(ter),
"xrpl::Transactor::reset : result is tesSUCCESS");
1139 if (payerSle != txnAcct)
1151 JLOG(
j_.debug()) <<
"Transaction trapped: " << txHash;
1157 JLOG(
j_.trace()) <<
"reapplying because of " <<
transToken(result);
1164 auto typesForResult = [](
TER const ter) {
1172 types.
insert(ltRIPPLE_STATE);
1176 types.
insert(ltNFTOKEN_OFFER);
1177 types.
insert(ltCREDENTIAL);
1185 auto const typesToCollect = typesForResult(result);
1188 if (!typesToCollect.empty())
1191 [&typesToCollect, &deletedObjects](
1197 "xrpl::Transactor::processPersistentChanges : non-null "
1199 if (before &&
after)
1201 auto const type = before->getType();
1202 if (typesToCollect.contains(type))
1206 if (type == ltOFFER &&
1207 before->getFieldAmount(sfTakerPays) !=
1208 after->getFieldAmount(sfTakerPays))
1211 deletedObjects[type].push_back(index);
1220 auto const resetResult =
reset(fee);
1222 result = resetResult.first;
1224 fee = resetResult.second;
1229 auto const typesToApply = typesForResult(result);
1230 if (
isTecClaim(result) && !typesToApply.empty())
1232 auto const viewJ =
ctx_.registry.get().getJournal(
"View");
1233 for (
auto const& [type, ids] : deletedObjects)
1235 if (ids.empty() || !typesToApply.contains(type))
1243 case ltNFTOKEN_OFFER:
1246 case ltRIPPLE_STATE:
1255 "xrpl::Transactor::processPersistentChanges() : "
1280 JLOG(
ctx_.journal.fatal()) <<
1281 "Transaction has failed one or more transaction invariants, tx: " <<
1288 JLOG(
ctx_.journal.fatal()) <<
1289 "Exception while checking transaction invariants: " <<
1313 return ctx_.checkInvariants(result, fee);
1320 JLOG(
j_.trace()) <<
"apply: " <<
ctx_.tx.getTransactionID();
1339 JLOG(
j_.fatal()) <<
"Transaction serdes mismatch";
1342 UNREACHABLE(
"xrpl::Transactor::operator() : transaction serdes mismatch");
1348 if (
auto const& trap =
ctx_.registry.get().getTrapTxID();
1349 trap && *trap ==
ctx_.tx.getTransactionID())
1354 auto result =
ctx_.preclaimResult;
1360 XRPL_ASSERT(result !=
temUNKNOWN,
"xrpl::Transactor::operator() : result is not temUNKNOWN");
1362 if (
auto stream =
j_.trace())
1363 stream <<
"preclaim result: " <<
transToken(result);
1366 auto fee =
ctx_.tx.getFieldAmount(sfFee).xrp();
1393 auto const resetResult =
reset(fee);
1395 result = resetResult.first;
1397 fee = resetResult.second;
1404 result =
ctx_.checkInvariants(result, fee);
1422 if (fee < beast::kZero)
1429 if (!
view().
open() && fee != beast::kZero)
1430 ctx_.destroyXRP(fee);
1433 metadata =
ctx_.apply(result);
1441 JLOG(
j_.trace()) << (applied ?
"applied " :
"not applied ") <<
transToken(result);
1443 return {result, applied, metadata};
A generic endpoint for log messages.
Stream trace() const
Severity stream access functions.
State information when applying a tx.
Writeable view to a ledger, for applying a transaction.
virtual SLE::pointer peek(Keylet const &k)=0
Prepare to modify the SLE associated with key.
virtual void update(SLE::ref sle)=0
Indicate changes to a peeked SLE.
RAII class to set and restore the current transaction rules.
static uint32_t txToPermissionType(TxType type)
static Permission const & getInstance()
virtual Fees const & fees() const =0
Returns the fees for the base ledger.
virtual SLE::const_pointer read(Keylet const &k) const =0
Return the state item associated with a key.
virtual bool txExists(key_type const &key) const =0
Returns true if a tx exists in the tx map.
virtual bool open() const =0
Returns true if this reflects an open ledger.
LedgerIndex seq() const
Returns the sequence number of the base ledger.
bool enabled(uint256 const &feature) const
Returns true if a feature is enabled.
virtual std::string getFullText() const
std::shared_ptr< STLedgerEntry > pointer
std::shared_ptr< STLedgerEntry const > const & const_ref
std::shared_ptr< STLedgerEntry const > const_pointer
Blob getFieldVL(SField const &field) const
bool isEquivalent(STBase const &t) const override
std::uint32_t getFieldU32(SField const &field) const
STArray const & getFieldArray(SField const &field) const
bool isFlag(std::uint32_t) const
bool isFieldPresent(SField const &field) const
uint256 getFieldH256(SField const &field) const
STBase const & peekAtField(SField const &field) const
AccountID getAccountID(SField const &field) const
STAmount const & getFieldAmount(SField const &field) const
std::uint32_t getFlags() const
SeqProxy getSeqProxy() const
AccountID getFeePayer() const
TxType getTxnType() const
json::Value getJson(JsonOptions options) const override
uint256 getTransactionID() const
A type that represents either a sequence value or a ticket value.
static constexpr SeqProxy sequence(std::uint32_t v)
Factory function to return a sequence-based SeqProxy.
constexpr bool isTicket() const
constexpr std::uint32_t value() const
constexpr bool isSeq() const
Slice slice() const noexcept
Service registry for dependency injection.
virtual LoadFeeTrack & getFeeTrack()=0
static std::expected< std::vector< SignerEntry >, NotTEC > deserialize(STObject const &obj, beast::Journal journal, std::string_view annotation)
An immutable linear range of bytes.
bool empty() const noexcept
Return true if the byte range is empty.
static NotTEC preflight1(PreflightContext const &ctx, std::uint32_t flagMask)
Performs early sanity checks on the account and fee fields.
static std::uint32_t getFlagsMask(PreflightContext const &ctx)
TER consumeSeqProxy(SLE::pointer const &sleAccount)
static NotTEC checkPermission(ReadView const &view, STTx const &tx, std::unordered_set< GranularPermissionType > &heldGranularPermissions)
void trapTransaction(uint256) const
static TER checkFee(PreclaimContext const &ctx, XRPAmount baseFee)
static XRPAmount minimumFee(ServiceRegistry ®istry, XRPAmount baseFee, Fees const &fees, ApplyFlags flags)
Compute the minimum fee required to process a transaction with a given baseFee based on the current s...
static NotTEC checkSign(PreclaimContext const &ctx)
static XRPAmount calculateOwnerReserveFee(ReadView const &view, STTx const &tx)
ApplyResult operator()()
Process the transaction.
static NotTEC preflightSigValidated(PreflightContext const &ctx)
static NotTEC checkBatchSign(PreclaimContext const &ctx)
static NotTEC checkSeqProxy(ReadView const &view, STTx const &tx, beast::Journal j)
static NotTEC preflight2(PreflightContext const &ctx)
Checks whether the signature appears valid.
static NotTEC checkSingleSign(ReadView const &view, AccountID const &idSigner, AccountID const &idAccount, SLE::const_pointer sleAccount, beast::Journal const j)
TER checkTransactionInvariants(TER result, XRPAmount fee)
Check transaction-specific invariants only.
Transactor(Transactor const &)=delete
static NotTEC preflightUniversal(PreflightContext const &ctx)
Universal validations.
static XRPAmount calculateBaseFee(ReadView const &view, STTx const &tx)
TER checkInvariants(TER result, XRPAmount fee)
Check all invariants for the current transaction.
AccountID const accountID_
static NotTEC checkPriorTxAndLastLedger(PreclaimContext const &ctx)
static NotTEC checkMultiSign(ReadView const &view, ApplyFlags flags, AccountID const &id, STObject const &sigObject, beast::Journal const j)
static bool validDataLength(std::optional< Slice > const &slice, std::size_t maxLength)
virtual void preCompute()
virtual void visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after)=0
Inspect a single ledger entry modified by this transaction.
std::pair< TER, XRPAmount > reset(XRPAmount fee)
Reset the context, discarding any changes made and adjust the fee.
virtual bool finalizeInvariants(STTx const &tx, TER result, XRPAmount fee, ReadView const &view, beast::Journal const &j)=0
Check transaction-specific post-conditions after all entries have been visited.
static TER ticketDelete(ApplyView &view, AccountID const &account, uint256 const &ticketIndex, beast::Journal j)
std::tuple< TER, XRPAmount, bool > processPersistentChanges(TER result, XRPAmount fee)
TER deleteSLE(ApplyView &view, SLE::ref sleCredential, beast::Journal j)
std::optional< NotTEC > preflightCheckSimulateKeys(ApplyFlags flags, STObject const &sigObject, beast::Journal j)
Checks the special signing key state needed for simulation.
NotTEC preflightCheckSigningKey(STObject const &sigObject, beast::Journal j)
Checks the validity of the transactor signing key.
Keylet ticket(AccountID const &id, std::uint32_t ticketSeq)
A ticket belonging to an account.
Keylet signerList(AccountID const &account) noexcept
A SignerList.
Keylet ownerDir(AccountID const &id) noexcept
The root page of an account's directory.
Keylet offer(AccountID const &id, std::uint32_t seq) noexcept
An offer from an account.
Keylet delegate(AccountID const &account, AccountID const &authorizedAccount) noexcept
A keylet for Delegate object.
Keylet account(AccountID const &id) noexcept
AccountID root.
Keylet credential(AccountID const &subject, AccountID const &issuer, Slice const &credType) noexcept
Keylet nftokenOffer(AccountID const &owner, std::uint32_t seq)
An offer from an account to buy or sell an NFT.
bool deleteTokenOffer(ApplyView &view, SLE::ref offer)
Deletes the given token offer.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
@ telNETWORK_ID_MAKES_TX_NON_CANONICAL
@ terNO_DELEGATE_PERMISSION
static void removeExpiredNFTokenOffers(ApplyView &view, std::vector< uint256 > const &offers, beast::Journal viewJ)
constexpr FlagValue tfInnerBatchTxn
bool isLegalAmount(XRPAmount const &amount)
Returns true if the amount does not exceed the initial XRP in existence.
std::unordered_set< GranularPermissionType > getGranularPermission(SLE::const_ref delegate, TxType const &type)
Load the granular permissions granted to the delegate account for the specified transaction type.
@ SigBad
Signature is bad. Didn't do local checks.
TER deleteAMMTrustLine(ApplyView &view, SLE::pointer sleState, std::optional< AccountID > const &ammAccountID, beast::Journal j)
Delete trustline to AMM.
static void removeExpiredCredentials(ApplyView &view, std::vector< uint256 > const &creds, beast::Journal viewJ)
bool isTecClaimHardFail(TER ter, ApplyFlags flags)
Return true if the transaction can claim a fee (tec), and the ApplyFlags do not allow soft failures.
std::pair< Validity, std::string > checkValidity(HashRouter &router, STTx const &tx, Rules const &rules)
Checks transaction signature and local checks.
uint256 getTicketIndex(AccountID const &account, std::uint32_t uSequence)
std::string toBase58(AccountID const &v)
Convert AccountID to base58 checked string.
static void removeUnfundedOffers(ApplyView &view, std::vector< uint256 > const &offers, beast::Journal viewJ)
constexpr std::uint16_t kMaxDeletableAmmTrustLines
The maximum number of trustlines to delete as part of AMM account deletion cleanup.
std::string transToken(TER code)
NotTEC checkTxPermission(SLE::const_ref delegate, STTx const &tx)
Check if the delegate account has permission to execute the transaction.
TER offerDelete(ApplyView &view, SLE::ref sle, beast::Journal j)
Delete an offer.
std::string to_string(BaseUInt< Bits, Tag > const &a)
std::optional< KeyType > publicKeyType(Slice const &slice)
Returns the type of public key.
constexpr std::size_t kExpiredOfferRemoveLimit
The maximum number of expired offers to delete at once.
void open(soci::session &s, BasicConfig const &config, std::string const &dbName)
Open a soci session.
std::string toShortString(BaseUInt< Bits, Tag > const &a)
TERSubset< CanCvtToNotTEC > NotTEC
bool after(NetClock::time_point now, std::uint32_t mark)
Has the specified time passed?
void adjustOwnerCount(ApplyView &view, SLE::ref sle, std::int32_t amount, beast::Journal j)
Adjust the owner count up or down.
AccountID calcAccountID(PublicKey const &pk)
static void removeDeletedTrustLines(ApplyView &view, std::vector< uint256 > const &trustLines, beast::Journal viewJ)
bool hasInvalidAmount(STBase const &field, beast::Journal j)
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
XRPAmount scaleFeeLoad(XRPAmount fee, LoadFeeTrack const &feeTrack, Fees const &fees, bool bUnlimited)
bool isTesSuccess(TER x) noexcept
TERSubset< CanCvtToTER > TER
NotTEC preflight0(PreflightContext const &ctx, std::uint32_t flagMask)
Performs early sanity checks on the txid and flags.
bool isTecClaim(TER x) noexcept
bool isPseudoAccount(SLE::const_pointer sleAcct, std::set< SField const * > const &pseudoFieldFilter={})
Returns true if and only if sleAcct is a pseudo-account or specific pseudo-accounts in pseudoFieldFil...
std::vector< unsigned char > Blob
Storage for linear binary data.
constexpr std::size_t kUnfundedOfferRemoveLimit
The maximum number of unfunded offers to delete at once.
constexpr std::size_t kOversizeMetaDataCap
The maximum number of metadata entries allowed in one transaction.
bool isPseudoTx(STObject const &tx)
Check whether a transaction is a pseudo-transaction.
constexpr FlagValue tfUniversalMask
XRPL_NO_SANITIZE_ADDRESS void Throw(Args &&... args)
std::enable_if_t< std::is_same_v< T, char >||std::is_same_v< T, unsigned char >, Slice > makeSlice(std::array< T, N > const &a)
Reflects the fee settings for a particular ledger.
State information when determining if a tx is likely to claim a fee.
std::reference_wrapper< ServiceRegistry > registry
std::optional< uint256 const > const parentBatchId
State information when preflighting a tx.
std::optional< uint256 const > parentBatchId
std::reference_wrapper< ServiceRegistry > registry