TARAXA
taraxa Namespace Reference

Namespaces

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

Classes

struct  ConfigException
 
class  StatusTable
 
struct  DBConfig
 
struct  FullNodeConfig
 
struct  DagBlockProposerConfig
 
struct  DagConfig
 
struct  GasPriceConfig
 
struct  GenesisConfig
 
struct  Redelegation
 
struct  MagnoliaHardfork
 
struct  AspenHardfork
 
struct  FicusHardforkConfig
 
struct  HardforksConfig
 
struct  PrometheusConfig
 
struct  ConnectionConfig
 
struct  NodeConfig
 
struct  DdosProtectionConfig
 
struct  NetworkConfig
 
struct  PbftConfig
 
class  Dag
 Thread safe. Labelled graph. More...
 
class  PivotTree
 
class  vertex_label_writer
 
class  edge_label_writer
 
class  DagBlockProposer
 DagBlockProposer class proposes new DAG blocks using transactions retrieved from TransactionManager. More...
 
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  SortitionParamsChange
 Changing vrf params for DAG blocks generation. More...
 
class  SortitionParamsManager
 SortitionParamsManager class calculates DAG efficiency and makes VDF difficulty adjustments. More...
 
class  MapByBlockCache
 
class  ValueByBlockCache
 
class  KeyManager
 
class  PbftChain
 PbftChain class is a single linked list that contains finalized PBFT blocks. More...
 
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  PeriodDataQueue
 PeriodDataQueue class is a syncing queue, the queue stores blocks synced from peers. More...
 
class  ProposedBlocks
 class ProposedBlocks holds proposed pbft blocks together with propose votes hashes per period & round More...
 
class  SlashingManager
 
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...
 
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  VerifiedVotes
 
class  VoteManager
 VoteManager class manage votes for PBFT consensus. More...
 
class  Network
 
class  PacketProcessingException
 
class  InvalidRlpItemsCountException
 Exception thrown in case basic rlp format validation fails - number of rlp items. More...
 
class  MaliciousPeerException
 Exception thrown in case peer seems malicious based on data he sent. More...
 
class  FullNode
 
class  DbException
 
class  DbStorage
 
class  UintComparator
 
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...
 
struct  DagFrontier
 
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  PeriodData
 PeriodData class is for block execution, that includes PBFT block, certify votes, DAG blocks, and transactions. More...
 
struct  SystemTransaction
 
struct  Transaction
 
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  PillarVote
 PillarVote class. More...
 
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  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  VrfParams
 
struct  VdfParams
 
struct  SortitionParams
 
struct  SortitionConfig
 

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 root_t = dev::h256
 
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 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 { Valid = 0 , Missing , Invalid }
 
enum class  TransactionStatus { Inserted = 0 , InsertedNonProposable , Known , 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 {
  invalid_vote = 0 , propose_vote , soft_vote , cert_vote ,
  next_vote
}
 

Functions

 GLOBAL_CONST (h256, ZeroHash)
 
 GLOBAL_CONST (h256, EmptyRLPListSHA3)
 
 GLOBAL_CONST (h64, EmptyNonce)
 
 GLOBAL_CONST (u256, ZeroU256)
 
void static_init ()
 
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)
 
std::ostream & operator<< (std::ostream &strm, NodeConfig const &conf)
 
std::ostream & operator<< (std::ostream &strm, NetworkConfig const &conf)
 
std::ostream & operator<< (std::ostream &strm, FullNodeConfig const &conf)
 
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, std::string value={})
 
uint32_t getConfigDataAsUInt (const Json::Value &root, const std::vector< std::string > &path, bool optional=false, uint32_t value=0)
 
uint64_t getConfigDataAsUInt64 (const Json::Value &root, const std::vector< std::string > &path)
 
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 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 DdosProtectionConfig &conf)
 
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< DagBlock > &blocks)
 Encodes pbft blocks into optimized blocks bundle rlp. More...
 
std::vector< DagBlockdecodeDAGBlocksBundleRlp (const dev::RLP &blocks_bundle_rlp)
 Decodes pbft blocks from optimized blocks bundle rlp. More...
 
std::shared_ptr< DagBlockdecodeDAGBlockBundleRlp (uint64_t index, const dev::RLP &blocks_bundle_rlp)
 Decodes single dag block from optimized blocks bundle rlp. More...
 
std::ostream & operator<< (std::ostream &strm, const PbftBlock &pbft_blk)
 
std::ostream & operator<< (std::ostream &strm, PeriodData const &b)
 
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. More...
 
std::vector< std::shared_ptr< PbftVote > > decodePbftVotesBundleRlp (const dev::RLP &votes_bundle_rlp)
 Decodes pbft votes from optimized votes bundle rlp. More...
 
dev::bytes encodePillarVotesBundleRlp (const std::vector< std::shared_ptr< PillarVote >> &votes)
 Encodes pillar votes into optimized votes bundle rlp. More...
 
std::vector< std::shared_ptr< PillarVote > > decodePillarVotesBundleRlp (const dev::RLP &votes_bundle_rlp)
 Decodes pillar votes from optimized votes bundle rlp. More...
 
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. More...
 
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 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}
 
const size_t kV3NetworkVersion = 3
 
const uint32_t kRecentlyFinalizedTransactionsFactor = 2
 
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
 
constexpr static size_t kDAGBlocksBundleRlpSize {3}
 
constexpr static size_t kPbftVotesBundleRlpSize {5}
 
constexpr static size_t kPillarVotesBundleRlpSize {3}
 

Detailed Description

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


Class Documentation

◆ taraxa::DBConfig

struct taraxa::DBConfig
Class Members
uint32_t db_max_open_files
uint32_t db_max_snapshots
PbftPeriod db_revert_to_period
uint32_t db_snapshot_each_n_pbft_block
bool fix_trx_period
bool migrate_only
bool prune_state_db
bool rebuild_db
PbftPeriod rebuild_db_period

◆ taraxa::Redelegation

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

◆ taraxa::MagnoliaHardfork

struct taraxa::MagnoliaHardfork
Class Members
uint64_t block_num
uint64_t jail_time

◆ taraxa::AspenHardfork

struct taraxa::AspenHardfork
Class Members
uint64_t block_num_part_one
uint64_t block_num_part_two
uint256_t generated_rewards
uint256_t max_supply

◆ taraxa::PrometheusConfig

struct taraxa::PrometheusConfig
Collaboration diagram for taraxa::PrometheusConfig:
Class Members
string address
uint16_t listen_port
uint16_t polling_interval_ms

◆ taraxa::NodeConfig

struct taraxa::NodeConfig
Collaboration diagram for taraxa::NodeConfig:
Class Members
string id
string ip
uint16_t port

◆ taraxa::VerifiedVotes

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

◆ taraxa::VdfParams

struct taraxa::VdfParams
Class Members
uint16_t difficulty_max
uint16_t difficulty_min
uint16_t difficulty_stale
uint16_t lambda_bound

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

◆ 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

◆ root_t

using taraxa::root_t = typedef dev::h256

◆ secret_t

◆ SharedTransaction

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

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

◆ 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 taraxa::DBMetaKeys
strong
Enumerator
LAST_NUMBER 

◆ PbftMgrField

enum 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)

◆ dec_ddos_protection_config_json()

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

◆ dec_json() [1/19]

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

◆ dec_json() [2/19]

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

◆ dec_json() [3/19]

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

◆ dec_json() [4/19]

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

◆ dec_json() [5/19]

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

◆ dec_json() [6/19]

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

◆ dec_json() [7/19]

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

◆ dec_json() [8/19]

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

◆ dec_json() [9/19]

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

◆ dec_json() [10/19]

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

◆ dec_json() [11/19]

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

◆ dec_json() [12/19]

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

◆ dec_json() [13/19]

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

◆ dec_json() [14/19]

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

◆ dec_json() [15/19]

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

◆ dec_json() [16/19]

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

◆ dec_json() [17/19]

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

◆ dec_json() [18/19]

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

◆ dec_json() [19/19]

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

◆ enc_json() [1/14]

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

◆ enc_json() [2/14]

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

◆ enc_json() [3/14]

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

◆ enc_json() [4/14]

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

◆ enc_json() [5/14]

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

◆ enc_json() [6/14]

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

◆ enc_json() [7/14]

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

◆ enc_json() [8/14]

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

◆ enc_json() [9/14]

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

◆ enc_json() [10/14]

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

◆ enc_json() [11/14]

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

◆ enc_json() [12/14]

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

◆ enc_json() [13/14]

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

◆ enc_json() [14/14]

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,
std::string  value = {} 
)

◆ getConfigDataAsUInt()

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

◆ getConfigDataAsUInt64()

uint64_t taraxa::getConfigDataAsUInt64 ( const Json::Value &  root,
const std::vector< std::string > &  path 
)

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

◆ jsonToUnstyledString()

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

◆ operator<<() [1/4]

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

◆ operator<<() [2/4]

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

◆ operator<<() [3/4]

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

◆ operator<<() [4/4]

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

◆ read()

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

◆ static_init()

void taraxa::static_init ( )
inline

◆ 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

◆ kMaxNonFinalizedTransactions

constexpr uint32_t taraxa::kMaxNonFinalizedTransactions {1000000}
constexpr

◆ kMaxSteps

constexpr PbftStep taraxa::kMaxSteps {13}
constexpr

◆ kMaxTransactionsInPacket

const uint32_t taraxa::kMaxTransactionsInPacket {500}

◆ 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

◆ kV3NetworkVersion

const size_t taraxa::kV3NetworkVersion = 3

◆ 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