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

#include "on_demand_ordering_init.hpp"

Collaboration diagram for iroha::ordering::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< shared_model::interface::AbstractTransportFactory< shared_model::interface::Transaction, iroha::protocol::Transaction >> 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::shared_ptr< ProposalCreationStrategy > creation_strategy, logger::LoggerManagerTreePtr ordering_log_manager, std::shared_ptr< iroha::network::GenericClientFactory > client_factory)
 

Public Attributes

std::shared_ptr< grpc::Service > service
 gRPC service for ordering service More...
 
rxcpp::subjects::subject< synchronizer::SynchronizationEventsync_event_notifier
 commit notifier from peer communication service More...
 
rxcpp::subjects::subject< std::shared_ptr< shared_model::interface::Block const > > commit_notifier
 

Detailed Description

Encapsulates initialization logic for on-demand ordering gate and service

Member Typedef Documentation

◆ TransportFactoryType

Constructor & Destructor Documentation

◆ OnDemandOrderingInit()

OnDemandOrderingInit::OnDemandOrderingInit ( logger::LoggerPtr  log)

Constructor.

Parameters
log- the logger to use for internal messages.

◆ ~OnDemandOrderingInit()

OnDemandOrderingInit::~OnDemandOrderingInit ( )

Member Function Documentation

◆ initOrderingGate()

std::shared_ptr< iroha::network::OrderingGate > OnDemandOrderingInit::initOrderingGate ( size_t  max_number_of_transactions,
std::chrono::milliseconds  delay,
std::vector< shared_model::interface::types::HashType initial_hashes,
std::shared_ptr< shared_model::interface::AbstractTransportFactory< shared_model::interface::Transaction, iroha::protocol::Transaction >>  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::shared_ptr< ProposalCreationStrategy creation_strategy,
logger::LoggerManagerTreePtr  ordering_log_manager,
std::shared_ptr< iroha::network::GenericClientFactory client_factory 
)

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
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
creation_strategy- provides a strategy for creating proposals in OS
client_factory- a factory of client stubs
Returns
initialized ordering gate
Here is the caller graph for this function:

Member Data Documentation

◆ commit_notifier

rxcpp::subjects::subject< std::shared_ptr<shared_model::interface::Block const> > iroha::ordering::OnDemandOrderingInit::commit_notifier

◆ service

std::shared_ptr<grpc::Service> iroha::ordering::OnDemandOrderingInit::service

gRPC service for ordering service

◆ sync_event_notifier

rxcpp::subjects::subject<synchronizer::SynchronizationEvent> iroha::ordering::OnDemandOrderingInit::sync_event_notifier

commit notifier from peer communication service


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