hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::network::OnDemandOrderingInit Class Reference

#include "on_demand_ordering_init.hpp"

Collaboration diagram for iroha::network::OnDemandOrderingInit:
Collaboration graph

Public Types

using TransportFactoryType = shared_model::interface::AbstractTransportFactory< shared_model::interface::Proposal, iroha::protocol::Proposal >
 

Public Member Functions

 OnDemandOrderingInit (logger::LoggerPtr log)
 
 ~OnDemandOrderingInit ()
 
std::shared_ptr< network::OrderingGateinitOrderingGate (size_t max_number_of_transactions, std::chrono::milliseconds delay, std::vector< shared_model::interface::types::HashType > initial_hashes, std::shared_ptr< ametsuchi::PeerQueryFactory > peer_query_factory, std::shared_ptr< ordering::transport::OnDemandOsServerGrpc::TransportFactoryType > transaction_factory, std::shared_ptr< shared_model::interface::TransactionBatchParser > batch_parser, std::shared_ptr< shared_model::interface::TransactionBatchFactory > transaction_batch_factory, std::shared_ptr< network::AsyncGrpcClient< google::protobuf::Empty >> async_call, std::shared_ptr< shared_model::interface::UnsafeProposalFactory > proposal_factory, std::shared_ptr< TransportFactoryType > proposal_transport_factory, std::shared_ptr< ametsuchi::TxPresenceCache > tx_cache, std::function< std::chrono::milliseconds(const synchronizer::SynchronizationEvent &)> delay_func, logger::LoggerManagerTreePtr ordering_log_manager)
 

Public Attributes

std::shared_ptr< ordering::proto::OnDemandOrdering::Service > service
 gRPC service for ordering service More...
 
rxcpp::subjects::subject< decltype(std::declval< PeerCommunicationService >).onSynchronization())::value_type > sync_event_notifier
 commit notifier from peer communication service More...
 
rxcpp::subjects::subject< decltype(std::declval< iroha::ametsuchi::Storage >).on_commit())::value_type > commit_notifier
 

Detailed Description

Encapsulates initialization logic for on-demand ordering gate and service

Member Typedef Documentation

Constructor & Destructor Documentation

iroha::network::OnDemandOrderingInit::OnDemandOrderingInit ( logger::LoggerPtr  log)

Constructor.

Parameters
log- the logger to use for internal messages.

Here is the call graph for this function:

iroha::network::OnDemandOrderingInit::~OnDemandOrderingInit ( )

Member Function Documentation

std::shared_ptr< iroha::network::OrderingGate > iroha::network::OnDemandOrderingInit::initOrderingGate ( size_t  max_number_of_transactions,
std::chrono::milliseconds  delay,
std::vector< shared_model::interface::types::HashType initial_hashes,
std::shared_ptr< ametsuchi::PeerQueryFactory peer_query_factory,
std::shared_ptr< ordering::transport::OnDemandOsServerGrpc::TransportFactoryType transaction_factory,
std::shared_ptr< shared_model::interface::TransactionBatchParser batch_parser,
std::shared_ptr< shared_model::interface::TransactionBatchFactory transaction_batch_factory,
std::shared_ptr< network::AsyncGrpcClient< google::protobuf::Empty >>  async_call,
std::shared_ptr< shared_model::interface::UnsafeProposalFactory proposal_factory,
std::shared_ptr< TransportFactoryType proposal_transport_factory,
std::shared_ptr< ametsuchi::TxPresenceCache tx_cache,
std::function< std::chrono::milliseconds(const synchronizer::SynchronizationEvent &)>  delay_func,
logger::LoggerManagerTreePtr  ordering_log_manager 
)

Initializes on-demand ordering gate and ordering sevice components

Parameters
max_number_of_transactionsmaximum number of transactions in a proposal
delaytimeout for ordering service response on proposal request
initial_hashesseeds for peer list permutations for first k rounds they are required since hash of block i defines round i + k
peer_query_factoryfactory for getLedgerPeers query required by connection manager
transaction_factorytransport factory for transactions required by ordering service network endpoint
batch_parsertransaction batch parser required by ordering service network endpoint
transaction_batch_factorytransport factory for transaction batch candidates produced by parser
async_callasynchronous gRPC client required for sending batches requests to ordering service and processing responses
proposal_factoryfactory required by ordering service to produce proposals
Returns
initialized ordering gate

Here is the caller graph for this function:

Member Data Documentation

rxcpp::subjects::subject<decltype( std::declval<iroha::ametsuchi::Storage>).on_commit())::value_type> iroha::network::OnDemandOrderingInit::commit_notifier
std::shared_ptr<ordering::proto::OnDemandOrdering::Service> iroha::network::OnDemandOrderingInit::service

gRPC service for ordering service

rxcpp::subjects::subject<decltype(std::declval<PeerCommunicationService>) .onSynchronization())::value_type> iroha::network::OnDemandOrderingInit::sync_event_notifier

commit notifier from peer communication service


The documentation for this class was generated from the following files: