Skip to content

fix(rpc): add UpgradeXxHeight to Filecoin.StateGetNetworkParams#7194

Open
sudo-shashank wants to merge 10 commits into
mainfrom
shashank/add-network-upgrade-placeholder
Open

fix(rpc): add UpgradeXxHeight to Filecoin.StateGetNetworkParams#7194
sudo-shashank wants to merge 10 commits into
mainfrom
shashank/add-network-upgrade-placeholder

Conversation

@sudo-shashank

@sudo-shashank sudo-shashank commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary of changes

Changes introduced in this pull request:

Reference issue to close (if applicable)

Follow up PR #7192

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 support for the NV29 network upgrade with a configurable UpgradeXxHeight parameter, using network-specific values (mainnet vs other networks).
  • Documentation

    • Updated the OpenRPC API specifications to include UpgradeXxHeight.
    • Updated the changelog with the NV29 upgrade details.
  • Tests

    • Expanded API comparison ignore lists for additional Ethereum RPC methods.
    • Refreshed API command snapshot artifacts to match updated outputs.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 71700a55-2aed-4bf6-8dfa-edae2eb96141

📥 Commits

Reviewing files that changed from the base of the PR and between d0e589a and d5d056c.

⛔ 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 (1)
  • src/tool/subcommands/api_cmd/test_snapshots.txt
🔗 Linked repositories identified

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

  • filecoin-project/lotus (manual)
✅ Files skipped from review due to trivial changes (1)
  • src/tool/subcommands/api_cmd/test_snapshots.txt

Walkthrough

Adds the UpgradeXxHeight placeholder field for the NV29 network upgrade to ForkUpgradeParams in state.rs, populating it with network-dependent sentinel values via a NetworkChain match. The OpenRPC specs (v0.json, v1.json) are updated to reflect the new required field, the changelog documents the change, and three ETH RPC methods are added to API comparison filter lists.

Changes

NV29 UpgradeXxHeight Placeholder and API Filter Updates

Layer / File(s) Summary
ForkUpgradeParams field and TryFrom implementation
src/rpc/methods/state.rs, src/tool/subcommands/api_cmd/test_snapshots.txt
Imports NetworkChain, adds upgrade_xx_height: ChainEpoch as a public field on ForkUpgradeParams, and populates it in TryFrom<&ChainConfig> with different sentinel values for Mainnet vs other networks. Test snapshot updated to reflect the RPC change.
OpenRPC spec and changelog updates
docs/openrpc-specs/v0.json, docs/openrpc-specs/v1.json, CHANGELOG.md
Adds UpgradeXxHeight as an integer/int64 property and marks it required in the ForkUpgradeParams schema in both OpenRPC specs; adds a changelog entry under ### Fixed.
API comparison filter list updates
scripts/tests/api_compare/filter-list, scripts/tests/api_compare/filter-list-gateway, scripts/tests/api_compare/filter-list-offline
Adds EthEstimateGas, EthGetBlockByHash, and EthGetBlockByNumber to the broken/ignored filter lists; adds EthGetTransactionByHashLimited and the same ETH methods to the gateway not-supported list.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • ChainSafe/forest#6028: Both PRs modify src/rpc/methods/state.rs's ForkUpgradeParams (and its TryFrom<&ChainConfig> population) by adding new network fork-height fields.
  • ChainSafe/forest#6570: Both PRs modify scripts/tests/api_compare/filter-list-gateway by adding unsupported/broken Filecoin ETH RPC method entries.
  • ChainSafe/forest#6805: Both PRs extend ForkUpgradeParams in src/rpc/methods/state.rs and update associated OpenRPC specs and StateGetNetworkParams test snapshots for new network upgrade heights.

Suggested labels

RPC

Suggested reviewers

  • hanabi1224
  • LesnyRumcajs
  • 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: adding UpgradeXxHeight to the Filecoin.StateGetNetworkParams RPC method, which is reflected across schema updates, implementation changes, and documentation.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch shashank/add-network-upgrade-placeholder
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch shashank/add-network-upgrade-placeholder

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/tests/api_compare/filter-list`:
- Around line 4-6: The filter-list file currently excludes EthEstimateGas,
EthGetBlockByHash, and EthGetBlockByNumber methods with no explanation, while
these methods are fully implemented and passing conformance tests. Follow the
documentation pattern used in the filter-list-gateway file by adding comments to
each excluded method that reference the specific upstream Lotus PR or issue that
explains why the method is excluded, or alternatively remove these three methods
entirely from the filter-list if they are not actually broken in the tested
Lotus version. Each method exclusion should include a reference URL similar to
the format shown in filter-list-gateway to provide clear justification for the
exclusion.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: cb4ba115-6bbd-498b-bd9e-266d8995c464

📥 Commits

Reviewing files that changed from the base of the PR and between 4edfd01 and 26d199a.

⛔ 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 (11)
  • CHANGELOG.md
  • docs/openrpc-specs/v0.json
  • docs/openrpc-specs/v1.json
  • scripts/devnet/.env
  • scripts/tests/api_compare/.env
  • scripts/tests/api_compare/filter-list
  • scripts/tests/api_compare/filter-list-gateway
  • scripts/tests/api_compare/filter-list-offline
  • scripts/tests/bootstrapper/.env
  • scripts/tests/snapshot_parity/.env
  • src/rpc/methods/state.rs
🔗 Linked repositories identified

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

  • filecoin-project/lotus (manual)

Comment thread scripts/tests/api_compare/filter-list
@sudo-shashank sudo-shashank marked this pull request as ready for review June 19, 2026 16:28
@sudo-shashank sudo-shashank requested a review from a team as a code owner June 19, 2026 16:28
@sudo-shashank sudo-shashank requested review from LesnyRumcajs and hanabi1224 and removed request for a team June 19, 2026 16:28
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 64.36%. Comparing base (d1cb4f8) to head (d5d056c).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/rpc/methods/state.rs 66.66% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/rpc/methods/state.rs 44.44% <66.66%> (+0.03%) ⬆️

... and 12 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 d1cb4f8...d5d056c. 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.

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.

1 participant