Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: actors: manual Ni-PoRep onboarding #12045

Closed
wants to merge 32 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
96b4593
remove client CLI
aarshkshah1992 May 16, 2024
03bd0a5
remove markets CLI from miner
aarshkshah1992 May 16, 2024
74dbabb
remove markets from all CLI
aarshkshah1992 May 16, 2024
2c4d1bd
remove client API
aarshkshah1992 May 16, 2024
ba3e26c
update go mod
aarshkshah1992 May 16, 2024
d1be22a
remove EnableMarkets flag
aarshkshah1992 May 16, 2024
5672c5f
remove market subsystem
aarshkshah1992 May 16, 2024
789848b
remove dagstore
aarshkshah1992 May 16, 2024
ee3a83d
remove index provider
aarshkshah1992 May 16, 2024
aea0b8f
remove graphsync and data-transfer
aarshkshah1992 May 17, 2024
5b09bbc
remove markets
aarshkshah1992 May 17, 2024
13a34c6
go mod tidy
aarshkshah1992 May 17, 2024
96579ff
fix cbor gen deps
aarshkshah1992 May 17, 2024
5596c96
remove deal making from config
aarshkshah1992 May 17, 2024
a0f0d0d
remove eol alert
aarshkshah1992 May 17, 2024
64133ec
Merge remote-tracking branch 'origin/master' into feat/remove-markets…
aarshkshah1992 May 17, 2024
a7728c3
Merge remote-tracking branch 'origin/master' into feat/remove-markets…
aarshkshah1992 May 20, 2024
84ba02d
go mod tidy
aarshkshah1992 May 20, 2024
86824d7
Merge remote-tracking branch 'origin/feat/remove-markets-client' into…
aarshkshah1992 May 20, 2024
091d6d2
test: actors: manual CC onboarding and proving integration test
rvagg May 20, 2024
0b46214
test: actors: manual CC onboarding itest with real proofs
rvagg May 22, 2024
1d96d68
test: actors: fix lint issue, require proofs in CI
rvagg May 22, 2024
f8dd9ea
test: actors: rename real proofs test, fix dispute window wait
rvagg May 23, 2024
39fb5cb
feat: add TestUnmanagedMiner in the itest kit for non-storage managed…
rvagg May 27, 2024
4fe938b
test: niporep: add niporep test miner, make manual test multi-miner c…
rvagg May 27, 2024
b38ace1
chore: update actors to bundle that ignores niporep proof size
rvagg May 28, 2024
7616630
feat!: ni-porep for lotus-bench
rvagg May 28, 2024
3e8bbf0
feat: lotus-bench: support non-interactive proofs
rvagg May 29, 2024
b7d7aa5
feat: lotus-bench: add script to benchmark standard sector steps
rvagg May 29, 2024
3240e3b
feat: niporep: introduce SealProofVariant
rvagg May 29, 2024
5e34ec7
test: niporep: use aggregate proofs for ni-porep
rvagg May 29, 2024
3b1eaf8
feat: niporep: err message fix
rvagg Jun 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
- uses: ./.github/actions/install-go
- run: make deps lotus
- run: go install golang.org/x/tools/cmd/goimports
- run: go install github.com/hannahhoward/cbor-gen-for
- run: make gen
- run: git diff --exit-code
- run: make docsgen-cli
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
"itest-get_messages_in_ts": ["self-hosted", "linux", "x64", "xlarge"],
"itest-lite_migration": ["self-hosted", "linux", "x64", "xlarge"],
"itest-lookup_robust_address": ["self-hosted", "linux", "x64", "xlarge"],
"itest-manual_onboarding": ["self-hosted", "linux", "x64", "xlarge"],
"itest-mempool": ["self-hosted", "linux", "x64", "xlarge"],
"itest-mpool_msg_uuid": ["self-hosted", "linux", "x64", "xlarge"],
"itest-mpool_push_with_uuid": ["self-hosted", "linux", "x64", "xlarge"],
Expand Down Expand Up @@ -128,6 +129,7 @@ jobs:
"itest-deals",
"itest-direct_data_onboard_verified",
"itest-direct_data_onboard",
"itest-manual_onboarding",
"itest-net",
"itest-path_detach_redeclare",
"itest-path_type_filters",
Expand Down
212 changes: 0 additions & 212 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ import (
"github.com/google/uuid"
blocks "github.com/ipfs/go-block-format"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p/core/peer"

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-bitfield"
datatransfer "github.com/filecoin-project/go-data-transfer/v2"
"github.com/filecoin-project/go-fil-markets/retrievalmarket"
"github.com/filecoin-project/go-fil-markets/storagemarket"
"github.com/filecoin-project/go-jsonrpc"
"github.com/filecoin-project/go-state-types/abi"
"github.com/filecoin-project/go-state-types/big"
Expand All @@ -34,7 +30,6 @@ import (
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/types/ethtypes"
"github.com/filecoin-project/lotus/node/modules/dtypes"
"github.com/filecoin-project/lotus/node/repo/imports"
)

//go:generate go run github.com/golang/mock/mockgen -destination=mocks/mock_full.go -package=mocks . FullNode
Expand Down Expand Up @@ -348,74 +343,6 @@ type FullNode interface {

// Other

// MethodGroup: Client
// The Client methods all have to do with interacting with the storage and
// retrieval markets as a client

// ClientImport imports file under the specified path into filestore.
ClientImport(ctx context.Context, ref FileRef) (*ImportRes, error) //perm:admin
// ClientRemoveImport removes file import
ClientRemoveImport(ctx context.Context, importID imports.ID) error //perm:admin
// ClientStartDeal proposes a deal with a miner.
ClientStartDeal(ctx context.Context, params *StartDealParams) (*cid.Cid, error) //perm:admin
// ClientStatelessDeal fire-and-forget-proposes an offline deal to a miner without subsequent tracking.
ClientStatelessDeal(ctx context.Context, params *StartDealParams) (*cid.Cid, error) //perm:write
// ClientGetDealInfo returns the latest information about a given deal.
ClientGetDealInfo(context.Context, cid.Cid) (*DealInfo, error) //perm:read
// ClientListDeals returns information about the deals made by the local client.
ClientListDeals(ctx context.Context) ([]DealInfo, error) //perm:write
// ClientGetDealUpdates returns the status of updated deals
ClientGetDealUpdates(ctx context.Context) (<-chan DealInfo, error) //perm:write
// ClientGetDealStatus returns status given a code
ClientGetDealStatus(ctx context.Context, statusCode uint64) (string, error) //perm:read
// ClientHasLocal indicates whether a certain CID is locally stored.
ClientHasLocal(ctx context.Context, root cid.Cid) (bool, error) //perm:write
// ClientFindData identifies peers that have a certain file, and returns QueryOffers (one per peer).
ClientFindData(ctx context.Context, root cid.Cid, piece *cid.Cid) ([]QueryOffer, error) //perm:read
// ClientMinerQueryOffer returns a QueryOffer for the specific miner and file.
ClientMinerQueryOffer(ctx context.Context, miner address.Address, root cid.Cid, piece *cid.Cid) (QueryOffer, error) //perm:read
// ClientRetrieve initiates the retrieval of a file, as specified in the order.
ClientRetrieve(ctx context.Context, params RetrievalOrder) (*RestrievalRes, error) //perm:admin
// ClientRetrieveWait waits for retrieval to be complete
ClientRetrieveWait(ctx context.Context, deal retrievalmarket.DealID) error //perm:admin
// ClientExport exports a file stored in the local filestore to a system file
ClientExport(ctx context.Context, exportRef ExportRef, fileRef FileRef) error //perm:admin
// ClientListRetrievals returns information about retrievals made by the local client
ClientListRetrievals(ctx context.Context) ([]RetrievalInfo, error) //perm:write
// ClientGetRetrievalUpdates returns status of updated retrieval deals
ClientGetRetrievalUpdates(ctx context.Context) (<-chan RetrievalInfo, error) //perm:write
// ClientQueryAsk returns a signed StorageAsk from the specified miner.
ClientQueryAsk(ctx context.Context, p peer.ID, miner address.Address) (*StorageAsk, error) //perm:read
// ClientCalcCommP calculates the CommP and data size of the specified CID
ClientDealPieceCID(ctx context.Context, root cid.Cid) (DataCIDSize, error) //perm:read
// ClientCalcCommP calculates the CommP for a specified file
ClientCalcCommP(ctx context.Context, inpath string) (*CommPRet, error) //perm:write
// ClientGenCar generates a CAR file for the specified file.
ClientGenCar(ctx context.Context, ref FileRef, outpath string) error //perm:write
// ClientDealSize calculates real deal data size
ClientDealSize(ctx context.Context, root cid.Cid) (DataSize, error) //perm:read
// ClientListTransfers returns the status of all ongoing transfers of data
ClientListDataTransfers(ctx context.Context) ([]DataTransferChannel, error) //perm:write
ClientDataTransferUpdates(ctx context.Context) (<-chan DataTransferChannel, error) //perm:write
// ClientRestartDataTransfer attempts to restart a data transfer with the given transfer ID and other peer
ClientRestartDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error //perm:write
// ClientCancelDataTransfer cancels a data transfer with the given transfer ID and other peer
ClientCancelDataTransfer(ctx context.Context, transferID datatransfer.TransferID, otherPeer peer.ID, isInitiator bool) error //perm:write
// ClientRetrieveTryRestartInsufficientFunds attempts to restart stalled retrievals on a given payment channel
// which are stuck due to insufficient funds
ClientRetrieveTryRestartInsufficientFunds(ctx context.Context, paymentChannel address.Address) error //perm:write

// ClientCancelRetrievalDeal cancels an ongoing retrieval deal based on DealID
ClientCancelRetrievalDeal(ctx context.Context, dealid retrievalmarket.DealID) error //perm:write

// ClientUnimport removes references to the specified file from filestore
// ClientUnimport(path string)

// ClientListImports lists imported files and their root CIDs
ClientListImports(ctx context.Context) ([]Import, error) //perm:write

// ClientListAsks() []Ask

// MethodGroup: State
// The State methods are used to query, inspect, and interact with chain state.
// Most methods take a TipSetKey as a parameter. The state looked up is the parent state of the tipset.
Expand Down Expand Up @@ -938,17 +865,6 @@ type EthSubscriber interface {
EthSubscription(ctx context.Context, r jsonrpc.RawParams) error // rpc_method:eth_subscription notify:true
}

type StorageAsk struct {
Response *storagemarket.StorageAsk

DealProtocols []string
}

type FileRef struct {
Path string
IsCAR bool
}

type MinerSectors struct {
// Live sectors that should be proven.
Live uint64
Expand All @@ -958,55 +874,6 @@ type MinerSectors struct {
Faulty uint64
}

type ImportRes struct {
Root cid.Cid
ImportID imports.ID
}

type Import struct {
Key imports.ID
Err string

Root *cid.Cid

// Source is the provenance of the import, e.g. "import", "unknown", else.
// Currently useless but may be used in the future.
Source string

// FilePath is the path of the original file. It is important that the file
// is retained at this path, because it will be referenced during
// the transfer (when we do the UnixFS chunking, we don't duplicate the
// leaves, but rather point to chunks of the original data through
// positional references).
FilePath string

// CARPath is the path of the CAR file containing the DAG for this import.
CARPath string
}

type DealInfo struct {
ProposalCid cid.Cid
State storagemarket.StorageDealStatus
Message string // more information about deal state, particularly errors
DealStages *storagemarket.DealStages
Provider address.Address

DataRef *storagemarket.DataRef
PieceCID cid.Cid
Size uint64

PricePerEpoch types.BigInt
Duration uint64

DealID abi.DealID

CreationTime time.Time
Verified bool

TransferChannelID *datatransfer.ChannelID
DataTransfer *DataTransferChannel
}

type MsgLookup struct {
Message cid.Cid // Can be different than requested, in case it was replaced, but only gas values changed
Receipt types.MessageReceipt
Expand Down Expand Up @@ -1128,38 +995,6 @@ type MinerPower struct {
HasMinPower bool
}

type QueryOffer struct {
Err string

Root cid.Cid
Piece *cid.Cid

Size uint64
MinPrice types.BigInt
UnsealPrice types.BigInt
PricePerByte abi.TokenAmount
PaymentInterval uint64
PaymentIntervalIncrease uint64
Miner address.Address
MinerPeer retrievalmarket.RetrievalPeer
}

func (o *QueryOffer) Order(client address.Address) RetrievalOrder {
return RetrievalOrder{
Root: o.Root,
Piece: o.Piece,
Size: o.Size,
Total: o.MinPrice,
UnsealPrice: o.UnsealPrice,
PaymentInterval: o.PaymentInterval,
PaymentIntervalIncrease: o.PaymentIntervalIncrease,
Client: client,

Miner: o.Miner,
MinerPeer: &o.MinerPeer,
}
}

type MarketBalance struct {
Escrow big.Int
Locked big.Int
Expand Down Expand Up @@ -1214,25 +1049,6 @@ type MarketDeal struct {
State MarketDealState
}

type RetrievalOrder struct {
Root cid.Cid
Piece *cid.Cid
DataSelector *Selector

// todo: Size/Total are only used for calculating price per byte; we should let users just pass that
Size uint64
Total types.BigInt

UnsealPrice types.BigInt
PaymentInterval uint64
PaymentIntervalIncrease uint64
Client address.Address
Miner address.Address
MinerPeer *retrievalmarket.RetrievalPeer

RemoteStore *RemoteStoreID `json:"RemoteStore,omitempty"`
}

type RemoteStoreID = uuid.UUID

type InvocResult struct {
Expand All @@ -1250,34 +1066,6 @@ type MethodCall struct {
Error string
}

type StartDealParams struct {
Data *storagemarket.DataRef
Wallet address.Address
Miner address.Address
EpochPrice types.BigInt
MinBlocksDuration uint64
ProviderCollateral big.Int
DealStartEpoch abi.ChainEpoch
FastRetrieval bool
VerifiedDeal bool
}

func (s *StartDealParams) UnmarshalJSON(raw []byte) (err error) {
type sdpAlias StartDealParams

sdp := sdpAlias{
FastRetrieval: true,
}

if err := json.Unmarshal(raw, &sdp); err != nil {
return err
}

*s = StartDealParams(sdp)

return nil
}

type IpldObject struct {
Cid cid.Cid
Obj interface{}
Expand Down
Loading
Loading