From f6f6175cb16994ff3a52bfb6ee02bf71da9f80bf Mon Sep 17 00:00:00 2001 From: Stephane Gosselin Date: Sat, 21 Dec 2019 10:57:10 -0500 Subject: [PATCH] remove travis (#317) * remove travis * update version badge --- .coveralls.yml | 2 -- .travis.yml | 18 ------------------ README.md | 35 ++++++++++++++++++++--------------- 3 files changed, 20 insertions(+), 35 deletions(-) delete mode 100644 .coveralls.yml delete mode 100644 .travis.yml diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index c3fab56a..00000000 --- a/.coveralls.yml +++ /dev/null @@ -1,2 +0,0 @@ -service_name: travis-pro -repo_token: M8w8oOKbt8skkA3TETfotgmxErFgP010n diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 018bbf09..00000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -dist: xenial -sudo: required -language: node_js -node_js: - - "11" -cache: - yarn: true - directories: - - node_modules -before_install: - - sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg - - echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list - - sudo apt-get update -qq - - sudo apt-get install -y -qq yarn -install: - - yarn install -script: - - bash run-ganache-tests.sh diff --git a/README.md b/README.md index 7ecc715a..469b8089 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # Erasure Protocol -[![Build Status](https://travis-ci.com/erasureprotocol/erasure-protocol.svg?branch=master)](https://travis-ci.com/erasureprotocol/erasure-protocol) [![Build Status](https://github.com/erasureprotocol/erasure-protocol/workflows/CI/badge.svg)](https://github.com/erasureprotocol/erasure-protocol/actions) - +[![version](https://img.shields.io/badge/version-1.2.x-blue)](https://github.com/erasureprotocol/erasure-protocol/releases/tag/v1.2.0) ## Philosophy of Erasure @@ -19,6 +18,7 @@ The Erasure Protocol builds on the three primitives of an economic relationship: The hash which is submitted to Erasure is called a `ProofHash`. A proofhash should be generated by taking the SHA-256 hash of the submitted data prepended with a user address and a user generated salt to avoid potential impersonation or snooping attacks. For v1.2.0 of the protocol, the proofhash should follow the following format: + ``` proofhash_v120 = sha256(JSON({ creator: userAddress, @@ -42,7 +42,7 @@ Creating a Griefing agreement is as simple as having two parties agree on their Take for example an agreement between Alice and Bob. Alice is anonymous and has not built a track record. She stakes 500 NMR and selects a ratio of 0.5. Bob, however, has revealed his real-world identity and has an excellent track record. As such, he stakes 100 NMR and selects a ratio of 1.0. -*Please note: punishments are paid from pre-committed NMR stake but costs are paid from liquid NMR tokens.* +_Please note: punishments are paid from pre-committed NMR stake but costs are paid from liquid NMR tokens._ | Action | Resulting Alice stake | Resulting Bob stake | | ------------------------------------------ | --------------------- | ------------------- | @@ -68,18 +68,20 @@ So far, the registries developed are: Using the Spawner library, every item on Erasure is created as a clone of a previously deployed template. We call these **Clone Factories**. Every clone is also registered in a registry which provides a single source of truth on the status of the protocol. -![Clone Factory](docs/clone-factory.png "Clone Factory") +![Clone Factory](docs/clone-factory.png 'Clone Factory') --- ## Example Usage of ErasureClient -*New User Registration* +_New User Registration_ + - New user connects to `ErasureClient` - `ErasureClient` generates asymmetric encryption keys `PubKey`, `PrivKey` - `ErasureClient` uploads `PubKey` to `Erasure_Users` -*Creating a Post* +_Creating a Post_ + - `Seller` creates a `Feed` using `Feed_Factory.create()` with optional params - `Seller` uploads `rawdata` to `ErasureClient_Seller` - `ErasureClient_Seller` generates symmetric encryption key `SymKey` @@ -94,7 +96,8 @@ Using the Spawner library, every item on Erasure is created as a clone of a prev - `ErasureClient_Seller` uploads `encryptedData` to ipfs at `multihashformat(encryptedDatahash)` - `ErasureClient_Seller` creates a `Post` using `Feed.submitHash(proofhash)` -*Selling a Post* +_Selling a Post_ + - `Seller` creates `Escrow` using `CountdownGriefingEscrow_Factory.create()` with mandatory params - `ErasureClient_Seller` deposits the required stake using `Escrow.depositStake()` - `Buyer` deposits the required payment using `Escrow.depositPayment()` @@ -104,16 +107,17 @@ Using the Spawner library, every item on Erasure is created as a clone of a prev - `ErasureClient_Seller` finalizes the escrow using `Escrow.finalize()` with creates a griefing agreement `Agreement` - `ErasureClient_Seller` uploads `json_selldata_v120` to ipfs at `multihashformat(sha256(json_selldata_v120))` - `ErasureClient_Seller` submits `json_selldata_v120` to buyer using `Escrow.submitData(multihashformat(sha256(json_selldata_v120)))` -- `ErasureClient_Buyer` retrieves `encryptedSymKey_Buyer` from `Escrow` contract -- `ErasureClient_Buyer` retrieves `encryptedData` from `ipfs.proofhash.encryptedDatahash` -- `ErasureClient_Buyer` retrieves `datahash` from `ipfs.proofhash.datahash` -- `ErasureClient_Buyer` retrieves `keyhash` from `ipfs.proofhash.keyhash` +- `ErasureClient_Buyer` retrieves `encryptedSymKey_Buyer` from `Escrow` contract +- `ErasureClient_Buyer` retrieves `encryptedData` from `ipfs.proofhash.encryptedDatahash` +- `ErasureClient_Buyer` retrieves `datahash` from `ipfs.proofhash.datahash` +- `ErasureClient_Buyer` retrieves `keyhash` from `ipfs.proofhash.keyhash` - `ErasureClient_Buyer` computes `SymKey = PrivKey_Buyer.decrypt(encryptedSymKey_Buyer)` - `ErasureClient_Buyer` computes `rawdata = SymKey.decrypt(encryptedData)` -- `ErasureClient_Buyer` validates `keyhash` matches `sha256(SymKey)` -- `ErasureClient_Buyer` validates `datahash` matches `sha256(rawdata)` +- `ErasureClient_Buyer` validates `keyhash` matches `sha256(SymKey)` +- `ErasureClient_Buyer` validates `datahash` matches `sha256(rawdata)` + +_Revealing a Post_ -*Revealing a Post* - `ErasureClient_Seller` uploads `SymKey` to ipfs at `multihashformat(keyhash)` - `ErasureClient_Seller` uploads `rawdata` to ipfs at `multihashformat(datahash)` @@ -121,9 +125,10 @@ Using the Spawner library, every item on Erasure is created as a clone of a prev ## Deployed contracts -See [latest release](https://github.com/erasureprotocol/erasure-next-contracts/releases). +See [latest release](https://github.com/erasureprotocol/erasure-protocol/releases). ## Packages + - [Erasure Crypto + IPFS Helpers](packages/crypto-ipfs) - [GraphQL API](packages/the-graph) - [Local Dev Environment](packages/testenv)