diff --git a/venus-devtool/api-gen/example.go b/venus-devtool/api-gen/example.go index cfd2e53447..f95ab2bf16 100644 --- a/venus-devtool/api-gen/example.go +++ b/venus-devtool/api-gen/example.go @@ -9,8 +9,6 @@ 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" @@ -18,10 +16,10 @@ import ( "github.com/filecoin-project/go-fil-markets/retrievalmarket" "github.com/filecoin-project/go-jsonrpc/auth" "github.com/filecoin-project/go-state-types/abi" + "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/exitcode" - "github.com/filecoin-project/venus/venus-shared/types/market" auuid "github.com/google/uuid" blocks "github.com/ipfs/go-block-format" "github.com/ipfs/go-cid" @@ -37,6 +35,7 @@ import ( "github.com/filecoin-project/venus/pkg/constants" "github.com/filecoin-project/venus/venus-shared/api/chain" "github.com/filecoin-project/venus/venus-shared/types" + "github.com/filecoin-project/venus/venus-shared/types/market" "github.com/filecoin-project/venus/venus-shared/types/market/client" "github.com/filecoin-project/venus/venus-shared/types/messager" "github.com/filecoin-project/venus/venus-shared/types/wallet" @@ -323,7 +322,6 @@ func exampleStruct(method string, t, parent reflect.Type) interface{} { } if strings.Title(f.Name) == f.Name { - fmt.Println(f.Name) ns.Field(i).Set(reflect.ValueOf(ExampleValue(method, f.Type, t))) } } diff --git a/venus-shared/api/gateway/v2/market_event.go b/venus-shared/api/gateway/v2/market_event.go index e01af80b2c..0d86f49a12 100644 --- a/venus-shared/api/gateway/v2/market_event.go +++ b/venus-shared/api/gateway/v2/market_event.go @@ -5,8 +5,6 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/specs-storage/storage" - "github.com/ipfs/go-cid" "github.com/filecoin-project/venus/venus-shared/types" @@ -19,9 +17,9 @@ type IMarketEvent interface { } type IMarketClient interface { - ListMarketConnectionsState(ctx context.Context) ([]gtypes.MarketConnectionState, error) //perm:admin - IsUnsealed(ctx context.Context, miner address.Address, pieceCid cid.Cid, sector storage.SectorRef, offset types.PaddedByteIndex, size abi.PaddedPieceSize) (bool, error) //perm:admin - SectorsUnsealPiece(ctx context.Context, miner address.Address, pieceCid cid.Cid, sector storage.SectorRef, offset types.PaddedByteIndex, size abi.PaddedPieceSize, dest string) error //perm:admin + ListMarketConnectionsState(ctx context.Context) ([]gtypes.MarketConnectionState, error) //perm:admin + IsUnsealed(ctx context.Context, miner address.Address, pieceCid cid.Cid, sectorNumber abi.SectorNumber, offset types.PaddedByteIndex, size abi.PaddedPieceSize) (bool, error) //perm:admin + SectorsUnsealPiece(ctx context.Context, miner address.Address, pieceCid cid.Cid, sectorNumber abi.SectorNumber, offset types.PaddedByteIndex, size abi.PaddedPieceSize, dest string) error //perm:admin } type IMarketServiceProvider interface { diff --git a/venus-shared/api/gateway/v2/method.md b/venus-shared/api/gateway/v2/method.md index e4184580e6..721f89e367 100644 --- a/venus-shared/api/gateway/v2/method.md +++ b/venus-shared/api/gateway/v2/method.md @@ -60,13 +60,7 @@ Inputs: { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - { - "ID": { - "Miner": 1000, - "Number": 9 - }, - "ProofType": 8 - }, + 9, 10, 1032 ] @@ -116,13 +110,7 @@ Inputs: { "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" }, - { - "ID": { - "Miner": 1000, - "Number": 9 - }, - "ProofType": 8 - }, + 9, 10, 1032, "string value" diff --git a/venus-shared/api/gateway/v2/mock/mock_igateway.go b/venus-shared/api/gateway/v2/mock/mock_igateway.go index 4e4391e9e4..eec900b578 100644 --- a/venus-shared/api/gateway/v2/mock/mock_igateway.go +++ b/venus-shared/api/gateway/v2/mock/mock_igateway.go @@ -13,7 +13,6 @@ import ( crypto "github.com/filecoin-project/go-state-types/crypto" network "github.com/filecoin-project/go-state-types/network" proof "github.com/filecoin-project/go-state-types/proof" - storage "github.com/filecoin-project/specs-storage/storage" types "github.com/filecoin-project/venus/venus-shared/types" gateway "github.com/filecoin-project/venus/venus-shared/types/gateway" gomock "github.com/golang/mock/gomock" @@ -73,7 +72,7 @@ func (mr *MockIGatewayMockRecorder) ComputeProof(arg0, arg1, arg2, arg3, arg4, a } // IsUnsealed mocks base method. -func (m *MockIGateway) IsUnsealed(arg0 context.Context, arg1 address.Address, arg2 cid.Cid, arg3 storage.SectorRef, arg4 types.PaddedByteIndex, arg5 abi.PaddedPieceSize) (bool, error) { +func (m *MockIGateway) IsUnsealed(arg0 context.Context, arg1 address.Address, arg2 cid.Cid, arg3 abi.SectorNumber, arg4 types.PaddedByteIndex, arg5 abi.PaddedPieceSize) (bool, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IsUnsealed", arg0, arg1, arg2, arg3, arg4, arg5) ret0, _ := ret[0].(bool) @@ -264,7 +263,7 @@ func (mr *MockIGatewayMockRecorder) ResponseWalletEvent(arg0, arg1 interface{}) } // SectorsUnsealPiece mocks base method. -func (m *MockIGateway) SectorsUnsealPiece(arg0 context.Context, arg1 address.Address, arg2 cid.Cid, arg3 storage.SectorRef, arg4 types.PaddedByteIndex, arg5 abi.PaddedPieceSize, arg6 string) error { +func (m *MockIGateway) SectorsUnsealPiece(arg0 context.Context, arg1 address.Address, arg2 cid.Cid, arg3 abi.SectorNumber, arg4 types.PaddedByteIndex, arg5 abi.PaddedPieceSize, arg6 string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "SectorsUnsealPiece", arg0, arg1, arg2, arg3, arg4, arg5, arg6) ret0, _ := ret[0].(error) diff --git a/venus-shared/api/gateway/v2/proxy_gen.go b/venus-shared/api/gateway/v2/proxy_gen.go index b89a4087c0..63ac821b1d 100644 --- a/venus-shared/api/gateway/v2/proxy_gen.go +++ b/venus-shared/api/gateway/v2/proxy_gen.go @@ -8,7 +8,6 @@ import ( "github.com/filecoin-project/go-state-types/abi" "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/go-state-types/network" - "github.com/filecoin-project/specs-storage/storage" cid "github.com/ipfs/go-cid" "github.com/filecoin-project/venus/venus-shared/actors/builtin" @@ -108,19 +107,19 @@ type IWalletEventStruct struct { type IMarketClientStruct struct { Internal struct { - IsUnsealed func(ctx context.Context, miner address.Address, pieceCid cid.Cid, sector storage.SectorRef, offset types.PaddedByteIndex, size abi.PaddedPieceSize) (bool, error) `perm:"admin"` - ListMarketConnectionsState func(ctx context.Context) ([]gtypes.MarketConnectionState, error) `perm:"admin"` - SectorsUnsealPiece func(ctx context.Context, miner address.Address, pieceCid cid.Cid, sector storage.SectorRef, offset types.PaddedByteIndex, size abi.PaddedPieceSize, dest string) error `perm:"admin"` + IsUnsealed func(ctx context.Context, miner address.Address, pieceCid cid.Cid, sectorNumber abi.SectorNumber, offset types.PaddedByteIndex, size abi.PaddedPieceSize) (bool, error) `perm:"admin"` + ListMarketConnectionsState func(ctx context.Context) ([]gtypes.MarketConnectionState, error) `perm:"admin"` + SectorsUnsealPiece func(ctx context.Context, miner address.Address, pieceCid cid.Cid, sectorNumber abi.SectorNumber, offset types.PaddedByteIndex, size abi.PaddedPieceSize, dest string) error `perm:"admin"` } } -func (s *IMarketClientStruct) IsUnsealed(p0 context.Context, p1 address.Address, p2 cid.Cid, p3 storage.SectorRef, p4 types.PaddedByteIndex, p5 abi.PaddedPieceSize) (bool, error) { +func (s *IMarketClientStruct) IsUnsealed(p0 context.Context, p1 address.Address, p2 cid.Cid, p3 abi.SectorNumber, p4 types.PaddedByteIndex, p5 abi.PaddedPieceSize) (bool, error) { return s.Internal.IsUnsealed(p0, p1, p2, p3, p4, p5) } func (s *IMarketClientStruct) ListMarketConnectionsState(p0 context.Context) ([]gtypes.MarketConnectionState, error) { return s.Internal.ListMarketConnectionsState(p0) } -func (s *IMarketClientStruct) SectorsUnsealPiece(p0 context.Context, p1 address.Address, p2 cid.Cid, p3 storage.SectorRef, p4 types.PaddedByteIndex, p5 abi.PaddedPieceSize, p6 string) error { +func (s *IMarketClientStruct) SectorsUnsealPiece(p0 context.Context, p1 address.Address, p2 cid.Cid, p3 abi.SectorNumber, p4 types.PaddedByteIndex, p5 abi.PaddedPieceSize, p6 string) error { return s.Internal.SectorsUnsealPiece(p0, p1, p2, p3, p4, p5, p6) }