noteId: "1e61fc70226911ea85c0fd637b375b0e" tags: []
1.) Install dependencies
yarn install
yarn --cwd household-ui/ install
2.) Setup ZoKrates contract
yarn setup-zokrates
yarn update-contract-bytecodes
3.) Start the ethereum parity chain:
cd parity-authority
docker-compose up -d --build
ethstats is available at: http://localhost:3001
4.) Configure the contracts using truffle migrations:
yarn migrate-contracts-authority
5.) Start the Netting Entity:
yarn run-netting-entity -i 60000
6.) Create two databases for both household servers:
# Assumes project root directory
docker-compose -f mongo/docker-compose.yml up -d
7.) Start two household servers:
# Household 1
yarn run-server \
-a 0x00aa39d30f0d20ff03a22ccfc30b7efbfca597c2 \
-P node1 -n authority_1 \
-d mongodb://127.0.0.1:27011
# Household 2
yarn run-server -p 3003 \
-a 0x002e28950558fbede1a9675cb113f0bd20912019 \
-P node2 -n authority_2 \
-d mongodb://127.0.0.1:27012
Note: Depending on your network settings an extra flag -h 127.0.0.1
could be needed for both households.
8.) Start a mocked sensor for each household:
# Household 1 with positive energy balance
yarn run-sensor -p 3002 -e +
# Household 2 with negative energy balance
yarn run-sensor -p 3003 -e -
9.) Start two household-ui applications:
# Household 1
yarn --cwd household-ui/ start
# Household 2
REACT_APP_HSS_PORT=3003 \
PORT=3010 \
yarn --cwd household-ui/ start
yarn test-contracts
to test contractsyarn test-parity-docker
to test docker parity authority setupyarn test-helpers
to test helper functionsyarn test-utility-js
to test off-chain utility functionalityyarn utility-benchmark
to benchmark the settle
method of the Utility
contractyarn update-contract-bytecodes
to update the contracts code in the chain.json
fileyarn setup-zokrates
to generate a new Verifier
contractyarn format-all
fix linting issuesyarn generate-prooving-files [# Prod] [# Cons]
generates required files for given number of producers and consumers