Skip to content

feat(rpc): add Filecoin.ID - #7893

Open
akaladarshi wants to merge 1 commit into
akaladarshi/miner-worker-keyfrom
akaladarshi/filecoin-id
Open

akaladarshi wants to merge 1 commit into
akaladarshi/miner-worker-keyfrom
akaladarshi/filecoin-id

Conversation

@akaladarshi

@akaladarshi akaladarshi commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary of changes

Changes introduced in this pull request:

  • Adds new API Filecoin.ID

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Outside contributions

  • This pull request is based on an issue that a maintainer has accepted (see Before Opening a Pull Request).
  • I have read and agree to the CONTRIBUTING document.
  • I have read and agree to the AI Policy document. I understand that failure to comply with the guidelines will lead to rejection of the pull request.

Summary by CodeRabbit

  • New Features
    • Added the Filecoin.ID RPC method, which returns the node’s peer ID and supports Lotus API compatibility.
  • Documentation
    • Added a Forest v0.40.0 “Copperhead” changelog entry documenting the new method.

@akaladarshi
akaladarshi added this pull request to stack #7846 November 18, 2026 13:34
@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds the Filecoin.ID RPC method. It returns the peer ID from NetAddrsListen and updates the RPC registry, API comparison tests and filters, snapshot ignore list, and changelog.

Changes

Filecoin.ID RPC method

Layer / File(s) Summary
Implement and register Filecoin.ID
src/rpc/methods/net.rs, src/rpc/mod.rs, src/tool/subcommands/api_cmd/api_compare_tests.rs, scripts/tests/api_compare/*, src/tool/subcommands/api_cmd/test_snapshots_ignored.txt, CHANGELOG.md
The new read-only method is available on all API paths and returns the peer ID from NetAddrsListen. The registry and API comparison tests include the method. The comparison filters and snapshot ignore list add Filecoin.ID. The changelog documents the method.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: RPC

Merge Risk: Minimal · up to 732b2

This adds a read-only Filecoin.ID RPC method that returns the node's peer ID for Lotus compatibility. No actionable merge risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "feat(rpc): add Filecoin.ID" names the main change. The changeset adds the public ID RPC method, exposed as Filecoin.ID, which returns the node's peer ID. The supporting edits register…
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.
Full details: Title check

Explanation

The title "feat(rpc): add Filecoin.ID" names the main change. The changeset adds the public ID RPC method, exposed as Filecoin.ID, which returns the node's peer ID. The supporting edits register the method, add comparison tests, and update the ignore lists and the changelog. The title is specific and matches the primary change, so it passes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Clippy (1.99.1)

Clippy execution failed
Clippy (1.99.1) exceeded its 180-second time budget. Findings from completed work are retained; remaining checks are incomplete.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 59bf76ff-8806-436a-94d0-9257a41c64a8
Commits

Reviewing files that changed from the base of the PR and between 2b6fdca and 732b2ea.

Files ignored due to path filters: 2

  • src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap is excluded by !**/*.snap
  • src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap is excluded by !**/*.snap
Files selected for processing: 7

  • CHANGELOG.md
  • scripts/tests/api_compare/filter-list-gateway
  • scripts/tests/api_compare/filter-list-offline
  • src/rpc/methods/net.rs
  • src/rpc/mod.rs
  • src/tool/subcommands/api_cmd/api_compare_tests.rs
  • src/tool/subcommands/api_cmd/test_snapshots_ignored.txt
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

@akaladarshi
akaladarshi force-pushed the akaladarshi/filecoin-id branch from 5b6334d to 732b2ea Compare November 19, 2026 13:21
@akaladarshi
akaladarshi marked this pull request as ready for review November 19, 2026 13:21
@akaladarshi
akaladarshi requested a review from a team as a code owner November 19, 2026 13:22
@akaladarshi
akaladarshi requested review from LesnyRumcajs and sudo-shashank and removed request for a team November 19, 2026 13:22
@codecov

codecov Bot commented Nov 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.98%. Comparing base (2b6fdca) to head (732b2ea).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/rpc/methods/net.rs 0.00% 7 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/rpc/mod.rs 95.04% <ø> (ø)
src/rpc/methods/net.rs 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2b6fdca...732b2ea. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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.

2 participants