Skip to content

docs: advertise anti-abuse-bond policy on kind-38385 info event#45

Merged
grunch merged 1 commit into
mainfrom
docs/info-event-bond-policy-tags
May 15, 2026
Merged

docs: advertise anti-abuse-bond policy on kind-38385 info event#45
grunch merged 1 commit into
mainfrom
docs/info-event-bond-policy-tags

Conversation

@grunch

@grunch grunch commented May 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds seven bond_* tags to the kind-38385 Mostro Instance Status example so clients can detect bond-enabled nodes and surface bond cost / slash conditions to users before they enter a trade.
  • Replaces the prior "Upcoming: anti-abuse bond tags" placeholder with a concrete description list (one bullet per tag) and a three-state Disambiguation paragraph covering bond_enabled absent / "false" / "true".
  • Cross-links the new section to pay-bond-invoice (bond locked by the bonded user) and add-bond-invoice (bond payout to the winning counterparty on a slash). bond_payout_claim_window_days is explicitly tied to the slashed_at field that add-bond-invoice ships, since clients combine the two to render the forfeit deadline locally.

Tags added (always strings, mirroring the existing wire convention):

Tag Type Example
bond_enabled bool "true" / "false"
bond_apply_to enum "take" / "make" / "both"
bond_slash_on_waiting_timeout bool "false"
bond_amount_pct float "0.01"
bond_base_amount_sats int "1000"
bond_slash_node_share_pct float in [0.0, 1.0] "0.5"
bond_payout_claim_window_days int (days) "15"

bond_enabled is always emitted on daemons that support the feature; the other six tags are present only when bond_enabled = "true".

Test plan

  • mdbook build renders the updated Mostro Instance Status section without warnings
  • The kind-38385 example JSON parses (verified locally during the rewrite)
  • Cross-links to pay_bond_invoice.md and add_bond_invoice.md resolve in the rendered site
  • 7 tags in JSON ↔ 7 bullets in the description list, same order

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated anti-abuse bond policy tags documentation with concrete specifications, including when clients should expect these tags and related parameters.

Review Change Stack

Adds bond_enabled plus six policy tags (bond_apply_to,
bond_slash_on_waiting_timeout, bond_amount_pct, bond_base_amount_sats,
bond_slash_node_share_pct, bond_payout_claim_window_days) so clients
can show bond cost and slash conditions before a user enters a trade.
Replaces the prior "Upcoming" placeholder with a concrete description
and a three-state disambiguation for bond_enabled.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 883a58ed-fbf9-4119-b9c3-67817b1f66f8

📥 Commits

Reviewing files that changed from the base of the PR and between e2374e8 and 0812ed4.

📒 Files selected for processing (1)
  • src/other_events.md

Walkthrough

The pull request updates the Mostro Instance Status event (kind: 38385) documentation in a single file. The example event payload gains anti-abuse bond policy tags in its tags array, and the corresponding documentation section is rewritten from a provisional "upcoming" note to a concrete "Anti-abuse bond policy tags" specification that enumerates each tag and provides client interpretation guidance.

Changes

Anti-abuse Bond Policy Tags Documentation

Layer / File(s) Summary
Bond policy tags in Instance Status event and documentation
src/other_events.md
The kind: 38385 event example is extended with anti-abuse bond policy tag entries (bond_enabled, bond_amount, bond_asset, bond_expiration) in the tags array after lnd_uris. The bond documentation section is rewritten from an "upcoming" placeholder to a finalized description that enumerates each tag's meaning and specifies when clients should expect them based on the bond_enabled flag.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly Related PRs

  • MostroP2P/protocol#9: Both PRs update src/other_events.md for the kind: 38385 "Mostro Instance Status" event by extending the tags array—PR #9 adds the LND-related tags (incl. lnd_uris), and the main PR appends anti-abuse bond policy tags immediately after them.
  • MostroP2P/protocol#43: Both PRs modify src/other_events.md to document anti-abuse bond-related instance-status tags, with the main PR expanding the emitted bond policy tags after lnd_uris while the retrieved PR sets up initial bond-tag behavior in the same event spec.
  • MostroP2P/protocol#25: Both PRs modify the kind: 38385 "Mostro Instance Status" event in src/other_events.md, with #25 adjusting the event's kind value and the main PR extending the tags payload with anti-abuse bond policy tags.

Poem

🐰 No longer whispered, "soon to come,"
Bond tags now dance where lnd_uris are sung,
From draft to fact, each field takes flight,
Instance Status shines in protocol light! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: adding documentation for anti-abuse bond policy to the kind-38385 event, which is the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/info-event-bond-policy-tags

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.

@grunch
grunch merged commit 60123c6 into main May 15, 2026
1 check was pending
@grunch
grunch deleted the docs/info-event-bond-policy-tags branch May 15, 2026 21:43
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