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

#include "application.hpp"

Collaboration diagram for Irohad:
Collaboration graph

Public Types

using RunResult = iroha::expected::Result< void, std::string >
 

Public Member Functions

 Irohad (const boost::optional< std::string > &block_store_dir, std::unique_ptr< iroha::ametsuchi::PostgresOptions > pg_opt, const std::string &listen_ip, size_t torii_port, size_t internal_port, size_t max_proposal_size, std::chrono::milliseconds proposal_delay, std::chrono::milliseconds vote_delay, std::chrono::minutes mst_expiration_time, const shared_model::crypto::Keypair &keypair, std::chrono::milliseconds max_rounds_delay, size_t stale_stream_max_rounds, boost::optional< shared_model::interface::types::PeerList > opt_alternative_peers, logger::LoggerManagerTreePtr logger_manager, const boost::optional< iroha::GossipPropagationStrategyParams > &opt_mst_gossip_params=boost::none, const boost::optional< iroha::torii::TlsParams > &torii_tls_params=boost::none, boost::optional< IrohadConfig::InterPeerTls > inter_peer_tls_config=boost::none)
 
virtual RunResult init ()
 
RunResult restoreWsv ()
 
virtual void dropStorage ()
 
RunResult run ()
 
virtual ~Irohad ()
 

Public Attributes

shared_model::crypto::Keypair keypair
 
std::shared_ptr< iroha::ametsuchi::Storagestorage
 

Protected Member Functions

virtual RunResult initStorage (std::unique_ptr< iroha::ametsuchi::PostgresOptions > pg_opt)
 
RunResult initTlsCredentials ()
 
virtual RunResult initCryptoProvider ()
 
virtual RunResult initBatchParser ()
 
virtual RunResult initValidators ()
 
virtual RunResult initNetworkClient ()
 
virtual RunResult initFactories ()
 
virtual RunResult initPersistentCache ()
 
virtual RunResult initOrderingGate ()
 
virtual RunResult initSimulator ()
 
virtual RunResult initConsensusCache ()
 
virtual RunResult initBlockLoader ()
 
virtual RunResult initConsensusGate ()
 
virtual RunResult initSynchronizer ()
 
virtual RunResult initPeerCommunicationService ()
 
virtual RunResult initStatusBus ()
 
virtual RunResult initMstProcessor ()
 
virtual RunResult initPendingTxsStorage ()
 
virtual RunResult initTransactionCommandService ()
 
virtual RunResult initQueryService ()
 
virtual RunResult initSettings ()
 
virtual RunResult initValidatorsConfigs ()
 
virtual RunResult initWsvRestorer ()
 

Protected Attributes

const boost::optional< std::string > block_store_dir_
 
const std::string listen_ip_
 
size_t torii_port_
 
boost::optional< iroha::torii::TlsParamstorii_tls_params_
 
size_t internal_port_
 
size_t max_proposal_size_
 
std::chrono::milliseconds proposal_delay_
 
std::chrono::milliseconds vote_delay_
 
bool is_mst_supported_
 
std::chrono::minutes mst_expiration_time_
 
std::chrono::milliseconds max_rounds_delay_
 
size_t stale_stream_max_rounds_
 
const boost::optional< shared_model::interface::types::PeerListopt_alternative_peers_
 
boost::optional< iroha::GossipPropagationStrategyParamsopt_mst_gossip_params_
 
boost::optional< IrohadConfig::InterPeerTlsinter_peer_tls_config_
 
boost::optional< std::shared_ptr< const iroha::network::TlsCredentials > > my_inter_peer_tls_creds_
 
boost::optional< std::shared_ptr< const iroha::network::TlsCredentials > > torii_tls_creds_
 
std::unique_ptr< iroha::PendingTransactionStorageInitpending_txs_storage_init
 
std::shared_ptr< iroha::PendingTransactionStoragepending_txs_storage_
 
std::shared_ptr< shared_model::interface::QueryResponseFactoryquery_response_factory_
 
iroha::network::OnDemandOrderingInit ordering_init
 
std::unique_ptr< iroha::consensus::yac::YacInityac_init
 
iroha::network::BlockLoaderInit loader_init
 
std::shared_ptr< iroha::ametsuchi::PoolWrapperpool_wrapper_
 
std::shared_ptr< const shared_model::validation::Settingssettings_
 
std::shared_ptr< iroha::ametsuchi::WsvRestorerwsv_restorer_
 
std::shared_ptr< shared_model::crypto::AbstractCryptoModelSigner< shared_model::interface::Block > > crypto_signer_
 
std::shared_ptr< shared_model::interface::TransactionBatchParserbatch_parser
 
std::shared_ptr< shared_model::validation::ValidatorsConfigvalidators_config_
 
std::shared_ptr< shared_model::validation::ValidatorsConfigproposal_validators_config_
 
std::shared_ptr< shared_model::validation::ValidatorsConfigblock_validators_config_
 
std::shared_ptr< iroha::validation::StatefulValidatorstateful_validator
 
std::shared_ptr< iroha::validation::ChainValidatorchain_validator
 
std::shared_ptr< iroha::network::AsyncGrpcClient< google::protobuf::Empty > > async_call_
 
std::shared_ptr< shared_model::interface::TransactionBatchFactorytransaction_batch_factory_
 
std::shared_ptr< shared_model::interface::AbstractTransportFactory< shared_model::interface::Transaction, iroha::protocol::Transaction > > transaction_factory
 
std::shared_ptr< shared_model::interface::AbstractTransportFactory< shared_model::interface::Query, iroha::protocol::Query > > query_factory
 
std::shared_ptr< shared_model::interface::AbstractTransportFactory< shared_model::interface::BlocksQuery, iroha::protocol::BlocksQuery > > blocks_query_factory
 
std::shared_ptr< iroha::ametsuchi::TxPresenceCachepersistent_cache
 
std::shared_ptr< shared_model::interface::AbstractTransportFactory< shared_model::interface::Proposal, iroha::protocol::Proposal > > proposal_factory
 
std::shared_ptr< iroha::network::OrderingGateordering_gate
 
std::shared_ptr< iroha::simulator::Simulatorsimulator
 
std::shared_ptr< iroha::consensus::ConsensusResultCacheconsensus_result_cache_
 
std::shared_ptr< iroha::network::BlockLoaderblock_loader
 
std::shared_ptr< iroha::synchronizer::Synchronizersynchronizer
 
std::shared_ptr< iroha::network::PeerCommunicationServicepcs
 
std::shared_ptr< iroha::torii::StatusBusstatus_bus_
 
std::shared_ptr< iroha::network::MstTransportmst_transport
 
std::shared_ptr< iroha::MstProcessormst_processor
 
std::shared_ptr< iroha::torii::CommandServicecommand_service
 
std::shared_ptr< iroha::torii::CommandServiceTransportGrpccommand_service_transport
 
std::shared_ptr< iroha::torii::QueryServicequery_service
 
std::shared_ptr< iroha::network::ConsensusGateconsensus_gate
 
rxcpp::composite_subscription consensus_gate_objects_lifetime
 
rxcpp::subjects::subject< iroha::consensus::GateObjectconsensus_gate_objects
 
rxcpp::composite_subscription consensus_gate_events_subscription
 
std::unique_ptr< iroha::network::ServerRunnertorii_server
 
boost::optional< std::unique_ptr< iroha::network::ServerRunner > > torii_tls_server = boost::none
 
std::unique_ptr< iroha::network::ServerRunnerinternal_server
 
logger::LoggerManagerTreePtr log_manager_
 application root log manager More...
 
logger::LoggerPtr log_
 log for local messages More...
 

Member Typedef Documentation

using Irohad::RunResult = iroha::expected::Result<void, std::string>

Constructor & Destructor Documentation

Irohad::Irohad ( const boost::optional< std::string > &  block_store_dir,
std::unique_ptr< iroha::ametsuchi::PostgresOptions pg_opt,
const std::string &  listen_ip,
size_t  torii_port,
size_t  internal_port,
size_t  max_proposal_size,
std::chrono::milliseconds  proposal_delay,
std::chrono::milliseconds  vote_delay,
std::chrono::minutes  mst_expiration_time,
const shared_model::crypto::Keypair keypair,
std::chrono::milliseconds  max_rounds_delay,
size_t  stale_stream_max_rounds,
boost::optional< shared_model::interface::types::PeerList opt_alternative_peers,
logger::LoggerManagerTreePtr  logger_manager,
const boost::optional< iroha::GossipPropagationStrategyParams > &  opt_mst_gossip_params = boost::none,
const boost::optional< iroha::torii::TlsParams > &  torii_tls_params = boost::none,
boost::optional< IrohadConfig::InterPeerTls inter_peer_tls_config = boost::none 
)

Constructor that initializes common iroha pipeline

Parameters
block_store_dir- folder where blocks will be stored
pg_opt- connection options for PostgresSQL
listen_ip- ip address for opening ports (internal & torii)
torii_port- port for torii binding
internal_port- port for internal communication - ordering service, consensus, and block loader
max_proposal_size- maximum transactions that possible appears in one proposal
proposal_delay- maximum waiting time util emitting new proposal
vote_delay- waiting time before sending vote to next peer
mst_expiration_time- maximum time until until MST transaction is not considered as expired (in minutes)
keypair- public and private keys for crypto signer
max_rounds_delay- maximum delay between consecutive rounds without transactions
stale_stream_max_rounds- maximum number of rounds between consecutive status emissions
opt_alternative_peers- optional alternative initial peers list
logger_manager- the logger manager to use
opt_mst_gossip_params- parameters for Gossip MST propagation (optional). If not provided, disables mst processing support TODO mboldyrev 03.11.2018 IR-1844 Refactor the constructor.
torii_tls_params- optional TLS params for torii.
See also
iroha::torii::TlsParams
Parameters
inter_peer_tls_config- set up TLS in peer-to-peer communication

Configuring iroha daemon

Here is the call graph for this function:

Irohad::~Irohad ( )
virtual

Member Function Documentation

void Irohad::dropStorage ( )
virtual

Drop wsv and block store

Dropping iroha daemon storage

Irohad::RunResult Irohad::init ( )
virtual

Initialization of whole objects in system

Initializing iroha daemon

Here is the call graph for this function:

Irohad::RunResult Irohad::initBatchParser ( )
protectedvirtual

Here is the caller graph for this function:

Irohad::RunResult Irohad::initBlockLoader ( )
protectedvirtual

Initializing block loader

Here is the call graph for this function:

Here is the caller graph for this function:

Irohad::RunResult Irohad::initConsensusCache ( )
protectedvirtual

Initializing consensus block cache

Here is the caller graph for this function:

Irohad::RunResult Irohad::initConsensusGate ( )
protectedvirtual

Initializing consensus gate

Here is the caller graph for this function:

Irohad::RunResult Irohad::initCryptoProvider ( )
protectedvirtual

Initializing crypto provider

Here is the caller graph for this function:

Irohad::RunResult Irohad::initFactories ( )
protectedvirtual

Here is the caller graph for this function:

Irohad::RunResult Irohad::initMstProcessor ( )
protectedvirtual

Here is the call graph for this function:

Here is the caller graph for this function:

Irohad::RunResult Irohad::initNetworkClient ( )
protectedvirtual

Initializing network client

Here is the caller graph for this function:

Irohad::RunResult Irohad::initOrderingGate ( )
protectedvirtual

Initializing ordering gate

Here is the call graph for this function:

Here is the caller graph for this function:

Irohad::RunResult Irohad::initPeerCommunicationService ( )
protectedvirtual

Initializing peer communication service

Here is the caller graph for this function:

Irohad::RunResult Irohad::initPendingTxsStorage ( )
protectedvirtual

Here is the caller graph for this function:

Irohad::RunResult Irohad::initPersistentCache ( )
protectedvirtual

Initializing persistent cache

Here is the caller graph for this function:

Irohad::RunResult Irohad::initQueryService ( )
protectedvirtual

Initializing query command service

Here is the caller graph for this function:

Irohad::RunResult Irohad::initSettings ( )
protectedvirtual

Initializing setting query

Here is the caller graph for this function:

Irohad::RunResult Irohad::initSimulator ( )
protectedvirtual

Initializing iroha verified proposal creator and block creator

Here is the caller graph for this function:

Irohad::RunResult Irohad::initStatusBus ( )
protectedvirtual

Here is the caller graph for this function:

Irohad::RunResult Irohad::initStorage ( std::unique_ptr< iroha::ametsuchi::PostgresOptions pg_opt)
protectedvirtual

Initializing iroha daemon storage

Here is the call graph for this function:

Here is the caller graph for this function:

Irohad::RunResult Irohad::initSynchronizer ( )
protectedvirtual

Initializing synchronizer

Here is the caller graph for this function:

Irohad::RunResult Irohad::initTlsCredentials ( )
protected

Initializing own TLS credentials.

Here is the caller graph for this function:

Irohad::RunResult Irohad::initTransactionCommandService ( )
protectedvirtual

Initializing transaction command service

Here is the caller graph for this function:

Irohad::RunResult Irohad::initValidators ( )
protectedvirtual

Initializing validators

Here is the call graph for this function:

Here is the caller graph for this function:

Irohad::RunResult Irohad::initValidatorsConfigs ( )
protectedvirtual

Initializing validators' configs

Here is the caller graph for this function:

Irohad::RunResult Irohad::initWsvRestorer ( )
protectedvirtual

Initialize WSV restorer

Here is the caller graph for this function:

Irohad::RunResult Irohad::restoreWsv ( )

Restore World State View

Returns
void value on success, error message otherwise

Here is the caller graph for this function:

Irohad::RunResult Irohad::run ( )

Run worker threads for start performing

Returns
void value on success, error message otherwise

Run iroha daemon

Member Data Documentation

std::shared_ptr<iroha::network::AsyncGrpcClient<google::protobuf::Empty> > Irohad::async_call_
protected
std::shared_ptr<shared_model::interface::TransactionBatchParser> Irohad::batch_parser
protected
std::shared_ptr<iroha::network::BlockLoader> Irohad::block_loader
protected
const boost::optional<std::string> Irohad::block_store_dir_
protected
std::shared_ptr<shared_model::validation::ValidatorsConfig> Irohad::block_validators_config_
protected
std::shared_ptr<shared_model::interface::AbstractTransportFactory< shared_model::interface::BlocksQuery, iroha::protocol::BlocksQuery> > Irohad::blocks_query_factory
protected
std::shared_ptr<iroha::validation::ChainValidator> Irohad::chain_validator
protected
std::shared_ptr<iroha::torii::CommandService> Irohad::command_service
protected
std::shared_ptr<iroha::torii::CommandServiceTransportGrpc> Irohad::command_service_transport
protected
std::shared_ptr<iroha::network::ConsensusGate> Irohad::consensus_gate
protected
rxcpp::composite_subscription Irohad::consensus_gate_events_subscription
protected
rxcpp::subjects::subject<iroha::consensus::GateObject> Irohad::consensus_gate_objects
protected
rxcpp::composite_subscription Irohad::consensus_gate_objects_lifetime
protected
std::shared_ptr<iroha::consensus::ConsensusResultCache> Irohad::consensus_result_cache_
protected
std::shared_ptr<shared_model::crypto::AbstractCryptoModelSigner< shared_model::interface::Block> > Irohad::crypto_signer_
protected
boost::optional<IrohadConfig::InterPeerTls> Irohad::inter_peer_tls_config_
protected
size_t Irohad::internal_port_
protected
std::unique_ptr<iroha::network::ServerRunner> Irohad::internal_server
protected
bool Irohad::is_mst_supported_
protected
const std::string Irohad::listen_ip_
protected
iroha::network::BlockLoaderInit Irohad::loader_init
protected
logger::LoggerPtr Irohad::log_
protected

log for local messages

logger::LoggerManagerTreePtr Irohad::log_manager_
protected

application root log manager

size_t Irohad::max_proposal_size_
protected
std::chrono::milliseconds Irohad::max_rounds_delay_
protected
std::chrono::minutes Irohad::mst_expiration_time_
protected
std::shared_ptr<iroha::MstProcessor> Irohad::mst_processor
protected
std::shared_ptr<iroha::network::MstTransport> Irohad::mst_transport
protected
boost::optional<std::shared_ptr<const iroha::network::TlsCredentials> > Irohad::my_inter_peer_tls_creds_
protected
const boost::optional<shared_model::interface::types::PeerList> Irohad::opt_alternative_peers_
protected
boost::optional<iroha::GossipPropagationStrategyParams> Irohad::opt_mst_gossip_params_
protected
std::shared_ptr<iroha::network::OrderingGate> Irohad::ordering_gate
protected
iroha::network::OnDemandOrderingInit Irohad::ordering_init
protected
std::shared_ptr<iroha::network::PeerCommunicationService> Irohad::pcs
protected
std::shared_ptr<iroha::PendingTransactionStorage> Irohad::pending_txs_storage_
protected
std::unique_ptr<iroha::PendingTransactionStorageInit> Irohad::pending_txs_storage_init
protected
std::shared_ptr<iroha::ametsuchi::TxPresenceCache> Irohad::persistent_cache
protected
std::shared_ptr<iroha::ametsuchi::PoolWrapper> Irohad::pool_wrapper_
protected
std::chrono::milliseconds Irohad::proposal_delay_
protected
std::shared_ptr<shared_model::interface::AbstractTransportFactory< shared_model::interface::Proposal, iroha::protocol::Proposal> > Irohad::proposal_factory
protected
std::shared_ptr<shared_model::validation::ValidatorsConfig> Irohad::proposal_validators_config_
protected
std::shared_ptr<shared_model::interface::AbstractTransportFactory< shared_model::interface::Query, iroha::protocol::Query> > Irohad::query_factory
protected
std::shared_ptr<shared_model::interface::QueryResponseFactory> Irohad::query_response_factory_
protected
std::shared_ptr<iroha::torii::QueryService> Irohad::query_service
protected
std::shared_ptr<const shared_model::validation::Settings> Irohad::settings_
protected
std::shared_ptr<iroha::simulator::Simulator> Irohad::simulator
protected
size_t Irohad::stale_stream_max_rounds_
protected
std::shared_ptr<iroha::validation::StatefulValidator> Irohad::stateful_validator
protected
std::shared_ptr<iroha::torii::StatusBus> Irohad::status_bus_
protected
std::shared_ptr<iroha::ametsuchi::Storage> Irohad::storage
std::shared_ptr<iroha::synchronizer::Synchronizer> Irohad::synchronizer
protected
size_t Irohad::torii_port_
protected
std::unique_ptr<iroha::network::ServerRunner> Irohad::torii_server
protected
boost::optional<std::shared_ptr<const iroha::network::TlsCredentials> > Irohad::torii_tls_creds_
protected
boost::optional<iroha::torii::TlsParams> Irohad::torii_tls_params_
protected
boost::optional<std::unique_ptr<iroha::network::ServerRunner> > Irohad::torii_tls_server = boost::none
protected
std::shared_ptr<shared_model::interface::TransactionBatchFactory> Irohad::transaction_batch_factory_
protected
std::shared_ptr<shared_model::interface::AbstractTransportFactory< shared_model::interface::Transaction, iroha::protocol::Transaction> > Irohad::transaction_factory
protected
std::shared_ptr<shared_model::validation::ValidatorsConfig> Irohad::validators_config_
protected
std::chrono::milliseconds Irohad::vote_delay_
protected
std::shared_ptr<iroha::ametsuchi::WsvRestorer> Irohad::wsv_restorer_
protected
std::unique_ptr<iroha::consensus::yac::YacInit> Irohad::yac_init
protected

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