Skip to content
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

feat: nv25 network skeleton #12707

Merged
merged 6 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ type ForkUpgradeParams struct {
UpgradePhoenixHeight abi.ChainEpoch
UpgradeWaffleHeight abi.ChainEpoch
UpgradeTuktukHeight abi.ChainEpoch
UpgradeXxHeight abi.ChainEpoch
}

// ChainExportConfig holds configuration for chain ranged exports.
Expand Down
Binary file added build/actors/v16.tar.zst
Binary file not shown.
2 changes: 1 addition & 1 deletion build/buildconstants/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ var Devnet = true
/* inline-gen template
const TestNetworkVersion = network.Version{{.latestNetworkVersion}}
/* inline-gen start */
const TestNetworkVersion = network.Version24
const TestNetworkVersion = network.Version25

/* inline-gen end */
7 changes: 5 additions & 2 deletions build/buildconstants/params_2k.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const GenesisFile = ""
var NetworkBundle = "devnet"
var ActorDebugging = true

var GenesisNetworkVersion = network.Version23
var GenesisNetworkVersion = network.Version24

var UpgradeBreezeHeight = abi.ChainEpoch(-1)

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

var UpgradeWaffleHeight = abi.ChainEpoch(-26)

var UpgradeTuktukHeight = abi.ChainEpoch(200)
var UpgradeTuktukHeight = abi.ChainEpoch(-27)

var UpgradeXxHeight = abi.ChainEpoch(200)

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

DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandQuicknet,
Expand Down
3 changes: 2 additions & 1 deletion build/buildconstants/params_butterfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ const UpgradeWatermelonHeight = -24
const UpgradeDragonHeight = -25
const UpgradePhoenixHeight = -26
const UpgradeWaffleHeight = -27
const UpgradeTuktukHeight = -28

// ??????
const UpgradeTuktukHeight = 999999999999999
const UpgradeXxHeight = 999999999999999

// FIP-0081: for the power actor state for pledge calculations.
// UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after
Expand Down
3 changes: 3 additions & 0 deletions build/buildconstants/params_calibnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ const UpgradeWaffleHeight = 1779094
// 2024-10-23T13:30:00Z
const UpgradeTuktukHeight = 2078794

// ??????
const UpgradeXxHeight = 999999999999999

// FIP-0081: for the power actor state for pledge calculations.
// UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after
// Tuktuk migration. along with a RampStartEpoch matching the upgrade height.
Expand Down
3 changes: 2 additions & 1 deletion build/buildconstants/params_interop.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ var UpgradeWatermelonHeight = abi.ChainEpoch(-24)
var UpgradeDragonHeight = abi.ChainEpoch(-25)
var UpgradePhoenixHeight = abi.ChainEpoch(-26)
var UpgradeWaffleHeight = abi.ChainEpoch(-27)
var UpgradeTuktukHeight = abi.ChainEpoch(-28)

const UpgradeTuktukHeight = 50
const UpgradeXxHeight = 50

// FIP-0081: for the power actor state for pledge calculations.
// UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after
Expand Down
9 changes: 6 additions & 3 deletions build/buildconstants/params_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ const UpgradePhoenixHeight abi.ChainEpoch = UpgradeDragonHeight + 120
const UpgradeWaffleHeight abi.ChainEpoch = 4154640

// 2024-11-20T23:00:00Z
var UpgradeTuktukHeight = abi.ChainEpoch(4461240)
const UpgradeTuktukHeight abi.ChainEpoch = 4461240
kamuik16 marked this conversation as resolved.
Show resolved Hide resolved

// ??????
var UpgradeXxHeight = abi.ChainEpoch(9999999999)

// FIP-0081: for the power actor state for pledge calculations.
// UpgradeTuktukPowerRampDurationEpochs ends up in the power actor state after
Expand Down Expand Up @@ -145,8 +148,8 @@ func init() {
}
SetAddressNetwork(addrNetwork)

if os.Getenv("LOTUS_DISABLE_TUKTUK") == "1" {
UpgradeTuktukHeight = math.MaxInt64 - 1
if os.Getenv("LOTUS_DISABLE_XX") == "1" {
UpgradeXxHeight = math.MaxInt64 - 1
}

// NOTE: DO NOT change this unless you REALLY know what you're doing. This is not consensus critical, however,
Expand Down
1 change: 1 addition & 0 deletions build/buildconstants/params_testground.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ var (
UpgradeCalibrationDragonFixHeight abi.ChainEpoch = -28
UpgradeWaffleHeight abi.ChainEpoch = -29
UpgradeTuktukHeight abi.ChainEpoch = -30
UpgradeXxHeight abi.ChainEpoch = -31

UpgradeTuktukPowerRampDurationEpochs uint64 = 0

Expand Down
175 changes: 168 additions & 7 deletions build/builtin_actors_gen.go

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions build/openrpc/full.json
Original file line number Diff line number Diff line change
Expand Up @@ -17089,7 +17089,7 @@
"title": "number",
"description": "Number is a number",
"examples": [
24
25
],
"type": [
"number"
Expand Down Expand Up @@ -17141,7 +17141,7 @@
"title": "number",
"description": "Number is a number",
"examples": [
24
25
],
"type": [
"number"
Expand Down Expand Up @@ -19914,7 +19914,8 @@
"UpgradeDragonHeight": 10101,
"UpgradePhoenixHeight": 10101,
"UpgradeWaffleHeight": 10101,
"UpgradeTuktukHeight": 10101
"UpgradeTuktukHeight": 10101,
"UpgradeXxHeight": 10101
},
"Eip155ChainID": 123
}
Expand Down Expand Up @@ -20051,6 +20052,10 @@
"UpgradeWatermelonHeight": {
"title": "number",
"type": "number"
},
"UpgradeXxHeight": {
"title": "number",
"type": "number"
}
},
"type": "object"
Expand Down Expand Up @@ -23198,7 +23203,7 @@
"title": "number",
"description": "Number is a number",
"examples": [
24
25
],
"type": [
"number"
Expand Down
2 changes: 1 addition & 1 deletion build/openrpc/gateway.json
Original file line number Diff line number Diff line change
Expand Up @@ -10252,7 +10252,7 @@
"title": "number",
"description": "Number is a number",
"examples": [
24
25
],
"type": [
"number"
Expand Down
2 changes: 1 addition & 1 deletion build/openrpc/miner.json
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@
"title": "number",
"description": "Number is a number",
"examples": [
24
25
],
"type": [
"number"
Expand Down
11 changes: 9 additions & 2 deletions chain/actors/builtin/account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/filecoin-project/go-address"
actorstypes "github.com/filecoin-project/go-state-types/actors"
builtin15 "github.com/filecoin-project/go-state-types/builtin"
builtin16 "github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/cbor"
"github.com/filecoin-project/go-state-types/manifest"
builtin0 "github.com/filecoin-project/specs-actors/actors/builtin"
Expand All @@ -22,7 +22,7 @@ import (
"github.com/filecoin-project/lotus/chain/types"
)

var Methods = builtin15.MethodsAccount
var Methods = builtin16.MethodsAccount

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

case actorstypes.Version16:
return load16(store, act.Head)

}
}

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

case actorstypes.Version16:
return make16(store, addr)

}
return nil, xerrors.Errorf("unknown actor version %d", av)
}
Expand Down Expand Up @@ -167,5 +173,6 @@ func AllCodes() []cid.Cid {
(&state13{}).Code(),
(&state14{}).Code(),
(&state15{}).Code(),
(&state16{}).Code(),
}
}
62 changes: 62 additions & 0 deletions chain/actors/builtin/account/v16.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions chain/actors/builtin/cron/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"golang.org/x/xerrors"

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

case actorstypes.Version16:
return load16(store, act.Head)

}
}

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

case actorstypes.Version16:
return make16(store)

}
return nil, xerrors.Errorf("unknown actor version %d", av)
}

var (
Address = builtin15.CronActorAddr
Methods = builtin15.MethodsCron
Address = builtin16.CronActorAddr
Methods = builtin16.MethodsCron
)

type State interface {
Expand Down Expand Up @@ -165,5 +171,6 @@ func AllCodes() []cid.Cid {
(&state13{}).Code(),
(&state14{}).Code(),
(&state15{}).Code(),
(&state16{}).Code(),
}
}
57 changes: 57 additions & 0 deletions chain/actors/builtin/cron/v16.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading