diff --git a/go.mod b/go.mod index 66287b8b0e..385c95d332 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/filecoin-project/go-fil-markets v1.24.0 github.com/filecoin-project/go-jsonrpc v0.1.5 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.1.12-beta + github.com/filecoin-project/go-state-types v0.1.12-beta.0.20220920181425-d683559e386b github.com/filecoin-project/pubsub v1.0.0 github.com/filecoin-project/specs-actors v0.9.15 github.com/filecoin-project/specs-actors/v2 v2.3.6 diff --git a/go.sum b/go.sum index 52801fb973..9f1d7c04a4 100644 --- a/go.sum +++ b/go.sum @@ -395,8 +395,8 @@ github.com/filecoin-project/go-state-types v0.1.5/go.mod h1:UwGVoMsULoCK+bWjEdd/ github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.1.12-beta h1:QZE00g75shqwhPn0/bZL38sFxVAqnXC7zjmYltRdhxI= -github.com/filecoin-project/go-state-types v0.1.12-beta/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI= +github.com/filecoin-project/go-state-types v0.1.12-beta.0.20220920181425-d683559e386b h1:s4F3e3EBo56j+4xmrzmoAIvtgvDwLn4nsIf5bqcU0Qg= +github.com/filecoin-project/go-state-types v0.1.12-beta.0.20220920181425-d683559e386b/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.2-0.20220322104818-27f8fbb86dfd/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc= diff --git a/pkg/vm/dispatch/dispatch.go b/pkg/vm/dispatch/dispatch.go index d9a6a6f627..ae80c33957 100644 --- a/pkg/vm/dispatch/dispatch.go +++ b/pkg/vm/dispatch/dispatch.go @@ -7,6 +7,7 @@ import ( "github.com/filecoin-project/go-state-types/exitcode" "github.com/filecoin-project/go-state-types/network" + "github.com/filecoin-project/venus/venus-shared/actors/builtin" "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/cbor" @@ -44,7 +45,7 @@ type Dispatcher interface { type actorDispatcher struct { code cid.Cid - actor Actor + actor builtin.RegistryEntry } type method interface { @@ -134,11 +135,7 @@ func (d *actorDispatcher) signature(methodID abi.MethodNum) (*methodSignature, * exports := d.actor.Exports() // get method entry - methodIdx := (uint64)(methodID) - if len(exports) <= (int)(methodIdx) { - return nil, NewExcuteError(exitcode.SysErrInvalidMethod, "Method undefined. method: %d, code: %s", methodID, d.code) - } - entry := exports[methodIdx] + entry := exports[(uint64)(methodID)] if entry == nil { return nil, NewExcuteError(exitcode.SysErrInvalidMethod, "Method undefined. method: %d, code: %s", methodID, d.code) } @@ -152,7 +149,7 @@ func (d *actorDispatcher) Signature(methodNum abi.MethodNum) (MethodSignature, * return d.signature(methodNum) } -//ExcuteError error in vm excute +// ExcuteError error in vm excute type ExcuteError struct { code exitcode.ExitCode msg string diff --git a/pkg/vm/dispatch/loader.go b/pkg/vm/dispatch/loader.go index 48106eeb31..5b2430220a 100644 --- a/pkg/vm/dispatch/loader.go +++ b/pkg/vm/dispatch/loader.go @@ -5,8 +5,6 @@ import ( actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/exitcode" - rtt "github.com/filecoin-project/go-state-types/rt" - rt5 "github.com/filecoin-project/specs-actors/v5/actors/runtime" "github.com/filecoin-project/venus/venus-shared/actors/builtin" "github.com/ipfs/go-cid" @@ -21,7 +19,7 @@ type CodeLoader struct { // ActorInfo vm contract actor type ActorInfo struct { - vmActor rtt.VMActor + vmActor builtin.RegistryEntry // TODO: consider making this a network version range? predicate ActorPredicate } @@ -33,7 +31,7 @@ func (cl CodeLoader) GetActorImpl(code cid.Cid, rt vmr.Runtime) (Dispatcher, *Ex if !ok { return nil, NewExcuteError(exitcode.SysErrorIllegalActor, "Actor code not found. code: %s", code) } - if err := actor.predicate(rt, actor.vmActor); err != nil { + if err := actor.predicate(rt, code); err != nil { return nil, NewExcuteError(exitcode.SysErrorIllegalActor, "unsupport actor. code: %s", code) } @@ -50,11 +48,11 @@ func (cl CodeLoader) GetUnsafeActorImpl(code cid.Cid) (Dispatcher, error) { return &actorDispatcher{code: code, actor: actor.vmActor}, nil } -func (cl CodeLoader) GetVMActor(code cid.Cid) (rtt.VMActor, error) { +func (cl CodeLoader) GetVMActor(code cid.Cid) (builtin.RegistryEntry, error) { //todo version check actor, ok := cl.actors[code] if !ok { - return nil, fmt.Errorf("unable to get actor for code %s", code) + return builtin.RegistryEntry{}, fmt.Errorf("unable to get actor for code %s", code) } return actor.vmActor, nil @@ -71,9 +69,9 @@ func NewBuilder() *CodeLoaderBuilder { } // Add lets you add an actor dispatch table for a given version. -func (b *CodeLoaderBuilder) Add(av actorstypes.Version, predict ActorPredicate, actor Actor) *CodeLoaderBuilder { +func (b *CodeLoaderBuilder) Add(av actorstypes.Version, predict ActorPredicate, actor builtin.RegistryEntry) *CodeLoaderBuilder { if predict == nil { - predict = func(vmr.Runtime, rtt.VMActor) error { return nil } + predict = func(vmr.Runtime, cid.Cid) error { return nil } } ai := ActorInfo{ @@ -100,7 +98,7 @@ func (b *CodeLoaderBuilder) Add(av actorstypes.Version, predict ActorPredicate, } // Add lets you add an actor dispatch table for a given version. -func (b *CodeLoaderBuilder) AddMany(av actorstypes.Version, predict ActorPredicate, actors ...rt5.VMActor) *CodeLoaderBuilder { +func (b *CodeLoaderBuilder) AddMany(av actorstypes.Version, predict ActorPredicate, actors []builtin.RegistryEntry) *CodeLoaderBuilder { for _, actor := range actors { b.Add(av, predict, actor) } @@ -113,17 +111,18 @@ func (b *CodeLoaderBuilder) Build() CodeLoader { } // An ActorPredicate returns an error if the given actor is not valid for the given runtime environment (e.g., chain height, version, etc.). -type ActorPredicate func(vmr.Runtime, rtt.VMActor) error +type ActorPredicate func(vmr.Runtime, cid.Cid) error // ActorsVersionPredicate get actor predicate base on actor version and network version func ActorsVersionPredicate(ver actorstypes.Version) ActorPredicate { - return func(rt vmr.Runtime, v rtt.VMActor) error { + return func(rt vmr.Runtime, codeCid cid.Cid) error { nver, err := actorstypes.VersionForNetwork(rt.NetworkVersion()) if err != nil { return fmt.Errorf("version for network %w", err) } if nver != ver { - return fmt.Errorf("actor %s is a version %d actor; chain only supports actor version %d at height %d", v.Code(), ver, nver, rt.CurrentEpoch()) + return fmt.Errorf("actor %s is a version %d actor; chain only supports actor version %d at height %d and nver %d", + codeCid, ver, nver, rt.CurrentEpoch(), rt.NetworkVersion()) } return nil } diff --git a/pkg/vm/register/default.go b/pkg/vm/register/default.go index 0005b7ae5c..05e490a53b 100644 --- a/pkg/vm/register/default.go +++ b/pkg/vm/register/default.go @@ -27,15 +27,15 @@ var defaultActors dispatch.CodeLoader func GetDefaultActros() *dispatch.CodeLoader { loadOnce.Do(func() { - DefaultActorBuilder.AddMany(actorstypes.Version0, dispatch.ActorsVersionPredicate(actorstypes.Version0), exported0.BuiltinActors()...) - DefaultActorBuilder.AddMany(actorstypes.Version2, dispatch.ActorsVersionPredicate(actorstypes.Version2), exported2.BuiltinActors()...) - DefaultActorBuilder.AddMany(actorstypes.Version3, dispatch.ActorsVersionPredicate(actorstypes.Version3), exported3.BuiltinActors()...) - DefaultActorBuilder.AddMany(actorstypes.Version4, dispatch.ActorsVersionPredicate(actorstypes.Version4), exported4.BuiltinActors()...) - DefaultActorBuilder.AddMany(actorstypes.Version5, dispatch.ActorsVersionPredicate(actorstypes.Version5), exported5.BuiltinActors()...) - DefaultActorBuilder.AddMany(actorstypes.Version6, dispatch.ActorsVersionPredicate(actorstypes.Version6), exported6.BuiltinActors()...) - DefaultActorBuilder.AddMany(actorstypes.Version7, dispatch.ActorsVersionPredicate(actorstypes.Version7), exported7.BuiltinActors()...) - DefaultActorBuilder.AddMany(actorstypes.Version8, dispatch.ActorsVersionPredicate(actorstypes.Version8), builtin.MakeRegistry(actorstypes.Version8)...) - DefaultActorBuilder.AddMany(actorstypes.Version9, dispatch.ActorsVersionPredicate(actorstypes.Version9), builtin.MakeRegistry(actorstypes.Version9)...) + DefaultActorBuilder.AddMany(actorstypes.Version0, dispatch.ActorsVersionPredicate(actorstypes.Version0), builtin.MakeRegistryLegacy(exported0.BuiltinActors())) + DefaultActorBuilder.AddMany(actorstypes.Version2, dispatch.ActorsVersionPredicate(actorstypes.Version2), builtin.MakeRegistryLegacy(exported2.BuiltinActors())) + DefaultActorBuilder.AddMany(actorstypes.Version3, dispatch.ActorsVersionPredicate(actorstypes.Version3), builtin.MakeRegistryLegacy(exported3.BuiltinActors())) + DefaultActorBuilder.AddMany(actorstypes.Version4, dispatch.ActorsVersionPredicate(actorstypes.Version4), builtin.MakeRegistryLegacy(exported4.BuiltinActors())) + DefaultActorBuilder.AddMany(actorstypes.Version5, dispatch.ActorsVersionPredicate(actorstypes.Version5), builtin.MakeRegistryLegacy(exported5.BuiltinActors())) + DefaultActorBuilder.AddMany(actorstypes.Version6, dispatch.ActorsVersionPredicate(actorstypes.Version6), builtin.MakeRegistryLegacy(exported6.BuiltinActors())) + DefaultActorBuilder.AddMany(actorstypes.Version7, dispatch.ActorsVersionPredicate(actorstypes.Version7), builtin.MakeRegistryLegacy(exported7.BuiltinActors())) + DefaultActorBuilder.AddMany(actorstypes.Version8, dispatch.ActorsVersionPredicate(actorstypes.Version8), builtin.MakeRegistry(actorstypes.Version8)) + DefaultActorBuilder.AddMany(actorstypes.Version9, dispatch.ActorsVersionPredicate(actorstypes.Version9), builtin.MakeRegistry(actorstypes.Version9)) defaultActors = DefaultActorBuilder.Build() }) diff --git a/tools/conformance/driver.go b/tools/conformance/driver.go index 28aa97e78c..958afe0055 100644 --- a/tools/conformance/driver.go +++ b/tools/conformance/driver.go @@ -30,8 +30,10 @@ import ( "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/network" + rtt "github.com/filecoin-project/go-state-types/rt" "github.com/filecoin-project/test-vectors/schema" "github.com/filecoin-project/venus/tools/conformance/chaos" + "github.com/filecoin-project/venus/venus-shared/actors/builtin" "github.com/filecoin-project/venus/venus-shared/types" "github.com/ipfs/go-cid" ds "github.com/ipfs/go-datastore" @@ -232,8 +234,7 @@ func (d *Driver) ExecuteMessage(bs blockstoreutil.Blockstore, params ExecuteMess // register the chaos actor if required by the vector. if chaosOn, ok := d.selector["chaos_actor"]; ok && chaosOn == "true" { av, _ := actorstypes.VersionForNetwork(params.NetworkVersion) - chaosActor := chaos.Actor{} - actorBuilder.Add(av, nil, chaosActor) + actorBuilder.AddMany(av, nil, builtin.MakeRegistryLegacy([]rtt.VMActor{chaos.Actor{}})) } register.GetDefaultActros() diff --git a/venus-devtool/go.mod b/venus-devtool/go.mod index f48de34803..778cd1cbae 100644 --- a/venus-devtool/go.mod +++ b/venus-devtool/go.mod @@ -8,8 +8,8 @@ require ( github.com/filecoin-project/go-data-transfer v1.15.2 github.com/filecoin-project/go-fil-markets v1.24.0 github.com/filecoin-project/go-jsonrpc v0.1.7 - github.com/filecoin-project/go-state-types v0.1.12-beta - github.com/filecoin-project/lotus v1.17.2-0.20220920163159-fd0fec07d8fc + github.com/filecoin-project/go-state-types v0.1.12-beta.0.20220920181425-d683559e386b + github.com/filecoin-project/lotus v1.17.2-0.20220921145658-94add978b01f github.com/filecoin-project/venus v0.0.0-00010101000000-000000000000 github.com/ipfs/go-block-format v0.0.3 github.com/ipfs/go-cid v0.2.0 diff --git a/venus-devtool/go.sum b/venus-devtool/go.sum index 0361c1e104..063f463d4e 100644 --- a/venus-devtool/go.sum +++ b/venus-devtool/go.sum @@ -415,8 +415,8 @@ github.com/filecoin-project/go-state-types v0.1.5/go.mod h1:UwGVoMsULoCK+bWjEdd/ github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.1.12-beta h1:QZE00g75shqwhPn0/bZL38sFxVAqnXC7zjmYltRdhxI= -github.com/filecoin-project/go-state-types v0.1.12-beta/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI= +github.com/filecoin-project/go-state-types v0.1.12-beta.0.20220920181425-d683559e386b h1:s4F3e3EBo56j+4xmrzmoAIvtgvDwLn4nsIf5bqcU0Qg= +github.com/filecoin-project/go-state-types v0.1.12-beta.0.20220920181425-d683559e386b/go.mod h1:n/kujdC9JphvYTrmaD1+vJpvDPy/DwzckoMzP0nBKWI= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.2-0.20220322104818-27f8fbb86dfd/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc= @@ -427,8 +427,8 @@ github.com/filecoin-project/go-statestore v0.2.0/go.mod h1:8sjBYbS35HwPzct7iT4lI github.com/filecoin-project/go-storedcounter v0.1.0/go.mod h1:4ceukaXi4vFURIoxYMfKzaRF5Xv/Pinh2oTnoxpv+z8= github.com/filecoin-project/index-provider v0.8.1 h1:ggoBWvMSWR91HZQCWfv8SZjoTGNyJBwNMLuN9bJZrbU= github.com/filecoin-project/index-provider v0.8.1/go.mod h1:c/Ym5HtWPp9NQgNc9dgSBMpSNsZ/DE9FEi9qVubl5RM= -github.com/filecoin-project/lotus v1.17.2-0.20220920163159-fd0fec07d8fc h1:GmnYJOdjmuWZv9wIfwntkit/fI84sUt9lTSnDRwRfXo= -github.com/filecoin-project/lotus v1.17.2-0.20220920163159-fd0fec07d8fc/go.mod h1:DMSDCLtqobi1a8tLSSyNksvaHcEUDQkUaPLDZiQYVoI= +github.com/filecoin-project/lotus v1.17.2-0.20220921145658-94add978b01f h1:Waagfi15+gDrYHW9cIAgO84MQ0PHktZuG5KGHHFDYWk= +github.com/filecoin-project/lotus v1.17.2-0.20220921145658-94add978b01f/go.mod h1:kITnSb8jWWmbwUdc5AUW0ziRp3M/e94JjBt2AOUInTA= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= diff --git a/venus-shared/actors/builtin/registry.go b/venus-shared/actors/builtin/registry.go index 8d2126a325..9ee38c271f 100644 --- a/venus-shared/actors/builtin/registry.go +++ b/venus-shared/actors/builtin/registry.go @@ -35,19 +35,17 @@ import ( "github.com/filecoin-project/venus/venus-shared/actors" ) -var _ rtt.VMActor = (*RegistryEntry)(nil) - type RegistryEntry struct { state cbor.Er code cid.Cid - methods []interface{} + methods map[uint64]interface{} } func (r RegistryEntry) State() cbor.Er { return r.state } -func (r RegistryEntry) Exports() []interface{} { +func (r RegistryEntry) Exports() map[uint64]interface{} { return r.methods } @@ -55,11 +53,29 @@ func (r RegistryEntry) Code() cid.Cid { return r.code } -func MakeRegistry(av actorstypes.Version) []rtt.VMActor { +func MakeRegistryLegacy(actors []rtt.VMActor) []RegistryEntry { + registry := make([]RegistryEntry, 0) + + for _, actor := range actors { + methodMap := make(map[uint64]interface{}) + for methodNum, method := range actor.Exports() { + methodMap[uint64(methodNum)] = method + } + registry = append(registry, RegistryEntry{ + code: actor.Code(), + methods: methodMap, + state: actor.State(), + }) + } + + return registry +} + +func MakeRegistry(av actorstypes.Version) []RegistryEntry { if av < actorstypes.Version8 { panic("expected version v8 and up only, use specs-actors for v0-7") } - registry := make([]rtt.VMActor, 0) + registry := make([]RegistryEntry, 0) codeIDs, err := actors.GetActorCodeIDs(av) if err != nil { diff --git a/venus-shared/actors/builtin/registry.go.template b/venus-shared/actors/builtin/registry.go.template index b909d3c4d1..1644b258eb 100644 --- a/venus-shared/actors/builtin/registry.go.template +++ b/venus-shared/actors/builtin/registry.go.template @@ -25,19 +25,17 @@ import ( "github.com/filecoin-project/venus/venus-shared/actors" ) -var _ rtt.VMActor = (*RegistryEntry)(nil) - type RegistryEntry struct { state cbor.Er code cid.Cid - methods []interface{} + methods map[uint64]interface{} } func (r RegistryEntry) State() cbor.Er { return r.state } -func (r RegistryEntry) Exports() []interface{} { +func (r RegistryEntry) Exports() map[uint64]interface{} { return r.methods } @@ -45,11 +43,29 @@ func (r RegistryEntry) Code() cid.Cid { return r.code } -func MakeRegistry(av actorstypes.Version) []rtt.VMActor { +func MakeRegistryLegacy(actors []rtt.VMActor) []RegistryEntry { + registry := make([]RegistryEntry, 0) + + for _, actor := range actors { + methodMap := make(map[uint64]interface{}) + for methodNum, method := range actor.Exports() { + methodMap[uint64(methodNum)] = method + } + registry = append(registry, RegistryEntry{ + code: actor.Code(), + methods: methodMap, + state: actor.State(), + }) + } + + return registry +} + +func MakeRegistry(av actorstypes.Version) []RegistryEntry { if av < actorstypes.Version8 { panic("expected version v8 and up only, use specs-actors for v0-7") } - registry := make([]rtt.VMActor, 0) + registry := make([]RegistryEntry, 0) codeIDs, err := actors.GetActorCodeIDs(av) if err != nil { diff --git a/venus-shared/utils/method_map.go b/venus-shared/utils/method_map.go index 0188a73c58..a941575c8b 100644 --- a/venus-shared/utils/method_map.go +++ b/venus-shared/utils/method_map.go @@ -6,7 +6,6 @@ import ( "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" - "github.com/filecoin-project/go-state-types/rt" exported0 "github.com/filecoin-project/specs-actors/actors/builtin/exported" exported2 "github.com/filecoin-project/specs-actors/v2/actors/builtin/exported" exported3 "github.com/filecoin-project/specs-actors/v3/actors/builtin/exported" @@ -33,7 +32,7 @@ var MethodsMap = map[cid.Cid]map[abi.MethodNum]MethodMeta{} type actorsWithVersion struct { av actorstypes.Version - actors []rt.VMActor + actors []builtin.RegistryEntry } func init() { @@ -49,13 +48,13 @@ func loadMethodsMap() { // TODO: combine with the runtime actor registry. var actors []actorsWithVersion - actors = append(actors, actorsWithVersion{av: actorstypes.Version0, actors: exported0.BuiltinActors()}) - actors = append(actors, actorsWithVersion{av: actorstypes.Version2, actors: exported2.BuiltinActors()}) - actors = append(actors, actorsWithVersion{av: actorstypes.Version3, actors: exported3.BuiltinActors()}) - actors = append(actors, actorsWithVersion{av: actorstypes.Version4, actors: exported4.BuiltinActors()}) - actors = append(actors, actorsWithVersion{av: actorstypes.Version5, actors: exported5.BuiltinActors()}) - actors = append(actors, actorsWithVersion{av: actorstypes.Version6, actors: exported6.BuiltinActors()}) - actors = append(actors, actorsWithVersion{av: actorstypes.Version7, actors: exported7.BuiltinActors()}) + actors = append(actors, actorsWithVersion{av: actorstypes.Version0, actors: builtin.MakeRegistryLegacy(exported0.BuiltinActors())}) + actors = append(actors, actorsWithVersion{av: actorstypes.Version2, actors: builtin.MakeRegistryLegacy(exported2.BuiltinActors())}) + actors = append(actors, actorsWithVersion{av: actorstypes.Version3, actors: builtin.MakeRegistryLegacy(exported3.BuiltinActors())}) + actors = append(actors, actorsWithVersion{av: actorstypes.Version4, actors: builtin.MakeRegistryLegacy(exported4.BuiltinActors())}) + actors = append(actors, actorsWithVersion{av: actorstypes.Version5, actors: builtin.MakeRegistryLegacy(exported5.BuiltinActors())}) + actors = append(actors, actorsWithVersion{av: actorstypes.Version6, actors: builtin.MakeRegistryLegacy(exported6.BuiltinActors())}) + actors = append(actors, actorsWithVersion{av: actorstypes.Version7, actors: builtin.MakeRegistryLegacy(exported7.BuiltinActors())}) actors = append(actors, actorsWithVersion{av: actorstypes.Version8, actors: builtin.MakeRegistry(actorstypes.Version8)}) actors = append(actors, actorsWithVersion{av: actorstypes.Version9, actors: builtin.MakeRegistry(actorstypes.Version9)}) @@ -91,7 +90,7 @@ func loadMethodsMap() { et := ev.Type() methods[abi.MethodNum(number)] = MethodMeta{ - Num: strconv.Itoa(number), + Num: strconv.Itoa(int(number)), Params: et.In(1), Ret: et.Out(0), }