|
TARAXA
|
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...
#include <dag_block.hpp>

Public Member Functions | |
| DagBlock ()=default | |
| DagBlock (blk_hash_t pivot, level_t level, vec_blk_t tips, vec_trx_t trxs, uint64_t est, sig_t signature, blk_hash_t hash, addr_t sender) | |
| DagBlock (blk_hash_t pivot, level_t level, vec_blk_t tips, vec_trx_t trxs, sig_t signature, blk_hash_t hash, addr_t sender) | |
| DagBlock (blk_hash_t const &pivot, level_t level, vec_blk_t tips, vec_trx_t trxs, secret_t const &sk) | |
| DagBlock (blk_hash_t const &pivot, level_t level, vec_blk_t tips, vec_trx_t trxs, uint64_t est, VdfSortition vdf, secret_t const &sk) | |
| DagBlock (Json::Value const &doc) | |
| DagBlock (std::string const &json) | |
| DagBlock (dev::RLP const &_rlp) | |
| DagBlock (dev::RLP const &_rlp, vec_trx_t &&trxs) | |
| DagBlock (dev::bytes const &_rlp) | |
| bool | operator== (DagBlock const &other) const |
| auto const & | getPivot () const |
| auto | getLevel () const |
| auto | getTimestamp () const |
| auto const & | getTips () const |
| auto const & | getTrxs () const |
| auto const & | getGasEstimation () const |
| auto const & | getSig () const |
| blk_hash_t const & | getHash () const |
| uint16_t | getDifficulty () const |
| addr_t const & | getSender () const |
| Json::Value | getJson (bool with_derived_fields=true) const |
| std::string | getJsonStr () const |
| bool | verifySig () const |
| void | verifyVdf (const SortitionParams &vdf_config, const h256 &proposal_period_hash, const vrf_wrapper::vrf_pk_t &pk, uint64_t vote_count, uint64_t total_vote_count) const |
| bytes | rlp (bool include_sig, bool include_trxs=true) const |
| dev::RLPStream | streamRLP (bool include_sig, bool include_trxs=true) const |
| Returns dag block data rlp stream. | |
Static Public Member Functions | |
| static level_t | extract_dag_level_from_rlp (const dev::RLP &rlp) |
| Extracts dag level from rlp representation. | |
| static sig_t | extract_signature_from_rlp (const dev::RLP &rlp) |
| Extracts signature from rlp representation. | |
Private Member Functions | |
| blk_hash_t | sha3 (bool include_sig) const |
Private Attributes | |
| blk_hash_t | pivot_ |
| level_t | level_ = 0 |
| vec_blk_t | tips_ |
| vec_trx_t | trxs_ |
| uint64_t | gas_estimation_ |
| sig_t | sig_ |
| u256 | block_weight_ |
| blk_hash_t | hash_ |
| util::DefaultConstructCopyableMovable< std::mutex > | hash_mu_ |
| uint64_t | timestamp_ = 0 |
| vdf_sortition::VdfSortition | vdf_ |
| addr_t | cached_sender_ |
| util::DefaultConstructCopyableMovable< std::mutex > | cached_sender_mu_ |
Static Private Attributes | |
| static const size_t | kLevelPosInRlp {1} |
| static const size_t | kSigPosInRlp {6} |
Friends | |
| std::ostream & | operator<< (std::ostream &str, DagBlock const &u) |
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.
|
default |
| taraxa::DagBlock::DagBlock | ( | blk_hash_t | pivot, |
| level_t | level, | ||
| vec_blk_t | tips, | ||
| vec_trx_t | trxs, | ||
| uint64_t | est, | ||
| sig_t | signature, | ||
| blk_hash_t | hash, | ||
| addr_t | sender | ||
| ) |
| taraxa::DagBlock::DagBlock | ( | blk_hash_t | pivot, |
| level_t | level, | ||
| vec_blk_t | tips, | ||
| vec_trx_t | trxs, | ||
| sig_t | signature, | ||
| blk_hash_t | hash, | ||
| addr_t | sender | ||
| ) |
| taraxa::DagBlock::DagBlock | ( | blk_hash_t const & | pivot, |
| level_t | level, | ||
| vec_blk_t | tips, | ||
| vec_trx_t | trxs, | ||
| secret_t const & | sk | ||
| ) |
| taraxa::DagBlock::DagBlock | ( | blk_hash_t const & | pivot, |
| level_t | level, | ||
| vec_blk_t | tips, | ||
| vec_trx_t | trxs, | ||
| uint64_t | est, | ||
| VdfSortition | vdf, | ||
| secret_t const & | sk | ||
| ) |
|
explicit |
|
explicit |
|
explicit |
|
inlineexplicit |
Extracts dag level from rlp representation.
| rlp |
Extracts signature from rlp representation.
| rlp |
|
inline |
|
inline |
| blk_hash_t const & taraxa::DagBlock::getHash | ( | ) | const |
| Json::Value taraxa::DagBlock::getJson | ( | bool | with_derived_fields = true | ) | const |
| std::string taraxa::DagBlock::getJsonStr | ( | ) | const |
|
inline |
|
inline |
| addr_t const & taraxa::DagBlock::getSender | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void taraxa::DagBlock::rlp | ( | bool | include_sig, |
| bool | include_trxs = true |
||
| ) | const |
|
private |
| dev::RLPStream taraxa::DagBlock::streamRLP | ( | bool | include_sig, |
| bool | include_trxs = true |
||
| ) | const |
| bool taraxa::DagBlock::verifySig | ( | ) | const |
| void taraxa::DagBlock::verifyVdf | ( | const SortitionParams & | vdf_config, |
| const h256 & | proposal_period_hash, | ||
| const vrf_wrapper::vrf_pk_t & | pk, | ||
| uint64_t | vote_count, | ||
| uint64_t | total_vote_count | ||
| ) | const |
|
friend |
|
private |
|
mutableprivate |
|
mutableprivate |
|
private |
|
mutableprivate |
|
mutableprivate |
|
staticprivate |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |