Skip to content

docs: the REST guide still tells operators pubsequence doesn't exist - #53

Merged
metaphorics merged 1 commit into
mainfrom
devin/1786465090-rest-docs-pubsequence
Aug 11, 2026
Merged

docs: the REST guide still tells operators pubsequence doesn't exist#53
metaphorics merged 1 commit into
mainfrom
devin/1786465090-rest-docs-pubsequence

Conversation

@metaphorics

Copy link
Copy Markdown
Contributor

Summary

docs/rest-interface.md landed in #49 while pubsequence was still missing, so it tells operators to point the enforcer at an external ZMQ publisher via --node-zmq-addr-sequence or to run it in a no-mempool mode. #52 shipped the topic, which makes that instruction actively wrong — it sends someone setting up an enforcer down a workaround for a problem main no longer has, when auto-discovery through getzmqnotifications now works out of the box.

Rewritten to describe what we ship: block C/D on pubsequence, discoverable via getzmqnotifications, with mempool A/R still intentionally absent — same framing as README.md, docs/getting-started.md and the reorg-design note, so the docs stop disagreeing with each other. The getnetworkinfo version caveat directly above it is untouched, because that one is still true.

Docs only, no code change.

Link to Devin session: https://app.devin.ai/sessions/2cf54a23e1494fd080fa7541dadf06ff
Requested by: @metaphorics

@metaphorics metaphorics self-assigned this Aug 11, 2026
@devin-ai-integration

Copy link
Copy Markdown
Original prompt from a

@gosuda/bitcoin-rs Minimally merge this. https://github.com/LayerTwo-Labs/bip300301_enforcer/

@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Documented support for the Core-compatible pubsequence ZMQ topic.
    • Clarified block connect and disconnect events and automatic endpoint discovery.
    • Noted that mempool add/remove events are not currently available.

Walkthrough

The REST interface documentation now describes Core-compatible pubsequence block connect and disconnect events, automatic endpoint discovery through getzmqnotifications, and the continued absence of mempool add/remove events.

Changes

pubsequence documentation

Layer / File(s) Summary
Document notification discovery and event scope
docs/rest-interface.md
The documentation now describes automatic pubsequence discovery through getzmqnotifications, block connect and disconnect events, and the lack of mempool add/remove events.

Possibly related PRs

  • gosuda/bitcoin-rs#52: Documents the same pubsequence block connect/disconnect support and getzmqnotifications exposure.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description clearly explains the documentation update and its relationship to the built-in pubsequence feature.
Title check ✅ Passed The title uses a valid Conventional Commits prefix and accurately describes the documentation change.
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.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch devin/1786465090-rest-docs-pubsequence

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.

@metaphorics
metaphorics merged commit 4fd333f into main Aug 11, 2026
11 of 12 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce6d706aec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/rest-interface.md
Comment on lines +41 to +43
bitcoin-rs publishes the Core-compatible `pubsequence` ZMQ topic with block
connect (`C`) and disconnect (`D`) events. The configured endpoint is reported
by `getzmqnotifications`, so the unmodified enforcer can discover it through

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the required pubsequence endpoint

When an operator follows this guide with only rest=1, the node's default zmqpubsequence list is empty (crates/node/src/config.rs), so NodeState installs NoOpZmqPublisher and getzmqnotifications reports no sequence endpoint. Auto-discovery therefore works only after bitcoin-rs is also configured with something like zmqpubsequence=tcp://127.0.0.1:28332; document that prerequisite here, otherwise the setup presented by this guide still leaves the enforcer without a publisher.

Useful? React with 👍 / 👎.

Comment thread docs/rest-interface.md
Comment on lines +43 to +46
by `getzmqnotifications`, so the unmodified enforcer can discover it through
its normal startup path rather than requiring an external publisher or an
explicit `--node-zmq-addr-sequence`. Mempool `A`/`R` events remain intentionally
absent until the mempool has per-transaction event sequencing and explicit

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain the no-mempool requirement

Even with a configured endpoint, this block-only stream cannot replace the previous no-mempool/bounded guidance when the enforcer tracks bitcoin-rs's mempool. CONCEPTS.md records that the enforcer requires a contiguous transaction-event sequence, but transactions can enter the node while this publisher emits no A/R events, so discovery of the socket does not keep the enforcer's mempool view synchronized. Retain the operational restriction or explicitly scope the no-external-publisher claim to block-only/no-mempool operation.

AGENTS.md reference: AGENTS.md:L3-L7

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/rest-interface.md`:
- Around line 41-43: Update the documentation text to distinguish the configured
notification type `pubsequence` from the actual ZMQ wire topic, referring to
`sequence` as the topic clients must subscribe to while retaining `pubsequence`
for configuration and `getzmqnotifications` discovery.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: be9c78ea-9e5e-4ae2-bccd-3f98525989e5

📥 Commits

Reviewing files that changed from the base of the PR and between a3d68fc and ce6d706.

📒 Files selected for processing (1)
  • docs/rest-interface.md
📜 Review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: test
  • GitHub Check: bench-smoke
  • GitHub Check: wallet-no-seckey
  • GitHub Check: fmt
🧰 Additional context used
🔍 Remote MCP Github Grep

Relevant review context

  • Bitcoin Core configures this through -zmqpubsequence=<address> and registers a corresponding pubsequence notifier.
  • The actual ZMQ command emitted on the wire is named sequence, not pubsequence; the latter is the configuration/notifier name. Documentation should distinguish these terms.
  • getzmqnotifications is an RPC that returns information about active ZMQ notifications, supporting the discoverability claim.
  • Core’s sequence payload includes the reversed 32-byte hash, an event label, and optionally a little-endian sequence number.

Comment thread docs/rest-interface.md
Comment on lines +41 to +43
bitcoin-rs publishes the Core-compatible `pubsequence` ZMQ topic with block
connect (`C`) and disconnect (`D`) events. The configured endpoint is reported
by `getzmqnotifications`, so the unmodified enforcer can discover it through

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Use sequence for the wire topic.

This wording confuses the notifier name with the ZMQ topic. pubsequence is the configuration and getzmqnotifications type; the wire topic is sequence. A client that subscribes to pubsequence will receive no messages.

Proposed wording
-bitcoin-rs publishes the Core-compatible `pubsequence` ZMQ topic with block
+bitcoin-rs publishes the Core-compatible `sequence` ZMQ topic for the
+`pubsequence` notifier, with block
 connect (`C`) and disconnect (`D`) events.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
bitcoin-rs publishes the Core-compatible `pubsequence` ZMQ topic with block
connect (`C`) and disconnect (`D`) events. The configured endpoint is reported
by `getzmqnotifications`, so the unmodified enforcer can discover it through
bitcoin-rs publishes the Core-compatible `sequence` ZMQ topic for the
`pubsequence` notifier, with block connect (`C`) and disconnect (`D`) events. The configured endpoint is reported
by `getzmqnotifications`, so the unmodified enforcer can discover it through
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/rest-interface.md` around lines 41 - 43, Update the documentation text
to distinguish the configured notification type `pubsequence` from the actual
ZMQ wire topic, referring to `sequence` as the topic clients must subscribe to
while retaining `pubsequence` for configuration and `getzmqnotifications`
discovery.

Source: MCP tools

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