Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 9 additions & 1 deletion chain/actors/adt/adt.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package adt
import (
"bytes"
"crypto/sha256"

builtin3 "github.com/filecoin-project/specs-actors/v3/actors/builtin"
builtin4 "github.com/filecoin-project/specs-actors/v4/actors/builtin"
builtin5 "github.com/filecoin-project/specs-actors/v5/actors/builtin"
builtin6 "github.com/filecoin-project/specs-actors/v6/actors/builtin"
builtin7 "github.com/filecoin-project/specs-actors/v7/actors/builtin"
"github.com/ipfs/go-cid"
sha256simd "github.com/minio/sha256-simd"
"golang.org/x/xerrors"
Expand Down Expand Up @@ -106,6 +106,14 @@ func MapOptsForActorCode(c cid.Cid) (*MapOpts, error) {
Bitwidth: builtin6.DefaultHamtBitwidth,
HashFunc: Map2ShaHashFunc,
}, nil

// v7
// https://github.com/filecoin-project/specs-actors/blob/v7/actors/util/adt/map.go#L17
case builtin7.InitActorCodeID, builtin7.StorageMarketActorCodeID, builtin7.StorageMinerActorCodeID, builtin7.MultisigActorCodeID, builtin7.StoragePowerActorCodeID, builtin7.VerifiedRegistryActorCodeID:
return &MapOpts{
Bitwidth: builtin7.DefaultHamtBitwidth,
HashFunc: Map2ShaHashFunc,
}, nil
}

return nil, xerrors.Errorf("actor code unknown or doesn't have Map: %s", c)
Expand Down
7 changes: 4 additions & 3 deletions chain/actors/agen/generator/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@ import (
"golang.org/x/xerrors"
)

var latestVersion = 6
var latestVersion = 7

var versions = []int{0, 2, 3, 4, 5, latestVersion}
var versions = []int{0, 2, 3, 4, 5, 6, latestVersion}

var versionImports = map[int]string{
0: "/",
2: "/v2/",
3: "/v3/",
4: "/v4/",
5: "/v5/",
latestVersion: "/v6/",
6: "/v6/",
latestVersion: "/v7/",
}

var actors = map[string][]int{
Expand Down
9 changes: 9 additions & 0 deletions chain/actors/builtin/account/account.go

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

31 changes: 31 additions & 0 deletions chain/actors/builtin/account/v7.go

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

61 changes: 47 additions & 14 deletions chain/actors/builtin/builtin.go

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

1 change: 1 addition & 0 deletions chain/actors/builtin/builtin.go.template
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const (
// These are all just type aliases across actor versions. In the future, that might change
// and we might need to do something fancier.
type SectorInfo = proof{{.latestVersion}}.SectorInfo
type ExtendedSectorInfo = proof{{.latestVersion}}.ExtendedSectorInfo
type PoStProof = proof{{.latestVersion}}.PoStProof
type FilterEstimate = smoothing0.FilterEstimate

Expand Down
6 changes: 4 additions & 2 deletions chain/actors/builtin/cron/cron.go

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

13 changes: 11 additions & 2 deletions chain/actors/builtin/init/init.go

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

Loading