bitcoin/src/test/fuzz
glozow 821f5c824f
Merge bitcoin/bitcoin#25487: [kernel 3b/n] Decouple {Dump,Load}Mempool from ArgsManager
cb3e9a1e3f Move {Load,Dump}Mempool to kernel namespace (Carl Dong)
aa30676541 Move DEFAULT_PERSIST_MEMPOOL out of libbitcoinkernel (Carl Dong)
06b88ffb8a LoadMempool: Pass in load_path, stop using gArgs (Carl Dong)
b857ac60d9 test/fuzz: Invoke LoadMempool via CChainState (Carl Dong)
b3267258b0 Move FopenFn to fsbridge namespace (Carl Dong)
ae1e8e3756 mempool: Use NodeClock+friends for LoadMempool (Carl Dong)
f9e8e5719f mempool: Improve comments for [GS]etLoadTried (Carl Dong)
813962da0b scripted-diff: Rename m_is_loaded -> m_load_tried (Carl Dong)
413f4bb52b DumpMempool: Pass in dump_path, stop using gArgs (Carl Dong)
bd4407817e DumpMempool: Use std::chrono instead of weird int64_t arthmetics (Carl Dong)
c84390b741 test/mempool_persist: Test manual savemempool when -persistmempool=0 (Carl Dong)

Pull request description:

  This is part of the `libbitcoinkernel` project: #24303, https://github.com/bitcoin/bitcoin/projects/18

  -----

  This PR moves `{Dump,Load}Mempool` into its own `kernel/mempool_persist` module and introduces `ArgsManager` `node::` helpers in `node/mempool_persist_args`to remove the scattered calls to `GetBoolArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)`.

  More context can be gleaned from the commit messages.

  -----

  One thing I was reflecting on as I wrote this was that in the long run, I think we should probably invert the validation <-> mempool relationship. Instead of mempool not depending on validation, it might make more sense to have validation not depend on mempool. Not super urgent since `libbitcoinkernel` will include both validation and mempool, but perhaps something for the future.

ACKs for top commit:
  glozow:
    re ACK cb3e9a1e3f via `git range-diff 7ae032e...cb3e9a1`
  MarcoFalke:
    ACK cb3e9a1e3f 🔒
  ryanofsky:
    Code review ACK cb3e9a1e3f

Tree-SHA512: 979d7237c3abb5a1dd9b5ad3dbf3b954f906a6d8320ed7b923557f41a4472deccae3e8a6bca0018c8e7a3c4a93afecc502acd1e26756f2054f157f1c0edd939d
2022-07-18 16:09:27 +01:00
..
addition_overflow.cpp util: Add SaturatingAdd helper 2022-02-21 14:32:53 +01:00
addrman.cpp [net] Move asmap into NetGroupManager 2022-04-20 14:29:29 +01:00
asmap.cpp [netgroupman] Add GetMappedAS() and GetGroup() 2022-04-20 14:35:52 +01:00
asmap_direct.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
autofile.cpp Use spans of std::byte in serialize 2022-01-02 11:40:31 +01:00
banman.cpp scripted-diff: Use clang-tidy syntax for C++ named arguments 2021-11-19 12:41:47 +01:00
base_encode_decode.cpp Use std::string_view throughout util strencodings/string 2022-04-27 14:13:39 +02:00
bech32.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
block.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
block_header.cpp
blockfilter.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
bloom_filter.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
buffered_file.cpp Use spans of std::byte in serialize 2022-01-02 11:40:31 +01:00
chain.cpp Require CBlockIndex::RaiseValidity() to hold cs_main 2022-01-25 20:43:28 +01:00
checkqueue.cpp test, bench: make prevector and checkqueue swap member functions noexcept 2022-04-28 20:34:43 +02:00
coins_view.cpp fuzz: Remove useless GetUTXOStats fuzz case 2022-05-20 16:33:24 -04:00
connman.cpp [net] Move asmap into NetGroupManager 2022-04-20 14:29:29 +01:00
crypto.cpp fuzz: Use LIMITED_WHILE instead of limit_max_ops 2021-08-21 19:25:33 +02:00
crypto_aes256.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
crypto_aes256cbc.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
crypto_chacha20.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
crypto_chacha20_poly1305_aead.cpp Move AdditionOverflow to util, Add CheckedAdd with unit tests 2021-12-17 10:46:39 +01:00
crypto_common.cpp
crypto_diff_fuzz_chacha20.cpp Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant) 2022-04-26 10:41:45 +01:00
crypto_hkdf_hmac_sha256_l32.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
crypto_poly1305.cpp
cuckoocache.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
decode_tx.cpp
descriptor_parse.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
deserialize.cpp [net] Move asmap into NetGroupManager 2022-04-20 14:29:29 +01:00
eval_script.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
fee_rate.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
fees.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
flatfile.cpp
float.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
fuzz.cpp Remove unused GetTimeSeconds 2022-05-11 16:39:23 +02:00
fuzz.h fuzz: Use LIMITED_WHILE instead of limit_max_ops 2021-08-21 19:25:33 +02:00
FuzzedDataProvider.h
golomb_rice.cpp scripted-diff: rename MapIntoRange to FastRange64 2022-01-06 11:29:55 -05:00
hex.cpp util: Add ParseHex<std::byte>() helper 2022-04-27 19:53:17 +02:00
http_request.cpp Use std::string_view throughout util strencodings/string 2022-04-27 14:13:39 +02:00
i2p.cpp
integer.cpp Merge bitcoin/bitcoin#23438: refactor: Use spans of std::byte in serialize 2022-01-27 19:19:12 +01:00
key.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
key_io.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
kitchen_sink.cpp
load_external_block_file.cpp
locale.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
mempool_utils.h test/fuzz: Invoke LoadMempool via CChainState 2022-07-15 12:26:00 -04:00
merkleblock.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
message.cpp
miniscript.cpp miniscript: mark nodes with duplicate keys as insane 2022-05-30 15:16:43 +02:00
minisketch.cpp Add src/node/* code to node:: namespace 2022-01-06 22:14:16 -05:00
muhash.cpp fuzz: Cleanup muhash fuzz target 2021-09-22 10:39:08 +02:00
multiplication_overflow.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
net.cpp [net processing] Move tx relay data to Peer 2022-03-18 11:35:56 +00:00
net_permissions.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
netaddress.cpp net: remove unused CNetAddr::GetHash() 2022-02-11 15:21:52 +01:00
netbase_dns_lookup.cpp p2p, refactor: drop unused DNSLookupFn param in LookupSubnet() 2021-12-07 13:13:18 +01:00
node_eviction.cpp [net] Add connection type to NodeEvictionCandidate 2022-07-04 14:58:43 +02:00
p2p_transport_serialization.cpp scripted-diff: Rename CNetMessage::m_command with CNetMessage::m_type 2022-01-15 20:59:19 +02:00
parse_hd_keypath.cpp
parse_iso8601.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
parse_numbers.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
parse_script.cpp
parse_univalue.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
policy_estimator.cpp fees: Pass in a filepath instead of referencing gArgs 2022-06-28 16:08:34 -04:00
policy_estimator_io.cpp fees: Pass in a filepath instead of referencing gArgs 2022-06-28 16:08:34 -04:00
pow.cpp Move AdditionOverflow to util, Add CheckedAdd with unit tests 2021-12-17 10:46:39 +01:00
prevector.cpp test, bench: make prevector and checkqueue swap member functions noexcept 2022-04-28 20:34:43 +02:00
primitives_transaction.cpp
process_message.cpp move-only: InitializeNode to handshake helper 2022-07-12 08:41:34 +02:00
process_messages.cpp move-only: InitializeNode to handshake helper 2022-07-12 08:41:34 +02:00
protocol.cpp
psbt.cpp Make DecodeBase{32,64} always return vector, not string 2022-04-27 14:12:55 +02:00
random.cpp
rbf.cpp pool: Add and use MemPoolOptions, ApplyArgsManOptions 2022-06-28 15:30:05 -04:00
rolling_bloom_filter.cpp scripted-diff: Move bloom to src/common 2021-10-05 11:10:37 +02:00
rpc.cpp [rpc] add new submitpackage RPC 2022-06-23 14:35:04 +01:00
script.cpp fuzz: Split script formatting from script fuzz target 2022-02-15 12:19:34 +01:00
script_assets_test_minimizer.cpp scripted-diff: Use getInt<T> over get_int/get_int64 2022-05-18 19:15:03 +02:00
script_bitcoin_consensus.cpp
script_descriptor_cache.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
script_flags.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
script_format.cpp refactor: merge ScriptPubKeyToUniv & ScriptToUniv into one function 2022-03-30 20:00:23 +01:00
script_interpreter.cpp
script_ops.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
script_sigcache.cpp
script_sign.cpp refactor: Change * to & in MutableTransactionSignatureCreator 2022-05-04 11:49:29 +02:00
scriptnum_ops.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
secp256k1_ec_seckey_import_export_der.cpp
secp256k1_ecdsa_signature_parse_der_lax.cpp
signature_checker.cpp refactor: use C++11 default initializers 2022-05-17 17:18:58 +01:00
signet.cpp
socks5.cpp
span.cpp
spanparsing.cpp
string.cpp fuzz: SplitString with multiple separators 2022-05-04 07:34:48 +02:00
strprintf.cpp
system.cpp fuzz: Fix memory leak in system fuzz target 2021-09-29 13:24:14 +02:00
timedata.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
torcontrol.cpp fuzz: replace every fuzzer-controlled loop with a LIMITED_WHILE loop 2021-11-12 19:51:55 +00:00
transaction.cpp refactor: use named args when ScriptToUniv or TxToUniv are invoked 2022-03-30 20:00:27 +01:00
tx_in.cpp
tx_out.cpp Move minRelayTxFee to policy/settings 2022-05-31 15:05:57 +02:00
tx_pool.cpp test/fuzz: Invoke LoadMempool via CChainState 2022-07-15 12:26:00 -04:00
txorphan.cpp fuzz: Fix assert bug in txorphan target 2022-07-17 08:04:24 +08:00
txrequest.cpp scripted-diff: Bump copyright headers 2021-12-30 19:36:57 +02:00
util.cpp move-only: InitializeNode to handshake helper 2022-07-12 08:41:34 +02:00
util.h move-only: InitializeNode to handshake helper 2022-07-12 08:41:34 +02:00
utxo_snapshot.cpp validation: remove redundant CChainParams params from ChainstateManager methods 2022-05-10 12:09:33 +10:00
validation_load_mempool.cpp Move {Load,Dump}Mempool to kernel namespace 2022-07-15 12:26:20 -04:00
versionbits.cpp rpc: getdeploymentinfo: include signalling info 2022-01-15 04:37:56 +10:00