ConsenSysMesh / guilherme-academy-project

Academy project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ConsenSys Academy Final Project - August 2018

Developer: Guilherme Campos

Email: guilherme.campos@consensys.net

Purpose of project

Internet-based volunteer computing project much like SETI@home lack an incentivization method for participants. Given that these sort of projects rely on the production of mathematical proofs by the volunteer's computers, it would be easy to track and trace who found what solution, thus being able to reward those participants

How does it work

Each proof provided by the participants as 4 states: Generated, Acknowledged, Verified, Discarded. The participant sends a proof that gets storade in the smart contract, and from that moment on the platform admin can move the proof to different states. If the proof reaches a Verified state, a payout should be issued to the user (not implemented)

All proofs are stored in IPFS, using Infura's gateway

How to use the project

Given the PoC nature of the project, all interactions are built in the same page. Changing accounts with Metamask will allow you to interact with the code in different ways. Account[0] is considered the platform admin account, which has power-user type of permissions. All other accounts can be considered platform user's accounts

How to set up

Testing

run truffle test

Running
  1. run ganache-cli
  2. run truffle migtrate
  3. run npm run dev
  4. load ganache-cli keys into Metamask
Using
  1. Open the browser, and select a different account with Metamask - different from account[0]
  2. Click Rnd
  3. Click Add Proof - confirm transaction using Metamask
  4. Change to account[0] - admin account
  5. Press Aknowledge on the Proof card - confirm transaction using Metamask
  6. Press either Verify or Discard on the Proof card - confirm transaction using Metamask

The project has been showing some problems when running. Sometimes the front-end, or even Metamask, won't connect correctly to ganache. I haven't figured the root cause of this, and normally the fix is to re do the steps above - make sure in run them in that order. Sometimes it also replicates the same proof in the front-end.

What's missing

EthNPM

At least a "Owned.sol" package could have been used for this implementation. The Lock mechanism could have also been implemented with existing packages, I imagine

Payout

This would be done through a specific token created for this platform. Given the scope of this project, that was not implemented.

About

Academy project

License:Apache License 2.0


Languages

Language:JavaScript 97.7%Language:HTML 1.6%Language:CSS 0.8%