scrtlabs / EnigmaBounties

Secret Contract samples
5 stars 2 forks source link

Secret Data Validation #4

Closed ainsleys closed 5 years ago

ainsleys commented 5 years ago

Request

Enigma Secret Contracts enable dApps to compute over encrypted data. One simple use-case for this is validating the authenticity of a data set. This simple contract just checks to see if encrypted data inputs from different users are equivalent or not.

Solution Description

This solution should enable User A to upload a small dataset (email, phone number), and also enable a second user to submit their own dataset (with the same fields). Then, the secret contract should compare the two data sets. If they are equivalent, the secret contract should send an encrypted affirmation of this to User B, who has now verified their data set against user A. If they are not equivalent, the user should receive a false response.

This will involve:

Implementation Details and Data Flow

  1. User A submits data via a UI (email, phone number).
  2. This data submission is encrypted locally via Enigma-JS and submitted to the secret contract.
  3. User B submits data via a UI (email, phone number)
  4. This data submission is encrypted locally via Enigma-JS and submitted to the secret contract.
  5. The secret contract (after receiving both datasets) executes a comparison to check equivalency.
  6. The secret contract returns either a False or True response.
  7. If data are equivalent, User B and User A are notified via the UI.
  8. If data are not equivalent, both users are notified via the UI.

Success

A working application, which should have a simple React-based UI (or similar), enable the solution, and handle failure (i.e., displays a meaningful message when improperly formatted data is submitted).

Other Deliverables

Bounty Selection

For this first bounty round, the process works as follows:

  1. Developer / team submits a “pre-submission for approval” for a bounty
  2. Enigma reviews submissions, and selects an applicant (we don’t have a firm timeline for this, but hope to work quickly)
  3. Applicant completes the task satisfactorily and receives the bounty

If the task is not completed, or applicant is unable to continue work in a timely manner, Enigma will select another applicant.

To complete a pre-submission for approval, First, comment on this issue within github and indicate your interest. Then, please also complete this application form.

Resources

These materials should help you get started: Enigma Discovery Documentation Developer Quickstart Guide Secret Contracts Walkthrough Enigma-JS Walkthrough

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 900.0 ENG (430.74 USD @ $0.48/ENG) attached to it as part of the enigmampc fund.

izokay commented 5 years ago

I am interested.

thaodt commented 5 years ago

Hi @ainsleys , i'm arookie on Enigma forum & i'm interested with this one.

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work has been started.

These users each claimed they can complete the work by 2 years, 4 months ago. Please review their action plans below:

1) nionis has applied to start work _(Funders only: approve worker | reject worker)_.

Hi, I'm Thảo Đinh (aka @arookie on Enigma forum), currently working as a backend engineer & be a Data enthusiast. Recently I start working on ETH dev (Solidity & Rust) and also found Enigma for privacy solution. I'm really interested in it.

Could you please let me join this program? Thank you. 3) bshevchenko has been approved to start work.

Will do in a most accurate way :)

Learn more on the Gitcoin Issue Details page.

gitcoinbot commented 5 years ago

@bshevchenko Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

gitcoinbot commented 5 years ago

@bshevchenko Hello from Gitcoin Core - are you still working on this issue? Please submit a WIP PR or comment back within the next 3 days or you will be removed from this ticket and it will be returned to an ‘Open’ status. Please let us know if you have questions!

Funders only: Snooze warnings for 1 day | 3 days | 5 days | 10 days | 100 days

bshevchenko commented 5 years ago

@gitcoinbot https://github.com/bshevchenko/enigma-data-validation it's done just need some gas to submit work via gitcoin contacted @ainsleys

bshevchenko commented 5 years ago

Contract compares submitted dataset with the previous one. Frontend is based on discovery CLI preset and article, but little bit refined.

bshevchenko commented 5 years ago

The reason why there is no list of datasets is the same as why we are not notifying user A – smart contract or some other storage is needed for that, that would serve data and push notification to subscribed user A. This was discussed with @ainsleys couple of days ago

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 900.0 ENG (418.77 USD @ $0.47/ENG) has been submitted by:

  1. @bshevchenko

@ainsleys please take a look at the submitted work:


gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 900.0 ENG (418.77 USD @ $0.47/ENG) attached to this issue has been approved & issued to @bshevchenko.

ainsleys commented 5 years ago

This bounty is close now! Thanks everyone who applied (please keep an eye out for new bounties coming soon), and to @bshevchenko for the quick turnaround.

We'll also be open-sourcing this completed bounty shortly.