Bitcoin ABC 0.30.5
P2P Digital Currency
|
#include <bench/bench.h>
#include <common/system.h>
#include <config.h>
#include <consensus/amount.h>
#include <node/context.h>
#include <node/miner.h>
#include <primitives/transaction.h>
#include <script/script.h>
#include <txmempool.h>
#include <util/string.h>
#include <validation.h>
#include <test/util/mining.h>
#include <test/util/setup_common.h>
#include <list>
#include <queue>
#include <vector>
Go to the source code of this file.
Functions | |
static std::vector< CTxIn > | createUTXOs (const Config &config, size_t n, node::NodeContext &node) |
Mine new utxos. More... | |
static CTransactionRef | toTx (const Config &config, CTxIn txin) |
Create a transaction spending a coinbase utxo. More... | |
static std::vector< CTransactionRef > | oneInOneOutChain (const Config &config, CTxIn utxo, const size_t chainLength) |
Creates a chain of transactions with 1-input-1-output. More... | |
static std::vector< CTransactionRef > | twoInOneOutTree (const Config &config, node::NodeContext &node, const size_t treeDepth) |
Creates a tree of transactions with 2-inputs-1-output. More... | |
static void | benchATMP (node::NodeContext &node, benchmark::Bench &bench, const std::vector< CTransactionRef > chainedTxs) |
Run benchmark on AcceptToMemoryPool. More... | |
static void | benchReorg (const Config &config, node::NodeContext &node, benchmark::Bench &bench, size_t reorgDepth, size_t chainSizePerBlock, bool includeMempoolTxRemoval) |
Run benchmark that reorganizes blocks with one-input-one-output transaction chains in them. More... | |
static void | benchGenerateNewBlock (const Config &config, node::NodeContext &node, benchmark::Bench &bench, const std::vector< std::vector< CTransactionRef > > &chains) |
static void | benchEviction (const Config &, benchmark::Bench &bench, const std::vector< std::vector< CTransactionRef > > &chains, bool revFee=true) |
static void | MempoolAcceptance50ChainedTxs (benchmark::Bench &bench) |
Tests a chain of 50 1-input-1-output transactions. More... | |
static void | MempoolAcceptance500ChainedTxs (benchmark::Bench &bench) |
Tests a chain of 500 1-input-1-output transactions. More... | |
static void | MempoolAcceptance63TxTree (benchmark::Bench &bench) |
Test a tree of 63 2-inputs-1-output transactions. More... | |
static void | MempoolAcceptance511TxTree (benchmark::Bench &bench) |
Test a tree of 511 2-inputs-1-output transactions. More... | |
static void | Reorg10BlocksWith50TxChain (benchmark::Bench &bench) |
Try to reorg a chain of depth 10 where each block has a 50 tx 1-input-1-output chain. More... | |
static void | Reorg10BlocksWith500TxChain (benchmark::Bench &bench) |
Try to reorg a chain of depth 10 where each block has a 500 tx 1-input-1-output chain. More... | |
static void | Reorg10BlocksWith50TxChainSkipMempool (benchmark::Bench &bench) |
Try to reorg a chain of depth 10 where each block has a 50 tx 1-input-1-output chain, skipping the process of removing transactions from the mempool during re-connect. More... | |
static void | Reorg10BlocksWith500TxChainSkipMempool (benchmark::Bench &bench) |
Try to reorg a chain of depth 10 where each block has a 500 tx 1-input-1-output chain, skipping the process of removing transactions from the mempool during re-connect. More... | |
static void | GenerateBlock50ChainedTxs (benchmark::Bench &bench) |
Generate a block with 50 1-input-1-output transactions. More... | |
static void | GenerateBlock500ChainedTxs (benchmark::Bench &bench) |
Generate a block with 500 1-input-1-output transactions. More... | |
static void | EvictChained50Tx (benchmark::Bench &bench) |
Fill a mempool then evict 2000 x 50 1-input-1-output transactions, CTxMemPool version, in order of increasing fee. More... | |
static void | EvictChained50TxRev (benchmark::Bench &bench) |
Fill a mempool then evict 2000 x 50 1-input-1-output transactions, CTxMemPool version, in order of decreasing fee. More... | |
BENCHMARK (MempoolAcceptance50ChainedTxs) | |
BENCHMARK (MempoolAcceptance500ChainedTxs) | |
BENCHMARK (MempoolAcceptance63TxTree) | |
BENCHMARK (MempoolAcceptance511TxTree) | |
BENCHMARK (Reorg10BlocksWith50TxChain) | |
BENCHMARK (Reorg10BlocksWith500TxChain) | |
BENCHMARK (Reorg10BlocksWith50TxChainSkipMempool) | |
BENCHMARK (Reorg10BlocksWith500TxChainSkipMempool) | |
BENCHMARK (GenerateBlock50ChainedTxs) | |
BENCHMARK (GenerateBlock500ChainedTxs) | |
BENCHMARK (EvictChained50Tx) | |
BENCHMARK (EvictChained50TxRev) | |
Variables | |
static const CScript | REDEEM_SCRIPT = CScript() << OP_DROP << OP_TRUE |
This file contains benchmarks focusing on chained transactions in the mempool. More... | |
static const CScript | SCRIPT_PUB_KEY |
static const CScript | SCRIPT_SIG |
|
static |
Run benchmark on AcceptToMemoryPool.
Definition at line 131 of file chained_tx.cpp.
|
static |
Definition at line 270 of file chained_tx.cpp.
|
static |
Definition at line 237 of file chained_tx.cpp.
BENCHMARK | ( | EvictChained50Tx | ) |
BENCHMARK | ( | EvictChained50TxRev | ) |
BENCHMARK | ( | GenerateBlock500ChainedTxs | ) |
BENCHMARK | ( | GenerateBlock50ChainedTxs | ) |
BENCHMARK | ( | MempoolAcceptance500ChainedTxs | ) |
BENCHMARK | ( | MempoolAcceptance50ChainedTxs | ) |
BENCHMARK | ( | MempoolAcceptance511TxTree | ) |
BENCHMARK | ( | MempoolAcceptance63TxTree | ) |
BENCHMARK | ( | Reorg10BlocksWith500TxChain | ) |
BENCHMARK | ( | Reorg10BlocksWith500TxChainSkipMempool | ) |
BENCHMARK | ( | Reorg10BlocksWith50TxChain | ) |
BENCHMARK | ( | Reorg10BlocksWith50TxChainSkipMempool | ) |
|
static |
Run benchmark that reorganizes blocks with one-input-one-output transaction chains in them.
If 'includeMempoolTxRemoval' is set, the benchmark will include the time it takes to remove the transactions of re-connected blocks from the mempool.
Definition at line 157 of file chained_tx.cpp.
|
static |
Mine new utxos.
Definition at line 37 of file chained_tx.cpp.
|
static |
Fill a mempool then evict 2000 x 50 1-input-1-output transactions, CTxMemPool version, in order of increasing fee.
Definition at line 419 of file chained_tx.cpp.
|
static |
Fill a mempool then evict 2000 x 50 1-input-1-output transactions, CTxMemPool version, in order of decreasing fee.
Definition at line 434 of file chained_tx.cpp.
|
static |
Generate a block with 500 1-input-1-output transactions.
Definition at line 409 of file chained_tx.cpp.
|
static |
Generate a block with 50 1-input-1-output transactions.
Definition at line 400 of file chained_tx.cpp.
|
static |
Tests a chain of 500 1-input-1-output transactions.
Definition at line 337 of file chained_tx.cpp.
|
static |
Tests a chain of 50 1-input-1-output transactions.
Definition at line 328 of file chained_tx.cpp.
|
static |
Test a tree of 511 2-inputs-1-output transactions.
Definition at line 356 of file chained_tx.cpp.
|
static |
Test a tree of 63 2-inputs-1-output transactions.
Definition at line 346 of file chained_tx.cpp.
|
static |
Creates a chain of transactions with 1-input-1-output.
Definition at line 64 of file chained_tx.cpp.
|
static |
Try to reorg a chain of depth 10 where each block has a 500 tx 1-input-1-output chain.
Definition at line 375 of file chained_tx.cpp.
|
static |
Try to reorg a chain of depth 10 where each block has a 500 tx 1-input-1-output chain, skipping the process of removing transactions from the mempool during re-connect.
Definition at line 393 of file chained_tx.cpp.
|
static |
Try to reorg a chain of depth 10 where each block has a 50 tx 1-input-1-output chain.
Definition at line 367 of file chained_tx.cpp.
|
static |
Try to reorg a chain of depth 10 where each block has a 50 tx 1-input-1-output chain, skipping the process of removing transactions from the mempool during re-connect.
Definition at line 384 of file chained_tx.cpp.
|
static |
Create a transaction spending a coinbase utxo.
Definition at line 54 of file chained_tx.cpp.
|
static |
Creates a tree of transactions with 2-inputs-1-output.
It has similar properties to a complete binary-tree, where the last transaction is the "top" of the tree.
Definition at line 85 of file chained_tx.cpp.
This file contains benchmarks focusing on chained transactions in the mempool.
Definition at line 27 of file chained_tx.cpp.
|
static |
Definition at line 29 of file chained_tx.cpp.
|
static |
Definition at line 33 of file chained_tx.cpp.