CatapultServer  v0.5.0.1 (Elephant)
catapult::extensions Namespace Reference

Classes

struct  BasicUnitAmount_tag
 
class  BlockExtensions
 Extensions for working with blocks. More...
 
class  ExtensionManager
 A manager for registering extensions. More...
 
struct  ImportanceDescriptor
 Describes an importance value. More...
 
class  LocalNodeChainScore
 
struct  LocalNodeStateRef
 A reference to a local node's basic state. More...
 
class  LocalNodeStateSerializer
 Serializes local node state. More...
 
class  MemoryBlockStorage
 A memory-based block storage that loads and saves blocks in memory. More...
 
class  MemoryStream
 Memory-based implementation of input and output stream. More...
 
class  MosaicUnit
 Represents units of a mosaic. More...
 
class  NemesisBlockLoader
 Loads and executes a nemesis block. More...
 
struct  NemesisFundingState
 State used by the nemesis funding observer. More...
 
struct  NodeAgingConfiguration
 Node aging configuration. More...
 
struct  NodeSelectionConfiguration
 Node selection configuration. More...
 
struct  NodeSelectionResult
 Result of a node selection. More...
 
class  ProcessBootstrapper
 Process bootstrapper. More...
 
class  RemoteDiagnosticApi
 An api for retrieving diagnostic information from a remote node. More...
 
struct  SelectorSettings
 Settings used to initialize a selector task. More...
 
class  ServerHooks
 Hooks that can be used to configure server behavior. More...
 
class  ServiceLocator
 A service locator for local node services. More...
 
class  ServiceRegistrar
 A registrar for registering a service. More...
 
struct  ServiceRegistrarInfo
 Information about a service registrar. More...
 
class  ServiceState
 State that is used as part of service registration. More...
 
struct  StateHeights
 Information about state heights. More...
 
struct  TransactionEventData
 Data associated with a transaction event. More...
 
class  TransactionExtensions
 Extensions for working with transactions. More...
 
struct  WeightedCandidate
 A weighted candidate. More...
 
class  WeightPolicyGenerator
 Weight policy generator. More...
 

Typedefs

using NamespacePath = utils::CheckedArray< NamespaceId, Namespace_Max_Depth >
 A namespace path. More...
 
using BasicUnitAmount = utils::BaseValue< uint64_t, BasicUnitAmount_tag >
 A non-fractional amount of a mosaic. More...
 
using TransactionBatchRangeDispatcher = disruptor::BatchRangeDispatcher< model::AnnotatedTransactionRange >
 A transaction batch range dispatcher. More...
 
using Notification = model::BalanceTransferNotification
 
using ImportanceRetriever = std::function< ImportanceDescriptor(const Key &)>
 Retrieves an importance descriptor given a specified public key. More...
 
using WeightedCandidates = std::vector< WeightedCandidate >
 
using NodeAger = consumer< const utils::KeySet & >
 
using NodeSelector = supplier< NodeSelectionResult >
 A node selector. More...
 
using RemoveOnlyNodeSelector = supplier< utils::KeySet >
 A remove-only node selector. More...
 
using NewBlockSink = consumers::NewBlockSink
 A new block sink prototype. More...
 
using SharedNewTransactionsSink = consumer< const consumers::TransactionInfos & >
 A new transactions sink prototype that does not take ownership of new infos. More...
 
using PacketPayloadSink = consumer< const ionet::PacketPayload & >
 A packet payload sink. More...
 
using TransactionsChangeHandler = consumers::BlockChainSyncHandlers::TransactionsChangeFunc
 Handler that is called when the confirmed state of transactions changes. More...
 
using BlockRangeConsumerFunc = handlers::BlockRangeHandler
 Function signature for delivering a block range to a consumer. More...
 
using BlockRangeConsumerFactoryFunc = std::function< BlockRangeConsumerFunc(disruptor::InputSource)>
 Factory for creating a BlockRangeConsumerFunc bound to an input source. More...
 
using CompletionAwareBlockRangeConsumerFactoryFunc = std::function< chain::CompletionAwareBlockRangeConsumerFunc(disruptor::InputSource)>
 Factory for creating a CompletionAwareBlockRangeConsumerFunc bound to an input source. More...
 
using TransactionRangeConsumerFunc = handlers::TransactionRangeHandler
 Function signature for delivering a transaction range to a consumer. More...
 
using TransactionRangeConsumerFactoryFunc = std::function< TransactionRangeConsumerFunc(disruptor::InputSource)>
 Factory for creating a TransactionRangeConsumerFunc bound to an input source. More...
 
using RemoteChainHeightsRetriever = std::function< thread::future< std::vector< Height > >(size_t)>
 A retriever that returns the network chain heights for a number of peers. More...
 
using ChainSyncedPredicate = predicate<>
 Predicate for determining if a chain is synced. More...
 
using KnownHashPredicate = chain::KnownHashPredicate
 Predicate for determining if a hash is known. More...
 
using TransactionEventHandler = consumer< const TransactionEventData & >
 Handler that is called when a transaction event is raised. More...
 

Enumerations

enum  VerifyFullBlockResult { VerifyFullBlockResult::Success, VerifyFullBlockResult::Invalid_Block_Signature, VerifyFullBlockResult::Invalid_Block_Transactions_Hash, VerifyFullBlockResult::Invalid_Transaction_Signature }
 Possible results of verifying a full block. More...
 
enum  StateHashVerification { StateHashVerification::Disabled, StateHashVerification::Enabled }
 State hash verification. More...
 
enum  NemesisFundingType { NemesisFundingType::Unknown, NemesisFundingType::Explicit, NemesisFundingType::Implicit }
 Possible nemesis funding types. More...
 
enum  WeightPolicy { WeightPolicy::Interactions, WeightPolicy::Importance }
 Weight calculation policies. More...
 
enum  ProcessDisposition { ProcessDisposition::Production, ProcessDisposition::Recovery }
 Possible process dispositions. More...
 
enum  ServiceRegistrarPhase {
  ServiceRegistrarPhase::Initial_With_Modules, ServiceRegistrarPhase::Initial, ServiceRegistrarPhase::Post_Transaction_Event_Handlers, ServiceRegistrarPhase::Post_Remote_Peers,
  ServiceRegistrarPhase::Post_Range_Consumers, ServiceRegistrarPhase::Post_Extended_Range_Consumers, ServiceRegistrarPhase::Post_Packet_Io_Pickers, ServiceRegistrarPhase::Post_Packet_Handlers,
  ServiceRegistrarPhase::Post_Tasks
}
 
enum  TransactionEvent { TransactionEvent::Dependency_Removed = 1 }
 Possible transaction events. More...
 

Functions

UnresolvedMosaicId CastToUnresolvedMosaicId (MosaicId mosaicId)
 Casts mosaicId to an unresolved mosaic id. More...
 
MosaicId CastToMosaicId (UnresolvedMosaicId unresolvedMosaicId)
 Casts unresolvedMosaicId to a mosaic id. More...
 
UnresolvedAddress CopyToUnresolvedAddress (const Address &address)
 Copies address to an unresolved address. More...
 
Address CopyToAddress (const UnresolvedAddress &unresolvedAddress)
 Copies unresolvedAddress to an address. More...
 
UnresolvedMosaicId GenerateMosaicAliasId (const RawString &name)
 Generates a mosaic id given mosaic alias name. More...
 
NamespacePath GenerateNamespacePath (const RawString &name)
 Parses a unified namespace name into a path. More...
 
std::unique_ptr< RemoteDiagnosticApiCreateRemoteDiagnosticApi (ionet::PacketIo &io)
 Creates a diagnostic api for interacting with a remote node with the specified io. More...
 
template<typename TFunc >
void SetOnce (TFunc &dest, const TFunc &source)
 Sets dest to source if and only if dest is unset. More...
 
template<typename TFunc >
const TFunc & Require (const TFunc &func)
 Returns func if and only if it is set. More...
 
template<typename TConsumer >
TConsumer AggregateConsumers (const std::vector< TConsumer > &consumers)
 Aggregates multiple consumers into a single consumer. More...
 
cache::MemoryCacheOptions GetUtCacheOptions (const config::NodeConfiguration &config)
 Extracts unconfirmed transactions cache options from config. More...
 
consumers::HashCheckOptions CreateHashCheckOptions (const utils::TimeSpan &cacheDuration, const config::NodeConfiguration &nodeConfig)
 Creates hash check options based on cacheDuration and nodeConfig. More...
 
chain::FailedTransactionSink SubscriberToSink (subscribers::TransactionStatusSubscriber &subscriber)
 Converts subscriber to a sink. More...
 
void AddDispatcherCounters (ServiceLocator &locator, const std::string &dispatcherName, const std::string &counterPrefix)
 Adds dispatcher counters with prefix counterPrefix to locator for a dispatcher named dispatcherName. More...
 
thread::Task CreateBatchTransactionTask (TransactionBatchRangeDispatcher &dispatcher, const std::string &name)
 Creates a task with name that dispatches all transactions batched in dispatcher. More...
 
chain::ExecutionConfiguration CreateExecutionConfiguration (const plugins::PluginManager &pluginManager)
 Creates an execution configuration based on pluginManager. More...
 
bool HasSerializedState (const config::CatapultDirectory &directory)
 Returns true if serialized state is present in directory. More...
 
StateHeights LoadStateFromDirectory (const config::CatapultDirectory &directory, const LocalNodeStateRef &stateRef, const plugins::PluginManager &pluginManager)
 Loads catapult state into stateRef from directory given pluginManager. More...
 
void SaveStateToDirectoryWithCheckpointing (const config::CatapultDataDirectory &dataDirectory, const config::NodeConfiguration &nodeConfig, const cache::CatapultCache &cache, const state::CatapultState &state, const model::ChainScore &score)
 Serializes state composed of cache, state and score with checkpointing to dataDirectory given nodeConfig. More...
 
 DECLARE_OBSERVER (NemesisFunding, Notification)(const Key &nemesisPublicKey
 
net::ConnectionSettings GetConnectionSettings (const config::CatapultConfiguration &config)
 Extracts connection settings from config. More...
 
void UpdateAsyncTcpServerSettings (net::AsyncTcpServerSettings &settings, const config::CatapultConfiguration &config)
 Updates settings with values in config. More...
 
uint32_t GetMaxIncomingConnectionsPerIdentity (ionet::NodeRoles roles)
 Gets the maximum number of incoming connections per identity as specified by roles. More...
 
template<typename TAcceptor >
std::shared_ptr< net::AsyncTcpServerBootServer (thread::MultiServicePool::ServiceGroup &serviceGroup, unsigned short port, ionet::ServiceIdentifier serviceId, const config::CatapultConfiguration &config, subscribers::NodeSubscriber &nodeSubscriber, TAcceptor acceptor)
 
void IncrementNodeInteraction (ionet::NodeContainer &nodes, const ionet::NodeInteractionResult &result)
 Increments the interaction counter indicated by result in the node container (nodes). More...
 
uint32_t CalculateWeight (const ionet::NodeInteractions &interactions, WeightPolicy weightPolicy, const supplier< ImportanceDescriptor > &importanceSupplier)
 Calculates the weight from interactions or importanceSupplier depending on weightPolicy. More...
 
ionet::NodeSet SelectCandidatesBasedOnWeight (const WeightedCandidates &candidates, uint64_t totalCandidateWeight, size_t maxCandidates)
 
NodeSelectionResult SelectNodes (const ionet::NodeContainer &nodes, const NodeSelectionConfiguration &config, const ImportanceRetriever &importanceRetriever)
 
utils::KeySet SelectNodesForRemoval (const ionet::NodeContainer &nodes, const NodeAgingConfiguration &config, const ImportanceRetriever &importanceRetriever)
 
NodeAger CreateNodeAger (ionet::ServiceIdentifier serviceId, const config::NodeConfiguration::ConnectionsSubConfiguration &config, ionet::NodeContainer &nodes)
 Creates and prepares a node ager that ages all serviceId connections in nodes given config. More...
 
NodeSelector CreateNodeSelector (const SelectorSettings &settings)
 
thread::Task CreateConnectPeersTask (const SelectorSettings &settings, net::PacketWriters &packetWriters)
 Creates a task for the specified service that connects to nodes with the specified role given settings and packetWriters. More...
 
thread::Task CreateConnectPeersTask (const SelectorSettings &settings, net::PacketWriters &packetWriters, const NodeSelector &selector)
 
RemoveOnlyNodeSelector CreateRemoveOnlyNodeSelector (const SelectorSettings &settings)
 
thread::Task CreateAgePeersTask (const SelectorSettings &settings, net::ConnectionContainer &connectionContainer)
 Creates a task for the specified service that ages nodes given settings and connectionContainer. More...
 
thread::Task CreateAgePeersTask (const SelectorSettings &settings, net::ConnectionContainer &connectionContainer, const RemoveOnlyNodeSelector &selector)
 
plugins::StorageConfiguration CreateStorageConfiguration (const config::CatapultConfiguration &config)
 Creates plugin storage configuration from config. More...
 
std::unique_ptr< const validators::stateless::AggregateEntityValidatorCreateStatelessValidator (const plugins::PluginManager &manager)
 Creates an entity stateless validator using pluginManager. More...
 
std::unique_ptr< const observers::EntityObserverCreateUndoEntityObserver (const plugins::PluginManager &manager)
 Creates an undo entity observer using pluginManager. More...
 
void AddStaticNodesFromPath (ProcessBootstrapper &bootstrapper, const std::string &path)
 Adds static nodes from path to bootstrapper. More...
 
 DEFINE_EXTENSION_RESULT (Partial_Transaction_Cache_Prune, 1)
 Validation failed because the partial transaction was pruned from the temporal cache. More...
 
 DEFINE_EXTENSION_RESULT (Partial_Transaction_Dependency_Removed, 2)
 Validation failed because the partial transaction was pruned from the temporal cache due to its dependency being removed. More...
 
DECLARE_SERVICE_REGISTRAR() Rooted (const std::shared_ptr< void > &pService, const std::string &serviceName, ServiceRegistrarPhase phase)
 
BlockRangeConsumerFunc CreateBlockPushEntityCallback (const ServerHooks &hooks)
 Creates a block push entity callback from hooks that only pushes when synced. More...
 
TransactionRangeConsumerFunc CreateTransactionPushEntityCallback (const ServerHooks &hooks)
 Creates a transaction push entity callback from hooks that only pushes when synced. More...
 
template<typename TSink >
TSink CreatePushEntitySink (const extensions::ServiceLocator &locator, const std::string &serviceName)
 Creates a sink that pushes entities using a service identified by serviceName in locator. More...
 
template<typename TSink >
TSink CreatePushEntitySink (const extensions::ServiceLocator &locator, const std::string &serviceName, ionet::PacketType packetType)
 Creates a sink that pushes entities using packetType and a service identified by serviceName in locator. More...
 
template<typename TRemoteApi , typename TRemoteApiFactory >
thread::TaskCallback CreateSynchronizerTaskCallback (chain::RemoteNodeSynchronizer< TRemoteApi > &&synchronizer, TRemoteApiFactory remoteApiFactory, net::PacketIoPicker &packetIoPicker, const extensions::ServiceState &state, const std::string &taskName)
 
template<typename TRemoteApi , typename TRemoteApiFactory >
thread::TaskCallback CreateChainSyncAwareSynchronizerTaskCallback (chain::RemoteNodeSynchronizer< TRemoteApi > &&synchronizer, TRemoteApiFactory remoteApiFactory, net::PacketIoPicker &packetIoPicker, const extensions::ServiceState &state, const std::string &taskName)
 

Variables

NemesisFundingStatefundingState
 

Typedef Documentation

◆ BasicUnitAmount

A non-fractional amount of a mosaic.

◆ BlockRangeConsumerFactoryFunc

Factory for creating a BlockRangeConsumerFunc bound to an input source.

◆ BlockRangeConsumerFunc

Function signature for delivering a block range to a consumer.

◆ ChainSyncedPredicate

Predicate for determining if a chain is synced.

◆ CompletionAwareBlockRangeConsumerFactoryFunc

Factory for creating a CompletionAwareBlockRangeConsumerFunc bound to an input source.

◆ ImportanceRetriever

using catapult::extensions::ImportanceRetriever = typedef std::function<ImportanceDescriptor (const Key&)>

Retrieves an importance descriptor given a specified public key.

◆ KnownHashPredicate

Predicate for determining if a hash is known.

◆ NamespacePath

◆ NewBlockSink

A new block sink prototype.

◆ NodeAger

◆ NodeSelector

◆ Notification

◆ PacketPayloadSink

A packet payload sink.

◆ RemoteChainHeightsRetriever

using catapult::extensions::RemoteChainHeightsRetriever = typedef std::function<thread::future<std::vector<Height> > (size_t)>

A retriever that returns the network chain heights for a number of peers.

◆ RemoveOnlyNodeSelector

A remove-only node selector.

◆ SharedNewTransactionsSink

A new transactions sink prototype that does not take ownership of new infos.

◆ TransactionBatchRangeDispatcher

◆ TransactionEventHandler

Handler that is called when a transaction event is raised.

◆ TransactionRangeConsumerFactoryFunc

Factory for creating a TransactionRangeConsumerFunc bound to an input source.

◆ TransactionRangeConsumerFunc

Function signature for delivering a transaction range to a consumer.

◆ TransactionsChangeHandler

Handler that is called when the confirmed state of transactions changes.

◆ WeightedCandidates

Enumeration Type Documentation

◆ NemesisFundingType

Possible nemesis funding types.

Enumerator
Unknown 

Unknown (e.g. funding type has not yet been determined).

Explicit 

Explicitly funded (e.g. mosaic supply transaction).

Implicit 

Implicitly funded (e.g. balance transfers).

◆ ProcessDisposition

Possible process dispositions.

Enumerator
Production 

Production process.

Recovery 

Recovery process.

◆ ServiceRegistrarPhase

Ordered enumeration of service registrar phases.

Note
Service registrars are invoked in order of their phase from Initial to Terminal.
Enumerator
Initial_With_Modules 

First phase (no dependencies) that registers executable modules.

Note
This allows services that load modules to be unloaded last.
Initial 

First phase (no dependencies).

Post_Transaction_Event_Handlers 

Requires transaction event handlers to be registered.

Post_Remote_Peers 

Requires remote peers (and entity sinks) to be registered.

Post_Range_Consumers 

Requires basic range consumers (and factories) to be registered.

Post_Extended_Range_Consumers 

Requires extended range consumers (and factories) to be registered.

Note
These are typically configured by extensions.
Post_Packet_Io_Pickers 

Requires all packet io pickers to be registered.

Post_Packet_Handlers 

Requires all packet handlers to be registered.

Post_Tasks 

Requires all tasks to be registered.

◆ StateHashVerification

State hash verification.

Enumerator
Disabled 

State hash verification disabled.

Enabled 

State hash verification enabled.

◆ TransactionEvent

Possible transaction events.

Enumerator
Dependency_Removed 

Transaction dependency was removed.

◆ VerifyFullBlockResult

Possible results of verifying a full block.

Enumerator
Success 

Block is valid.

Invalid_Block_Signature 

Block signature is invalid.

Invalid_Block_Transactions_Hash 

Block transactions hash is invalid.

Invalid_Transaction_Signature 

A transaction signature is invalid.

◆ WeightPolicy

Weight calculation policies.

Enumerator
Interactions 

Weight is calculated using the interaction statistics.

Importance 

Weight is calculated using importance.

Function Documentation

◆ AddDispatcherCounters()

void catapult::extensions::AddDispatcherCounters ( ServiceLocator locator,
const std::string &  dispatcherName,
const std::string &  counterPrefix 
)

Adds dispatcher counters with prefix counterPrefix to locator for a dispatcher named dispatcherName.

Here is the call graph for this function:

◆ AddStaticNodesFromPath()

void catapult::extensions::AddStaticNodesFromPath ( ProcessBootstrapper bootstrapper,
const std::string &  path 
)

Adds static nodes from path to bootstrapper.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AggregateConsumers()

template<typename TConsumer >
TConsumer catapult::extensions::AggregateConsumers ( const std::vector< TConsumer > &  consumers)

Aggregates multiple consumers into a single consumer.

Here is the caller graph for this function:

◆ BootServer()

template<typename TAcceptor >
std::shared_ptr<net::AsyncTcpServer> catapult::extensions::BootServer ( thread::MultiServicePool::ServiceGroup serviceGroup,
unsigned short  port,
ionet::ServiceIdentifier  serviceId,
const config::CatapultConfiguration config,
subscribers::NodeSubscriber nodeSubscriber,
TAcceptor  acceptor 
)

Boots a tcp server with serviceGroup on localhost port with connection config and acceptor. Incoming connections are assumed to be associated with serviceId and are added to nodeSubscriber.

Here is the call graph for this function:

◆ CalculateWeight()

uint32_t catapult::extensions::CalculateWeight ( const ionet::NodeInteractions interactions,
WeightPolicy  weightPolicy,
const supplier< ImportanceDescriptor > &  importanceSupplier 
)

Calculates the weight from interactions or importanceSupplier depending on weightPolicy.

◆ CastToMosaicId()

MosaicId catapult::extensions::CastToMosaicId ( UnresolvedMosaicId  unresolvedMosaicId)

Casts unresolvedMosaicId to a mosaic id.

Here is the call graph for this function:

◆ CastToUnresolvedMosaicId()

UnresolvedMosaicId catapult::extensions::CastToUnresolvedMosaicId ( MosaicId  mosaicId)

Casts mosaicId to an unresolved mosaic id.

Here is the call graph for this function:

◆ CopyToAddress()

Address catapult::extensions::CopyToAddress ( const UnresolvedAddress unresolvedAddress)

Copies unresolvedAddress to an address.

◆ CopyToUnresolvedAddress()

UnresolvedAddress catapult::extensions::CopyToUnresolvedAddress ( const Address address)

Copies address to an unresolved address.

◆ CreateAgePeersTask() [1/2]

thread::Task catapult::extensions::CreateAgePeersTask ( const SelectorSettings settings,
net::ConnectionContainer connectionContainer 
)

Creates a task for the specified service that ages nodes given settings and connectionContainer.

Here is the call graph for this function:

◆ CreateAgePeersTask() [2/2]

thread::Task catapult::extensions::CreateAgePeersTask ( const SelectorSettings settings,
net::ConnectionContainer connectionContainer,
const RemoveOnlyNodeSelector selector 
)

Creates a task for the specified service that connects to nodes given settings, connectionContainer and selector.

Note
selector returns remove candidates (subset of active connections in connectionContainer).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateBatchTransactionTask()

thread::Task catapult::extensions::CreateBatchTransactionTask ( TransactionBatchRangeDispatcher dispatcher,
const std::string &  name 
)

Creates a task with name that dispatches all transactions batched in dispatcher.

Here is the call graph for this function:

◆ CreateBlockPushEntityCallback()

BlockRangeConsumerFunc catapult::extensions::CreateBlockPushEntityCallback ( const ServerHooks hooks)

Creates a block push entity callback from hooks that only pushes when synced.

Here is the call graph for this function:

◆ CreateChainSyncAwareSynchronizerTaskCallback()

template<typename TRemoteApi , typename TRemoteApiFactory >
thread::TaskCallback catapult::extensions::CreateChainSyncAwareSynchronizerTaskCallback ( chain::RemoteNodeSynchronizer< TRemoteApi > &&  synchronizer,
TRemoteApiFactory  remoteApiFactory,
net::PacketIoPicker packetIoPicker,
const extensions::ServiceState state,
const std::string &  taskName 
)

Creates a synchronizer task callback for synchronizer named taskName that requires the local chain to be synced. packetIoPicker is used to select peers and remoteApiFactory wraps an api around peers. state provides additional service information.

Here is the call graph for this function:

◆ CreateConnectPeersTask() [1/2]

thread::Task catapult::extensions::CreateConnectPeersTask ( const SelectorSettings settings,
net::PacketWriters packetWriters 
)

Creates a task for the specified service that connects to nodes with the specified role given settings and packetWriters.

Here is the call graph for this function:

◆ CreateConnectPeersTask() [2/2]

thread::Task catapult::extensions::CreateConnectPeersTask ( const SelectorSettings settings,
net::PacketWriters packetWriters,
const NodeSelector selector 
)

Creates a task for the specified service that connects to nodes given settings, packetWriters and selector.

Note
selector returns add candidates (subset of compatible nodes in nodes) and remove candidates (subset of active connections in packetWriters).
Here is the call graph for this function:

◆ CreateExecutionConfiguration()

chain::ExecutionConfiguration catapult::extensions::CreateExecutionConfiguration ( const plugins::PluginManager pluginManager)

Creates an execution configuration based on pluginManager.

Here is the call graph for this function:

◆ CreateHashCheckOptions()

consumers::HashCheckOptions catapult::extensions::CreateHashCheckOptions ( const utils::TimeSpan cacheDuration,
const config::NodeConfiguration nodeConfig 
)

Creates hash check options based on cacheDuration and nodeConfig.

Here is the call graph for this function:

◆ CreateNodeAger()

NodeAger catapult::extensions::CreateNodeAger ( ionet::ServiceIdentifier  serviceId,
const config::NodeConfiguration::ConnectionsSubConfiguration config,
ionet::NodeContainer nodes 
)

Creates and prepares a node ager that ages all serviceId connections in nodes given config.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateNodeSelector()

NodeSelector catapult::extensions::CreateNodeSelector ( const SelectorSettings settings)

Creates and prepares a node selector given settings.

Note
All nodes are provisioned for specified service id.
The selector is intended to be used in conjunction with CreateConnectPeersTask for managing outgoing connections.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreatePushEntitySink() [1/2]

template<typename TSink >
TSink catapult::extensions::CreatePushEntitySink ( const extensions::ServiceLocator locator,
const std::string &  serviceName 
)

Creates a sink that pushes entities using a service identified by serviceName in locator.

Here is the call graph for this function:

◆ CreatePushEntitySink() [2/2]

template<typename TSink >
TSink catapult::extensions::CreatePushEntitySink ( const extensions::ServiceLocator locator,
const std::string &  serviceName,
ionet::PacketType  packetType 
)

Creates a sink that pushes entities using packetType and a service identified by serviceName in locator.

Here is the call graph for this function:

◆ CreateRemoteDiagnosticApi()

std::unique_ptr< RemoteDiagnosticApi > catapult::extensions::CreateRemoteDiagnosticApi ( ionet::PacketIo io)

Creates a diagnostic api for interacting with a remote node with the specified io.

◆ CreateRemoveOnlyNodeSelector()

RemoveOnlyNodeSelector catapult::extensions::CreateRemoveOnlyNodeSelector ( const SelectorSettings settings)

Creates and prepares a remove-only node selector given settings.

Note
The selector is intended to be used in conjunction with CreateAgePeersTask for managing incoming connections.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateStatelessValidator()

std::unique_ptr< const validators::stateless::AggregateEntityValidator > catapult::extensions::CreateStatelessValidator ( const plugins::PluginManager manager)

Creates an entity stateless validator using pluginManager.

Here is the call graph for this function:

◆ CreateStorageConfiguration()

plugins::StorageConfiguration catapult::extensions::CreateStorageConfiguration ( const config::CatapultConfiguration config)

Creates plugin storage configuration from config.

◆ CreateSynchronizerTaskCallback()

template<typename TRemoteApi , typename TRemoteApiFactory >
thread::TaskCallback catapult::extensions::CreateSynchronizerTaskCallback ( chain::RemoteNodeSynchronizer< TRemoteApi > &&  synchronizer,
TRemoteApiFactory  remoteApiFactory,
net::PacketIoPicker packetIoPicker,
const extensions::ServiceState state,
const std::string &  taskName 
)

Creates a synchronizer task callback for synchronizer named taskName that does not require the local chain to be synced. packetIoPicker is used to select peers and remoteApiFactory wraps an api around peers. state provides additional service information.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateTransactionPushEntityCallback()

TransactionRangeConsumerFunc catapult::extensions::CreateTransactionPushEntityCallback ( const ServerHooks hooks)

Creates a transaction push entity callback from hooks that only pushes when synced.

Here is the call graph for this function:

◆ CreateUndoEntityObserver()

std::unique_ptr< const observers::EntityObserver > catapult::extensions::CreateUndoEntityObserver ( const plugins::PluginManager manager)

Creates an undo entity observer using pluginManager.

Here is the call graph for this function:

◆ DECLARE_OBSERVER()

catapult::extensions::DECLARE_OBSERVER ( NemesisFunding  ,
model::BalanceTransferNotification   
) const &

Observer that observes balance transfers and:

  1. calculates information about the nemesis block in fundingState
  2. ensures all transfers are initiated by nemesisPublicKey
  3. funds the nemesis account, if appropriate
    Note
    This observer is stateful and can only be used in conjunction with NemesisBlockLoader.

◆ DEFINE_EXTENSION_RESULT() [1/2]

catapult::extensions::DEFINE_EXTENSION_RESULT ( Partial_Transaction_Cache_Prune  ,
 
)

Validation failed because the partial transaction was pruned from the temporal cache.

◆ DEFINE_EXTENSION_RESULT() [2/2]

catapult::extensions::DEFINE_EXTENSION_RESULT ( Partial_Transaction_Dependency_Removed  ,
 
)

Validation failed because the partial transaction was pruned from the temporal cache due to its dependency being removed.

◆ GenerateMosaicAliasId()

UnresolvedMosaicId catapult::extensions::GenerateMosaicAliasId ( const RawString name)

Generates a mosaic id given mosaic alias name.

Here is the call graph for this function:

◆ GenerateNamespacePath()

NamespacePath catapult::extensions::GenerateNamespacePath ( const RawString name)

Parses a unified namespace name into a path.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetConnectionSettings()

net::ConnectionSettings catapult::extensions::GetConnectionSettings ( const config::CatapultConfiguration config)

Extracts connection settings from config.

Here is the caller graph for this function:

◆ GetMaxIncomingConnectionsPerIdentity()

uint32_t catapult::extensions::GetMaxIncomingConnectionsPerIdentity ( ionet::NodeRoles  roles)

Gets the maximum number of incoming connections per identity as specified by roles.

◆ GetUtCacheOptions()

cache::MemoryCacheOptions catapult::extensions::GetUtCacheOptions ( const config::NodeConfiguration config)

Extracts unconfirmed transactions cache options from config.

Here is the call graph for this function:

◆ HasSerializedState()

bool catapult::extensions::HasSerializedState ( const config::CatapultDirectory directory)

Returns true if serialized state is present in directory.

◆ IncrementNodeInteraction()

void catapult::extensions::IncrementNodeInteraction ( ionet::NodeContainer nodes,
const ionet::NodeInteractionResult result 
)

Increments the interaction counter indicated by result in the node container (nodes).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ LoadStateFromDirectory()

StateHeights catapult::extensions::LoadStateFromDirectory ( const config::CatapultDirectory directory,
const LocalNodeStateRef stateRef,
const plugins::PluginManager pluginManager 
)

Loads catapult state into stateRef from directory given pluginManager.

◆ Require()

template<typename TFunc >
const TFunc& catapult::extensions::Require ( const TFunc &  func)

Returns func if and only if it is set.

Here is the caller graph for this function:

◆ Rooted()

DECLARE_SERVICE_REGISTRAR() catapult::extensions::Rooted ( const std::shared_ptr< void > &  pService,
const std::string &  serviceName,
ServiceRegistrarPhase  phase 
)

Creates a rooted service registrar that runs during the specified registration phase and simply registers pService as a rooted service with name serviceName.

◆ SaveStateToDirectoryWithCheckpointing()

void catapult::extensions::SaveStateToDirectoryWithCheckpointing ( const config::CatapultDataDirectory dataDirectory,
const config::NodeConfiguration nodeConfig,
const cache::CatapultCache cache,
const state::CatapultState state,
const model::ChainScore score 
)

Serializes state composed of cache, state and score with checkpointing to dataDirectory given nodeConfig.

◆ SelectCandidatesBasedOnWeight()

ionet::NodeSet catapult::extensions::SelectCandidatesBasedOnWeight ( const WeightedCandidates candidates,
uint64_t  totalCandidateWeight,
size_t  maxCandidates 
)

Finds at most maxCandidates add candidates from container candidates given a total candidate weight (totalCandidateWeight).

◆ SelectNodes()

NodeSelectionResult catapult::extensions::SelectNodes ( const ionet::NodeContainer nodes,
const NodeSelectionConfiguration config,
const ImportanceRetriever importanceRetriever 
)

Selects the subset of nodes to activate and deactivate according to config and importanceRetriever.

Note
This function is intended for management of outgoing connections.
Here is the caller graph for this function:

◆ SelectNodesForRemoval()

utils::KeySet catapult::extensions::SelectNodesForRemoval ( const ionet::NodeContainer nodes,
const NodeAgingConfiguration config,
const ImportanceRetriever importanceRetriever 
)

Selects the subset of nodes to deactivate according to config and importanceRetriever.

Note
This function is intended for management of incoming connections.
Here is the caller graph for this function:

◆ SetOnce()

template<typename TFunc >
void catapult::extensions::SetOnce ( TFunc &  dest,
const TFunc &  source 
)

Sets dest to source if and only if dest is unset.

Here is the caller graph for this function:

◆ SubscriberToSink()

chain::FailedTransactionSink catapult::extensions::SubscriberToSink ( subscribers::TransactionStatusSubscriber subscriber)

Converts subscriber to a sink.

Here is the call graph for this function:

◆ UpdateAsyncTcpServerSettings()

void catapult::extensions::UpdateAsyncTcpServerSettings ( net::AsyncTcpServerSettings settings,
const config::CatapultConfiguration config 
)

Updates settings with values in config.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ fundingState

NemesisFundingState & catapult::extensions::fundingState