CatapultServer
v0.5.0.1 (Elephant)
|
Classes | |
class | BlockChainLoader |
class | Broker |
Represents a broker. More... | |
class | CatapultSystemState |
Catapult system state. More... | |
class | LocalNode |
Represents a local node. More... | |
class | LocalNodeCounterValue |
class | NemesisBlockNotifier |
Raises nemesis block notifications. More... | |
class | ProcessHost |
Catapult process host. More... | |
class | RecoveryOrchestrator |
Represents a recovery orchestrator. More... | |
Typedefs | |
using | NotificationObserverFactory = supplier< std::unique_ptr< const observers::NotificationObserver > > |
A notification observer factory. More... | |
using | BlockDependentNotificationObserverFactory = std::function< std::unique_ptr< const observers::NotificationObserver >(const model::Block &)> |
A block dependent notification observer factory. More... | |
using | CacheChangesStorages = std::vector< std::unique_ptr< const cache::CacheChangesStorage > > |
Vector of cache changes storage unique pointers. More... | |
using | LocalNodeCounterValues = std::vector< LocalNodeCounterValue > |
Container of local node counter values. More... | |
Functions | |
std::unique_ptr< Broker > | CreateBroker (std::unique_ptr< extensions::ProcessBootstrapper > &&pBootstrapper) |
Creates and boots a broker around the specified bootstrapper (pBootstrapper). More... | |
std::vector< plugins::PluginModule > | LoadAllPlugins (extensions::ProcessBootstrapper &bootstrapper) |
Loads all plugins using bootstrapper. More... | |
template<typename THost , typename... TArgs> | |
std::unique_ptr< THost > | CreateAndBootHost (TArgs &&... args) |
Creates and boots a host with args. More... | |
BlockDependentNotificationObserverFactory | CreateBlockDependentNotificationObserverFactory (const model::Block &lastBlock, const model::BlockChainConfiguration &config, const NotificationObserverFactory &transientObserverFactory, const NotificationObserverFactory &permanentObserverFactory) |
model::ChainScore | LoadBlockChain (const BlockDependentNotificationObserverFactory &observerFactory, const plugins::PluginManager &pluginManager, const extensions::LocalNodeStateRef &stateRef, Height startHeight) |
std::unique_ptr< RecoveryOrchestrator > | CreateRecoveryOrchestrator (std::unique_ptr< extensions::ProcessBootstrapper > &&pBootstrapper) |
Creates and boots a recovery orchestrator around the specified bootstrapper (pBootstrapper). More... | |
std::unique_ptr< io::BlockStorage > | CreateReadOnlyStorageAdapter (const io::BlockStorage &storage) |
Creates non-owning read-only storage around storage. More... | |
void | RepairSpooling (const config::CatapultDataDirectory &dataDirectory, consumers::CommitOperationStep commitStep) |
Repairs catapult spooling folders inside dataDirectory given last server commit operation step that succeeded (commitStep). More... | |
void | RepairState (const config::CatapultDirectory &stateChangeDirectory, const cache::CatapultCache &catapultCache, subscribers::StateChangeSubscriber ®isteredSubscriber, subscribers::StateChangeSubscriber &repairSubscriber) |
std::unique_ptr< subscribers::StateChangeSubscriber > | CreateStateChangeRepairingSubscriber (cache::CatapultCache &cache, extensions::LocalNodeChainScore &localNodeScore) |
Creates state change repairing subscriber around cache and localNodeScore. More... | |
Height | FindStartHeight (const io::BlockStorage &storage) |
Returns starting height of storage. More... | |
std::unique_ptr< subscribers::StateChangeSubscriber > | CreateFileStateChangeStorage (std::unique_ptr< io::OutputStream > &&pOutputStream, const supplier< CacheChangesStorages > &cacheChangesStoragesSupplier) |
std::unique_ptr< LocalNode > | CreateLocalNode (const crypto::KeyPair &keyPair, std::unique_ptr< extensions::ProcessBootstrapper > &&pBootstrapper) |
Creates and boots a local node around the specified key pair (keyPair) and bootstrapper (pBootstrapper). More... | |
void | AddMemoryCounters (std::vector< utils::DiagnosticCounter > &counters) |
Adds process memory counters to counters. More... | |
void | SeedNodeContainer (ionet::NodeContainer &nodes, const extensions::ProcessBootstrapper &bootstrapper) |
Seeds nodes with node information from bootstrapper. More... | |
std::unique_ptr< subscribers::NodeSubscriber > | CreateNodeContainerSubscriberAdapter (ionet::NodeContainer &nodes) |
Adapts nodes to a node subscriber. More... | |
using catapult::local::BlockDependentNotificationObserverFactory = typedef std::function<std::unique_ptr<const observers::NotificationObserver> (const model::Block&)> |
A block dependent notification observer factory.
using catapult::local::CacheChangesStorages = typedef std::vector<std::unique_ptr<const cache::CacheChangesStorage> > |
Vector of cache changes storage unique pointers.
using catapult::local::LocalNodeCounterValues = typedef std::vector<LocalNodeCounterValue> |
Container of local node counter values.
using catapult::local::NotificationObserverFactory = typedef supplier<std::unique_ptr<const observers::NotificationObserver> > |
A notification observer factory.
void catapult::local::AddMemoryCounters | ( | std::vector< utils::DiagnosticCounter > & | counters | ) |
Adds process memory counters to counters.
std::unique_ptr<THost> catapult::local::CreateAndBootHost | ( | TArgs &&... | args | ) |
Creates and boots a host with args.
BlockDependentNotificationObserverFactory catapult::local::CreateBlockDependentNotificationObserverFactory | ( | const model::Block & | lastBlock, |
const model::BlockChainConfiguration & | config, | ||
const NotificationObserverFactory & | transientObserverFactory, | ||
const NotificationObserverFactory & | permanentObserverFactory | ||
) |
Creates a block dependent notification observer factory that calculates an inflection point from lastBlock and config. Prior to the inflection point, an observer created by permanentObserverFactory is returned. At and after the inflection point, an observer created by transientObserverFactory is returned.
std::unique_ptr< Broker > catapult::local::CreateBroker | ( | std::unique_ptr< extensions::ProcessBootstrapper > && | pBootstrapper | ) |
Creates and boots a broker around the specified bootstrapper (pBootstrapper).
std::unique_ptr< subscribers::StateChangeSubscriber > catapult::local::CreateFileStateChangeStorage | ( | std::unique_ptr< io::OutputStream > && | pOutputStream, |
const supplier< CacheChangesStorages > & | cacheChangesStoragesSupplier | ||
) |
Creates a state change storage around pOutputStream using cacheChangesStoragesSupplier for creating storages used for serialization.
std::unique_ptr< LocalNode > catapult::local::CreateLocalNode | ( | const crypto::KeyPair & | keyPair, |
std::unique_ptr< extensions::ProcessBootstrapper > && | pBootstrapper | ||
) |
Creates and boots a local node around the specified key pair (keyPair) and bootstrapper (pBootstrapper).
std::unique_ptr< subscribers::NodeSubscriber > catapult::local::CreateNodeContainerSubscriberAdapter | ( | ionet::NodeContainer & | nodes | ) |
Adapts nodes to a node subscriber.
std::unique_ptr< io::BlockStorage > catapult::local::CreateReadOnlyStorageAdapter | ( | const io::BlockStorage & | storage | ) |
Creates non-owning read-only storage around storage.
std::unique_ptr< RecoveryOrchestrator > catapult::local::CreateRecoveryOrchestrator | ( | std::unique_ptr< extensions::ProcessBootstrapper > && | pBootstrapper | ) |
Creates and boots a recovery orchestrator around the specified bootstrapper (pBootstrapper).
std::unique_ptr< subscribers::StateChangeSubscriber > catapult::local::CreateStateChangeRepairingSubscriber | ( | cache::CatapultCache & | cache, |
extensions::LocalNodeChainScore & | localNodeScore | ||
) |
Creates state change repairing subscriber around cache and localNodeScore.
Height catapult::local::FindStartHeight | ( | const io::BlockStorage & | storage | ) |
Returns starting height of storage.
std::vector< plugins::PluginModule > catapult::local::LoadAllPlugins | ( | extensions::ProcessBootstrapper & | bootstrapper | ) |
Loads all plugins using bootstrapper.
model::ChainScore catapult::local::LoadBlockChain | ( | const BlockDependentNotificationObserverFactory & | observerFactory, |
const plugins::PluginManager & | pluginManager, | ||
const extensions::LocalNodeStateRef & | stateRef, | ||
Height | startHeight | ||
) |
Loads a block chain from storage using the supplied observer factory (observerFactory) and plugin manager (pluginManager) and updating stateRef starting with the block at startHeight.
void catapult::local::RepairSpooling | ( | const config::CatapultDataDirectory & | dataDirectory, |
consumers::CommitOperationStep | commitStep | ||
) |
Repairs catapult spooling folders inside dataDirectory given last server commit operation step that succeeded (commitStep).
void catapult::local::RepairState | ( | const config::CatapultDirectory & | stateChangeDirectory, |
const cache::CatapultCache & | catapultCache, | ||
subscribers::StateChangeSubscriber & | registeredSubscriber, | ||
subscribers::StateChangeSubscriber & | repairSubscriber | ||
) |
Repairs state in stateChangeDirectory using catapultCache given registered subscriber (registeredSubscriber) and repair subscriber (repairSubscriber).
void catapult::local::SeedNodeContainer | ( | ionet::NodeContainer & | nodes, |
const extensions::ProcessBootstrapper & | bootstrapper | ||
) |
Seeds nodes with node information from bootstrapper.