elements/src/bench
glozow f34fe0806a
Merge bitcoin/bitcoin#31122: cluster mempool: Implement changeset interface for mempool
5736d1ddac tracing: pass if replaced by tx/pkg to tracepoint (0xb10c)
a4ec07f194 doc: add comments for CTxMemPool::ChangeSet (Suhas Daftuar)
83f814b1d1 Remove m_all_conflicts from SubPackageState (Suhas Daftuar)
d3c8e7dfb6 Ensure that we don't add duplicate transactions in rbf fuzz tests (Suhas Daftuar)
d7dc9fd2f7 Move CalculateChunksForRBF() to the mempool changeset (Suhas Daftuar)
284a1d33f1 Move prioritisation into changeset (Suhas Daftuar)
446b08b599 Don't distinguish between direct conflicts and all conflicts when doing cluster-size-2-rbf checks (Suhas Daftuar)
b53041021a Duplicate transactions are not permitted within a changeset (Suhas Daftuar)
b447416fdd Public mempool removal methods Assume() no changeset is outstanding (Suhas Daftuar)
2b30f4d36c Make RemoveStaged() private (Suhas Daftuar)
18829194ca Enforce that there is only one changeset at a time (Suhas Daftuar)
7fb62f7db6 Apply mempool changeset transactions directly into the mempool (Suhas Daftuar)
34b6c5833d Clean up FinalizeSubpackage to avoid workspace-specific information (Suhas Daftuar)
57983b8add Move LimitMempoolSize to take place outside FinalizeSubpackage (Suhas Daftuar)
01e145b975 Move changeset from workspace to subpackage (Suhas Daftuar)
802214c083 Introduce mempool changesets (Suhas Daftuar)
87d92fa340 test: Add unit test coverage of package rbf + prioritisetransaction (Suhas Daftuar)
15d982f91e Add package hash to package-rbf log message (Suhas Daftuar)

Pull request description:

  part of cluster mempool: #30289

  It became clear while working on cluster mempool that it would be helpful for transaction validation if we could consider a full set of proposed changes to the mempool -- consisting of a set of transactions to add, and a set of transactions (ie conflicts) to simultaneously remove -- and perform calculations on what the mempool would look like if the proposed changes were to be applied.  Two specific examples of where we'd like to do this:

  - Determining if ancestor/descendant/TRUC limits would be violated (in the future, cluster limits) if either a single transaction or a package of transactions were to be accepted
  - Determining if an RBF would make the mempool "better", however that idea is defined, both in the single transaction and package of transaction cases

  In preparation for cluster mempool, I have pulled this reworking of the mempool interface out of #28676 so it can be reviewed on its own.  I have not re-implemented ancestor/descendant limits to be run through the changeset, since with cluster mempool those limits will be going away, so this seems like wasted effort.  However, I have rebased #28676 on top of this branch so reviewers can see what the new mempool interface could look like in the cluster mempool setting.

  There are some minor behavior changes here, which I believe are inconsequential:
  - In the package validation setting, transactions would be added to the mempool before the `ConsensusScriptChecks()` are run. In theory, `ConsensusScriptChecks()` should always pass if the `PolicyScriptChecks()` have passed and it's just a belt-and-suspenders for us, but if somehow they were to diverge then there could be some small behavior change from adding transactions and then removing them, versus never adding them at all.
  - The error reporting on `CheckConflictTopology()` has slightly changed due to no longer distinguishing between direct conflicts and indirect conflicts. I believe this should be entirely inconsequential because there shouldn't be a logical difference between those two ideas from the perspective of this function, but I did have to update some error strings in some tests.
  - Because, in a package setting, RBFs now happen as part of the entire package being accepted, the logging has changed slightly because we do not know which transaction specifically evicted a given removed transaction.
    -  Specifically, the "package hash" is now used to reference the set of transactions that are being accepted, rather than any single txid. The log message relating to package RBF that happen in the `TXPACKAGES` category has been updated as well to include the package hash, so that it's possible to see which specific set of transactions are being referenced by that package hash.
    - Relatedly, the tracepoint logging in the package rbf case has been updated as well to reference the package hash, rather than a transaction hash.

ACKs for top commit:
  naumenkogs:
    ACK 5736d1ddac
  instagibbs:
    ACK 5736d1ddac
  ismaelsadeeq:
    reACK 5736d1ddac
  glozow:
    ACK 5736d1ddac

Tree-SHA512: 21810872e082920d337c89ac406085aa71c5f8e5151ab07aedf41e6601f60a909b22fbf462ef3b735d5d5881e9b76142c53957158e674dd5dfe6f6aabbdf630b
2024-11-20 07:48:29 -05:00
..
data Add deserialize + CheckBlock benchmarks, and a full block hex 2016-11-09 11:27:59 -08:00
addrman.cpp addrman: change Select to support multiple networks 2024-09-10 12:58:54 -03:00
base58.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
bech32.cpp refactor: Hand-replace some ParseHex -> ""_hex 2024-08-28 19:11:59 +02:00
bench.cpp bench: add support for custom data directory 2024-11-11 11:31:04 -05:00
bench.h bench: add support for custom data directory 2024-11-11 11:31:04 -05:00
bench_bitcoin.cpp bench: add support for custom data directory 2024-11-11 11:31:04 -05:00
bip324_ecdh.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
block_assemble.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
ccoins_caching.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
chacha20.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
checkblock.cpp test: Use span for raw data 2024-09-05 10:57:19 +02:00
checkblockindex.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
checkqueue.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
cluster_linearize.cpp clusterlin: make DepGraph::AddDependency support multiple dependencies at once 2024-10-07 13:47:52 -04:00
CMakeLists.txt bench: Add basic CheckEphemeralSpends benchmark 2024-11-12 09:41:24 -05:00
coin_selection.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
crypto_hash.cpp Refactor SipHash_32b benchmark to improve accuracy and avoid optimization issues 2024-11-03 12:36:49 +01:00
descriptors.cpp Merge bitcoin/bitcoin#22838: descriptors: Be able to specify change and receiving in a single descriptor string 2024-08-28 15:56:15 +01:00
disconnected_transactions.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
duplicate_inputs.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
ellswift.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
examples.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
gcs_filter.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
hashpadding.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
index_blockfilter.cpp scripted-diff: Replace ParseHex[<std::byte>]("str") -> "str"_hex[_u8] 2024-08-28 19:11:59 +02:00
load_external.cpp test: Use span for raw data 2024-09-05 10:57:19 +02:00
lockedpool.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
logging.cpp bench: Remove redundant logging benchmarks 2024-09-05 07:17:22 +02:00
mempool_ephemeral_spends.cpp Apply mempool changeset transactions directly into the mempool 2024-11-13 13:26:56 -05:00
mempool_eviction.cpp Apply mempool changeset transactions directly into the mempool 2024-11-13 13:26:56 -05:00
mempool_stress.cpp Apply mempool changeset transactions directly into the mempool 2024-11-13 13:26:56 -05:00
merkle_root.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
nanobench.cpp Replace current benchmarking framework with nanobench 2020-06-13 12:24:18 +02:00
nanobench.h bench: Update nanobench to 4.3.11 2023-11-14 20:22:12 +01:00
parse_hex.cpp Add benchmark for TryParseHex 2024-02-28 17:23:54 +00:00
peer_eviction.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
poly1305.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
pool.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
prevector.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
random.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
readblock.cpp test: Use span for raw data 2024-09-05 10:57:19 +02:00
rollingbloom.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
rpc_blockchain.cpp test: Use span for raw data 2024-09-05 10:57:19 +02:00
rpc_mempool.cpp Apply mempool changeset transactions directly into the mempool 2024-11-13 13:26:56 -05:00
sign_transaction.cpp Merge bitcoin/bitcoin#30571: test: [refactor] Use m_rng directly 2024-08-28 16:56:32 +01:00
streams_findbyte.cpp streams: cache file position within AutoFile 2024-09-13 07:35:41 -04:00
strencodings.cpp test: Use span for raw data 2024-09-05 10:57:19 +02:00
util_time.cpp refactor: Remove unused GetTimeMillis 2023-05-08 12:40:48 +02:00
verify_script.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
wallet_balance.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
wallet_create.cpp scripted-diff: drop config/ subdir for bitcoin-config.h, rename to bitcoin-build-config.h 2024-10-10 12:22:12 +02:00
wallet_create_tx.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00
wallet_ismine.cpp scripted-diff: drop config/ subdir for bitcoin-config.h, rename to bitcoin-build-config.h 2024-10-10 12:22:12 +02:00
wallet_loading.cpp scripted-diff: drop config/ subdir for bitcoin-config.h, rename to bitcoin-build-config.h 2024-10-10 12:22:12 +02:00
wallet_migration.cpp bench: add coverage for wallet migration process 2024-10-21 08:29:22 -03:00
xor.cpp bench: [refactor] iwyu 2024-08-27 07:33:59 +02:00