xrpld
Loading...
Searching...
No Matches
xrpl::PeerFinder::Tuning Namespace Reference

Heuristically tuned constants. More...

Functions

static std::chrono::seconds const kBootcacheCooldownTime (60)
constexpr std::chrono::seconds kSecondsPerMessage (151)
constexpr std::chrono::seconds kLiveCacheSecondsToLive (30)
constexpr std::chrono::seconds kRecentAttemptDuration (60)

Variables

static constexpr auto kSecondsPerConnect = 10
 Time to wait between making batches of connection attempts.
static constexpr auto kMaxConnectAttempts = 20
 Maximum number of simultaneous connection attempts.
static constexpr auto kOutPercent = 15
 The percentage of total peer slots that are outbound.
static constexpr auto kMinOutCount = 10
 A hard minimum on the number of outgoing connections.
static constexpr auto kDefaultMaxPeers = 21
 The default value of Config::maxPeers.
static constexpr auto kMaxRedirects = 30
 Max redirects we will accept from one connection.
static std::array< int, 10 > const kConnectionBackoff {{1, 1, 2, 3, 5, 8, 13, 21, 34, 55}}
static constexpr auto kBootcacheSize = 1000
static constexpr auto kBootcachePrunePercent = 10
constexpr std::uint32_t kMaxHops = 6
constexpr std::uint32_t kNumberOfEndpoints = 2 * kMaxHops
constexpr std::uint32_t kNumberOfEndpointsMax
constexpr std::uint32_t kRedirectEndpointCount = 10

Detailed Description

Heuristically tuned constants.

Function Documentation

◆ kBootcacheCooldownTime()

std::chrono::seconds const xrpl::PeerFinder::Tuning::kBootcacheCooldownTime ( 60 )
static

◆ kSecondsPerMessage()

std::chrono::seconds xrpl::PeerFinder::Tuning::kSecondsPerMessage ( 151 )
constexpr

◆ kLiveCacheSecondsToLive()

std::chrono::seconds xrpl::PeerFinder::Tuning::kLiveCacheSecondsToLive ( 30 )
constexpr

◆ kRecentAttemptDuration()

std::chrono::seconds xrpl::PeerFinder::Tuning::kRecentAttemptDuration ( 60 )
constexpr

Variable Documentation

◆ kSecondsPerConnect

auto xrpl::PeerFinder::Tuning::kSecondsPerConnect = 10
staticconstexpr

Time to wait between making batches of connection attempts.

Definition at line 16 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kMaxConnectAttempts

auto xrpl::PeerFinder::Tuning::kMaxConnectAttempts = 20
staticconstexpr

Maximum number of simultaneous connection attempts.

Definition at line 19 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kOutPercent

auto xrpl::PeerFinder::Tuning::kOutPercent = 15
staticconstexpr

The percentage of total peer slots that are outbound.

The number of outbound peers will be the larger of the minOutCount and outPercent * Config::maxPeers specially rounded.

Definition at line 26 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kMinOutCount

auto xrpl::PeerFinder::Tuning::kMinOutCount = 10
staticconstexpr

A hard minimum on the number of outgoing connections.

This is enforced outside the Logic, so that the unit test can use any settings it wants.

Definition at line 32 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kDefaultMaxPeers

auto xrpl::PeerFinder::Tuning::kDefaultMaxPeers = 21
staticconstexpr

The default value of Config::maxPeers.

Definition at line 35 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kMaxRedirects

auto xrpl::PeerFinder::Tuning::kMaxRedirects = 30
staticconstexpr

Max redirects we will accept from one connection.

Redirects are limited for security purposes, to prevent the address caches from getting flooded.

Definition at line 41 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kConnectionBackoff

std::array<int, 10> const xrpl::PeerFinder::Tuning::kConnectionBackoff {{1, 1, 2, 3, 5, 8, 13, 21, 34, 55}}
static

Definition at line 49 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kBootcacheSize

auto xrpl::PeerFinder::Tuning::kBootcacheSize = 1000
staticconstexpr

Definition at line 58 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kBootcachePrunePercent

auto xrpl::PeerFinder::Tuning::kBootcachePrunePercent = 10
staticconstexpr

Definition at line 61 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kMaxHops

std::uint32_t xrpl::PeerFinder::Tuning::kMaxHops = 6
constexpr

Definition at line 76 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kNumberOfEndpoints

std::uint32_t xrpl::PeerFinder::Tuning::kNumberOfEndpoints = 2 * kMaxHops
constexpr

Definition at line 79 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kNumberOfEndpointsMax

std::uint32_t xrpl::PeerFinder::Tuning::kNumberOfEndpointsMax
constexpr
Initial value:

Definition at line 82 of file src/xrpld/peerfinder/detail/Tuning.h.

◆ kRedirectEndpointCount

std::uint32_t xrpl::PeerFinder::Tuning::kRedirectEndpointCount = 10
constexpr

Definition at line 86 of file src/xrpld/peerfinder/detail/Tuning.h.