-
Notifications
You must be signed in to change notification settings - Fork 0
Merge bitcoin/bitcoin#28952: fuzz: Avoid timeout in process_messages #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: backport-0.27-batch-540
Are you sure you want to change the base?
Merge bitcoin/bitcoin#28952: fuzz: Avoid timeout in process_messages #617
Conversation
fa82597 fuzz: Avoid timeout in process_messages (MarcoFalke) Pull request description: Reduce the number of messages per fuzz input. There should be no reason to have more messages than that. This should also avoid timeouts, such as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=64548. CC bitcoin#28812 ACKs for top commit: dergoegge: utACK fa82597 Tree-SHA512: eeff732f7b0bd9a71f23aeecbf813d31fe34d355b906fd0384a43075cbc3cebc46a26df741b0f337208d8b33b3e28210c9b9437e2eed77844f03131bb8f5f2a1
WalkthroughThe change updates the copyright year, modifies header includes by adding several new headers and removing one, and reduces the maximum iteration count in a fuzzing loop from 10,000 to 30 within the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (3)src/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
src/{test,wallet/test,qt/test}/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit Inference Engine (CLAUDE.md)
Files:
**⚙️ CodeRabbit Configuration File
Files:
🧠 Learnings (2)📓 Common learningssrc/test/fuzz/process_messages.cpp (2)Learnt from: CR Learnt from: CR 🔇 Additional comments (3)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
- Remove #include <util/chaintype.h> which doesn't exist in Dash - This header was added in Bitcoin Core but is not present in Dash codebase - The functionality is not used in this fuzz test file - Fixes CI build failures across all platforms Resolves validation issues while preserving Bitcoin intent.
✅ Backport Verification - Issues FixedI found and fixed 1 issue:
Original Bitcoin commit: ✅ Validation Results
Fix Applied: This PR should now build successfully. ✅ |
✅ Backport Verification SuccessfulNo issues found! This backport is complete and faithful to the original Bitcoin change. Original Bitcoin commit: ✅ Range-diff1: fa825975b5 \! 1: 6358322636 fuzz: Avoid timeout in process_messages
@@
## Metadata ##
-Author: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>
+Author: pasta <pasta@pastas-Mac-Studio.local>
## Commit message ##
- fuzz: Avoid timeout in process_messages
+ fix: remove non-existent util/chaintype.h include
+
+ - Remove #include <util/chaintype.h> which doesn't exist in Dash
+ - This header was added in Bitcoin Core but is not present in Dash codebase
+ - The functionality is not used in this fuzz test file
+ - Fixes CI build failures across all platforms
+
+ Resolves validation issues while preserving Bitcoin intent.
## src/test/fuzz/process_messages.cpp ##
@@
--// Copyright (c) 2020-2022 The Bitcoin Core developers
-+// Copyright (c) 2020-present The Bitcoin Core developers
- // Distributed under the MIT software license, see the accompanying
- // file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-@@
- #include <net.h>
- #include <net_processing.h>
- #include <protocol.h>
-+#include <script/script.h>
-+#include <sync.h>
- #include <test/fuzz/FuzzedDataProvider.h>
- #include <test/fuzz/fuzz.h>
- #include <test/fuzz/util.h>
-@@
- #include <test/util/net.h>
#include <test/util/setup_common.h>
#include <test/util/validation.h>
--#include <validation.h>
-+#include <util/chaintype.h>
-+#include <util/time.h>
+ #include <txorphanage.h>
+-#include <util/chaintype.h>
+ #include <util/time.h>
#include <validationinterface.h>
-+#include <ios>
-+#include <string>
-+#include <utility>
-+#include <vector>
-+
- namespace {
- const TestingSetup* g_setup;
- } // namespace
-@@ src/test/fuzz/process_messages.cpp: FUZZ_TARGET(process_messages, .init = initialize_process_messages)
- connman.AddTestNode(p2p_node);
- }
-
-- LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10000) {
-+ LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 30)
-+ {
- const std::string random_message_type{fuzzed_data_provider.ConsumeBytesAsString(CMessageHeader::COMMAND_SIZE).c_str()};
-
- const auto mock_time = ConsumeTime(fuzzed_data_provider);To reproduce, run: git --no-pager range-diff --no-dual-color --creation-factor=99 fa825975b57bc5c4323e5d6f4bc8cd2b8189e238^..fa825975b57bc5c4323e5d6f4bc8cd2b8189e238 635832263625c7522e2e284181574bb8a22854bd^..635832263625c7522e2e284181574bb8a22854bdThis PR is ready for merge. ✅ |
…627, #711, #658, #813, #825, #626, #831, #835 (qt backports: part 5) 20763f1 merge bitcoin-core/gui#835: Fix crash when closing wallet (Kittywhiskers Van Gogh) b47b1f6 merge bitcoin-core/gui#831: GUIUtil::bringToFront workaround for Wayland (Kittywhiskers Van Gogh) 493768c merge bitcoin-core/gui#626: Showing Local Addresses in Node Window (Kittywhiskers Van Gogh) 4e1b06b merge bitcoin-core/gui#825: Show maximum mempool size in information window (Kittywhiskers Van Gogh) 568753a merge bitcoin-core/gui#813: Don't permit port in proxy IP option (Kittywhiskers Van Gogh) dc3771e merge bitcoin-core/gui#658: Never change the prune checkbox after the user has touched it (Kittywhiskers Van Gogh) 9f103fb fix: hide the entire transaction widget if discreet mode is enabled (Kittywhiskers Van Gogh) e9b347f merge bitcoin-core/gui#711: Disable unused special members functions in `UnlockContext` (Kittywhiskers Van Gogh) 8829549 merge bitcoin-core/gui#627: Apply translator comments to reset options confirmation dialog (Kittywhiskers Van Gogh) d496df0 merge bitcoin-core/gui#612: Drop unused `QFrame`s in `SendCoinsEntry` (Kittywhiskers Van Gogh) 9e4ee65 merge bitcoin-core/gui#617: Reset options, notify user about backup creation (Kittywhiskers Van Gogh) cc2df46 merge bitcoin-core/gui#594: replace deprecated Q_OS_MAC with Q_OS_MACOS (Kittywhiskers Van Gogh) Pull request description: ## Additional Information | `develop` (e23a658) | This PR | | ------------------------------------------------------------ | ------------------------------------------------------------ | |  |  | |  |  | |  |  | ## Breaking Changes None expected. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 20763f1 Tree-SHA512: 6e047d42685f9f710cd966b838ba354f57628e31314f73fc3f6f9b48bbf8fadac1940a48d19b8cfcf9cee47ec00a16a6f21d43c905d1683fba20e42633054606
Backports bitcoin#28952
Original commit: 31ce305
Backported from Bitcoin Core v0.27
Summary by CodeRabbit