Skip to content
This repository has been archived by the owner on Oct 9, 2019. It is now read-only.

Commit

Permalink
DOC: updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
lacabra committed Sep 4, 2018
1 parent 40ca205 commit 7ab5483
Showing 1 changed file with 15 additions and 46 deletions.
61 changes: 15 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,29 @@ Surface is part of the Enigma node software stack. The Surface component is resp

## Getting Started


### Prerequisites

This project does things with the Enigma smart contract. To run the tests, the
smart contract must be deployed. At the time of writing, the Enigma contract is
in the `coin-mixer-poc` project.

### Installing

1. Clone the `coin-mixer-poc` project in the same parent folder as the
surface project.
```
git clone git@github.com:enigmampc/surface.git
git clone git@github.com:enigmampc/coin-mixer-poc.git
```

2. Run the development console.
```
sudo npm install -g truffle
cd coin-mixer-poc/dapp
truffle develop
```
This should create a blockchain on port 9545. Please note the first account address and passphrase.

3. Inside truffle, compile and migrate the smart contracts.
```
truffle> compile
truffle> migrate
truffle> test ./test/enigma-utils.js
```
The last line in the console should say `8 passing`. Do not exit the console, open another terminal window
for the next commands.

4. Edit the `src/config.py` file to match your environment. Use the accounts and
passphrase noted in step #2.

5. Create a python virtual environment.
```
cd ..
cd surface
virtualenv --python=/usr/local/Cellar/python3/3.6.4_2/bin/python3 python3
source python3/bin/activate
pip install -r etc/requirements.txt
```

Surface is a component of the Enigma network. To run surface, refer to the deployment instructions for the [Enigma Docker Network](https://github.com/enigmampc/enigma-docker-network).

## Running in simulation mode
Simply pass the flag:

```
--simulation
```

## Running the tests

This project depends on the Enigma smart contract. To run the tests, the
[Enigma smart contract](https://github.com/enigmampc/enigma-contract) must be deployed, and the configuration in he ``src/config.py`` file needs to match your environment (accounts and passphrase from truffle).

Create a python virtual environment.
```
cd ..
cd surface
virtualenv --python=/usr/local/Cellar/python3/3.6.4_2/bin/python3 python3
source python3/bin/activate
pip install -r etc/requirements.txt
```

To run all tests:

```
Expand All @@ -66,7 +35,7 @@ pytest

## Deployment

TBD
Refer to the documentation of the [Enigma Docker Network](https://github.com/enigmampc/enigma-docker-network).

## Built With

Expand Down

0 comments on commit 7ab5483

Please sign in to comment.