CatapultServer
v0.5.0.1 (Elephant)
|
Classes | |
class | BasicProducer |
A base class for producers. More... | |
class | BatchHandlerFactory |
Factory for creating a handler that returns batch of entities. More... | |
class | CacheEntryInfosProducerFactory |
Cache entry infos producer factory. More... | |
struct | HeightRequestInfo |
Information about a height request. More... | |
class | HeightRequestProcessor |
Helper for processing height requests. More... | |
struct | PullBlocksHandlerConfiguration |
Configuration for pull blocks handler. More... | |
Typedefs | |
using | NodeConsumer = consumer< const ionet::Node & > |
Consumes a node. More... | |
using | NodesConsumer = consumer< const ionet::NodeSet & > |
Consumes multiple nodes. More... | |
using | NodesSupplier = supplier< ionet::NodeSet > |
Supplies nodes. More... | |
using | CosignatureRangeHandler = RangeHandler< model::DetachedCosignature > |
Prototype for a function that processes a range of detached cosignatures. More... | |
using | ConfirmedTimestampedHashesProducerFactory = RawPointerProducerFactory< state::TimestampedHash, state::TimestampedHash > |
Alias for creating a confirmed timestamped hashes producer given a range of hashes. More... | |
template<typename KeyType > | |
using | CacheEntryInfoProducer = supplier< std::shared_ptr< const model::CacheEntryInfo< KeyType > >> |
Cache entry info producer. More... | |
template<typename TEntity > | |
using | RangeHandler = consumer< model::AnnotatedEntityRange< TEntity > && > |
A handler for processing an annotated entity range. More... | |
using | BlockRangeHandler = RangeHandler< model::Block > |
Prototype for a function that processes a range of blocks. More... | |
using | TransactionRangeHandler = RangeHandler< model::Transaction > |
Prototype for a function that processes a range of transactions. More... | |
template<typename TIdentifier , typename TEntity > | |
using | SharedPointerProducerFactory = std::function< supplier< std::shared_ptr< const TEntity > >(const model::EntityRange< TIdentifier > &)> |
Accepts a range and returns a producer that produces specified shared pointer elements. More... | |
template<typename TIdentifier , typename TEntity > | |
using | RawPointerProducerFactory = std::function< supplier< const TEntity * >(const model::EntityRange< TIdentifier > &)> |
Accepts a range and returns a producer that produces specified raw pointer elements. More... | |
using | UnconfirmedTransactions = std::vector< std::shared_ptr< const model::Transaction > > |
Transactions returned by the unconfirmed transactions retriever. More... | |
using | UtRetriever = std::function< UnconfirmedTransactions(BlockFeeMultiplier, const utils::ShortHashesSet &)> |
Prototype for a function that retrieves unconfirmed transactions given a set of short hashes. More... | |
Functions | |
void | RegisterNodeDiscoveryPushPingHandler (ionet::ServerPacketHandlers &handlers, model::NetworkIdentifier networkIdentifier, const NodeConsumer &nodeConsumer) |
void | RegisterNodeDiscoveryPullPingHandler (ionet::ServerPacketHandlers &handlers, const std::shared_ptr< const ionet::NetworkNode > &pLocalNode) |
void | RegisterNodeDiscoveryPushPeersHandler (ionet::ServerPacketHandlers &handlers, const NodesConsumer &nodesConsumer) |
Registers a node discovery push peers handler in handlers that forwards received nodes to nodesConsumer. More... | |
void | RegisterNodeDiscoveryPullPeersHandler (ionet::ServerPacketHandlers &handlers, const NodesSupplier &nodesSupplier) |
Registers a node discovery pull peers handler in handlers that responds with nodes from nodesSupplier. More... | |
void | RegisterPushCosignaturesHandler (ionet::ServerPacketHandlers &handlers, const CosignatureRangeHandler &cosignatureRangeHandler) |
Registers a push cosignatures handler in handlers that forwards cosignatures to cosignatureRangeHandler. More... | |
void | RegisterPushPartialTransactionsHandler (ionet::ServerPacketHandlers &handlers, const model::TransactionRegistry ®istry, const TransactionRangeHandler &transactionRangeHandler) |
void | RegisterPullPartialTransactionInfosHandler (ionet::ServerPacketHandlers &handlers, const CosignedTransactionInfosRetriever &transactionInfosRetriever) |
void | RegisterTimeSyncNetworkTimeHandler (ionet::ServerPacketHandlers &handlers, const extensions::ExtensionManager::NetworkTimeSupplier &networkTimeSupplier) |
Registers a time sync network time handler in handlers that responds with communication timestamps using networkTimeSupplier. More... | |
ConfirmedTimestampedHashesProducerFactory | CreateConfirmedTimestampedHashesProducerFactory (const cache::HashCache &hashCache) |
Creates a confirmed timestamped hashes producer factory around hashCache. More... | |
void | RegisterConfirmTimestampedHashesHandler (ionet::ServerPacketHandlers &handlers, const ConfirmedTimestampedHashesProducerFactory &confirmedTimestampedHashesProducerFactory) |
void | RegisterPushBlockHandler (ionet::ServerPacketHandlers &handlers, const model::TransactionRegistry ®istry, const BlockRangeHandler &blockRangeHandler) |
void | RegisterPullBlockHandler (ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage) |
Registers a pull block handler in handlers that responds with a block in storage. More... | |
void | RegisterChainInfoHandler (ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage, const model::ChainScoreSupplier &chainScoreSupplier) |
void | RegisterBlockHashesHandler (ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage, uint32_t maxHashes) |
Registers a block hashes handler in handlers that responds with at most maxHashes hashes in storage. More... | |
void | RegisterPullBlocksHandler (ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage, const PullBlocksHandlerConfiguration &config) |
void | RegisterDiagnosticCountersHandler (ionet::ServerPacketHandlers &handlers, const std::vector< utils::DiagnosticCounter > &counters) |
Registers a diagnostic counters handler in handlers that responds with the current values of counters. More... | |
void | RegisterDiagnosticNodesHandler (ionet::ServerPacketHandlers &handlers, const ionet::NodeContainer &nodeContainer) |
Registers a diagnostic nodes handler in handlers that responds with info about all (active) partner nodes in nodeContainer. More... | |
void | RegisterDiagnosticBlockStatementHandler (ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage) |
Registers a diagnostic block statement handler in handlers that responds with data from storage. More... | |
template<typename TEntity > | |
auto | CreatePushEntityHandler (const model::TransactionRegistry ®istry, const RangeHandler< TEntity > &rangeHandler) |
void | RegisterSubCacheMerkleRootsHandler (ionet::ServerPacketHandlers &handlers, const io::BlockStorageCache &storage) |
template<typename TPacket , typename TCache > | |
void | RegisterStatePathHandler (ionet::ServerPacketHandlers &handlers, const TCache &cache) |
Registers a handler in handlers that responds with serialized state path produced by querying cache. More... | |
void | RegisterPushTransactionsHandler (ionet::ServerPacketHandlers &handlers, const model::TransactionRegistry ®istry, const TransactionRangeHandler &transactionRangeHandler) |
void | RegisterPullTransactionsHandler (ionet::ServerPacketHandlers &handlers, const UtRetriever &utRetriever) |
using catapult::handlers::BlockRangeHandler = typedef RangeHandler<model::Block> |
Prototype for a function that processes a range of blocks.
using catapult::handlers::CacheEntryInfoProducer = typedef supplier<std::shared_ptr<const model::CacheEntryInfo<KeyType> >> |
Cache entry info producer.
using catapult::handlers::ConfirmedTimestampedHashesProducerFactory = typedef RawPointerProducerFactory<state::TimestampedHash, state::TimestampedHash> |
Alias for creating a confirmed timestamped hashes producer given a range of hashes.
using catapult::handlers::CosignatureRangeHandler = typedef RangeHandler<model::DetachedCosignature> |
Prototype for a function that processes a range of detached cosignatures.
using catapult::handlers::NodeConsumer = typedef consumer<const ionet::Node&> |
Consumes a node.
using catapult::handlers::NodesConsumer = typedef consumer<const ionet::NodeSet&> |
Consumes multiple nodes.
using catapult::handlers::NodesSupplier = typedef supplier<ionet::NodeSet> |
Supplies nodes.
using catapult::handlers::RangeHandler = typedef consumer<model::AnnotatedEntityRange<TEntity>&&> |
A handler for processing an annotated entity range.
using catapult::handlers::RawPointerProducerFactory = typedef std::function<supplier<const TEntity*> (const model::EntityRange<TIdentifier>&)> |
Accepts a range and returns a producer that produces specified raw pointer elements.
using catapult::handlers::SharedPointerProducerFactory = typedef std::function<supplier<std::shared_ptr<const TEntity> > (const model::EntityRange<TIdentifier>&)> |
Accepts a range and returns a producer that produces specified shared pointer elements.
using catapult::handlers::TransactionRangeHandler = typedef RangeHandler<model::Transaction> |
Prototype for a function that processes a range of transactions.
using catapult::handlers::UnconfirmedTransactions = typedef std::vector<std::shared_ptr<const model::Transaction> > |
Transactions returned by the unconfirmed transactions retriever.
using catapult::handlers::UtRetriever = typedef std::function<UnconfirmedTransactions (BlockFeeMultiplier, const utils::ShortHashesSet&)> |
Prototype for a function that retrieves unconfirmed transactions given a set of short hashes.
ConfirmedTimestampedHashesProducerFactory catapult::handlers::CreateConfirmedTimestampedHashesProducerFactory | ( | const cache::HashCache & | hashCache | ) |
Creates a confirmed timestamped hashes producer factory around hashCache.
auto catapult::handlers::CreatePushEntityHandler | ( | const model::TransactionRegistry & | registry, |
const RangeHandler< TEntity > & | rangeHandler | ||
) |
Creates a push handler that forwards a received entity range to rangeHandler given a registry composed of supported transaction types.
void catapult::handlers::RegisterBlockHashesHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const io::BlockStorageCache & | storage, | ||
uint32_t | maxHashes | ||
) |
Registers a block hashes handler in handlers that responds with at most maxHashes hashes in storage.
void catapult::handlers::RegisterChainInfoHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const io::BlockStorageCache & | storage, | ||
const model::ChainScoreSupplier & | chainScoreSupplier | ||
) |
Registers a chain info handler in handlers that responds with the height of the chain in storage and the score of the chain returned by chainScoreSupplier.
void catapult::handlers::RegisterConfirmTimestampedHashesHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const ConfirmedTimestampedHashesProducerFactory & | confirmedTimestampedHashesProducerFactory | ||
) |
Registers a confirm timestamped hashes handler in handlers that responds with timestamped hashes not filtered by a producer from confirmedTimestampedHashesProducerFactory.
void catapult::handlers::RegisterDiagnosticBlockStatementHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const io::BlockStorageCache & | storage | ||
) |
Registers a diagnostic block statement handler in handlers that responds with data from storage.
void catapult::handlers::RegisterDiagnosticCountersHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const std::vector< utils::DiagnosticCounter > & | counters | ||
) |
Registers a diagnostic counters handler in handlers that responds with the current values of counters.
void catapult::handlers::RegisterDiagnosticNodesHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const ionet::NodeContainer & | nodeContainer | ||
) |
Registers a diagnostic nodes handler in handlers that responds with info about all (active) partner nodes in nodeContainer.
void catapult::handlers::RegisterNodeDiscoveryPullPeersHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const NodesSupplier & | nodesSupplier | ||
) |
Registers a node discovery pull peers handler in handlers that responds with nodes from nodesSupplier.
void catapult::handlers::RegisterNodeDiscoveryPullPingHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const std::shared_ptr< const ionet::NetworkNode > & | pLocalNode | ||
) |
Registers a node discovery pull ping handler in handlers that responds with pLocalNode.
void catapult::handlers::RegisterNodeDiscoveryPushPeersHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const NodesConsumer & | nodesConsumer | ||
) |
Registers a node discovery push peers handler in handlers that forwards received nodes to nodesConsumer.
void catapult::handlers::RegisterNodeDiscoveryPushPingHandler | ( | ionet::ServerPacketHandlers & | handlers, |
model::NetworkIdentifier | networkIdentifier, | ||
const NodeConsumer & | nodeConsumer | ||
) |
Registers a node discovery push ping handler in handlers that forwards node information to nodeConsumer given the current network identifier (networkIdentifier).
void catapult::handlers::RegisterPullBlockHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const io::BlockStorageCache & | storage | ||
) |
Registers a pull block handler in handlers that responds with a block in storage.
void catapult::handlers::RegisterPullBlocksHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const io::BlockStorageCache & | storage, | ||
const PullBlocksHandlerConfiguration & | config | ||
) |
Registers a pull blocks handler in handlers that responds with blocks from storage according to behavior specified in config.
void catapult::handlers::RegisterPullPartialTransactionInfosHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const partialtransaction::CosignedTransactionInfosRetriever & | transactionInfosRetriever | ||
) |
Registers a pull partial transactions handler in handlers that responds with partial transactions returned by the retriever (transactionInfosRetriever).
void catapult::handlers::RegisterPullTransactionsHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const UtRetriever & | utRetriever | ||
) |
Registers a pull transactions handler in handlers that responds with unconfirmed transactions returned by the retriever (utRetriever).
void catapult::handlers::RegisterPushBlockHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const model::TransactionRegistry & | registry, | ||
const BlockRangeHandler & | blockRangeHandler | ||
) |
Registers a push block handler in handlers that validates a block and, if valid, forwards it to blockRangeHandler given a registry composed of known transactions.
void catapult::handlers::RegisterPushCosignaturesHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const CosignatureRangeHandler & | cosignatureRangeHandler | ||
) |
Registers a push cosignatures handler in handlers that forwards cosignatures to cosignatureRangeHandler.
void catapult::handlers::RegisterPushPartialTransactionsHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const model::TransactionRegistry & | registry, | ||
const TransactionRangeHandler & | transactionRangeHandler | ||
) |
Registers a push partial transactions handler in handlers that forwards transactions to transactionRangeHandler given a registry composed of known transactions.
void catapult::handlers::RegisterPushTransactionsHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const model::TransactionRegistry & | registry, | ||
const TransactionRangeHandler & | transactionRangeHandler | ||
) |
Registers a push transactions handler in handlers that forwards transactions to transactionRangeHandler given a registry composed of known transactions.
void catapult::handlers::RegisterStatePathHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const TCache & | cache | ||
) |
Registers a handler in handlers that responds with serialized state path produced by querying cache.
void catapult::handlers::RegisterSubCacheMerkleRootsHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const io::BlockStorageCache & | storage | ||
) |
Registers a sub cache merkle roots handler in handlers that responds with the sub cache merkle roots at a specified height from storage.
void catapult::handlers::RegisterTimeSyncNetworkTimeHandler | ( | ionet::ServerPacketHandlers & | handlers, |
const extensions::ExtensionManager::NetworkTimeSupplier & | networkTimeSupplier | ||
) |
Registers a time sync network time handler in handlers that responds with communication timestamps using networkTimeSupplier.