diff --git a/app/submodule/chain/beacon.go b/app/submodule/chain/beacon.go new file mode 100644 index 0000000000..36883c3fb2 --- /dev/null +++ b/app/submodule/chain/beacon.go @@ -0,0 +1,27 @@ +package chain + +import ( + "context" + + "github.com/filecoin-project/go-state-types/abi" + v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" + "github.com/filecoin-project/venus/venus-shared/types" +) + +var _ v1api.IBeacon = &beaconAPI{} + +type beaconAPI struct { + chain *ChainSubmodule +} + +//NewBeaconAPI create a new beacon api +func NewBeaconAPI(chain *ChainSubmodule) v1api.IBeacon { + return &beaconAPI{chain: chain} +} + +// BeaconGetEntry returns the beacon entry for the given filecoin epoch. If +// the entry has not yet been produced, the call will block until the entry +// becomes available +func (beaconAPI *beaconAPI) BeaconGetEntry(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) { + return beaconAPI.chain.API().StateGetBeaconEntry(ctx, epoch) +} diff --git a/app/submodule/chain/chain_submodule.go b/app/submodule/chain/chain_submodule.go index 7c39ceded5..56ac43287d 100644 --- a/app/submodule/chain/chain_submodule.go +++ b/app/submodule/chain/chain_submodule.go @@ -113,6 +113,7 @@ func (chain *ChainSubmodule) API() v1api.IChain { IActor: NewActorAPI(chain), IChainInfo: NewChainInfoAPI(chain), IMinerState: NewMinerStateAPI(chain), + IBeacon: NewBeaconAPI(chain), } } diff --git a/app/submodule/chain/chaininfo_api.go b/app/submodule/chain/chaininfo_api.go index d129ba78d9..4725621617 100644 --- a/app/submodule/chain/chaininfo_api.go +++ b/app/submodule/chain/chaininfo_api.go @@ -16,6 +16,7 @@ import ( logging "github.com/ipfs/go-log/v2" "github.com/filecoin-project/venus/pkg/chain" + "github.com/filecoin-project/venus/venus-shared/actors" v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" "github.com/filecoin-project/venus/venus-shared/types" ) @@ -678,3 +679,31 @@ func (cia *chainInfoAPI) StateGetNetworkParams(ctx context.Context) (*types.Netw return params, nil } + +// StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version +func (cia *chainInfoAPI) StateActorCodeCIDs(ctx context.Context, nv network.Version) (map[string]cid.Cid, error) { + actorVersion, err := actors.VersionForNetwork(nv) + if err != nil { + return nil, fmt.Errorf("invalid network version") + } + + cids := make(map[string]cid.Cid) + + manifestCid, ok := actors.GetManifest(actorVersion) + if !ok { + return nil, fmt.Errorf("cannot get manifest CID") + } + + cids["_manifest"] = manifestCid + + var actorKeys = actors.GetBuiltinActorsKeys() + for _, name := range actorKeys { + actorCID, ok := actors.GetActorCodeID(actorVersion, name) + if !ok { + return nil, fmt.Errorf("didn't find actor %v code id for actor version %d", name, + actorVersion) + } + cids[name] = actorCID + } + return cids, nil +} diff --git a/cmd/state.go b/cmd/state.go index 6223cc3f99..15935ccef2 100644 --- a/cmd/state.go +++ b/cmd/state.go @@ -636,23 +636,16 @@ var stateSysActorCIDsCmd = &cmds.Command{ } buf.WriteString(fmt.Sprintf("Actor Version: %d\n", actorVersion)) - manifestCid, ok := actors.GetManifest(actorVersion) - if !ok { - return fmt.Errorf("cannot get manifest CID") - } - buf.WriteString(fmt.Sprintf("Manifest CID: %v\n\n", manifestCid)) - tw := tablewriter.New(tablewriter.Col("Actor"), tablewriter.Col("CID")) - for _, name := range actors.GetBuiltinActorsKeys() { - sysActorCID, ok := actors.GetActorCodeID(actorVersion, name) - if !ok { - return fmt.Errorf("error getting actor %v code id for actor version %d", name, - actorVersion) - } + actorsCids, err := env.(*node.Env).ChainAPI.StateActorCodeCIDs(ctx, nv) + if err != nil { + return err + } + for name, cid := range actorsCids { tw.Write(map[string]interface{}{ "Actor": name, - "CID": sysActorCID.String(), + "CID": cid.String(), }) } diff --git a/go.mod b/go.mod index ea7c9fda21..254f01b9bc 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,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.6.0-pre-rc1 + github.com/filecoin-project/venus-auth v1.6.0 github.com/fxamacker/cbor/v2 v2.4.0 github.com/gbrlsnchs/jwt/v3 v3.0.1 github.com/go-errors/errors v1.0.1 diff --git a/go.sum b/go.sum index 770e652da9..416121fb5b 100644 --- a/go.sum +++ b/go.sum @@ -407,8 +407,8 @@ github.com/filecoin-project/storetheindex v0.3.5 h1:KoS9TvjPm6zIZfUH8atAHJbVHOO7 github.com/filecoin-project/storetheindex v0.3.5/go.mod h1:0r3d0kSpK63O6AvLr1CjAINLi+nWD49clzcnKV+GLpI= 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.6.0-pre-rc1 h1:Ql7PezoiWm/JFtA8hDI8XAe1ALDeAN3GD8kxw99iM0Q= -github.com/filecoin-project/venus-auth v1.6.0-pre-rc1/go.mod h1:x/Cv3zz9z5O+/uqIKgYtk5UsL7nYu+CtiPjyVQ8Lywg= +github.com/filecoin-project/venus-auth v1.6.0 h1:DLl7q5g1eh6UTpp98MLpRWAI79k6TUw1Myh/RLeaFpU= +github.com/filecoin-project/venus-auth v1.6.0/go.mod h1:x/Cv3zz9z5O+/uqIKgYtk5UsL7nYu+CtiPjyVQ8Lywg= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ= diff --git a/pkg/constants/version.go b/pkg/constants/version.go index 349fe4c460..799d651abe 100644 --- a/pkg/constants/version.go +++ b/pkg/constants/version.go @@ -5,7 +5,7 @@ import ( ) // BuildVersion is the local build version, set by build system -const BuildVersion = "1.6.0-rc2" +const BuildVersion = "1.6.0" var CurrentCommit string diff --git a/venus-devtool/api-gen/example.go b/venus-devtool/api-gen/example.go index 7d5ce94c04..d10a3a7884 100644 --- a/venus-devtool/api-gen/example.go +++ b/venus-devtool/api-gen/example.go @@ -136,6 +136,7 @@ func init() { addExample(network.ReachabilityPublic) addExample(map[string]int{"name": 42}) addExample(map[string]time.Time{"name": time.Unix(1615243938, 0).UTC()}) + addExample(map[string]cid.Cid{}) addExample(&types.ExecutionTrace{ Msg: ExampleValue("init", reflect.TypeOf(&types.Message{}), nil).(*types.Message), MsgRct: ExampleValue("init", reflect.TypeOf(&types.MessageReceipt{}), nil).(*types.MessageReceipt), diff --git a/venus-devtool/go.mod b/venus-devtool/go.mod index 681c4d306b..f401e1b78c 100644 --- a/venus-devtool/go.mod +++ b/venus-devtool/go.mod @@ -9,7 +9,7 @@ require ( github.com/filecoin-project/go-fil-markets v1.20.1-v16-2 github.com/filecoin-project/go-jsonrpc v0.1.5 github.com/filecoin-project/go-state-types v0.1.10 - github.com/filecoin-project/lotus v1.16.0-pre-rc.0.20220614091823-016749b60be5 + github.com/filecoin-project/lotus v1.16.0 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.1.0 diff --git a/venus-devtool/go.sum b/venus-devtool/go.sum index b3dd9e5706..fa83915f37 100644 --- a/venus-devtool/go.sum +++ b/venus-devtool/go.sum @@ -347,7 +347,6 @@ github.com/filecoin-project/go-fil-commcid v0.1.0 h1:3R4ds1A9r6cr8mvZBfMYxTS88Oq github.com/filecoin-project/go-fil-commcid v0.1.0/go.mod h1:Eaox7Hvus1JgPrL5+M3+h7aSPHc0cVqpSxA+TxIEpZQ= github.com/filecoin-project/go-fil-commp-hashhash v0.1.0 h1:imrrpZWEHRnNqqv0tN7LXep5bFEVOVmQWHJvl2mgsGo= github.com/filecoin-project/go-fil-commp-hashhash v0.1.0/go.mod h1:73S8WSEWh9vr0fDJVnKADhfIv/d6dCbAGaAGWbdJEI8= -github.com/filecoin-project/go-fil-markets v1.20.1-v16-1/go.mod h1:QHJZVEbQ7TydJ6hjK87q4MxOmRfDNbQkuSkdjxtqBWo= github.com/filecoin-project/go-fil-markets v1.20.1-v16-2 h1:uZHJav35gTGcm2CwY8B+V6fQO9aB1YeUYid2jkb6jXE= github.com/filecoin-project/go-fil-markets v1.20.1-v16-2/go.mod h1:JLP8bltMbPVhOULcHxE+QFg3b8/a9J8NbcA6Qf69W0k= github.com/filecoin-project/go-hamt-ipld v0.1.5 h1:uoXrKbCQZ49OHpsTCkrThPNelC4W3LPEk0OrS/ytIBM= @@ -375,7 +374,6 @@ github.com/filecoin-project/go-state-types v0.1.4/go.mod h1:xCA/WfKlC2zcn3fUmDv4 github.com/filecoin-project/go-state-types v0.1.5/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= 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.9/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10 h1:YrrJWWh2fU4VPhwHyPlDK5I4mB7bqgnRd3HCm9IOwIU= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= @@ -388,8 +386,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.5.0 h1:k2C1RFvOvxmA2i8bhmkb3b4qun7RDRDzzs/y25/TwQg= github.com/filecoin-project/index-provider v0.5.0/go.mod h1:KHVrP2vU3YuScb+fawObwTFoR882up9U07kk0ZrfP0c= -github.com/filecoin-project/lotus v1.16.0-pre-rc.0.20220614091823-016749b60be5 h1:xPVYrCZNFLiEOfs8LRTCFxADLTzK3SOSb5QtO6vV3ok= -github.com/filecoin-project/lotus v1.16.0-pre-rc.0.20220614091823-016749b60be5/go.mod h1:YrPB+TedOacKPzMf2sxXGMpumGfswz0jXnXdiKdmTj8= +github.com/filecoin-project/lotus v1.16.0 h1:CbCXSoAMHV2Nx9eI6lP0NbRefvnWp4WTZjvOlcqpT/k= +github.com/filecoin-project/lotus v1.16.0/go.mod h1:JVXUiVE0BFW4DeQSElzJ9nCEIFJnBuwo2habuVGpF0c= 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= github.com/filecoin-project/specs-actors v0.9.15-0.20220514164640-94e0d5e123bd/go.mod h1:pjGEe3QlWtK20ju/aFRsiArbMX6Cn8rqEhhsiCM9xYE= @@ -415,6 +413,7 @@ github.com/filecoin-project/specs-actors/v6 v6.0.2/go.mod h1:wnfVvPnYmzPZilNvSqC github.com/filecoin-project/specs-actors/v7 v7.0.0/go.mod h1:TA5FwCna+Yi36POaT7SLKXsgEDvJwc0V/L6ZsO19B9M= github.com/filecoin-project/specs-actors/v7 v7.0.1 h1:w72xCxijK7xs1qzmJiw+WYJaVt2EPHN8oiwpA1Ay3/4= github.com/filecoin-project/specs-actors/v7 v7.0.1/go.mod h1:tPLEYXoXhcpyLh69Ccq91SOuLXsPWjHiY27CzawjUEk= +github.com/filecoin-project/specs-actors/v8 v8.0.0/go.mod h1:UYIPg65iPWoFw5NEftREdJwv9b/5yaLKdCgTvNI/2FA= github.com/filecoin-project/specs-actors/v8 v8.0.1 h1:4u0tIRJeT5G7F05lwLRIsDnsrN+bJ5Ixj6h49Q7uE2Y= github.com/filecoin-project/specs-actors/v8 v8.0.1/go.mod h1:UYIPg65iPWoFw5NEftREdJwv9b/5yaLKdCgTvNI/2FA= github.com/filecoin-project/specs-storage v0.4.1 h1:yvLEaLZj8f+uByhNC4mFOtCUyL2wQku+NGBp6hjTe9M= diff --git a/venus-shared/api/chain/v0/chain.go b/venus-shared/api/chain/v0/chain.go index 07c7fbce76..331be048d9 100644 --- a/venus-shared/api/chain/v0/chain.go +++ b/venus-shared/api/chain/v0/chain.go @@ -77,6 +77,8 @@ type IChainInfo interface { ChainGetPath(ctx context.Context, from types.TipSetKey, to types.TipSetKey) ([]*types.HeadChange, error) //perm:read // StateGetNetworkParams return current network params StateGetNetworkParams(ctx context.Context) (*types.NetworkParams, error) //perm:read + // StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version + StateActorCodeCIDs(context.Context, network.Version) (map[string]cid.Cid, error) //perm:read } type IMinerState interface { diff --git a/venus-shared/api/chain/v0/method.md b/venus-shared/api/chain/v0/method.md index db655f51e6..fb829b05fc 100644 --- a/venus-shared/api/chain/v0/method.md +++ b/venus-shared/api/chain/v0/method.md @@ -39,6 +39,7 @@ * [MessageWait](#MessageWait) * [ProtocolParameters](#ProtocolParameters) * [ResolveToKeyAddr](#ResolveToKeyAddr) + * [StateActorCodeCIDs](#StateActorCodeCIDs) * [StateGetNetworkParams](#StateGetNetworkParams) * [StateGetReceipt](#StateGetReceipt) * [StateNetworkName](#StateNetworkName) @@ -1261,6 +1262,21 @@ Inputs: Response: `"f01234"` +### StateActorCodeCIDs +StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version + + +Perms: read + +Inputs: +```json +[ + 16 +] +``` + +Response: `{}` + ### StateGetNetworkParams StateGetNetworkParams return current network params diff --git a/venus-shared/api/chain/v0/mock/mock_fullnode.go b/venus-shared/api/chain/v0/mock/mock_fullnode.go index 274163feb9..10200bb38c 100644 --- a/venus-shared/api/chain/v0/mock/mock_fullnode.go +++ b/venus-shared/api/chain/v0/mock/mock_fullnode.go @@ -1592,6 +1592,21 @@ func (mr *MockFullNodeMockRecorder) StateAccountKey(arg0, arg1, arg2 interface{} return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateAccountKey", reflect.TypeOf((*MockFullNode)(nil).StateAccountKey), arg0, arg1, arg2) } +// StateActorCodeCIDs mocks base method. +func (m *MockFullNode) StateActorCodeCIDs(arg0 context.Context, arg1 network.Version) (map[string]cid.Cid, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StateActorCodeCIDs", arg0, arg1) + ret0, _ := ret[0].(map[string]cid.Cid) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StateActorCodeCIDs indicates an expected call of StateActorCodeCIDs. +func (mr *MockFullNodeMockRecorder) StateActorCodeCIDs(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorCodeCIDs", reflect.TypeOf((*MockFullNode)(nil).StateActorCodeCIDs), arg0, arg1) +} + // StateCall mocks base method. func (m *MockFullNode) StateCall(arg0 context.Context, arg1 *internal.Message, arg2 types.TipSetKey) (*types.InvocResult, error) { m.ctrl.T.Helper() diff --git a/venus-shared/api/chain/v0/proxy_gen.go b/venus-shared/api/chain/v0/proxy_gen.go index 70e1b01f09..9e0bee8034 100644 --- a/venus-shared/api/chain/v0/proxy_gen.go +++ b/venus-shared/api/chain/v0/proxy_gen.go @@ -236,6 +236,7 @@ type IChainInfoStruct struct { MessageWait func(ctx context.Context, msgCid cid.Cid, confidence, lookback abi.ChainEpoch) (*types.ChainMessage, error) `perm:"read"` ProtocolParameters func(ctx context.Context) (*types.ProtocolParams, error) `perm:"read"` ResolveToKeyAddr func(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) `perm:"read"` + StateActorCodeCIDs func(context.Context, network.Version) (map[string]cid.Cid, error) `perm:"read"` StateGetNetworkParams func(ctx context.Context) (*types.NetworkParams, error) `perm:"read"` StateGetReceipt func(ctx context.Context, msg cid.Cid, from types.TipSetKey) (*types.MessageReceipt, error) `perm:"read"` StateNetworkName func(ctx context.Context) (types.NetworkName, error) `perm:"read"` @@ -325,6 +326,9 @@ func (s *IChainInfoStruct) ProtocolParameters(p0 context.Context) (*types.Protoc func (s *IChainInfoStruct) ResolveToKeyAddr(p0 context.Context, p1 address.Address, p2 *types.TipSet) (address.Address, error) { return s.Internal.ResolveToKeyAddr(p0, p1, p2) } +func (s *IChainInfoStruct) StateActorCodeCIDs(p0 context.Context, p1 network.Version) (map[string]cid.Cid, error) { + return s.Internal.StateActorCodeCIDs(p0, p1) +} func (s *IChainInfoStruct) StateGetNetworkParams(p0 context.Context) (*types.NetworkParams, error) { return s.Internal.StateGetNetworkParams(p0) } diff --git a/venus-shared/api/chain/v1/chain.go b/venus-shared/api/chain/v1/chain.go index 20b5e0ad66..f94cc36ace 100644 --- a/venus-shared/api/chain/v1/chain.go +++ b/venus-shared/api/chain/v1/chain.go @@ -118,6 +118,8 @@ type IChainInfo interface { ChainGetPath(ctx context.Context, from types.TipSetKey, to types.TipSetKey) ([]*types.HeadChange, error) //perm:read // StateGetNetworkParams return current network params StateGetNetworkParams(ctx context.Context) (*types.NetworkParams, error) //perm:read + // StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version + StateActorCodeCIDs(context.Context, network.Version) (map[string]cid.Cid, error) //perm:read } type IMinerState interface { diff --git a/venus-shared/api/chain/v1/method.md b/venus-shared/api/chain/v1/method.md index 199dd1fd7e..06d9804f8f 100644 --- a/venus-shared/api/chain/v1/method.md +++ b/venus-shared/api/chain/v1/method.md @@ -40,6 +40,7 @@ * [MessageWait](#MessageWait) * [ProtocolParameters](#ProtocolParameters) * [ResolveToKeyAddr](#ResolveToKeyAddr) + * [StateActorCodeCIDs](#StateActorCodeCIDs) * [StateGetBeaconEntry](#StateGetBeaconEntry) * [StateGetNetworkParams](#StateGetNetworkParams) * [StateGetRandomnessFromBeacon](#StateGetRandomnessFromBeacon) @@ -1299,6 +1300,21 @@ Inputs: Response: `"f01234"` +### StateActorCodeCIDs +StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version + + +Perms: read + +Inputs: +```json +[ + 16 +] +``` + +Response: `{}` + ### StateGetBeaconEntry StateGetBeaconEntry returns the beacon entry for the given filecoin epoch. If the entry has not yet been produced, the call will block until the entry diff --git a/venus-shared/api/chain/v1/mock/mock_fullnode.go b/venus-shared/api/chain/v1/mock/mock_fullnode.go index 45c6d62fc8..97be391f25 100644 --- a/venus-shared/api/chain/v1/mock/mock_fullnode.go +++ b/venus-shared/api/chain/v1/mock/mock_fullnode.go @@ -1667,6 +1667,21 @@ func (mr *MockFullNodeMockRecorder) StateAccountKey(arg0, arg1, arg2 interface{} return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateAccountKey", reflect.TypeOf((*MockFullNode)(nil).StateAccountKey), arg0, arg1, arg2) } +// StateActorCodeCIDs mocks base method. +func (m *MockFullNode) StateActorCodeCIDs(arg0 context.Context, arg1 network.Version) (map[string]cid.Cid, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "StateActorCodeCIDs", arg0, arg1) + ret0, _ := ret[0].(map[string]cid.Cid) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// StateActorCodeCIDs indicates an expected call of StateActorCodeCIDs. +func (mr *MockFullNodeMockRecorder) StateActorCodeCIDs(arg0, arg1 interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorCodeCIDs", reflect.TypeOf((*MockFullNode)(nil).StateActorCodeCIDs), arg0, arg1) +} + // StateCall mocks base method. func (m *MockFullNode) StateCall(arg0 context.Context, arg1 *internal.Message, arg2 types.TipSetKey) (*types.InvocResult, error) { m.ctrl.T.Helper() diff --git a/venus-shared/api/chain/v1/proxy_gen.go b/venus-shared/api/chain/v1/proxy_gen.go index 5b356a9e12..5bf688444a 100644 --- a/venus-shared/api/chain/v1/proxy_gen.go +++ b/venus-shared/api/chain/v1/proxy_gen.go @@ -241,6 +241,7 @@ type IChainInfoStruct struct { MessageWait func(ctx context.Context, msgCid cid.Cid, confidence, lookback abi.ChainEpoch) (*types.ChainMessage, error) `perm:"read"` ProtocolParameters func(ctx context.Context) (*types.ProtocolParams, error) `perm:"read"` ResolveToKeyAddr func(ctx context.Context, addr address.Address, ts *types.TipSet) (address.Address, error) `perm:"read"` + StateActorCodeCIDs func(context.Context, network.Version) (map[string]cid.Cid, error) `perm:"read"` StateGetBeaconEntry func(ctx context.Context, epoch abi.ChainEpoch) (*types.BeaconEntry, error) `perm:"read"` StateGetNetworkParams func(ctx context.Context) (*types.NetworkParams, error) `perm:"read"` StateGetRandomnessFromBeacon func(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) `perm:"read"` @@ -333,6 +334,9 @@ func (s *IChainInfoStruct) ProtocolParameters(p0 context.Context) (*types.Protoc func (s *IChainInfoStruct) ResolveToKeyAddr(p0 context.Context, p1 address.Address, p2 *types.TipSet) (address.Address, error) { return s.Internal.ResolveToKeyAddr(p0, p1, p2) } +func (s *IChainInfoStruct) StateActorCodeCIDs(p0 context.Context, p1 network.Version) (map[string]cid.Cid, error) { + return s.Internal.StateActorCodeCIDs(p0, p1) +} func (s *IChainInfoStruct) StateGetBeaconEntry(p0 context.Context, p1 abi.ChainEpoch) (*types.BeaconEntry, error) { return s.Internal.StateGetBeaconEntry(p0, p1) } diff --git a/venus-shared/compatible-checks/api-checksum.txt b/venus-shared/compatible-checks/api-checksum.txt index a15dcec6ef..44cb13fcc0 100644 --- a/venus-shared/compatible-checks/api-checksum.txt +++ b/venus-shared/compatible-checks/api-checksum.txt @@ -141,6 +141,7 @@ v0api.FullNode: Session: In=1, Out=2, CheckSum=cdb04ef6a97114c8f24f456a2e70f1cd Shutdown: In=1, Out=1, CheckSum=c39be30cc5a8826024fcf4d23e7017d6 StateAccountKey: In=3, Out=2, CheckSum=9b6f9fdaea5bb22c60772266c418d98f + StateActorCodeCIDs: In=2, Out=2, CheckSum=d52881195cc100121739e6c85c45dd9f StateAllMinerFaults: In=3, Out=2, CheckSum=a17e05b21e1ecc8da867e2f76df6c46c StateCall: In=3, Out=2, CheckSum=b33ab6c7df31d805c256c8ab6691b085 StateChangedActors: In=3, Out=2, CheckSum=cbc0cd36e495552a6672caab9f839468 @@ -365,6 +366,7 @@ api.FullNode: Session: In=1, Out=2, CheckSum=cdb04ef6a97114c8f24f456a2e70f1cd Shutdown: In=1, Out=1, CheckSum=c39be30cc5a8826024fcf4d23e7017d6 StateAccountKey: In=3, Out=2, CheckSum=9b6f9fdaea5bb22c60772266c418d98f + StateActorCodeCIDs: In=2, Out=2, CheckSum=d52881195cc100121739e6c85c45dd9f StateAllMinerFaults: In=3, Out=2, CheckSum=a17e05b21e1ecc8da867e2f76df6c46c StateCall: In=3, Out=2, CheckSum=b33ab6c7df31d805c256c8ab6691b085 StateChangedActors: In=3, Out=2, CheckSum=cbc0cd36e495552a6672caab9f839468