rippled
Protocol.h
1 //------------------------------------------------------------------------------
2 /*
3  This file is part of rippled: https://github.com/ripple/rippled
4  Copyright (c) 2012, 2013 Ripple Labs Inc.
5 
6  Permission to use, copy, modify, and/or distribute this software for any
7  purpose with or without fee is hereby granted, provided that the above
8  copyright notice and this permission notice appear in all copies.
9 
10  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13  ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18 //==============================================================================
19 
20 #ifndef RIPPLE_PROTOCOL_PROTOCOL_H_INCLUDED
21 #define RIPPLE_PROTOCOL_PROTOCOL_H_INCLUDED
22 
23 #include <ripple/basics/ByteUtilities.h>
24 #include <ripple/basics/base_uint.h>
25 #include <cstdint>
26 
27 namespace ripple {
28 
40 std::size_t constexpr txMinSizeBytes = 32;
41 
44 
47 
50 
53 
56 
58 std::uint64_t constexpr dirNodeMaxPages = 262144;
59 
62 
65 
68 
71 
81 std::uint16_t constexpr maxTransferFee = 50000;
82 
85 
88 
90 std::size_t constexpr maxDIDURILength = 256;
91 
94 
96 std::size_t constexpr maxDomainLength = 256;
97 
100 
105 using TxID = uint256;
106 
111 
113 std::size_t constexpr maxOracleURI = 256;
114 
117 
120 
123 
128 
131 std::size_t constexpr maxPriceScale = 20;
132 
135 std::size_t constexpr maxTrim = 25;
136 
137 } // namespace ripple
138 
139 #endif
ripple::maxTransferFee
constexpr std::uint16_t maxTransferFee
The maximum token transfer fee allowed.
Definition: Protocol.h:81
ripple::maxDeletableTokenOfferEntries
constexpr std::size_t maxDeletableTokenOfferEntries
The maximum number of offers in an offer directory for NFT to be burnable.
Definition: Protocol.h:70
ripple::txMinSizeBytes
constexpr std::size_t txMinSizeBytes
Protocol specific constants.
Definition: Protocol.h:40
ripple::expiredOfferRemoveLimit
constexpr std::size_t expiredOfferRemoveLimit
The maximum number of expired offers to delete at once.
Definition: Protocol.h:49
ripple::dirNodeMaxPages
constexpr std::uint64_t dirNodeMaxPages
The maximum number of pages allowed in a directory.
Definition: Protocol.h:58
ripple::maxOracleURI
constexpr std::size_t maxOracleURI
The maximum length of a URI inside an Oracle.
Definition: Protocol.h:113
ripple::dirMaxTokensPerPage
constexpr std::size_t dirMaxTokensPerPage
The maximum number of items in an NFT page.
Definition: Protocol.h:61
ripple::maxDIDURILength
constexpr std::size_t maxDIDURILength
The maximum length of a URI inside a DID.
Definition: Protocol.h:90
ripple::maxDeletableAMMTrustLines
constexpr std::uint16_t maxDeletableAMMTrustLines
The maximum number of trustlines to delete as part of AMM account deletion cleanup.
Definition: Protocol.h:110
ripple::unfundedOfferRemoveLimit
constexpr std::size_t unfundedOfferRemoveLimit
The maximum number of unfunded offers to delete at once.
Definition: Protocol.h:46
ripple::uint256
base_uint< 256 > uint256
Definition: base_uint.h:550
ripple::base_uint< 256 >
ripple::maxDeletableDirEntries
constexpr std::size_t maxDeletableDirEntries
The maximum number of owner directory entries for account to be deletable.
Definition: Protocol.h:64
ripple::maxOracleSymbolClass
constexpr std::size_t maxOracleSymbolClass
The maximum length of a SymbolClass inside an Oracle.
Definition: Protocol.h:122
ripple::megabytes
constexpr auto megabytes(T value) noexcept
Definition: ByteUtilities.h:34
ripple::maxDIDDocumentLength
constexpr std::size_t maxDIDDocumentLength
The maximum length of a Data element inside a DID.
Definition: Protocol.h:87
cstdint
ripple::maxTokenOfferCancelCount
constexpr std::size_t maxTokenOfferCancelCount
The maximum number of token offers that can be canceled at once.
Definition: Protocol.h:67
std::uint64_t
ripple::txMaxSizeBytes
constexpr std::size_t txMaxSizeBytes
Largest legal byte size of a transaction.
Definition: Protocol.h:43
ripple::maxTokenURILength
constexpr std::size_t maxTokenURILength
The maximum length of a URI inside an NFT.
Definition: Protocol.h:84
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: RCLCensorshipDetector.h:29
ripple::maxLastUpdateTimeDelta
constexpr std::size_t maxLastUpdateTimeDelta
The maximum allowed time difference between lastUpdateTime and the time of the last closed ledger.
Definition: Protocol.h:127
ripple::oversizeMetaDataCap
constexpr std::size_t oversizeMetaDataCap
The maximum number of metadata entries allowed in one transaction.
Definition: Protocol.h:52
ripple::maxDIDAttestationLength
constexpr std::size_t maxDIDAttestationLength
The maximum length of an Attestation inside a DID.
Definition: Protocol.h:93
ripple::maxPriceScale
constexpr std::size_t maxPriceScale
The maximum price scaling factor.
Definition: Protocol.h:131
std::size_t
ripple::maxTrim
constexpr std::size_t maxTrim
The maximum percentage of outliers to trim.
Definition: Protocol.h:135
ripple::maxOracleProvider
constexpr std::size_t maxOracleProvider
The maximum length of a Provider inside an Oracle.
Definition: Protocol.h:116
ripple::dirNodeMaxEntries
constexpr std::size_t dirNodeMaxEntries
The maximum number of entries per directory page.
Definition: Protocol.h:55
ripple::maxDomainLength
constexpr std::size_t maxDomainLength
The maximum length of a domain.
Definition: Protocol.h:96
ripple::maxOracleDataSeries
constexpr std::size_t maxOracleDataSeries
The maximum size of a data series array inside an Oracle.
Definition: Protocol.h:119