Skip to content

feat: add DESCRIPTION to all missing RPC methods#1

Open
Patrick-Ehimen wants to merge 2 commits into
mainfrom
fix/rpc-missing-descriptions
Open

feat: add DESCRIPTION to all missing RPC methods#1
Patrick-Ehimen wants to merge 2 commits into
mainfrom
fix/rpc-missing-descriptions

Conversation

@Patrick-Ehimen

@Patrick-Ehimen Patrick-Ehimen commented May 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds const DESCRIPTION to all 96 RpcMethod implementations that were missing it
  • Brings coverage from 133/229 (58%) to 229/229 (100%)
  • Descriptions follow the existing style: present-tense, action-oriented, single sentence
  • Descriptions flow directly into the OpenRPC spec via Self::DESCRIPTION in reflect/mod.rs

Closes ChainSafe#6460

Test plan

  • cargo check — the build failure (tikv-jemalloc-sys / spaces in path) is pre-existing on main and unrelated to this change; upstream CI passes
  • OpenRPC spec: Self::DESCRIPTION maps to the description field in the OpenRPC method descriptor (src/rpc/reflect/mod.rs:242) — same wiring used by the 133 already-described methods

Summary by Sourcery

Add descriptive metadata to RPC methods to improve API discoverability and OpenRPC generation.

Enhancements:

  • Populate DESCRIPTION constants for all previously undocumented RpcMethod implementations across modules to provide consistent human-readable method descriptions.

Documentation:

  • Ensure every RPC method now exposes a description used by the OpenRPC specification and external API documentation.

@sourcery-ai

sourcery-ai Bot commented May 16, 2026

Copy link
Copy Markdown

Reviewer's Guide

Adds const DESCRIPTION fields to all previously undocumented RpcMethod implementations so they flow into the OpenRPC spec, without changing behavior, parameters, permissions, or wiring.

File-Level Changes

Change Details Files
Add DESCRIPTION constants to all RpcMethod implementations that were previously missing descriptions so OpenRPC method descriptors gain human-readable documentation coverage.
  • Introduce const DESCRIPTION: Option<&'static str> for each affected RpcMethod enum, following existing style (present-tense, action-oriented, single sentence).
  • Ensure each description accurately summarizes the method’s behavior, parameters, and any limits (e.g., lookback bounds, blocking behavior, units).
  • Rely on existing plumbing in reflect/mod.rs where Self::DESCRIPTION feeds the OpenRPC method description field, without modifying that wiring or other method metadata.
src/rpc/methods/eth.rs
src/rpc/methods/f3.rs
src/rpc/methods/chain.rs
src/rpc/methods/wallet.rs
src/rpc/methods/state.rs
src/rpc/methods/net.rs
src/rpc/methods/msig.rs
src/rpc/methods/common.rs
src/rpc/methods/auth.rs
src/rpc/methods/sync.rs
src/rpc/methods/beacon.rs
src/rpc/methods/market.rs
src/rpc/methods/node.rs

Assessment against linked issues

Issue Objective Addressed Explanation
ChainSafe#6460 Add a const DESCRIPTION: Option<&'static str> field to every RpcMethod implementation in the codebase so that all RPC methods are documented.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Patrick-Ehimen Patrick-Ehimen force-pushed the fix/rpc-missing-descriptions branch from 2376924 to 54074c0 Compare May 23, 2026 12:15
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.

Add DESCRIPTION to all RPC methods

1 participant