Skip to content

Commit 218c101

Browse files
committed
Use new go-state-types accessors
1 parent 3eb0077 commit 218c101

File tree

245 files changed

+3631
-4085
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

245 files changed

+3631
-4085
lines changed

api/api_full.go

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ import (
2020
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
2121
"github.com/filecoin-project/go-fil-markets/storagemarket"
2222

23+
"github.com/filecoin-project/go-state-types/builtin/v8/market"
24+
"github.com/filecoin-project/go-state-types/builtin/v8/miner"
25+
"github.com/filecoin-project/go-state-types/builtin/v8/paych"
2326
apitypes "github.com/filecoin-project/lotus/api/types"
2427
"github.com/filecoin-project/lotus/chain/actors/builtin"
25-
"github.com/filecoin-project/lotus/chain/actors/builtin/market"
26-
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
27-
"github.com/filecoin-project/lotus/chain/actors/builtin/paych"
28+
lminer "github.com/filecoin-project/lotus/chain/actors/builtin/miner"
2829
"github.com/filecoin-project/lotus/chain/actors/builtin/power"
2930
"github.com/filecoin-project/lotus/chain/types"
3031
"github.com/filecoin-project/lotus/node/modules/dtypes"
@@ -443,7 +444,7 @@ type FullNode interface {
443444
// StateMinerPower returns the power of the indicated miner
444445
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*MinerPower, error) //perm:read
445446
// StateMinerInfo returns info about the indicated miner
446-
StateMinerInfo(context.Context, address.Address, types.TipSetKey) (miner.MinerInfo, error) //perm:read
447+
StateMinerInfo(context.Context, address.Address, types.TipSetKey) (MinerInfo, error) //perm:read
447448
// StateMinerDeadlines returns all the proving deadlines for the given miner
448449
StateMinerDeadlines(context.Context, address.Address, types.TipSetKey) ([]Deadline, error) //perm:read
449450
// StateMinerPartitions returns all partitions in the specified deadline
@@ -469,9 +470,9 @@ type FullNode interface {
469470
// expiration epoch
470471
StateSectorGetInfo(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorOnChainInfo, error) //perm:read
471472
// StateSectorExpiration returns epoch at which given sector will expire
472-
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*miner.SectorExpiration, error) //perm:read
473+
StateSectorExpiration(context.Context, address.Address, abi.SectorNumber, types.TipSetKey) (*lminer.SectorExpiration, error) //perm:read
473474
// StateSectorPartition finds deadline/partition with the specified sector
474-
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*miner.SectorLocation, error) //perm:read
475+
StateSectorPartition(ctx context.Context, maddr address.Address, sectorNumber abi.SectorNumber, tok types.TipSetKey) (*lminer.SectorLocation, error) //perm:read
475476
// StateSearchMsg looks back up to limit epochs in the chain for a message, and returns its receipt and the tipset where it was executed
476477
//
477478
// NOTE: If a replacing message is found on chain, this method will return
@@ -918,6 +919,20 @@ type MinerPower struct {
918919
HasMinPower bool
919920
}
920921

922+
type MinerInfo struct {
923+
Owner address.Address // Must be an ID-address.
924+
Worker address.Address // Must be an ID-address.
925+
NewWorker address.Address // Must be an ID-address.
926+
ControlAddresses []address.Address // Must be an ID-addresses.
927+
WorkerChangeEpoch abi.ChainEpoch
928+
PeerId *peer.ID
929+
Multiaddrs []abi.Multiaddrs
930+
WindowPoStProofType abi.RegisteredPoStProof
931+
SectorSize abi.SectorSize
932+
WindowPoStPartitionSectors uint64
933+
ConsensusFaultElapsed abi.ChainEpoch
934+
}
935+
921936
type QueryOffer struct {
922937
Err string
923938

api/api_gateway.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"github.com/filecoin-project/go-state-types/abi"
1010
"github.com/filecoin-project/go-state-types/dline"
1111

12+
"github.com/filecoin-project/go-state-types/builtin/v8/miner"
1213
apitypes "github.com/filecoin-project/lotus/api/types"
13-
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
1414
"github.com/filecoin-project/lotus/chain/types"
1515
)
1616

@@ -56,7 +56,7 @@ type Gateway interface {
5656
StateLookupID(ctx context.Context, addr address.Address, tsk types.TipSetKey) (address.Address, error)
5757
StateMarketBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MarketBalance, error)
5858
StateMarketStorageDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*MarketDeal, error)
59-
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (miner.MinerInfo, error)
59+
StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (MinerInfo, error)
6060
StateMinerProvingDeadline(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*dline.Info, error)
6161
StateMinerPower(context.Context, address.Address, types.TipSetKey) (*MinerPower, error)
6262
StateNetworkVersion(context.Context, types.TipSetKey) (apitypes.NetworkVersion, error)

api/api_storage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"context"
66
"time"
77

8+
"github.com/filecoin-project/go-state-types/builtin/v8/miner"
89
"github.com/filecoin-project/lotus/chain/actors/builtin"
9-
"github.com/filecoin-project/lotus/chain/actors/builtin/miner"
1010

1111
"github.com/google/uuid"
1212
"github.com/ipfs/go-cid"
@@ -15,8 +15,8 @@ import (
1515
"github.com/filecoin-project/go-address"
1616
datatransfer "github.com/filecoin-project/go-data-transfer"
1717
"github.com/filecoin-project/go-state-types/abi"
18+
"github.com/filecoin-project/go-state-types/builtin/v8/market"
1819
abinetwork "github.com/filecoin-project/go-state-types/network"
19-
"github.com/filecoin-project/specs-actors/v8/actors/builtin/market"
2020
"github.com/filecoin-project/specs-storage/storage"
2121

2222
"github.com/filecoin-project/go-fil-markets/piecestore"

api/api_worker.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ package api
33
import (
44
"context"
55

6+
"github.com/filecoin-project/go-state-types/builtin/v8/miner"
7+
68
"github.com/google/uuid"
79
"github.com/ipfs/go-cid"
810

911
"github.com/filecoin-project/go-state-types/abi"
10-
"github.com/filecoin-project/specs-actors/v5/actors/runtime/proof"
11-
1212
"github.com/filecoin-project/lotus/extern/sector-storage/sealtasks"
1313
"github.com/filecoin-project/lotus/extern/sector-storage/storiface"
1414
"github.com/filecoin-project/specs-storage/storage"
@@ -50,7 +50,7 @@ type Worker interface {
5050
UnsealPiece(context.Context, storage.SectorRef, storiface.UnpaddedByteIndex, abi.UnpaddedPieceSize, abi.SealRandomness, cid.Cid) (storiface.CallID, error) //perm:admin
5151
Fetch(context.Context, storage.SectorRef, storiface.SectorFileType, storiface.PathType, storiface.AcquireMode) (storiface.CallID, error) //perm:admin
5252

53-
GenerateWinningPoSt(ctx context.Context, ppt abi.RegisteredPoStProof, mid abi.ActorID, sectors []storiface.PostSectorChallenge, randomness abi.PoStRandomness) ([]proof.PoStProof, error) //perm:admin
53+
GenerateWinningPoSt(ctx context.Context, ppt abi.RegisteredPoStProof, mid abi.ActorID, sectors []storiface.PostSectorChallenge, randomness abi.PoStRandomness) ([]miner.PoStProof, error) //perm:admin
5454
GenerateWindowPoSt(ctx context.Context, ppt abi.RegisteredPoStProof, mid abi.ActorID, sectors []storiface.PostSectorChallenge, partitionIdx int, randomness abi.PoStRandomness) (storiface.WindowPoStResult, error) //perm:admin
5555

5656
TaskDisable(ctx context.Context, tt sealtasks.TaskType) error //perm:admin

0 commit comments

Comments
 (0)