bitcoin/src/bench
Ava Chow 011a895a82
Merge bitcoin/bitcoin#29015: kernel: Streamline util library
c7376babd1 doc: Clarify distinction between util and common libraries in libraries.md (Ryan Ofsky)
4f74c59334 util: Move util/string.h functions to util namespace (Ryan Ofsky)
4d05d3f3b4 util: add TransactionError includes and namespace declarations (Ryan Ofsky)
680eafdc74 util: move fees.h and error.h to common/messages.h (Ryan Ofsky)
02e62c6c9a common: Add PSBTError enum (Ryan Ofsky)
0d44c44ae3 util: move error.h TransactionError enum to node/types.h (Ryan Ofsky)
9bcce2608d util: move spanparsing.h to script/parsing.h (Ryan Ofsky)
6dd2ad4792 util: move spanparsing.h Split functions to string.h (Ryan Ofsky)
23cc8ddff4 util: move HexStr and HexDigit from util to crypto (TheCharlatan)
6861f954f8 util: move util/message to common/signmessage (Ryan Ofsky)
cc5f29fbea build: move memory_cleanse from util to crypto (Ryan Ofsky)
5b9309420c build: move chainparamsbase from util to common (Ryan Ofsky)
ffa27af24d test: Add check-deps.sh script to check for unexpected library dependencies (Ryan Ofsky)

Pull request description:

  Remove `fees.h`, `errors.h`, and `spanparsing.h` from the util library. Specifically:

  - Move `Split` functions from `util/spanparsing.h` to `util/string.h`, using `util` namespace for clarity.
  - Move remaining spanparsing functions to `script/parsing.h` since they are used for descriptor and miniscript parsing.
  - Combine `util/fees.h` and `util/errors.h` into `common/messages.h` so there is a place for simple functions that generate user messages to live, and these functions are not part of the util library.

  Motivation for this change is that the util library is a dependency of the kernel, and we should remove functionality from util that shouldn't be called by kernel code or kernel applications. These changes should also improve code organization and make functions easier to discover. Some of these same moves are (or were) part of #28690, but did not help with code organization, or made it worse, so it is better to move them and clean them up in the same PR so code only has to change one time.

ACKs for top commit:
  achow101:
    ACK c7376babd1
  TheCharlatan:
    Re-ACK c7376babd1
  hebasto:
    re-ACK c7376babd1.

Tree-SHA512: 5bcef16c1255463b1b69270548711e7ff78ca0dd34e300b95e3ca1ce52ceb34f83d9ddb2839e83800ba36b200de30396e504bbb04fa02c6d0c24a16d06ae523d
2024-06-12 17:12:54 -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 util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05:00
bench.h Extract util::Xor, Add key_offset option, Add bench 2023-07-12 09:59:55 +02:00
bench_bitcoin.cpp util: Move util/string.h functions to util namespace 2024-05-16 10:16:08 -05: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
checkblockindex.cpp bench: add benchmark for checkblockindex 2024-03-20 16:30:04 -04: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