CatapultServer
v0.5.0.1 (Elephant)
|
Namespaces | |
filters | |
Classes | |
struct | CommunicationTimestamps |
Represents the network timestamps for sending and receiving a time synchronization request / response. More... | |
class | ImportanceAwareNodeSelector |
A node selector that selects nodes according to the importance of the account used to boot the node. More... | |
struct | NodeAge_tag |
Node age. More... | |
struct | NodeNetworkTimeRequestPolicy |
Node network time request policy. More... | |
struct | TimeOffset_tag |
Time offset. More... | |
struct | TimeSynchronizationConfiguration |
Time synchronization configuration settings. More... | |
struct | TimeSynchronizationResult |
Information about the result of a time synchronization procedure with a remote node. More... | |
class | TimeSynchronizationSample |
Represents a sample in the time synchronization process. More... | |
class | TimeSynchronizationState |
Time synchronization state. More... | |
class | TimeSynchronizer |
A time synchronizer that synchronizes local time with the network. More... | |
Typedefs | |
using | NodeNetworkTimeRequestor = net::BriefServerRequestor< NodeNetworkTimeRequestPolicy > |
A brief server requestor for requesting node network time information. More... | |
using | TimeSynchronizationSamples = std::set< TimeSynchronizationSample > |
A set of time synchronization samples. More... | |
using | TimeSyncRequestResultPair = std::pair< net::NodeRequestResult, CommunicationTimestamps > |
Time synchronization request result pair. More... | |
using | TimeSyncResultSupplier = std::function< thread::future< TimeSyncRequestResultPair >(const ionet::Node &)> |
Prototype for a time synchronization result supplier. More... | |
using | TimeOffset = utils::BaseValue< int64_t, TimeOffset_tag > |
using | NodeAge = utils::BaseValue< int64_t, NodeAge_tag > |
Enumerations | |
enum | TimeOffsetDirection : uint8_t { TimeOffsetDirection::Positive = 0, TimeOffsetDirection::Negative = 1 } |
Direction of a time offset. More... | |
Variables | |
constexpr double | Coupling_Start = 1.0 |
Start value for the coupling of clocks. More... | |
constexpr double | Coupling_Minimum = 0.1 |
Minimum value for the coupling of clocks. More... | |
constexpr uint64_t | Start_Coupling_Decay_After_Round = 5 |
Value that indicates the round after which the decay starts. More... | |
constexpr double | Coupling_Decay_Strength = 0.3 |
Value that indicates the speed of the coupling decay. More... | |
constexpr uint64_t | Clock_Adjustment_Threshold = 75 |
constexpr double | Required_Minimum_Importance = 0.00025 |
constexpr int64_t | Warning_Threshold_Millis = 100 |
Minimum offset from remote to local node to trigger logging a warning. More... | |
using catapult::timesync::NodeAge = typedef utils::BaseValue<int64_t, NodeAge_tag> |
using catapult::timesync::NodeNetworkTimeRequestor = typedef net::BriefServerRequestor<NodeNetworkTimeRequestPolicy> |
A brief server requestor for requesting node network time information.
using catapult::timesync::TimeOffset = typedef utils::BaseValue<int64_t, TimeOffset_tag> |
using catapult::timesync::TimeSynchronizationSamples = typedef std::set<TimeSynchronizationSample> |
A set of time synchronization samples.
using catapult::timesync::TimeSyncRequestResultPair = typedef std::pair<net::NodeRequestResult, CommunicationTimestamps> |
Time synchronization request result pair.
using catapult::timesync::TimeSyncResultSupplier = typedef std::function<thread::future<TimeSyncRequestResultPair> (const ionet::Node&)> |
Prototype for a time synchronization result supplier.
|
strong |
std::shared_ptr< NodeNetworkTimeRequestor > catapult::timesync::CreateNodeNetworkTimeRequestor | ( | const std::shared_ptr< thread::IoThreadPool > & | pPool, |
const crypto::KeyPair & | keyPair, | ||
const net::ConnectionSettings & | settings | ||
) |
Creates a node network time requestor for a server with a key pair of keyPair using pPool and configured with settings.
thread::Task catapult::timesync::CreateTimeSyncTask | ( | TimeSynchronizer & | timeSynchronizer, |
const TimeSynchronizationConfiguration & | timeSyncConfig, | ||
const TimeSyncResultSupplier & | resultSupplier, | ||
const extensions::ServiceState & | state, | ||
TimeSynchronizationState & | timeSyncState, | ||
const extensions::ExtensionManager::NetworkTimeSupplier & | networkTimeSupplier | ||
) |
Creates a time synchronization task around timeSynchronizer, timeSyncConfig, resultSupplier, state, timeSyncState and networkTimeSupplier.
thread::Task catapult::timesync::CreateTimeSyncTask | ( | TimeSynchronizer & | timeSynchronizer, |
const TimeSynchronizationConfiguration & | timeSyncConfig, | ||
const TimeSyncResultSupplier & | resultSupplier, | ||
const extensions::ServiceState & | state, | ||
TimeSynchronizationState & | timeSyncState, | ||
const NetworkTimeSupplier & | networkTimeSupplier | ||
) |
thread::future<TimeSynchronizationSamples> catapult::timesync::RetrieveSamples | ( | const ionet::NodeSet & | nodes, |
const TimeSyncResultSupplier & | requestResultFutureSupplier, | ||
const NetworkTimeSupplier & | networkTimeSupplier | ||
) |
thread::future<TimeSynchronizationSamples> catapult::timesync::RetrieveSamples | ( | const ionet::NodeSet & | nodes, |
const TimeSyncResultSupplier & | resultSupplier, | ||
const extensions::ExtensionManager::NetworkTimeSupplier & | networkTimeSupplier | ||
) |
Returns time synchronization samples derived from communication timestamps retrieved from nodes using resultSupplier and networkTimeSupplier.
DECLARE_SERVICE_REGISTRAR() catapult::timesync::TimeSynchronization | ( | const TimeSynchronizationConfiguration & | timeSyncConfig, |
const std::shared_ptr< TimeSynchronizationState > & | pTimeSyncState | ||
) |
Creates a registrar for a time synchronization service around timeSyncConfig and pTimeSyncState.
|
constexpr |
Value that indicates how large the change in network time must be in order to update the node's network time.
|
constexpr |
Value that indicates the speed of the coupling decay.
|
constexpr |
Minimum value for the coupling of clocks.
|
constexpr |
Start value for the coupling of clocks.
|
constexpr |
Minimum importance a node must have in order to be considered as a synchronization partner.
|
constexpr |
Value that indicates the round after which the decay starts.
|
constexpr |
Minimum offset from remote to local node to trigger logging a warning.