xrpld
Loading...
Searching...
No Matches
src/xrpld/overlay/detail/Tuning.h
1#pragma once
2
3#include <xrpl/shamap/SHAMapInnerNode.h>
4
5#include <cstddef>
6#include <cstdint>
7
8namespace xrpl::tuning {
9
15
20static constexpr std::uint32_t kDivergedLedgerLimit = 128;
21
25static constexpr auto kSoftMaxReplyNodes = 8192;
26
30static constexpr auto kHardMaxReplyNodes = 12288;
31
35static constexpr auto kSendqIntervals = 4;
36
40static constexpr auto kDropSendQueue = 192;
41
45static constexpr auto kTargetSendQueue = 128;
46
50static constexpr auto kSendQueueLogFreq = 64;
51
55static constexpr auto kCheckIdlePeers = 4;
56
60static constexpr auto kMaxQueryDepth = 3;
61
65constexpr std::size_t kReadBufferBytes = 16384;
66
91
99static constexpr auto kFreeObjectsPerRequest = 16;
100
105static constexpr auto kCostPerLookupHit = 1;
106
118static constexpr auto kCostPerLookupMiss = 8;
119
134static constexpr auto kCostBandSmall = 0;
135static constexpr auto kCostBandMedium = 100;
136static constexpr auto kCostBandLarge = 1000;
137
147static constexpr auto kLegitHashesPerType = 4;
148
167
168} // namespace xrpl::tuning
static constexpr unsigned int kBranchFactor
Each inner node has 16 children (the 'radix tree' part of the map).
static constexpr auto kSoftMaxReplyNodes
The soft cap on the number of ledger entries in a single reply.
static constexpr auto kBandMediumMax
static constexpr auto kTargetSendQueue
How many messages we consider reasonable sustained on a send queue.
static constexpr auto kCostPerLookupHit
Cost of one cache-hit lookup.
static constexpr auto kCostBandLarge
static constexpr auto kFreeObjectsPerRequest
TMGetObjectByHash differential pricing.
static constexpr auto kHardMaxReplyNodes
The hard cap on the number of ledger entries in a single reply.
static constexpr std::uint32_t kConvergedLedgerLimit
How many ledgers off a server can be and we will still consider it converged.
static constexpr auto kDropSendQueue
How many messages on a send queue before we refuse queries.
static constexpr auto kLegitHashesPerType
How many hashes per type an honest peer asks for at a time.
static constexpr auto kMaxQueryDepth
The maximum number of levels to search.
static constexpr auto kSendqIntervals
How many timer intervals a sendq has to stay large before we disconnect.
static constexpr auto kBandSmallMax
Cutoffs that decide which size band a request falls into.
constexpr std::size_t kReadBufferBytes
Size of buffer used to read from the socket.
static constexpr auto kCostBandMedium
static constexpr auto kCostPerLookupMiss
Cost of one node-store miss, in units of kCostPerLookupHit.
static constexpr std::uint32_t kDivergedLedgerLimit
How many ledgers off a server has to be before we consider it diverged.
static constexpr auto kCostBandSmall
Size-band surcharges.
static constexpr auto kSendQueueLogFreq
How often to log send queue size.
static constexpr auto kCheckIdlePeers
How often we check for idle peers (seconds).