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

implement toggling of online/offline storage/retrieval deals #2154

Merged
merged 4 commits into from
Jul 1, 2020
Merged

implement toggling of online/offline storage/retrieval deals #2154

merged 4 commits into from
Jul 1, 2020

Conversation

laser
Copy link
Contributor

@laser laser commented Jun 26, 2020

Makes incremental progress towards #1920.

What's in this PR?

This PR allows storage miners to toggle consideration (auto-rejection) of storage and retrieval deals based on whether the deals expect the data to be transferred on or offline. Note that there doesn't yet exist a concept of offline retrieval deals, so that particular configuration option is a noop.

Usage

From the miner side

12:45 $ lotus-storage-miner retrieval-deals selection list
consider online retrieval deals: true
consider offline retrieval deals: true
✔ ~/dev
12:45 $ lotus-storage-miner retrieval-deals selection reject --online
✔ ~/dev
12:45 $ lotus-storage-miner retrieval-deals selection list
consider online retrieval deals: false
consider offline retrieval deals: true
✔ ~/dev
12:45 $ lotus-storage-miner retrieval-deals selection reset
✔ ~/dev
12:45 $ lotus-storage-miner retrieval-deals selection list
consider online retrieval deals: true
consider offline retrieval deals: true
12:45 $ lotus-storage-miner retrieval-deals selection reject --online
✔ ~/dev

From the client side

✔ ~/dev
12:45 $ lotus client retrieve bafkreic4vyeyy4u7jilvv7iq2s6blhxfzmlo44lxbdgozyknpwph4u33ri /var/folders/8h/gmmbhq1s5tb8sk9011sy2wkw0000gn/T/localnet.XXXX.FcH62cM6/retrieved-data.txt
2020-06-26T12:46:13.856-0700    WARN    main    lotus/main.go:81        Retrieval Failed:
    github.com/filecoin-project/lotus/cli.glob..func19
        /var/folders/8h/gmmbhq1s5tb8sk9011sy2wkw0000gn/T/localnet.XXXX.FcH62cM6/build/cli/client.go:473
  - RetrieveUnixfs: Retrieval Proposal Rejected: deal rejected: miner is not accepting online retrieval deals

@laser laser changed the title [WIP] implement toggling of online/offline storage/retrieval deals implement toggling of online/offline storage/retrieval deals Jun 26, 2020
@magik6k magik6k merged commit 8f0e040 into filecoin-project:master Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants