TARAXA
Loading...
Searching...
No Matches
taraxa Namespace Reference

Namespaces

namespace  cli
 
namespace  final_chain
 
namespace  logger
 
namespace  metrics
 
namespace  net
 
namespace  network
 
namespace  pillar_chain
 
namespace  plugin
 
namespace  rewards
 
namespace  state_api
 
namespace  storage
 
namespace  util
 
namespace  vdf_sortition
 
namespace  vrf_wrapper
 

Classes

class  App
 
class  AppBase
 
struct  AspenHardfork
 
struct  ConfigException
 
struct  ConnectionConfig
 
struct  CornusHardforkConfig
 
class  Dag
 Thread safe. Labelled graph. More...
 
class  DagBlock
 DagBlock class is a DAG block class which main data is a list of transaction hashes included in the block and hashes of pivot and tips blocks it points to. More...
 
class  DagBlockProposer
 DagBlockProposer class proposes new DAG blocks using transactions retrieved from TransactionManager. More...
 
struct  DagBlockProposerConfig
 
struct  DagConfig
 
struct  DagFrontier
 
class  DagManager
 DagManager class contains in memory representation of part of the DAG that is not yet finalized in a pbft block and validates DAG blocks. More...
 
struct  DBConfig
 
class  DbException
 
class  DbStorage
 
struct  DdosProtectionConfig
 
class  edge_label_writer
 
struct  FicusHardforkConfig
 
struct  FullNodeConfig
 
struct  GasPriceConfig
 
class  GasPricer
 Basic gas price calculator. We calculate the gas price based on the lowest price in last number_of_blocks blocks. Then all of those values are sorted and current price is selected based on percentile. More...
 
struct  GenesisConfig
 
struct  HardforksConfig
 
class  InvalidRlpItemsCountException
 Exception thrown in case basic rlp format validation fails - number of rlp items. More...
 
class  KeyManager
 
struct  LogEntry
 
struct  LoggingConfig
 
struct  MagnoliaHardfork
 
class  MaliciousPeerException
 Exception thrown in case peer seems malicious based on data he sent. More...
 
class  MapByBlockCache
 
class  Network
 
struct  NetworkConfig
 
struct  NodeConfig
 
struct  OptimizedPbftVotesBundle
 
struct  OptimizedPillarVotesBundle
 
class  PacketProcessingException
 
class  PbftBlock
 The PbftBlock class is a PBFT block class that includes PBFT block hash, previous PBFT block hash, DAG anchor hash, DAG blocks ordering hash, period number, timestamp, proposer address, and proposer signature. More...
 
class  PbftBlockExtraData
 
class  PbftChain
 PbftChain class is a single linked list that contains finalized PBFT blocks. More...
 
struct  PbftConfig
 
class  PbftManager
 PbftManager class is a daemon that is used to finalize a bench of directed acyclic graph (DAG) blocks by using Practical Byzantine Fault Tolerance (PBFT) protocol. More...
 
class  PbftVote
 PbftVote class is a vote class that includes vote hash, vote on PBFT block hash, vote signature, VRF sortition, voter public key, voter address, and vote weight. More...
 
class  PeriodData
 PeriodData class is for block execution, that includes PBFT block, certify votes, DAG blocks, and transactions. More...
 
class  PeriodDataQueue
 PeriodDataQueue class is a syncing queue, the queue stores blocks synced from peers. More...
 
class  PillarVote
 PillarVote class. More...
 
class  PivotTree
 
class  Plugin
 
struct  PrometheusConfig
 
struct  ProposedBlockData
 
class  ProposedBlocks
 class ProposedBlocks holds proposed pbft blocks together with propose votes hashes per period & round More...
 
struct  Redelegation
 
class  SlashingManager
 
struct  SoleiroliaHardforkConfig
 
struct  SortitionConfig
 
struct  SortitionParams
 
struct  SortitionParamsChange
 Changing vrf params for DAG blocks generation. More...
 
class  SortitionParamsManager
 SortitionParamsManager class calculates DAG efficiency and makes VDF difficulty adjustments. More...
 
class  StatusTable
 
struct  SystemTransaction
 
struct  Transaction
 
struct  TransactionLocation
 
class  TransactionManager
 TransactionManager class verifies and inserts incoming transactions in memory pool and handles saving transactions and all transactions state change. More...
 
class  TransactionQueue
 TransactionQueue keeps transactions in memory sorted by priority to be included in a proposed DAG block or which might be required by an incoming DAG block. More...
 
struct  TransactionReceipt
 
class  UintComparator
 
class  ValueByBlockCache
 
struct  VdfParams
 
struct  VerifiedVotes
 
class  vertex_label_writer
 
class  Vote
 Vote class is a vote class that includes vote hash, vote on PBFT block hash, vote signature, VRF sortition, voter public key, voter address, and vote weight. More...
 
class  VoteManager
 VoteManager class manage votes for PBFT consensus. More...
 
struct  VrfParams
 
class  VrfPbftMsg
 VrfPbftMsg class uses PBFT period, round and step to generate a message for doing VRF sortition. More...
 
class  VrfPbftSortition
 VrfPbftSortition class used for doing VRF sortition to place a vote or to propose a new PBFT block. More...
 
struct  WalletConfig
 

Typedefs

using EthBlockNumber = uint64_t
 
using PbftPeriod = EthBlockNumber
 
using PbftRound = uint32_t
 
using PbftStep = uint32_t
 
using uint256_t = boost::multiprecision::uint256_t
 
using uint256_hash_t = dev::FixedHash< 32 >
 
using uint512_hash_t = dev::FixedHash< 64 >
 
using uint520_hash_t = dev::FixedHash< 65 >
 
using uint160_hash_t = dev::FixedHash< 20 >
 
using secret_t = dev::SecureFixedHash< 32 >
 
using public_t = uint512_hash_t
 
using addr_t = uint160_hash_t
 
using sig_t = uint520_hash_t
 
using vote_hash_t = uint256_hash_t
 
using blk_hash_t = uint256_hash_t
 
using trx_hash_t = uint256_hash_t
 
using gas_t = uint64_t
 
using level_t = uint64_t
 
using val_t = dev::u256
 
using vec_blk_t = std::vector< blk_hash_t >
 
using vec_trx_t = std::vector< trx_hash_t >
 
using byte = uint8_t
 
using bytes = std::vector< byte >
 
using trx_nonce_t = val_t
 
using stream = std::basic_streambuf< uint8_t >
 
using bufferstream = boost::iostreams::stream_buffer< boost::iostreams::basic_array_source< uint8_t > >
 
using vectorstream = boost::iostreams::stream_buffer< boost::iostreams::back_insert_device< std::vector< uint8_t > > >
 
using EfficienciesMap = std::map< uint16_t, int32_t >
 
using Batch = rocksdb::WriteBatch
 
using Slice = rocksdb::Slice
 
using OnEntry = std::function< void(Slice const &, Slice const &)>
 
using VdfSortition = vdf_sortition::VdfSortition
 
using LogBloom = dev::h2048
 
using LogBlooms = std::vector< LogBloom >
 
using LogEntries = std::vector< LogEntry >
 
using TransactionReceipts = std::vector< TransactionReceipt >
 
using SharedTransactionReceipts = std::shared_ptr< std::vector< TransactionReceipt > >
 
using SharedTransaction = std::shared_ptr< Transaction >
 
using Transactions = std::vector< Transaction >
 
using SharedTransactions = std::vector< SharedTransaction >
 
using TransactionHashes = std::vector< trx_hash_t >
 

Enumerations

enum  PbftStates {
  value_proposal_state = 1 , filter_state , certify_state , finish_state ,
  finish_polling_state
}
 
enum class  PbftStateRootValidation { PbftStateRootValidation::Valid = 0 , PbftStateRootValidation::Missing , PbftStateRootValidation::Invalid }
 
enum class  TransactionStatus { TransactionStatus::Inserted = 0 , TransactionStatus::InsertedNonProposable , TransactionStatus::Known , TransactionStatus::Overflow }
 TransactionStatus enum class defines current transaction status. More...
 
enum class  TwoTPlusOneVotedBlockType { SoftVotedBlock , CertVotedBlock , NextVotedBlock , NextVotedNullBlock }
 
enum  StatusDbField : uint8_t {
  ExecutedBlkCount = 0 , ExecutedTrxCount , TrxCount , DagBlkCount ,
  DagEdgeCount , DbMajorVersion , DbMinorVersion
}
 
enum class  PbftMgrField : uint8_t { Round = 0 , Step }
 
enum  PbftMgrStatus : uint8_t { ExecutedBlock = 0 , ExecutedInRound , NextVotedSoftValue , NextVotedNullBlockHash }
 
enum class  DBMetaKeys { LAST_NUMBER = 1 }
 
enum class  PbftVoteTypes : uint8_t {
  PbftVoteTypes::invalid_vote = 0 , PbftVoteTypes::propose_vote , PbftVoteTypes::soft_vote , PbftVoteTypes::cert_vote ,
  PbftVoteTypes::next_vote
}
 

Functions

 GLOBAL_CONST (h256, ZeroHash)
 
 GLOBAL_CONST (h256, EmptyRLPListSHA3)
 
 GLOBAL_CONST (h64, EmptyNonce)
 
 GLOBAL_CONST (u256, ZeroU256)
 
void static_init ()
 
bool checkDiskSpace (const fs::path &path, uint64_t required_space_MB)
 
std::string jsonToUnstyledString (const Json::Value &value)
 
template<typename T >
std::weak_ptr< T > as_weak (std::shared_ptr< T > sp)
 
template<typename Int1 , typename Int2 >
auto int_pow (Int1 x, Int2 y)
 
template<typename T >
std::vector< T > asVector (const Json::Value &json)
 
std::vector< uint64_t > asUInt64Vector (const Json::Value &json)
 
template<typename T >
bool read (stream &stm, T &value)
 
template<typename T >
bool write (stream &stm, T const &value)
 
void thisThreadSleepForSeconds (unsigned sec)
 
void thisThreadSleepForMilliSeconds (unsigned millisec)
 
void thisThreadSleepForMicroSeconds (unsigned microsec)
 
unsigned long getCurrentTimeMilliSeconds ()
 
std::string getFormattedVersion (std::initializer_list< uint32_t > list)
 
template<typename... TS>
std::string fmt (const std::string &pattern, const TS &...args)
 
void dec_json (Json::Value const &json, DBConfig &db_config)
 
void dec_json (const Json::Value &json, LoggingConfig &obj, std::filesystem::path data_path)
 
std::string getConfigErr (const std::vector< std::string > &path)
 
Json::Value getConfigData (Json::Value root, const std::vector< std::string > &path, bool optional=false)
 
std::string getConfigDataAsString (const Json::Value &root, const std::vector< std::string > &path, bool optional=false, const std::string &value={})
 
uint64_t getConfigDataAsUInt (const Json::Value &root, const std::vector< std::string > &path, bool optional=false, uint32_t value=0)
 
bool getConfigDataAsBoolean (const Json::Value &root, const std::vector< std::string > &path, bool optional=false, bool value=false)
 
Json::Value getJsonFromFileOrString (const Json::Value &value)
 
Json::Value enc_json (const DagBlockProposerConfig &obj)
 
void dec_json (const Json::Value &json, DagBlockProposerConfig &obj)
 
Json::Value enc_json (const DagConfig &obj)
 
void dec_json (const Json::Value &json, DagConfig &obj)
 
Json::Value enc_json (GasPriceConfig const &obj)
 
void dec_json (Json::Value const &json, GasPriceConfig &obj)
 
Json::Value enc_json (GenesisConfig const &obj)
 
void dec_json (Json::Value const &json, GenesisConfig &obj)
 
Json::Value enc_json (const Redelegation &obj)
 
void dec_json (const Json::Value &json, Redelegation &obj)
 
Json::Value enc_json (const MagnoliaHardfork &obj)
 
void dec_json (const Json::Value &json, MagnoliaHardfork &obj)
 
Json::Value enc_json (const AspenHardfork &obj)
 
void dec_json (const Json::Value &json, AspenHardfork &obj)
 
Json::Value enc_json (const FicusHardforkConfig &obj)
 
void dec_json (const Json::Value &json, FicusHardforkConfig &obj)
 
Json::Value enc_json (const CornusHardforkConfig &obj)
 
void dec_json (const Json::Value &json, CornusHardforkConfig &obj)
 
Json::Value enc_json (const SoleiroliaHardforkConfig &obj)
 
void dec_json (const Json::Value &json, SoleiroliaHardforkConfig &obj)
 
Json::Value enc_json (const HardforksConfig &obj)
 
void dec_json (const Json::Value &json, HardforksConfig &obj)
 
void dec_json (const Json::Value &json, ConnectionConfig &config)
 
void dec_json (const Json::Value &json, NetworkConfig &network)
 
Json::Value enc_json (PbftConfig const &obj)
 
void dec_json (Json::Value const &json, PbftConfig &obj)
 
std::ostream & operator<< (std::ostream &strm, const FullNodeConfig &conf)
 
spdlog::level::level_enum stringToVerbosity (std::string verbosity)
 Transforms string verbosity to Verbosity enum.
 
LoggingConfig::LoggingType stringToLoggingType (std::string logging_type)
 Transforms string logging type to LoggingType enum.
 
void dec_json (const Json::Value &json, PrometheusConfig &config)
 
DdosProtectionConfig dec_ddos_protection_config_json (const Json::Value &json)
 
NodeConfig dec_json (const Json::Value &json)
 
std::ostream & operator<< (std::ostream &strm, PbftChain const &pbft_chain)
 
int32_t getThresholdChange (uint16_t efficiency, uint16_t target_efficiency, int32_t current_threshold)
 
int32_t getClosestThreshold (const EfficienciesMap &efficiencies, uint16_t target, bool is_over_target)
 
std::optional< blk_hash_tfindClosestAnchor (const std::vector< blk_hash_t > &ghost, const std::vector< blk_hash_t > &dag_order, uint32_t included)
 
template<typename T >
FromSlice (rocksdb::Slice const &e)
 
template<class T >
const rocksdb::Comparator * getIntComparator ()
 
dev::bytes encodeDAGBlocksBundleRlp (const std::vector< std::shared_ptr< DagBlock > > &blocks)
 Encodes pbft blocks into optimized blocks bundle rlp.
 
std::vector< std::shared_ptr< DagBlock > > decodeDAGBlocksBundleRlp (const dev::RLP &blocks_bundle_rlp)
 Decodes pbft blocks from optimized blocks bundle rlp.
 
std::shared_ptr< DagBlockdecodeDAGBlockBundleRlp (uint64_t index, const dev::RLP &blocks_bundle_rlp)
 Decodes single dag block from optimized blocks bundle rlp.
 
std::ostream & operator<< (std::ostream &strm, const PbftBlock &pbft_blk)
 
uint64_t IntrinsicGas (const std::vector< uint8_t > &data, bool is_contract_creation)
 
TransactionHashes hashes_from_transactions (const SharedTransactions &transactions)
 
uint64_t toChainID (const u256 &val)
 
dev::bytes encodePbftVotesBundleRlp (const std::vector< std::shared_ptr< PbftVote > > &votes)
 Encodes pbft votes into optimized votes bundle rlp.
 
std::vector< std::shared_ptr< PbftVote > > decodePbftVotesBundleRlp (const dev::RLP &votes_bundle_rlp)
 Decodes pbft votes from optimized votes bundle rlp.
 
dev::bytes encodePillarVotesBundleRlp (const std::vector< std::shared_ptr< PillarVote > > &votes)
 Encodes pillar votes into optimized votes bundle rlp.
 
std::vector< std::shared_ptr< PillarVote > > decodePillarVotesBundleRlp (const dev::RLP &votes_bundle_rlp)
 Decodes pillar votes from optimized votes bundle rlp.
 
dev::h256 getVoterIndexHash (const vrf_wrapper::vrf_output_t &vrf, const public_t &address, uint64_t index=0)
 Get a hash number of combining VRF output, voter address, and vote weight index.
 
Json::Value enc_json (const VrfParams &obj)
 
void dec_json (const Json::Value &json, VrfParams &obj)
 
Json::Value enc_json (const VdfParams &obj)
 
void dec_json (const Json::Value &json, VdfParams &obj)
 
Json::Value enc_json (const SortitionParams &obj)
 
void dec_json (const Json::Value &json, SortitionParams &obj)
 
Json::Value enc_json (const SortitionConfig &obj)
 
void dec_json (const Json::Value &json, SortitionConfig &obj)
 
int32_t fixFromOverflow (uint16_t value, int32_t change, uint16_t limit)
 

Variables

static const blk_hash_t kNullBlockHash
 
constexpr uint16_t kOnePercent = 100
 
constexpr uint16_t kMaxLevelsPerPeriod = 100
 
constexpr uint32_t kDagExpiryLevelLimit = 1000
 
constexpr uint32_t kDagBlockMaxTips = 16
 
const uint32_t kMaxTransactionsInPacket {500}
 
const uint32_t kMaxTransactionsSizeInPacket {500000}
 
const uint32_t kMaxHashesInPacket {5000}
 
const uint32_t kPeriodicEventsThreadCount {2}
 
const uint64_t kMinTxGas {21000}
 
constexpr uint32_t kMinTransactionPoolSize {30000}
 
constexpr uint32_t kDefaultTransactionPoolSize {200000}
 
constexpr uint32_t kMaxNonFinalizedTransactions {1000000}
 
constexpr uint32_t kMaxNonFinalizedDagBlocks {100}
 
constexpr uint32_t kMaxNonFinalizedDagBlocksLowDifficulty {5}
 
const size_t kV4NetworkVersion = 4
 
const uint32_t kRecentlyFinalizedTransactionsFactor = 2
 
constexpr uint64_t kTxGas = 21000
 
constexpr uint64_t kTxGasContractCreation = 53000
 
constexpr uint64_t kTxDataZeroGas = 4
 
constexpr uint64_t kTxDataNonZeroGas = 68
 
static const u256 kOneTara = dev::exp10<18>()
 
static const addr_t kTaraxaSystemAccount = addr_t("0x0054617261786153797374656d4163636f756e74")
 
static const vrf_wrapper::vrf_pk_t kEmptyVrfKey
 
constexpr std::chrono::milliseconds kPollingIntervalMs {100}
 
constexpr PbftStep kMaxSteps {13}
 
const auto kContractAddress = addr_t("0x00000000000000000000000000000000000000EE")
 
static constexpr uint16_t PBFT_BLOCK_POS_IN_PERIOD_DATA = 0
 
static constexpr uint16_t CERT_VOTES_POS_IN_PERIOD_DATA = 1
 
static constexpr uint16_t DAG_BLOCKS_POS_IN_PERIOD_DATA = 2
 
static constexpr uint16_t TRANSACTIONS_POS_IN_PERIOD_DATA = 3
 
static constexpr uint16_t PILLAR_VOTES_POS_IN_PERIOD_DATA = 4
 
static constexpr uint16_t PREV_BLOCK_HASH_POS_IN_PBFT_BLOCK = 0
 
static constexpr size_t kDAGBlocksBundleRlpSize {3}
 
static constexpr size_t kPbftVotesBundleRlpSize {5}
 
static constexpr size_t kPillarVotesBundleRlpSize {3}
 

Detailed Description

This file is generated by jsonrpcstub, DO NOT CHANGE IT MANUALLY!


Class Documentation

◆ taraxa::AspenHardfork

struct taraxa::AspenHardfork
Class Members
uint64_t block_num_part_one {0}
uint64_t block_num_part_two {0}
uint256_t generated_rewards {0}
uint256_t max_supply {"0x26C62AD77DC602DAE0000000"}

◆ taraxa::CornusHardforkConfig

struct taraxa::CornusHardforkConfig
Class Members
uint64_t block_num = -1
uint64_t dag_gas_limit = 0
uint32_t delegation_locking_period = 5
uint64_t pbft_gas_limit = 0

◆ taraxa::DBConfig

struct taraxa::DBConfig
Class Members
uint32_t db_max_open_files = 0
uint32_t db_max_snapshots = 0
PbftPeriod db_revert_to_period = 0
uint32_t db_snapshot_each_n_pbft_block = 0
bool migrate_only = false
bool migrate_receipts_by_period = false
bool prune_state_db = false
bool rebuild_db = false
PbftPeriod rebuild_db_period = 0

◆ taraxa::MagnoliaHardfork

struct taraxa::MagnoliaHardfork
Class Members
uint64_t block_num = -1
uint64_t jail_time = 0

◆ taraxa::PrometheusConfig

struct taraxa::PrometheusConfig
Class Members
string address
uint16_t listen_port = 0
uint16_t polling_interval_ms = 1000

◆ taraxa::ProposedBlockData

struct taraxa::ProposedBlockData
Collaboration diagram for taraxa::ProposedBlockData:
Class Members
shared_ptr< PbftBlock > pbft_block
WalletConfig proposer_wallet
vector< shared_ptr< PbftVote > > reward_votes

◆ taraxa::Redelegation

struct taraxa::Redelegation
Collaboration diagram for taraxa::Redelegation:
Class Members
uint256_t amount
addr_t delegator
addr_t validator

◆ taraxa::SoleiroliaHardforkConfig

struct taraxa::SoleiroliaHardforkConfig
Class Members
uint64_t block_num = -1
uint64_t trx_max_gas_limit = 31500000
uint64_t trx_min_gas_price = 1

◆ taraxa::VdfParams

struct taraxa::VdfParams
Class Members
uint16_t difficulty_max = 1
uint16_t difficulty_min = 0
uint16_t difficulty_stale = 0
uint16_t lambda_bound = 1500

◆ taraxa::VerifiedVotes

struct taraxa::VerifiedVotes
Class Members
PbftStep network_t_plus_one_step {0}
map< PbftStep, StepVotes > step_votes
unordered_map< TwoTPlusOneVotedBlockType, pair< blk_hash_t, PbftStep > > two_t_plus_one_voted_blocks_

Typedef Documentation

◆ addr_t

using taraxa::addr_t = typedef uint160_hash_t

◆ Batch

using taraxa::Batch = typedef rocksdb::WriteBatch

◆ blk_hash_t

◆ bufferstream

using taraxa::bufferstream = typedef boost::iostreams::stream_buffer<boost::iostreams::basic_array_source<uint8_t> >

◆ byte

using taraxa::byte = typedef uint8_t

◆ bytes

using taraxa::bytes = typedef std::vector<byte>

◆ EfficienciesMap

using taraxa::EfficienciesMap = typedef std::map<uint16_t, int32_t>

◆ EthBlockNumber

using taraxa::EthBlockNumber = typedef uint64_t

◆ gas_t

using taraxa::gas_t = typedef uint64_t

◆ level_t

using taraxa::level_t = typedef uint64_t

◆ LogBloom

using taraxa::LogBloom = typedef dev::h2048

◆ LogBlooms

using taraxa::LogBlooms = typedef std::vector<LogBloom>

◆ LogEntries

using taraxa::LogEntries = typedef std::vector<LogEntry>

◆ OnEntry

using taraxa::OnEntry = typedef std::function<void(Slice const&, Slice const&)>

◆ PbftPeriod

◆ PbftRound

using taraxa::PbftRound = typedef uint32_t

◆ PbftStep

using taraxa::PbftStep = typedef uint32_t

◆ public_t

◆ secret_t

◆ SharedTransaction

using taraxa::SharedTransaction = typedef std::shared_ptr<Transaction>

◆ SharedTransactionReceipts

using taraxa::SharedTransactionReceipts = typedef std::shared_ptr<std::vector<TransactionReceipt> >

◆ SharedTransactions

using taraxa::SharedTransactions = typedef std::vector<SharedTransaction>

◆ sig_t

using taraxa::sig_t = typedef uint520_hash_t

◆ Slice

using taraxa::Slice = typedef rocksdb::Slice

◆ stream

using taraxa::stream = typedef std::basic_streambuf<uint8_t>

◆ TransactionHashes

using taraxa::TransactionHashes = typedef std::vector<trx_hash_t>

◆ TransactionReceipts

using taraxa::TransactionReceipts = typedef std::vector<TransactionReceipt>

◆ Transactions

using taraxa::Transactions = typedef std::vector<Transaction>

◆ trx_hash_t

◆ trx_nonce_t

using taraxa::trx_nonce_t = typedef val_t

◆ uint160_hash_t

◆ uint256_hash_t

◆ uint256_t

using taraxa::uint256_t = typedef boost::multiprecision::uint256_t

◆ uint512_hash_t

◆ uint520_hash_t

◆ val_t

using taraxa::val_t = typedef dev::u256

◆ VdfSortition

◆ vec_blk_t

using taraxa::vec_blk_t = typedef std::vector<blk_hash_t>

◆ vec_trx_t

using taraxa::vec_trx_t = typedef std::vector<trx_hash_t>

◆ vectorstream

using taraxa::vectorstream = typedef boost::iostreams::stream_buffer<boost::iostreams::back_insert_device<std::vector<uint8_t> >>

◆ vote_hash_t

Enumeration Type Documentation

◆ DBMetaKeys

enum class taraxa::DBMetaKeys
strong
Enumerator
LAST_NUMBER 

◆ PbftMgrField

enum class taraxa::PbftMgrField : uint8_t
strong
Enumerator
Round 
Step 

◆ PbftMgrStatus

enum taraxa::PbftMgrStatus : uint8_t
Enumerator
ExecutedBlock 
ExecutedInRound 
NextVotedSoftValue 
NextVotedNullBlockHash 

◆ StatusDbField

enum taraxa::StatusDbField : uint8_t
Enumerator
ExecutedBlkCount 
ExecutedTrxCount 
TrxCount 
DagBlkCount 
DagEdgeCount 
DbMajorVersion 
DbMinorVersion 

◆ TwoTPlusOneVotedBlockType

Enumerator
SoftVotedBlock 
CertVotedBlock 
NextVotedBlock 
NextVotedNullBlock 

Function Documentation

◆ as_weak()

template<typename T >
std::weak_ptr< T > taraxa::as_weak ( std::shared_ptr< T >  sp)

◆ asUInt64Vector()

std::vector< uint64_t > taraxa::asUInt64Vector ( const Json::Value &  json)

◆ asVector()

template<typename T >
std::vector< T > taraxa::asVector ( const Json::Value &  json)

◆ checkDiskSpace()

bool taraxa::checkDiskSpace ( const fs::path &  path,
uint64_t  required_space_MB 
)
inline

◆ dec_ddos_protection_config_json()

DdosProtectionConfig taraxa::dec_ddos_protection_config_json ( const Json::Value &  json)

◆ dec_json() [1/22]

NodeConfig taraxa::dec_json ( const Json::Value &  json)

◆ dec_json() [2/22]

void taraxa::dec_json ( const Json::Value &  json,
AspenHardfork obj 
)

◆ dec_json() [3/22]

void taraxa::dec_json ( const Json::Value &  json,
ConnectionConfig config 
)

◆ dec_json() [4/22]

void taraxa::dec_json ( const Json::Value &  json,
CornusHardforkConfig obj 
)

◆ dec_json() [5/22]

void taraxa::dec_json ( const Json::Value &  json,
DagBlockProposerConfig obj 
)

◆ dec_json() [6/22]

void taraxa::dec_json ( const Json::Value &  json,
DagConfig obj 
)

◆ dec_json() [7/22]

void taraxa::dec_json ( const Json::Value &  json,
FicusHardforkConfig obj 
)

◆ dec_json() [8/22]

void taraxa::dec_json ( const Json::Value &  json,
HardforksConfig obj 
)

◆ dec_json() [9/22]

void taraxa::dec_json ( const Json::Value &  json,
LoggingConfig obj,
std::filesystem::path  data_path 
)

◆ dec_json() [10/22]

void taraxa::dec_json ( const Json::Value &  json,
MagnoliaHardfork obj 
)

◆ dec_json() [11/22]

void taraxa::dec_json ( const Json::Value &  json,
NetworkConfig network 
)

◆ dec_json() [12/22]

void taraxa::dec_json ( const Json::Value &  json,
PrometheusConfig config 
)

◆ dec_json() [13/22]

void taraxa::dec_json ( const Json::Value &  json,
Redelegation obj 
)

◆ dec_json() [14/22]

void taraxa::dec_json ( const Json::Value &  json,
SoleiroliaHardforkConfig obj 
)

◆ dec_json() [15/22]

void taraxa::dec_json ( const Json::Value &  json,
SortitionConfig obj 
)

◆ dec_json() [16/22]

void taraxa::dec_json ( const Json::Value &  json,
SortitionParams obj 
)

◆ dec_json() [17/22]

void taraxa::dec_json ( const Json::Value &  json,
VdfParams obj 
)

◆ dec_json() [18/22]

void taraxa::dec_json ( const Json::Value &  json,
VrfParams obj 
)

◆ dec_json() [19/22]

void taraxa::dec_json ( Json::Value const &  json,
DBConfig db_config 
)

◆ dec_json() [20/22]

void taraxa::dec_json ( Json::Value const &  json,
GasPriceConfig obj 
)

◆ dec_json() [21/22]

void taraxa::dec_json ( Json::Value const &  json,
GenesisConfig obj 
)

◆ dec_json() [22/22]

void taraxa::dec_json ( Json::Value const &  json,
PbftConfig obj 
)

◆ enc_json() [1/16]

Json::Value taraxa::enc_json ( const AspenHardfork obj)

◆ enc_json() [2/16]

Json::Value taraxa::enc_json ( const CornusHardforkConfig obj)

◆ enc_json() [3/16]

Json::Value taraxa::enc_json ( const DagBlockProposerConfig obj)

◆ enc_json() [4/16]

Json::Value taraxa::enc_json ( const DagConfig obj)

◆ enc_json() [5/16]

Json::Value taraxa::enc_json ( const FicusHardforkConfig obj)

◆ enc_json() [6/16]

Json::Value taraxa::enc_json ( const HardforksConfig obj)

◆ enc_json() [7/16]

Json::Value taraxa::enc_json ( const MagnoliaHardfork obj)

◆ enc_json() [8/16]

Json::Value taraxa::enc_json ( const Redelegation obj)

◆ enc_json() [9/16]

Json::Value taraxa::enc_json ( const SoleiroliaHardforkConfig obj)

◆ enc_json() [10/16]

Json::Value taraxa::enc_json ( const SortitionConfig obj)

◆ enc_json() [11/16]

Json::Value taraxa::enc_json ( const SortitionParams obj)

◆ enc_json() [12/16]

Json::Value taraxa::enc_json ( const VdfParams obj)

◆ enc_json() [13/16]

Json::Value taraxa::enc_json ( const VrfParams obj)

◆ enc_json() [14/16]

Json::Value taraxa::enc_json ( GasPriceConfig const &  obj)

◆ enc_json() [15/16]

Json::Value taraxa::enc_json ( GenesisConfig const &  obj)

◆ enc_json() [16/16]

Json::Value taraxa::enc_json ( PbftConfig const &  obj)

◆ findClosestAnchor()

std::optional< blk_hash_t > taraxa::findClosestAnchor ( const std::vector< blk_hash_t > &  ghost,
const std::vector< blk_hash_t > &  dag_order,
uint32_t  included 
)

◆ fixFromOverflow()

int32_t taraxa::fixFromOverflow ( uint16_t  value,
int32_t  change,
uint16_t  limit 
)

◆ fmt()

template<typename... TS>
std::string taraxa::fmt ( const std::string &  pattern,
const TS &...  args 
)

◆ FromSlice()

template<typename T >
T taraxa::FromSlice ( rocksdb::Slice const &  e)

◆ getClosestThreshold()

int32_t taraxa::getClosestThreshold ( const EfficienciesMap efficiencies,
uint16_t  target,
bool  is_over_target 
)

◆ getConfigData()

Json::Value taraxa::getConfigData ( Json::Value  root,
const std::vector< std::string > &  path,
bool  optional = false 
)

◆ getConfigDataAsBoolean()

bool taraxa::getConfigDataAsBoolean ( const Json::Value &  root,
const std::vector< std::string > &  path,
bool  optional = false,
bool  value = false 
)

◆ getConfigDataAsString()

std::string taraxa::getConfigDataAsString ( const Json::Value &  root,
const std::vector< std::string > &  path,
bool  optional = false,
const std::string &  value = {} 
)

◆ getConfigDataAsUInt()

uint64_t taraxa::getConfigDataAsUInt ( const Json::Value &  root,
const std::vector< std::string > &  path,
bool  optional = false,
uint32_t  value = 0 
)

◆ getConfigErr()

std::string taraxa::getConfigErr ( const std::vector< std::string > &  path)

◆ getCurrentTimeMilliSeconds()

unsigned long taraxa::getCurrentTimeMilliSeconds ( )

◆ getFormattedVersion()

std::string taraxa::getFormattedVersion ( std::initializer_list< uint32_t >  list)

◆ getIntComparator()

template<class T >
const rocksdb::Comparator * taraxa::getIntComparator ( )
inline

◆ getJsonFromFileOrString()

Json::Value taraxa::getJsonFromFileOrString ( const Json::Value &  value)

◆ getThresholdChange()

int32_t taraxa::getThresholdChange ( uint16_t  efficiency,
uint16_t  target_efficiency,
int32_t  current_threshold 
)

◆ GLOBAL_CONST() [1/4]

taraxa::GLOBAL_CONST ( h256  ,
EmptyRLPListSHA3   
)

◆ GLOBAL_CONST() [2/4]

taraxa::GLOBAL_CONST ( h256  ,
ZeroHash   
)

◆ GLOBAL_CONST() [3/4]

taraxa::GLOBAL_CONST ( h64  ,
EmptyNonce   
)

◆ GLOBAL_CONST() [4/4]

taraxa::GLOBAL_CONST ( u256  ,
ZeroU256   
)

◆ hashes_from_transactions()

TransactionHashes taraxa::hashes_from_transactions ( const SharedTransactions transactions)

◆ int_pow()

template<typename Int1 , typename Int2 >
auto taraxa::int_pow ( Int1  x,
Int2  y 
)

◆ IntrinsicGas()

uint64_t taraxa::IntrinsicGas ( const std::vector< uint8_t > &  data,
bool  is_contract_creation 
)
inline

◆ jsonToUnstyledString()

std::string taraxa::jsonToUnstyledString ( const Json::Value &  value)
Parameters
value
Returns
unstyled json string (without new lines and whitespaces).

◆ operator<<()

std::ostream & taraxa::operator<< ( std::ostream &  strm,
const FullNodeConfig conf 
)

◆ read()

template<typename T >
bool taraxa::read ( stream stm,
T &  value 
)

◆ static_init()

void taraxa::static_init ( )
inline

◆ stringToLoggingType()

LoggingConfig::LoggingType taraxa::stringToLoggingType ( std::string  logging_type)

Transforms string logging type to LoggingType enum.

Parameters
logging_typestring
Returns
LoggingType enum

◆ stringToVerbosity()

spdlog::level::level_enum taraxa::stringToVerbosity ( std::string  verbosity)

Transforms string verbosity to Verbosity enum.

Parameters
verbosity
Returns
Verbosity enum

◆ thisThreadSleepForMicroSeconds()

void taraxa::thisThreadSleepForMicroSeconds ( unsigned  microsec)

◆ thisThreadSleepForMilliSeconds()

void taraxa::thisThreadSleepForMilliSeconds ( unsigned  millisec)

◆ thisThreadSleepForSeconds()

void taraxa::thisThreadSleepForSeconds ( unsigned  sec)

◆ toChainID()

uint64_t taraxa::toChainID ( const u256 &  val)

◆ write()

template<typename T >
bool taraxa::write ( stream stm,
T const &  value 
)

Variable Documentation

◆ CERT_VOTES_POS_IN_PERIOD_DATA

constexpr uint16_t taraxa::CERT_VOTES_POS_IN_PERIOD_DATA = 1
staticconstexpr

◆ DAG_BLOCKS_POS_IN_PERIOD_DATA

constexpr uint16_t taraxa::DAG_BLOCKS_POS_IN_PERIOD_DATA = 2
staticconstexpr

◆ kContractAddress

const auto taraxa::kContractAddress = addr_t("0x00000000000000000000000000000000000000EE")

◆ kDagBlockMaxTips

constexpr uint32_t taraxa::kDagBlockMaxTips = 16
constexpr

◆ kDagExpiryLevelLimit

constexpr uint32_t taraxa::kDagExpiryLevelLimit = 1000
constexpr

◆ kDefaultTransactionPoolSize

constexpr uint32_t taraxa::kDefaultTransactionPoolSize {200000}
constexpr

◆ kEmptyVrfKey

const vrf_wrapper::vrf_pk_t taraxa::kEmptyVrfKey
static

◆ kMaxHashesInPacket

const uint32_t taraxa::kMaxHashesInPacket {5000}

◆ kMaxLevelsPerPeriod

constexpr uint16_t taraxa::kMaxLevelsPerPeriod = 100
constexpr

◆ kMaxNonFinalizedDagBlocks

constexpr uint32_t taraxa::kMaxNonFinalizedDagBlocks {100}
constexpr

◆ kMaxNonFinalizedDagBlocksLowDifficulty

constexpr uint32_t taraxa::kMaxNonFinalizedDagBlocksLowDifficulty {5}
constexpr

◆ kMaxNonFinalizedTransactions

constexpr uint32_t taraxa::kMaxNonFinalizedTransactions {1000000}
constexpr

◆ kMaxSteps

constexpr PbftStep taraxa::kMaxSteps {13}
constexpr

◆ kMaxTransactionsInPacket

const uint32_t taraxa::kMaxTransactionsInPacket {500}

◆ kMaxTransactionsSizeInPacket

const uint32_t taraxa::kMaxTransactionsSizeInPacket {500000}

◆ kMinTransactionPoolSize

constexpr uint32_t taraxa::kMinTransactionPoolSize {30000}
constexpr

◆ kMinTxGas

const uint64_t taraxa::kMinTxGas {21000}

◆ kNullBlockHash

const blk_hash_t taraxa::kNullBlockHash
static

◆ kOnePercent

constexpr uint16_t taraxa::kOnePercent = 100
constexpr

◆ kOneTara

const u256 taraxa::kOneTara = dev::exp10<18>()
static

◆ kPeriodicEventsThreadCount

const uint32_t taraxa::kPeriodicEventsThreadCount {2}

◆ kPollingIntervalMs

constexpr std::chrono::milliseconds taraxa::kPollingIntervalMs {100}
constexpr

◆ kRecentlyFinalizedTransactionsFactor

const uint32_t taraxa::kRecentlyFinalizedTransactionsFactor = 2

◆ kTaraxaSystemAccount

const addr_t taraxa::kTaraxaSystemAccount = addr_t("0x0054617261786153797374656d4163636f756e74")
static

◆ kTxDataNonZeroGas

constexpr uint64_t taraxa::kTxDataNonZeroGas = 68
constexpr

◆ kTxDataZeroGas

constexpr uint64_t taraxa::kTxDataZeroGas = 4
constexpr

◆ kTxGas

constexpr uint64_t taraxa::kTxGas = 21000
constexpr

◆ kTxGasContractCreation

constexpr uint64_t taraxa::kTxGasContractCreation = 53000
constexpr

◆ kV4NetworkVersion

const size_t taraxa::kV4NetworkVersion = 4

◆ PBFT_BLOCK_POS_IN_PERIOD_DATA

constexpr uint16_t taraxa::PBFT_BLOCK_POS_IN_PERIOD_DATA = 0
staticconstexpr

◆ PILLAR_VOTES_POS_IN_PERIOD_DATA

constexpr uint16_t taraxa::PILLAR_VOTES_POS_IN_PERIOD_DATA = 4
staticconstexpr

◆ PREV_BLOCK_HASH_POS_IN_PBFT_BLOCK

constexpr uint16_t taraxa::PREV_BLOCK_HASH_POS_IN_PBFT_BLOCK = 0
staticconstexpr

◆ TRANSACTIONS_POS_IN_PERIOD_DATA

constexpr uint16_t taraxa::TRANSACTIONS_POS_IN_PERIOD_DATA = 3
staticconstexpr