Skip to content

feat: NV27 butterflynet#6047

Merged
LesnyRumcajs merged 1 commit intomainfrom
butterflynet-update-v17
Sep 8, 2025
Merged

feat: NV27 butterflynet#6047
LesnyRumcajs merged 1 commit intomainfrom
butterflynet-update-v17

Conversation

@LesnyRumcajs
Copy link
Member

@LesnyRumcajs LesnyRumcajs commented Sep 8, 2025

Summary of changes

Changes introduced in this pull request:

  • butterflynet support for nv27

Reference issue to close (if applicable)

Closes #6022

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.

Summary by CodeRabbit

  • New Features
    • Support for butterflynet’s GoldenWeek upgrade with v17.0.0-rc1 actor bundle.
  • Network Updates
    • Updated butterflynet genesis data sources.
    • Adjusted upgrade heights (Teep, Tock) and scheduled GoldenWeek at height 200.
    • Replaced single bootstrap entry with two dns4 peers for improved connectivity.
  • Migrations
    • Enabled GoldenWeek state migration on butterflynet.
  • Policy
    • Set minimum verified allocation size and pre-commit challenge delay for butterflynet.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 8, 2025

Walkthrough

Updates Butterflynet configuration: replaces bootstrap addresses; adds a new v17.0.0-rc1 actors bundle to the manifest and wiring; updates genesis CID/URLs; adjusts upgrade heights (Teep, Tock, GoldenWeek) and policies; and enables the NV27 (GoldenWeek) state migration for Butterflynet.

Changes

Cohort / File(s) Summary
Bootstrap peers
build/bootstrap/butterflynet
Replaces single /dnsaddr entry with two explicit /dns4 TCP/1347 peer multiaddrs.
Manifest and bundle mapping
build/manifest.json, src/networks/actors_bundle.rs
Adds Butterflynet actors bundle entry v17.0.0-rc1 with corresponding manifest CID and actor list; wires bundle into ACTOR_BUNDLES.
Butterflynet network params
src/networks/butterflynet/mod.rs
Updates GENESIS_CID and URLs; adjusts upgrade heights (Teep: 50, Tock: 100, GoldenWeek: 200 with v17.0.0-rc1); removes EPOCHS_IN_DAY dependency; adds MINIMUM_VERIED_ALLOCATION and PRE_COMMIT_CHALLENGE_DELAY policy constants; applies policy wiring.
State migration wiring
src/state_migration/mod.rs
Activates GoldenWeek migration for Butterflynet using nv27::run_migration; retains Teep nv25 migration.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Operator
  participant Node as Butterflynet Node
  participant Chain as Chain Sync
  participant Migrate as State Migration

  Note over Node,Chain: Startup and bootstrap
  Operator->>Node: Start node (Butterflynet)
  Node->>Chain: Connect to bootstrap-0/1 (dns4/tcp/1347)
  Chain-->>Node: Sync blocks from genesis

  Note over Node: Network upgrade checkpoints
  Node->>Node: Height 50 (Teep) -> apply nv25 policies
  Node->>Node: Height 100 (Tock) -> version bump

  rect rgba(230,245,255,0.6)
  Note right of Node: GoldenWeek (Height 200)
  Node->>Migrate: Trigger NV27 migration (bundle v17.0.0-rc1)
  Migrate-->>Node: Migration complete
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Assessment against linked issues

Objective Addressed Explanation
Update Butterflynet bundle [#6022]
Confirmation that all works as expected before/during/after upgrade [#6022] Requires test evidence or runbook results; not verifiable from code diff.
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch butterflynet-update-v17

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

Base automatically changed from v17-bundle to main September 8, 2025 13:15
@LesnyRumcajs LesnyRumcajs force-pushed the butterflynet-update-v17 branch from 1090bbc to 4e00a90 Compare September 8, 2025 14:15
@LesnyRumcajs LesnyRumcajs marked this pull request as ready for review September 8, 2025 14:19
@LesnyRumcajs LesnyRumcajs requested a review from a team as a code owner September 8, 2025 14:19
@LesnyRumcajs LesnyRumcajs requested review from akaladarshi and hanabi1224 and removed request for a team September 8, 2025 14:19
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.

Actionable comments posted: 1

🧹 Nitpick comments (4)
src/networks/actors_bundle.rs (1)

110-110: Optional: Expand unit coverage to include v17 major version parsing.

Add "v17.0.0-rc1" to test cases in test_actor_major_version_correct() to keep the parser exercised for the newest bundle.

         let cases = [
             ("8.0.0-rc.1", 8),
             ("v9.0.3", 9),
             ("v10.0.0-rc.1", 10),
             ("v12.0.0", 12),
             ("v13.0.0-rc.3", 13),
             ("v13.0.0", 13),
             ("v14.0.0-rc.1", 14),
+            ("v17.0.0-rc1", 17),
         ];
build/bootstrap/butterflynet (1)

1-2: Bootstrap peers updated — LGTM.

Both multiaddresses are well-formed. Optional: consider adding a QUIC/443 peer for environments where TCP/1347 is filtered.

src/networks/butterflynet/mod.rs (2)

51-60: Doc comment commit hash is stale.

The comment mentions commit c6068b6… while GENESIS_URL_ALT points to 8d769c5…. Update the comment to match the actual commit.

-/// `<https://github.com/filecoin-project/lotus/commit/c6068b60c526d44270bfc5d612045f0b27322dfb>`
+/// `<https://github.com/filecoin-project/lotus/commit/8d769c51dcaa165d90c3a0b2d36b93c644db8a13>`

63-65: Typo in constant name: MINIMUM_VERIED_ALLOCATION.

Rename to MINIMUM_VERIFIED_ALLOCATION for clarity; update both macro assignments.

-pub(crate) const MINIMUM_VERIED_ALLOCATION: i64 = 1 << 20;
+pub(crate) const MINIMUM_VERIFIED_ALLOCATION: i64 = 1 << 20;

And below:

- policy.minimum_verified_allocation_size = MINIMUM_VERIED_ALLOCATION.into();
+ policy.minimum_verified_allocation_size = MINIMUM_VERIFIED_ALLOCATION.into();
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8176e82 and 4e00a90.

📒 Files selected for processing (5)
  • build/bootstrap/butterflynet (1 hunks)
  • build/manifest.json (1 hunks)
  • src/networks/actors_bundle.rs (1 hunks)
  • src/networks/butterflynet/mod.rs (3 hunks)
  • src/state_migration/mod.rs (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: Calibnet kademlia checks
  • GitHub Check: Snapshot export checks v2 with F3 data
  • GitHub Check: Snapshot export checks
  • GitHub Check: db-migration-checks
  • GitHub Check: Bootstrap checks - Lotus
  • GitHub Check: State migrations
  • GitHub Check: Calibnet api test-stateful check
  • GitHub Check: Devnet checks
  • GitHub Check: Calibnet no discovery checks
  • GitHub Check: Bootstrap checks - Forest
  • GitHub Check: Wallet tests
  • GitHub Check: Calibnet eth mapping check
  • GitHub Check: Calibnet check
  • GitHub Check: Calibnet stateless mode check
  • GitHub Check: Calibnet stateless RPC check
  • GitHub Check: Forest CLI checks
  • GitHub Check: Build forest binaries on Linux AMD64
  • GitHub Check: tests
  • GitHub Check: tests-release
  • GitHub Check: All lint checks
🔇 Additional comments (7)
src/networks/actors_bundle.rs (1)

89-89: Bundle CID matches manifest entry. After stripping the line-number prefix that rg -n adds, the CID in src/networks/actors_bundle.rs is identical to the one in build/manifest.json for butterflynet v17.0.0-rc1.

src/state_migration/mod.rs (1)

73-76: Enabling GoldenWeek (NV27) on butterflynet looks correct.

Mapping Height::GoldenWeek to nv27::run_migration aligns with the new bundle wiring. Ensure the configured epoch (200) in butterflynet HEIGHT_INFOS matches the intended interop schedule.

src/networks/butterflynet/mod.rs (5)

12-12: Import cleanup — LGTM.

Switch to shim::version::NetworkVersion and keep make_height in scope; no concerns.


46-46: Genesis CID rotated — verify persistence key and CAR availability.

Changing GENESIS_CID alters the DB key (BUTTERFLY_GENESIS-) and download targets. Please confirm the new CAR is available at both URLs before merge.


106-109: Height schedule updated — confirm upgrade cadence.

Teep=50, Tock=100, GoldenWeek=200 with v17.0.0-rc1 bundle: please verify these match Lotus butterflynet interop parameters so nodes don’t diverge.


136-138: Policy wiring for v10 macro — LGTM.

minimum_verified_allocation_size and pre_commit_challenge_delay set; consistent with new constants (post-rename).


160-163: Policy wiring for generic macro — LGTM.

Same parameters applied across versions ≥ v11; no issues spotted.

@LesnyRumcajs LesnyRumcajs added this pull request to the merge queue Sep 8, 2025
github-merge-queue bot pushed a commit that referenced this pull request Sep 8, 2025
Merged via the queue into main with commit 4db52a5 Sep 8, 2025
66 of 67 checks passed
@LesnyRumcajs LesnyRumcajs deleted the butterflynet-update-v17 branch September 8, 2025 15:42
@coderabbitai coderabbitai bot mentioned this pull request Mar 9, 2026
6 tasks
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.

[NV27] Butterflynet testing

3 participants