diff --git a/app/node/builder.go b/app/node/builder.go index d77cda36b0..c8473b83a0 100644 --- a/app/node/builder.go +++ b/app/node/builder.go @@ -197,7 +197,7 @@ func (b *Builder) build(ctx context.Context) (*Node, error) { var client *jwtclient.AuthClient cfg := nd.repo.Config() if len(cfg.API.VenusAuthURL) > 0 { - client, err = jwtclient.NewAuthClient(cfg.API.VenusAuthURL) + client, err = jwtclient.NewAuthClient(cfg.API.VenusAuthURL, cfg.API.VenusAuthToken) if err != nil { return nil, fmt.Errorf("failed to create remote jwt auth client: %w", err) } diff --git a/cmd/daemon.go b/cmd/daemon.go index 0ce138bbb9..0697edc1ca 100644 --- a/cmd/daemon.go +++ b/cmd/daemon.go @@ -48,6 +48,7 @@ var daemonCmd = &cmds.Command{ cmds.BoolOption(ELStdout), cmds.BoolOption(ULimit, "manage open file limit").WithDefault(true), cmds.StringOption(AuthServiceURL, "venus auth service URL"), + cmds.StringOption(AuthServiceToken, "venus auth service token"), cmds.StringsOption(BootstrapPeers, "set the bootstrap peers"), cmds.BoolOption(IsRelay, "advertise and allow venus network traffic to be relayed through this node"), cmds.StringOption(ImportSnapshot, "import chain state from a given chain export file or url"), @@ -148,6 +149,11 @@ func initRun(req *cmds.Request) error { } if authServiceURL, ok := req.Options[AuthServiceURL].(string); ok && len(authServiceURL) > 0 { cfg.API.VenusAuthURL = authServiceURL + if authServiceToken, ok := req.Options[AuthServiceToken].(string); ok && len(authServiceToken) > 0 { + cfg.API.VenusAuthToken = authServiceToken + } else { + return fmt.Errorf("must also pass token with venus auth service to `--%s`", AuthServiceToken) + } } if err := rep.ReplaceConfig(cfg); err != nil { @@ -205,6 +211,12 @@ func daemonRun(req *cmds.Request, re cmds.ResponseEmitter) error { if authURL, ok := req.Options[AuthServiceURL].(string); ok && len(authURL) > 0 { config.API.VenusAuthURL = authURL } + if authServiceToken, ok := req.Options[AuthServiceToken].(string); ok && len(authServiceToken) > 0 { + config.API.VenusAuthToken = authServiceToken + } + if len(config.API.VenusAuthURL)+len(config.API.VenusAuthToken) > 0 && len(config.API.VenusAuthToken)*len(config.API.VenusAuthURL) == 0 { + return fmt.Errorf("must set both venus auth service url and token at the same time") + } if bootPeers, ok := req.Options[BootstrapPeers].([]string); ok && len(bootPeers) > 0 { config.Bootstrap.Addresses = MergePeers(config.Bootstrap.Addresses, bootPeers) diff --git a/cmd/main.go b/cmd/main.go index 647e0870c5..7d586c7e98 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -76,7 +76,8 @@ const ( // wallet password Password = "password" - AuthServiceURL = "auth-url" + AuthServiceURL = "auth-url" + AuthServiceToken = "auth-token" BootstrapPeers = "bootstrap-peers" ) diff --git a/fixtures/networks/network_parse.go b/fixtures/networks/network_parse.go index 5bc13f9af0..86b0ffe317 100644 --- a/fixtures/networks/network_parse.go +++ b/fixtures/networks/network_parse.go @@ -2,6 +2,7 @@ package networks import ( "fmt" + "strings" "github.com/filecoin-project/venus/pkg/config" "github.com/filecoin-project/venus/venus-shared/types" @@ -9,7 +10,7 @@ import ( ) func GetNetworkFromName(name string) (types.NetworkType, error) { - if name == "2k" { + if name == "2k" || strings.HasPrefix(name, "localnet-") { return types.Network2k, nil } if name == "force" { diff --git a/go.mod b/go.mod index 3f8a2cbc95..ac747b19df 100644 --- a/go.mod +++ b/go.mod @@ -44,7 +44,7 @@ require ( github.com/filecoin-project/specs-actors/v8 v8.0.1 github.com/filecoin-project/specs-storage v0.4.1 github.com/filecoin-project/test-vectors/schema v0.0.5 - github.com/filecoin-project/venus-auth v1.10.0-rc2 + github.com/filecoin-project/venus-auth v1.10.0-rc2.0.20230228032348-a2418f5a8838 github.com/fxamacker/cbor/v2 v2.4.0 github.com/go-errors/errors v1.0.1 github.com/go-kit/kit v0.12.0 diff --git a/go.sum b/go.sum index dac421ae80..c56be7bf6f 100644 --- a/go.sum +++ b/go.sum @@ -382,8 +382,8 @@ github.com/filecoin-project/specs-storage v0.4.1/go.mod h1:Z2eK6uMwAOSLjek6+sy0j github.com/filecoin-project/storetheindex v0.4.30-0.20221114113647-683091f8e893 h1:6GCuzxLVHBzlz7y+FkbHh6n0UyoEGWqDwJKQPJoz7bE= github.com/filecoin-project/test-vectors/schema v0.0.5 h1:w3zHQhzM4pYxJDl21avXjOKBLF8egrvwUwjpT8TquDg= github.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= -github.com/filecoin-project/venus-auth v1.10.0-rc2 h1:mC2kRcUmXaL2nPky8iiogFjrygMTUXGXHjvEV9msPgk= -github.com/filecoin-project/venus-auth v1.10.0-rc2/go.mod h1:bJT0owiiQfQq7u8QBpIf22JHNRZdsx9rAr4wMEsg+ds= +github.com/filecoin-project/venus-auth v1.10.0-rc2.0.20230228032348-a2418f5a8838 h1:NbBSFyb5yoKfbtd5jX9JdkJ9vupuS0DM2f/tY7Pi9lo= +github.com/filecoin-project/venus-auth v1.10.0-rc2.0.20230228032348-a2418f5a8838/go.mod h1:5scCRopeVuhwom6QIJaFENmrmL+HrwVElx+qU/oQ3Dw= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= diff --git a/pkg/config/config.go b/pkg/config/config.go index 710b89b84d..5839d69934 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -46,6 +46,7 @@ type Config struct { // nolint type APIConfig struct { VenusAuthURL string `json:"venusAuthURL"` + VenusAuthToken string `json:"venusAuthToken"` APIAddress string `json:"apiAddress"` AccessControlAllowOrigin []string `json:"accessControlAllowOrigin"` AccessControlAllowCredentials bool `json:"accessControlAllowCredentials"` diff --git a/venus-devtool/api-gen/example.go b/venus-devtool/api-gen/example.go index 0aba13a2fc..d96419b005 100644 --- a/venus-devtool/api-gen/example.go +++ b/venus-devtool/api-gen/example.go @@ -9,6 +9,8 @@ import ( "strings" "time" + "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-bitfield" datatransfer "github.com/filecoin-project/go-data-transfer" @@ -89,6 +91,7 @@ func init() { panic(err) } addExample(constants.TestNetworkVersion) + addExample(actors.Version6) allocationID := verifreg.AllocationId(0) addExample(allocationID) addExample(&allocationID) @@ -308,7 +311,7 @@ func ExampleValue(method string, t, parent reflect.Type) interface{} { return ExampleValue(method, t.Elem(), nil) case reflect.Struct: es := exampleStruct(method, t, parent) - v := reflect.ValueOf(es).Elem().Interface() + v := reflect.ValueOf(es).Interface() ExampleValues[t] = v return v case reflect.Array: @@ -322,11 +325,9 @@ func ExampleValue(method string, t, parent reflect.Type) interface{} { out.SetMapIndex(reflect.ValueOf(ExampleValue(method, t.Key(), parent)), reflect.ValueOf(ExampleValue(method, t.Elem(), parent))) return out.Interface() case reflect.Ptr: - if t.Elem().Kind() == reflect.Struct { - es := exampleStruct(method, t.Elem(), t) - ExampleValues[t] = es - return es - } + out := reflect.New(t.Elem()) + out.Elem().Set(reflect.ValueOf(ExampleValue(method, t.Elem(), t))) + return out.Interface() case reflect.Interface: if t.Implements(reflect.TypeOf((*error)(nil)).Elem()) { @@ -340,7 +341,7 @@ func ExampleValue(method string, t, parent reflect.Type) interface{} { } func exampleStruct(method string, t, parent reflect.Type) interface{} { - ns := reflect.New(t) + ns := reflect.New(t).Elem() for i := 0; i < t.NumField(); i++ { f := t.Field(i) if shouldIgnoreField(f, parent) { @@ -348,7 +349,8 @@ func exampleStruct(method string, t, parent reflect.Type) interface{} { } if strings.Title(f.Name) == f.Name { - ns.Elem().Field(i).Set(reflect.ValueOf(ExampleValue(method, f.Type, t))) + fmt.Println(f.Name) + ns.Field(i).Set(reflect.ValueOf(ExampleValue(method, f.Type, t))) } } diff --git a/venus-shared/api/chain/v0/method.md b/venus-shared/api/chain/v0/method.md index b0ce5089c2..0d933a9ab0 100644 --- a/venus-shared/api/chain/v0/method.md +++ b/venus-shared/api/chain/v0/method.md @@ -258,7 +258,7 @@ Response: }, "Nonce": 42, "Balance": "0", - "Address": "\u003cempty\u003e" + "Address": "f01234" } ``` @@ -699,7 +699,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } } ] ``` @@ -814,7 +816,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } } ] ``` @@ -991,7 +995,7 @@ Response: }, "Nonce": 42, "Balance": "0", - "Address": "\u003cempty\u003e" + "Address": "f01234" } ``` @@ -1156,7 +1160,7 @@ Response: }, "Nonce": 42, "Balance": "0", - "Address": "\u003cempty\u003e" + "Address": "f01234" } ``` @@ -1252,7 +1256,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } } } ``` @@ -1391,7 +1397,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "GasCost": { "Message": { @@ -1425,7 +1433,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "Error": "string value", "Duration": 60000000000, @@ -1470,7 +1480,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "Error": "string value", "Duration": 60000000000, @@ -1576,7 +1588,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } } ``` @@ -1657,7 +1671,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "GasCost": { "Message": { @@ -1691,7 +1707,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "Error": "string value", "Duration": 60000000000, @@ -1736,7 +1754,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "Error": "string value", "Duration": 60000000000, @@ -1793,7 +1813,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "ReturnDec": {}, "TipSet": [ @@ -1833,7 +1855,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "ReturnDec": {}, "TipSet": [ @@ -1916,7 +1940,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "ReturnDec": {}, "TipSet": [ @@ -1957,7 +1983,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "ReturnDec": {}, "TipSet": [ @@ -3352,7 +3380,9 @@ Response: "ExpectedStoragePledge": "0", "ReplacedSectorAge": 10101, "ReplacedDayReward": "0", - "SectorKeyCID": null, + "SectorKeyCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "SimpleQAPower": true } ] @@ -3515,7 +3545,9 @@ Inputs: 5432 ], "Expiration": 10101, - "UnsealedCid": null + "UnsealedCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, [ { @@ -3634,7 +3666,9 @@ Inputs: 5432 ], "Expiration": 10101, - "UnsealedCid": null + "UnsealedCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, [ { @@ -3799,7 +3833,8 @@ Inputs: [ "f01234", [ - 0 + 5, + 1 ], [ { @@ -3833,7 +3868,9 @@ Response: "ExpectedStoragePledge": "0", "ReplacedSectorAge": 10101, "ReplacedDayReward": "0", - "SectorKeyCID": null, + "SectorKeyCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "SimpleQAPower": true } ] @@ -3931,7 +3968,9 @@ Response: "ExpectedStoragePledge": "0", "ReplacedSectorAge": 10101, "ReplacedDayReward": "0", - "SectorKeyCID": null, + "SectorKeyCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "SimpleQAPower": true } ``` @@ -4000,7 +4039,9 @@ Response: 5432 ], "Expiration": 10101, - "UnsealedCid": null + "UnsealedCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "PreCommitDeposit": "0", "PreCommitEpoch": 10101 @@ -4226,7 +4267,9 @@ Response: { "SealProof": 8, "SectorNumber": 9, - "SectorKey": null, + "SectorKey": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" } @@ -4659,14 +4702,16 @@ Inputs: Response: ```json { - "Channel": "\u003cempty\u003e", + "Channel": "f01234", "From": "f01234", "To": "f01234", "ConfirmedAmt": "0", "PendingAmt": "0", "NonReservedAmt": "0", "PendingAvailableAmt": "0", - "PendingWaitSentinel": null, + "PendingWaitSentinel": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "QueuedAmt": "0", "VoucherReedeemedAmt": "0" } @@ -4691,14 +4736,16 @@ Inputs: Response: ```json { - "Channel": "\u003cempty\u003e", + "Channel": "f01234", "From": "f01234", "To": "f01234", "ConfirmedAmt": "0", "PendingAmt": "0", "NonReservedAmt": "0", "PendingAvailableAmt": "0", - "PendingWaitSentinel": null, + "PendingWaitSentinel": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "QueuedAmt": "0", "VoucherReedeemedAmt": "0" } diff --git a/venus-shared/api/chain/v1/method.md b/venus-shared/api/chain/v1/method.md index fcc9748390..04e24c0d2a 100644 --- a/venus-shared/api/chain/v1/method.md +++ b/venus-shared/api/chain/v1/method.md @@ -308,7 +308,7 @@ Response: }, "Nonce": 42, "Balance": "0", - "Address": "\u003cempty\u003e" + "Address": "f01234" } ``` @@ -759,7 +759,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } } ] ``` @@ -826,7 +828,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } } ] ``` @@ -1032,7 +1036,7 @@ Response: }, "Nonce": 42, "Balance": "0", - "Address": "\u003cempty\u003e" + "Address": "f01234" } ``` @@ -1197,7 +1201,7 @@ Response: }, "Nonce": 42, "Balance": "0", - "Address": "\u003cempty\u003e" + "Address": "f01234" } ``` @@ -1293,7 +1297,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } } } ``` @@ -1432,7 +1438,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "GasCost": { "Message": { @@ -1466,7 +1474,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "Error": "string value", "Duration": 60000000000, @@ -1511,7 +1521,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "Error": "string value", "Duration": 60000000000, @@ -1737,7 +1749,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "GasCost": { "Message": { @@ -1771,7 +1785,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "Error": "string value", "Duration": 60000000000, @@ -1816,7 +1832,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "Error": "string value", "Duration": 60000000000, @@ -1899,7 +1917,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "ReturnDec": {}, "TipSet": [ @@ -2002,7 +2022,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "ReturnDec": {}, "TipSet": [ @@ -2373,7 +2395,12 @@ Inputs: ] ``` -Response: `null` +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` ### EthGetStorageAt @@ -3881,7 +3908,7 @@ Response: }, "Nonce": 42, "Balance": "0", - "Address": "\u003cempty\u003e" + "Address": "f01234" } } ``` @@ -4462,7 +4489,9 @@ Response: "ExpectedStoragePledge": "0", "ReplacedSectorAge": 10101, "ReplacedDayReward": "0", - "SectorKeyCID": null, + "SectorKeyCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "SimpleQAPower": true } ] @@ -4492,7 +4521,8 @@ Inputs: Response: ```json [ - 0 + 5, + 1 ] ``` @@ -4653,7 +4683,9 @@ Inputs: 5432 ], "Expiration": 10101, - "UnsealedCid": null + "UnsealedCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, [ { @@ -4772,7 +4804,9 @@ Inputs: 5432 ], "Expiration": 10101, - "UnsealedCid": null + "UnsealedCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, [ { @@ -4937,7 +4971,8 @@ Inputs: [ "f01234", [ - 0 + 5, + 1 ], [ { @@ -4971,7 +5006,9 @@ Response: "ExpectedStoragePledge": "0", "ReplacedSectorAge": 10101, "ReplacedDayReward": "0", - "SectorKeyCID": null, + "SectorKeyCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "SimpleQAPower": true } ] @@ -5100,7 +5137,9 @@ Response: "ExpectedStoragePledge": "0", "ReplacedSectorAge": 10101, "ReplacedDayReward": "0", - "SectorKeyCID": null, + "SectorKeyCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "SimpleQAPower": true } ``` @@ -5175,7 +5214,9 @@ Response: 5432 ], "Expiration": 10101, - "UnsealedCid": null + "UnsealedCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "PreCommitDeposit": "0", "PreCommitEpoch": 10101 @@ -5401,7 +5442,9 @@ Response: { "SealProof": 8, "SectorNumber": 9, - "SectorKey": null, + "SectorKey": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" } @@ -5834,14 +5877,16 @@ Inputs: Response: ```json { - "Channel": "\u003cempty\u003e", + "Channel": "f01234", "From": "f01234", "To": "f01234", "ConfirmedAmt": "0", "PendingAmt": "0", "NonReservedAmt": "0", "PendingAvailableAmt": "0", - "PendingWaitSentinel": null, + "PendingWaitSentinel": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "QueuedAmt": "0", "VoucherReedeemedAmt": "0" } @@ -5866,14 +5911,16 @@ Inputs: Response: ```json { - "Channel": "\u003cempty\u003e", + "Channel": "f01234", "From": "f01234", "To": "f01234", "ConfirmedAmt": "0", "PendingAmt": "0", "NonReservedAmt": "0", "PendingAvailableAmt": "0", - "PendingWaitSentinel": null, + "PendingWaitSentinel": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "QueuedAmt": "0", "VoucherReedeemedAmt": "0" } diff --git a/venus-shared/api/gateway/v1/method.md b/venus-shared/api/gateway/v1/method.md index ed3432c046..c253176b48 100644 --- a/venus-shared/api/gateway/v1/method.md +++ b/venus-shared/api/gateway/v1/method.md @@ -195,7 +195,9 @@ Inputs: { "SealProof": 8, "SectorNumber": 9, - "SectorKey": null, + "SectorKey": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" } diff --git a/venus-shared/api/gateway/v2/method.md b/venus-shared/api/gateway/v2/method.md index 23a722e1b6..eefff0b99d 100644 --- a/venus-shared/api/gateway/v2/method.md +++ b/venus-shared/api/gateway/v2/method.md @@ -195,7 +195,9 @@ Inputs: { "SealProof": 8, "SectorNumber": 9, - "SectorKey": null, + "SectorKey": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "SealedCID": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" } diff --git a/venus-shared/api/market/client/method.md b/venus-shared/api/market/client/method.md index 6bab160b2c..049659faca 100644 --- a/venus-shared/api/market/client/method.md +++ b/venus-shared/api/market/client/method.md @@ -235,7 +235,9 @@ Inputs: { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - null + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } ] ``` @@ -247,7 +249,9 @@ Response: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Piece": null, + "Piece": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "Size": 42, "MinPrice": "0", "UnsealPrice": "0", @@ -258,7 +262,9 @@ Response: "MinerPeer": { "Address": "f01234", "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "PieceCID": null + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } } } ] @@ -329,7 +335,9 @@ Response: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "PieceCid": null, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PieceSize": 1024, "RawBlockSize": 42 }, @@ -433,7 +441,9 @@ Response: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "PieceCid": null, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PieceSize": 1024, "RawBlockSize": 42 }, @@ -498,7 +508,9 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "ID": 5, - "PieceCID": null, + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PricePerByte": "0", "UnsealPrice": "0", "Status": 0, @@ -671,7 +683,9 @@ Response: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "PieceCid": null, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PieceSize": 1024, "RawBlockSize": 42 }, @@ -737,7 +751,9 @@ Response: { "Key": 1234, "Err": "string value", - "Root": null, + "Root": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "Source": "string value", "FilePath": "string value", "CARPath": "string value" @@ -760,7 +776,9 @@ Response: "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, "ID": 5, - "PieceCID": null, + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PricePerByte": "0", "UnsealPrice": "0", "Status": 0, @@ -821,7 +839,9 @@ Inputs: { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - null + { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } ] ``` @@ -832,7 +852,9 @@ Response: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Piece": null, + "Piece": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "Size": 42, "MinPrice": "0", "UnsealPrice": "0", @@ -843,7 +865,9 @@ Response: "MinerPeer": { "Address": "f01234", "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "PieceCID": null + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } } } ``` @@ -921,7 +945,9 @@ Inputs: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "Piece": null, + "Piece": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "DataSelector": "/ipld/a/b/c", "Size": 42, "Total": "0", @@ -933,7 +959,9 @@ Inputs: "MinerPeer": { "Address": "f01234", "ID": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", - "PieceCID": null + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "RemoteStore": "102334ec-35a3-4b36-be9f-02883844503a" } @@ -993,7 +1021,9 @@ Inputs: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "PieceCid": null, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PieceSize": 1024, "RawBlockSize": 42 }, @@ -1009,7 +1039,12 @@ Inputs: ] ``` -Response: `null` +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` ### ClientStatelessDeal ClientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking. @@ -1026,7 +1061,9 @@ Inputs: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "PieceCid": null, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PieceSize": 1024, "RawBlockSize": 42 }, @@ -1042,7 +1079,12 @@ Inputs: ] ``` -Response: `null` +Response: +```json +{ + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" +} +``` ### DefaultAddress @@ -1240,7 +1282,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "ReturnDec": {}, "TipSet": [ diff --git a/venus-shared/api/market/method.md b/venus-shared/api/market/method.md index f20d86d4fe..d9f6d1f039 100644 --- a/venus-shared/api/market/method.md +++ b/venus-shared/api/market/method.md @@ -1133,8 +1133,12 @@ Response: "ProposalCid": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "AddFundsCid": null, - "PublishCid": null, + "AddFundsCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PublishCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "Miner": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "Client": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "State": 42, @@ -1150,7 +1154,9 @@ Response: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "PieceCid": null, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PieceSize": 1024, "RawBlockSize": 42 }, @@ -1255,8 +1261,12 @@ Inputs: "ProposalCid": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "AddFundsCid": null, - "PublishCid": null, + "AddFundsCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PublishCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "Miner": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "Client": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "State": 42, @@ -1272,7 +1282,9 @@ Inputs: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "PieceCid": null, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PieceSize": 1024, "RawBlockSize": 42 }, @@ -1419,8 +1431,12 @@ Response: "ProposalCid": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "AddFundsCid": null, - "PublishCid": null, + "AddFundsCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PublishCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "Miner": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "Client": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "State": 42, @@ -1436,7 +1452,9 @@ Response: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "PieceCid": null, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PieceSize": 1024, "RawBlockSize": 42 }, @@ -1498,7 +1516,9 @@ Response: "Selector": { "Raw": "Ynl0ZSBhcnJheQ==" }, - "PieceCID": null, + "PieceCID": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PricePerByte": "0", "PaymentInterval": 42, "PaymentIntervalIncrease": 42, @@ -1887,7 +1907,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "ReturnDec": {}, "TipSet": [ @@ -1950,8 +1972,12 @@ Inputs: "ProposalCid": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "AddFundsCid": null, - "PublishCid": null, + "AddFundsCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "PublishCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "Miner": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "Client": "12D3KooWGzxzKZYveHXtpG6AsrUJBcWxHBFS2HsEoGTxrMLvKXtf", "State": 42, @@ -1967,7 +1993,9 @@ Inputs: "Root": { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - "PieceCid": null, + "PieceCid": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, "PieceSize": 1024, "RawBlockSize": 42 }, diff --git a/venus-shared/api/messager/api.go b/venus-shared/api/messager/api.go index 982bfc6afb..f79de9e242 100644 --- a/venus-shared/api/messager/api.go +++ b/venus-shared/api/messager/api.go @@ -35,6 +35,11 @@ type IMessager interface { MarkBadMessage(ctx context.Context, id string) error //perm:write RecoverFailedMsg(ctx context.Context, addr address.Address) ([]string, error) //perm:write + SaveActorCfg(ctx context.Context, actorCfg *mtypes.ActorCfg) error //perm:admin + UpdateActorCfg(ctx context.Context, id types.UUID, changeSpecParams *mtypes.ChangeGasSpecParams) error //perm:admin + ListActorCfg(ctx context.Context) ([]*mtypes.ActorCfg, error) //perm:read + GetActorCfgByID(ctx context.Context, id types.UUID) (*mtypes.ActorCfg, error) //perm:read + GetAddress(ctx context.Context, addr address.Address) (*mtypes.Address, error) //perm:read HasAddress(ctx context.Context, addr address.Address) (bool, error) //perm:read WalletHas(ctx context.Context, addr address.Address) (bool, error) //perm:read diff --git a/venus-shared/api/messager/method.md b/venus-shared/api/messager/method.md index ec0e622b5b..2ddeb68ecf 100644 --- a/venus-shared/api/messager/method.md +++ b/venus-shared/api/messager/method.md @@ -12,6 +12,7 @@ curl http://:/rpc/v0 -X POST -H "Content-Type: application/json" -H " * [DeleteAddress](#deleteaddress) * [DeleteNode](#deletenode) * [ForbiddenAddress](#forbiddenaddress) + * [GetActorCfgByID](#getactorcfgbyid) * [GetAddress](#getaddress) * [GetMessageByFromAndNonce](#getmessagebyfromandnonce) * [GetMessageBySignedCid](#getmessagebysignedcid) @@ -22,6 +23,7 @@ curl http://:/rpc/v0 -X POST -H "Content-Type: application/json" -H " * [HasAddress](#hasaddress) * [HasMessageByUid](#hasmessagebyuid) * [HasNode](#hasnode) + * [ListActorCfg](#listactorcfg) * [ListAddress](#listaddress) * [ListBlockedMessage](#listblockedmessage) * [ListFailedMessage](#listfailedmessage) @@ -40,12 +42,14 @@ curl http://:/rpc/v0 -X POST -H "Content-Type: application/json" -H " * [RecoverFailedMsg](#recoverfailedmsg) * [ReplaceMessage](#replacemessage) * [RepublishMessage](#republishmessage) + * [SaveActorCfg](#saveactorcfg) * [SaveNode](#savenode) * [Send](#send) * [SetFeeParams](#setfeeparams) * [SetLogLevel](#setloglevel) * [SetSelectMsgNum](#setselectmsgnum) * [SetSharedParams](#setsharedparams) + * [UpdateActorCfg](#updateactorcfg) * [UpdateAllFilledMessage](#updateallfilledmessage) * [UpdateFilledMessageByID](#updatefilledmessagebyid) * [UpdateMessageStateByID](#updatemessagestatebyid) @@ -126,6 +130,37 @@ Inputs: Response: `{}` +### GetActorCfgByID + + +Perms: read + +Inputs: +```json +[ + "e26f1e5c-47f7-4561-a11d-18fab6e748af" +] +``` + +Response: +```json +{ + "id": "e26f1e5c-47f7-4561-a11d-18fab6e748af", + "version": 6, + "code": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "method": 1, + "gasOverEstimation": 12.3, + "maxFee": "0", + "gasFeeCap": "0", + "gasOverPremium": 12.3, + "baseFee": "0", + "createAt": "0001-01-01T00:00:00Z", + "updateAt": "0001-01-01T00:00:00Z" +} +``` + ### GetAddress @@ -145,8 +180,8 @@ Response: "addr": "f01234", "nonce": 42, "weight": 9, - "selMsgNum": 42, "state": 1, + "selMsgNum": 42, "gasOverEstimation": 12.3, "maxFee": "0", "gasFeeCap": "0", @@ -201,7 +236,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "TipSetKey": [ { @@ -269,7 +306,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "TipSetKey": [ { @@ -335,7 +374,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "TipSetKey": [ { @@ -403,7 +444,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "TipSetKey": [ { @@ -446,7 +489,9 @@ Response: "Name": "venus", "URL": "/ip4/127.0.0.1/tcp/3453", "Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0._eHBJJAiBzQmfcbD_vVmtTrkgyJQ-LOgGOiHfb8rU1I", - "Type": 2 + "Type": 2, + "CreatedAt": "0001-01-01T00:00:00Z", + "UpdatedAt": "0001-01-01T00:00:00Z" } ``` @@ -461,12 +506,12 @@ Response: ```json { "id": 42, + "selMsgNum": 42, "gasOverEstimation": 12.3, "maxFee": "0", "gasFeeCap": "0", "gasOverPremium": 12.3, - "baseFee": "0", - "selMsgNum": 42 + "baseFee": "0" } ``` @@ -512,6 +557,34 @@ Inputs: Response: `true` +### ListActorCfg + + +Perms: read + +Inputs: `[]` + +Response: +```json +[ + { + "id": "e26f1e5c-47f7-4561-a11d-18fab6e748af", + "version": 6, + "code": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "method": 1, + "gasOverEstimation": 12.3, + "maxFee": "0", + "gasFeeCap": "0", + "gasOverPremium": 12.3, + "baseFee": "0", + "createAt": "0001-01-01T00:00:00Z", + "updateAt": "0001-01-01T00:00:00Z" + } +] +``` + ### ListAddress @@ -527,8 +600,8 @@ Response: "addr": "f01234", "nonce": 42, "weight": 9, - "selMsgNum": 42, "state": 1, + "selMsgNum": 42, "gasOverEstimation": 12.3, "maxFee": "0", "gasFeeCap": "0", @@ -585,7 +658,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "TipSetKey": [ { @@ -648,7 +723,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "TipSetKey": [ { @@ -725,7 +802,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "TipSetKey": [ { @@ -793,7 +872,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "TipSetKey": [ { @@ -865,7 +946,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "TipSetKey": [ { @@ -905,7 +988,9 @@ Response: "Name": "venus", "URL": "/ip4/127.0.0.1/tcp/3453", "Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0._eHBJJAiBzQmfcbD_vVmtTrkgyJQ-LOgGOiHfb8rU1I", - "Type": 2 + "Type": 2, + "CreatedAt": "0001-01-01T00:00:00Z", + "UpdatedAt": "0001-01-01T00:00:00Z" } ] ``` @@ -1144,6 +1229,34 @@ Inputs: Response: `{}` +### SaveActorCfg + + +Perms: admin + +Inputs: +```json +[ + { + "id": "e26f1e5c-47f7-4561-a11d-18fab6e748af", + "version": 6, + "code": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + }, + "method": 1, + "gasOverEstimation": 12.3, + "maxFee": "0", + "gasFeeCap": "0", + "gasOverPremium": 12.3, + "baseFee": "0", + "createAt": "0001-01-01T00:00:00Z", + "updateAt": "0001-01-01T00:00:00Z" + } +] +``` + +Response: `{}` + ### SaveNode @@ -1157,7 +1270,9 @@ Inputs: "Name": "venus", "URL": "/ip4/127.0.0.1/tcp/3453", "Token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJBbGxvdyI6WyJyZWFkIiwid3JpdGUiLCJzaWduIiwiYWRtaW4iXX0._eHBJJAiBzQmfcbD_vVmtTrkgyJQ-LOgGOiHfb8rU1I", - "Type": 2 + "Type": 2, + "CreatedAt": "0001-01-01T00:00:00Z", + "UpdatedAt": "0001-01-01T00:00:00Z" } ] ``` @@ -1250,12 +1365,33 @@ Inputs: [ { "id": 42, + "selMsgNum": 42, "gasOverEstimation": 12.3, "maxFee": "0", "gasFeeCap": "0", "gasOverPremium": 12.3, - "baseFee": "0", - "selMsgNum": 42 + "baseFee": "0" + } +] +``` + +Response: `{}` + +### UpdateActorCfg + + +Perms: admin + +Inputs: +```json +[ + "e26f1e5c-47f7-4561-a11d-18fab6e748af", + { + "gasOverEstimation": 12.3, + "maxFee": "0", + "gasFeeCap": "0", + "gasOverPremium": 12.3, + "baseFee": "0" } ] ``` @@ -1374,7 +1510,9 @@ Response: "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", "GasUsed": 9, - "EventsRoot": null + "EventsRoot": { + "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" + } }, "TipSetKey": [ { diff --git a/venus-shared/api/messager/mock/mock_imessager.go b/venus-shared/api/messager/mock/mock_imessager.go index 6867cf0427..0dbb0a2a40 100644 --- a/venus-shared/api/messager/mock/mock_imessager.go +++ b/venus-shared/api/messager/mock/mock_imessager.go @@ -112,6 +112,21 @@ func (mr *MockIMessagerMockRecorder) ForbiddenAddress(arg0, arg1 interface{}) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ForbiddenAddress", reflect.TypeOf((*MockIMessager)(nil).ForbiddenAddress), arg0, arg1) } +// GetActorCfgByID mocks base method. +func (m *MockIMessager) GetActorCfgByID(arg0 context.Context, arg1 types0.UUID) (*messager.ActorCfg, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetActorCfgByID", arg0, arg1) + ret0, _ := ret[0].(*messager.ActorCfg) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetActorCfgByID indicates an expected call of GetActorCfgByID. +func (mr *MockIMessagerMockRecorder) GetActorCfgByID(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActorCfgByID", reflect.TypeOf((*MockIMessager)(nil).GetActorCfgByID), arg0, arg1) +} + // GetAddress mocks base method. func (m *MockIMessager) GetAddress(arg0 context.Context, arg1 address.Address) (*messager.Address, error) { m.ctrl.T.Helper() @@ -262,6 +277,21 @@ func (mr *MockIMessagerMockRecorder) HasNode(arg0, arg1 interface{}) *gomock.Cal return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasNode", reflect.TypeOf((*MockIMessager)(nil).HasNode), arg0, arg1) } +// ListActorCfg mocks base method. +func (m *MockIMessager) ListActorCfg(arg0 context.Context) ([]*messager.ActorCfg, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ListActorCfg", arg0) + ret0, _ := ret[0].([]*messager.ActorCfg) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// ListActorCfg indicates an expected call of ListActorCfg. +func (mr *MockIMessagerMockRecorder) ListActorCfg(arg0 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListActorCfg", reflect.TypeOf((*MockIMessager)(nil).ListActorCfg), arg0) +} + // ListAddress mocks base method. func (m *MockIMessager) ListAddress(arg0 context.Context) ([]*messager.Address, error) { m.ctrl.T.Helper() @@ -529,6 +559,20 @@ func (mr *MockIMessagerMockRecorder) RepublishMessage(arg0, arg1 interface{}) *g return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RepublishMessage", reflect.TypeOf((*MockIMessager)(nil).RepublishMessage), arg0, arg1) } +// SaveActorCfg mocks base method. +func (m *MockIMessager) SaveActorCfg(arg0 context.Context, arg1 *messager.ActorCfg) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "SaveActorCfg", arg0, arg1) + ret0, _ := ret[0].(error) + return ret0 +} + +// SaveActorCfg indicates an expected call of SaveActorCfg. +func (mr *MockIMessagerMockRecorder) SaveActorCfg(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SaveActorCfg", reflect.TypeOf((*MockIMessager)(nil).SaveActorCfg), arg0, arg1) +} + // SaveNode mocks base method. func (m *MockIMessager) SaveNode(arg0 context.Context, arg1 *messager.Node) error { m.ctrl.T.Helper() @@ -614,6 +658,20 @@ func (mr *MockIMessagerMockRecorder) SetSharedParams(arg0, arg1 interface{}) *go return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetSharedParams", reflect.TypeOf((*MockIMessager)(nil).SetSharedParams), arg0, arg1) } +// UpdateActorCfg mocks base method. +func (m *MockIMessager) UpdateActorCfg(arg0 context.Context, arg1 types0.UUID, arg2 *messager.ChangeGasSpecParams) error { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "UpdateActorCfg", arg0, arg1, arg2) + ret0, _ := ret[0].(error) + return ret0 +} + +// UpdateActorCfg indicates an expected call of UpdateActorCfg. +func (mr *MockIMessagerMockRecorder) UpdateActorCfg(arg0, arg1, arg2 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateActorCfg", reflect.TypeOf((*MockIMessager)(nil).UpdateActorCfg), arg0, arg1, arg2) +} + // UpdateAllFilledMessage mocks base method. func (m *MockIMessager) UpdateAllFilledMessage(arg0 context.Context) (int, error) { m.ctrl.T.Helper() diff --git a/venus-shared/api/messager/proxy_gen.go b/venus-shared/api/messager/proxy_gen.go index b45484b7c6..b0e647def3 100644 --- a/venus-shared/api/messager/proxy_gen.go +++ b/venus-shared/api/messager/proxy_gen.go @@ -20,6 +20,7 @@ type IMessagerStruct struct { DeleteAddress func(ctx context.Context, addr address.Address) error `perm:"write"` DeleteNode func(ctx context.Context, name string) error `perm:"admin"` ForbiddenAddress func(ctx context.Context, addr address.Address) error `perm:"write"` + GetActorCfgByID func(ctx context.Context, id types.UUID) (*mtypes.ActorCfg, error) `perm:"read"` GetAddress func(ctx context.Context, addr address.Address) (*mtypes.Address, error) `perm:"read"` GetMessageByFromAndNonce func(ctx context.Context, from address.Address, nonce uint64) (*mtypes.Message, error) `perm:"read"` GetMessageBySignedCid func(ctx context.Context, cid cid.Cid) (*mtypes.Message, error) `perm:"read"` @@ -30,6 +31,7 @@ type IMessagerStruct struct { HasAddress func(ctx context.Context, addr address.Address) (bool, error) `perm:"read"` HasMessageByUid func(ctx context.Context, id string) (bool, error) `perm:"read"` HasNode func(ctx context.Context, name string) (bool, error) `perm:"admin"` + ListActorCfg func(ctx context.Context) ([]*mtypes.ActorCfg, error) `perm:"read"` ListAddress func(ctx context.Context) ([]*mtypes.Address, error) `perm:"read"` ListBlockedMessage func(ctx context.Context, addr address.Address, d time.Duration) ([]*mtypes.Message, error) `perm:"read"` ListFailedMessage func(ctx context.Context) ([]*mtypes.Message, error) `perm:"read"` @@ -48,12 +50,14 @@ type IMessagerStruct struct { RecoverFailedMsg func(ctx context.Context, addr address.Address) ([]string, error) `perm:"write"` ReplaceMessage func(ctx context.Context, params *mtypes.ReplacMessageParams) (cid.Cid, error) `perm:"write"` RepublishMessage func(ctx context.Context, id string) error `perm:"admin"` + SaveActorCfg func(ctx context.Context, actorCfg *mtypes.ActorCfg) error `perm:"admin"` SaveNode func(ctx context.Context, node *mtypes.Node) error `perm:"admin"` Send func(ctx context.Context, params mtypes.QuickSendParams) (string, error) `perm:"sign"` SetFeeParams func(ctx context.Context, params *mtypes.AddressSpec) error `perm:"write"` SetLogLevel func(ctx context.Context, subsystem, level string) error `perm:"admin"` SetSelectMsgNum func(ctx context.Context, addr address.Address, num uint64) error `perm:"write"` SetSharedParams func(ctx context.Context, params *mtypes.SharedSpec) error `perm:"admin"` + UpdateActorCfg func(ctx context.Context, id types.UUID, changeSpecParams *mtypes.ChangeGasSpecParams) error `perm:"admin"` UpdateAllFilledMessage func(ctx context.Context) (int, error) `perm:"admin"` UpdateFilledMessageByID func(ctx context.Context, id string) (string, error) `perm:"write"` UpdateMessageStateByID func(ctx context.Context, id string, state mtypes.MessageState) error `perm:"write"` @@ -79,6 +83,9 @@ func (s *IMessagerStruct) DeleteNode(p0 context.Context, p1 string) error { func (s *IMessagerStruct) ForbiddenAddress(p0 context.Context, p1 address.Address) error { return s.Internal.ForbiddenAddress(p0, p1) } +func (s *IMessagerStruct) GetActorCfgByID(p0 context.Context, p1 types.UUID) (*mtypes.ActorCfg, error) { + return s.Internal.GetActorCfgByID(p0, p1) +} func (s *IMessagerStruct) GetAddress(p0 context.Context, p1 address.Address) (*mtypes.Address, error) { return s.Internal.GetAddress(p0, p1) } @@ -109,6 +116,9 @@ func (s *IMessagerStruct) HasMessageByUid(p0 context.Context, p1 string) (bool, func (s *IMessagerStruct) HasNode(p0 context.Context, p1 string) (bool, error) { return s.Internal.HasNode(p0, p1) } +func (s *IMessagerStruct) ListActorCfg(p0 context.Context) ([]*mtypes.ActorCfg, error) { + return s.Internal.ListActorCfg(p0) +} func (s *IMessagerStruct) ListAddress(p0 context.Context) ([]*mtypes.Address, error) { return s.Internal.ListAddress(p0) } @@ -163,6 +173,9 @@ func (s *IMessagerStruct) ReplaceMessage(p0 context.Context, p1 *mtypes.ReplacMe func (s *IMessagerStruct) RepublishMessage(p0 context.Context, p1 string) error { return s.Internal.RepublishMessage(p0, p1) } +func (s *IMessagerStruct) SaveActorCfg(p0 context.Context, p1 *mtypes.ActorCfg) error { + return s.Internal.SaveActorCfg(p0, p1) +} func (s *IMessagerStruct) SaveNode(p0 context.Context, p1 *mtypes.Node) error { return s.Internal.SaveNode(p0, p1) } @@ -181,6 +194,9 @@ func (s *IMessagerStruct) SetSelectMsgNum(p0 context.Context, p1 address.Address func (s *IMessagerStruct) SetSharedParams(p0 context.Context, p1 *mtypes.SharedSpec) error { return s.Internal.SetSharedParams(p0, p1) } +func (s *IMessagerStruct) UpdateActorCfg(p0 context.Context, p1 types.UUID, p2 *mtypes.ChangeGasSpecParams) error { + return s.Internal.UpdateActorCfg(p0, p1, p2) +} func (s *IMessagerStruct) UpdateAllFilledMessage(p0 context.Context) (int, error) { return s.Internal.UpdateAllFilledMessage(p0) } diff --git a/venus-shared/types/messager/actor_cfg.go b/venus-shared/types/messager/actor_cfg.go new file mode 100644 index 0000000000..6ea84f7304 --- /dev/null +++ b/venus-shared/types/messager/actor_cfg.go @@ -0,0 +1,43 @@ +package messager + +import ( + "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/actors" + "github.com/filecoin-project/go-state-types/big" + "github.com/filecoin-project/venus/venus-shared/types" + "github.com/ipfs/go-cid" + + "time" +) + +type ActorCfg struct { + ID types.UUID `json:"id"` + ActorVersion actors.Version `json:"version"` + // max for current, use nonce and +1 + MethodType + FeeSpec + + CreatedAt time.Time `json:"createAt"` // 创建时间 + UpdatedAt time.Time `json:"updateAt"` // 更新时间 +} + +type MethodType struct { + Code cid.Cid `json:"code"` + Method abi.MethodNum `json:"method"` +} + +type FeeSpec struct { + GasOverEstimation float64 `json:"gasOverEstimation"` + MaxFee big.Int `json:"maxFee,omitempty"` + GasFeeCap big.Int `json:"gasFeeCap"` + GasOverPremium float64 `json:"gasOverPremium"` + BaseFee big.Int `json:"baseFee"` +} + +type ChangeGasSpecParams struct { + GasOverEstimation *float64 `json:"gasOverEstimation"` + MaxFee big.Int `json:"maxFee,omitempty"` + GasFeeCap big.Int `json:"gasFeeCap"` + GasOverPremium *float64 `json:"gasOverPremium"` + BaseFee big.Int `json:"baseFee"` +} diff --git a/venus-shared/types/messager/address.go b/venus-shared/types/messager/address.go index 3dfeb90d81..55dc933547 100644 --- a/venus-shared/types/messager/address.go +++ b/venus-shared/types/messager/address.go @@ -5,8 +5,6 @@ import ( "time" "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/venus/venus-shared/types" ) @@ -43,16 +41,12 @@ type Address struct { ID types.UUID `json:"id"` Addr address.Address `json:"addr"` // max for current, use nonce and +1 - Nonce uint64 `json:"nonce"` - Weight int64 `json:"weight"` + Nonce uint64 `json:"nonce"` + Weight int64 `json:"weight"` + State AddressState `json:"state"` + SelMsgNum uint64 `json:"selMsgNum"` // number of address selection messages - SelMsgNum uint64 `json:"selMsgNum"` - State AddressState `json:"state"` - GasOverEstimation float64 `json:"gasOverEstimation"` - MaxFee big.Int `json:"maxFee,omitempty"` - GasFeeCap big.Int `json:"gasFeeCap"` - GasOverPremium float64 `json:"gasOverPremium"` - BaseFee big.Int `json:"baseFee"` + FeeSpec IsDeleted int `json:"isDeleted"` // 是否删除 1:是 -1:否 CreatedAt time.Time `json:"createAt"` // 创建时间 diff --git a/venus-shared/types/messager/node.go b/venus-shared/types/messager/node.go index 9ad468a386..55637aa311 100644 --- a/venus-shared/types/messager/node.go +++ b/venus-shared/types/messager/node.go @@ -1,6 +1,8 @@ package messager import ( + "time" + "github.com/filecoin-project/venus/venus-shared/types" ) @@ -15,8 +17,10 @@ const ( type Node struct { ID types.UUID - Name string - URL string - Token string - Type NodeType + Name string + URL string + Token string + Type NodeType + CreatedAt time.Time + UpdatedAt time.Time } diff --git a/venus-shared/types/messager/spec.go b/venus-shared/types/messager/spec.go index 999d2fffdf..2aeed7ae2f 100644 --- a/venus-shared/types/messager/spec.go +++ b/venus-shared/types/messager/spec.go @@ -14,15 +14,10 @@ type SendSpec struct { } type SharedSpec struct { - ID uint `json:"id"` - - GasOverEstimation float64 `json:"gasOverEstimation"` - MaxFee big.Int `json:"maxFee,omitempty"` - GasFeeCap big.Int `json:"gasFeeCap"` - GasOverPremium float64 `json:"gasOverPremium"` - BaseFee big.Int `json:"baseFee"` - + ID uint `json:"id"` SelMsgNum uint64 `json:"selMsgNum"` + + FeeSpec } type AddressSpec struct { diff --git a/venus-shared/types/uuid.go b/venus-shared/types/uuid.go index 53dbdf67c2..e1744fff21 100644 --- a/venus-shared/types/uuid.go +++ b/venus-shared/types/uuid.go @@ -17,7 +17,7 @@ func NewUUID() UUID { func ParseUUID(uid string) (UUID, error) { id, err := uuid.Parse(uid) if err != nil { - return UUID{}, nil + return UUID{}, err } return UUID(id), nil diff --git a/venus-shared/utils/method_map.go b/venus-shared/utils/method_map.go index 90ad74c0af..e34871cfee 100644 --- a/venus-shared/utils/method_map.go +++ b/venus-shared/utils/method_map.go @@ -18,7 +18,8 @@ import ( ) type MethodMeta struct { - Name string + Name string + Version actorstypes.Version Params reflect.Type Ret reflect.Type @@ -90,8 +91,9 @@ func loadMethodsMap() { et := ev.Type() methodMeta := MethodMeta{ - Name: export.Name, - Ret: et.Out(0), + Version: awv.av, + Name: export.Name, + Ret: et.Out(0), } if awv.av <= actorstypes.Version7 {