Skip to content

docs(rpc-extractor): document what RPCs are currently being used - #390

Merged
0xB10C merged 1 commit into
peer-observer:masterfrom
RazorBest:document-rpc-extractor-methods
Mar 27, 2026
Merged

0xB10C merged 1 commit into
peer-observer:masterfrom
RazorBest:document-rpc-extractor-methods

Conversation

@RazorBest

@RazorBest RazorBest commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Documented the methods that are used in the RPC extractor. Added links to individual documentations or PRs if the documentation is not available.

I took the descriptions from bitcoin-core's help messages, and summarized them if possible,

  • getpeerinfo
  • getmempoolinfo
  • uptime
  • getnettotals
  • getmemoryinfo
  • getaddrmaninfo
  • getchaintxstats
  • getnetworkinfo
  • getblockchaininfo
  • getorphantxs
  • getrawaddrman.

Closes #314

@0xB10C

0xB10C commented Mar 25, 2026

Copy link
Copy Markdown
Collaborator

This looks good to me.

We could also add a coloumn marking the RPCs that are currently fetched with --query-interval-less-frequent to the table here.

I've been thinking how to make sure this won't be out of date when we add the next RPC. Do you have an idea for e.g. a CI check that's not too complex? If not, not having a check is not a blocker.

@RazorBest

RazorBest commented Mar 27, 2026 •

Copy link
Copy Markdown
Contributor Author

We could also add a coloumn marking the RPCs that are currently fetched with --query-interval-less-frequent to the table here.

Done

I've been thinking how to make sure this won't be out of date when we add the next RPC. Do you have an idea for e.g. a CI check that's not too complex? If not, not having a check is not a blocker.

I added a simple CI step. I also tried running it conditionally only when the files in extractors/rpc change, but it needs to git fetch the base to use it as a reference; and I thought that's too much. So, the workflow does the check every time.

Comment thread .github/workflows/ci.yml
run: |
set -e

EXPECTED_METHODS=$(head -c 100000 extractors/rpc/src/lib.rs | awk 'match($0, /pub disable_([A-Za-z0-9]+)/, m) { print m[1] }' | sort)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think that should work well and not break too often. Nice

@0xB10C

0xB10C commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator

I removed uptime in a test commit eb35a49 and triggered the CI. It successfully failed with:

cmp: EOF on /dev/fd/62 after byte 145, line 10
❌ Not all the supported RPCs are documented.
Expected methods:\ngetaddrmaninfo
getblockchaininfo
getchaintxstats
getmemoryinfo
getmempoolinfo
getnettotals
getnetworkinfo
getorphantxs
getpeerinfo
getrawaddrman
uptime
Documented methods:\ngetaddrmaninfo
getblockchaininfo
getchaintxstats
getmemoryinfo
getmempoolinfo
getnettotals
getnetworkinfo
getorphantxs
getpeerinfo
getrawaddrman
Error: Process completed with exit code 1.

Added methods: getpeerinfo, getmempoolinfo, uptime, getnettotals, getmemoryinfo, getaddrmaninfo, getchaintxstats, getnetworkinfo, getblockchaininfo, getorphantxs, getrawaddrman.
@0xB10C
0xB10C force-pushed the document-rpc-extractor-methods branch from 05e516f to 774cd46 Compare March 27, 2026 09:06
Comment thread extractors/rpc/README.md Resolved
@0xB10C

0xB10C commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator

Thank you @RazorBest!

@0xB10C
0xB10C merged commit dfda606 into peer-observer:master Mar 27, 2026
11 of 12 checks passed
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.

rpc-extractor: document what RPCs are currently being used

2 participants