TARAXA
Transaction

Classes

class  taraxa::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  taraxa::TransactionManager
 TransactionManager class verifies and inserts incoming transactions in memory pool and handles saving transactions and all transactions state change. More...
 
class  taraxa::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...
 

Enumerations

enum class  taraxa::TransactionStatus { taraxa::Inserted = 0 , taraxa::InsertedNonProposable , taraxa::Known , taraxa::Overflow }
 TransactionStatus enum class defines current transaction status. More...
 

Detailed Description


Class Documentation

◆ taraxa::GasPricer

class taraxa::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.

Public Member Functions

 GasPricer (const GasPriceConfig &config, bool is_light_node=false, std::shared_ptr< DbStorage > db={})
 
 ~GasPricer ()
 
 GasPricer (const GasPricer &)=delete
 
 GasPricer (GasPricer &&)=delete
 
GasPriceroperator= (const GasPricer &)=delete
 
GasPriceroperator= (GasPricer &&)=delete
 
u256 bid () const
 returns current gas price More...
 
void update (const SharedTransactions &trxs)
 updates gas price after each executed block More...
 

Private Member Functions

void init (const std::shared_ptr< DbStorage > &db)
 initialize values on start from blocks in DB More...
 

Private Attributes

const uint64_t kPercentile
 
const u256 kMinimumPrice
 
const bool kIsLightNode
 
std::shared_mutex mutex_
 
u256 latest_price_
 
boost::circular_buffer< u256price_list_
 
std::unique_ptr< std::thread > init_daemon_
 

Constructor & Destructor Documentation

◆ GasPricer() [1/3]

taraxa::GasPricer::GasPricer ( const GasPriceConfig config,
bool  is_light_node = false,
std::shared_ptr< DbStorage db = {} 
)

◆ ~GasPricer()

taraxa::GasPricer::~GasPricer ( )

◆ GasPricer() [2/3]

taraxa::GasPricer::GasPricer ( const GasPricer )
delete

◆ GasPricer() [3/3]

taraxa::GasPricer::GasPricer ( GasPricer &&  )
delete

Member Function Documentation

◆ bid()

u256 taraxa::GasPricer::bid ( ) const

returns current gas price

Returns
u256 gas price

◆ init()

void taraxa::GasPricer::init ( const std::shared_ptr< DbStorage > &  db)
private

initialize values on start from blocks in DB

Parameters
db

◆ operator=() [1/2]

GasPricer& taraxa::GasPricer::operator= ( const GasPricer )
delete

◆ operator=() [2/2]

GasPricer& taraxa::GasPricer::operator= ( GasPricer &&  )
delete

◆ update()

void taraxa::GasPricer::update ( const SharedTransactions trxs)

updates gas price after each executed block

Parameters
trxsfrom latest block

Member Data Documentation

◆ init_daemon_

std::unique_ptr<std::thread> taraxa::GasPricer::init_daemon_
private

◆ kIsLightNode

const bool taraxa::GasPricer::kIsLightNode
private

◆ kMinimumPrice

const u256 taraxa::GasPricer::kMinimumPrice
private

◆ kPercentile

const uint64_t taraxa::GasPricer::kPercentile
private

◆ latest_price_

u256 taraxa::GasPricer::latest_price_
private

◆ mutex_

std::shared_mutex taraxa::GasPricer::mutex_
mutableprivate

◆ price_list_

boost::circular_buffer<u256> taraxa::GasPricer::price_list_
private

◆ taraxa::TransactionManager

class taraxa::TransactionManager

TransactionManager class verifies and inserts incoming transactions in memory pool and handles saving transactions and all transactions state change.

Incoming new transactions can be verified with verifyTransaction functions and than inserted in the transaction pool with insertValidatedTransaction. Transactions are kept in transactions memory pool until they are included in a proposed dag block or received in an incoming dag block. Transaction verification consist of:

  • Verifying the format
  • Verifying signature
  • Verifying chan id
  • Verifying gas
  • Verifying nonce
  • Verifying balance

Verified transaction inserted in TransactionManager can be in three state:

  1. In transactions memory pool
  2. In Non-finalized DAG block
  3. Finalized transaction

Transaction transition to non-finalized block state is done with call to saveTransactionsFromDagBlock. Transaction transition to finalized block state is done with call to updateFinalizedTransactionsStatus

Class is thread safe in general with exception of two special methods: updateFinalizedTransactionsStatus and removeNonFinalizedTransactions. See details in function descriptions.

Collaboration diagram for taraxa::TransactionManager:

Public Member Functions

 TransactionManager (const FullNodeConfig &conf, std::shared_ptr< DbStorage > db, std::shared_ptr< final_chain::FinalChain > final_chain, addr_t node_addr)
 
uint64_t estimateTransactionGas (std::shared_ptr< Transaction > trx, std::optional< PbftPeriod > proposal_period) const
 Estimates required gas value to execute transaction. More...
 
std::pair< SharedTransactions, std::vector< uint64_t > > packTrxs (PbftPeriod proposal_period, uint64_t weight_limit)
 Gets transactions from pool to include in the block with specified weight limit. More...
 
std::vector< SharedTransactionsgetAllPoolTrxs ()
 Gets all transactions from pool grouped per account. More...
 
void saveTransactionsFromDagBlock (const SharedTransactions &trxs)
 
std::pair< bool, std::string > insertTransaction (const std::shared_ptr< Transaction > &trx)
 Inserts and verify new transaction to transaction pool. More...
 
void blockFinalized (EthBlockNumber block_number)
 Invoked when block finalized in final chain. More...
 
TransactionStatus insertValidatedTransaction (std::shared_ptr< Transaction > &&tx, bool insert_non_proposable=true)
 Inserts verified transaction to transaction pool. More...
 
bool isTransactionKnown (const trx_hash_t &trx_hash)
 
size_t getTransactionPoolSize () const
 
bool isTransactionPoolFull (size_t percentage=100) const
 return true if transaction pool is full More...
 
bool nonProposableTransactionsOverTheLimit () const
 return true if non proposable transactions are over the limit More...
 
size_t getNonfinalizedTrxSize () const
 
std::vector< std::shared_ptr< Transaction > > getNonfinalizedTrx (const std::vector< trx_hash_t > &hashes)
 Get the Nonfinalized Trx objects from cache. More...
 
std::unordered_set< trx_hash_texcludeFinalizedTransactions (const std::vector< trx_hash_t > &hashes)
 Exclude Finalized transactions. More...
 
SharedTransactions getBlockTransactions (const DagBlock &blk, PbftPeriod proposal_period)
 Get the block transactions. More...
 
SharedTransactions getTransactions (const vec_trx_t &trxs_hashes, PbftPeriod proposal_period)
 Get the transactions. More...
 
void updateFinalizedTransactionsStatus (const PeriodData &period_data)
 Updates the status of transactions to finalized IMPORTANT: This method is invoked on finalizing a pbft block, it needs to be protected with transactions_mutex_ but the mutex is locked from pbft manager for the entire pbft finalization process to make the finalization atomic. More...
 
void initializeRecentlyFinalizedTransactions (const PeriodData &period_data)
 Initialize recently finalized transactions. More...
 
void removeNonFinalizedTransactions (std::unordered_set< trx_hash_t > &&transactions)
 Removes non-finalized transactions from discarded old dag blocks IMPORTANT: This method is invoked on finalizing a pbft block, it needs to be protected with transactions_mutex_ but the mutex is locked from pbft manager for the entire pbft finalization process to make the finalization atomic. More...
 
std::shared_mutex & getTransactionsMutex ()
 Retrieves transactions mutex, only to be used when finalizing pbft block. More...
 
std::pair< std::vector< std::shared_ptr< Transaction > >, std::vector< trx_hash_t > > getPoolTransactions (const std::vector< trx_hash_t > &trx_to_query) const
 Gets transactions from transactions pool. More...
 
bool transactionsDropped () const
 Have transactions been recently dropped due to queue reaching max size This call is thread-safe. More...
 
std::shared_ptr< TransactiongetTransaction (const trx_hash_t &hash) const
 
std::shared_ptr< TransactiongetNonFinalizedTransaction (const trx_hash_t &hash) const
 
unsigned long getTransactionCount () const
 
void recoverNonfinalizedTransactions ()
 
std::pair< bool, std::string > verifyTransaction (const std::shared_ptr< Transaction > &trx) const
 

Public Attributes

util::Event< TransactionManager, h256 > const transaction_accepted_ {}
 

Private Member Functions

addr_t getFullNodeAddress () const
 

Private Attributes

const FullNodeConfigkConf
 
std::shared_mutex transactions_mutex_
 
TransactionQueue transactions_pool_
 
std::unordered_map< trx_hash_t, std::shared_ptr< Transaction > > nonfinalized_transactions_in_dag_
 
std::unordered_map< trx_hash_t, std::shared_ptr< Transaction > > recently_finalized_transactions_
 
std::unordered_map< PbftPeriod, std::vector< trx_hash_t > > recently_finalized_transactions_per_period_
 
uint64_t trx_count_ = 0
 
const uint64_t kDagBlockGasLimit
 
const uint64_t kEstimateGasLimit = 200000
 
const uint64_t kRecentlyFinalizedTransactionsMax = 50000
 
std::shared_ptr< DbStoragedb_ {nullptr}
 
std::shared_ptr< final_chain::FinalChainfinal_chain_ {nullptr}
 

Constructor & Destructor Documentation

◆ TransactionManager()

taraxa::TransactionManager::TransactionManager ( const FullNodeConfig conf,
std::shared_ptr< DbStorage db,
std::shared_ptr< final_chain::FinalChain final_chain,
addr_t  node_addr 
)

Member Function Documentation

◆ blockFinalized()

void taraxa::TransactionManager::blockFinalized ( EthBlockNumber  block_number)

Invoked when block finalized in final chain.

Parameters
block_numberblock number finalized

◆ estimateTransactionGas()

uint64_t taraxa::TransactionManager::estimateTransactionGas ( std::shared_ptr< Transaction trx,
std::optional< PbftPeriod proposal_period 
) const

Estimates required gas value to execute transaction.

Parameters
trxtransaction
proposal_periodproposal period
Returns
estimated gas value for transaction

◆ excludeFinalizedTransactions()

std::unordered_set< trx_hash_t > taraxa::TransactionManager::excludeFinalizedTransactions ( const std::vector< trx_hash_t > &  hashes)

Exclude Finalized transactions.

Parameters
hashes
Returns
Only transactions that are not finalized

◆ getAllPoolTrxs()

std::vector< SharedTransactions > taraxa::TransactionManager::getAllPoolTrxs ( )

Gets all transactions from pool grouped per account.

Returns
transactions

◆ getBlockTransactions()

SharedTransactions taraxa::TransactionManager::getBlockTransactions ( const DagBlock blk,
PbftPeriod  proposal_period 
)

Get the block transactions.

Parameters
blk
proposal_period
Returns
transactions retrieved from pool/db

◆ getFullNodeAddress()

addr_t taraxa::TransactionManager::getFullNodeAddress ( ) const
private

◆ getNonFinalizedTransaction()

std::shared_ptr<Transaction> taraxa::TransactionManager::getNonFinalizedTransaction ( const trx_hash_t hash) const

◆ getNonfinalizedTrx()

std::vector< std::shared_ptr< Transaction > > taraxa::TransactionManager::getNonfinalizedTrx ( const std::vector< trx_hash_t > &  hashes)

Get the Nonfinalized Trx objects from cache.

Parameters
hashes
Returns
std::vector<std::shared_ptr<Transaction>>

◆ getNonfinalizedTrxSize()

size_t taraxa::TransactionManager::getNonfinalizedTrxSize ( ) const

◆ getPoolTransactions()

std::pair< std::vector< std::shared_ptr< Transaction > >, std::vector< trx_hash_t > > taraxa::TransactionManager::getPoolTransactions ( const std::vector< trx_hash_t > &  trx_to_query) const

Gets transactions from transactions pool.

Parameters
trx_to_query
Returns
Returns transactions found and list of missing transactions hashes

◆ getTransaction()

std::shared_ptr< Transaction > taraxa::TransactionManager::getTransaction ( const trx_hash_t hash) const

◆ getTransactionCount()

unsigned long taraxa::TransactionManager::getTransactionCount ( ) const

◆ getTransactionPoolSize()

size_t taraxa::TransactionManager::getTransactionPoolSize ( ) const

◆ getTransactions()

SharedTransactions taraxa::TransactionManager::getTransactions ( const vec_trx_t trxs_hashes,
PbftPeriod  proposal_period 
)

Get the transactions.

Parameters
trxs_hashes
proposal_period
Returns
transactions retrieved from pool/db

◆ getTransactionsMutex()

std::shared_mutex& taraxa::TransactionManager::getTransactionsMutex ( )
inline

Retrieves transactions mutex, only to be used when finalizing pbft block.

Returns
mutex

◆ initializeRecentlyFinalizedTransactions()

void taraxa::TransactionManager::initializeRecentlyFinalizedTransactions ( const PeriodData period_data)

Initialize recently finalized transactions.

Parameters
period_dataperiod data

◆ insertTransaction()

std::pair< bool, std::string > taraxa::TransactionManager::insertTransaction ( const std::shared_ptr< Transaction > &  trx)

Inserts and verify new transaction to transaction pool.

Parameters
trxtransaction to be processed
Returns
std::pair<bool, std::string> -> pair<OK status, ERR message>

◆ insertValidatedTransaction()

TransactionStatus taraxa::TransactionManager::insertValidatedTransaction ( std::shared_ptr< Transaction > &&  tx,
bool  insert_non_proposable = true 
)

Inserts verified transaction to transaction pool.

Note
transaction might be already processed -> they are not processed and inserted again
Parameters
txtransaction to be processed
insert_non_proposableinsert non proposable transactions
Returns
transaction status

◆ isTransactionKnown()

bool taraxa::TransactionManager::isTransactionKnown ( const trx_hash_t trx_hash)
Parameters
trx_hashtransaction hash
Returns
Returns true if tx is known (was successfully verified and pushed into the tx pool), oth

◆ isTransactionPoolFull()

bool taraxa::TransactionManager::isTransactionPoolFull ( size_t  percentage = 100) const

return true if transaction pool is full

Parameters
percentagedefines percentage of fullness
Returns
true
false

◆ nonProposableTransactionsOverTheLimit()

bool taraxa::TransactionManager::nonProposableTransactionsOverTheLimit ( ) const

return true if non proposable transactions are over the limit

Returns
true
false

◆ packTrxs()

std::pair< SharedTransactions, std::vector< uint64_t > > taraxa::TransactionManager::packTrxs ( PbftPeriod  proposal_period,
uint64_t  weight_limit 
)

Gets transactions from pool to include in the block with specified weight limit.

Parameters
proposal_periodproposal period
weight_limitweight limit
Returns
transactions and weight estimations

Retrieve transactions to be included in proposed block

◆ recoverNonfinalizedTransactions()

void taraxa::TransactionManager::recoverNonfinalizedTransactions ( )

◆ removeNonFinalizedTransactions()

void taraxa::TransactionManager::removeNonFinalizedTransactions ( std::unordered_set< trx_hash_t > &&  transactions)

Removes non-finalized transactions from discarded old dag blocks IMPORTANT: This method is invoked on finalizing a pbft block, it needs to be protected with transactions_mutex_ but the mutex is locked from pbft manager for the entire pbft finalization process to make the finalization atomic.

Parameters
transactionstransactions to remove

◆ saveTransactionsFromDagBlock()

void taraxa::TransactionManager::saveTransactionsFromDagBlock ( const SharedTransactions trxs)

Saves transactions from dag block which was added to the DAG. Removes transactions from memory pool

◆ transactionsDropped()

bool taraxa::TransactionManager::transactionsDropped ( ) const

Have transactions been recently dropped due to queue reaching max size This call is thread-safe.

Returns
Returns true if txs were dropped

◆ updateFinalizedTransactionsStatus()

void taraxa::TransactionManager::updateFinalizedTransactionsStatus ( const PeriodData period_data)

Updates the status of transactions to finalized IMPORTANT: This method is invoked on finalizing a pbft block, it needs to be protected with transactions_mutex_ but the mutex is locked from pbft manager for the entire pbft finalization process to make the finalization atomic.

Parameters
period_dataperiod data
Returns
number of dag blocks finalized

Update transaction counters and state, it only has effect when PBFT syncing

◆ verifyTransaction()

std::pair< bool, std::string > taraxa::TransactionManager::verifyTransaction ( const std::shared_ptr< Transaction > &  trx) const

Member Data Documentation

◆ db_

std::shared_ptr<DbStorage> taraxa::TransactionManager::db_ {nullptr}
private

◆ final_chain_

std::shared_ptr<final_chain::FinalChain> taraxa::TransactionManager::final_chain_ {nullptr}
private

◆ kConf

const FullNodeConfig& taraxa::TransactionManager::kConf
private

◆ kDagBlockGasLimit

const uint64_t taraxa::TransactionManager::kDagBlockGasLimit
private

◆ kEstimateGasLimit

const uint64_t taraxa::TransactionManager::kEstimateGasLimit = 200000
private

◆ kRecentlyFinalizedTransactionsMax

const uint64_t taraxa::TransactionManager::kRecentlyFinalizedTransactionsMax = 50000
private

◆ nonfinalized_transactions_in_dag_

std::unordered_map<trx_hash_t, std::shared_ptr<Transaction> > taraxa::TransactionManager::nonfinalized_transactions_in_dag_
private

◆ recently_finalized_transactions_

std::unordered_map<trx_hash_t, std::shared_ptr<Transaction> > taraxa::TransactionManager::recently_finalized_transactions_
private

◆ recently_finalized_transactions_per_period_

std::unordered_map<PbftPeriod, std::vector<trx_hash_t> > taraxa::TransactionManager::recently_finalized_transactions_per_period_
private

◆ transaction_accepted_

util::Event<TransactionManager, h256> const taraxa::TransactionManager::transaction_accepted_ {}

◆ transactions_mutex_

std::shared_mutex taraxa::TransactionManager::transactions_mutex_
mutableprivate

◆ transactions_pool_

TransactionQueue taraxa::TransactionManager::transactions_pool_
private

◆ trx_count_

uint64_t taraxa::TransactionManager::trx_count_ = 0
private

◆ taraxa::TransactionQueue

class taraxa::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.

TransactionQueue stores two type of transactions: Transactions that can be included in a proposed DAG block and non proposable transactions which are not to be used for proposal but an incoming DAG block could contain such transactions. Non proposable transactions can expire if no DAG block that contains them is received within the kNonProposableTransactionsPeriodExpiryLimit.

This is NOT thread safe class. It is proteced only by transactions_mutex_ in the TransactionsManager !!!

Collaboration diagram for taraxa::TransactionQueue:

Public Member Functions

 TransactionQueue (std::shared_ptr< final_chain::FinalChain > final_chain, size_t max_size=kMinTransactionPoolSize)
 
TransactionStatus insert (std::shared_ptr< Transaction > &&transaction, bool proposable, uint64_t last_block_number=0)
 insert a transaction into the queue, sorted by priority More...
 
bool erase (const trx_hash_t &hash)
 remove transaction from queue More...
 
std::shared_ptr< Transactionget (const trx_hash_t &hash) const
 returns the transaction or null More...
 
std::vector< std::shared_ptr< Transaction > > getOrderedTransactions (uint64_t count) const
 returns up to the number of requested transaction sorted by priority. This call actually sorts the transaction so it is expensive and should be used only when needed More...
 
std::vector< SharedTransactionsgetAllTransactions () const
 returns all transactions grouped by transactions author More...
 
bool contains (const trx_hash_t &hash) const
 returns true/false if the transaction is in the queue More...
 
size_t size () const
 returns size of priority queue More...
 
void blockFinalized (uint64_t block_number)
 Invoked when block finalized in final chain. More...
 
void purge ()
 Removes any transactions that are no longer proposable. More...
 
void markTransactionKnown (const trx_hash_t &trx_hash)
 Marks transaction as known (was successfully pushed into the tx pool) This call is thread-safe. More...
 
bool isTransactionKnown (const trx_hash_t &trx_hash) const
 
bool transactionsDropped () const
 Have transactions been recently dropped due to queue reaching max size This call is thread-safe. More...
 
bool nonProposableTransactionsOverTheLimit () const
 return true if non proposable transactions are over the limit More...
 

Private Attributes

std::unordered_map< addr_t, std::map< val_t, std::shared_ptr< Transaction > > > account_nonce_transactions_
 
std::unordered_map< trx_hash_t, std::shared_ptr< Transaction > > queue_transactions_
 
std::unordered_map< trx_hash_t, std::pair< uint64_t, std::shared_ptr< Transaction > > > non_proposable_transactions_
 
ExpirationCache< trx_hash_tknown_txs_
 
std::chrono::system_clock::time_point transaction_overflow_time_
 
const std::chrono::seconds kTransactionOverflowTimeLimit {600}
 
const size_t kNonProposableTransactionsPeriodExpiryLimit = 10
 
const size_t kNonProposableTransactionsLimitPercentage = 20
 
const size_t kSingleAccountTransactionsLimitPercentage = 5
 
const size_t kNonProposableTransactionsMaxSize
 
const size_t kMaxSize
 
const size_t kMaxSingleAccountTransactionsSize
 
std::shared_ptr< final_chain::FinalChainfinal_chain_
 

Constructor & Destructor Documentation

◆ TransactionQueue()

taraxa::TransactionQueue::TransactionQueue ( std::shared_ptr< final_chain::FinalChain final_chain,
size_t  max_size = kMinTransactionPoolSize 
)

Member Function Documentation

◆ blockFinalized()

void taraxa::TransactionQueue::blockFinalized ( uint64_t  block_number)

Invoked when block finalized in final chain.

Parameters
block_numberblock number finalized

◆ contains()

bool taraxa::TransactionQueue::contains ( const trx_hash_t hash) const

returns true/false if the transaction is in the queue

Parameters
hash
Returns
true
false

◆ erase()

bool taraxa::TransactionQueue::erase ( const trx_hash_t hash)

remove transaction from queue

Parameters
hash
Returns
true
false

◆ get()

std::shared_ptr< Transaction > taraxa::TransactionQueue::get ( const trx_hash_t hash) const

returns the transaction or null

Parameters
hash
Returns
std::shared_ptr<Transaction>

◆ getAllTransactions()

std::vector< SharedTransactions > taraxa::TransactionQueue::getAllTransactions ( ) const

returns all transactions grouped by transactions author

Returns
std::vector<SharedTransactions>

◆ getOrderedTransactions()

SharedTransactions taraxa::TransactionQueue::getOrderedTransactions ( uint64_t  count) const

returns up to the number of requested transaction sorted by priority. This call actually sorts the transaction so it is expensive and should be used only when needed

Parameters
count
Returns
std::vector<std::shared_ptr<Transaction>>

◆ insert()

TransactionStatus taraxa::TransactionQueue::insert ( std::shared_ptr< Transaction > &&  transaction,
bool  proposable,
uint64_t  last_block_number = 0 
)

insert a transaction into the queue, sorted by priority

Parameters
transaction
last_block_number
Returns
TransactionStatus

◆ isTransactionKnown()

bool taraxa::TransactionQueue::isTransactionKnown ( const trx_hash_t trx_hash) const
Parameters
trx_hashtransaction hash This call is thread-safe
Returns
Returns true if tx is known (was successfully pushed into the tx pool)

◆ markTransactionKnown()

void taraxa::TransactionQueue::markTransactionKnown ( const trx_hash_t trx_hash)

Marks transaction as known (was successfully pushed into the tx pool) This call is thread-safe.

Parameters
trx_hashtransaction hash

◆ nonProposableTransactionsOverTheLimit()

bool taraxa::TransactionQueue::nonProposableTransactionsOverTheLimit ( ) const

return true if non proposable transactions are over the limit

Returns
true
false

◆ purge()

void taraxa::TransactionQueue::purge ( )

Removes any transactions that are no longer proposable.

Parameters
final_chain

◆ size()

size_t taraxa::TransactionQueue::size ( ) const

returns size of priority queue

Returns
size_t

◆ transactionsDropped()

bool taraxa::TransactionQueue::transactionsDropped ( ) const
inline

Have transactions been recently dropped due to queue reaching max size This call is thread-safe.

Returns
Returns true if txs were dropped

Member Data Documentation

◆ account_nonce_transactions_

std::unordered_map<addr_t, std::map<val_t, std::shared_ptr<Transaction> > > taraxa::TransactionQueue::account_nonce_transactions_
private

◆ final_chain_

std::shared_ptr<final_chain::FinalChain> taraxa::TransactionQueue::final_chain_
private

◆ kMaxSingleAccountTransactionsSize

const size_t taraxa::TransactionQueue::kMaxSingleAccountTransactionsSize
private

◆ kMaxSize

const size_t taraxa::TransactionQueue::kMaxSize
private

◆ kNonProposableTransactionsLimitPercentage

const size_t taraxa::TransactionQueue::kNonProposableTransactionsLimitPercentage = 20
private

◆ kNonProposableTransactionsMaxSize

const size_t taraxa::TransactionQueue::kNonProposableTransactionsMaxSize
private

◆ kNonProposableTransactionsPeriodExpiryLimit

const size_t taraxa::TransactionQueue::kNonProposableTransactionsPeriodExpiryLimit = 10
private

◆ known_txs_

ExpirationCache<trx_hash_t> taraxa::TransactionQueue::known_txs_
private

◆ kSingleAccountTransactionsLimitPercentage

const size_t taraxa::TransactionQueue::kSingleAccountTransactionsLimitPercentage = 5
private

◆ kTransactionOverflowTimeLimit

const std::chrono::seconds taraxa::TransactionQueue::kTransactionOverflowTimeLimit {600}
private

◆ non_proposable_transactions_

std::unordered_map<trx_hash_t, std::pair<uint64_t, std::shared_ptr<Transaction> > > taraxa::TransactionQueue::non_proposable_transactions_
private

◆ queue_transactions_

std::unordered_map<trx_hash_t, std::shared_ptr<Transaction> > taraxa::TransactionQueue::queue_transactions_
private

◆ transaction_overflow_time_

std::chrono::system_clock::time_point taraxa::TransactionQueue::transaction_overflow_time_
private

Enumeration Type Documentation

◆ TransactionStatus

TransactionStatus enum class defines current transaction status.

Enumerator
Inserted 
InsertedNonProposable 
Known 
Overflow