Skip to content

Commit b0de2bd

Browse files
authored
feat: nv25 network skeleton (#12707)
* chore: update dependencies and stuff * update stuff part 2 * chore: make gen * chore: update UpgradeTuktukHeight to var * chore: make actors-gen
1 parent 0d1d7c2 commit b0de2bd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+3214
-117
lines changed

api/types.go

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ type ForkUpgradeParams struct {
193193
UpgradePhoenixHeight abi.ChainEpoch
194194
UpgradeWaffleHeight abi.ChainEpoch
195195
UpgradeTuktukHeight abi.ChainEpoch
196+
UpgradeXxHeight abi.ChainEpoch
196197
}
197198

198199
// ChainExportConfig holds configuration for chain ranged exports.

build/actors/v16.tar.zst

1.29 MB
Binary file not shown.

build/buildconstants/params.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ var Devnet = true
4242
/* inline-gen template
4343
const TestNetworkVersion = network.Version{{.latestNetworkVersion}}
4444
/* inline-gen start */
45-
const TestNetworkVersion = network.Version24
45+
const TestNetworkVersion = network.Version25
4646

4747
/* inline-gen end */

build/buildconstants/params_2k.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const GenesisFile = ""
2121
var NetworkBundle = "devnet"
2222
var ActorDebugging = true
2323

24-
var GenesisNetworkVersion = network.Version23
24+
var GenesisNetworkVersion = network.Version24
2525

2626
var UpgradeBreezeHeight = abi.ChainEpoch(-1)
2727

@@ -71,7 +71,9 @@ var UpgradePhoenixHeight = abi.ChainEpoch(-25)
7171

7272
var UpgradeWaffleHeight = abi.ChainEpoch(-26)
7373

74-
var UpgradeTuktukHeight = abi.ChainEpoch(200)
74+
var UpgradeTuktukHeight = abi.ChainEpoch(-27)
75+
76+
var UpgradeXxHeight = abi.ChainEpoch(200)
7577

7678
// FIP-0081: for the power actor state for pledge calculations.
7779
// UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after
@@ -167,6 +169,7 @@ func init() {
167169
UpgradeWaffleHeight = getUpgradeHeight("LOTUS_WAFFLE_HEIGHT", UpgradeWaffleHeight)
168170
UpgradePhoenixHeight = getUpgradeHeight("LOTUS_PHOENIX_HEIGHT", UpgradePhoenixHeight)
169171
UpgradeTuktukHeight = getUpgradeHeight("LOTUS_TUKTUK_HEIGHT", UpgradeTuktukHeight)
172+
UpgradeXxHeight = getUpgradeHeight("LOTUS_XX_HEIGHT", UpgradeXxHeight)
170173

171174
DrandSchedule = map[abi.ChainEpoch]DrandEnum{
172175
0: DrandQuicknet,

build/buildconstants/params_butterfly.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ const UpgradeWatermelonHeight = -24
5656
const UpgradeDragonHeight = -25
5757
const UpgradePhoenixHeight = -26
5858
const UpgradeWaffleHeight = -27
59+
const UpgradeTuktukHeight = -28
5960

6061
// ??????
61-
const UpgradeTuktukHeight = 999999999999999
62+
const UpgradeXxHeight = 999999999999999
6263

6364
// FIP-0081: for the power actor state for pledge calculations.
6465
// UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after

build/buildconstants/params_calibnet.go

+3
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ const UpgradeWaffleHeight = 1779094
102102
// 2024-10-23T13:30:00Z
103103
const UpgradeTuktukHeight = 2078794
104104

105+
// ??????
106+
const UpgradeXxHeight = 999999999999999
107+
105108
// FIP-0081: for the power actor state for pledge calculations.
106109
// UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after
107110
// Tuktuk migration. along with a RampStartEpoch matching the upgrade height.

build/buildconstants/params_interop.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ var UpgradeWatermelonHeight = abi.ChainEpoch(-24)
5555
var UpgradeDragonHeight = abi.ChainEpoch(-25)
5656
var UpgradePhoenixHeight = abi.ChainEpoch(-26)
5757
var UpgradeWaffleHeight = abi.ChainEpoch(-27)
58+
var UpgradeTuktukHeight = abi.ChainEpoch(-28)
5859

59-
const UpgradeTuktukHeight = 50
60+
const UpgradeXxHeight = 50
6061

6162
// FIP-0081: for the power actor state for pledge calculations.
6263
// UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after

build/buildconstants/params_mainnet.go

+7-3
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ const UpgradePhoenixHeight abi.ChainEpoch = UpgradeDragonHeight + 120
110110
const UpgradeWaffleHeight abi.ChainEpoch = 4154640
111111

112112
// 2024-11-20T23:00:00Z
113-
var UpgradeTuktukHeight = abi.ChainEpoch(4461240)
113+
// var because of TestMigrationNV24 in itests/migration_test.go to test the FIP-0081 pledge ramp
114+
var UpgradeTuktukHeight abi.ChainEpoch = 4461240
115+
116+
// ??????
117+
var UpgradeXxHeight = abi.ChainEpoch(9999999999)
114118

115119
// FIP-0081: for the power actor state for pledge calculations.
116120
// UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after
@@ -145,8 +149,8 @@ func init() {
145149
}
146150
SetAddressNetwork(addrNetwork)
147151

148-
if os.Getenv("LOTUS_DISABLE_TUKTUK") == "1" {
149-
UpgradeTuktukHeight = math.MaxInt64 - 1
152+
if os.Getenv("LOTUS_DISABLE_XX") == "1" {
153+
UpgradeXxHeight = math.MaxInt64 - 1
150154
}
151155

152156
// NOTE: DO NOT change this unless you REALLY know what you're doing. This is not consensus critical, however,

build/buildconstants/params_testground.go

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ var (
107107
UpgradeCalibrationDragonFixHeight abi.ChainEpoch = -28
108108
UpgradeWaffleHeight abi.ChainEpoch = -29
109109
UpgradeTuktukHeight abi.ChainEpoch = -30
110+
UpgradeXxHeight abi.ChainEpoch = -31
110111

111112
UpgradeTuktukPowerRampDurationEpochs uint64 = 0
112113

build/builtin_actors_gen.go

+168-7
Large diffs are not rendered by default.

build/openrpc/full.json

+9-4
Original file line numberDiff line numberDiff line change
@@ -17089,7 +17089,7 @@
1708917089
"title": "number",
1709017090
"description": "Number is a number",
1709117091
"examples": [
17092-
24
17092+
25
1709317093
],
1709417094
"type": [
1709517095
"number"
@@ -17141,7 +17141,7 @@
1714117141
"title": "number",
1714217142
"description": "Number is a number",
1714317143
"examples": [
17144-
24
17144+
25
1714517145
],
1714617146
"type": [
1714717147
"number"
@@ -19914,7 +19914,8 @@
1991419914
"UpgradeDragonHeight": 10101,
1991519915
"UpgradePhoenixHeight": 10101,
1991619916
"UpgradeWaffleHeight": 10101,
19917-
"UpgradeTuktukHeight": 10101
19917+
"UpgradeTuktukHeight": 10101,
19918+
"UpgradeXxHeight": 10101
1991819919
},
1991919920
"Eip155ChainID": 123
1992019921
}
@@ -20051,6 +20052,10 @@
2005120052
"UpgradeWatermelonHeight": {
2005220053
"title": "number",
2005320054
"type": "number"
20055+
},
20056+
"UpgradeXxHeight": {
20057+
"title": "number",
20058+
"type": "number"
2005420059
}
2005520060
},
2005620061
"type": "object"
@@ -23198,7 +23203,7 @@
2319823203
"title": "number",
2319923204
"description": "Number is a number",
2320023205
"examples": [
23201-
24
23206+
25
2320223207
],
2320323208
"type": [
2320423209
"number"

build/openrpc/gateway.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10252,7 +10252,7 @@
1025210252
"title": "number",
1025310253
"description": "Number is a number",
1025410254
"examples": [
10255-
24
10255+
25
1025610256
],
1025710257
"type": [
1025810258
"number"

build/openrpc/miner.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@
538538
"title": "number",
539539
"description": "Number is a number",
540540
"examples": [
541-
24
541+
25
542542
],
543543
"type": [
544544
"number"

chain/actors/builtin/account/account.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/filecoin-project/go-address"
88
actorstypes "github.com/filecoin-project/go-state-types/actors"
9-
builtin15 "github.com/filecoin-project/go-state-types/builtin"
9+
builtin16 "github.com/filecoin-project/go-state-types/builtin"
1010
"github.com/filecoin-project/go-state-types/cbor"
1111
"github.com/filecoin-project/go-state-types/manifest"
1212
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"
@@ -22,7 +22,7 @@ import (
2222
"github.com/filecoin-project/lotus/chain/types"
2323
)
2424

25-
var Methods = builtin15.MethodsAccount
25+
var Methods = builtin16.MethodsAccount
2626

2727
func Load(store adt.Store, act *types.Actor) (State, error) {
2828
if name, av, ok := actors.GetActorMetaByCode(act.Code); ok {
@@ -56,6 +56,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) {
5656
case actorstypes.Version15:
5757
return load15(store, act.Head)
5858

59+
case actorstypes.Version16:
60+
return load16(store, act.Head)
61+
5962
}
6063
}
6164

@@ -135,6 +138,9 @@ func MakeState(store adt.Store, av actorstypes.Version, addr address.Address) (S
135138
case actorstypes.Version15:
136139
return make15(store, addr)
137140

141+
case actorstypes.Version16:
142+
return make16(store, addr)
143+
138144
}
139145
return nil, xerrors.Errorf("unknown actor version %d", av)
140146
}
@@ -167,5 +173,6 @@ func AllCodes() []cid.Cid {
167173
(&state13{}).Code(),
168174
(&state14{}).Code(),
169175
(&state15{}).Code(),
176+
(&state16{}).Code(),
170177
}
171178
}

chain/actors/builtin/account/v16.go

+62
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chain/actors/builtin/cron/cron.go

+10-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"golang.org/x/xerrors"
66

77
actorstypes "github.com/filecoin-project/go-state-types/actors"
8-
builtin15 "github.com/filecoin-project/go-state-types/builtin"
8+
builtin16 "github.com/filecoin-project/go-state-types/builtin"
99
"github.com/filecoin-project/go-state-types/manifest"
1010
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"
1111
builtin2 "github.com/filecoin-project/specs-actors/v2/actors/builtin"
@@ -52,6 +52,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) {
5252
case actorstypes.Version15:
5353
return load15(store, act.Head)
5454

55+
case actorstypes.Version16:
56+
return load16(store, act.Head)
57+
5558
}
5659
}
5760

@@ -131,13 +134,16 @@ func MakeState(store adt.Store, av actorstypes.Version) (State, error) {
131134
case actorstypes.Version15:
132135
return make15(store)
133136

137+
case actorstypes.Version16:
138+
return make16(store)
139+
134140
}
135141
return nil, xerrors.Errorf("unknown actor version %d", av)
136142
}
137143

138144
var (
139-
Address = builtin15.CronActorAddr
140-
Methods = builtin15.MethodsCron
145+
Address = builtin16.CronActorAddr
146+
Methods = builtin16.MethodsCron
141147
)
142148

143149
type State interface {
@@ -165,5 +171,6 @@ func AllCodes() []cid.Cid {
165171
(&state13{}).Code(),
166172
(&state14{}).Code(),
167173
(&state15{}).Code(),
174+
(&state16{}).Code(),
168175
}
169176
}

chain/actors/builtin/cron/v16.go

+57
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)