bitcoin/src/bench
Ava Chow 701b0cf2f3
Merge bitcoin/bitcoin#28366: Fix waste calculation in SelectionResult
bd34dd85e7 Use `exact_target` shorthand in coinselector_tests (Murch)
7aa7e30441 Fold GetSelectionWaste() into ComputeAndSetWaste() (Murch)

Pull request description:

  PR #26152 moved waste calculation into SelectionResult to be able to correct the waste score on basis of the bump_fee_group_discount for overlapping ancestries. This left two functions with largely overlapping purpose, where one was simply a wrapper of the other. This PR cleans up the overlap, and fixes the double-meaning of `change_cost` where the `GetChange()` function assumed that no change was created when `change_cost` was set to 0. This behavior was exploited in a bunch of tests, but is problematic, because a `change_cost` of 0 is permitted with custom settings for feerate and discard_feerate (i.e. when they’re both 0).

ACKs for top commit:
  achow101:
    ACK bd34dd85e7
  furszy:
    Code ACK bd34dd85e7
  ismaelsadeeq:
    Code Review ACK bd34dd85e7

Tree-SHA512: 83a2688d45d719dc61a64b5180fe136107faccf401a59df65245c05d701748a03e85ed56fde8c9b7ef39a3ab54374dd3718c559bda5b3f55dafedfd7fed25161
2024-06-04 18:37:18 -04:00
..
data Add deserialize + CheckBlock benchmarks, and a full block hex 2016-11-09 11:27:59 -08:00
.gitignore Ignore bench_bitcoin binary. 2015-10-06 17:46:12 +02:00
addrman.cpp p2p, refactor: return std::optional<CNetAddr> in LookupHost 2023-05-26 13:41:07 -03:00
base58.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
bech32.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
bench.cpp test: test_bitcoin: allow -testdatadir=<datadir> 2024-03-07 10:11:45 -07:00
bench.h Extract util::Xor, Add key_offset option, Add bench 2023-07-12 09:59:55 +02:00
bench_bitcoin.cpp move-only: Extract common/args and common/config.cpp from util/system 2023-04-19 10:48:30 +02:00
bip324_ecdh.cpp test: Use ECC_Context helper in bench and fuzz tests 2024-05-09 15:56:04 +02:00
block_assemble.cpp tidy: modernize-use-emplace 2023-10-12 11:27:19 +02:00
ccoins_caching.cpp test: Use ECC_Context helper in bench and fuzz tests 2024-05-09 15:56:04 +02:00
chacha20.cpp crypto: refactor ChaCha20 classes to use Span<std::byte> interface 2023-08-17 15:26:34 -04:00
checkblock.cpp Convert some CDataStream to DataStream 2023-11-16 11:14:13 +10:00
checkqueue.cpp test: Use ECC_Context helper in bench and fuzz tests 2024-05-09 15:56:04 +02:00
coin_selection.cpp Fold GetSelectionWaste() into ComputeAndSetWaste() 2024-05-24 14:53:54 -04:00
crypto_hash.cpp bench: Add SHA256 implementation specific benchmarks 2023-09-20 21:12:00 +01:00
data.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
data.h bench: Move generated data to a dedicated translation unit 2019-07-02 18:11:15 +01:00
descriptors.cpp test: Use ECC_Context helper in bench and fuzz tests 2024-05-09 15:56:04 +02:00
disconnected_transactions.cpp Use Txid in COutpoint 2023-11-21 13:15:44 +00:00
duplicate_inputs.cpp Use Txid in COutpoint 2023-11-21 13:15:44 +00:00
ellswift.cpp test: Use ECC_Context helper in bench and fuzz tests 2024-05-09 15:56:04 +02:00
examples.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
gcs_filter.cpp Fix clang-tidy readability-const-return-type violations 2023-02-01 11:33:35 +01:00
hashpadding.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
index_blockfilter.cpp bench: basic block filter index initial sync 2024-03-12 09:30:42 -03:00
load_external.cpp refactor: switch from CAutoFile to AutoFile 2023-11-18 03:01:41 +10:00
lockedpool.cpp clang-tidy: Add performance-inefficient-vector-operation check 2023-03-26 20:17:55 +01:00
logging.cpp refactor: Replace string chain name constants with ChainTypes 2023-05-09 15:49:14 +02:00
mempool_eviction.cpp mempool_entry: add mempool entry sequence number 2023-08-03 13:42:45 +10:00
mempool_stress.cpp Use Txid in COutpoint 2023-11-21 13:15:44 +00:00
merkle_root.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00: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 scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
poly1305.cpp Switch all callers from poly1305_auth to Poly1305 class 2023-07-12 22:43:55 -04:00
pool.cpp pool: make sure PoolAllocator uses the correct alignment 2023-11-19 18:43:29 +01:00
prevector.cpp bench: Add benchmark for prevector usage in std::vector 2023-03-26 15:49:41 +02:00
readblock.cpp validation, blockstorage: Separate code paths for reindex and saving new blocks 2024-05-14 14:54:27 -04:00
rollingbloom.cpp scripted-diff: Bump copyright headers 2022-12-24 23:49:50 +00:00
rpc_blockchain.cpp refactor: rpc: Pass CBlockIndex by reference instead of pointer 2023-12-07 12:05:21 +01:00
rpc_mempool.cpp mempool_entry: add mempool entry sequence number 2023-08-03 13:42:45 +10:00
streams_findbyte.cpp refactor: switch from CAutoFile to AutoFile 2023-11-18 03:01:41 +10:00
strencodings.cpp bench: explicitly make all current benchmarks "high" priority 2022-10-20 10:21:04 -03:00
util_time.cpp refactor: Remove unused GetTimeMillis 2023-05-08 12:40:48 +02:00
verify_script.cpp test: Use ECC_Context helper in bench and fuzz tests 2024-05-09 15:56:04 +02:00
wallet_balance.cpp refactor: De-globalize g_signals 2024-02-15 14:37:01 +01:00
wallet_create.cpp bench: bugfix, properly release wallet before erasing directory 2024-05-17 12:49:59 -03:00
wallet_create_tx.cpp test: wallet, fix change position out of range error 2023-12-12 15:20:38 -03:00
wallet_ismine.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
wallet_loading.cpp scripted-diff: Add IWYU pragma keep to bitcoin-config.h includes 2024-05-01 08:33:04 +02:00
xor.cpp Extract util::Xor, Add key_offset option, Add bench 2023-07-12 09:59:55 +02:00