From 0de51d23cc3b0d989d9ed30ae33ae64dd1aa87b3 Mon Sep 17 00:00:00 2001 From: hansol-medi Date: Wed, 4 Jan 2023 13:49:12 +0900 Subject: [PATCH 1/3] tmp --- .../1-dep-specs/3-data-provider-consent.md | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md b/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md index e69de29b..01d29b7b 100644 --- a/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md +++ b/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md @@ -0,0 +1,65 @@ +# Data Provider Consent + +- Status: Draft +- Crated: 2023-01-04 +- Modified: 2023-01-04 +- Authors + - Youngjoon Lee + - Gyuguen Jang + - Hansol Lee + - Myongsik Gong + - Inchul Song + + +## Synopsis + +This document is about providing data through [DEP](../../1-users/3-data-exchange/0-about-dep.md). +Before providers provide their data to consumers, the data must be validated from oracle whether the data is the correct data specified in the deal. +Providers can send a request for validation to one of the oracles registered in panacea, and the oracle will validate the data using confidential computing without any exposure of the data. +For the data that has been validated, oracle will issue a certificate to the provider. +Providers can consent to provide their data by submitting the certificate to panacea, and will be rewarded by providing the data. +In all of these processes, the data is transmitted with encryption and stored off-chain. + +### Motivation + +deal에 명시된 + +- 올바른 데이터의 제공 (data provision abusing) +- privacy preserving +- provider의 제공 동의 +- data provision에 따른 투명한 보상 분배 + +### Definitions + +- `Data Provider`, `Data Consumer`, and `Oracle` are defined in [User Flow](./1-user-flow.md) +- `Deal` +- `confidential computing` +- `certificate` + +## Technical Specification + + + +## Backwards Compatibility + +Not applicable. + +## Forwards Compatibility + +vp + +## Example Implementations + +Coming soon. + +## Other Implementations + +None at present. + +## History + +- 2023-01-04: Initial draft finished + +## Copyright + +All content herein is licensed under [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0). \ No newline at end of file From 044d160885d3c0e10c104cfc96ed9aa2cb55b758 Mon Sep 17 00:00:00 2001 From: H4NLee Date: Wed, 4 Jan 2023 15:44:56 +0900 Subject: [PATCH 2/3] docs: add data provider consent spec for protocol devs --- .../1-dep-specs/3-data-provider-consent.md | 51 +++++++++++++++---- 1 file changed, 41 insertions(+), 10 deletions(-) diff --git a/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md b/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md index 01d29b7b..430b1523 100644 --- a/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md +++ b/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md @@ -22,23 +22,54 @@ In all of these processes, the data is transmitted with encryption and stored of ### Motivation -deal에 명시된 - -- 올바른 데이터의 제공 (data provision abusing) -- privacy preserving -- provider의 제공 동의 -- data provision에 따른 투명한 보상 분배 +Data should be provided by providers based on their data ownership, and the reward should be distributed in transparent and fair manner. +To do so, providers use digital signature as consent to provide the data. ### Definitions - `Data Provider`, `Data Consumer`, and `Oracle` are defined in [User Flow](./1-user-flow.md) -- `Deal` -- `confidential computing` -- `certificate` +- `Deal` is defined in [Data Deal](./2-data-deal.md) +- `Certificate`: a certificate that the data is validated to be provided to the deal, which is issued by oracle. ## Technical Specification +Before provider provides the data to deal, data should be validated by the oracle. +If the data is successfully validated to be provided, the provider will have a `Certificate` like below (more about [Data Validation](./4-data-validation.md)): + +```proto +message Certificate { + UnsignedCertificate unsigned_certificate = 1; + bytes signature = 2; +} + +message UnsignedCertificate { + string cid = 1; + string unique_id = 2; + string oracle_address = 3; + uint64 deal_id = 4; + string provider_address = 5; + string data_hash = 6; +} +``` + +Using the `Certificate`, provider can submit consent to provide the data. +```proto +message MsgSubmitConsent { + Consent consent = 1; +} + +message Consent { + Certificate certificate = 1; +} +``` + +When this consent is submitted, blockchain will check: +- if the data is provided by the owner of the data +- if the data is validated by a registered and active oracle +- if the data is provided in duplicate + +If all checks pass, rewards are distributed to the provider and oracle(more about [incentive](./6-incentives.md)). ## Backwards Compatibility @@ -46,7 +77,7 @@ Not applicable. ## Forwards Compatibility -vp +Not applicable. ## Example Implementations From 80a836fe34a8919bd92ca7a435f907f3c3944033 Mon Sep 17 00:00:00 2001 From: H4NLee Date: Thu, 5 Jan 2023 09:46:07 +0900 Subject: [PATCH 3/3] review applied --- .../3-protocol-devs/1-dep-specs/3-data-provider-consent.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md b/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md index 430b1523..72a99850 100644 --- a/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md +++ b/.gitbook/3-protocol-devs/1-dep-specs/3-data-provider-consent.md @@ -15,9 +15,9 @@ This document is about providing data through [DEP](../../1-users/3-data-exchange/0-about-dep.md). Before providers provide their data to consumers, the data must be validated from oracle whether the data is the correct data specified in the deal. -Providers can send a request for validation to one of the oracles registered in panacea, and the oracle will validate the data using confidential computing without any exposure of the data. -For the data that has been validated, oracle will issue a certificate to the provider. -Providers can consent to provide their data by submitting the certificate to panacea, and will be rewarded by providing the data. +Providers can send a request for validation to one of the oracles registered in Panacea, and the oracle will validate the data using confidential computing without any exposure of the data. +As a result of a data validation, oracle will issue a certificate to the provider. +Providers can consent to provide their data by submitting the certificate to Panacea, and will be rewarded by providing the data. In all of these processes, the data is transmitted with encryption and stored off-chain. ### Motivation