TARAXA
Loading...
Searching...
No Matches
taraxa::App Class Reference

#include <app.hpp>

Collaboration diagram for taraxa::App:

Public Member Functions

 App ()
 
virtual ~App ()
 
 App (const App &)=delete
 
 App (App &&)=delete
 
Appoperator= (const App &)=delete
 
Appoperator= (App &&)=delete
 
void init (const cli::Config &cli_conf)
 
void start ()
 
const FullNodeConfiggetConfig () const
 
std::shared_ptr< NetworkgetNetwork () const
 
std::shared_ptr< TransactionManagergetTransactionManager () const
 
std::shared_ptr< DagManagergetDagManager () const
 
std::shared_ptr< DbStoragegetDB () const
 
std::shared_ptr< PbftManagergetPbftManager () const
 
std::shared_ptr< VoteManagergetVoteManager () const
 
std::shared_ptr< PbftChaingetPbftChain () const
 
std::shared_ptr< final_chain::FinalChaingetFinalChain () const
 
std::shared_ptr< metrics::MetricsServicegetMetrics () const
 
std::shared_ptr< DagBlockProposergetDagBlockProposer () const
 
std::shared_ptr< GasPricergetGasPricer () const
 
std::shared_ptr< pillar_chain::PillarChainManagergetPillarChainManager () const
 
void rebuildDb ()
 
void initialize (const std::filesystem::path &data_dir, std::shared_ptr< boost::program_options::variables_map > options) const
 
template<typename PluginType >
std::shared_ptr< PluginType > registerPlugin (cli::Config &cli_conf)
 
std::string registeredPlugins () const
 
std::shared_ptr< PlugingetPlugin (const std::string &name) const
 
template<typename PluginType >
std::shared_ptr< PluginType > getPlugin (const std::string &name) const
 
void addAvailablePlugin (std::shared_ptr< Plugin > plugin)
 
void enablePlugin (const std::string &name)
 
bool isPluginEnabled (const std::string &name) const
 
- Public Member Functions inherited from taraxa::AppBase
 AppBase ()
 
virtual ~AppBase ()=default
 
const dev::AddressgetAddress () const
 
const Secret & getSecretKey () const
 
vrf_wrapper::vrf_sk_t getVrfSecretKey () const
 
bool isStarted () const
 

Private Member Functions

void close ()
 
void setupMetricsUpdaters ()
 Method that is used to register metrics updaters. So we don't need to pass metrics classes instances in other classes.
 

Private Attributes

std::shared_ptr< util::ThreadPoolsubscription_pool_ = std::make_shared<util::ThreadPool>(1)
 
util::ThreadPool config_update_executor_ {1}
 
std::shared_ptr< DbStoragedb_
 
std::shared_ptr< DbStorageold_db_
 
std::shared_ptr< GasPricergas_pricer_
 
std::shared_ptr< DagManagerdag_mgr_
 
std::shared_ptr< TransactionManagertrx_mgr_
 
std::shared_ptr< Networknetwork_
 
std::shared_ptr< DagBlockProposerdag_block_proposer_
 
std::shared_ptr< VoteManagervote_mgr_
 
std::shared_ptr< PbftManagerpbft_mgr_
 
std::shared_ptr< PbftChainpbft_chain_
 
std::shared_ptr< pillar_chain::PillarChainManagerpillar_chain_mgr_
 
std::shared_ptr< KeyManagerkey_manager_
 
std::shared_ptr< final_chain::FinalChainfinal_chain_
 
std::shared_ptr< metrics::MetricsServicemetrics_
 
std::map< std::string, std::shared_ptr< Plugin > > active_plugins_
 
std::map< std::string, std::shared_ptr< Plugin > > available_plugins_
 
logger::Logger logger_
 

Additional Inherited Members

- Protected Attributes inherited from taraxa::AppBase
FullNodeConfig conf_
 
std::atomic_bool started_ = 0
 
std::atomic_bool stopped_ = true
 

Constructor & Destructor Documentation

◆ App() [1/3]

taraxa::App::App ( )

◆ ~App()

taraxa::App::~App ( )
virtual

◆ App() [2/3]

taraxa::App::App ( const App )
delete

◆ App() [3/3]

taraxa::App::App ( App &&  )
delete

Member Function Documentation

◆ addAvailablePlugin()

void taraxa::App::addAvailablePlugin ( std::shared_ptr< Plugin plugin)

◆ close()

void taraxa::App::close ( )
private

◆ enablePlugin()

void taraxa::App::enablePlugin ( const std::string &  name)

◆ getConfig()

const FullNodeConfig & taraxa::App::getConfig ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getDagBlockProposer()

std::shared_ptr< DagBlockProposer > taraxa::App::getDagBlockProposer ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getDagManager()

std::shared_ptr< DagManager > taraxa::App::getDagManager ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getDB()

std::shared_ptr< DbStorage > taraxa::App::getDB ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getFinalChain()

std::shared_ptr< final_chain::FinalChain > taraxa::App::getFinalChain ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getGasPricer()

std::shared_ptr< GasPricer > taraxa::App::getGasPricer ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getMetrics()

std::shared_ptr< metrics::MetricsService > taraxa::App::getMetrics ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getNetwork()

std::shared_ptr< Network > taraxa::App::getNetwork ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getPbftChain()

std::shared_ptr< PbftChain > taraxa::App::getPbftChain ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getPbftManager()

std::shared_ptr< PbftManager > taraxa::App::getPbftManager ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getPillarChainManager()

std::shared_ptr< pillar_chain::PillarChainManager > taraxa::App::getPillarChainManager ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getPlugin() [1/2]

std::shared_ptr< Plugin > taraxa::App::getPlugin ( const std::string &  name) const

◆ getPlugin() [2/2]

template<typename PluginType >
std::shared_ptr< PluginType > taraxa::App::getPlugin ( const std::string &  name) const
inline

◆ getTransactionManager()

std::shared_ptr< TransactionManager > taraxa::App::getTransactionManager ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ getVoteManager()

std::shared_ptr< VoteManager > taraxa::App::getVoteManager ( ) const
inlinevirtual

Implements taraxa::AppBase.

◆ init()

void taraxa::App::init ( const cli::Config cli_conf)

◆ initialize()

void taraxa::App::initialize ( const std::filesystem::path &  data_dir,
std::shared_ptr< boost::program_options::variables_map >  options 
) const

◆ isPluginEnabled()

bool taraxa::App::isPluginEnabled ( const std::string &  name) const

◆ operator=() [1/2]

App & taraxa::App::operator= ( App &&  )
delete

◆ operator=() [2/2]

App & taraxa::App::operator= ( const App )
delete

◆ rebuildDb()

void taraxa::App::rebuildDb ( )

◆ registeredPlugins()

std::string taraxa::App::registeredPlugins ( ) const
inline

◆ registerPlugin()

template<typename PluginType >
std::shared_ptr< PluginType > taraxa::App::registerPlugin ( cli::Config cli_conf)
inline

◆ setupMetricsUpdaters()

void taraxa::App::setupMetricsUpdaters ( )
private

Method that is used to register metrics updaters. So we don't need to pass metrics classes instances in other classes.

◆ start()

void taraxa::App::start ( )
virtual

Implements taraxa::AppBase.

Member Data Documentation

◆ active_plugins_

std::map<std::string, std::shared_ptr<Plugin> > taraxa::App::active_plugins_
private

◆ available_plugins_

std::map<std::string, std::shared_ptr<Plugin> > taraxa::App::available_plugins_
private

◆ config_update_executor_

util::ThreadPool taraxa::App::config_update_executor_ {1}
private

◆ dag_block_proposer_

std::shared_ptr<DagBlockProposer> taraxa::App::dag_block_proposer_
private

◆ dag_mgr_

std::shared_ptr<DagManager> taraxa::App::dag_mgr_
private

◆ db_

std::shared_ptr<DbStorage> taraxa::App::db_
private

◆ final_chain_

std::shared_ptr<final_chain::FinalChain> taraxa::App::final_chain_
private

◆ gas_pricer_

std::shared_ptr<GasPricer> taraxa::App::gas_pricer_
private

◆ key_manager_

std::shared_ptr<KeyManager> taraxa::App::key_manager_
private

◆ logger_

logger::Logger taraxa::App::logger_
private

◆ metrics_

std::shared_ptr<metrics::MetricsService> taraxa::App::metrics_
private

◆ network_

std::shared_ptr<Network> taraxa::App::network_
private

◆ old_db_

std::shared_ptr<DbStorage> taraxa::App::old_db_
private

◆ pbft_chain_

std::shared_ptr<PbftChain> taraxa::App::pbft_chain_
private

◆ pbft_mgr_

std::shared_ptr<PbftManager> taraxa::App::pbft_mgr_
private

◆ pillar_chain_mgr_

std::shared_ptr<pillar_chain::PillarChainManager> taraxa::App::pillar_chain_mgr_
private

◆ subscription_pool_

std::shared_ptr<util::ThreadPool> taraxa::App::subscription_pool_ = std::make_shared<util::ThreadPool>(1)
private

◆ trx_mgr_

std::shared_ptr<TransactionManager> taraxa::App::trx_mgr_
private

◆ vote_mgr_

std::shared_ptr<VoteManager> taraxa::App::vote_mgr_
private

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