aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz
AgeCommit message (Collapse)Author
2021-06-13refactor: Remove chainparams arg from CChainState member functionsMarcoFalke
Passing this is confusing and redundant with the m_params member.
2021-06-10fuzz: Initialize a TestingSetup for test_one_inputCarl Dong
For fuzz tests that need it.
2021-06-07fuzz: Increase branch coverage of the float fuzz targetMarcoFalke
2021-06-07fuzz: Remove confusing return keyword from CallOneOfMarcoFalke
The return type is already enforced to be void by the ternary operator: ./test/fuzz/util.h:47:25: error: right operand to ? is void, but left operand is of type *OTHER_TYPE* ((i++ == call_index ? callables() : void()), ...); ^ ~~~~~~~~~~~ ~~~~~~
2021-06-07Merge bitcoin/bitcoin#21795: fuzz: Terminate immediately if a fuzzing ↵MarcoFalke
harness tries to perform a DNS lookup (belt and suspenders) 3737d35fee283968f12e0772aa27aee4981fce41 fuzz: Terminate immediately if a fuzzing harness ever tries to perform a DNS lookup (belts and suspenders) (practicalswift) Pull request description: Terminate immediately if a fuzzing harness tries to perform a DNS lookup (belt and suspenders). Obviously this _should_ never happen, but if it _does_ happen we want immediate termination instead of a DNS lookup :) ACKs for top commit: MarcoFalke: review ACK 3737d35fee283968f12e0772aa27aee4981fce41 Tree-SHA512: 51cd2d32def7f9f052e02f99c354656af1f807cc9fdf592ab765e620bfe660f1ed26e0484763f94aba650424b44959eafaf352bfd0f81aa273e350510e97356e
2021-06-06p2p, rpc, fuzz: various tiny follow-upsJon Atack
2021-06-03Merge bitcoin/bitcoin#22050: p2p: remove tor v2 supportW. J. van der Laan
5d82a57db4f67506a4e80d186ba76f3a8665e147 contrib: remove torv2 seed nodes (Jon Atack) 5f7e086dac78c9070f8292a1757d7e77e110f772 contrib: update generate-seeds.py to ignore torv2 addresses (Jon Atack) 8be56f0f8ecc54744d572e5678a3089665587b98 p2p, refactor: extract OnionToString() from CNetAddr::ToStringIp() (Jon Atack) 5f9d3c09b4c9cd026cdc7c3a81f91632280917b7 p2p: remove torv2 from CNetAddr::ToStringIP() (Jon Atack) 3d390421440f1cae9a9f2b089561c183ecd1b073 p2p: remove torv2 in SetIP() and ADDR_TORV2_SIZE constant (Jon Atack) cff5ec477a388ae9aa9fd9ef6a7dad1f678e7d23 p2p: remove pre-addrv2 onions from SerializeV1Array() (Jon Atack) 4192a74413907717d6173e393724b931f2225dd9 p2p: ignore torv2-in-ipv6 addresses in SetLegacyIPv6() (Jon Atack) 1d631e956fffbbc7891ed40be4fd39aeff036c52 p2p: remove BIP155Network::TORV2 from GetBIP155Network() (Jon Atack) 7d1769bc450a98c093a066d6daed84337040dbfb p2p: remove torv2 from SetNetFromBIP155Network() (Jon Atack) eba9a94b9f56be2fda623e77f19b960425ea1eb5 fuzz: rename CNetAddr/CService deserialize targets (Jon Atack) c56a1c9b182815018b8bd3d8e6b8c2cb27859607 p2p: drop onions from IsAddrV1Compatible(), no longer relay torv2 (Jon Atack) f8e94002fcfdc7890d38c23488b1f3a662e97bc4 p2p: remove torv2/ADDR_TORV2_SIZE from SetTor() (Jon Atack) 0f1c58ae87d6a3fe81816500e7b8275420d151d0 test: update feature_proxy to torv3 (Jon Atack) Pull request description: ![image](https://user-images.githubusercontent.com/2415484/120018909-4d425a00-bfd7-11eb-83c9-95a3dac97926.jpeg) This patch removes support in Bitcoin Core for Tor v2 onions, which are already removed from the release of Tor 0.4.6. - no longer serialize/deserialize and relay Tor v2 addresses - ignore incoming Tor v2 addresses - remove Tor v2 addresses from the addrman and peers.dat on node launch - update generate-seeds.py to ignore Tor v2 addresses - remove Tor v2 hard-coded seeds Tested with tor-0.4.6.1-alpha (no v2 support) and 0.4.5.7 (v2 support). With the latest Tor (no v2 support), this removes all the warnings like those reported with current master in https://github.com/bitcoin/bitcoin/issues/21351 ``` <bitcoind debug log> Socks5() connect to […].onion:8333 failed: general failure <tor log> Invalid hostname [scrubbed]; rejecting ``` and the addrman no longer has Tor v2 addresses on launching bitcoind. ```rake $ ./src/bitcoin-cli -addrinfo { "addresses_known": { "ipv4": 44483, "ipv6": 8467, "torv2": 0, "torv3": 2296, "i2p": 6, "total": 55252 } } ``` After recompiling back to current master and restarting with either of the two Tor versions (0.4.5.7 or 0.4.6.1), -addrinfo initially returns 0 Tor v2 addresses and then begins finding them again. Ran nodes on this patch over the past week on mainnet/testnet/signet/regtest after building with DEBUG_ADDRMAN. Verified that this patch bootstraps an onlynet=onion node from the Tor v3 hardcoded fixed seeds on mainnet and testnet and connects to blocks and v3 onion peers: `rm ~/.bitcoin/testnet3/peers.dat ; ./src/bitcoind -testnet -dnsseed=0 -onlynet=onion` ![Screenshot from 2021-05-28 00-26-17](https://user-images.githubusercontent.com/2415484/119905021-ea02ea00-bf3a-11eb-875f-27ef57640c49.png) Tested using `addnode`, `getaddednodeinfo`,`addpeeraddress`, `disconnectnode` and `-addrinfo` that a currently valid, connectable Tor v2 peer can no longer be added: ![Screenshot from 2021-05-30 11-32-05](https://user-images.githubusercontent.com/2415484/120099282-29435d80-c12a-11eb-81b6-5084244d7d2a.png) Thanks to Vasil Dimov, Carl Dong, and Wladimir J. van der Laan for their work on BIP155 and Tor v3 that got us here. ACKs for top commit: laanwj: Code review ACK 5d82a57db4f67506a4e80d186ba76f3a8665e147 Tree-SHA512: 590ff3d2f6ef682608596facb4b01f44fef69716d2ab3552ae1655aa225f4bf104f9ee08d6769abb9982a8031de93340df553279ce1f5023771f9f2b651178bb
2021-06-03Merge bitcoin/bitcoin#22065: Mark `CheckTxInputs` `[[nodiscard]]`. Avoid UUM ↵MarcoFalke
in fuzzing harness `coins_view`. 37371268d14ed6d5739af5b65d8bdb38b0e8dda2 Mark `CheckTxInputs` `[[nodiscard]]` (out-param `txfee` only set if call is successful). Avoid UUM in fuzzing harness `coins_view`. (practicalswift) Pull request description: Mark `CheckTxInputs` `[[nodiscard]]` (out-param `txfee` only set if call is successful). Avoid use of uninitialised memory (UUM) in fuzzing harness `coins_view`. ACKs for top commit: MarcoFalke: review ACK 37371268d14ed6d5739af5b65d8bdb38b0e8dda2 Tree-SHA512: edada5b2e80ce9ad3bd57b4c445bedefffa0a2d1cc880957d6848e4b7d9fc1ce036cd17f8b18bc03a36fbf84fc29c166cd6ac3dfbfe03e69d6fdbda13697754d
2021-06-01Merge bitcoin/bitcoin#22005: fuzz: Speed up banman fuzz targetMarcoFalke
fae0f836be57f466b5df094421c9fbf55fd8a2ed fuzz: Speed up banman fuzz target (MarcoFalke) Pull request description: Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34463 ACKs for top commit: practicalswift: cr ACK fae0f836be57f466b5df094421c9fbf55fd8a2ed: patch looks correct and touches only `src/test/fuzz/banman.cpp` Tree-SHA512: edbad168c607d09a5f4a29639f2d0b852605dd61403334356ad35a1eac667b6ce3922b1b316fdf37a991195fbc24e947df9e37359231663f8a364e5889e28417
2021-05-28fuzz: rename CNetAddr/CService deserialize targetsJon Atack
as the changes that follow are incompatible with the inputs.
2021-05-27Merge bitcoin/bitcoin#20833: rpc/validation: enable packages through ↵W. J. van der Laan
testmempoolaccept 13650fe2e527bf0cf5d977bf5f3f1563b853ecdc [policy] detect unsorted packages (glozow) 9ef643e21b44f99f4bce54077788d0ad4d81f7cd [doc] add release note for package testmempoolaccept (glozow) c4259f4b7ee23ef6e0ec82c5d5b9dfa9cadd5bed [test] functional test for packages in RPCs (glozow) 9ede34a6f20378e86c5289ebd20dd394a5915123 [rpc] allow multiple txns in testmempoolaccept (glozow) ae8e6df709ff3d52b8e9918e09cacb64f83ae379 [policy] limit package sizes (glozow) c9e1a26d1f17c8b98632b7796ffa8f8788b5a83c [fuzz] add ProcessNewPackage call in tx_pool fuzzer (glozow) 363e3d916cc036488783bb4bdcfdd3665aecf711 [test] unit tests for ProcessNewPackage (glozow) cd9a11ac96c01e200d0086b2f011f4a614f5a705 [test] make submit optional in CreateValidMempoolTransaction (glozow) 2ef187941db439c5b3e529f08b6ab153ff061fc5 [validation] package validation for test accepts (glozow) 578148ded62828a9820398165c41670f4dbb523d [validation] explicit Success/Failure ctors for MempoolAcceptResult (glozow) b88d77aec5e7bef5305a668d15031351c0548b4d [policy] Define packages (glozow) 249f43f3cc52b0ffdf2c47aad95ba9d195f6a45e [refactor] add option to disable RBF (glozow) 897e348f5987eadd8559981a973c045c471b3ad8 [coins/mempool] extend CCoinsViewMemPool to track temporary coins (glozow) 42cf8b25df07c45562b7210e0e15c3fd5edb2c11 [validation] make CheckSequenceLocks context-free (glozow) Pull request description: This PR enables validation dry-runs of packages through the `testmempoolaccept` RPC. The expectation is that the results returned from `testmempoolaccept` are what you'd get from test-then-submitting each transaction individually, in that order (this means the package is expected to be sorted in topological order, for now at least). The validation is also atomic: in the case of failure, it immediately halts and may return "unfinished" `MempoolAcceptResult`s for transactions that weren't fully validated. The API for 1 transaction stays the same. **Motivation:** - This allows you to test validity for transaction chains (e.g. with multiple spending paths and where you don't want to broadcast yet); closes #18480. - It's also a first step towards package validation in a minimally invasive way. - The RPC commit happens to close #21074 by clarifying the "allowed" key. There are a few added restrictions on the packages, mostly to simplify the logic for areas that aren't critical to main package use cases: - No package can have conflicts, i.e. none of them can spend the same inputs, even if it would be a valid BIP125 replacement. - The package cannot conflict with the mempool, i.e. RBF is disabled. - The total count of the package cannot exceed 25 (the default descendant count limit), and total size cannot exceed 101KvB (the default descendant size limit). If you're looking for review comments and github isn't loading them, I have a gist compiling some topics of discussion [here](https://gist.github.com/glozow/c3acaf161c95bba491fce31585b2aaf7) ACKs for top commit: laanwj: Code review re-ACK 13650fe2e527bf0cf5d977bf5f3f1563b853ecdc jnewbery: Code review ACK 13650fe2e527bf0cf5d977bf5f3f1563b853ecdc ariard: ACK 13650fe Tree-SHA512: 8c5cbfa91a6c714e1c8710bb281d5ff1c5af36741872a7c5df6b24874d6272b4a09f816cb8a4c7de33ef8e1c2a2c252c0df5105b7802f70bc6ff821ed7cc1a2f
2021-05-27Merge bitcoin/bitcoin#22029: [fuzz] Improve transport deserialization fuzz ↵W. J. van der Laan
test coverage e33714557747dd479f123425aa2dd08d272ef377 [fuzz] Occasional valid magic bytes for transport serialization test (Dhruv Mehta) 35571d8d9ec112bd7b6741d10052dded08410c77 [fuzz] Occasional valid checksum for transport serialization fuzz test (Dhruv Mehta) 654472a461bc9d1603c46dcb7a5b2dc87a44045a [fuzz] Add serialization to deserialization test (Dhruv Mehta) Pull request description: This PR has 3 commits that increase the fuzz test coverage: Before commit 1: ``` #306853 REDUCE cov: 798 ft: 5820 corp: 150/375Kb lim: 68333 exec/s: 1382 rss: 461Mb L: 254/63171 MS: 1 EraseBytes- #1453105 REDUCE cov: 798 ft: 5820 corp: 150/369Kb lim: 79613 exec/s: 1467 rss: 461Mb L: 6027/60873 MS: 1 EraseBytes- ``` After commit 1 (adds serialization to de-serialization test): ``` #303389 NEW cov: 1202 ft: 8382 corp: 157/382Kb lim: 68189 exec/s: 1451 rss: 447Mb L: 1386/65459 MS: 1 CopyPart- #1428759 REDUCE cov: 1202 ft: 8512 corp: 169/389Kb lim: 78749 exec/s: 1528 rss: 463Mb L: 1627/60488 MS: 1 EraseBytes- ``` After commit 2 (provides an occasional checksum assist to the fuzzer inputs): ``` #304820 NEW cov: 1440 ft: 4452 corp: 92/12551b lim: 2237 exec/s: 3386 rss: 486Mb L: 47/1111 MS: 1 ChangeByte- #1416181 REDUCE cov: 1442 ft: 5681 corp: 125/59Kb lim: 4096 exec/s: 3522 rss: 535Mb L: 2164/4049 MS: 1 EraseBytes- ``` After commit 3 (provides an occasional magic bytes assist to the fuzzer inputs): ``` #302684 NEW cov: 1454 ft: 3936 corp: 84/7056b lim: 2424 exec/s: 4146 rss: 477Mb L: 65/1108 MS: 3 CopyPart-CrossOver-CMP- DE: "\x0e\x00\x00\x00"- #1383925 REDUCE cov: 1454 ft: 4828 corp: 102/14573b lim: 4096 exec/s: 3954 rss: 534Mb L: 116/4050 MS: 2 EraseBytes-ChangeByte- ``` If reviewers only accept the first commit, the seeds are not invalidated and new seeds are at: https://github.com/bitcoin-core/qa-assets/pull/61. In this case, we can also revert the test name change. If reviewers accept all three commits, the existing seeds are invalidated. ACKs for top commit: practicalswift: Tested ACK e33714557747dd479f123425aa2dd08d272ef377 Tree-SHA512: d37f06eea0249322b00a99c4827359eb53aeb711751e5571f4681eeca06dc257e0c4cd4887150fc37cc2f689e26986112d768066ad274361615ba9b6a522c61a
2021-05-26Merge bitcoin/bitcoin#21966: Remove double serialization; use software ↵W. J. van der Laan
encoder for fee estimation 66545da2008cd9e806e41b74522ded259cd64f86 Remove support for double serialization (Pieter Wuille) fff1cae43af959a601cf2558cb3c77f3c2b1aa80 Convert uses of double-serialization to {En,De}codeDouble (Pieter Wuille) afd964d70b6f7583ecf89c380f80db07f5b66a60 Convert existing float encoding tests (Pieter Wuille) bda33f98e2f32f2411fb0a8f5fb4f0a32abdf7d4 Add unit tests for serfloat module (Pieter Wuille) 2be4cd94f4c7d92a4287971233a20d68db81c9c9 Add platform-independent float encoder/decoder (Pieter Wuille) e40224d0c77674348bf0a518365208bc118f39a4 Remove unused float serialization (MarcoFalke) Pull request description: Based on #21981. This adds a software-based platform-independent float/double encoder/decoder (platform independent in the sense that it only uses arithmetic and library calls, but never inspects the binary representation). This should strengthen our guarantee that encoded float/double values are portable across platforms. It then removes the functionality to serialize doubles from serialize.h, and replaces its only (non-test) use for fee estimation data serialization with the software encoder. At least on x86/ARM, the only difference should be how certain NaN values are encoded/decoded (but not *whether* they are NaN or not). It comes with tests that verify on is_iec559 platforms (which are the only ones we support, at least for now) that the serialized bytes exactly match the binary representation of floats in memory (for non-NaN). ACKs for top commit: laanwj: Code review re-ACK 66545da2008cd9e806e41b74522ded259cd64f86 practicalswift: cr re-ACK 66545da2008cd9e806e41b74522ded259cd64f86 Tree-SHA512: 62ad9adc26e28707b2eb12a919feefd4fd10cf9032652dbb1ca1cc97638ac21de89e240858e80d293d5112685c623e58affa3d316a9783ff0e6d291977a141f5
2021-05-26fuzz: don't try and use fopencookie when building for Androidfanquake
When building for Android, _GNU_SOURCE will be defined, but it doesn't actually have the fopencookie() function, or define the cookie_io_functions_t type. For now just skip trying to use it if we are building for Android. Should fix #22062.
2021-05-25Mark `CheckTxInputs` `[[nodiscard]]` (out-param `txfee` only set if call is ↵practicalswift
successful). Avoid UUM in fuzzing harness `coins_view`.
2021-05-25[fuzz] Occasional valid magic bytes for transport serialization testDhruv Mehta
Before commit: Unable to deserialize : 0% Wrong message start : ~45.62% Header too large : ~14.5% Wrong checksum : ~38.13% Invalid message type : ~1.78% 304820 NEW cov: 1440 ft: 4452 corp: 92/12551b lim: 2237 exec/s: 3386 rss: 486Mb L: 47/1111 MS: 1 ChangeByte- 1416181 REDUCE cov: 1442 ft: 5681 corp: 125/59Kb lim: 4096 exec/s: 3522 rss: 535Mb L: 2164/4049 MS: 1 EraseBytes- After commit: Unable to deserialize : 0% Wrong message start : ~39.6% Header too large : ~30.85% Wrong checksum : ~25.54% Invalid message type : ~4.01% 302684 NEW cov: 1454 ft: 3936 corp: 84/7056b lim: 2424 exec/s: 4146 rss: 477Mb L: 65/1108 MS: 3 CopyPart-CrossOver-CMP- DE: "\x0e\x00\x00\x00"- 1383925 REDUCE cov: 1454 ft: 4828 corp: 102/14573b lim: 4096 exec/s: 3954 rss: 534Mb L: 116/4050 MS: 2 EraseBytes-ChangeByte-
2021-05-25[fuzz] Occasional valid checksum for transport serialization fuzz testDhruv Mehta
Before commit: Unable to deserialize: 0% Wrong message start : ~1.27% Header too large : ~0.5% Wrong checksum : ~67.99% Invalid message type : ~30.1% 303389 NEW cov: 1202 ft: 8382 corp: 157/382Kb lim: 68189 exec/s: 1451 rss: 447Mb L: 1386/65459 MS: 1 CopyPart- 1428759 REDUCE cov: 1202 ft: 8512 corp: 169/389Kb lim: 78749 exec/s: 1528 rss: 463Mb L: 1627/60488 MS: 1 EraseBytes- After commit(new seeds; old seeds invalidated): Unable to deserialize: 0% Wrong message start : ~45.62% Header too large : ~14.5% Wrong checksum : ~38.13% Invalid message type : ~1.78% 304820 NEW cov: 1440 ft: 4452 corp: 92/12551b lim: 2237 exec/s: 3386 rss: 486Mb L: 47/1111 MS: 1 ChangeByte- 1416181 REDUCE cov: 1442 ft: 5681 corp: 125/59Kb lim: 4096 exec/s: 3522 rss: 535Mb L: 2164/4049 MS: 1 EraseBytes-
2021-05-25[fuzz] Add serialization to deserialization testDhruv Mehta
Before commit: 306853 REDUCE cov: 798 ft: 5820 corp: 150/375Kb lim: 68333 exec/s: 1382 rss: 461Mb L: 254/63171 MS: 1 EraseBytes- 1453105 REDUCE cov: 798 ft: 5820 corp: 150/369Kb lim: 79613 exec/s: 1467 rss: 461Mb L: 6027/60873 MS: 1 EraseBytes- After commit: 303389 NEW cov: 1202 ft: 8382 corp: 157/382Kb lim: 68189 exec/s: 1451 rss: 447Mb L: 1386/65459 MS: 1 CopyPart- 1428759 REDUCE cov: 1202 ft: 8512 corp: 169/389Kb lim: 78749 exec/s: 1528 rss: 463Mb L: 1627/60488 MS: 1 EraseBytes-
2021-05-24Remove support for double serializationPieter Wuille
2021-05-24Convert uses of double-serialization to {En,De}codeDoublePieter Wuille
2021-05-24Remove unused float serializationMarcoFalke
2021-05-24[fuzz] add ProcessNewPackage call in tx_pool fuzzerglozow
2021-05-24Merge bitcoin/bitcoin#21186: net/net processing: Move addr data into ↵fanquake
net_processing 0829516d1f3868c1c2ba507feee718325d81e329 [refactor] Remove unused ForEachNodeThen() template (John Newbery) 09cc66c00e1d5fabe11ffcc32cad060e6b483b20 scripted-diff: rename address relay fields (John Newbery) 76568a3351418c878d30ba0373cf76988f93f90e [net processing] Move addr relay data and logic into net processing (John Newbery) caba7ae8a505a4b4680a9d7618f65c4e8579a1e2 [net processing] Make RelayAddress() a member function of PeerManagerImpl (John Newbery) 86acc9646968213aaa4408635915b1bfd75a10c9 [net processing] Take NodeId instead of CNode* as originator for RelayAddress() (John Newbery) Pull request description: This continues the work of moving application layer data into net_processing, by moving all addr data into the new Peer object added in #19607. For motivation, see #19398. ACKs for top commit: laanwj: Code review ACK 0829516d1f3868c1c2ba507feee718325d81e329 mzumsande: ACK 0829516d1f3868c1c2ba507feee718325d81e329, reviewed the code and ran tests. sipa: utACK 0829516d1f3868c1c2ba507feee718325d81e329 hebasto: re-ACK 0829516d1f3868c1c2ba507feee718325d81e329 Tree-SHA512: efe0410fac288637f203eb37d1999910791e345872d37e1bd5cde50e25bb3cb1c369ab86b3a166ffd5e06ee72e4508aa2c46d658be6a54e20b4f220d2f57d0a6
2021-05-24Merge bitcoin/bitcoin#21848: refactor: Make CFeeRate constructor ↵MarcoFalke
architecture-independent fafd121026c4f1e25d498983e4f88c119516552b refactor: Make CFeeRate constructor architecture-independent (MarcoFalke) Pull request description: Currently the constructor is architecture dependent. This is confusing for several reasons: * It is impossible to create a transaction larger than the max value of `uint32_t`, so a 64-bit `size_t` is not needed * Policy (and consensus) code should be arch-independent * The current code will print spurious compile errors when compiled on 32-bit systems: ``` policy/feerate.cpp:23:22: warning: result of comparison of constant 9223372036854775807 with expression of type 'size_t' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare] assert(nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max())); ``` Fix all issues by making it arch-independent. Also, fix `{}` style according to dev notes. ACKs for top commit: theStack: re-ACK fafd121026c4f1e25d498983e4f88c119516552b promag: Code review ACK fafd121026c4f1e25d498983e4f88c119516552b. Tree-SHA512: e16f75bad9ee8088b87e873906d9b5633449417a6996a226a2f37d33a2b7d4f2fd91df68998a77e52163de20b40c57fadabe7fe3502e599cbb98494178591833
2021-05-24scripted-diff: Replace `GetDataDir()` calls with `gArgs.GetDataDirNet()` callsKiminuo
-BEGIN VERIFY SCRIPT- git ls-files -- 'src' ':(exclude)src/util/system.h' ':(exclude)src/util/system.cpp' | xargs sed -i 's/GetDataDir()/gArgs.GetDataDirNet()/g'; -END VERIFY SCRIPT-
2021-05-22Merge bitcoin/bitcoin#21953: fuzz: Add utxo_snapshot targetMarcoFalke
fa91994b1b9b6da3bb2a2f722d9251d7d0f2167e fuzz: Add utxo_snapshot target (MarcoFalke) Pull request description: ACKs for top commit: jamesob: ACK https://github.com/bitcoin/bitcoin/pull/21953/commits/fa91994b1b9b6da3bb2a2f722d9251d7d0f2167e Tree-SHA512: a00f077102a4e4e321bd1464c3fa11e7a5b9e04324b9be87aa28cfdc77630db7fc772d3a3768dc6ec36bbdd2d67b7e0719f0cf3fd87b4a1087365b934e137b5c
2021-05-21fuzz: Terminate immediately if a fuzzing harness ever tries to perform a DNS ↵practicalswift
lookup (belts and suspenders)
2021-05-21Merge bitcoin/bitcoin#22004: fuzz: Speed up transaction fuzz targetMarcoFalke
bbbb51877a96c3473aeea5914f751eec7835b5c4 fuzz: Speed up transaction fuzz target (MarcoFalke) Pull request description: `hashBlock` and `include_addresses` are orthogonal, so no need to do an exhaustive "search". Might fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34491 ACKs for top commit: practicalswift: cr ACK bbbb51877a96c3473aeea5914f751eec7835b5c4: patch looks correct, and `TxToUniv` surprisingly wide in the `transaction_fuzz_target` flame graph! Putting it on a diet makes sense. Tree-SHA512: 1e7c30c7fecf96364a9a1597c0a22139389fdeb67db59f3c2c6fc088196e3332877b2865991a957980d542f99a2f48cc066dd7cc16c695a5113190fe06205089
2021-05-21Merge bitcoin/bitcoin#21936: fuzz: Terminate immediately if a fuzzing ↵MarcoFalke
harness tries to create a TCP socket (belt and suspenders) 393992b049d3bcf0b2a3439be128d13d6567f0b1 fuzz: Terminate immediately if a fuzzing harness ever tries to create a TCP socket (belt and suspenders) (practicalswift) Pull request description: Terminate immediately if a fuzzing harness ever to create a TCP socket (belt and suspenders). Obviously this _should_ never happen, but if it _does_ happen we want immediate termination instead of a TCP socket :) ACKs for top commit: MarcoFalke: ACK 393992b049d3bcf0b2a3439be128d13d6567f0b1 Tree-SHA512: 5bbff1f7e9a58b3eae24f742b7daf3fc870424c985f29bed5931e47a708d9c0984bfd8762f43658cffa9c69d32f86d56deb48bc7e43821e3398052174b6a160e
2021-05-21Merge bitcoin/bitcoin#22003: txmempool: add thread safety annotationsMarcoFalke
793b2682841b0bdd7eb93163e34728765cfe52b2 txmempool: add thread safety annotations (Anthony Towns) Pull request description: Add missing thread safety guards to CTxMempool members. ACKs for top commit: MarcoFalke: cr ACK 793b2682841b0bdd7eb93163e34728765cfe52b2 hebasto: re-ACK 793b2682841b0bdd7eb93163e34728765cfe52b2, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/22003#pullrequestreview-664529633) review. Tree-SHA512: c5eb197c63375c80c325a276f322177e84e0181c94a124720b1a364e964ac223fc6fdfd89bd0e152b76959fb6b97bfbf82dd36ec105ed6e2dc045ede717df4ae
2021-05-21txmempool: add thread safety annotationsAnthony Towns
2021-05-20fuzz: Terminate immediately if a fuzzing harness ever tries to create a TCP ↵practicalswift
socket (belt and suspenders)
2021-05-20Merge bitcoin/bitcoin#21843: p2p, rpc: enable GetAddr, GetAddresses, and ↵W. J. van der Laan
getnodeaddresses by network ce6bca88e8c685c69686e0b8dc095ffc3e2ac34d doc: release note for getnodeaddresses by network (Jon Atack) 3f89c0e9902338ad8a507a938dceeeb3191eece6 test: improve getnodeaddresses coverage, test by network (Jon Atack) 6c98c099918bd20e2d3aa123643d6e3594e080e4 rpc: enable filtering getnodeaddresses by network (Jon Atack) 80ba294854e5025bcada58f1403858e6ea1d4380 p2p: allow CConnman::GetAddresses() by network, add doxygen (Jon Atack) a49f3ddbbabfb971a537f0a6c7affb24e20ff192 p2p: allow CAddrMan::GetAddr() by network, add doxygen (Jon Atack) c38981e748f438d972ba12ba998c8a8a597e01c1 p2p: pull time call out of loop in CAddrMan::GetAddr_() (João Barbosa) d35ddca91ebbcf8d8b790c3b9f8cf218fafb7a53 p2p: enable CAddrMan::GetAddr_() by network, add doxygen (Jon Atack) Pull request description: This patch allows passing a network argument to CAddrMan::GetAddr(), CConnman::GetAddresses(), and rpc getnodeaddresses to return only addresses of that network. It also contains a performance optimisation by promag. ACKs for top commit: laanwj: Code review and lightly tested ACK ce6bca88e8c685c69686e0b8dc095ffc3e2ac34d vasild: ACK ce6bca88e8c685c69686e0b8dc095ffc3e2ac34d Tree-SHA512: 40e700d97091248429c73cbc0639a1f03ab7288e636a7b9026ad253e9708253c6b2ec98e7d9fb2d56136c0f762313dd648915ac98d723ee330d713813a43f99d
2021-05-20fuzz: Speed up banman fuzz targetMarcoFalke
2021-05-20fuzz: Speed up transaction fuzz targetMarcoFalke
2021-05-19Merge bitcoin/bitcoin#21970: fuzz: Add missing CheckTransaction before ↵MarcoFalke
CheckTxInputs fae4ee545a652cc2934773b0e1fdb9004b0c5ba6 fuzz: Add missing CheckTransaction before CheckTxInputs (MarcoFalke) faacb7eadb04a8af666e7bb59bcd79915fe3a80a fuzz: Sanity check result of CheckTransaction (MarcoFalke) Pull request description: This bug was introduced by myself in commit eeee8f5be1d4ccfb7e237248be5c6bef45b0fbb8 (https://github.com/bitcoin/bitcoin/pull/21553) Reproducer: https://github.com/bitcoin/bitcoin/files/6492249/clusterfuzz-testcase-minimized-coins_view-6109460079706112.log Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34301 ACKs for top commit: practicalswift: cr ACK fae4ee545a652cc2934773b0e1fdb9004b0c5ba6: patch looks correct :) Tree-SHA512: 9ece7a5c4bfa60f5e5ffeba3f0ee52a07944c9bd6102588dd7ff7405695e6b32449945b7c41bd25baf38814df5a2436521e655ceff87223ad03c69ed39053023
2021-05-19Merge bitcoin/bitcoin#21659: net: flag relevant Sock methods with [[nodiscard]]W. J. van der Laan
e286cd0d7b4e12c8efe5e7ac3066a100e0ba2c0a net: flag relevant Sock methods with [[nodiscard]] (Vasil Dimov) Pull request description: Flag relevant Sock methods with `[[nodiscard]]` to avoid issues like the one fixed in https://github.com/bitcoin/bitcoin/pull/21631. ACKs for top commit: practicalswift: cr ACK e286cd0d7b4e12c8efe5e7ac3066a100e0ba2c0a: the only changes made are additions of `[[nodiscard]]` and `(void)` where appropriate laanwj: Code review ACK e286cd0d7b4e12c8efe5e7ac3066a100e0ba2c0a Tree-SHA512: addc361968d24912bb625b42f4db557791556bf0ffad818252a89a32d76ac22758ec70f8282dcfbfd77eebec20a8e6bb7557c8ed08d50a58de95378c34955973
2021-05-19p2p: allow CConnman::GetAddresses() by network, add doxygenJon Atack
2021-05-19p2p: allow CAddrMan::GetAddr() by network, add doxygenJon Atack
2021-05-19Merge bitcoin/bitcoin#21506: p2p, refactor: make NetPermissionFlags an enum ↵W. J. van der Laan
class 7075f604e8d0b21b2255fa57e20cd365dc10a288 scripted-diff: update noban documentation in net_processing.cpp (Jon Atack) a95540cf435029f06e56749802d71315ca76b0dd scripted-diff: rename NetPermissionFlags enumerators (Jon Atack) 810d0929c1626bba141af3f779a3c9cd6ece7e75 p2p, refactor: make NetPermissionFlags a uint32 enum class (Jon Atack) 7b55a9449778c5ac89799ce4c607c8c8d797ddfb p2p: NetPermissions::HasFlag() pass flags param by value (Jon Atack) 91f6e6e6d1720e1154ad3f70a5098e9028efa84a scripted-diff: add NetPermissionFlags scopes where not already present (Jon Atack) Pull request description: While reviewing #20196, I noticed the `NetPermissionFlags` enums are frequently called as if they were scoped, yet are still global. This patch upgrades `NetPermissionFlags` to a scoped class enum and updates the enumerator naming, similarly to #19771. See https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#enum-enumerations for more info. This change would eliminate the class of bugs like https://github.com/bitcoin/bitcoin/pull/20196#discussion_r610770148 and #21644, as only defined operations on the flags would compile. ACKs for top commit: laanwj: Code review ACK 7075f604e8d0b21b2255fa57e20cd365dc10a288 vasild: ACK 7075f604e8d0b21b2255fa57e20cd365dc10a288 Tree-SHA512: 7fcea66ee499f059efc78c934b5f729b3c8573fe304dee2c27c837c2f662b89324790568246d75b2a574cf9f059b42d3551d928996862f4358055eb43521e6f4
2021-05-18refactor: Make CFeeRate constructor architecture-independentMarcoFalke
2021-05-17fuzz: Add missing CheckTransaction before CheckTxInputsMarcoFalke
2021-05-17fuzz: Sanity check result of CheckTransactionMarcoFalke
2021-05-16fuzz: Add utxo_snapshot targetMarcoFalke
2021-05-14Merge bitcoin/bitcoin#21929: fuzz: Remove incorrect float round-trip ↵W. J. van der Laan
serialization test fae814c9a6c8ce4822f1fc6b88cfbbde7cc2d49c fuzz: Remove incorrect float round-trip serialization test (MarcoFalke) Pull request description: It tests the wrong way of the round-trip: `int -> float -> int`, but only `float -> int -> float` is allowed and used. See also `src/test/fuzz/float.cpp`. Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34118 ACKs for top commit: laanwj: Anyhow, ACK fae814c9a6c8ce4822f1fc6b88cfbbde7cc2d49c Tree-SHA512: 8412a7985be2225109f382b7c7ea6d6fcfbea15711671fdf2f41dd1a9adbb3b4489592863751d78bedaff98e9b0b13571d9cae06ffd92db8fbf7ce0f47874a41
2021-05-12scripted-diff: rename NetPermissionFlags enumeratorsJon Atack
- drop redundant PF_ permission flags prefixes - drop ALL_CAPS naming per https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Renum-caps - rename IsImplicit to Implicit -BEGIN VERIFY SCRIPT- s() { git grep -l "$1" src | xargs sed -i "s/$1/$2/g"; } s 'PF_NONE' 'None' s 'PF_BLOOMFILTER' 'BloomFilter' s 'PF_RELAY' 'Relay' s 'PF_FORCERELAY' 'ForceRelay' s 'PF_DOWNLOAD' 'Download' s 'PF_NOBAN' 'NoBan' s 'PF_MEMPOOL' 'Mempool' s 'PF_ADDR' 'Addr' s 'PF_ISIMPLICIT' 'Implicit' s 'PF_ALL' 'All' -END VERIFY SCRIPT-
2021-05-12fuzz: Remove incorrect float round-trip serialization testMarcoFalke
2021-05-12fuzz: Run const CScript member functions only onceMarcoFalke
2021-05-11fuzz: Avoid timeout in EncodeBase58MarcoFalke
2021-05-11Merge bitcoin/bitcoin#21892: fuzz: Avoid excessively large min fee rate in ↵MarcoFalke
tx_pool 99993f066405863c66ccaec0a8427129f4515768 fuzz: Avoid excessively large min fee rate in tx_pool (MarcoFalke) Pull request description: Any fee rate above 1 BTC / kvB is clearly nonsense, so no need to fuzz this. Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34078 ACKs for top commit: practicalswift: cr ACK 99993f066405863c66ccaec0a8427129f4515768: patch looks correct despite no `fa` prefix in commit hash Tree-SHA512: bd3651d354b13d889ad1708d2b385ad0479de036de74a237346eefad5dbfb1df76ec02b55ec00487ec598657ef6102f992302b14c4e47f913a9962f81f4157e6