Replies: 2 comments 2 replies
-
a few questions:
https://github.com/raulk/fil-dynretprice/blob/main/main.go as an example for incomplete json returned.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Do miner get paid only after a successful retrieval? What if client always responds with failed transfer to avoid payments? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Retrieval pricing
Lotus allows you to set different strategy to calculate the quoted price of a retrieval deal:
default: Lotus is shipped with an in-built default pricing policy that offers free retrievals for Verified Unsealed deals. Storage miners can still charge clients for data-transfer if they wish to by turning off free data-transfer for verified deals(
VerifiedDealsFreeTransfer
) in the Miner config. Miners can also charge clients for Unsealing if they don't have an Unsealed sector file to retrieve the deal payload from.external: Storage providers can configure an external pricing script that will be used instead of the default pricing policy to price retrieval deals. The script will be called with the relevant deal parameters and the output quote will be used by Lotus to price deals.
Using the default retrieval pricing policy
Ask Store
(set via thelotus retrieval-deals set-ask
CLI command) to price all retrieval deals.VerifiedDealsFreeTransfer
flag to false in theDealMaking.RetrievalPricing
section of the config as shown below.Using the external retrieval pricing policy
PricingInput
as the input and outputs a json marshalledAsk
i.e. the quote. ThePricingInput
struct is defined as follows:The output
Ask
is defined as:DealMaking.RetrievalPricing
strategy to "external" and needs to be given the absolute path of the pricing script as shown below:This example in go sets the ask price of the deals from certain clients to 0.003 FIL/Byte and unseal price to be zero. To use the script:
go build -o retrievalpricing ../fil-dynretprice/main.go
, whereretrievalpricing
is the built script file name.Path
ofDealmaking.RetrievalPricing.External
to be the absolute path ofretrievalpricing
.Reference: #6175 (comment) by @aarshkshah1992
Beta Was this translation helpful? Give feedback.
All reactions