CatapultServer  v0.5.0.1 (Elephant)
NodeConfiguration.h
Go to the documentation of this file.
1 
21 #pragma once
27 
28 namespace catapult { namespace utils { class ConfigurationBag; } }
29 
30 namespace catapult { namespace config {
31 
34  public:
36  unsigned short Port;
37 
39  unsigned short ApiPort;
40 
43 
46 
49 
53 
56 
59 
62 
65 
68 
71 
74 
77 
80 
83 
86 
89 
92 
95 
98 
102 
105 
108 
111 
114 
117 
120 
123 
126 
129 
132 
134  uint32_t MaxTrackedNodes;
135 
136  public:
140  std::string Host;
141 
143  std::string FriendlyName;
144 
146  uint32_t Version;
147 
150  };
151 
152  public:
155 
156  public:
160  uint16_t MaxConnections;
161 
164 
167 
170  };
171 
175  uint16_t BacklogSize;
176  };
177 
178  public:
181 
184 
185  private:
186  NodeConfiguration() = default;
187 
188  public:
191 
192  public:
195  };
196 }}
catapult::config::NodeConfiguration::ShortLivedCacheMaxSize
uint32_t ShortLivedCacheMaxSize
Maximum size of a short lived cache.
Definition: NodeConfiguration.h:76
catapult::config::NodeConfiguration::TransactionElementTraceInterval
uint32_t TransactionElementTraceInterval
Multiple of elements at which a transaction element should be traced through queue and completion.
Definition: NodeConfiguration.h:116
catapult::config::NodeConfiguration::IncomingConnections
IncomingConnectionsSubConfiguration IncomingConnections
Incoming connections configuration.
Definition: NodeConfiguration.h:183
catapult::utils::VerifyBagSizeLte
void VerifyBagSizeLte(const ConfigurationBag &bag, size_t expectedSize)
Verifies that the number of properties in bag is no greater than expectedSize.
Definition: utils/ConfigurationUtils.cpp:38
ConnectionSecurityMode.h
catapult::config::NodeConfiguration::LoadFromBag
static NodeConfiguration LoadFromBag(const utils::ConfigurationBag &bag)
Loads a node configuration from bag.
Definition: NodeConfiguration.cpp:33
catapult::config::NodeConfiguration::ShouldUseSingleThreadPool
bool ShouldUseSingleThreadPool
true if a single thread pool should be used, false if multiple thread pools should be used.
Definition: NodeConfiguration.h:45
catapult::config::NodeConfiguration::MaxTrackedNodes
uint32_t MaxTrackedNodes
Maximum number of nodes to track in memory.
Definition: NodeConfiguration.h:134
catapult::config::NodeConfiguration::SyncTimeout
utils::TimeSpan SyncTimeout
Timeout for syncing with a peer.
Definition: NodeConfiguration.h:94
catapult::config::NodeConfiguration::ShouldAbortWhenDispatcherIsFull
bool ShouldAbortWhenDispatcherIsFull
true if the process should terminate when any dispatcher is full.
Definition: NodeConfiguration.h:119
catapult::config::NodeConfiguration::ApiPort
unsigned short ApiPort
Server api port.
Definition: NodeConfiguration.h:39
catapult::config::NodeConfiguration::ShouldEnableAutoSyncCleanup
bool ShouldEnableAutoSyncCleanup
Definition: NodeConfiguration.h:52
catapult::config::NodeConfiguration::MinFeeMultiplier
BlockFeeMultiplier MinFeeMultiplier
Minimum fee multiplier of transactions to propagate and include in blocks.
Definition: NodeConfiguration.h:79
catapult::config::NodeConfiguration::Uninitialized
static NodeConfiguration Uninitialized()
Creates an uninitialized node configuration.
Definition: NodeConfiguration.cpp:29
catapult::config::NodeConfiguration::LocalSubConfiguration
Local node configuration.
Definition: NodeConfiguration.h:138
NodeRoles.h
catapult::config::NodeConfiguration::TransactionSpamThrottlingMaxBoostFee
Amount TransactionSpamThrottlingMaxBoostFee
Maximum fee that will boost a transaction through the spam throttle when spam throttling is enabled.
Definition: NodeConfiguration.h:58
catapult::config::NodeConfiguration::MaxPacketDataSize
utils::FileSize MaxPacketDataSize
Maximum packet data size.
Definition: NodeConfiguration.h:104
catapult::config::NodeConfiguration::ShouldUseCacheDatabaseStorage
bool ShouldUseCacheDatabaseStorage
true if cache data should be saved in a database.
Definition: NodeConfiguration.h:48
catapult::config::NodeConfiguration::UnconfirmedTransactionsCacheMaxResponseSize
utils::FileSize UnconfirmedTransactionsCacheMaxResponseSize
Maximum size of an unconfirmed transactions response.
Definition: NodeConfiguration.h:85
catapult::config::NodeConfiguration::IncomingConnectionsSubConfiguration::BacklogSize
uint16_t BacklogSize
Maximum size of the pending connections queue.
Definition: NodeConfiguration.h:175
catapult::config::NodeConfiguration::Local
LocalSubConfiguration Local
Local node configuration.
Definition: NodeConfiguration.h:154
FileSize.h
catapult::config::NodeConfiguration::MaxCacheDatabaseWriteBatchSize
utils::FileSize MaxCacheDatabaseWriteBatchSize
Maximum cache database write batch size.
Definition: NodeConfiguration.h:131
catapult::config::NodeConfiguration
Node configuration settings.
Definition: NodeConfiguration.h:33
catapult::config::NodeConfiguration::OutgoingConnections
ConnectionsSubConfiguration OutgoingConnections
Outgoing connections configuration.
Definition: NodeConfiguration.h:180
catapult::config::NodeConfiguration::ConnectionsSubConfiguration::MaxConnections
uint16_t MaxConnections
Maximum number of active connections.
Definition: NodeConfiguration.h:160
catapult::utils::TimeSpan
Represents a time duration.
Definition: TimeSpan.h:30
catapult::ionet::ConnectionSecurityMode
ConnectionSecurityMode
Possible connection security modes.
Definition: ConnectionSecurityMode.h:36
catapult::utils::ConfigurationBag
A simple bag of properties.
Definition: ConfigurationBag.h:57
catapult::config::NodeConfiguration::ShortLivedCacheTransactionDuration
utils::TimeSpan ShortLivedCacheTransactionDuration
Duration of a transaction in the short lived cache.
Definition: NodeConfiguration.h:67
TransactionSelectionStrategy.h
catapult::config::NodeConfiguration::LocalSubConfiguration::FriendlyName
std::string FriendlyName
Node friendly name (leave empty to use address).
Definition: NodeConfiguration.h:143
catapult::utils::BaseValue< uint64_t, Amount_tag >
catapult::config::NodeConfiguration::LocalSubConfiguration::Version
uint32_t Version
Node version.
Definition: NodeConfiguration.h:146
catapult::config::NodeConfiguration::ConnectionsSubConfiguration::MaxConnectionAge
uint16_t MaxConnectionAge
Maximum connection age.
Definition: NodeConfiguration.h:163
catapult::config::NodeConfiguration::SocketWorkingBufferSensitivity
uint32_t SocketWorkingBufferSensitivity
Definition: NodeConfiguration.h:101
catapult::config::NodeConfiguration::TransactionDisruptorSize
uint32_t TransactionDisruptorSize
Size of the transaction disruptor circular buffer.
Definition: NodeConfiguration.h:113
catapult::config::NodeConfiguration::TransactionSelectionStrategy
model::TransactionSelectionStrategy TransactionSelectionStrategy
Transaction selection strategy used for syncing and harvesting unconfirmed transactions.
Definition: NodeConfiguration.h:82
LOAD_NODE_PROPERTY
#define LOAD_NODE_PROPERTY(NAME)
catapult::config::NodeConfiguration::ConnectionsSubConfiguration::NumConsecutiveFailuresBeforeBanning
uint16_t NumConsecutiveFailuresBeforeBanning
Number of consecutive connection failures before a connection is banned.
Definition: NodeConfiguration.h:169
catapult::config::NodeConfiguration::BlockDisruptorSize
uint32_t BlockDisruptorSize
Size of the block disruptor circular buffer.
Definition: NodeConfiguration.h:107
catapult::config::NodeConfiguration::ShouldEnableTransactionSpamThrottling
bool ShouldEnableTransactionSpamThrottling
true if transaction spam throttling should be enabled.
Definition: NodeConfiguration.h:55
catapult::config::NodeConfiguration::ConnectionsSubConfiguration::MaxConnectionBanAge
uint16_t MaxConnectionBanAge
Maximum connection ban age.
Definition: NodeConfiguration.h:166
NodeConfiguration.h
catapult::config::NodeConfiguration::ConnectTimeout
utils::TimeSpan ConnectTimeout
Timeout for connecting to a peer.
Definition: NodeConfiguration.h:91
catapult::ionet::NodeRoles
NodeRoles
A node's role.
Definition: NodeRoles.h:28
catapult::config::NodeConfiguration::MaxBlocksPerSyncAttempt
uint32_t MaxBlocksPerSyncAttempt
Maximum number of blocks per sync attempt.
Definition: NodeConfiguration.h:61
catapult::config::NodeConfiguration::IncomingConnectionsSubConfiguration
Incoming connections configuration.
Definition: NodeConfiguration.h:173
catapult::utils::FileSize
Represents a file size.
Definition: FileSize.h:29
catapult::config::NodeConfiguration::ShouldAuditDispatcherInputs
bool ShouldAuditDispatcherInputs
true if all dispatcher inputs should be audited.
Definition: NodeConfiguration.h:122
ConfigurationUtils.h
catapult::config::NodeConfiguration::IncomingSecurityModes
ionet::ConnectionSecurityMode IncomingSecurityModes
Accepted security modes of incoming connections initiated by other nodes.
Definition: NodeConfiguration.h:128
TimeSpan.h
catapult::config::NodeConfiguration::ConnectionsSubConfiguration
Connections configuration.
Definition: NodeConfiguration.h:158
catapult::model::TransactionSelectionStrategy
TransactionSelectionStrategy
Strategy for selecting transactions.
Definition: TransactionSelectionStrategy.h:27
catapult::config::NodeConfiguration::ShouldAllowAddressReuse
bool ShouldAllowAddressReuse
true if the server should reuse ports already in use.
Definition: NodeConfiguration.h:42
ConfigurationBag.h
catapult::config::NodeConfiguration::ShortLivedCacheBlockDuration
utils::TimeSpan ShortLivedCacheBlockDuration
Duration of a block in the short lived cache.
Definition: NodeConfiguration.h:70
catapult::config::NodeConfiguration::LocalSubConfiguration::Roles
ionet::NodeRoles Roles
Node roles.
Definition: NodeConfiguration.h:149
catapult::config::NodeConfiguration::UnconfirmedTransactionsCacheMaxSize
uint32_t UnconfirmedTransactionsCacheMaxSize
Maximum size of the unconfirmed transactions cache.
Definition: NodeConfiguration.h:88
catapult::config::NodeConfiguration::Port
unsigned short Port
Server port.
Definition: NodeConfiguration.h:36
catapult::config::NodeConfiguration::OutgoingSecurityMode
ionet::ConnectionSecurityMode OutgoingSecurityMode
Security mode of outgoing connections initiated by this node.
Definition: NodeConfiguration.h:125
catapult::config::NodeConfiguration::LocalSubConfiguration::Host
std::string Host
Node host (leave empty to auto-detect IP).
Definition: NodeConfiguration.h:140
catapult::config::NodeConfiguration::ShortLivedCachePruneInterval
utils::TimeSpan ShortLivedCachePruneInterval
Time between short lived cache pruning.
Definition: NodeConfiguration.h:73
catapult
Definition: AddressExtractionExtension.cpp:28
LOAD_OUT_CONNECTIONS_PROPERTY
#define LOAD_OUT_CONNECTIONS_PROPERTY(NAME)
catapult::config::NodeConfiguration::BlockElementTraceInterval
uint32_t BlockElementTraceInterval
Multiple of elements at which a block element should be traced through queue and completion.
Definition: NodeConfiguration.h:110
LOAD_IN_CONNECTIONS_PROPERTY
#define LOAD_IN_CONNECTIONS_PROPERTY(NAME)
catapult::config::NodeConfiguration::MaxChainBytesPerSyncAttempt
utils::FileSize MaxChainBytesPerSyncAttempt
Maximum chain bytes per sync attempt.
Definition: NodeConfiguration.h:64
catapult::config::NodeConfiguration::SocketWorkingBufferSize
utils::FileSize SocketWorkingBufferSize
Initial socket working buffer size (socket reads will attempt to read buffers of roughly this size).
Definition: NodeConfiguration.h:97
catapult::config::NodeConfiguration::NodeConfiguration
NodeConfiguration()=default
LOAD_LOCALNODE_PROPERTY
#define LOAD_LOCALNODE_PROPERTY(NAME)