aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2020-07-08Clean up separated ban/discourage interfacePieter Wuille
Github-Pull: #19219 Rebased-From: 2ad58381fffb33d611abf900b73d9e6b5a4e35f8
2020-07-08Replace automatic bans with discouragement filterPieter Wuille
This patch improves performance and resource usage around IP addresses that are banned for misbehavior. They're already not actually banned, as connections from them are still allowed, but they are preferred for eviction if the inbound connection slots are full. Stop treating these like manually banned IP ranges, and instead just keep them in a rolling Bloom filter of misbehaving nodes, which isn't persisted to disk or exposed through the ban framework. The effect remains the same: preferred for eviction, avoided for outgoing connections, and not relayed to other peers. Also change the name of this mechanism to better reflect reality; they're not banned, just discouraged. Contains release notes and several interface improvements by John Newbery. Github-Pull: #19219 Rebased-From: b691f2df5f7d443c0c9ee056ab94aa0fc19566d5
2020-07-03psbt: Allow both non_witness_utxo and witness_utxoAndrew Chow
Github-Pull: #19215 Rebased-From: 5279d8bc07d601fe6a67ad665fbc7591fe73c7de
2020-05-15fuzz: Remove enumeration of expected deserialization exceptions in ↵practicalswift
ProcessMessage(...) fuzzer Github-Pull: #18757 Rebased-From: fdceb6328382ac0f9d643f9d42ba0509062d7d48
2020-05-15test: Remove const to work around compiler error on xenialWladimir J. van der Laan
Fix the following error in travis: test/validationinterface_tests.cpp:26:36: error: default initialization of an object of const type 'const BlockValidationState' without a user-provided default constructor const BlockValidationState state_dummy; Github-Pull: #18975 Rebased-From: 050e2ee6f28e7b31c167013be7313726e34084e9
2020-05-15miner: Avoid stack-use-after-return in validationinterfaceMarcoFalke
This is achieved by switching to a shared_ptr. Also, switch the validationinterfaces in the tests to use shared_ptrs for the same reason. Github-Pull: #18742 Rebased-From: 7777f2a4bb1f9d843bc50a4e35085cfbb2808780
2020-05-15test: Add unregister_validation_interface_race testMarcoFalke
This commit is (intentionally) adding a broken test. The test is broken because it registering a subscriber object that can go out of scope while events are still being sent. To run the broken test and reproduce the bug: - Remove comment /** and */ - ./configure --with-sanitizers=address - export ASAN_OPTIONS=detect_leaks=0 - make - while ./src/test/test_bitcoin -t validationinterface_tests/unregister_validation_interface_race --catch_system_errors=no ; do true; done Github-Pull: #18742 Rebased-From: fab6d060ce5f580db538070beec1c5518c8c777c
2020-04-09Merge #18529: Add fuzzer version of randomized prevector testMarcoFalke
b1d24d1d031a2b2ce67bf846bafa1c3a499b7553 Reorder the test instructions by number (Pieter Wuille) c2ccadc26a04358b11539097c1aadb8d11b85c21 Merge and generalize case 3 and case 6 (Pieter Wuille) 402ad5aaca9509d45d861d77eb6431d6e1944f91 Only run sanity check once at the end (Pieter Wuille) eda8309bfc6a8c94f0b7c076d1cccc86c1011cbc Assert immediately rather than caching failure (Pieter Wuille) 55608455cbed4234f26f62ed9ff500fe5dbc21c4 Make a fuzzer-based copy of the prevector randomized test (Pieter Wuille) Pull request description: The current prevector test effectively randomly generates a number of operations to perform on a prevector and a normal vector, and checks consistency between the two. By converting this into a fuzzer the operations can be targetted rather than random. ACKs for top commit: MarcoFalke: ACK b1d24d1d031a2b2ce67bf846bafa1c3a499b7553 🍬 Tree-SHA512: 2b5c62abcd5fee94f42db03400531484d98c59e7f4308e0e683c61aabcd9ce42f85c5d058d2d5e7f8221124f71d2112b6a5f3c80e5d0fdae265a70647747e92f
2020-04-09Merge #18363: tests: Add fuzzing harness for HTTPRequest, libevent's evhttp ↵MarcoFalke
and related functions cdfb8e7afa7648405dd6b957f47b1c7ab566a076 tests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related functions (practicalswift) Pull request description: Add fuzzing harness for `HTTPRequest`, `libevent`'s `evhttp` and related functions. ACKs for top commit: laanwj: ACK cdfb8e7afa7648405dd6b957f47b1c7ab566a076 Tree-SHA512: da481afed5eb3232d3f3d0583094e56050e6234223dfcb356d8567fe0616336eb1b78c5e6821325fc9767e385e5dfaf3c96f0d35ffdb67f18d74f9a9a9464e24
2020-04-09Merge #18521: fuzz: Add process_messages harnessMarcoFalke
fa6a00843447d53a5708ea3a629b9150cfe58be2 fuzz: Add process_messages harness (MarcoFalke) Pull request description: ACKs for top commit: practicalswift: Tested ACK fa6a00843447d53a5708ea3a629b9150cfe58be2 Tree-SHA512: 2d8788308c7f45c97ca003378f58a9d51f51265958557a65e5e505b1666b4cb928f0d010622870175090a0ad25e2d10b41f26f4eef14b6ff334a024baa250f8c
2020-04-09Merge #18533: scripted-diff: Replace strCommand with msg_typeMarcoFalke
7777e3624fabe4718675b2be8b088697b7ad4d0d scripted-diff: Replace strCommand with msg_type (MarcoFalke) Pull request description: Receiving a message is not a command, but simply a message of some type ACKs for top commit: promag: ACK 7777e3624fabe4718675b2be8b088697b7ad4d0d. naumenkogs: ACK 7777e36 practicalswift: ACK 7777e3624fabe4718675b2be8b088697b7ad4d0d -- I've always thought the `strCommand` name is confusing :) theStack: ACK 7777e36 Tree-SHA512: 662bac579064c621191916274314b85111cfb4df488f00893ceb16def1c47af4b2a0f34cd7349722099b5a9d23160edb8eb999841f1d64af3e0da02e4870b4bf
2020-04-08Merge #18565: tests: Add fuzzing harnesses for classes/functions in ↵MarcoFalke
policy/fees.h, checkqueue.h and cuckoocache.h. Add fuzzing coverage. 283bd72156959f420f13acc7a34e513ca3446025 tests: Add coverage of {,Incremental}DynamicUsage(const std::set<X, Y>& s) to existing fuzzer (practicalswift) bf76000493082da05bf7258a5038e16fa76cd143 tests: Add fuzzing harness for classes/functions in cuckoocache.h (practicalswift) 57890b2555ca347373109052f6789c23f46bc594 tests: Add fuzzing harness for classes/functions in checkqueue.h (practicalswift) 2df5701e902effa93834d9520690cbaca7e504f3 tests: Add coverage of GetVirtualTransactionSize(...) to existing fuzzer (practicalswift) 7b9a2dc86426926038b2f49d3d4ce4cb64dcd14b tests: Add fuzzing harness for AdditionOverflow(...) (practicalswift) 44fb2a596b4a1aa70253c4145c35be6de68da22a tests: Add fuzzing harness for FeeFilterRounder (practicalswift) Pull request description: Includes: ``` tests: Add fuzzing harness for FeeFilterRounder tests: Add fuzzing harness for classes/functions in checkqueue.h tests: Add fuzzing harness for classes/functions in cuckoocache.h tests: Add coverage of {,Incremental}DynamicUsage(const std::set<X, Y>& s) to existing fuzzer tests: Add coverage of GetVirtualTransactionSize(...) to existing fuzzer tests: Add fuzzing harness for AdditionOverflow(...) ``` See [`doc/fuzzing.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md) for information on how to fuzz Bitcoin Core. ACKs for top commit: MarcoFalke: ACK 283bd72156959f420f13acc7a34e513ca3446025 Tree-SHA512: 2361edfb5c47741b22d9fb996836c5250c5a26bc5e956039ea6a0c55ba2d36c78f241d66f85bc02f5b85b9b83d5fde56a5c4702b9d1b7ac4a9a3ae391ca79eaa
2020-04-08tests: Add coverage of {,Incremental}DynamicUsage(const std::set<X, Y>& s) ↵practicalswift
to existing fuzzer
2020-04-08tests: Add fuzzing harness for classes/functions in cuckoocache.hpracticalswift
2020-04-08tests: Add fuzzing harness for classes/functions in checkqueue.hpracticalswift
2020-04-08tests: Add coverage of GetVirtualTransactionSize(...) to existing fuzzerpracticalswift
2020-04-08tests: Add fuzzing harness for AdditionOverflow(...)practicalswift
2020-04-08tests: Add fuzzing harness for FeeFilterRounderpracticalswift
2020-04-08Fix unregister_all_during_call cleanupRussell Yanofsky
Use TestingSetup fixture to fix unregister_all_during_call test not calling UnregisterBackgroundSignalScheduler, which could trigger an assert in RegisterBackgroundSignalScheduler when called in later tests Failure reported by fanquake <fanquake@gmail.com> https://github.com/bitcoin/bitcoin/pull/18551#issuecomment-610974251
2020-04-07Add test for UnregisterAllValidationInterfaces bugRussell Yanofsky
Bug in MainSignalsInstance::Clear could cause validation interface callbacks to be deleted during execution if UnregisterAllValidationInterfaces was called more than once. Bug was introduced in https://github.com/bitcoin/bitcoin/pull/18524 and is fixed by https://github.com/bitcoin/bitcoin/pull/18551
2020-04-06Reorder the test instructions by numberPieter Wuille
2020-04-06Merge and generalize case 3 and case 6Pieter Wuille
2020-04-06Only run sanity check once at the endPieter Wuille
2020-04-06Assert immediately rather than caching failurePieter Wuille
2020-04-06Make a fuzzer-based copy of the prevector randomized testPieter Wuille
2020-04-06Merge #18458: net: Add missing cs_vNodes lockWladimir J. van der Laan
fa369651c5523f393e0bfcfa328b8e27006711aa net: Add missing cs_vNodes lock (MarcoFalke) Pull request description: Fixes #18457 ACKs for top commit: promag: Code review ACK fa369651c5523f393e0bfcfa328b8e27006711aa. laanwj: ACK fa369651c5523f393e0bfcfa328b8e27006711aa Tree-SHA512: 60d7000f2f3d480bb0953ce27a0020763e7102da16a0006b619e0a236cfc33cbd4f83d870e9f0546639711cd877c1f9808d419184bbc153bb328885417e0066c
2020-04-06tests: Add fuzzing harness for HTTPRequest, libevent's evhttp and related ↵practicalswift
functions
2020-04-06Merge #18514: test: remove rapidcheck integration and testsfanquake
9e071b00898aedd9632f105a22d976dc6dbc84b1 test: remove rapidcheck integration and tests (fanquake) Pull request description: Whilst the property tests are interesting, ultimately [rapidcheck](https://github.com/emil-e/rapidcheck) integration in this repository has not gained much traction. We have a limited number of tests, and they are rarely (if ever) run. Have discussed this with Chris Stewart. ACKs for top commit: practicalswift: ACK 9e071b00898aedd9632f105a22d976dc6dbc84b1 Tree-SHA512: d0c12af3163382eee8413da420c63e39265a7b700709a05d518445832d45e049aed9508e32524db5228fe3ac114609a00b7bb890be047c07032e44a5ef4611e9
2020-04-06scripted-diff: Replace strCommand with msg_typeMarcoFalke
-BEGIN VERIFY SCRIPT- sed -i 's/\<strCommand\>/msg_type/g' ./src/net_processing.cpp ./src/test/fuzz/process_message.cpp -END VERIFY SCRIPT-
2020-04-05fuzz: Add process_messages harnessMarcoFalke
2020-04-05Merge #18510: fuzz: Add CScriptNum::getint coverageMarcoFalke
faa64af960b64b522bb088e836c9d8cd6254c6c8 fuzz: Add CScriptNum::getint coverage (MarcoFalke) Pull request description: Add coverage for * https://marcofalke.github.io/btc_cov/fuzz.coverage/src/script/script.h.gcov.html#311 * https://marcofalke.github.io/btc_cov/fuzz.coverage/src/script/script.h.gcov.html#511 ACKs for top commit: practicalswift: ACK faa64af960b64b522bb088e836c9d8cd6254c6c8 -- more fuzzing coverage is better than less fuzzing coverage :) Tree-SHA512: 1a66a2edc3740e8c286049f6c27458c59c45b01052e51684eec0e1be63ffcee94b4ba3d41d88ad715ceb3e4754fd997cf03899085982454905e86d0553d58199
2020-04-05Merge #18518: fuzz: Extend descriptor fuzz testMarcoFalke
fa0189955ab0f458bac81f534cbd626e1b0ad2c1 fuzz: Extend descriptor fuzz test (MarcoFalke) Pull request description: ACKs for top commit: practicalswift: ACK fa0189955ab0f458bac81f534cbd626e1b0ad2c1 Tree-SHA512: 6d6a6417f06d90732bbf055ff54102530d6956f3082f1ff65598f790d588170768aee98e4835996876d28bca2a9c62f22fe122c3fc7eafd4b7660696f72f9835
2020-04-05Merge #18519: fuzz: Extend script fuzz testMarcoFalke
fa86edf66d4d4ed04758333da45ed1b3b5892602 fuzz: Extend script fuzz test (MarcoFalke) Pull request description: ACKs for top commit: practicalswift: ACK fa86edf66d4d4ed04758333da45ed1b3b5892602 Tree-SHA512: 611adee9e673183e67f9711e49289fa59e410bb3ac1bb3fcbb7f1ed331bf0d288c7065e256a82eb41a30a4afe53544c836463cf58865d6e40b18795c8716e57c
2020-04-05Merge #18407: tests: Add proof-of-work fuzzing harnessMarcoFalke
acf269e1463c84d51f2eef695089cbf9d03b547f tests: Add proof-of-work fuzzing harness (practicalswift) Pull request description: Add proof-of-work fuzzing harness. Top commit has no ACKs. Tree-SHA512: dcdfa211cf1ec3018b61f378bb0f95793bbbe5d00e2f4d17f9db2c7263fe8ce919760c56cae7122c62c82e05c90e7056eb1778871674bdb3c42869e5fe4c2b60
2020-04-04tests: Add proof-of-work fuzzing harnesspracticalswift
2020-04-04fuzz: Extend script fuzz testMarcoFalke
2020-04-04fuzz: Extend descriptor fuzz testMarcoFalke
2020-04-03test: remove rapidcheck integration and testsfanquake
2020-04-03fuzz: Add CScriptNum::getint coverageMarcoFalke
2020-03-31doc: Explain new test loggingMarcoFalke
2020-03-30test: Remove unsafe BOOST_TEST_MESSAGEMarcoFalke
2020-03-29net: Add missing cs_vNodes lockMarcoFalke
2020-03-29Merge #18455: tests: Add fuzzing harness for functions/classes in ↵MarcoFalke
flatfile.h, merkleblock.h, random.h, serialize.h and span.h 11a520f6793e21e0a8a9301f5ec4c28a48131b85 tests: Add fuzzing harness for functions/classes in random.h (practicalswift) 64d277bbbcbd464b2a795bae011ee808298a42ca tests: Add fuzzing harness for LimitedString (serialize.h) (practicalswift) f205cf7fef5618aaa96f016fda168eedfd9da437 tests: Add fuzzing harness for functions/classes in span.h (practicalswift) 9718f38f54357f15b8a27e060aed56f91015112d tests: Add fuzzing harness for functions/classes in merkleblock.h (practicalswift) a16ea051f915eb4c975fe06f89470aa99d99d7e4 tests: Add fuzzing harness for functions/classes in flatfile.h (practicalswift) Pull request description: * Add fuzzing harness for functions/classes in `flatfile.h` * Add fuzzing harness for functions/classes in `merkleblock.h` * Add fuzzing harness for functions/classes in `span.h` * Add fuzzing harness for `LimitedString` (`serialize.h`) * Add fuzzing harness for functions/classes in `random.h` Top commit has no ACKs. Tree-SHA512: 6f7e0f946f1062d51216990cde9672b4e896335152548ace3d8711e4969c3e3c8566d01d915b72adcda5c1caa9c2e34da6b7473b55a229f5b77239d3b0ba4b67
2020-03-29tests: Add fuzzing harness for functions/classes in random.hpracticalswift
2020-03-29tests: Add fuzzing harness for LimitedString (serialize.h)practicalswift
2020-03-29tests: Add fuzzing harness for functions/classes in span.hpracticalswift
2020-03-29tests: Add fuzzing harness for functions/classes in merkleblock.hpracticalswift
2020-03-29tests: Add fuzzing harness for functions/classes in flatfile.hpracticalswift
2020-03-28Merge #18449: util: Remove unused itostrWladimir J. van der Laan
faaf1cb5b9a4c22b21757f7578833f908b79b867 util: Replace i64tostr with ToString (MarcoFalke) fac96fff624a3ab65209dcd3378efb6e6ab47a58 util: Remove unused itostr (MarcoFalke) Pull request description: Currently unused, but if someone really needed to use a helper with this functionality in the future, they could use `ToString`. ACKs for top commit: laanwj: ACK faaf1cb5b9a4c22b21757f7578833f908b79b867 promag: Code review ACK faaf1cb5b9a4c22b21757f7578833f908b79b867. Tree-SHA512: 42180c03f51d677f7b69da23c7868bdd88944335fad0752fcc307f2c3e3c69f1cc1b316ac0875bcefb9a69c5d55200d7cf66843ea4c0f0f26baf7a054b96c1bb
2020-03-27util: Replace i64tostr with ToStringMarcoFalke