TARAXA
|
Typedefs | |
using | taraxa::final_chain::LogBloom = dev::h2048 |
using | taraxa::final_chain::LogBlooms = std::vector< LogBloom > |
using | taraxa::final_chain::Nonce = dev::h64 |
using | taraxa::final_chain::BlocksBlooms = std::array< LogBloom, c_bloomIndexSize > |
using | taraxa::final_chain::LogEntries = std::vector< LogEntry > |
using | taraxa::final_chain::TransactionReceipts = std::vector< TransactionReceipt > |
Variables | |
static constexpr auto | taraxa::final_chain::c_bloomIndexSize = 16 |
static constexpr auto | taraxa::final_chain::c_bloomIndexLevels = 2 |
struct taraxa::state_api::Account | taraxa::state_api::ZeroAccount |
struct taraxa::final_chain::BlockHeaderData |
Public Member Functions | |
dev::bytes | serializeForDB () const |
Public Attributes | |
h256 | parent_hash |
h256 | state_root |
h256 | transactions_root |
h256 | receipts_root |
LogBloom | log_bloom |
uint64_t | gas_used = 0 |
u256 | total_reward |
dev::bytes taraxa::final_chain::BlockHeaderData::serializeForDB | ( | ) | const |
uint64_t taraxa::final_chain::BlockHeaderData::gas_used = 0 |
LogBloom taraxa::final_chain::BlockHeaderData::log_bloom |
h256 taraxa::final_chain::BlockHeaderData::parent_hash |
h256 taraxa::final_chain::BlockHeaderData::receipts_root |
h256 taraxa::final_chain::BlockHeaderData::state_root |
u256 taraxa::final_chain::BlockHeaderData::total_reward |
h256 taraxa::final_chain::BlockHeaderData::transactions_root |
struct taraxa::final_chain::BlockHeader |
Public Member Functions | |
BlockHeader ()=default | |
BlockHeader (std::string &&raw_header_data) | |
BlockHeader (std::string &&raw_header_data, const PbftBlock &pbft, uint64_t gas_limit) | |
void | setFromPbft (const PbftBlock &pbft) |
dev::bytes | ethereumRlp () const |
Public Member Functions inherited from taraxa::final_chain::BlockHeaderData | |
dev::bytes | serializeForDB () const |
Static Public Member Functions | |
static h256 const & | unclesHash () |
static Nonce const & | nonce () |
static u256 const & | difficulty () |
static h256 const & | mixHash () |
Public Attributes | |
h256 | hash |
Address | author |
uint64_t | gas_limit = 0 |
uint64_t | timestamp = 0 |
EthBlockNumber | number = 0 |
bytes | extra_data |
Public Attributes inherited from taraxa::final_chain::BlockHeaderData | |
h256 | parent_hash |
h256 | state_root |
h256 | transactions_root |
h256 | receipts_root |
LogBloom | log_bloom |
uint64_t | gas_used = 0 |
u256 | total_reward |
|
default |
taraxa::final_chain::BlockHeader::BlockHeader | ( | std::string && | raw_header_data | ) |
taraxa::final_chain::BlockHeader::BlockHeader | ( | std::string && | raw_header_data, |
const PbftBlock & | pbft, | ||
uint64_t | gas_limit | ||
) |
|
static |
dev::bytes taraxa::final_chain::BlockHeader::ethereumRlp | ( | ) | const |
|
static |
|
static |
void taraxa::final_chain::BlockHeader::setFromPbft | ( | const PbftBlock & | pbft | ) |
|
static |
Address taraxa::final_chain::BlockHeader::author |
bytes taraxa::final_chain::BlockHeader::extra_data |
uint64_t taraxa::final_chain::BlockHeader::gas_limit = 0 |
h256 taraxa::final_chain::BlockHeader::hash |
EthBlockNumber taraxa::final_chain::BlockHeader::number = 0 |
uint64_t taraxa::final_chain::BlockHeader::timestamp = 0 |
struct taraxa::final_chain::LogEntry |
Public Member Functions | |
HAS_RLP_FIELDS LogBloom | bloom () const |
Public Attributes | |
Address | address |
h256s | topics |
bytes | data |
LogBloom taraxa::final_chain::LogEntry::bloom | ( | ) | const |
Address taraxa::final_chain::LogEntry::address |
bytes taraxa::final_chain::LogEntry::data |
h256s taraxa::final_chain::LogEntry::topics |
struct taraxa::final_chain::TransactionReceipt |
Public Member Functions | |
HAS_RLP_FIELDS LogBloom | bloom () const |
Public Attributes | |
uint8_t | status_code = 0 |
uint64_t | gas_used = 0 |
uint64_t | cumulative_gas_used = 0 |
LogEntries | logs |
std::optional< Address > | new_contract_address |
LogBloom taraxa::final_chain::TransactionReceipt::bloom | ( | ) | const |
uint64_t taraxa::final_chain::TransactionReceipt::cumulative_gas_used = 0 |
uint64_t taraxa::final_chain::TransactionReceipt::gas_used = 0 |
LogEntries taraxa::final_chain::TransactionReceipt::logs |
std::optional<Address> taraxa::final_chain::TransactionReceipt::new_contract_address |
uint8_t taraxa::final_chain::TransactionReceipt::status_code = 0 |
struct taraxa::final_chain::TransactionLocation |
Public Attributes | |
EthBlockNumber | period = 0 |
uint32_t | position = 0 |
bool | is_system = false |
bool taraxa::final_chain::TransactionLocation::is_system = false |
EthBlockNumber taraxa::final_chain::TransactionLocation::period = 0 |
uint32_t taraxa::final_chain::TransactionLocation::position = 0 |
struct taraxa::final_chain::NewBlock |
Public Attributes | |
addr_t | author |
uint64_t | timestamp |
std::vector< h256 > | dag_blk_hashes |
h256 | hash |
addr_t taraxa::final_chain::NewBlock::author |
std::vector<h256> taraxa::final_chain::NewBlock::dag_blk_hashes |
h256 taraxa::final_chain::NewBlock::hash |
uint64_t taraxa::final_chain::NewBlock::timestamp |
struct taraxa::final_chain::FinalizationResult |
Public Attributes | |
std::shared_ptr< BlockHeader const > | final_chain_blk |
SharedTransactions | trxs |
TransactionReceipts | trx_receipts |
Public Attributes inherited from taraxa::final_chain::NewBlock | |
addr_t | author |
uint64_t | timestamp |
std::vector< h256 > | dag_blk_hashes |
h256 | hash |
std::shared_ptr<BlockHeader const> taraxa::final_chain::FinalizationResult::final_chain_blk |
TransactionReceipts taraxa::final_chain::FinalizationResult::trx_receipts |
SharedTransactions taraxa::final_chain::FinalizationResult::trxs |
class taraxa::final_chain::FinalChain |
main responsibility is blocks execution in EVM, getting data from EVM state
Class have methods which you can call to get info from EVM and related state. Main thing here is finalize() method, that is called to execute some pbft block. It implements few events and implements methods related to Ethereum API
Public Member Functions | |
~FinalChain ()=default | |
FinalChain (const std::shared_ptr< DbStorage > &db, const taraxa::FullNodeConfig &config, const addr_t &node_addr) | |
FinalChain (const FinalChain &)=delete | |
FinalChain (FinalChain &&)=delete | |
FinalChain & | operator= (const FinalChain &)=delete |
FinalChain & | operator= (FinalChain &&)=delete |
void | stop () |
EthBlockNumber | delegationDelay () const |
std::future< std::shared_ptr< const FinalizationResult > > | finalize (PeriodData &&period_data, std::vector< h256 > &&finalized_dag_blk_hashes, std::shared_ptr< DagBlock > &&anchor=nullptr) |
Method which finalizes a block and executes it in EVM. More... | |
std::shared_ptr< const BlockHeader > | blockHeader (std::optional< EthBlockNumber > n={}) const |
Method to get block header by block number. More... | |
EthBlockNumber | lastBlockNumber () const |
Method to get last block number(chain size) More... | |
std::optional< EthBlockNumber > | blockNumber (h256 const &h) const |
Method to get block number by hash. More... | |
std::optional< h256 > | blockHash (std::optional< EthBlockNumber > n={}) const |
Method to get block hash by block number. More... | |
std::optional< h256 > | finalChainHash (EthBlockNumber n) const |
Method to get the final chain hash by block number. More... | |
void | updateStateConfig (const state_api::Config &new_config) |
Needed if we are changing params with hardfork and it affects Go part of code. For example DPOS contract. More... | |
std::shared_ptr< const TransactionHashes > | transactionHashes (std::optional< EthBlockNumber > n={}) const |
Method to get all transaction hashes from the block. More... | |
const SharedTransactions | transactions (std::optional< EthBlockNumber > n={}) const |
Method to get all transactions from the block. More... | |
std::optional< TransactionLocation > | transactionLocation (h256 const &trx_hash) const |
Method to get transaction location by hash. More... | |
std::optional< TransactionReceipt > | transactionReceipt (h256 const &_transactionHash) const |
Method to get transaction receipt by hash. More... | |
uint64_t | transactionCount (std::optional< EthBlockNumber > n={}) const |
Method to get transactions count in block. More... | |
std::vector< EthBlockNumber > | withBlockBloom (LogBloom const &b, EthBlockNumber from, EthBlockNumber to) const |
Method used to search for contract logs with bloom filter. More... | |
std::optional< state_api::Account > | getAccount (addr_t const &addr, std::optional< EthBlockNumber > blk_n={}) const |
Method to get account information. More... | |
h256 | getAccountStorage (addr_t const &addr, u256 const &key, std::optional< EthBlockNumber > blk_n={}) const |
Returns the value from a storage position at a given address. More... | |
bytes | getCode (addr_t const &addr, std::optional< EthBlockNumber > blk_n={}) const |
Returns code at a given address. More... | |
state_api::ExecutionResult | call (state_api::EVMTransaction const &trx, std::optional< EthBlockNumber > blk_n={}) const |
Executes a new message call immediately without creating a transaction on the block chain. That means that state would be reverted and not saved anywhere. More... | |
std::string | trace (std::vector< state_api::EVMTransaction > trx, EthBlockNumber blk_n, std::optional< state_api::Tracing > params={}) const |
Trace execution of a new message call immediately without creating a transactions on the block chain. That means that state would be reverted and not saved anywhere. More... | |
uint64_t | dposEligibleTotalVoteCount (EthBlockNumber blk_num) const |
total count of eligible votes are in DPOS precompiled contract More... | |
uint64_t | dposEligibleVoteCount (EthBlockNumber blk_num, addr_t const &addr) const |
total count of eligible votes account has in DPOS precompiled contract More... | |
bool | dposIsEligible (EthBlockNumber blk_num, addr_t const &addr) const |
method to check if address have enough votes to participate in consensus More... | |
vrf_wrapper::vrf_pk_t | dposGetVrfKey (EthBlockNumber blk_n, const addr_t &addr) const |
Get the vrf key object from DPOS state. More... | |
void | prune (EthBlockNumber blk_n) |
Prune state db for all blocks older than blk_n. More... | |
void | waitForFinalized () |
Wait until next block is finalized. More... | |
std::vector< state_api::ValidatorStake > | dposValidatorsTotalStakes (EthBlockNumber blk_num) const |
uint256_t | dposTotalAmountDelegated (EthBlockNumber blk_num) const |
std::vector< state_api::ValidatorVoteCount > | dposValidatorsVoteCounts (EthBlockNumber blk_num) const |
uint64_t | dposYield (EthBlockNumber blk_num) const |
u256 | dposTotalSupply (EthBlockNumber blk_num) const |
h256 | getBridgeRoot (EthBlockNumber blk_num) const |
h256 | getBridgeEpoch (EthBlockNumber blk_num) const |
std::pair< val_t, bool > | getBalance (addr_t const &addr) const |
std::shared_ptr< const FinalizationResult > | finalize_ (PeriodData &&new_blk, std::vector< h256 > &&finalized_dag_blk_hashes, std::shared_ptr< DagBlock > &&anchor) |
Public Attributes | |
decltype(block_finalized_emitter_) ::Subscriber const & | block_finalized_ = block_finalized_emitter_ |
decltype(block_applying_emitter_) ::Subscriber const & | block_applying_ = block_applying_emitter_ |
Protected Attributes | |
util::EventEmitter< std::shared_ptr< FinalizationResult > > const | block_finalized_emitter_ {} |
util::EventEmitter< uint64_t > const | block_applying_emitter_ {} |
Private Member Functions | |
std::shared_ptr< TransactionHashes > | getTransactionHashes (std::optional< EthBlockNumber > n={}) const |
const SharedTransactions | getTransactions (std::optional< EthBlockNumber > n={}) const |
std::shared_ptr< const BlockHeader > | getBlockHeader (EthBlockNumber n) const |
std::optional< h256 > | getBlockHash (EthBlockNumber n) const |
EthBlockNumber | lastIfAbsent (const std::optional< EthBlockNumber > &client_blk_n) const |
BlocksBlooms | blockBlooms (const h256 &chunk_id) const |
std::vector< EthBlockNumber > | withBlockBloom (const LogBloom &b, EthBlockNumber from, EthBlockNumber to, EthBlockNumber level, EthBlockNumber index) const |
bool | isNeedToFinalize (EthBlockNumber blk_num) const |
SharedTransaction | makeBridgeFinalizationTransaction () |
std::vector< SharedTransaction > | makeSystemTransactions (PbftPeriod blk_num) |
std::shared_ptr< BlockHeader > | makeGenesisHeader (std::string &&raw_header) const |
std::shared_ptr< BlockHeader > | makeGenesisHeader (const h256 &state_root) const |
std::shared_ptr< BlockHeader > | appendBlock (Batch &batch, const PbftBlock &pbft_blk, const h256 &state_root, u256 total_reward, const SharedTransactions &transactions={}, const TransactionReceipts &receipts={}) |
std::shared_ptr< BlockHeader > | appendBlock (Batch &batch, std::shared_ptr< BlockHeader > header, const SharedTransactions &transactions={}, const TransactionReceipts &receipts={}) |
Static Private Member Functions | |
static state_api::EVMTransaction | toEvmTransaction (const SharedTransaction &trx) |
static void | appendEvmTransactions (std::vector< state_api::EVMTransaction > &evm_trxs, const SharedTransactions &trxs) |
static h256 | blockBloomsChunkId (EthBlockNumber level, EthBlockNumber index) |
Private Attributes | |
std::shared_ptr< DbStorage > | db_ |
const uint64_t | kBlockGasLimit |
StateAPI | state_api_ |
const bool | kLightNode = false |
const uint32_t | kMaxLevelsPerPeriod |
rewards::Stats | rewards_ |
boost::asio::thread_pool | executor_thread_ {1} |
std::atomic< uint64_t > | num_executed_dag_blk_ = 0 |
std::atomic< uint64_t > | num_executed_trx_ = 0 |
EthBlockNumber | delegation_delay_ |
ValueByBlockCache< std::shared_ptr< const BlockHeader > > | block_headers_cache_ |
ValueByBlockCache< std::optional< const h256 > > | block_hashes_cache_ |
ValueByBlockCache< const SharedTransactions > | transactions_cache_ |
ValueByBlockCache< std::shared_ptr< const TransactionHashes > > | transaction_hashes_cache_ |
MapByBlockCache< addr_t, std::optional< const state_api::Account > > | accounts_cache_ |
ValueByBlockCache< uint64_t > | total_vote_count_cache_ |
MapByBlockCache< addr_t, uint64_t > | dpos_vote_count_cache_ |
MapByBlockCache< addr_t, uint64_t > | dpos_is_eligible_cache_ |
std::condition_variable | finalized_cv_ |
std::mutex | finalized_mtx_ |
std::atomic< EthBlockNumber > | last_block_number_ |
const FullNodeConfig & | kConfig |
|
default |
taraxa::final_chain::FinalChain::FinalChain | ( | const std::shared_ptr< DbStorage > & | db, |
const taraxa::FullNodeConfig & | config, | ||
const addr_t & | node_addr | ||
) |
|
delete |
|
delete |
|
private |
|
private |
|
staticprivate |
|
private |
|
staticprivate |
std::optional< h256 > taraxa::final_chain::FinalChain::blockHash | ( | std::optional< EthBlockNumber > | n = {} | ) | const |
Method to get block hash by block number.
n | EthBlockNumber |
std::shared_ptr< const BlockHeader > taraxa::final_chain::FinalChain::blockHeader | ( | std::optional< EthBlockNumber > | n = {} | ) | const |
Method to get block header by block number.
n | block number of header to get. If not specified then it returns latest |
std::optional< EthBlockNumber > taraxa::final_chain::FinalChain::blockNumber | ( | h256 const & | h | ) | const |
Method to get block number by hash.
h | block hash |
state_api::ExecutionResult taraxa::final_chain::FinalChain::call | ( | state_api::EVMTransaction const & | trx, |
std::optional< EthBlockNumber > | blk_n = {} |
||
) | const |
Executes a new message call immediately without creating a transaction on the block chain. That means that state would be reverted and not saved anywhere.
trx | state_api::EVMTransaction |
blk_n | EthBlockNumber number of block we are getting state from |
EthBlockNumber taraxa::final_chain::FinalChain::delegationDelay | ( | ) | const |
uint64_t taraxa::final_chain::FinalChain::dposEligibleTotalVoteCount | ( | EthBlockNumber | blk_num | ) | const |
total count of eligible votes are in DPOS precompiled contract
blk_num | EthBlockNumber number of block we are getting state from |
uint64_t taraxa::final_chain::FinalChain::dposEligibleVoteCount | ( | EthBlockNumber | blk_num, |
addr_t const & | addr | ||
) | const |
total count of eligible votes account has in DPOS precompiled contract
blk_num | EthBlockNumber number of block we are getting state from |
addr | account address |
vrf_wrapper::vrf_pk_t taraxa::final_chain::FinalChain::dposGetVrfKey | ( | EthBlockNumber | blk_n, |
const addr_t & | addr | ||
) | const |
Get the vrf key object from DPOS state.
addr | account address |
blk_n | number of block we are getting state from |
bool taraxa::final_chain::FinalChain::dposIsEligible | ( | EthBlockNumber | blk_num, |
addr_t const & | addr | ||
) | const |
method to check if address have enough votes to participate in consensus
blk_num | EthBlockNumber number of block we are getting state from |
addr | account address |
uint256_t taraxa::final_chain::FinalChain::dposTotalAmountDelegated | ( | EthBlockNumber | blk_num | ) | const |
u256 taraxa::final_chain::FinalChain::dposTotalSupply | ( | EthBlockNumber | blk_num | ) | const |
blk_num |
std::vector< state_api::ValidatorStake > taraxa::final_chain::FinalChain::dposValidatorsTotalStakes | ( | EthBlockNumber | blk_num | ) | const |
std::vector< state_api::ValidatorVoteCount > taraxa::final_chain::FinalChain::dposValidatorsVoteCounts | ( | EthBlockNumber | blk_num | ) | const |
blk_num |
uint64_t taraxa::final_chain::FinalChain::dposYield | ( | EthBlockNumber | blk_num | ) | const |
blk_num |
std::optional< h256 > taraxa::final_chain::FinalChain::finalChainHash | ( | EthBlockNumber | n | ) | const |
Method to get the final chain hash by block number.
n | block number |
std::future< std::shared_ptr< const FinalizationResult > > taraxa::final_chain::FinalChain::finalize | ( | PeriodData && | period_data, |
std::vector< h256 > && | finalized_dag_blk_hashes, | ||
std::shared_ptr< DagBlock > && | anchor = nullptr |
||
) |
Method which finalizes a block and executes it in EVM.
period_data | Full period data with transactions |
finalized_dag_blk_hashes | |
precommit_ext |
std::shared_ptr< const FinalizationResult > taraxa::final_chain::FinalChain::finalize_ | ( | PeriodData && | new_blk, |
std::vector< h256 > && | finalized_dag_blk_hashes, | ||
std::shared_ptr< DagBlock > && | anchor | ||
) |
std::optional< state_api::Account > taraxa::final_chain::FinalChain::getAccount | ( | addr_t const & | addr, |
std::optional< EthBlockNumber > | blk_n = {} |
||
) | const |
Method to get account information.
addr | account address |
blk_n | number of block we are getting state from |
h256 taraxa::final_chain::FinalChain::getAccountStorage | ( | addr_t const & | addr, |
u256 const & | key, | ||
std::optional< EthBlockNumber > | blk_n = {} |
||
) | const |
Returns the value from a storage position at a given address.
addr | account address |
key | position in the storage |
blk_n | number of block we are getting state from |
|
private |
|
private |
h256 taraxa::final_chain::FinalChain::getBridgeEpoch | ( | EthBlockNumber | blk_num | ) | const |
blk_num |
h256 taraxa::final_chain::FinalChain::getBridgeRoot | ( | EthBlockNumber | blk_num | ) | const |
blk_num |
bytes taraxa::final_chain::FinalChain::getCode | ( | addr_t const & | addr, |
std::optional< EthBlockNumber > | blk_n = {} |
||
) | const |
Returns code at a given address.
addr | account address |
blk_n | number of block we are getting state from |
|
private |
|
private |
|
private |
EthBlockNumber taraxa::final_chain::FinalChain::lastBlockNumber | ( | ) | const |
Method to get last block number(chain size)
|
private |
|
private |
|
private |
|
private |
|
private |
|
delete |
|
delete |
void taraxa::final_chain::FinalChain::prune | ( | EthBlockNumber | blk_n | ) |
Prune state db for all blocks older than blk_n.
blk_n | number of block we are getting state from |
void taraxa::final_chain::FinalChain::stop | ( | ) |
|
staticprivate |
std::string taraxa::final_chain::FinalChain::trace | ( | std::vector< state_api::EVMTransaction > | trx, |
EthBlockNumber | blk_n, | ||
std::optional< state_api::Tracing > | params = {} |
||
) | const |
Trace execution of a new message call immediately without creating a transactions on the block chain. That means that state would be reverted and not saved anywhere.
trxs | std::vector<state_api::EVMTransaction> vector of transaction to trace |
blk_n | EthBlockNumber number of block we are getting state from |
uint64_t taraxa::final_chain::FinalChain::transactionCount | ( | std::optional< EthBlockNumber > | n = {} | ) | const |
Method to get transactions count in block.
n | block number |
std::shared_ptr< const TransactionHashes > taraxa::final_chain::FinalChain::transactionHashes | ( | std::optional< EthBlockNumber > | n = {} | ) | const |
Method to get all transaction hashes from the block.
n | EthBlockNumber |
std::optional< TransactionLocation > taraxa::final_chain::FinalChain::transactionLocation | ( | h256 const & | trx_hash | ) | const |
Method to get transaction location by hash.
trx_hash | hash of transaction to get location for |
std::optional< TransactionReceipt > taraxa::final_chain::FinalChain::transactionReceipt | ( | h256 const & | _transactionHash | ) | const |
Method to get transaction receipt by hash.
_transactionHash | hash of transaction to get receipt for |
const SharedTransactions taraxa::final_chain::FinalChain::transactions | ( | std::optional< EthBlockNumber > | n = {} | ) | const |
Method to get all transactions from the block.
n | EthBlockNumber |
void taraxa::final_chain::FinalChain::updateStateConfig | ( | const state_api::Config & | new_config | ) |
Needed if we are changing params with hardfork and it affects Go part of code. For example DPOS contract.
new_config | state_api::Config |
void taraxa::final_chain::FinalChain::waitForFinalized | ( | ) |
Wait until next block is finalized.
|
private |
std::vector< EthBlockNumber > taraxa::final_chain::FinalChain::withBlockBloom | ( | LogBloom const & | b, |
EthBlockNumber | from, | ||
EthBlockNumber | to | ||
) | const |
Method used to search for contract logs with bloom filter.
b | LogBloom |
from | EthBlockNumber block to start search |
to | EthBlockNumber block to end search |
|
private |
decltype(block_applying_emitter_) ::Subscriber const& taraxa::final_chain::FinalChain::block_applying_ = block_applying_emitter_ |
|
protected |
decltype(block_finalized_emitter_) ::Subscriber const& taraxa::final_chain::FinalChain::block_finalized_ = block_finalized_emitter_ |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
class taraxa::state_api::StateAPI |
taraxa::state_api::StateAPI::StateAPI | ( | std::function< h256(EthBlockNumber)> | get_blk_hash, |
const Config & | state_config, | ||
const Opts & | opts, | ||
const OptsDB & | opts_db | ||
) |
taraxa::state_api::StateAPI::~StateAPI | ( | ) |
|
default |
|
default |
void taraxa::state_api::StateAPI::create_snapshot | ( | PbftPeriod | period | ) |
const RewardsDistributionResult & taraxa::state_api::StateAPI::distribute_rewards | ( | const std::vector< rewards::BlockStats > & | rewards_stats | ) |
uint64_t taraxa::state_api::StateAPI::dpos_eligible_total_vote_count | ( | EthBlockNumber | blk_num | ) | const |
uint64_t taraxa::state_api::StateAPI::dpos_eligible_vote_count | ( | EthBlockNumber | blk_num, |
const addr_t & | addr | ||
) | const |
vrf_wrapper::vrf_pk_t taraxa::state_api::StateAPI::dpos_get_vrf_key | ( | EthBlockNumber | blk_num, |
const addr_t & | addr | ||
) | const |
bool taraxa::state_api::StateAPI::dpos_is_eligible | ( | EthBlockNumber | blk_num, |
const addr_t & | addr | ||
) | const |
u256 taraxa::state_api::StateAPI::dpos_total_amount_delegated | ( | EthBlockNumber | blk_num | ) | const |
u256 taraxa::state_api::StateAPI::dpos_total_supply | ( | EthBlockNumber | blk_num | ) | const |
std::vector< ValidatorStake > taraxa::state_api::StateAPI::dpos_validators_total_stakes | ( | EthBlockNumber | blk_num | ) | const |
std::vector< ValidatorVoteCount > taraxa::state_api::StateAPI::dpos_validators_vote_counts | ( | EthBlockNumber | blk_num | ) | const |
uint64_t taraxa::state_api::StateAPI::dpos_yield | ( | EthBlockNumber | blk_num | ) | const |
ExecutionResult taraxa::state_api::StateAPI::dry_run_transaction | ( | EthBlockNumber | blk_num, |
const EVMBlock & | blk, | ||
const EVMTransaction & | trx | ||
) | const |
const TransactionsExecutionResult & taraxa::state_api::StateAPI::execute_transactions | ( | const EVMBlock & | block, |
const std::vector< EVMTransaction > & | transactions | ||
) |
std::optional< Account > taraxa::state_api::StateAPI::get_account | ( | EthBlockNumber | blk_num, |
const addr_t & | addr | ||
) | const |
h256 taraxa::state_api::StateAPI::get_account_storage | ( | EthBlockNumber | blk_num, |
const addr_t & | addr, | ||
const u256 & | key | ||
) | const |
bytes taraxa::state_api::StateAPI::get_code_by_address | ( | EthBlockNumber | blk_num, |
const addr_t & | addr | ||
) | const |
StateDescriptor taraxa::state_api::StateAPI::get_last_committed_state_descriptor | ( | ) | const |
u256 taraxa::state_api::StateAPI::get_staking_balance | ( | EthBlockNumber | blk_num, |
const addr_t & | addr | ||
) | const |
void taraxa::state_api::StateAPI::prune | ( | const std::vector< dev::h256 > & | state_root_to_keep, |
EthBlockNumber | blk_num | ||
) |
bytes taraxa::state_api::StateAPI::trace | ( | EthBlockNumber | blk_num, |
const EVMBlock & | blk, | ||
const std::vector< EVMTransaction > | trx, | ||
std::optional< Tracing > | params = {} |
||
) | const |
void taraxa::state_api::StateAPI::transition_state_commit | ( | ) |
void taraxa::state_api::StateAPI::update_state_config | ( | const Config & | new_config | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
struct taraxa::state_api::TaraxaEVMError |
Public Member Functions | |
TaraxaEVMError (std::string &&type, const std::string &msg) | |
Public Attributes | |
std::string const | type |
taraxa::state_api::TaraxaEVMError::TaraxaEVMError | ( | std::string && | type, |
const std::string & | msg | ||
) |
std::string const taraxa::state_api::TaraxaEVMError::type |
struct taraxa::state_api::ErrFutureBlock |
Public Member Functions | |
TaraxaEVMError (std::string &&type, const std::string &msg) | |
Public Member Functions inherited from taraxa::state_api::TaraxaEVMError | |
TaraxaEVMError (std::string &&type, const std::string &msg) | |
Additional Inherited Members | |
Public Attributes inherited from taraxa::state_api::TaraxaEVMError | |
std::string const | type |
taraxa::state_api::TaraxaEVMError::TaraxaEVMError |
struct taraxa::state_api::EVMBlock |
struct taraxa::state_api::EVMTransaction |
struct taraxa::state_api::UncleBlock |
Class Members | ||
---|---|---|
addr_t | author | |
EthBlockNumber | number |
struct taraxa::state_api::LogRecord |
struct taraxa::state_api::ExecutionResult |
struct taraxa::state_api::TransactionsExecutionResult |
Class Members | ||
---|---|---|
vector< ExecutionResult > | execution_results |
struct taraxa::state_api::RewardsDistributionResult |
struct taraxa::state_api::Account |
Public Member Functions | |
HAS_RLP_FIELDS h256 const & | storage_root_eth () const |
Public Attributes | |
trx_nonce_t | nonce = 0 |
u256 | balance |
h256 | storage_root_hash |
h256 | code_hash |
uint64_t | code_size = 0 |
h256 const & taraxa::state_api::Account::storage_root_eth | ( | ) | const |
u256 taraxa::state_api::Account::balance |
h256 taraxa::state_api::Account::code_hash |
uint64_t taraxa::state_api::Account::code_size = 0 |
trx_nonce_t taraxa::state_api::Account::nonce = 0 |
h256 taraxa::state_api::Account::storage_root_hash |
struct taraxa::state_api::StateDescriptor |
Class Members | ||
---|---|---|
EthBlockNumber | blk_num | |
h256 | state_root |
struct taraxa::state_api::ValidatorStake |
struct taraxa::state_api::ValidatorVoteCount |
using taraxa::final_chain::BlocksBlooms = typedef std::array<LogBloom, c_bloomIndexSize> |
using taraxa::final_chain::LogBloom = typedef dev::h2048 |
using taraxa::final_chain::LogBlooms = typedef std::vector<LogBloom> |
using taraxa::final_chain::LogEntries = typedef std::vector<LogEntry> |
using taraxa::final_chain::Nonce = typedef dev::h64 |
using taraxa::final_chain::TransactionReceipts = typedef std::vector<TransactionReceipt> |
|
staticconstexpr |
|
staticconstexpr |
struct taraxa::state_api::Account taraxa::state_api::ZeroAccount |