xrpld
Loading...
Searching...
No Matches
xrpl::peer_finder::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::peer_finder::tuning::kBootcacheCooldownTime ( 60 )
static

◆ kSecondsPerMessage()

std::chrono::seconds xrpl::peer_finder::tuning::kSecondsPerMessage ( 151 )
constexpr

◆ kLiveCacheSecondsToLive()

std::chrono::seconds xrpl::peer_finder::tuning::kLiveCacheSecondsToLive ( 30 )
constexpr

◆ kRecentAttemptDuration()

std::chrono::seconds xrpl::peer_finder::tuning::kRecentAttemptDuration ( 60 )
constexpr

Variable Documentation

◆ kSecondsPerConnect

auto xrpl::peer_finder::tuning::kSecondsPerConnect = 10
staticconstexpr

Time to wait between making batches of connection attempts.

Definition at line 23 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kMaxConnectAttempts

auto xrpl::peer_finder::tuning::kMaxConnectAttempts = 20
staticconstexpr

Maximum number of simultaneous connection attempts.

Definition at line 28 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kOutPercent

auto xrpl::peer_finder::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 36 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kMinOutCount

auto xrpl::peer_finder::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 43 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kDefaultMaxPeers

auto xrpl::peer_finder::tuning::kDefaultMaxPeers = 21
staticconstexpr

The default value of Config::maxPeers.

Definition at line 48 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kMaxRedirects

auto xrpl::peer_finder::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 55 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kConnectionBackoff

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

Definition at line 63 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kBootcacheSize

auto xrpl::peer_finder::tuning::kBootcacheSize = 1000
staticconstexpr

Definition at line 72 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kBootcachePrunePercent

auto xrpl::peer_finder::tuning::kBootcachePrunePercent = 10
staticconstexpr

Definition at line 75 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kMaxHops

std::uint32_t xrpl::peer_finder::tuning::kMaxHops = 6
constexpr

Definition at line 90 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kNumberOfEndpoints

std::uint32_t xrpl::peer_finder::tuning::kNumberOfEndpoints = 2 * kMaxHops
constexpr

Definition at line 93 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kNumberOfEndpointsMax

std::uint32_t xrpl::peer_finder::tuning::kNumberOfEndpointsMax
constexpr
Initial value:

Definition at line 96 of file include/xrpl/peerfinder/detail/Tuning.h.

◆ kRedirectEndpointCount

std::uint32_t xrpl::peer_finder::tuning::kRedirectEndpointCount = 10
constexpr

Definition at line 100 of file include/xrpl/peerfinder/detail/Tuning.h.