0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-10 10:52:31 -05:00
bitcoin-bitcoin-core/src/test/fuzz
merge-script 053a5fc7d9
Merge bitcoin/bitcoin#22762: Raise InitError when peers.dat is invalid or corrupted
fa55c3dc1b Raise InitError when peers.dat is invalid or corrupted (MarcoFalke)
fa4e2ccfd8 Inline ReadPeerAddresses (MarcoFalke)
fa5aeec80c Move LoadAddrman from init to addrdb (MarcoFalke)

Pull request description:

  peers.dat is silently erased when it can not be parsed or when it appears corrupted. Fix that by notifying the user. This might help in the following examples:

  * The user provided the database, but picked the wrong one.
  * A future version of Bitcoin Core wrote the file and it can't be read.
  * The file was corrupted by a logic bug in Bitcoin Core.
  * The file was corrupted by a disk failure.

ACKs for top commit:
  jonatack:
    Code review re-ACK fa55c3dc1b per `git range-diff eb1f570 fa59c6d fa55c3` and verified the new tests fail on master, except "Check mocked addrman is valid", as expected
  prayank23:
    tACK fa55c3dc1b
  vasild:
    ACK fa55c3dc1b

Tree-SHA512: 78264a78ee570a3c3262cf9c8542b5ffaffa5f52da1eef66c8c381f346989272967cfe1769c573502d9d7d3f7ad68c3ac3b2ec734185d2e4e7595b7122b14196
2021-09-10 11:41:20 +02:00
..
addition_overflow.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
addrman.cpp [asmap] Remove SanityCheckASMap() from netaddress 2021-09-07 13:31:10 +01:00
asmap.cpp [asmap] Remove SanityCheckASMap() from netaddress 2021-09-07 13:31:10 +01:00
asmap_direct.cpp test: add missing netaddress include headers 2021-03-16 19:52:37 +01:00
autofile.cpp scripted-diff: remove Optional & nullopt 2021-03-15 10:41:30 +08:00
banman.cpp fuzz: Use LIMITED_WHILE instead of limit_max_ops 2021-08-21 19:25:33 +02:00
base_encode_decode.cpp fuzz: add missing ECCVerifyHandle to base_encode_decode 2021-06-18 23:13:07 +00:00
bech32.cpp Implement Bech32m encoding/decoding 2021-03-15 17:26:35 -07:00
block.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
block_header.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
blockfilter.cpp fuzz: Avoid timeout in blockfilter fuzz target 2021-08-20 15:45:15 +02:00
bloom_filter.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
buffered_file.cpp scripted-diff: remove Optional & nullopt 2021-03-15 10:41:30 +08:00
chain.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
checkqueue.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
coins_view.cpp Merge bitcoin/bitcoin#22232: refactor: Pass interpreter flags as uint32_t instead of signed int 2021-07-20 15:36:23 +02:00
connman.cpp [addrman] Set m_asmap in CAddrMan initializer list 2021-08-27 10:55:41 +01:00
crypto.cpp fuzz: Use LIMITED_WHILE instead of limit_max_ops 2021-08-21 19:25:33 +02:00
crypto_aes256.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
crypto_aes256cbc.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
crypto_chacha20.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
crypto_chacha20_poly1305_aead.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
crypto_common.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
crypto_hkdf_hmac_sha256_l32.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
crypto_poly1305.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
cuckoocache.cpp build: Fix fuzz-cuckoocache cross-compiling for Windows with DEBUG=1 2021-03-03 12:23:41 +02:00
data_stream.cpp Raise InitError when peers.dat is invalid or corrupted 2021-09-09 09:20:43 +02:00
decode_tx.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
descriptor_parse.cpp scripted-diff: remove MakeUnique<T>() 2021-03-11 13:45:14 +08:00
deserialize.cpp Merge bitcoin/bitcoin#22791: init: Fix asmap/addrman initialization order bug 2021-09-06 12:41:36 +02:00
eval_script.cpp scripted-diff: remove MakeUnique<T>() 2021-03-11 13:45:14 +08:00
fee_rate.cpp refactor: Make CFeeRate constructor architecture-independent 2021-05-18 07:13:25 +02:00
fees.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
flatfile.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
float.cpp fuzz: Increase branch coverage of the float fuzz target 2021-06-07 13:41:14 +02:00
fuzz.cpp fuzz: Terminate immediately if a fuzzing harness ever tries to perform a DNS lookup (belts and suspenders) 2021-05-21 19:41:43 +00:00
fuzz.h fuzz: Use LIMITED_WHILE instead of limit_max_ops 2021-08-21 19:25:33 +02:00
FuzzedDataProvider.h fuzz: Bump FuzzedDataProvider.h 2021-03-09 12:56:44 +01:00
golomb_rice.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
hex.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
http_request.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
i2p.cpp scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
integer.cpp Fix addrdb includes 2021-09-07 10:44:48 +02:00
key.cpp scripted-diff: remove MakeUnique<T>() 2021-03-11 13:45:14 +08:00
key_io.cpp fuzz: Move CTxDestination fuzzing to script fuzz target 2021-07-04 21:30:50 +02:00
kitchen_sink.cpp make ParseOutputType return a std::optional<OutputType> 2021-08-04 19:20:32 +08:00
load_external_block_file.cpp refactor: Remove chainparams arg from CChainState member functions 2021-06-13 09:43:54 +02:00
locale.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
merkleblock.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
message.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
muhash.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
multiplication_overflow.cpp build: Fix undefined reference to __mulodi4 2021-07-27 14:53:24 +03:00
net.cpp [net] Remove asmap argument from CNode::CopyStats() 2021-09-07 15:24:14 +01:00
net_permissions.cpp scripted-diff: rename NetPermissionFlags enumerators 2021-05-12 16:13:30 +02:00
netaddress.cpp fuzz: reduce possible networks check 2021-06-04 16:12:04 +02:00
netbase_dns_lookup.cpp p2p, refactor: pass and use uint16_t CService::port as uint16_t 2021-03-16 19:52:31 +01:00
node_eviction.cpp p2p: remove unused m_is_onion member from NodeEvictionCandidate struct 2021-06-14 13:58:05 +02:00
p2p_transport_serialization.cpp [fuzz] Occasional valid magic bytes for transport serialization test 2021-05-25 08:20:43 -07:00
parse_hd_keypath.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
parse_iso8601.cpp fuzz: Limit ParseISO8601DateTime fuzzing to 32-bit 2021-05-09 10:04:01 +02:00
parse_numbers.cpp util: make ParseMoney return a std::optional<CAmount> 2021-08-04 19:48:24 +08:00
parse_script.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
parse_univalue.cpp scripted-diff: remove MakeUnique<T>() 2021-03-11 13:45:14 +08:00
policy_estimator.cpp Move MakeNoLogFileContext to common libtest_util, and use it in bench 2021-03-03 09:17:37 +01:00
policy_estimator_io.cpp Move MakeNoLogFileContext to common libtest_util, and use it in bench 2021-03-03 09:17:37 +01:00
pow.cpp fuzz: [refactor] Use PickValue where possible 2021-03-24 06:57:55 +01:00
prevector.cpp fuzz: Use LIMITED_WHILE instead of limit_max_ops 2021-08-21 19:25:33 +02:00
primitives_transaction.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
process_message.cpp scripted-diff: Revert "fuzz: Add Temporary debug assert for oss-fuzz issue" 2021-07-19 19:12:54 +02:00
process_messages.cpp net: Restrict period when cs_vNodes mutex is locked 2021-04-22 17:28:39 +03:00
protocol.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
psbt.cpp fuzz: Extend psbt fuzz target a bit 2021-04-09 13:17:37 +02:00
random.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
rbf.cpp Merge #20560: fuzz: Link all targets once 2020-12-15 19:00:36 +01:00
rolling_bloom_filter.cpp fuzz: Use LIMITED_WHILE instead of limit_max_ops 2021-08-21 19:25:33 +02:00
rpc.cpp fuzz: Avoid timeout in EncodeBase58 2021-05-11 21:24:49 +02:00
script.cpp fuzz: Move CTxDestination fuzzing to script fuzz target 2021-07-04 21:30:50 +02:00
script_assets_test_minimizer.cpp fuzz: Limit toxic test globals to their respective scope 2021-05-04 09:24:17 +02:00
script_bitcoin_consensus.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
script_descriptor_cache.cpp refactor: post Optional<> removal cleanups 2021-03-17 14:56:20 +08:00
script_flags.cpp fuzz: Ensure prevout is consensus-valid 2021-04-25 10:36:00 +02:00
script_interpreter.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
script_ops.cpp fuzz: Run const CScript member functions only once 2021-05-12 10:20:59 +02:00
script_sigcache.cpp Merge #20560: fuzz: Link all targets once 2020-12-15 19:00:36 +01:00
script_sign.cpp Change SignTransaction's input_errors to use bilingual_str 2021-07-01 12:57:53 -04:00
scriptnum_ops.cpp scripted-diff: Rename MakeFuzzingContext to MakeNoLogFileContext 2021-02-22 10:27:22 +01:00
secp256k1_ec_seckey_import_export_der.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
secp256k1_ecdsa_signature_parse_der_lax.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
signature_checker.cpp fuzz: [refactor] Use IsValidFlagCombination in signature_checker fuzz target 2021-03-30 10:42:45 +02:00
signet.cpp Move MakeNoLogFileContext to common libtest_util, and use it in bench 2021-03-03 09:17:37 +01:00
socks5.cpp test: add missing netaddress include headers 2021-03-16 19:52:37 +01:00
span.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
spanparsing.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
string.cpp make ParseOutputType return a std::optional<OutputType> 2021-08-04 19:20:32 +08:00
strprintf.cpp fuzz: Remove strprintf test cases that are known to fail 2021-05-09 10:25:21 +02:00
system.cpp fuzz: Avoid OOM in system fuzz target 2021-08-06 12:31:28 +02:00
timedata.cpp fuzz: Limit max insertions in timedata fuzz test 2021-05-11 08:54:24 +02:00
torcontrol.cpp fuzz: Add missing include (test/util/setup_common.h) 2021-03-04 08:39:27 +01:00
transaction.cpp fuzz: Speed up transaction fuzz target 2021-05-20 17:26:24 +02:00
tx_in.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
tx_out.cpp scripted-diff: Bump copyright headers 2020-12-31 09:45:41 +01:00
tx_pool.cpp fuzz: Use LIMITED_WHILE instead of limit_max_ops 2021-08-21 19:25:33 +02:00
txrequest.cpp fuzz: Link all targets once 2020-12-10 07:15:42 +01:00
util.cpp Move implementations of non-template fuzz helpers 2021-07-14 18:45:53 +05:30
util.h Move implementations of non-template fuzz helpers 2021-07-14 18:45:53 +05:30
utxo_snapshot.cpp scripted-diff: Replace GetDataDir() calls with gArgs.GetDataDirNet() calls 2021-05-24 10:29:58 +02:00
validation_load_mempool.cpp fuzz: Initialize a TestingSetup for test_one_input 2021-06-10 15:04:39 -04:00
versionbits.cpp Move addrman includes from .h to .cpp 2021-09-07 10:44:43 +02:00