TARAXA
taraxa::state_api Namespace Reference

Classes

struct  EVMChainConfig
 
struct  ValidatorInfo
 
struct  DPOSConfig
 
struct  Config
 
struct  Opts
 
struct  OptsDB
 
class  StateAPI
 
struct  TaraxaEVMError
 
struct  ErrFutureBlock
 
struct  EVMBlock
 
struct  EVMTransaction
 
struct  UncleBlock
 
struct  LogRecord
 
struct  ExecutionResult
 
struct  TransactionsExecutionResult
 
struct  RewardsDistributionResult
 
struct  StateDescriptor
 
struct  Tracing
 
struct  ValidatorStake
 
struct  ValidatorVoteCount
 
class  ErrorHandler
 

Typedefs

using BalanceMap = std::map< addr_t, u256 >
 

Functions

Json::Value enc_json (const EVMChainConfig &obj)
 
void dec_json (const Json::Value &json, uint64_t chain_id, EVMChainConfig &obj)
 
Json::Value enc_json (const BalanceMap &obj)
 
void dec_json (const Json::Value &json, BalanceMap &obj)
 
Json::Value enc_json (const ValidatorInfo &obj)
 
void dec_json (const Json::Value &json, ValidatorInfo &obj)
 
Json::Value enc_json (const DPOSConfig &obj)
 
void dec_json (const Json::Value &json, DPOSConfig &obj)
 
void append_json (Json::Value &json, const Config &obj)
 
void dec_json (const Json::Value &json, Config &obj)
 
bytesConstRef map_bytes (const taraxa_evm_Bytes &b)
 
taraxa_evm_Bytes map_bytes (const bytes &b)
 
template<typename Result >
void from_rlp (taraxa_evm_Bytes b, Result &result)
 
void to_str (taraxa_evm_Bytes b, string &result)
 
void to_bytes (taraxa_evm_Bytes b, bytes &result)
 
void to_u256 (taraxa_evm_Bytes b, u256 &result)
 
void to_h256 (taraxa_evm_Bytes b, h256 &result)
 
template<typename Result , void(*)(taraxa_evm_Bytes, Result &) decode>
taraxa_evm_BytesCallback decoder_cb_c (Result &res)
 
template<typename Result , void(*)(taraxa_evm_Bytes, Result &) decode, void(*)(taraxa_evm_state_API_ptr, taraxa_evm_Bytes, taraxa_evm_BytesCallback, taraxa_evm_BytesCallback) fn, typename... Params>
void c_method_args_rlp (taraxa_evm_state_API_ptr this_c, dev::RLPStream &encoding, Result &ret, const Params &... args)
 
template<typename Result , void(*)(taraxa_evm_Bytes, Result &) decode, void(*)(taraxa_evm_state_API_ptr, taraxa_evm_Bytes, taraxa_evm_BytesCallback, taraxa_evm_BytesCallback) fn, typename... Params>
Result c_method_args_rlp (taraxa_evm_state_API_ptr this_c, const Params &... args)
 
template<void(*)(taraxa_evm_state_API_ptr, taraxa_evm_Bytes, taraxa_evm_BytesCallback) fn, typename... Params>
void c_method_args_rlp (taraxa_evm_state_API_ptr this_c, const Params &... args)
 

Variables

static constexpr auto BlockNumberNIL = std::numeric_limits<EthBlockNumber>::max()
 
struct taraxa::state_api::Account ZeroAccount
 

Class Documentation

◆ taraxa::state_api::EVMChainConfig

struct taraxa::state_api::EVMChainConfig
Class Members
uint64_t chain_id

◆ taraxa::state_api::ValidatorInfo

struct taraxa::state_api::ValidatorInfo
Collaboration diagram for taraxa::state_api::ValidatorInfo:
Class Members
addr_t address
uint16_t commission
BalanceMap delegations
string description
string endpoint
addr_t owner
vrf_pk_t vrf_key

◆ taraxa::state_api::DPOSConfig

struct taraxa::state_api::DPOSConfig
Class Members
uint32_t blocks_per_year
uint16_t commission_change_delta
uint32_t commission_change_frequency
uint16_t dag_proposers_reward
uint32_t delegation_delay
uint32_t delegation_locking_period
u256 eligibility_balance_threshold
vector< ValidatorInfo > initial_validators
uint16_t max_block_author_reward
u256 minimum_deposit
u256 validator_maximum_stake
u256 vote_eligibility_balance_step
uint16_t yield_percentage

◆ taraxa::state_api::Opts

struct taraxa::state_api::Opts
Class Members
uint32_t expected_max_trx_per_block
uint8_t max_trie_full_node_levels_to_cache

◆ taraxa::state_api::OptsDB

struct taraxa::state_api::OptsDB
Collaboration diagram for taraxa::state_api::OptsDB:
Class Members
string db_path
bool disable_most_recent_trie_value_views

Typedef Documentation

◆ BalanceMap

using taraxa::state_api::BalanceMap = typedef std::map<addr_t, u256>

Function Documentation

◆ append_json()

void taraxa::state_api::append_json ( Json::Value &  json,
const Config obj 
)

◆ c_method_args_rlp() [1/3]

template<typename Result , void(*)(taraxa_evm_Bytes, Result &) decode, void(*)(taraxa_evm_state_API_ptr, taraxa_evm_Bytes, taraxa_evm_BytesCallback, taraxa_evm_BytesCallback) fn, typename... Params>
Result taraxa::state_api::c_method_args_rlp ( taraxa_evm_state_API_ptr  this_c,
const Params &...  args 
)

◆ c_method_args_rlp() [2/3]

template<void(*)(taraxa_evm_state_API_ptr, taraxa_evm_Bytes, taraxa_evm_BytesCallback) fn, typename... Params>
void taraxa::state_api::c_method_args_rlp ( taraxa_evm_state_API_ptr  this_c,
const Params &...  args 
)

◆ c_method_args_rlp() [3/3]

template<typename Result , void(*)(taraxa_evm_Bytes, Result &) decode, void(*)(taraxa_evm_state_API_ptr, taraxa_evm_Bytes, taraxa_evm_BytesCallback, taraxa_evm_BytesCallback) fn, typename... Params>
void taraxa::state_api::c_method_args_rlp ( taraxa_evm_state_API_ptr  this_c,
dev::RLPStream encoding,
Result &  ret,
const Params &...  args 
)

◆ dec_json() [1/5]

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

◆ dec_json() [2/5]

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

◆ dec_json() [3/5]

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

◆ dec_json() [4/5]

void taraxa::state_api::dec_json ( const Json::Value &  json,
uint64_t  chain_id,
EVMChainConfig obj 
)

◆ dec_json() [5/5]

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

◆ decoder_cb_c()

template<typename Result , void(*)(taraxa_evm_Bytes, Result &) decode>
taraxa_evm_BytesCallback taraxa::state_api::decoder_cb_c ( Result &  res)

◆ enc_json() [1/4]

Json::Value taraxa::state_api::enc_json ( const BalanceMap obj)

◆ enc_json() [2/4]

Json::Value taraxa::state_api::enc_json ( const DPOSConfig obj)

◆ enc_json() [3/4]

Json::Value taraxa::state_api::enc_json ( const EVMChainConfig obj)

◆ enc_json() [4/4]

Json::Value taraxa::state_api::enc_json ( const ValidatorInfo obj)

◆ from_rlp()

template<typename Result >
void taraxa::state_api::from_rlp ( taraxa_evm_Bytes  b,
Result &  result 
)

◆ map_bytes() [1/2]

taraxa_evm_Bytes taraxa::state_api::map_bytes ( const bytes b)

◆ map_bytes() [2/2]

bytesConstRef taraxa::state_api::map_bytes ( const taraxa_evm_Bytes &  b)

◆ to_bytes()

void taraxa::state_api::to_bytes ( taraxa_evm_Bytes  b,
bytes result 
)

◆ to_h256()

void taraxa::state_api::to_h256 ( taraxa_evm_Bytes  b,
h256 result 
)

◆ to_str()

void taraxa::state_api::to_str ( taraxa_evm_Bytes  b,
string &  result 
)

◆ to_u256()

void taraxa::state_api::to_u256 ( taraxa_evm_Bytes  b,
u256 result 
)

Variable Documentation

◆ BlockNumberNIL

constexpr auto taraxa::state_api::BlockNumberNIL = std::numeric_limits<EthBlockNumber>::max()
staticconstexpr