Kagome
Polkadot Runtime Engine in C++17
kagome::application::ChainSpec Class Referenceabstract

#include <chain_spec.hpp>

Inheritance diagram for kagome::application::ChainSpec:
Collaboration diagram for kagome::application::ChainSpec:

Public Member Functions

virtual ~ChainSpec ()=default
 
virtual const std::string & name () const =0
 
virtual const std::string & id () const =0
 
virtual const std::string & chainType () const =0
 
virtual const std::vector< libp2p::multi::Multiaddress > & bootNodes () const =0
 Return ids of peer nodes of the current node. More...
 
virtual const std::vector< std::pair< std::string, size_t > > & telemetryEndpoints () const =0
 
virtual const std::string & protocolId () const =0
 
virtual const std::map< std::string, std::string > & properties () const =0
 
virtual std::optional< std::reference_wrapper< const std::string > > getProperty (const std::string &property) const =0
 
virtual const std::set< primitives::BlockHash > & forkBlocks () const =0
 
virtual const std::set< primitives::BlockHash > & badBlocks () const =0
 
virtual std::optional< std::string > consensusEngine () const =0
 
virtual outcome::result< common::BufferfetchCodeSubstituteByBlockInfo (const primitives::BlockInfo &block_info) const =0
 
virtual std::shared_ptr< const primitives::CodeSubstituteBlockIdscodeSubstitutes () const =0
 
virtual const GenesisRawDatagetGenesisTopSection () const =0
 
virtual const ChildrenDefaultRawDatagetGenesisChildrenDefaultSection () const =0
 
bool idStartsWith (std::string_view prefix) const
 
bool isKusama () const
 
bool isRococo () const
 
bool isWococo () const
 
bool isVersi () const
 

Detailed Description

Stores configuration of a kagome node and provides convenience methods for accessing config parameters

Definition at line 25 of file chain_spec.hpp.

Constructor & Destructor Documentation

virtual kagome::application::ChainSpec::~ChainSpec ( )
virtualdefault

Member Function Documentation

virtual const std::set<primitives::BlockHash>& kagome::application::ChainSpec::badBlocks ( ) const
pure virtual
virtual const std::vector<libp2p::multi::Multiaddress>& kagome::application::ChainSpec::bootNodes ( ) const
pure virtual

Return ids of peer nodes of the current node.

Implemented in kagome::application::ChainSpecImpl.

virtual const std::string& kagome::application::ChainSpec::chainType ( ) const
pure virtual
virtual std::shared_ptr<const primitives::CodeSubstituteBlockIds> kagome::application::ChainSpec::codeSubstitutes ( ) const
pure virtual
Returns
runtime code substitution map

Implemented in kagome::application::ChainSpecImpl.

virtual std::optional<std::string> kagome::application::ChainSpec::consensusEngine ( ) const
pure virtual
virtual outcome::result<common::Buffer> kagome::application::ChainSpec::fetchCodeSubstituteByBlockInfo ( const primitives::BlockInfo block_info) const
pure virtual

Fetches code_substitute from json config on demand, by its BlockInfo. BlockInfo is being compared with BlockIds that were loaded on initial configuration and stored in set.

Implemented in kagome::application::ChainSpecImpl.

virtual const std::set<primitives::BlockHash>& kagome::application::ChainSpec::forkBlocks ( ) const
pure virtual
virtual const ChildrenDefaultRawData& kagome::application::ChainSpec::getGenesisChildrenDefaultSection ( ) const
pure virtual
Returns
childrenDefault section

Implemented in kagome::application::ChainSpecImpl.

virtual const GenesisRawData& kagome::application::ChainSpec::getGenesisTopSection ( ) const
pure virtual
Returns
top section

Implemented in kagome::application::ChainSpecImpl.

virtual std::optional<std::reference_wrapper<const std::string> > kagome::application::ChainSpec::getProperty ( const std::string &  property) const
pure virtual
virtual const std::string& kagome::application::ChainSpec::id ( ) const
pure virtual
bool kagome::application::ChainSpec::idStartsWith ( std::string_view  prefix) const
inline

Definition at line 78 of file chain_spec.hpp.

bool kagome::application::ChainSpec::isKusama ( ) const
inline

Definition at line 82 of file chain_spec.hpp.

bool kagome::application::ChainSpec::isRococo ( ) const
inline

Definition at line 86 of file chain_spec.hpp.

bool kagome::application::ChainSpec::isVersi ( ) const
inline

Definition at line 94 of file chain_spec.hpp.

bool kagome::application::ChainSpec::isWococo ( ) const
inline

Definition at line 90 of file chain_spec.hpp.

virtual const std::string& kagome::application::ChainSpec::name ( ) const
pure virtual
virtual const std::map<std::string, std::string>& kagome::application::ChainSpec::properties ( ) const
pure virtual
virtual const std::string& kagome::application::ChainSpec::protocolId ( ) const
pure virtual
virtual const std::vector<std::pair<std::string, size_t> >& kagome::application::ChainSpec::telemetryEndpoints ( ) const
pure virtual

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