Skip to content

feat: add Network Version 27 skeleton #13125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 26, 2025
Merged

feat: add Network Version 27 skeleton #13125

merged 2 commits into from
Jun 26, 2025

Conversation

TippyFlitsUK
Copy link
Contributor

Related Issues

Closes: #13073

Checklist

Before you mark the PR ready for review, please make sure that:

@TippyFlitsUK TippyFlitsUK added the skip/changelog This change does not require CHANGELOG.md update label May 12, 2025
@github-project-automation github-project-automation bot moved this to 📌 Triage in FilOz May 12, 2025
@rjan90 rjan90 self-requested a review May 19, 2025 11:51
@rjan90 rjan90 moved this from 📌 Triage to 🔎 Awaiting Review in FilOz May 19, 2025
@BigLep BigLep marked this pull request as ready for review June 23, 2025 22:33
@Copilot Copilot AI review requested due to automatic review settings June 23, 2025 22:33
@BigLep
Copy link
Member

BigLep commented Jun 23, 2025

@TippyFlitsUK : I marked this as ready for review so we can get Copilot review comments. Let me know if it's not ready to be looked at.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces the Network Version 27 skeleton by bumping dependencies from v16 to v17, updating upgrade schedules, and modifying API documentation and tests accordingly.

  • Updated various import paths and constant values to use v17 versions.
  • Added new upgrade parameters (e.g. UpgradeXxHeight) and updated openrpc example numbers to 27.

Reviewed Changes

Copilot reviewed 65 out of 69 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
storage/pipeline/mocks/mocks.go Updated miner import from v16 to v17.
node/impl/full/state.go Added UpgradeXxHeight to the network parameters.
itests/kit/ensemble_opts_nv.go Updated network version and migration parameters to v27.
go.mod Bumped filecoin-ffi and go-state-types dependency versions.
(Many chain/actors files) Updated actor versions and module references to v17 where needed.
API documentation files Replaced number examples 25 with 27.
build/buildconstants/*.go Adjusted upgrade height constants, including new UpgradeXxHeight.
cmd/lotus-shed/migrations.go Added new migration methods for v17.

@rjan90
Copy link
Contributor

rjan90 commented Jun 25, 2025

Did a manual test run in a local devnet:

Devnet starts from network version 26:

lotus state actor-cids     
Network Version: 26
Actor Version: 16
Manifest CID: bafy2bzaceclp3wfrwdjgh6c3gee5smwj3zmmrhb4fdbc4yfchfaia6rlljx5o

Actor             CID  
account           bafk2bzacebl27l7f5dt35gfeukr7kzkenhwisdy53r3gmbagbzzfejfa3ci6a
cron              bafk2bzacedzo57rpw6debpc7aaenevimqdw44o47l5kjk27xd6qynjx7spyls
datacap           bafk2bzaceddnadztnvgblxukwhwygtynyiee26itbpkncoolxpspvryspvii4
eam               bafk2bzacecogdrpspcsorwamsrmtpmofocc5si7bcavo4jhtbcgpxq6rl5s5q
ethaccount        bafk2bzacebxukyx7vernilg3fcz2h4ale43zj2gijpsa5lon2bcqtme32mss6
evm               bafk2bzacecnukm3qvrefmtrxvazdvghclk67o47p4o42fnpzv4l6cm3etfjqc
init              bafk2bzaceanl3arbn3vbx7qoxjbxbygm3g5rgibypt4ukxia3lhwniqumwmfm
multisig          bafk2bzacedym2qai72hu53yggfx5czuu7cluu3ft4gyparnw7l624on2uoqqo
paymentchannel    bafk2bzacedetue6b2ekilnzam7derkslpuhmy45bhsrcj36tuwpuoyi56i734
placeholder       bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro
reward            bafk2bzacebrtvcnof275odfobuw6k5chzl23p4mac75bg3amnempzauj57i6a
storagemarket     bafk2bzaced2fw4smkqrhoshiskvvmdak2vzmkgxijanp24xqumkhyhwioz6bc
storageminer      bafk2bzacebmdlcmrseltgqqcw36q4njwp5cjw24kqf5q5cohonhbbrhv3hxbk
storagepower      bafk2bzaceattnfxccxgeickyhei4txzi2qj6jaks5h7im4uaqmaoxk2jthlri
system            bafk2bzaceapx3vuukaqkj76ck4k6b46ktle452ek2nxeoy5qrtaxdktchrb6k
verifiedregistry  bafk2bzaceat7zehx2y5joxtufcwbx4ium47fw4mrubdlquzpla4esqfzimkas

Seeing a pre-migration:

2025-06-25T10:14:41.311+0200    WARN    statemgr        stmgr/forks.go:250      STARTING pre-migration
2025-06-25T10:14:41.312+0200    INFO    bundle  bundle/bundle.go:60     manifest cid: bafy2bzaceclp3wfrwdjgh6c3gee5smwj3zmmrhb4fdbc4yfchfaia6rlljx5o
2025-06-25T10:14:41.313+0200    INFO    fil-consensus   filcns/upgrades.go:3369 Started 5 workers
2025-06-25T10:14:41.313+0200    INFO    fil-consensus   filcns/upgrades.go:3369 Creating migration jobs
2025-06-25T10:14:41.314+0200    INFO    fil-consensus   filcns/upgrades.go:3369 Result writer started
2025-06-25T10:14:41.314+0200    INFO    fil-consensus   filcns/upgrades.go:3369 Done creating 17 migration jobs after 0s
2025-06-25T10:14:41.314+0200    INFO    fil-consensus   filcns/upgrades.go:3369 All workers done after 0s
2025-06-25T10:14:41.314+0200    INFO    fil-consensus   filcns/upgrades.go:3369 Result writer wrote 17 results to state tree after 0s
2025-06-25T10:14:41.314+0200    INFO    fil-consensus   filcns/upgrades.go:3369 All 17 done after 0s (17589/s)
2025-06-25T10:14:41.314+0200    WARN    statemgr        stmgr/forks.go:263      COMPLETED pre-migration {"duration": 0.003082125}

Seeing the actual migratioN:

2025-06-25T10:20:32.217+0200    WARN    statemgr        stmgr/forks.go:202      STARTING migration      {"height": "200", "from": "bafy2bzacecparfclyawwakx2bzei3xhj74z3meivo2j45uawqf7nfkj4kkmwa"}
2025-06-25T10:20:32.218+0200    INFO    bundle  bundle/bundle.go:60     manifest cid: bafy2bzaceclp3wfrwdjgh6c3gee5smwj3zmmrhb4fdbc4yfchfaia6rlljx5o
2025-06-25T10:20:32.219+0200    INFO    fil-consensus   filcns/upgrades.go:3369 Started 7 workers
2025-06-25T10:20:32.220+0200    INFO    fil-consensus   filcns/upgrades.go:3369 Creating migration jobs
2025-06-25T10:20:32.220+0200    INFO    fil-consensus   filcns/upgrades.go:3369 Done creating 17 migration jobs after 0s
2025-06-25T10:20:32.220+0200    INFO    fil-consensus   filcns/upgrades.go:3369 Result writer started
2025-06-25T10:20:32.220+0200    INFO    fil-consensus   filcns/upgrades.go:3369 All workers done after 0s
2025-06-25T10:20:32.220+0200    INFO    fil-consensus   filcns/upgrades.go:3369 Result writer wrote 17 results to state tree after 0s
2025-06-25T10:20:32.220+0200    INFO    fil-consensus   filcns/upgrades.go:3369 All 17 done after 0s (15205/s)
2025-06-25T10:20:32.220+0200    WARN    statemgr        stmgr/forks.go:211      COMPLETED migration     {"height": "200", "from": "bafy2bzacecparfclyawwakx2bzei3xhj74z3meivo2j45uawqf7nfkj4kkmwa", "to": "bafy2bzacecparfclyawwakx2bzei3xhj74z3meivo2j45uawqf7nfkj4kkmwa", "duration": 0.003459125}

And that the chain is progressing after the upgrade:

285: (Jun 25 10:26:06) [ bafy2bzaceas3atjbjpwsi4odgb2g74xwg34z3dvjoqnghfgspab5c4cx7vzue: t01000, ]
286: (Jun 25 10:26:10) [ bafy2bzaced5l2zvp7zrgi33b242534gaux4uto5xjm4ceeqxpsiaqzncwvvke: t01000, ]
287: (Jun 25 10:26:14) [ bafy2bzacecujskrcpeuvcewt6q66faftzgisvxevfjhp77k5n5mefjamaalh4: t01000, ]
288: (Jun 25 10:26:18) [ bafy2bzacecd6ueukwjjyhbalvwr4z3323ge6rmea56fxapf2srrxjaye2rans: t01000, ]
289: (Jun 25 10:26:22) [ bafy2bzacedqmrouzn3d3b364i4wsw3afoxi237tijo5sakiv6spoajwem6wdm: t01000, ]
290: (Jun 25 10:26:26) [ bafy2bzacec5p26vmymloocqorfsxh7b2g4yhad7ou46ajc5kfpudblyknvadg: t01000, ]
291: (Jun 25 10:26:30) [ bafy2bzacecor3ij3s6bzxv3tverdobtbuigvx37qp6mj74bzhyaluajp62svy: t01000, ]
292: (Jun 25 10:26:34) [ bafy2bzaceaouet75d635cagvyso4zgzqjjfk7w5d7g4p44sxv46szvs2ycj3k: t01000, ]
293: (Jun 25 10:26:38) [ bafy2bzacedlsqd2qvzadf7yknwfil33utvnuw22pveyn7nubxloji5voujaro: t01000, ]

Network version also updated:

lotus state actor-cids
Network Version: 27
Actor Version: 17
Manifest CID: bafy2bzaceclp3wfrwdjgh6c3gee5smwj3zmmrhb4fdbc4yfchfaia6rlljx5o

Actor             CID  
account           bafk2bzacebl27l7f5dt35gfeukr7kzkenhwisdy53r3gmbagbzzfejfa3ci6a
cron              bafk2bzacedzo57rpw6debpc7aaenevimqdw44o47l5kjk27xd6qynjx7spyls
datacap           bafk2bzaceddnadztnvgblxukwhwygtynyiee26itbpkncoolxpspvryspvii4
eam               bafk2bzacecogdrpspcsorwamsrmtpmofocc5si7bcavo4jhtbcgpxq6rl5s5q
ethaccount        bafk2bzacebxukyx7vernilg3fcz2h4ale43zj2gijpsa5lon2bcqtme32mss6
evm               bafk2bzacecnukm3qvrefmtrxvazdvghclk67o47p4o42fnpzv4l6cm3etfjqc
init              bafk2bzaceanl3arbn3vbx7qoxjbxbygm3g5rgibypt4ukxia3lhwniqumwmfm
multisig          bafk2bzacedym2qai72hu53yggfx5czuu7cluu3ft4gyparnw7l624on2uoqqo
paymentchannel    bafk2bzacedetue6b2ekilnzam7derkslpuhmy45bhsrcj36tuwpuoyi56i734
placeholder       bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro
reward            bafk2bzacebrtvcnof275odfobuw6k5chzl23p4mac75bg3amnempzauj57i6a
storagemarket     bafk2bzaced2fw4smkqrhoshiskvvmdak2vzmkgxijanp24xqumkhyhwioz6bc
storageminer      bafk2bzacebmdlcmrseltgqqcw36q4njwp5cjw24kqf5q5cohonhbbrhv3hxbk
storagepower      bafk2bzaceattnfxccxgeickyhei4txzi2qj6jaks5h7im4uaqmaoxk2jthlri
system            bafk2bzaceapx3vuukaqkj76ck4k6b46ktle452ek2nxeoy5qrtaxdktchrb6k
verifiedregistry  bafk2bzaceat7zehx2y5joxtufcwbx4ium47fw4mrubdlquzpla4esqfzimkas

@rjan90
Copy link
Contributor

rjan90 commented Jun 25, 2025

I have been spending quite a bit of time to trying to figure out why the TestMigrationTeepTockFix is failing now that the v17 bundle is being introduced:

lotus/itests/migration_test.go

Lines 1155 to 1156 in e9c3238

func TestMigrationTeepTockFix(t *testing.T) {
req := require.New(t)

But I could not get to the bottom of it - I think it is now failing because when creating the skeleton we ran ./pack.sh v17 v16.0.1 which I now think is creating a conflict for the test - where test calls build.BuggyBuiltinActorsMetadataForNetwork("testing-fake-proofs", actorstypes.Version16) expecting to get the buggy v16.0.0 metadata - but is now getting the correct v16.0.1.

@rvagg Do you have some insights here? I think maybe an option here is to rework the TestMigrationTeepTockFix-test, rather than changing the pack.sh script?

BigLep added a commit that referenced this pull request Jun 25, 2025
This came from following these docs for nv27 in #13125
@rvagg
Copy link
Member

rvagg commented Jun 26, 2025

Well, the diagnosis of this is the check in UpgradeActorsV16Fix where we do this:

if actorName, version, ok := actors.GetActorMetaByCode(outActor.Code); !ok {
return xerrors.Errorf("failed to get actor meta for code %s", outActor.Code)
} else if version != actorstypes.Version16 {
return xerrors.Errorf("unexpected actor version for %s: %d", actorName, version)
} else if oldCode, ok := v1600metadata.Actors[actorName]; !ok {

But, your "new" v17 bundle has the same CIDs as the v16 bundle, so when we do a RegisterManifest on each of the bundles, the v16 one gets overwritten by the v17 one:

func RegisterManifest(av actorstypes.Version, manifestCid cid.Cid, entries map[string]cid.Cid) {
manifestMx.Lock()
defer manifestMx.Unlock()
manifestCids[av] = manifestCid
manifests[av] = entries
for name, c := range entries {
actorMeta[c] = actorEntry{name: name, version: av}
}
}

So any lookup that says "tell me what actors version this CID is" for a v16 CID will tell it that it's version 17.

I'm having a think about what to do about this. This check is unique to TockFix and TockFix was only run on calibnet and it's passed already so it might be safe to just remove that check entirely and YOLO through the test. I'll figure it out and push something to this branch.

TippyFlitsUK and others added 2 commits June 26, 2025 14:51
As per comment inline, this is getting in the way of landing a skeleton
for nv27 with an identical actors bundle so version resolution for v16 CIDs
was showing 17.
@rvagg rvagg force-pushed the tippy/nv27-skeleton branch from e9c3238 to f2d05a5 Compare June 26, 2025 04:51
@rvagg
Copy link
Member

rvagg commented Jun 26, 2025

OK, I commented that block out and left a big inline doc about it. I also rebased and squashed this down since it's a bit old and has got a bit messy. @rjan90 you should do another review to sanity check that it's all in place but afaik this is good to go.

rjan90 pushed a commit that referenced this pull request Jun 26, 2025
…13186)

* docs: update network skeleton docs with devnet testing requirement

This came from following these docs for nv27 in #13125

* Cosmetic cleanups
@github-project-automation github-project-automation bot moved this from 🔎 Awaiting Review to ✔️ Approved by reviewer in FilOz Jun 26, 2025
@rjan90 rjan90 merged commit 55eab8a into master Jun 26, 2025
99 checks passed
@rjan90 rjan90 deleted the tippy/nv27-skeleton branch June 26, 2025 06:52
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip/changelog This change does not require CHANGELOG.md update
Projects
Status: 🎉 Done
Development

Successfully merging this pull request may close these issues.

Skeleton for nv27 to support development and testing
4 participants