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

Hyperspace nv20: upgrade and migration. #10243

Merged
merged 69 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
9f7e1be
fvm: upgrade ffi.
raulk Feb 10, 2023
2addc9f
actors: add actors v12 bundle.
raulk Feb 10, 2023
2302958
events: re-add a legacy event for backwards compatibility.
raulk Feb 10, 2023
e8cef64
events: adapt events when under nv20.
raulk Feb 10, 2023
493dabe
delegated signature: allow it to carry MethodSend before nv20.
raulk Feb 11, 2023
766eb76
go mod tidy and format.
raulk Feb 11, 2023
ed1a775
events: make everything use ChainGetEvents; adapt legacy events.
raulk Feb 11, 2023
065e70f
events: get the event translation right.
raulk Feb 11, 2023
988961f
tests: update test network version to 20.
raulk Feb 11, 2023
3b5a9b7
gen actors v12; keep migration unimplemented.
raulk Feb 11, 2023
fa9cb2a
fix test failure.
raulk Feb 11, 2023
1786a8a
fix missing actors v12 in ActorRegistry.
raulk Feb 11, 2023
feaf397
actors v12 migration + nv20 upgrade epochs.
raulk Feb 11, 2023
89d0c1c
nv20: migrate event index.
raulk Feb 11, 2023
9dfd605
fix imports.
raulk Feb 11, 2023
5aeab8a
event index: set the right version on creation.
raulk Feb 12, 2023
098cd8a
update v12 bundle.
raulk Feb 12, 2023
78c990d
add a migration test.
raulk Feb 12, 2023
02eb26e
fix signature backwards compatibility.
raulk Feb 12, 2023
449b933
do not register older actor versions.
raulk Feb 12, 2023
96a7da5
fix: update ffi to pass chain id.
raulk Feb 12, 2023
021750a
fix: legacy event.
raulk Feb 12, 2023
e8fd766
upgrade to go-state-types@237a27b.
raulk Feb 12, 2023
f189abf
make gen.
raulk Feb 12, 2023
4118064
add migration heights to butterfly params.
raulk Feb 12, 2023
dea9d6c
pack correct actors.
raulk Feb 12, 2023
dace094
fix lint.
raulk Feb 12, 2023
47198e1
readd old actor registries for tests.
raulk Feb 12, 2023
9a17958
add nv20 upgrade heights for the sake of tests.
raulk Feb 12, 2023
d8c393a
fix imports.
raulk Feb 12, 2023
4418a62
allow legacy events to have larger payloads than 64 bytes.
raulk Feb 12, 2023
a085eb1
fix: eth: correctly return empty bytecode after selfdestruct
Stebalien Feb 10, 2023
b765112
fix: correctly handle ethGetCode edge-cases
Stebalien Feb 13, 2023
948a963
update ipld prime
jennijuju Feb 13, 2023
98482a2
Merge pull request #10250 from filecoin-project/jen/ipldcp
magik6k Feb 13, 2023
a652ffc
make gen
magik6k Feb 13, 2023
7b959ab
Merge pull request #10246 from filecoin-project/steb/fix-eth-get-code…
magik6k Feb 13, 2023
3177f63
add test for transparent delegate proxy from openzeppelin
snissn Feb 8, 2023
03fd703
Merge pull request #10218 from filecoin-project/mikers/itestsProxy
magik6k Feb 13, 2023
042d356
hyperspace nv20 upgrade epoch 87480 (2023-02-15T15:00:00Z).
raulk Feb 13, 2023
dec4e8b
update actors v12 to builtin-actors#hyperspace/v10.0.0-rc.1.
raulk Feb 13, 2023
6c67c85
go get github.com/filecoin-project/go-state-types@56e2d34
raulk Feb 13, 2023
ca1b3e9
go get github.com/filecoin-project/go-state-types@59a688c56a0a2296170…
raulk Feb 13, 2023
77fbc60
fix: stmgr: copy the message before modifying it
Stebalien Feb 13, 2023
f427c2b
fix: eth: correctly convert filecoin message <-> eth txn (#10257)
Stebalien Feb 13, 2023
354fa28
Merge branch 'release/v1.20.0' into raulk/hyperspace-nv20-migration
Stebalien Feb 13, 2023
2bbd1fb
fix: stmgr: check message validity before invoking vm
Stebalien Feb 13, 2023
c49d98a
fix: ethaccount: reject empty initcode prior to h-nv20
Stebalien Feb 13, 2023
49aae69
override flags when adapting events.
raulk Feb 13, 2023
11eace5
remove stale comments.
raulk Feb 13, 2023
0c2e64b
simplify DecodeEvents.
raulk Feb 13, 2023
a16c540
fix: eth: rename yParity to v in transaction return values (#10264)
Stebalien Feb 13, 2023
0d92c74
Eth JSON-RPC: populate reward in eth_feeHistory (#10245)
ychiaoli18 Feb 14, 2023
1e8746c
Merge branch 'release/v1.20.0' into raulk/hyperspace-nv20-migration
raulk Feb 14, 2023
93ece33
update ffi@fead3c628794a332ebc2ef0a153885bfab87a901.
raulk Feb 14, 2023
32e9201
update v12 actor bundle to hyperspace/v10.0.0-rc.2.
raulk Feb 14, 2023
9f2f915
itest for block.difficulty (#10263)
snissn Feb 14, 2023
3c4a839
Merge pull request #10259 from filecoin-project/steb/call-check-messa…
arajasek Feb 14, 2023
2ed92c2
chore: ffi: update the FFI
Stebalien Feb 14, 2023
abeb4fa
fix: itest: EthFeeHistory flake (#10265)
Stebalien Feb 14, 2023
b1e1d2d
Merge pull request #10266 from filecoin-project/steb/update-ffi
jennijuju Feb 14, 2023
a46e57e
Merge branch 'release/v1.20.0' into raulk/hyperspace-nv20-migration
raulk Feb 14, 2023
d3a2a40
fix: make eth_sendRawTransaction emit correct pre-nv20 messages.
raulk Feb 14, 2023
11ac325
Revert "fix: stmgr: check message validity before invoking vm" (#10270)
raulk Feb 14, 2023
be452b4
Merge branch 'release/v1.20.0' into raulk/hyperspace-nv20-migration
raulk Feb 14, 2023
86b4aee
Merge pull request #10258 from filecoin-project/steb/fix-msg-modify
jennijuju Feb 14, 2023
7150243
feat: ethrpc: Support newPendingTransactions in eth_subscribe (#10269)
magik6k Feb 14, 2023
b8d64a1
params 2k: give more time between nv19 and nv20 for transition tests.
raulk Feb 14, 2023
fe85674
Merge branch 'release/v1.20.0' into raulk/hyperspace-nv20-migration
raulk Feb 14, 2023
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
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,11 @@ workflows:
suite: itest-eth_block_hash
target: "./itests/eth_block_hash_test.go"

- test:
name: test-itest-eth_bytecode
suite: itest-eth_bytecode
target: "./itests/eth_bytecode_test.go"

- test:
name: test-itest-eth_config
suite: itest-eth_config
Expand Down Expand Up @@ -723,6 +728,11 @@ workflows:
suite: itest-migration_nv19
target: "./itests/migration_nv19_test.go"

- test:
name: test-itest-migration_nv20
suite: itest-migration_nv20
target: "./itests/migration_nv20_test.go"

- test:
name: test-itest-mpool_msg_uuid
suite: itest-mpool_msg_uuid
Expand Down
Binary file added build/actors/v12.tar.zst
Binary file not shown.
344 changes: 280 additions & 64 deletions build/builtin_actors_gen.go

Large diffs are not rendered by default.

Binary file modified build/openrpc/full.json.gz
Binary file not shown.
Binary file modified build/openrpc/gateway.json.gz
Binary file not shown.
Binary file modified build/openrpc/miner.json.gz
Binary file not shown.
2 changes: 2 additions & 0 deletions build/params_2k.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ var UpgradeHyggeHeight = abi.ChainEpoch(30)

var UpgradeHyperspaceNV19Height = abi.ChainEpoch(60)

var UpgradeHyperspaceNV20Height = abi.ChainEpoch(70)

var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}
Expand Down
6 changes: 4 additions & 2 deletions build/params_butterfly.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ const UpgradeChocolateHeight = -17
const UpgradeOhSnapHeight = -18
const UpgradeSkyrHeight = -19
const UpgradeSharkHeight = abi.ChainEpoch(-20)
const UpgradeHyggeHeight = abi.ChainEpoch(600)
const UpgradeHyggeHeight = abi.ChainEpoch(80)

var UpgradeHyperspaceNV19Height = abi.ChainEpoch(99999999999999)
var UpgradeHyperspaceNV19Height = abi.ChainEpoch(100)

var UpgradeHyperspaceNV20Height = abi.ChainEpoch(120)

var SupportedProofTypes = []abi.RegisteredSealProof{
abi.RegisteredSealProof_StackedDrg512MiBV1,
Expand Down
6 changes: 5 additions & 1 deletion build/params_calibnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ const UpgradeSharkHeight = 16800 // 6 days after genesis

const UpgradeHyggeHeight = math.MaxInt64

var UpgradeHyperspaceNV19Height = abi.ChainEpoch(99999999999999)
// dummy
var UpgradeHyperspaceNV19Height = abi.ChainEpoch(math.MaxInt64 - 1)

// dummy
var UpgradeHyperspaceNV20Height = abi.ChainEpoch(math.MaxInt64)

var SupportedProofTypes = []abi.RegisteredSealProof{
abi.RegisteredSealProof_StackedDrg32GiBV1,
Expand Down
3 changes: 3 additions & 0 deletions build/params_hyperspace.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ var UpgradeHyggeHeight = abi.ChainEpoch(-21)
// 2023-01-18T15:00:00Z
var UpgradeHyperspaceNV19Height = abi.ChainEpoch(6840)

// 2023-02-15T15:00:00Z
var UpgradeHyperspaceNV20Height = abi.ChainEpoch(87480)

var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
}
Expand Down
7 changes: 5 additions & 2 deletions build/params_interop.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package build

import (
"math"
"os"
"strconv"

Expand Down Expand Up @@ -52,9 +53,11 @@ var UpgradeSkyrHeight = abi.ChainEpoch(-19)

const UpgradeSharkHeight = abi.ChainEpoch(-20)

const UpgradeHyggeHeight = abi.ChainEpoch(99999999999999)
const UpgradeHyggeHeight = abi.ChainEpoch(math.MaxInt64 - 2)

var UpgradeHyperspaceNV19Height = abi.ChainEpoch(99999999999999)
var UpgradeHyperspaceNV19Height = abi.ChainEpoch(math.MaxInt64 - 1)

var UpgradeHyperspaceNV20Height = abi.ChainEpoch(math.MaxInt64)

var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
Expand Down
7 changes: 5 additions & 2 deletions build/params_mainnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,13 @@ const UpgradeSkyrHeight = 1960320
const UpgradeSharkHeight = 2383680

// ??????????????
var UpgradeHyggeHeight = abi.ChainEpoch(math.MaxInt64 - 1)
var UpgradeHyggeHeight = abi.ChainEpoch(math.MaxInt64 - 2)

// ??????????????
var UpgradeHyperspaceNV19Height = abi.ChainEpoch(math.MaxInt64)
var UpgradeHyperspaceNV19Height = abi.ChainEpoch(math.MaxInt64 - 1)

// dummy
var UpgradeHyperspaceNV20Height = abi.ChainEpoch(math.MaxInt64)

var SupportedProofTypes = []abi.RegisteredSealProof{
abi.RegisteredSealProof_StackedDrg32GiBV1,
Expand Down
2 changes: 1 addition & 1 deletion build/params_shared_vals.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const TestNetworkVersion = network.Version{{.latestNetworkVersion}}

/* inline-gen start */

const TestNetworkVersion = network.Version19
const TestNetworkVersion = network.Version20

/* inline-gen end */

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"
builtin11 "github.com/filecoin-project/go-state-types/builtin"
builtin12 "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 = builtin11.MethodsAccount
var Methods = builtin12.MethodsAccount

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

case actorstypes.Version12:
return load12(store, act.Head)

}
}

Expand Down Expand Up @@ -111,6 +114,9 @@ func MakeState(store adt.Store, av actorstypes.Version, addr address.Address) (S
case actorstypes.Version11:
return make11(store, addr)

case actorstypes.Version12:
return make12(store, addr)

}
return nil, xerrors.Errorf("unknown actor version %d", av)
}
Expand Down Expand Up @@ -139,5 +145,6 @@ func AllCodes() []cid.Cid {
(&state9{}).Code(),
(&state10{}).Code(),
(&state11{}).Code(),
(&state12{}).Code(),
}
}
62 changes: 62 additions & 0 deletions chain/actors/builtin/account/v12.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"
builtin11 "github.com/filecoin-project/go-state-types/builtin"
builtin12 "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 @@ -40,6 +40,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) {
case actorstypes.Version11:
return load11(store, act.Head)

case actorstypes.Version12:
return load12(store, act.Head)

}
}

Expand Down Expand Up @@ -107,13 +110,16 @@ func MakeState(store adt.Store, av actorstypes.Version) (State, error) {
case actorstypes.Version11:
return make11(store)

case actorstypes.Version12:
return make12(store)

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

var (
Address = builtin11.CronActorAddr
Methods = builtin11.MethodsCron
Address = builtin12.CronActorAddr
Methods = builtin12.MethodsCron
)

type State interface {
Expand All @@ -137,5 +143,6 @@ func AllCodes() []cid.Cid {
(&state9{}).Code(),
(&state10{}).Code(),
(&state11{}).Code(),
(&state12{}).Code(),
}
}
57 changes: 57 additions & 0 deletions chain/actors/builtin/cron/v12.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/datacap/datacap.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/abi"
actorstypes "github.com/filecoin-project/go-state-types/actors"
builtin11 "github.com/filecoin-project/go-state-types/builtin"
builtin12 "github.com/filecoin-project/go-state-types/builtin"
"github.com/filecoin-project/go-state-types/cbor"
"github.com/filecoin-project/go-state-types/manifest"

Expand All @@ -17,8 +17,8 @@ import (
)

var (
Address = builtin11.DatacapActorAddr
Methods = builtin11.MethodsDatacap
Address = builtin12.DatacapActorAddr
Methods = builtin12.MethodsDatacap
)

func Load(store adt.Store, act *types.Actor) (State, error) {
Expand All @@ -38,6 +38,9 @@ func Load(store adt.Store, act *types.Actor) (State, error) {
case actorstypes.Version11:
return load11(store, act.Head)

case actorstypes.Version12:
return load12(store, act.Head)

}
}

Expand All @@ -56,6 +59,9 @@ func MakeState(store adt.Store, av actorstypes.Version, governor address.Address
case actorstypes.Version11:
return make11(store, governor, bitwidth)

case actorstypes.Version12:
return make12(store, governor, bitwidth)

default:
return nil, xerrors.Errorf("datacap actor only valid for actors v9 and above, got %d", av)
}
Expand All @@ -79,5 +85,6 @@ func AllCodes() []cid.Cid {
(&state9{}).Code(),
(&state10{}).Code(),
(&state11{}).Code(),
(&state12{}).Code(),
}
}
Loading