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

Expose control over deal decision logic #1920

Closed
4 tasks done
whyrusleeping opened this issue Jun 4, 2020 · 10 comments
Closed
4 tasks done

Expose control over deal decision logic #1920

whyrusleeping opened this issue Jun 4, 2020 · 10 comments
Labels

Comments

@whyrusleeping
Copy link
Member

whyrusleeping commented Jun 4, 2020

We need to expose some controls for the storage miner over their deal decision logic. Namely, we should be able to configure some parameters about deal auto acceptance, setting an ask is already there, but some additional things we need are:

@whyrusleeping
Copy link
Member Author

Additionally, we should allow miners to have a list of content CIDs they won't store or serve retrieval requests for. This may be required for miners to comply with local law enforcement requests (note that which lists to respect and which items to block are entirely up to the miner operator)

@laser
Copy link
Contributor

laser commented Jun 9, 2020

Notes

This PR in go-fil-markets (now merged) adds a configuration option to the retrieval provider which allows the node to register a DealDecider, which is essentially a predicate to run on any ProviderDealState for purposes of accepting/rejecting a retrieval proposal.

There exists an equivalent bit of software for the storage provider, too.

@laser
Copy link
Contributor

laser commented Jun 10, 2020

Also: I am working on Ability to halt deal making (storage or retrieval independently) [ P0 ] now.

This PR needs merging first. merged

@arajasek
Copy link
Contributor

Hmm, for the CLI, I'd propose having a single command, call it selection (or a better name). It takes one input parameter, that can be "accept", "reject", or "manual". It also takes a series of flags, such as --offline. It can also take a --all, which would trigger all the options.

So, something like ./lotus-storage-miner market selection reject --offline would set us to reject all offline deals, while ./lotus-storage-miner market selection manual --all would set all incoming deals to need to be manually approved / rejected.

This would require some overhaul of the work in #1994, but not too much. Very much scope to be improved, I'm sure.

@laser
Copy link
Contributor

laser commented Jun 19, 2020

Additionally, we should allow miners to have a list of content CIDs they won't store or serve retrieval requests for. This may be required for miners to comply with local law enforcement requests (note that which lists to respect and which items to block are entirely up to the miner operator)

Note: This has been addressed in this yet-to-be-merged PR. merged

@laser
Copy link
Contributor

laser commented Jun 22, 2020

@arajasek

Manipulating config

Hmm, for the CLI, I'd propose having a single command, call it selection (or a better name).

I tweaked your proposal a little in hopes of making the various states straightforward (I eliminated the --all flag). To illustrate a potential UX, here's a table containing sequences of commands as well as the system's response to (after the commands have been run) receiving a storage deal proposal:

Note Command Seq. Offline Deal Online Deal
1 ./lotus-storage-miner market selection reset consider consider
./lotus-storage-miner market selection reject --online consider reject
./lotus-storage-miner market selection reject --offline reject consider
./lotus-storage-miner market selection reject --offline
./lotus-storage-miner market selection reject --online
reject reject
./lotus-storage-miner market selection reject --offline
./lotus-storage-miner market selection manual --online
reject manual
./lotus-storage-miner market selection reject --online
./lotus-storage-miner market selection manual --offline
manual reject
./lotus-storage-miner market selection manual --online
./lotus-storage-miner market selection manual --offline
manual manual
2 ./lotus-storage-miner market selection manual --online
./lotus-storage-miner market selection reject --online
consider reject
2 ./lotus-storage-miner market selection reject --online
./lotus-storage-miner market selection manual --online
consider manual

1: The selection reset command reverts the storage miner to the "consider all storage proposals" (default) state.
2. The second command wins.

Reading config

We'll also need a ./lotus-storage-miner market selection show command:

./lotus-storage-miner market selection show
offline deals: manual
online deals: reject
./lotus-storage-miner market selection show
offline deals: consider
online deals: manual

@arajasek
Copy link
Contributor

@laser Yup, this sounds totally good to me! Thank youuuu :)

@TippyFlitsUK
Copy link
Contributor

Hi @whyrusleeping

This issue has not been updated in some time. Should we close it or keep it open?

@TippyFlitsUK TippyFlitsUK added kind/enhancement Kind: Enhancement need/author-input Hint: Needs Author Input area/markets Area: Markets area/markets/provider labels Mar 30, 2022
@github-actions
Copy link

github-actions bot commented Apr 3, 2022

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 24 hours.

@github-actions
Copy link

github-actions bot commented Apr 4, 2022

This issue was closed because it is missing author input.

@github-actions github-actions bot closed this as completed Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants