Skip to content

fix: add missing golden week entry in StateGetNetworkParams#6805

Merged
LesnyRumcajs merged 2 commits intomainfrom
missing-golden-week-height
Mar 26, 2026
Merged

fix: add missing golden week entry in StateGetNetworkParams#6805
LesnyRumcajs merged 2 commits intomainfrom
missing-golden-week-height

Conversation

@LesnyRumcajs
Copy link
Copy Markdown
Member

@LesnyRumcajs LesnyRumcajs commented Mar 26, 2026

Summary of changes

Changes introduced in this pull request:

  • added missing golden week entry in StateGetNetworkParams and fixes RPC test.

Reference issue to close (if applicable)

Closes #6707

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

  • Bug Fixes
    • Fixed missing GoldenWeek network upgrade information in the StateGetNetworkParams RPC method, ensuring the upgrade height is now correctly included in responses.

@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner March 26, 2026 10:58
@LesnyRumcajs LesnyRumcajs requested review from hanabi1224 and sudo-shashank and removed request for a team March 26, 2026 10:58
@LesnyRumcajs LesnyRumcajs force-pushed the missing-golden-week-height branch from ad91c0e to 3542d12 Compare March 26, 2026 10:58
@LesnyRumcajs LesnyRumcajs enabled auto-merge March 26, 2026 10:58
hanabi1224
hanabi1224 previously approved these changes Mar 26, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 26, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ 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

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 16bb9d98-f7d9-470b-9965-3a8c01c5ff67

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This PR uncomments and activates the upgrade_golden_week_height field in the ForkUpgradeParams struct and populates it during RPC responses, while updating the corresponding changelog entry and regenerating test snapshots.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md
Added changelog entry documenting that GoldenWeek is now included in Filecoin.StateGetNetworkParams RPC method.
RPC Implementation
src/rpc/methods/state.rs
Activated upgrade_golden_week_height: ChainEpoch field in ForkUpgradeParams struct and populated it from height_infos via get_height(GoldenWeek)? in the TryFrom<&ChainConfig> implementation.
Test Snapshots
src/tool/subcommands/api_cmd/test_snapshots.txt
Updated filecoin_stategetnetworkparams snapshot file reference with new timestamp.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

RPC

Suggested reviewers

  • hanabi1224
  • sudo-shashank
  • akaladarshi
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR implements only 2 of 4 required tasks from issue #6707: uncommenting the struct field and implementation, plus updating snapshots. However, it does not update the OpenRPC specs in docs/openrpc-specs/v0.json and docs/openrpc-specs/v1.json as explicitly required. Update docs/openrpc-specs/v0.json and docs/openrpc-specs/v1.json to include the GoldenWeek field in the ForkUpgradeParams schema definition.
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 (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding the missing GoldenWeek entry to the StateGetNetworkParams RPC method.
Out of Scope Changes check ✅ Passed All changes are directly related to re-enabling the GoldenWeek field: struct modification, implementation update, changelog entry, and snapshot regeneration. No out-of-scope changes detected.

✏️ 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 missing-golden-week-height
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch missing-golden-week-height

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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

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 the current code and only fix it if needed.

Inline comments:
In `@src/tool/subcommands/api_cmd/test_snapshots.txt`:
- Line 285: The OpenRPC specs are out of date after adding the
upgrade_golden_week_height field to ForkUpgradeParams (affects NetworkParams);
regenerate the specs by running the generation script
(docs/scripts/generate-openrpc-specs.sh local) so docs/openrpc-specs/v0.json,
v1.json, and v2.json include the new field, then commit the updated spec files
(and any affected test snapshots) alongside the code change.
🪄 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: 1a082403-faf5-4dd8-bdc2-52923a691375

📥 Commits

Reviewing files that changed from the base of the PR and between f9ce8a6 and 3542d12.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • src/rpc/methods/state.rs
  • src/tool/subcommands/api_cmd/test_snapshots.txt

Comment thread src/tool/subcommands/api_cmd/test_snapshots.txt
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 63.81%. Comparing base (f9ce8a6) to head (4ea9c43).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/rpc/methods/state.rs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/rpc/methods/state.rs 46.20% <0.00%> (-0.03%) ⬇️

... and 7 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 f9ce8a6...4ea9c43. 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.

@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Mar 26, 2026
Merged via the queue into main with commit 24c7307 Mar 26, 2026
45 checks passed
@LesnyRumcajs LesnyRumcajs deleted the missing-golden-week-height branch March 26, 2026 13:36
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.

Uncomment GoldenWeek from ForkUpgradeParams

2 participants