Skip to content

Validate messages in MuSig mediation request service#4630

Draft
KimStrand wants to merge 1 commit intobisq-network:mainfrom
KimStrand:musig-add-validation-mediationrequestservice
Draft

Validate messages in MuSig mediation request service#4630
KimStrand wants to merge 1 commit intobisq-network:mainfrom
KimStrand:musig-add-validation-mediationrequestservice

Conversation

@KimStrand
Copy link
Copy Markdown
Contributor

@KimStrand KimStrand commented Apr 8, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Strengthened validation of mediation requests by adding checks to prevent unauthorized state changes and reject invalid mediator scenarios during processing.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0d39f2f9-7a5c-4636-9d2f-892280f2df8e

📥 Commits

Reviewing files that changed from the base of the PR and between 2b33f88 and 06eeaea.

📒 Files selected for processing (1)
  • support/src/main/java/bisq/support/mediation/mu_sig/MuSigMediationRequestService.java

Walkthrough

Added validation checks to processMediationStateChangeMessage method to verify the channel contract mediator exists, sender's UserProfile id matches the mediator id, and sender is not banned. Processing only continues after these checks pass.

Changes

Cohort / File(s) Summary
Mediation State Validation
support/src/main/java/bisq/support/mediation/mu_sig/MuSigMediationRequestService.java
Added early rejection logic in processMediationStateChangeMessage to validate contract mediator presence, sender identity match, and sender ban status before proceeding with state transitions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit checks the guards so keen,
Before the state can shift its scene,
Missing mediators? Banned, you say?
Rejected fast, sent far away!
Security hops from branch to branch,
With validation's careful stance! 🔐

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title directly and accurately summarizes the main change: adding validation to message handling in the MuSig mediation request service.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@KimStrand KimStrand marked this pull request as draft April 8, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant