Skip to content

Conversation

@sudo-shashank
Copy link
Contributor

@sudo-shashank sudo-shashank commented Jan 28, 2026

Summary of changes

Changes introduced in this pull request:

  • Impl Filecoin.EthGetStorageAt V2 and added test.

Reference issue to close (if applicable)

Closes #6301

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

  • 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

    • Implemented Filecoin.EthGetStorageAt for API v2, providing storage value retrieval with extended block parameter support.
  • Tests

    • Added test cases for the V2 storage endpoint covering current, safe, and finalized block references.

✏️ Tip: You can customize this high-level summary in your review settings.

@sudo-shashank sudo-shashank added the RPC requires calibnet RPC checks to run on CI label Jan 28, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

This PR implements the Filecoin.EthGetStorageAt RPC method for API v2 by introducing a new EthGetStorageAtV2 variant that accepts extended block parameters. Core storage retrieval logic is extracted into a shared helper function, which both the original and new implementations delegate to. Tests and snapshots are added for the new endpoint.

Changes

Cohort / File(s) Summary
Core RPC Implementation
src/rpc/methods/eth.rs
Introduces EthGetStorageAtV2 enum and RpcMethod implementation with ExtBlockNumberOrHash parameter. Extracts storage retrieval logic into new async helper get_storage_at(). Refactors existing EthGetStorageAt to delegate to the helper. Adds DESCRIPTION fields for API documentation.
RPC Method Registry
src/rpc/mod.rs
Registers EthGetStorageAtV2 in the for_each_rpc_method macro under Eth RPC methods.
Tests and Snapshots
src/tool/subcommands/api_cmd/api_compare_tests.rs, src/tool/subcommands/api_cmd/test_snapshots.txt
Adds three new test cases for EthGetStorageAtV2 covering block references (current epoch, safe, finalized). Includes corresponding snapshot files for regression testing.
Changelog
CHANGELOG.md
Documents the new RPC v2 method implementation entry.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • hanabi1224
  • LesnyRumcajs
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately and concisely describes the primary change: adding V2 support for the Filecoin.EthGetStorageAt RPC method.
Linked Issues check ✅ Passed The PR implements the RPC v2 method Filecoin.EthGetStorageAt as required by issue #6301, including tests and documentation updates.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the EthGetStorageAtV2 RPC method: new RPC variant, shared helper logic, tests, test snapshots, and changelog documentation.

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

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

@sudo-shashank sudo-shashank marked this pull request as ready for review January 28, 2026 21:09
@sudo-shashank sudo-shashank requested a review from a team as a code owner January 28, 2026 21:09
@sudo-shashank sudo-shashank requested review from LesnyRumcajs and hanabi1224 and removed request for a team January 28, 2026 21:09
@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 74.19355% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.76%. Comparing base (7254a42) to head (c313444).

Files with missing lines Patch % Lines
src/rpc/methods/eth.rs 74.19% 9 Missing and 7 partials ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/rpc/mod.rs 24.47% <ø> (ø)
src/rpc/methods/eth.rs 69.46% <74.19%> (+0.24%) ⬆️

... and 8 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RPC requires calibnet RPC checks to run on CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RPC v2] Filecoin.EthGetStorageAt

2 participants