Skip to content

chore: uncomment GoldenWeek and Xxx in ForkUpgradeParams#6728

Closed
gorusys wants to merge 1 commit intoChainSafe:mainfrom
gorusys:fix/6707
Closed

chore: uncomment GoldenWeek and Xxx in ForkUpgradeParams#6728
gorusys wants to merge 1 commit intoChainSafe:mainfrom
gorusys:fix/6707

Conversation

@gorusys
Copy link

@gorusys gorusys commented Mar 12, 2026

Summary of changes

Uncomment upgrade_golden_week_height and upgrade_xxx_height in ForkUpgradeParams and in the TryFrom<&ChainConfig> implementation (nv28 follow-up from the skeleton in #6706). OpenRPC specs and RPC snapshots are updated so the API and tests reflect the new fields.

Changes introduced in this pull request:

  • Uncommented upgrade_golden_week_height: ChainEpoch and upgrade_xxx_height: ChainEpoch in the ForkUpgradeParams struct in src/rpc/methods/state.rs.
  • Uncommented upgrade_golden_week_height: get_height(GoldenWeek)? and upgrade_xxx_height: get_height(Xxx)? in the TryFrom<&ChainConfig> implementation for ForkUpgradeParams.
  • Added UpgradeGoldenWeekHeight and UpgradeXxxHeight to the ForkUpgradeParams schema in docs/openrpc-specs/v0.json and docs/openrpc-specs/v1.json (properties and required array).
  • Updated RPC snapshots src/rpc/snapshots/forest__rpc__tests__rpc__v0.snap and src/rpc/snapshots/forest__rpc__tests__rpc__v1.snap so the ForkUpgradeParams schema includes the new fields and they pass the openrpc snapshot tests.

Reference issue to close (if applicable)

Closes #6707

Other information and links

  • PR chore: nv28 skeleton #6706 added the nv28 skeleton and left these fields commented until upgrade heights were finalised.
  • Height::GoldenWeek and Height::Xxx are already defined in src/networks/mod.rs and used in chain configs (mainnet, calibnet, butterflynet, devnet).

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 two new fork upgrade configuration parameters: Golden Week Height and Xxx Height, now marked as required fields
    • Both parameters are available in the API schema specifications
    • Height values are automatically derived and populated from the blockchain configuration system

@gorusys gorusys requested a review from a team as a code owner March 12, 2026 03:58
@gorusys gorusys requested review from LesnyRumcajs and hanabi1224 and removed request for a team March 12, 2026 03:58
@CLAassistant
Copy link

CLAassistant commented Mar 12, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

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: db50ff8f-1919-4d1f-a5be-175936be9c27

📥 Commits

Reviewing files that changed from the base of the PR and between fc67ad1 and dd5992b.

⛔ 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 (3)
  • docs/openrpc-specs/v0.json
  • docs/openrpc-specs/v1.json
  • src/rpc/methods/state.rs

Walkthrough

Two network upgrade height fields (UpgradeGoldenWeekHeight and UpgradeXxxHeight) are uncommented and finalized in the ForkUpgradeParams struct. The Rust implementation is updated to populate these fields from chain configuration, and corresponding OpenRPC schema definitions are updated to reflect these additions.

Changes

Cohort / File(s) Summary
OpenRPC Schema Updates
docs/openrpc-specs/v0.json, docs/openrpc-specs/v1.json
Added UpgradeGoldenWeekHeight and UpgradeXxxHeight fields (int64) to ForkUpgradeParams schema definitions and marked them as required.
Rust Struct Implementation
src/rpc/methods/state.rs
Added upgrade_golden_week_height and upgrade_xxx_height fields (ChainEpoch type) to ForkUpgradeParams struct and uncommented corresponding height resolution logic in TryFrom<&ChainConfig> conversion.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

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 describes the main change: uncommenting GoldenWeek and Xxx fields in ForkUpgradeParams struct.
Linked Issues check ✅ Passed All coding requirements from issue #6707 are met: fields uncommented in struct and TryFrom implementation, OpenRPC specs updated, and RPC snapshots regenerated.
Out of Scope Changes check ✅ Passed All changes are directly related to uncommenting upgrade fields for nv28 and updating corresponding schemas and snapshots as required by issue #6707.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Signed-off-by: gorusys <goru.connector@outlook.com>
@LesnyRumcajs
Copy link
Member

Thanks for looking into it, but it's not a good issue for external contributors; the RPC snapshots are the ones listed in https://docs.forest.chainsafe.io/developers/guides/rpc_test_snapshot which require access to internal infrastructure.

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

3 participants