Using filters for storage and retrieval deals
Storage providers might demand very precise and dynamic control over a combination of deal parameters.
Boost, similarly to Lotus, provides two IPC hooks allowing you to name a command to execute for every deal before the storage provider accepts it:
Filter
for storage deals.RetrievalFilter
for retrieval deals.
The executed command receives a JSON representation of the deal parameters, as well as the current state of the sealing pipeline, on standard input, and upon completion, its exit code is interpreted as:
0
: success, proceed with the deal.non-0
: failure, reject the deal.
The most trivial filter rejecting any retrieval deal would be something like:
RetrievalFilter = "/bin/false"
.
/bin/false
is binary that immediately exits with a code of 1
.
This Perl script lets the miner deny specific clients and only accept deals that are set to start relatively soon.
You can also use a third party content policy framework like bitscreen
by Murmuration Labs, or CID gravity:
Here is a sample JSON representation of the input sent to the deal filter:
Last updated