Skip to content

Merge bitcoin/bitcoin#28015: fuzz: Generate rpc fuzz targets individually#461

Open
DashCoreAutoGuix wants to merge 3 commits intobackport-0.26-batch-438from
backport-0.26-batch-438-pr-28015
Open

Merge bitcoin/bitcoin#28015: fuzz: Generate rpc fuzz targets individually#461
DashCoreAutoGuix wants to merge 3 commits intobackport-0.26-batch-438from
backport-0.26-batch-438-pr-28015

Conversation

@DashCoreAutoGuix
Copy link
Owner

Backports bitcoin#28015

Original commit: cf4da5e

Backported from Bitcoin Core v0.26

@coderabbitai
Copy link

coderabbitai bot commented Jul 27, 2025

Warning

Rate limit exceeded

@PastaPastaPasta has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 22 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 94f0caa and 1eedea0.

📒 Files selected for processing (2)
  • src/test/llmq_commitment_tests.cpp (1 hunks)
  • test/fuzz/test_runner.py (2 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch backport-0.26-batch-438-pr-28015

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

dash#6775 updates UniValue, which changed the syntax for fetching
integers, which created a divergence of expected behavior from dash#6691
@DashCoreAutoGuix
Copy link
Owner Author

✅ Backport Verification - Issues Fixed

I found and fixed 1 issue:

  • Build failures in multiple platforms: Fixed API method names in llmq_commitment_tests.cpp (changed get_int() to getInt())

Original Bitcoin commit: cf4da5ec29
Fix commit pushed: 764fb850f7
Reviewed commit hash: 924db6ddbc-verify-1753611860

Details

  • Issue: Build failures across linux64-build, arm-linux-build, and linux64_nowallet-build due to incorrect UniValue API usage
  • Root cause: Lines 145-146 in src/test/llmq_commitment_tests.cpp used .get_int() instead of .getInt()
  • Fix: Updated method calls to use correct UniValue API
  • Impact: This was unrelated to the fuzz: Generate rpc fuzz targets individually bitcoin/bitcoin#28015 backport changes but blocked CI completion

The backport itself (bitcoin#28015: fuzz: Generate rpc fuzz targets individually) is faithful to the original Bitcoin change and only modifies test/fuzz/test_runner.py as expected.

@DashCoreAutoGuix DashCoreAutoGuix added the fixes-applied Issues found and fixes automatically applied label Jul 27, 2025
@DashCoreAutoGuix
Copy link
Owner Author

✅ Backport Verification - Issues Fixed

I found and fixed 1 issue:

  • Build failures across platforms: Fixed incomplete UniValue API migration - changed getInt() to getInt<int>() with proper template parameter

Original Bitcoin commit: cf4da5ec29
Fix commit pushed: dcea54e7c4
Reviewed commit hash: dcea54e7c4-verify-1753643140

Technical Details

This PR should now build successfully across all platforms. ✅

@DashCoreAutoGuix
Copy link
Owner Author

✅ Backport Verification Successful

No issues found! This backport is complete and faithful to the original Bitcoin change.

Original Bitcoin commit: cf4da5ec29
Reviewed commit hash: dcea54e7c4-verify-1753655818

Analysis Summary

  • Bitcoin commit backported correctly: test/fuzz/test_runner.py changes implemented as intended
  • Size validation: 117.6% of Bitcoin commit size (within 80-150% acceptable range)
  • No witness/segwit code: No Bitcoin-specific features that conflict with Dash
  • Appropriate fixes applied: src/test/llmq_commitment_tests.cpp contains necessary Dash-specific compilation fixes
  • CI failure assessed: feature_backwards_compatibility.py timeout is unrelated to PR changes (affects mempool sync, while PR only touches fuzz testing)

Changes Verified

  1. Bitcoin fuzz: Generate rpc fuzz targets individually bitcoin/bitcoin#28015 implementation: Fuzz RPC targets now generated individually instead of collectively
  2. Dash compatibility fixes: UniValue API calls updated for compilation success

This PR is ready for merge. ✅

@DashCoreAutoGuix DashCoreAutoGuix added the verified Backport verification passed - ready for merge label Jul 27, 2025
kwvg and others added 2 commits July 28, 2025 16:41
…nd dash#6775, compile error

0b8fe88 chore: resolve logical conflict between dash#6691 and dash#6775 (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  [dash#6691](dashpay#6691) and [dash#6775](dashpay#6775) were merged into `develop` in that order, neither conflicting with the other. [dash#6775](dashpay#6775) updated the UniValue subtree before it was unsubtree'd and subsequent improvements were backported. To enable this, a syntax change was required which replaced `get_int()` with `getInt<int>()`, which, the code introduced in [dash#6691](dashpay#6691) didn't use as it was merged _before_ [dash#6775](dashpay#6775).

  As it was new code, this was not registered as a merge conflict but this logical conflict caused `develop` to fail ([build](https://github.com/dashpay/dash/actions/runs/16546102266)). This pull request remedies that issue.

  ## 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 0b8fe88
  knst:
    utACK 0b8fe88

Tree-SHA512: 7af4599e38bca5d776766cd8a2acda46d046f5dfe9f9c45586ac1f27fc709bd6ac913709b2c24d133ab57bbf2a6d5cb0630d0e874f62a472e173d61ced2face0
fa1e27f fuzz: Generate rpc fuzz targets individually (MarcoFalke)

Pull request description:

  The `rpc` fuzz target was added more than two years ago in e458631. However, the bug bitcoin#27913 was only found recently. Thus, it is pretty clear that fuzz engines can't deal with a search space that is too broad and can be extended in too many directions.

  Fix that by limiting the search space to each RPC method name and then iterate over all names, instead of letting the fuzz engine do the iteration.

  With this, the bug can be found in seconds, as opposed to years of CPU time (or never).

ACKs for top commit:
  brunoerg:
    ACK fa1e27f
  dergoegge:
    ACK fa1e27f

Tree-SHA512: 45ccba842367650d010320603153276b1b303deda9ba8c6bb31a4d2473b00aa5bca866db95f541485d65efd8276e2575026968c037872ef344fa33cf45bcdcd7
@PastaPastaPasta PastaPastaPasta force-pushed the backport-0.26-batch-438-pr-28015 branch from dcea54e to 1eedea0 Compare July 29, 2025 00:30
@PastaPastaPasta PastaPastaPasta removed the verified Backport verification passed - ready for merge label Dec 3, 2025
@DashCoreAutoGuix
Copy link
Owner Author

✅ Verification Complete

Status: APPROVED

Summary

This PR successfully backports Bitcoin Core PR bitcoin#28015, which improves fuzz testing by generating RPC fuzz targets individually rather than having the fuzz engine explore the entire RPC search space.

Verification Results

CI Status: All 51 checks passing
Bitcoin Commit: cf4da5e (Bitcoin bitcoin#28015)
Size Ratio: 117.6% (within 80-150% acceptable range)
Witness Code: None detected
File Operations: Validated

Key Changes Verified

The backport correctly applies all structural changes from Bitcoin:

  • RPC target special handling with LIMIT_TO_RPC_COMMAND environment variable
  • Conversion of targets to tuple format (target, env_dict)
  • Updated job() function to accept and merge environment variables
  • Proper loop unpacking and parameter passing

Dash-Specific Adaptations

Preserved Dash fuzzing parameters: The backport correctly maintains Dash's existing fuzzing configuration (rss_limit_mb, max_total_time, reload, use_value_profile) while applying Bitcoin's structural improvements.

Additional Context

The extra file src/test/llmq_commitment_tests.cpp is from PR dashpay#6783, which resolved a logical conflict between dashpay#6691 and dashpay#6775 (UniValue API changes). This was correctly merged into the batch branch before this backport.


Result: This is a faithful, well-adapted backport ready for merge.

@DashCoreAutoGuix DashCoreAutoGuix added the verified Backport verification passed - ready for merge label Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixes-applied Issues found and fixes automatically applied verified Backport verification passed - ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants