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
 
App & operator= (const App &)=delete
 
App & operator= (App &&)=delete
 
void init (const cli::Config &cli_conf)
 
void start ()
 
FullNodeConfig & getMutableConfig ()
 
const FullNodeConfig & getConfig () const
 
std::shared_ptr< Network > getNetwork () const
 
std::shared_ptr< TransactionManager > getTransactionManager () const
 
std::shared_ptr< DagManager > getDagManager () const
 
std::shared_ptr< DbStorage > getDB () const
 
std::shared_ptr< PbftManager > getPbftManager () const
 
std::shared_ptr< VoteManager > getVoteManager () const
 
std::shared_ptr< PbftChain > getPbftChain () const
 
std::shared_ptr< final_chain::FinalChain > getFinalChain () const
 
std::shared_ptr< metrics::MetricsService > getMetrics () const
 
std::shared_ptr< DagBlockProposer > getDagBlockProposer () const
 
std::shared_ptr< GasPricer > getGasPricer () const
 
std::shared_ptr< pillar_chain::PillarChainManager > getPillarChainManager () 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< Plugin > getPlugin (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
 
void scheduleLoggingConfigUpdate ()
 
- Public Member Functions inherited from taraxa::AppBase
 AppBase ()
 
virtual ~AppBase ()=default
 
const dev::Address & getAddress () 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::ThreadPool > subscription_pool_ = std::make_shared<util::ThreadPool>(1)
 
util::ThreadPool config_update_executor_ {1}
 
std::shared_ptr< DbStorage > db_
 
std::shared_ptr< DbStorage > old_db_
 
std::shared_ptr< GasPricer > gas_pricer_
 
std::shared_ptr< DagManager > dag_mgr_
 
std::shared_ptr< TransactionManager > trx_mgr_
 
std::shared_ptr< Network > network_
 
std::shared_ptr< DagBlockProposer > dag_block_proposer_
 
std::shared_ptr< VoteManager > vote_mgr_
 
std::shared_ptr< PbftManager > pbft_mgr_
 
std::shared_ptr< PbftChain > pbft_chain_
 
std::shared_ptr< pillar_chain::PillarChainManager > pillar_chain_mgr_
 
std::shared_ptr< KeyManager > key_manager_
 
std::shared_ptr< final_chain::FinalChain > final_chain_
 
std::shared_ptr< metrics::MetricsService > metrics_
 
std::map< std::string, std::shared_ptr< Plugin > > active_plugins_
 
std::map< std::string, std::shared_ptr< Plugin > > available_plugins_
 

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.

◆ getMutableConfig()

FullNodeConfig & taraxa::App::getMutableConfig ( )
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
virtual

Implements taraxa::AppBase.

◆ getPlugin() [2/2]

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

Implements taraxa::AppBase.

◆ 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

◆ scheduleLoggingConfigUpdate()

void taraxa::App::scheduleLoggingConfigUpdate ( )

◆ 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

◆ 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: