Skip to content

chore: nv28 skeleton#6706

Merged
LesnyRumcajs merged 3 commits intomainfrom
nv28-skeleton
Mar 9, 2026
Merged

chore: nv28 skeleton#6706
LesnyRumcajs merged 3 commits intomainfrom
nv28-skeleton

Conversation

@LesnyRumcajs
Copy link
Member

@LesnyRumcajs LesnyRumcajs commented Mar 9, 2026

Summary of changes

Changes introduced in this pull request:

  • added a skeleton for nv28, to facilitate further FIP implementations in Forest
  • fixed some GoldenWeek leftovers

Reference issue to close (if applicable)

Closes #6704

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

Release Notes

  • New Features

    • Added support for new network version (V27/V28) with corresponding height configurations across all networks (mainnet, calibnet, devnet, butterflynet).
    • Updated network version constants to reflect the latest supported version.
  • Tests

    • Updated test suite to validate new height configuration and version mappings.

@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner March 9, 2026 11:30
@LesnyRumcajs LesnyRumcajs requested review from akaladarshi and hanabi1224 and removed request for a team March 9, 2026 11:30
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 9, 2026

Walkthrough

This PR adds a new network upgrade height entry (Xxx) across multiple network configurations and introduces a corresponding Height enum variant that maps to NetworkVersion::V28. The NEWEST_NETWORK_VERSION is updated from V25 to V27, and logging infrastructure for the upgrade event is added.

Changes

Cohort / File(s) Summary
Network Height Definitions
src/networks/butterflynet/mod.rs, src/networks/calibnet/mod.rs, src/networks/mainnet/mod.rs
Added Xxx height entry with value i64::MAX to HEIGHT_INFOS in each network module.
Devnet Height Definition
src/networks/devnet/mod.rs
Added Xxx height entry using make_height! macro with FOREST_XXX_HEIGHT constant set to 9999999999.
Network Version Mapping
src/networks/mod.rs
Updated NEWEST_NETWORK_VERSION constant from V25 to V27, added Xxx variant to Height enum, extended From for NetworkVersion trait to map Height::Xxx to NetworkVersion::V28, and updated tests to include the new height.
RPC State
src/rpc/methods/state.rs
Added commented placeholder line for upgrade_xxx_height: ChainEpoch in ForkUpgradeParams and corresponding commented placeholder in TryFrom implementation.
Upgrade Logging
src/utils/misc/logo.rs
Added new match arm for NetworkVersion::V28 in reveal_upgrade_logo function and introduced private reveal_xxx_upgrade() function to log the upgrade event.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

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

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR adds network upgrade infrastructure (Height::Xxx, NetworkVersion mapping, height entries) but does not replace PLACEHOLDER_NEXT_UPGRADE_HEIGHT or update its callers as required by issue #6704. Replace PLACEHOLDER_NEXT_UPGRADE_HEIGHT in src/chain/store/base_fee.rs with the configured value and update all callers to use the new height configuration.
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% 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 'chore: nv28 skeleton' accurately describes the main change: adding a network upgrade skeleton for nv28 (FIP-0115).
Out of Scope Changes check ✅ Passed All changes align with the nv28 skeleton implementation objectives, including height entries, logo reveal, and RPC stubs.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nv28-skeleton

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

@LesnyRumcajs LesnyRumcajs added the RPC requires calibnet RPC checks to run on CI label Mar 9, 2026
hanabi1224
hanabi1224 previously approved these changes Mar 9, 2026
LesnyRumcajs and others added 3 commits March 9, 2026 13:27
GoldenWeek is still commented out in ForkUpgradeParams,
so these files should not change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
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.

♻️ Duplicate comments (1)
src/rpc/methods/state.rs (1)

3145-3146: ⚠️ Potential issue | 🟠 Major

Expose these heights through StateGetNetworkParams.

Keeping upgrade_golden_week_height and upgrade_xxx_height commented here means the RPC still hides configured upgrade epochs even though the chain config now carries them. That leaves the nv28 skeleton only partially wired and still diverges from Lotus' ForkUpgradeParams surface.

Also applies to: 3194-3195

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/rpc/methods/state.rs` around lines 3145 - 3146, The RPC response for
StateGetNetworkParams currently omits upgrade_golden_week_height and
upgrade_xxx_height (they are commented out); update the
StateGetNetworkParams-related types and serialization in
src/rpc/methods/state.rs to include these fields (matching Lotus'
ForkUpgradeParams surface), wire them into the code path that builds the network
params from the chain config (pull values from the chain config / ForkUpgrade
params used elsewhere), and ensure they are populated and returned by the
StateGetNetworkParams handler (update any response struct, JSON keys, and tests
if present) so the RPC exposes those configured upgrade epochs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@src/rpc/methods/state.rs`:
- Around line 3145-3146: The RPC response for StateGetNetworkParams currently
omits upgrade_golden_week_height and upgrade_xxx_height (they are commented
out); update the StateGetNetworkParams-related types and serialization in
src/rpc/methods/state.rs to include these fields (matching Lotus'
ForkUpgradeParams surface), wire them into the code path that builds the network
params from the chain config (pull values from the chain config / ForkUpgrade
params used elsewhere), and ensure they are populated and returned by the
StateGetNetworkParams handler (update any response struct, JSON keys, and tests
if present) so the RPC exposes those configured upgrade epochs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 73c60730-d43d-4e56-a4d4-b708a895e489

📥 Commits

Reviewing files that changed from the base of the PR and between f39dd4a and bd084c4.

📒 Files selected for processing (7)
  • src/networks/butterflynet/mod.rs
  • src/networks/calibnet/mod.rs
  • src/networks/devnet/mod.rs
  • src/networks/mainnet/mod.rs
  • src/networks/mod.rs
  • src/rpc/methods/state.rs
  • src/utils/misc/logo.rs
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/networks/butterflynet/mod.rs
  • src/networks/devnet/mod.rs
  • src/networks/calibnet/mod.rs

@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 58.33333% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.38%. Comparing base (87b3ff1) to head (bd084c4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/utils/misc/logo.rs 0.00% 4 Missing ⚠️
src/networks/mod.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
src/networks/butterflynet/mod.rs 70.93% <100.00%> (+0.34%) ⬆️
src/networks/calibnet/mod.rs 100.00% <100.00%> (ø)
src/networks/devnet/mod.rs 93.03% <100.00%> (+0.18%) ⬆️
src/networks/mainnet/mod.rs 100.00% <100.00%> (ø)
src/rpc/methods/state.rs 46.17% <ø> (ø)
src/networks/mod.rs 88.99% <0.00%> (-0.21%) ⬇️
src/utils/misc/logo.rs 17.77% <0.00%> (-1.74%) ⬇️

... 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 87b3ff1...bd084c4. Read the comment docs.

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

@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Mar 9, 2026
Merged via the queue into main with commit 80f3c02 Mar 9, 2026
34 checks passed
@LesnyRumcajs LesnyRumcajs deleted the nv28-skeleton branch March 9, 2026 15:42
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.

chore: add network upgrade skeleton for FIP-0115 activation epoch

2 participants