From b57c0e09df443ebf7c3705b1d362cfaf8a510c38 Mon Sep 17 00:00:00 2001 From: brendalee <2388262+brendalee@users.noreply.github.com> Date: Mon, 13 Dec 2021 15:27:01 -0800 Subject: [PATCH 1/5] Create fip-draft_askv2.md --- FIPS/fip-draft_askv2.md | 99 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 FIPS/fip-draft_askv2.md diff --git a/FIPS/fip-draft_askv2.md b/FIPS/fip-draft_askv2.md new file mode 100644 index 00000000..944b8329 --- /dev/null +++ b/FIPS/fip-draft_askv2.md @@ -0,0 +1,99 @@ +--- +fip: +title: Askv2 Protocol +author: +discussions-to: +status: Draft +type: +category (*only required for Standard Track): +created: <2021-12-13> +spec-sections: + - + - +requires (*optional): +replaces (*optional): +--- + + + +## Simple Summary + +The goal of Askv2 protocol is to help with awareness between the client and storage providers before a deal proposal. Before a client attempts to make a deal, they can send details of their proposed deal, and the storage provider can respond to the proposal (with accept or reject and other details such as price or earliest start epoch). Note that the ask protocol is not designed to handle back and forth deal negotiations. + +## Abstract + +Askv2 aims to improve the existing ask protocol to help the client understand whether or not a storage provider is likely to accept their deal. + +The proposed flow is simple. The client sends an ask request with information about the storage deal they would like to make. The ask response by the storage provider indicates whether or not the deal will be accepted with specifics on conditions (for example, how long the offer is valid for, and what the price to store is). More details on information the client/storage provider will include in the messages can be found in the specification section. + + +## Change Motivation + +Clients need to be able to share details of the storage deal they want to make. Furthermore, they need to know what capabilities and features a Storage Provider supports, so as to understand what Storage Providers they can successfully make a deal with. + +## Specification + +For the ask request, the client provides the following information: +* Client address +* Peer ID +* PayloadCID +* Deal piece size +* Deal duration +* Deal start epoch +* Verified or unverified deal +* Fast retrieval required or not +* Transfer protocol + - Need clearly defined transfer protocols (for example, graphsync, physical, etc.) + - Option for client to specify additional transfer protocols + - Will have a set of defined protocols, but allow SPs to add more +* Message freeform text +* Signature by client + +For the response, the provider will respond with the following information: +* Will accept or reject the deal +* Rejection code + - Need clearly defined rejection codes + - Start with HTTP codes and build from there + - Option for storage provider to specify additional rejection codes +* Price per GB per epoch + - Single price field +* How long the offer is valid for + - Expiry time + - Not binding, just for client convenience +* Start epoch of deal +* Message freeform text + +## Design Rationale + +TBD + +## Backwards Compatibility + +TBD + +## Test Cases + +TBD + +## Security Considerations + +TBD + +## Incentive Considerations + +N/A + +## Product Considerations + +One of the main experiences we want to improve is storage dealmaking and overall Filecoin storage reliability. Askv2 improvements aim to help with the following: +- Better information on Storage Provider capabilities before client attempts to make a storage deal +- Easier to filter which Storage Providers will accept a client’s storage deals +- Increase storage deal success rate + + +## Implementation + +TBD + +## Copyright +Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). From b5517ddbd32d13ea52f9f7946c4b8d266f9ad007 Mon Sep 17 00:00:00 2001 From: brendalee <2388262+brendalee@users.noreply.github.com> Date: Fri, 17 Dec 2021 09:33:11 -0800 Subject: [PATCH 2/5] Update FIPS/fip-draft_askv2.md Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com> --- FIPS/fip-draft_askv2.md | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/FIPS/fip-draft_askv2.md b/FIPS/fip-draft_askv2.md index 944b8329..16350fd4 100644 --- a/FIPS/fip-draft_askv2.md +++ b/FIPS/fip-draft_askv2.md @@ -1,17 +1,14 @@ --- fip: -title: Askv2 Protocol -author: -discussions-to: +title: Storage Ask Protocol v2 Standard +author: Brenda Lee (@brendalee), @Jiaying Wang (@jennijuju) , Why (@whyrusleeping), Jimmy Lee(@jimmylee) +discussions-to: status: Draft -type: -category (*only required for Standard Track): +type: Technical +category (*only required for Standard Track): Interface created: <2021-12-13> spec-sections: - - - - -requires (*optional): -replaces (*optional): + - 2.7.1 (AskProtocol & Storage Ask) --- From 0e60246a3ce37ad22e73053bfb32c205233965d5 Mon Sep 17 00:00:00 2001 From: brendalee <2388262+brendalee@users.noreply.github.com> Date: Fri, 17 Dec 2021 09:33:49 -0800 Subject: [PATCH 3/5] Update FIPS/fip-draft_askv2.md Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com> --- FIPS/fip-draft_askv2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FIPS/fip-draft_askv2.md b/FIPS/fip-draft_askv2.md index 16350fd4..25820e5a 100644 --- a/FIPS/fip-draft_askv2.md +++ b/FIPS/fip-draft_askv2.md @@ -15,7 +15,7 @@ spec-sections: ## Simple Summary -The goal of Askv2 protocol is to help with awareness between the client and storage providers before a deal proposal. Before a client attempts to make a deal, they can send details of their proposed deal, and the storage provider can respond to the proposal (with accept or reject and other details such as price or earliest start epoch). Note that the ask protocol is not designed to handle back and forth deal negotiations. +The goal of AskProtocol v2 is to help with the [discovery](https://spec.filecoin.io/#section-systems.filecoin_markets.storage_market.discovery) between the client and storage providers before making a storage deal proposal. As the first step of the SP discovery, clients can send details of their proposed deal to the storage provider, and the storage provider should be able to respond to the proposal (with accept or reject, price and additional service offer). Note that the ask protocol is **not** designed to handle back and forth deal negotiations. ## Abstract From 842f7266f57456ae726aa2dcdbe8a672e2914990 Mon Sep 17 00:00:00 2001 From: brendalee <2388262+brendalee@users.noreply.github.com> Date: Fri, 17 Dec 2021 09:34:24 -0800 Subject: [PATCH 4/5] Update FIPS/fip-draft_askv2.md Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com> --- FIPS/fip-draft_askv2.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FIPS/fip-draft_askv2.md b/FIPS/fip-draft_askv2.md index 25820e5a..336eae00 100644 --- a/FIPS/fip-draft_askv2.md +++ b/FIPS/fip-draft_askv2.md @@ -19,9 +19,9 @@ The goal of AskProtocol v2 is to help with the [discovery](https://spec.filecoin ## Abstract -Askv2 aims to improve the existing ask protocol to help the client understand whether or not a storage provider is likely to accept their deal. +AskProtocol v2 aims to improve the existing AskProtocol to help the client understand whether or not a storage provider is likely to accept their deal before they send a signed proposal. -The proposed flow is simple. The client sends an ask request with information about the storage deal they would like to make. The ask response by the storage provider indicates whether or not the deal will be accepted with specifics on conditions (for example, how long the offer is valid for, and what the price to store is). More details on information the client/storage provider will include in the messages can be found in the specification section. +The proposed flow is simple. The client sends an ask request with information about the storage deal they would like to make. The ask response by the storage provider indicates whether or not the deal will be accepted with specifics on conditions (for example, how long the offer is valid for, and what the price to store is). More details about the AskProtocol v2 request/response can be found in the specification section. ## Change Motivation From 8e4e96363ccc5e6695272d6324b14d50563ec194 Mon Sep 17 00:00:00 2001 From: brendalee <2388262+brendalee@users.noreply.github.com> Date: Fri, 17 Dec 2021 09:34:45 -0800 Subject: [PATCH 5/5] Update FIPS/fip-draft_askv2.md Co-authored-by: Jiaying Wang <42981373+jennijuju@users.noreply.github.com> --- FIPS/fip-draft_askv2.md | 43 ++++++++++++++--------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/FIPS/fip-draft_askv2.md b/FIPS/fip-draft_askv2.md index 336eae00..2d8d7452 100644 --- a/FIPS/fip-draft_askv2.md +++ b/FIPS/fip-draft_askv2.md @@ -30,35 +30,20 @@ Clients need to be able to share details of the storage deal they want to make. ## Specification -For the ask request, the client provides the following information: -* Client address -* Peer ID -* PayloadCID -* Deal piece size -* Deal duration -* Deal start epoch -* Verified or unverified deal -* Fast retrieval required or not -* Transfer protocol - - Need clearly defined transfer protocols (for example, graphsync, physical, etc.) - - Option for client to specify additional transfer protocols - - Will have a set of defined protocols, but allow SPs to add more -* Message freeform text -* Signature by client - -For the response, the provider will respond with the following information: -* Will accept or reject the deal -* Rejection code - - Need clearly defined rejection codes - - Start with HTTP codes and build from there - - Option for storage provider to specify additional rejection codes -* Price per GB per epoch - - Single price field -* How long the offer is valid for - - Expiry time - - Not binding, just for client convenience -* Start epoch of deal -* Message freeform text +### Client Request of AskProtocol v2 + +For the AskProtocol v2 request, the client provides the following information: + +```go= +type StorageAskRequest struct { + ClientAddress Address + PeerId *abi.PeerID + PieceSize abi.PaddedPieceSize + Duration int64 + StartEpoch abi.ChainEpoch + Verified bool + TransferProtocol string + Message string ## Design Rationale