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.EthGetBlockReceipts V2 and added test.

Reference issue to close (if applicable)

Closes #6295

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

    • Added Filecoin.EthGetBlockReceipts API v2 method to retrieve all transaction receipts for a block, supporting identification by number, hash, or special tags (e.g., "safe", "finalized").
  • Tests

    • Added test coverage for the new v2 receipts endpoint with various block reference scenarios.

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 28, 2026

Walkthrough

The PR implements Filecoin.EthGetBlockReceipts for API v2 by refactoring the existing get_block_receipts function to accept a pre-resolved Tipset, introducing a new EthGetBlockReceiptsV2 method using ExtBlockNumberOrHash, and adding corresponding test cases.

Changes

Cohort / File(s) Summary
Changelog & API Implementation
CHANGELOG.md, src/rpc/methods/eth.rs, src/rpc/mod.rs
Added changelog entry for new feature. Refactored get_block_receipts to accept resolved Tipset instead of BlockNumberOrHash. Introduced EthGetBlockReceiptsV2 as new RPC method with ExtBlockNumberOrHash parameter, using v2 tipset resolver. Updated existing method handlers (EthGetBlockReceipts, EthGetBlockReceiptsLimited) to resolve block parameters before delegation. Added DESCRIPTION fields to both methods.
Testing & Snapshots
src/tool/subcommands/api_cmd/api_compare_tests.rs, src/tool/subcommands/api_cmd/test_snapshots.txt
Added three new test cases for EthGetBlockReceiptsV2 covering block hash (identity test) and predefined tags (Safe, Finalized). Appended three corresponding snapshot files to test snapshots list.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • hanabi1224
  • akaladarshi
🚥 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 title accurately summarizes the main change: implementing Filecoin.EthGetBlockReceipts V2 API support, which is clearly reflected in all modified files.
Linked Issues check ✅ Passed The PR successfully implements the RPC v2 method Filecoin.EthGetBlockReceipts as required by issue #6295, including new EthGetBlockReceiptsV2 method, tests, changelog entry, and all supporting changes.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the V2 RPC method: core implementation, tests, snapshots, changelog, and registration—no unrelated modifications detected.

✏️ 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 added the RPC requires calibnet RPC checks to run on CI label Jan 28, 2026
@sudo-shashank sudo-shashank marked this pull request as ready for review January 28, 2026 17:50
@sudo-shashank sudo-shashank requested a review from a team as a code owner January 28, 2026 17:50
@sudo-shashank sudo-shashank requested review from LesnyRumcajs and hanabi1224 and removed request for a team January 28, 2026 17:50
@codecov
Copy link

codecov bot commented Jan 28, 2026

Codecov Report

❌ Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.75%. Comparing base (a23d136) to head (173fc1b).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/rpc/methods/eth.rs 86.95% 2 Missing and 1 partial ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/rpc/mod.rs 24.47% <ø> (ø)
src/rpc/methods/eth.rs 69.21% <86.95%> (+0.21%) ⬆️

... and 6 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 a23d136...173fc1b. Read the comment docs.

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

@sudo-shashank sudo-shashank added this pull request to the merge queue Jan 28, 2026
Merged via the queue into main with commit 7254a42 Jan 28, 2026
49 of 51 checks passed
@sudo-shashank sudo-shashank deleted the shashank/EthGetBlockReceiptsV2 branch January 28, 2026 19:26
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.EthGetBlockReceipts

3 participants