Remove StateActorManifestCID
This commit is contained in:
parent
56c7e7a8d6
commit
4bebce0201
@ -593,8 +593,6 @@ type FullNode interface {
|
|||||||
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) //perm:read
|
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) //perm:read
|
||||||
// StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version
|
// StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version
|
||||||
StateActorCodeCIDs(context.Context, abinetwork.Version) (map[string]cid.Cid, error) //perm:read
|
StateActorCodeCIDs(context.Context, abinetwork.Version) (map[string]cid.Cid, error) //perm:read
|
||||||
// StateActorManifestCID returns the CID of the builtin actors manifest for the given network version
|
|
||||||
StateActorManifestCID(context.Context, abinetwork.Version) (cid.Cid, error) //perm:read
|
|
||||||
|
|
||||||
// StateGetRandomnessFromTickets is used to sample the chain for randomness.
|
// StateGetRandomnessFromTickets is used to sample the chain for randomness.
|
||||||
StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
|
StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
|
||||||
|
@ -2288,21 +2288,6 @@ func (mr *MockFullNodeMockRecorder) StateActorCodeCIDs(arg0, arg1 interface{}) *
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorCodeCIDs", reflect.TypeOf((*MockFullNode)(nil).StateActorCodeCIDs), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorCodeCIDs", reflect.TypeOf((*MockFullNode)(nil).StateActorCodeCIDs), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// StateActorManifestCID mocks base method.
|
|
||||||
func (m *MockFullNode) StateActorManifestCID(arg0 context.Context, arg1 network.Version) (cid.Cid, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "StateActorManifestCID", arg0, arg1)
|
|
||||||
ret0, _ := ret[0].(cid.Cid)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// StateActorManifestCID indicates an expected call of StateActorManifestCID.
|
|
||||||
func (mr *MockFullNodeMockRecorder) StateActorManifestCID(arg0, arg1 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorManifestCID", reflect.TypeOf((*MockFullNode)(nil).StateActorManifestCID), arg0, arg1)
|
|
||||||
}
|
|
||||||
|
|
||||||
// StateAllMinerFaults mocks base method.
|
// StateAllMinerFaults mocks base method.
|
||||||
func (m *MockFullNode) StateAllMinerFaults(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) ([]*api.Fault, error) {
|
func (m *MockFullNode) StateAllMinerFaults(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) ([]*api.Fault, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
|
@ -341,8 +341,6 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
StateActorCodeCIDs func(p0 context.Context, p1 abinetwork.Version) (map[string]cid.Cid, error) `perm:"read"`
|
StateActorCodeCIDs func(p0 context.Context, p1 abinetwork.Version) (map[string]cid.Cid, error) `perm:"read"`
|
||||||
|
|
||||||
StateActorManifestCID func(p0 context.Context, p1 abinetwork.Version) (cid.Cid, error) `perm:"read"`
|
|
||||||
|
|
||||||
StateAllMinerFaults func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) ([]*Fault, error) `perm:"read"`
|
StateAllMinerFaults func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) ([]*Fault, error) `perm:"read"`
|
||||||
|
|
||||||
StateCall func(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (*InvocResult, error) `perm:"read"`
|
StateCall func(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (*InvocResult, error) `perm:"read"`
|
||||||
@ -2414,17 +2412,6 @@ func (s *FullNodeStub) StateActorCodeCIDs(p0 context.Context, p1 abinetwork.Vers
|
|||||||
return *new(map[string]cid.Cid), ErrNotSupported
|
return *new(map[string]cid.Cid), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) StateActorManifestCID(p0 context.Context, p1 abinetwork.Version) (cid.Cid, error) {
|
|
||||||
if s.Internal.StateActorManifestCID == nil {
|
|
||||||
return *new(cid.Cid), ErrNotSupported
|
|
||||||
}
|
|
||||||
return s.Internal.StateActorManifestCID(p0, p1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStub) StateActorManifestCID(p0 context.Context, p1 abinetwork.Version) (cid.Cid, error) {
|
|
||||||
return *new(cid.Cid), ErrNotSupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStruct) StateAllMinerFaults(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) ([]*Fault, error) {
|
func (s *FullNodeStruct) StateAllMinerFaults(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) ([]*Fault, error) {
|
||||||
if s.Internal.StateAllMinerFaults == nil {
|
if s.Internal.StateAllMinerFaults == nil {
|
||||||
return *new([]*Fault), ErrNotSupported
|
return *new([]*Fault), ErrNotSupported
|
||||||
|
@ -607,8 +607,6 @@ type FullNode interface {
|
|||||||
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) //perm:read
|
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error) //perm:read
|
||||||
// StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version
|
// StateActorCodeCIDs returns the CIDs of all the builtin actors for the given network version
|
||||||
StateActorCodeCIDs(context.Context, abinetwork.Version) (map[string]cid.Cid, error) //perm:read
|
StateActorCodeCIDs(context.Context, abinetwork.Version) (map[string]cid.Cid, error) //perm:read
|
||||||
// StateActorManifestCID returns the CID of the builtin actors manifest for the given network version
|
|
||||||
StateActorManifestCID(context.Context, abinetwork.Version) (cid.Cid, error) //perm:read
|
|
||||||
|
|
||||||
// StateGetRandomnessFromTickets is used to sample the chain for randomness.
|
// StateGetRandomnessFromTickets is used to sample the chain for randomness.
|
||||||
StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
|
StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) //perm:read
|
||||||
|
@ -259,8 +259,6 @@ type FullNodeStruct struct {
|
|||||||
|
|
||||||
StateActorCodeCIDs func(p0 context.Context, p1 abinetwork.Version) (map[string]cid.Cid, error) `perm:"read"`
|
StateActorCodeCIDs func(p0 context.Context, p1 abinetwork.Version) (map[string]cid.Cid, error) `perm:"read"`
|
||||||
|
|
||||||
StateActorManifestCID func(p0 context.Context, p1 abinetwork.Version) (cid.Cid, error) `perm:"read"`
|
|
||||||
|
|
||||||
StateAllMinerFaults func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) ([]*api.Fault, error) `perm:"read"`
|
StateAllMinerFaults func(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) ([]*api.Fault, error) `perm:"read"`
|
||||||
|
|
||||||
StateCall func(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (*api.InvocResult, error) `perm:"read"`
|
StateCall func(p0 context.Context, p1 *types.Message, p2 types.TipSetKey) (*api.InvocResult, error) `perm:"read"`
|
||||||
@ -1694,17 +1692,6 @@ func (s *FullNodeStub) StateActorCodeCIDs(p0 context.Context, p1 abinetwork.Vers
|
|||||||
return *new(map[string]cid.Cid), ErrNotSupported
|
return *new(map[string]cid.Cid), ErrNotSupported
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FullNodeStruct) StateActorManifestCID(p0 context.Context, p1 abinetwork.Version) (cid.Cid, error) {
|
|
||||||
if s.Internal.StateActorManifestCID == nil {
|
|
||||||
return *new(cid.Cid), ErrNotSupported
|
|
||||||
}
|
|
||||||
return s.Internal.StateActorManifestCID(p0, p1)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStub) StateActorManifestCID(p0 context.Context, p1 abinetwork.Version) (cid.Cid, error) {
|
|
||||||
return *new(cid.Cid), ErrNotSupported
|
|
||||||
}
|
|
||||||
|
|
||||||
func (s *FullNodeStruct) StateAllMinerFaults(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) ([]*api.Fault, error) {
|
func (s *FullNodeStruct) StateAllMinerFaults(p0 context.Context, p1 abi.ChainEpoch, p2 types.TipSetKey) ([]*api.Fault, error) {
|
||||||
if s.Internal.StateAllMinerFaults == nil {
|
if s.Internal.StateAllMinerFaults == nil {
|
||||||
return *new([]*api.Fault), ErrNotSupported
|
return *new([]*api.Fault), ErrNotSupported
|
||||||
|
@ -2187,21 +2187,6 @@ func (mr *MockFullNodeMockRecorder) StateActorCodeCIDs(arg0, arg1 interface{}) *
|
|||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorCodeCIDs", reflect.TypeOf((*MockFullNode)(nil).StateActorCodeCIDs), arg0, arg1)
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorCodeCIDs", reflect.TypeOf((*MockFullNode)(nil).StateActorCodeCIDs), arg0, arg1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// StateActorManifestCID mocks base method.
|
|
||||||
func (m *MockFullNode) StateActorManifestCID(arg0 context.Context, arg1 network.Version) (cid.Cid, error) {
|
|
||||||
m.ctrl.T.Helper()
|
|
||||||
ret := m.ctrl.Call(m, "StateActorManifestCID", arg0, arg1)
|
|
||||||
ret0, _ := ret[0].(cid.Cid)
|
|
||||||
ret1, _ := ret[1].(error)
|
|
||||||
return ret0, ret1
|
|
||||||
}
|
|
||||||
|
|
||||||
// StateActorManifestCID indicates an expected call of StateActorManifestCID.
|
|
||||||
func (mr *MockFullNodeMockRecorder) StateActorManifestCID(arg0, arg1 interface{}) *gomock.Call {
|
|
||||||
mr.mock.ctrl.T.Helper()
|
|
||||||
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateActorManifestCID", reflect.TypeOf((*MockFullNode)(nil).StateActorManifestCID), arg0, arg1)
|
|
||||||
}
|
|
||||||
|
|
||||||
// StateAllMinerFaults mocks base method.
|
// StateAllMinerFaults mocks base method.
|
||||||
func (m *MockFullNode) StateAllMinerFaults(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) ([]*api.Fault, error) {
|
func (m *MockFullNode) StateAllMinerFaults(arg0 context.Context, arg1 abi.ChainEpoch, arg2 types.TipSetKey) ([]*api.Fault, error) {
|
||||||
m.ctrl.T.Helper()
|
m.ctrl.T.Helper()
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -321,7 +321,7 @@ func GetActorCodeIDs(av Version) (map[string]cid.Cid, error) {
|
|||||||
if !ok {
|
if !ok {
|
||||||
return nil, xerrors.Errorf("could not find builtin actor cids for Actors version %d", av)
|
return nil, xerrors.Errorf("could not find builtin actor cids for Actors version %d", av)
|
||||||
}
|
}
|
||||||
cids[key] = c
|
synthCids[key] = c
|
||||||
}
|
}
|
||||||
|
|
||||||
return synthCids, nil
|
return synthCids, nil
|
||||||
|
@ -159,7 +159,6 @@
|
|||||||
* [State](#State)
|
* [State](#State)
|
||||||
* [StateAccountKey](#StateAccountKey)
|
* [StateAccountKey](#StateAccountKey)
|
||||||
* [StateActorCodeCIDs](#StateActorCodeCIDs)
|
* [StateActorCodeCIDs](#StateActorCodeCIDs)
|
||||||
* [StateActorManifestCID](#StateActorManifestCID)
|
|
||||||
* [StateAllMinerFaults](#StateAllMinerFaults)
|
* [StateAllMinerFaults](#StateAllMinerFaults)
|
||||||
* [StateCall](#StateCall)
|
* [StateCall](#StateCall)
|
||||||
* [StateChangedActors](#StateChangedActors)
|
* [StateChangedActors](#StateChangedActors)
|
||||||
@ -4656,26 +4655,6 @@ Inputs:
|
|||||||
|
|
||||||
Response: `{}`
|
Response: `{}`
|
||||||
|
|
||||||
### StateActorManifestCID
|
|
||||||
StateActorManifestCID returns the CID of the builtin actors manifest for the given network version
|
|
||||||
|
|
||||||
|
|
||||||
Perms: read
|
|
||||||
|
|
||||||
Inputs:
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
16
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
Response:
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### StateAllMinerFaults
|
### StateAllMinerFaults
|
||||||
StateAllMinerFaults returns all non-expired Faults that occur within lookback epochs of the given tipset
|
StateAllMinerFaults returns all non-expired Faults that occur within lookback epochs of the given tipset
|
||||||
|
|
||||||
|
@ -166,7 +166,6 @@
|
|||||||
* [State](#State)
|
* [State](#State)
|
||||||
* [StateAccountKey](#StateAccountKey)
|
* [StateAccountKey](#StateAccountKey)
|
||||||
* [StateActorCodeCIDs](#StateActorCodeCIDs)
|
* [StateActorCodeCIDs](#StateActorCodeCIDs)
|
||||||
* [StateActorManifestCID](#StateActorManifestCID)
|
|
||||||
* [StateAllMinerFaults](#StateAllMinerFaults)
|
* [StateAllMinerFaults](#StateAllMinerFaults)
|
||||||
* [StateCall](#StateCall)
|
* [StateCall](#StateCall)
|
||||||
* [StateChangedActors](#StateChangedActors)
|
* [StateChangedActors](#StateChangedActors)
|
||||||
@ -5067,26 +5066,6 @@ Inputs:
|
|||||||
|
|
||||||
Response: `{}`
|
Response: `{}`
|
||||||
|
|
||||||
### StateActorManifestCID
|
|
||||||
StateActorManifestCID returns the CID of the builtin actors manifest for the given network version
|
|
||||||
|
|
||||||
|
|
||||||
Perms: read
|
|
||||||
|
|
||||||
Inputs:
|
|
||||||
```json
|
|
||||||
[
|
|
||||||
16
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
Response:
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4"
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### StateAllMinerFaults
|
### StateAllMinerFaults
|
||||||
StateAllMinerFaults returns all non-expired Faults that occur within lookback epochs of the given tipset
|
StateAllMinerFaults returns all non-expired Faults that occur within lookback epochs of the given tipset
|
||||||
|
|
||||||
|
@ -1537,20 +1537,6 @@ func (a *StateAPI) StateActorCodeCIDs(ctx context.Context, nv network.Version) (
|
|||||||
return cids, nil
|
return cids, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *StateAPI) StateActorManifestCID(ctx context.Context, nv network.Version) (cid.Cid, error) {
|
|
||||||
actorVersion, err := actors.VersionForNetwork(nv)
|
|
||||||
if err != nil {
|
|
||||||
return cid.Undef, xerrors.Errorf("invalid network version")
|
|
||||||
}
|
|
||||||
|
|
||||||
c, ok := actors.GetManifest(actorVersion)
|
|
||||||
if !ok {
|
|
||||||
return cid.Undef, xerrors.Errorf("could not find manifest cid for network version %d, actors version %d", nv, actorVersion)
|
|
||||||
}
|
|
||||||
|
|
||||||
return c, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (a *StateAPI) StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) {
|
func (a *StateAPI) StateGetRandomnessFromTickets(ctx context.Context, personalization crypto.DomainSeparationTag, randEpoch abi.ChainEpoch, entropy []byte, tsk types.TipSetKey) (abi.Randomness, error) {
|
||||||
return a.StateManager.GetRandomnessFromTickets(ctx, personalization, randEpoch, entropy, tsk)
|
return a.StateManager.GetRandomnessFromTickets(ctx, personalization, randEpoch, entropy, tsk)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user