Skip to content

Commit

Permalink
remove travis (#317)
Browse files Browse the repository at this point in the history
* remove travis

* update version badge
  • Loading branch information
Stephane Gosselin authored Dec 21, 2019
1 parent d3ee7eb commit f6f6175
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 35 deletions.
2 changes: 0 additions & 2 deletions .coveralls.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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,
Expand All @@ -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 |
| ------------------------------------------ | --------------------- | ------------------- |
Expand All @@ -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`
Expand All @@ -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()`
Expand All @@ -104,26 +107,28 @@ 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)`

---

## 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)

0 comments on commit f6f6175

Please sign in to comment.