From 565fe241c9df43b6c3de7ffb30a6fd12f3276c68 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Thu, 29 Nov 2018 12:32:38 +0100 Subject: [PATCH 01/33] Added individual compose files --- compose-files/aquarius.yml | 17 +++++++++++++++ compose-files/brizo.yml | 19 +++++++++++++++++ compose-files/keeper_contracts.yml | 17 +++++++++++++++ compose-files/mongo.yml | 10 +++++++++ compose-files/network_volumes.yml | 14 ++++++++++++ compose-files/parity_client.yml | 30 ++++++++++++++++++++++++++ compose-files/pleuston.yml | 17 +++++++++++++++ compose-files/secret_store.yml | 31 +++++++++++++++++++++++++++ start_ocean.sh | 34 +++++++++++++++++++----------- 9 files changed, 177 insertions(+), 12 deletions(-) create mode 100644 compose-files/aquarius.yml create mode 100644 compose-files/brizo.yml create mode 100644 compose-files/keeper_contracts.yml create mode 100644 compose-files/mongo.yml create mode 100644 compose-files/network_volumes.yml create mode 100644 compose-files/parity_client.yml create mode 100644 compose-files/pleuston.yml create mode 100644 compose-files/secret_store.yml diff --git a/compose-files/aquarius.yml b/compose-files/aquarius.yml new file mode 100644 index 0000000..f95b771 --- /dev/null +++ b/compose-files/aquarius.yml @@ -0,0 +1,17 @@ +version: '2.1' +services: + aquarius: + image: oceanprotocol/aquarius:${OCEAN_VERSION:-stable} + ports: + - 5000:5000 + networks: + backend: + ipv4_address: 172.15.0.15 + depends_on: + - keeper-contracts + environment: + KEEPER_HOST: http://parity-node + DB_HOSTNAME: mongodb + LOCAL_CONTRACTS: 'true' + volumes: + - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml new file mode 100644 index 0000000..1f03575 --- /dev/null +++ b/compose-files/brizo.yml @@ -0,0 +1,19 @@ +version: '2.1' +services: + brizo: + image: oceanprotocol/brizo:${OCEAN_VERSION:-stable} + ports: + - 8030:8030 + networks: + backend: + ipv4_address: 172.15.0.17 + depends_on: + - keeper-contracts + - parity-node + environment: + KEEPER_URL: http://parity-node:8545 + LOCAL_CONTRACTS: "true" + KEEPER_NETWORK_NAME: ${KEEPER_NETWORK_NAME} + AQUARIUS_URL: http://aquarius:5000 + volumes: + - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml new file mode 100644 index 0000000..a3b67db --- /dev/null +++ b/compose-files/keeper_contracts.yml @@ -0,0 +1,17 @@ +version: '2.1' +services: + keeper-contracts: + image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} + networks: + backend: + ipv4_address: 172.15.0.14 + environment: + LOCAL_CONTRACTS: "true" + DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS} + DATABASE_PATH: "/ganache-db" + REUSE_DATABASE: ${REUSE_DATABASE} + NETWORK_NAME: ${KEEPER_NETWORK_NAME} + POA_HOST: "parity-node" + volumes: + - ${ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/ + - ${GANACHE_DATABASE_PATH}/ganache-db:/ganache-db diff --git a/compose-files/mongo.yml b/compose-files/mongo.yml new file mode 100644 index 0000000..204233d --- /dev/null +++ b/compose-files/mongo.yml @@ -0,0 +1,10 @@ +version: '2.1' +services: + mongodb: + image: mongo:3.6 + ports: + - "27017:27017" + command: mongod + networks: + backend: + ipv4_address: 172.15.0.11 diff --git a/compose-files/network_volumes.yml b/compose-files/network_volumes.yml new file mode 100644 index 0000000..c83814b --- /dev/null +++ b/compose-files/network_volumes.yml @@ -0,0 +1,14 @@ +version: '2.1' + +networks: + backend: + driver: bridge + ipam: + driver: default + config: + - subnet: 172.15.0.1/24 + gateway: 172.15.0.1 + +volumes: + parity-node: + secret-store: diff --git a/compose-files/parity_client.yml b/compose-files/parity_client.yml new file mode 100644 index 0000000..1b8fe97 --- /dev/null +++ b/compose-files/parity_client.yml @@ -0,0 +1,30 @@ +version: '2.1' +services: + parity-node: + image: oceanprotocol/parity-ethereum:beta + entrypoint: /opt/parity/parity + command: + --config /home/parity/parity/config/secretstoreclient.toml + --db-path /home/parity/chains + --keys-path /home/parity/.local/share/io.parity.ethereum/keys + --base-path /home/parity/base + --engine-signer 0x00bd138abd70e2f00903268f3db08f2d25677c9e + --ws-interface all + --jsonrpc-cors all + --jsonrpc-interface all + --jsonrpc-hosts all + --jsonrpc-apis all + --unsafe-expose + --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e + volumes: + - ../parity/parity/config:/home/parity/parity/config + - parity-node:/home/parity/.local/share/io.parity.ethereum/ + - ../parity/parity/authorities/validator0.json:/home/parity/.local/share/io.parity.ethereum/keys/ocean-network/validator.json + - ../parity/parity/keys:/home/parity/.local/share/io.parity.ethereum/keys/ocean-network + - ../parity/parity/authorities/validator0.pwd:/home/parity/parity/validator.pwd + - ../parity/parity/node0.network.key:/home/parity/.local/share/io.parity.ethereum/network/key + ports: + - 8545:8545 + networks: + backend: + ipv4_address: 172.15.0.12 diff --git a/compose-files/pleuston.yml b/compose-files/pleuston.yml new file mode 100644 index 0000000..446fd45 --- /dev/null +++ b/compose-files/pleuston.yml @@ -0,0 +1,17 @@ +version: '2.1' +services: + pleuston: + image: oceanprotocol/pleuston:${OCEAN_VERSION:-stable} + networks: + backend: + ipv4_address: 172.15.0.18 + ports: + - 3000:3000 + depends_on: + - keeper-contracts + environment: + KEEPER_HOST: keeper-contracts + OCEAN_HOST: aquarius + LOCAL_CONTRACTS: 'true' + volumes: + - ${ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro diff --git a/compose-files/secret_store.yml b/compose-files/secret_store.yml new file mode 100644 index 0000000..748d7db --- /dev/null +++ b/compose-files/secret_store.yml @@ -0,0 +1,31 @@ +version: '2.1' +services: + secret-store: + image: oceanprotocol/parity-ethereum:master + # entrypoint: tail -f /dev/null + entrypoint: /opt/parity/parity + command: + --config /etc/parity/secretstore/config.toml --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all + volumes: + - ../parity/secret_store/config/:/etc/parity/secretstore/ + - secret-store:/parity_data/ + - ../parity/secret_store/keys/:/parity_data/keys/ocean-network/ + ports: + - 12000:12000 + - 12001 + networks: + backend: + ipv4_address: 172.15.0.13 + + secret-store-cors-proxy: + image: nginx:alpine + volumes: + - ../cors-proxy.conf:/etc/nginx/nginx.conf:ro + depends_on: + - secret-store + ports: + - 12001:12001 + networks: + backend: + ipv4_address: 172.15.0.16 + command: nginx -g 'daemon off;' diff --git a/start_ocean.sh b/start_ocean.sh index 6b5ff17..05acc1b 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -1,13 +1,15 @@ #!/usr/bin/env bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +COMPOSE_DIR="${DIR}/compose-files" # Must be set to true for the first run, change it to "false" to avoid migrating the smart contracts on each run. export DEPLOY_CONTRACTS="true" # Ganache specific option, these two options have no effect when not running ganache-cli -export GANACHE_DATABASE_PATH="." +export GANACHE_DATABASE_PATH="${DIR}" export REUSE_DATABASE="false" # Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local export KEEPER_NETWORK_NAME="ganache" -export ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts +export ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts # colors COLOR_R="\033[0;31m" # red @@ -30,7 +32,14 @@ show_banner # default to stable versions export OCEAN_VERSION=stable -COMPOSE_FILE='docker-compose.yml' + +COMPOSE_FILES="" +COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml" +COMPOSE_FILES+=" -f ${COMPOSE_DIR}/mongo.yml" +COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" +COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pleuston.yml" +COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius.yml" +COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml" while :; do case $1 in @@ -43,25 +52,26 @@ while :; do printf $COLOR_Y'Starting and reusing the database ...\n\n'$COLOR_RESET ;; --no-pleuston) - COMPOSE_FILE='docker-compose-no-pleuston.yml' + COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/pleuston.yml/} printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET ;; --local-parity-node) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/parity_client.yml" + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml" export KEEPER_NETWORK_NAME="ocean_poa_net_local" - COMPOSE_FILE='docker-compose-local-parity-node.yml' printf $COLOR_Y'Starting with local Parity node...\n\n'$COLOR_RESET ;; --) # End of all options. - shift - break - ;; + shift + break + ;; -?*) - printf $COLOR_R'WARN: Unknown option (ignored): %s\n'$COLOR_RESET "$1" >&2 - break - ;; + printf $COLOR_R'WARN: Unknown option (ignored): %s\n'$COLOR_RESET "$1" >&2 + break + ;; *) printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET - docker-compose --project-name=ocean -f $COMPOSE_FILE up + docker-compose --project-name=ocean $COMPOSE_FILES up break esac shift From cfc4ca2b0bb13d950a04cf56089b5870a32788af Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 30 Nov 2018 10:36:55 +0100 Subject: [PATCH 02/33] Fix keeper-contracts/brizo as ethereum rpc provider --- compose-files/brizo.yml | 2 +- start_ocean.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index 1f03575..5495d3a 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -11,7 +11,7 @@ services: - keeper-contracts - parity-node environment: - KEEPER_URL: http://parity-node:8545 + KEEPER_URL: http://${RPC_URL}:8545 LOCAL_CONTRACTS: "true" KEEPER_NETWORK_NAME: ${KEEPER_NETWORK_NAME} AQUARIUS_URL: http://aquarius:5000 diff --git a/start_ocean.sh b/start_ocean.sh index f8397a5..8d73594 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -11,6 +11,8 @@ export REUSE_DATABASE="false" export KEEPER_NETWORK_NAME="ganache" export ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts export BRIZO_ENV_FILE=$DIR/brizo.env +# Specify the ethereum default RPC container provider +RPC_URL='keeper-contracts' # colors COLOR_R="\033[0;31m" # red @@ -59,6 +61,7 @@ while :; do --local-parity-node) COMPOSE_FILES+=" -f ${COMPOSE_DIR}/parity_client.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml" + RPC_URL='parity-node' export KEEPER_NETWORK_NAME="ocean_poa_net_local" printf $COLOR_Y'Starting with local Parity node...\n\n'$COLOR_RESET ;; From 5b0b11ea26e17d3dee9d0807c739e95df368a059 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 30 Nov 2018 10:37:07 +0100 Subject: [PATCH 03/33] Removed old compose files --- docker-compose-local-parity-node.yml | 132 --------------------------- docker-compose-no-pleuston.yml | 61 ------------- docker-compose.yml | 75 --------------- 3 files changed, 268 deletions(-) delete mode 100644 docker-compose-local-parity-node.yml delete mode 100644 docker-compose-no-pleuston.yml delete mode 100644 docker-compose.yml diff --git a/docker-compose-local-parity-node.yml b/docker-compose-local-parity-node.yml deleted file mode 100644 index a1c742f..0000000 --- a/docker-compose-local-parity-node.yml +++ /dev/null @@ -1,132 +0,0 @@ -version: '2.1' - -# Run: docker-compose --project-name=ocean up - -services: - mongodb: - image: mongo:3.6 - ports: - - "27017:27017" - command: mongod - networks: - backend: - ipv4_address: 172.15.0.11 - - parity-node: - image: oceanprotocol/parity-ethereum:beta - entrypoint: /opt/parity/parity - command: - --config /home/parity/parity/config/secretstoreclient.toml - --db-path /home/parity/chains - --keys-path /home/parity/.local/share/io.parity.ethereum/keys - --base-path /home/parity/base - --engine-signer 0x00bd138abd70e2f00903268f3db08f2d25677c9e - --ws-interface all - --jsonrpc-cors all - --jsonrpc-interface all - --jsonrpc-hosts all - --jsonrpc-apis all - --unsafe-expose - --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e - volumes: - - ./parity/parity/config:/home/parity/parity/config - - parity-node:/home/parity/.local/share/io.parity.ethereum/ - - ./parity/parity/authorities/validator0.json:/home/parity/.local/share/io.parity.ethereum/keys/ocean-network/validator.json - - ./parity/parity/keys:/home/parity/.local/share/io.parity.ethereum/keys/ocean-network - - ./parity/parity/authorities/validator0.pwd:/home/parity/parity/validator.pwd - - ./parity/parity/node0.network.key:/home/parity/.local/share/io.parity.ethereum/network/key - ports: - - 8545:8545 - networks: - backend: - ipv4_address: 172.15.0.12 - - secret-store: - image: oceanprotocol/parity-ethereum:master - # entrypoint: tail -f /dev/null - entrypoint: /opt/parity/parity - command: - --config /etc/parity/secretstore/config.toml --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all - volumes: - - ./parity/secret_store/config/:/etc/parity/secretstore/ - - secret-store:/parity_data/ - - ./parity/secret_store/keys/:/parity_data/keys/ocean-network/ - ports: - - 12000:12000 - - 12001 - networks: - backend: - ipv4_address: 172.15.0.13 - - secret-store-cors-proxy: - image: nginx:alpine - volumes: - - ./cors-proxy.conf:/etc/nginx/nginx.conf:ro - depends_on: - - secret-store - ports: - - 12001:12001 - networks: - backend: - ipv4_address: 172.15.0.16 - command: nginx -g 'daemon off;' - - keeper-contracts: - image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} - networks: - backend: - ipv4_address: 172.15.0.14 - environment: - LOCAL_CONTRACTS: "true" - DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS} - DATABASE_PATH: "/ganache-db" - REUSE_DATABASE: ${REUSE_DATABASE} - NETWORK_NAME: ${KEEPER_NETWORK_NAME} - POA_HOST: "parity-node" - volumes: - - ${ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/ - - ${GANACHE_DATABASE_PATH}/ganache-db:/ganache-db - - aquarius: - image: oceanprotocol/aquarius:${OCEAN_VERSION:-stable} - ports: - - 5000:5000 - networks: - backend: - ipv4_address: 172.15.0.15 - depends_on: - - keeper-contracts - environment: - KEEPER_HOST: http://parity-node - DB_HOSTNAME: mongodb - LOCAL_CONTRACTS: 'true' - volumes: - - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro - - brizo: - image: oceanprotocol/brizo:${OCEAN_VERSION:-stable} - ports: - - 8030:8030 - networks: - backend: - ipv4_address: 172.15.0.17 - depends_on: - - keeper-contracts - - parity-node - env_file: - - ${BRIZO_ENV_FILE} - volumes: - - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro - -networks: - backend: - driver: bridge - ipam: - driver: default - config: - - subnet: 172.15.0.1/24 - gateway: 172.15.0.1 - -volumes: - parity-node: - secret-store: diff --git a/docker-compose-no-pleuston.yml b/docker-compose-no-pleuston.yml deleted file mode 100644 index f716e07..0000000 --- a/docker-compose-no-pleuston.yml +++ /dev/null @@ -1,61 +0,0 @@ -version: '2.1' - -# Run: docker-compose --project-name=ocean up - -services: - mongodb: - image: mongo:3.6 - ports: - - "27017:27017" - command: mongod - networks: - - backend - - keeper-contracts: - image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} - ports: - - 8545:8545 - networks: - - backend - environment: - LOCAL_CONTRACTS: "true" - DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS} - DATABASE_PATH: "/ganache-db" - REUSE_DATABASE: ${REUSE_DATABASE} - NETWORK_NAME: ${KEEPER_NETWORK_NAME} - volumes: - - ${ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/ - - ${GANACHE_DATABASE_PATH}/ganache-db:/ganache-db - - aquarius: - image: oceanprotocol/aquarius:${OCEAN_VERSION:-stable} - ports: - - 5000:5000 - networks: - - backend - depends_on: - - keeper-contracts - environment: - KEEPER_URL: http://keeper-contracts:8545 - DB_HOSTNAME: mongodb - LOCAL_CONTRACTS: "true" - volumes: - - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro - - brizo: - image: oceanprotocol/brizo:${OCEAN_VERSION:-stable} - ports: - - 8030:8030 - networks: - - backend - depends_on: - - keeper-contracts - env_file: - - ${BRIZO_ENV_FILE} - volumes: - - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro - -networks: - backend: - - diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 7d46799..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,75 +0,0 @@ -version: '2.1' - -# Run: docker-compose --project-name=ocean up - -services: - mongodb: - image: mongo:3.6 - ports: - - "27017:27017" - command: mongod - networks: - - backend - - keeper-contracts: - image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} - ports: - - 8545:8545 - networks: - - backend - environment: - LOCAL_CONTRACTS: "true" - DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS} - DATABASE_PATH: "/ganache-db" - REUSE_DATABASE: ${REUSE_DATABASE} - NETWORK_NAME: ${KEEPER_NETWORK_NAME} - volumes: - - ${ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/ - - ${GANACHE_DATABASE_PATH}/ganache-db:/ganache-db - - aquarius: - image: oceanprotocol/aquarius:${OCEAN_VERSION:-stable} - ports: - - 5000:5000 - networks: - - backend - depends_on: - - keeper-contracts - environment: - KEEPER_URL: http://keeper-contracts:8545 - DB_HOSTNAME: mongodb - LOCAL_CONTRACTS: "true" - volumes: - - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro - - brizo: - image: oceanprotocol/brizo:${OCEAN_VERSION:-stable} - ports: - - 8030:8030 - networks: - - backend - depends_on: - - keeper-contracts - env_file: - - ${BRIZO_ENV_FILE} - volumes: - - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro - - pleuston: - image: oceanprotocol/pleuston:${OCEAN_VERSION:-stable} - ports: - - 3000:3000 - depends_on: - - keeper-contracts - environment: - NODE_HOST: localhost - AQUARIUS_HOST: localhost - BRIZO_HOST: localhost - LOCAL_CONTRACTS: 'true' - volumes: - - ${ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro - -networks: - backend: - - From 02a737597229d5682045b7fd5d7d627cf9ed3515 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 30 Nov 2018 10:41:06 +0100 Subject: [PATCH 04/33] Do not expose mongo interface to docker host --- compose-files/mongo.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/compose-files/mongo.yml b/compose-files/mongo.yml index 204233d..0a5751a 100644 --- a/compose-files/mongo.yml +++ b/compose-files/mongo.yml @@ -2,8 +2,6 @@ version: '2.1' services: mongodb: image: mongo:3.6 - ports: - - "27017:27017" command: mongod networks: backend: From 4947c0f0fa0f98cb0eb0aaf4ad6c693cb9fdcdc7 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 30 Nov 2018 10:45:58 +0100 Subject: [PATCH 05/33] Added missing export --- start_ocean.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/start_ocean.sh b/start_ocean.sh index 8d73594..ed699e6 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -12,7 +12,7 @@ export KEEPER_NETWORK_NAME="ganache" export ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts export BRIZO_ENV_FILE=$DIR/brizo.env # Specify the ethereum default RPC container provider -RPC_URL='keeper-contracts' +export RPC_URL='keeper-contracts' # colors COLOR_R="\033[0;31m" # red @@ -61,7 +61,7 @@ while :; do --local-parity-node) COMPOSE_FILES+=" -f ${COMPOSE_DIR}/parity_client.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml" - RPC_URL='parity-node' + export RPC_URL='parity-node' export KEEPER_NETWORK_NAME="ocean_poa_net_local" printf $COLOR_Y'Starting with local Parity node...\n\n'$COLOR_RESET ;; From ea0f8951453b0c803a7dab96c08958e34b9c00c7 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 30 Nov 2018 16:38:42 +0100 Subject: [PATCH 06/33] Added brizo env file --- compose-files/brizo.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index 5495d3a..2499ec2 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -10,10 +10,9 @@ services: depends_on: - keeper-contracts - parity-node + env_file: + - ${BRIZO_ENV_FILE} environment: KEEPER_URL: http://${RPC_URL}:8545 - LOCAL_CONTRACTS: "true" - KEEPER_NETWORK_NAME: ${KEEPER_NETWORK_NAME} - AQUARIUS_URL: http://aquarius:5000 volumes: - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro From f91b0e4511e67049816cfe1a1992005becc01c8b Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Tue, 4 Dec 2018 11:36:10 +0100 Subject: [PATCH 07/33] Dependencies updated --- compose-files/aquarius.yml | 4 +--- compose-files/pleuston.yml | 8 +++++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compose-files/aquarius.yml b/compose-files/aquarius.yml index f95b771..9399472 100644 --- a/compose-files/aquarius.yml +++ b/compose-files/aquarius.yml @@ -8,10 +8,8 @@ services: backend: ipv4_address: 172.15.0.15 depends_on: - - keeper-contracts + - mongodb environment: - KEEPER_HOST: http://parity-node DB_HOSTNAME: mongodb - LOCAL_CONTRACTS: 'true' volumes: - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro diff --git a/compose-files/pleuston.yml b/compose-files/pleuston.yml index 446fd45..095062d 100644 --- a/compose-files/pleuston.yml +++ b/compose-files/pleuston.yml @@ -8,10 +8,12 @@ services: ports: - 3000:3000 depends_on: - - keeper-contracts + - aquarius + - brizo environment: - KEEPER_HOST: keeper-contracts - OCEAN_HOST: aquarius + # Need browser to connect to exposed ports + KEEPER_HOST: localhost + AQUARIUS_HOST: localhost LOCAL_CONTRACTS: 'true' volumes: - ${ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro From c917328e54000eb4deee50553ddf2e5ab3732274 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Tue, 4 Dec 2018 11:36:41 +0100 Subject: [PATCH 08/33] Exposed keeper port to localhost (pleuston) --- compose-files/keeper_contracts.yml | 2 ++ start_ocean.sh | 3 +++ 2 files changed, 5 insertions(+) diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml index a3b67db..0c4dd5b 100644 --- a/compose-files/keeper_contracts.yml +++ b/compose-files/keeper_contracts.yml @@ -2,6 +2,8 @@ version: '2.1' services: keeper-contracts: image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} + ports: + - "${KEEPER_PORT}:8545" networks: backend: ipv4_address: 172.15.0.14 diff --git a/start_ocean.sh b/start_ocean.sh index b967ccd..8220dfd 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -14,6 +14,8 @@ export BRIZO_ENV_FILE=$DIR/brizo.env export PROJECT_NAME="ocean" # Specify the ethereum default RPC container provider export RPC_URL='keeper-contracts' +export KEEPER_PORT='8545' + # colors COLOR_R="\033[0;31m" # red @@ -64,6 +66,7 @@ while :; do COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml" export RPC_URL='parity-node' export KEEPER_NETWORK_NAME="ocean_poa_net_local" + export KEEPER_PORT='8546' printf $COLOR_Y'Starting with local Parity node...\n\n'$COLOR_RESET ;; --purge) From 49cf54aac891c9e25c25639c413975236a99a9d1 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Tue, 4 Dec 2018 12:57:14 +0100 Subject: [PATCH 09/33] Removed dependency --- compose-files/brizo.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index 2499ec2..0c2fa4f 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -9,7 +9,6 @@ services: ipv4_address: 172.15.0.17 depends_on: - keeper-contracts - - parity-node env_file: - ${BRIZO_ENV_FILE} environment: From f55a3860746a1702cfff8eb17ae3fc3062020634 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Tue, 4 Dec 2018 15:26:38 +0100 Subject: [PATCH 10/33] Removed volume for aquarius --- compose-files/aquarius.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/compose-files/aquarius.yml b/compose-files/aquarius.yml index 9399472..6daeb4c 100644 --- a/compose-files/aquarius.yml +++ b/compose-files/aquarius.yml @@ -11,5 +11,3 @@ services: - mongodb environment: DB_HOSTNAME: mongodb - volumes: - - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro From 91499da37b19496461a4c3622efe048c7e9f0e31 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Wed, 5 Dec 2018 10:46:50 +0100 Subject: [PATCH 11/33] refactored to use different blockchain nodes underneath --- brizo.env | 8 +- compose-files/brizo.yml | 4 +- compose-files/keeper_contracts.yml | 14 ++-- compose-files/nodes/ganache_node.yml | 9 +++ compose-files/nodes/kovan_node.yml | 19 +++++ .../pond_node.yml} | 2 +- compose-files/pleuston.yml | 4 +- compose-files/secret_store.yml | 25 ++++-- parity/docker-compose.yml | 10 +-- start_ocean.sh | 81 ++++++++++++++----- 10 files changed, 127 insertions(+), 49 deletions(-) create mode 100644 compose-files/nodes/ganache_node.yml create mode 100644 compose-files/nodes/kovan_node.yml rename compose-files/{parity_client.yml => nodes/pond_node.yml} (98%) diff --git a/brizo.env b/brizo.env index 2f64e90..91a7b50 100755 --- a/brizo.env +++ b/brizo.env @@ -1,17 +1,13 @@ # Use this file to set the env vars required for Brizo. -KEEPER_URL=http://parity-node:8545 -LOCAL_CONTRACTS=true -KEEPER_NETWORK_NAME=ocean_poa_net_local - -SECRET_STORE_URL=http://secret-store:12001 -PARITY_URL=http://parity-node:8545 # Set a valid parity address and password to have seamless interaction with the `keeper` PARITY_ADDRESS=0x00bd138abd70e2f00903268f3db08f2d25677c9e PARITY_PASSWORD=node0 AQUARIUS_URL=http://aquarius:5000 BRIZO_URL=http://brizo:8030 +SECRET_STORE_URL=http://secret-store:12001 +RPC_URL=${KEEPER_URL} AZURE_ACCOUNT_NAME= AZURE_ACCOUNT_KEY= diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index 0c2fa4f..b6d5bdc 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -8,10 +8,10 @@ services: backend: ipv4_address: 172.15.0.17 depends_on: - - keeper-contracts + - blockchain-node env_file: - ${BRIZO_ENV_FILE} environment: - KEEPER_URL: http://${RPC_URL}:8545 + KEEPER_URL: http://${KEEPER_RPC_URL}:${KEEPER_RPC_PORT} volumes: - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml index 0c4dd5b..1770eec 100644 --- a/compose-files/keeper_contracts.yml +++ b/compose-files/keeper_contracts.yml @@ -2,18 +2,16 @@ version: '2.1' services: keeper-contracts: image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} - ports: - - "${KEEPER_PORT}:8545" networks: backend: ipv4_address: 172.15.0.14 environment: - LOCAL_CONTRACTS: "true" + LOCAL_CONTRACTS: "false" DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS} - DATABASE_PATH: "/ganache-db" - REUSE_DATABASE: ${REUSE_DATABASE} + REUSE_DATABASE: "false" NETWORK_NAME: ${KEEPER_NETWORK_NAME} - POA_HOST: "parity-node" + POA_HOST: ${KEEPER_RPC_URL} + depends_on: + - blockchain-node volumes: - - ${ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/ - - ${GANACHE_DATABASE_PATH}/ganache-db:/ganache-db + - ${KEEPER_ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/ diff --git a/compose-files/nodes/ganache_node.yml b/compose-files/nodes/ganache_node.yml new file mode 100644 index 0000000..520d9b1 --- /dev/null +++ b/compose-files/nodes/ganache_node.yml @@ -0,0 +1,9 @@ +version: '2.1' +services: + blockchain-node: + image: trufflesuite/ganache-cli:latest + ports: + - 8545:8545 + networks: + backend: + ipv4_address: 172.15.0.12 diff --git a/compose-files/nodes/kovan_node.yml b/compose-files/nodes/kovan_node.yml new file mode 100644 index 0000000..7bc2654 --- /dev/null +++ b/compose-files/nodes/kovan_node.yml @@ -0,0 +1,19 @@ +version: '2.1' +services: + blockchain-node: + image: oceanprotocol/parity-ethereum:beta + entrypoint: /opt/parity/parity + command: + --chain kovan + --light + --ws-interface all + --jsonrpc-cors all + --jsonrpc-interface all + --jsonrpc-hosts all + --jsonrpc-apis all + --unsafe-expose + ports: + - 8545:8545 + networks: + backend: + ipv4_address: 172.15.0.12 diff --git a/compose-files/parity_client.yml b/compose-files/nodes/pond_node.yml similarity index 98% rename from compose-files/parity_client.yml rename to compose-files/nodes/pond_node.yml index 1b8fe97..eef98a9 100644 --- a/compose-files/parity_client.yml +++ b/compose-files/nodes/pond_node.yml @@ -1,6 +1,6 @@ version: '2.1' services: - parity-node: + blockchain-node: image: oceanprotocol/parity-ethereum:beta entrypoint: /opt/parity/parity command: diff --git a/compose-files/pleuston.yml b/compose-files/pleuston.yml index 095062d..4f8464e 100644 --- a/compose-files/pleuston.yml +++ b/compose-files/pleuston.yml @@ -4,7 +4,7 @@ services: image: oceanprotocol/pleuston:${OCEAN_VERSION:-stable} networks: backend: - ipv4_address: 172.15.0.18 + ipv4_address: 172.15.0.19 ports: - 3000:3000 depends_on: @@ -14,6 +14,6 @@ services: # Need browser to connect to exposed ports KEEPER_HOST: localhost AQUARIUS_HOST: localhost - LOCAL_CONTRACTS: 'true' + LOCAL_CONTRACTS: ${DEPLOY_CONTRACTS} volumes: - ${ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro diff --git a/compose-files/secret_store.yml b/compose-files/secret_store.yml index 748d7db..0a37766 100644 --- a/compose-files/secret_store.yml +++ b/compose-files/secret_store.yml @@ -7,12 +7,12 @@ services: command: --config /etc/parity/secretstore/config.toml --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all volumes: - - ../parity/secret_store/config/:/etc/parity/secretstore/ - - secret-store:/parity_data/ - - ../parity/secret_store/keys/:/parity_data/keys/ocean-network/ + - ../parity/secret_store/config/:/etc/parity/secretstore/ + - secret-store:/parity_data/ + - ../parity/secret_store/keys/:/parity_data/keys/ocean-network/ ports: - - 12000:12000 - - 12001 + - 12000:12000 + - 12001 networks: backend: ipv4_address: 172.15.0.13 @@ -29,3 +29,18 @@ services: backend: ipv4_address: 172.15.0.16 command: nginx -g 'daemon off;' + + secret-store-signing-node: + image: oceanprotocol/parity-ethereum:master + entrypoint: /opt/parity/parity + command: + --chain dev + --light + --jsonrpc-interface all + --jsonrpc-apis secretstore + --jsonrpc-cors all + ports: + - 9545:8545 + networks: + backend: + ipv4_address: 172.15.0.18 \ No newline at end of file diff --git a/parity/docker-compose.yml b/parity/docker-compose.yml index 1c658cc..9e6f2b8 100644 --- a/parity/docker-compose.yml +++ b/parity/docker-compose.yml @@ -14,8 +14,8 @@ services: volumes: - ./parity/config:/parity/config:ro - validator0:/root/.local/share/io.parity.ethereum/ - - ./parity/authorities/validator0.json:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME}/validator.json:ro - - ./parity/keys:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME} + - ./parity/authorities/validator0.json:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}/validator.json:ro + - ./parity/keys:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME} - ./parity/authorities/validator0.pwd:/parity/validator.pwd:ro - ./parity/node0.network.key:/root/.local/share/io.parity.ethereum/network/key:ro ports: @@ -32,7 +32,7 @@ services: volumes: - ./parity/config:/parity/config:ro - validator1:/root/.local/share/io.parity.ethereum/ - - ./parity/authorities/validator1.json:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME}/validator.json:ro + - ./parity/authorities/validator1.json:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}/validator.json:ro - ./parity/authorities/validator1.pwd:/parity/validator.pwd:ro - ./parity/node1.network.key:/root/.local/share/io.parity.ethereum/network/key:ro networks: @@ -47,7 +47,7 @@ services: volumes: - ./parity/config:/parity/config:ro - validator2:/root/.local/share/io.parity.ethereum/ - - ./parity/authorities/validator2.json:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME}/validator.json:ro + - ./parity/authorities/validator2.json:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}/validator.json:ro - ./parity/authorities/validator2.pwd:/parity/validator.pwd:ro - ./parity/node2.network.key:/root/.local/share/io.parity.ethereum/network/key:ro networks: @@ -64,7 +64,7 @@ services: --unsafe-expose volumes: - ./parity/config:/parity/config:ro - - ./parity/keys:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME} + - ./parity/keys:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME} ports: - 8180:8180 - 8546:8546 diff --git a/start_ocean.sh b/start_ocean.sh index 8220dfd..fa16ab0 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -2,19 +2,25 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" COMPOSE_DIR="${DIR}/compose-files" -# Must be set to true for the first run, change it to "false" to avoid migrating the smart contracts on each run. -export DEPLOY_CONTRACTS="true" + +export PROJECT_NAME="ocean" + +# keeper options +export KEEPER_DEPLOY_CONTRACTS="false" +export KEEPER_ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts +# Specify which ethereum client to run or connect to: development, kovan, or ocean_poa_net_local +export KEEPER_NETWORK_NAME="development" + # Ganache specific option, these two options have no effect when not running ganache-cli export GANACHE_DATABASE_PATH="${DIR}" -export REUSE_DATABASE="false" -# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local -export KEEPER_NETWORK_NAME="ganache" -export ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts +export GANACHE_REUSE_DATABASE="false" + export BRIZO_ENV_FILE=$DIR/brizo.env -export PROJECT_NAME="ocean" + # Specify the ethereum default RPC container provider -export RPC_URL='keeper-contracts' -export KEEPER_PORT='8545' +export KEEPER_RPC_URL='blockchain-node' +export KEEPER_RPC_PORT='8545' +export KEEPER_URL="http://"${KEEPER_RPC_URL}:${KEEPER_RPC_PORT} # colors @@ -42,33 +48,68 @@ export OCEAN_VERSION=latest COMPOSE_FILES="" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/mongo.yml" -COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pleuston.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml" +COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml" while :; do case $1 in + ################################################# + # Version switches + ################################################# --latest) export OCEAN_VERSION=latest printf $COLOR_Y'Switched to latest components...\n\n'$COLOR_RESET ;; - --reuse-database) - export REUSE_DATABASE="true" - printf $COLOR_Y'Starting and reusing the database ...\n\n'$COLOR_RESET - ;; + ################################################# + # Exclude switches + ################################################# --no-pleuston) COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/pleuston.yml/} printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET ;; - --local-parity-node) - COMPOSE_FILES+=" -f ${COMPOSE_DIR}/parity_client.yml" - COMPOSE_FILES+=" -f ${COMPOSE_DIR}/secret_store.yml" - export RPC_URL='parity-node' + ################################################# + # Contract/Storage switches + ################################################# + --reuse-ganache-database) + export GANACHE_REUSE_DATABASE="true" + printf $COLOR_Y'Starting and reusing the database ...\n\n'$COLOR_RESET + ;; + ################################################# + # Node type switches + ################################################# + # connect you to kovan + --local-kovan-node) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/kovan_node.yml" + export KEEPER_NETWORK_NAME="kovan" + printf $COLOR_Y'Starting with local Kovan node...\n\n'$COLOR_RESET + ;; + # connects to ocean testnet + --local-lake-node) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/lake_node.yml" + export KEEPER_NETWORK_NAME="ocean_poa_aws" + printf $COLOR_Y'Starting with local Pond node...\n\n'$COLOR_RESET + ;; + # spins up a new ganache blockchain + --local-ganache-node) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/ganache_node.yml" + export KEEPER_NETWORK_NAME="development" + export KEEPER_DEPLOY_CONTRACTS="true" + printf $COLOR_Y'Starting with local Ganache node...\n\n'$COLOR_RESET + ;; + # spins up pond local testnet + --local-pond-node) + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" + COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/pond_node.yml" export KEEPER_NETWORK_NAME="ocean_poa_net_local" - export KEEPER_PORT='8546' - printf $COLOR_Y'Starting with local Parity node...\n\n'$COLOR_RESET + export KEEPER_DEPLOY_CONTRACTS="true" + printf $COLOR_Y'Starting with local Pond node...\n\n'$COLOR_RESET ;; + ################################################# + # Cleaning switches + ################################################# --purge) docker network rm $PROJECT_NAME_backend || true docker network rm $PROJECT_NAME_default || true From 1695301c2631dc91114257bfe190a354779a84fe Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Wed, 5 Dec 2018 10:56:31 +0100 Subject: [PATCH 12/33] made node exclusive --- compose-files/{mongo.yml => mongodb.yml} | 0 start_ocean.sh | 15 ++++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) rename compose-files/{mongo.yml => mongodb.yml} (100%) diff --git a/compose-files/mongo.yml b/compose-files/mongodb.yml similarity index 100% rename from compose-files/mongo.yml rename to compose-files/mongodb.yml diff --git a/start_ocean.sh b/start_ocean.sh index fa16ab0..4723971 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -6,7 +6,7 @@ COMPOSE_DIR="${DIR}/compose-files" export PROJECT_NAME="ocean" # keeper options -export KEEPER_DEPLOY_CONTRACTS="false" +export KEEPER_DEPLOY_CONTRACTS="true" export KEEPER_ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts # Specify which ethereum client to run or connect to: development, kovan, or ocean_poa_net_local export KEEPER_NETWORK_NAME="development" @@ -44,10 +44,11 @@ show_banner # default to latest versions export OCEAN_VERSION=latest +export NODE_FILE=${COMPOSE_DIR}/nodes/pond_node.yml COMPOSE_FILES="" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml" -COMPOSE_FILES+=" -f ${COMPOSE_DIR}/mongo.yml" +COMPOSE_FILES+=" -f ${COMPOSE_DIR}/mongodb.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pleuston.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml" @@ -81,20 +82,20 @@ while :; do ################################################# # connect you to kovan --local-kovan-node) - COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/kovan_node.yml" + export NODE_FILE=${COMPOSE_DIR}/nodes/kovan_node.yml export KEEPER_NETWORK_NAME="kovan" printf $COLOR_Y'Starting with local Kovan node...\n\n'$COLOR_RESET ;; # connects to ocean testnet --local-lake-node) - COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/lake_node.yml" + export NODE_FILE=${COMPOSE_DIR}/nodes/lake_node.yml export KEEPER_NETWORK_NAME="ocean_poa_aws" printf $COLOR_Y'Starting with local Pond node...\n\n'$COLOR_RESET ;; # spins up a new ganache blockchain --local-ganache-node) COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" - COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/ganache_node.yml" + export NODE_FILE=${COMPOSE_DIR}/nodes/ganache_node.yml export KEEPER_NETWORK_NAME="development" export KEEPER_DEPLOY_CONTRACTS="true" printf $COLOR_Y'Starting with local Ganache node...\n\n'$COLOR_RESET @@ -102,7 +103,7 @@ while :; do # spins up pond local testnet --local-pond-node) COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" - COMPOSE_FILES+=" -f ${COMPOSE_DIR}/nodes/pond_node.yml" + export NODE_FILE=${COMPOSE_DIR}/nodes/pond_node.yml export KEEPER_NETWORK_NAME="ocean_poa_net_local" export KEEPER_DEPLOY_CONTRACTS="true" printf $COLOR_Y'Starting with local Pond node...\n\n'$COLOR_RESET @@ -132,7 +133,7 @@ while :; do ;; *) printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET - docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES up + docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_FILE} up break esac shift From dbdd0c355f25455d259739972394c99d370c7ac3 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Wed, 5 Dec 2018 12:16:18 +0100 Subject: [PATCH 13/33] fix brizo env --- .env | 14 ++++++++------ brizo.env | 2 +- compose-files/brizo.yml | 4 ++-- compose-files/keeper_contracts.yml | 10 ++++++---- compose-files/pleuston.yml | 4 ++-- start_ocean.sh | 17 ++++++++--------- 6 files changed, 27 insertions(+), 24 deletions(-) diff --git a/.env b/.env index 8fa94d0..faa6ee2 100644 --- a/.env +++ b/.env @@ -1,11 +1,13 @@ # Must be set to true for the first run, change it to "false" to avoid migrating the smart contracts on each run. -DEPLOY_CONTRACTS=true +KEEPER_DEPLOY_CONTRACTS=true + +# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local +KEEPER_NETWORK_NAME=development +KEEPER_ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts + # Ganache specific option, these two options have no effect when not running ganache-cli GANACHE_DATABASE_PATH=. -REUSE_DATABASE=false -# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local -KEEPER_NETWORK_NAME=ganache -ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts +GANACHE_REUSE_DATABASE=false + # Specify which ocean version use: stable, latests, ... OCEAN_VERSION=stable -COMPOSE_FILE=docker-compose.yml diff --git a/brizo.env b/brizo.env index 91a7b50..e4106ff 100755 --- a/brizo.env +++ b/brizo.env @@ -7,7 +7,7 @@ PARITY_PASSWORD=node0 AQUARIUS_URL=http://aquarius:5000 BRIZO_URL=http://brizo:8030 SECRET_STORE_URL=http://secret-store:12001 -RPC_URL=${KEEPER_URL} +RPC_URL=http://blockchain-node:8545 AZURE_ACCOUNT_NAME= AZURE_ACCOUNT_KEY= diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index b6d5bdc..70c3e14 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -12,6 +12,6 @@ services: env_file: - ${BRIZO_ENV_FILE} environment: - KEEPER_URL: http://${KEEPER_RPC_URL}:${KEEPER_RPC_PORT} + KEEPER_URL: ${KEEPER_RPC_URL} volumes: - - ${ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro + - ${KEEPER_ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml index 1770eec..d2402f0 100644 --- a/compose-files/keeper_contracts.yml +++ b/compose-files/keeper_contracts.yml @@ -6,11 +6,13 @@ services: backend: ipv4_address: 172.15.0.14 environment: - LOCAL_CONTRACTS: "false" - DEPLOY_CONTRACTS: ${DEPLOY_CONTRACTS} - REUSE_DATABASE: "false" + DEPLOY_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS} + REUSE_DATABASE: ${GANACHE_REUSE_DATABASE} + DATABASE_PATH: "/ganache-db" NETWORK_NAME: ${KEEPER_NETWORK_NAME} - POA_HOST: ${KEEPER_RPC_URL} + KEEPER_RPC_HOST: ${KEEPER_RPC_HOST} + KEEPER_RPC_PORT: ${KEEPER_RPC_PORT} + KEEPER_RPC_URL: ${KEEPER_RPC_URL} depends_on: - blockchain-node volumes: diff --git a/compose-files/pleuston.yml b/compose-files/pleuston.yml index 4f8464e..41145c2 100644 --- a/compose-files/pleuston.yml +++ b/compose-files/pleuston.yml @@ -14,6 +14,6 @@ services: # Need browser to connect to exposed ports KEEPER_HOST: localhost AQUARIUS_HOST: localhost - LOCAL_CONTRACTS: ${DEPLOY_CONTRACTS} + LOCAL_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS} volumes: - - ${ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro + - ${KEEPER_ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro diff --git a/start_ocean.sh b/start_ocean.sh index 4723971..7e74e6c 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -18,10 +18,9 @@ export GANACHE_REUSE_DATABASE="false" export BRIZO_ENV_FILE=$DIR/brizo.env # Specify the ethereum default RPC container provider -export KEEPER_RPC_URL='blockchain-node' +export KEEPER_RPC_HOST='blockchain-node' export KEEPER_RPC_PORT='8545' -export KEEPER_URL="http://"${KEEPER_RPC_URL}:${KEEPER_RPC_PORT} - +export KEEPER_RPC_URL="http://"${KEEPER_RPC_HOST}:${KEEPER_RPC_PORT} # colors COLOR_R="\033[0;31m" # red @@ -112,15 +111,15 @@ while :; do # Cleaning switches ################################################# --purge) - docker network rm $PROJECT_NAME_backend || true - docker network rm $PROJECT_NAME_default || true - docker volume rm $PROJECT_NAME_parity-node || true - docker volume rm $PROJECT_NAME_secret-store || true - read -p "Are you sure you want to delete $ARTIFACTS_FOLDER? " -n 1 -r + docker network rm ${PROJECT_NAME}_backend || true + docker network rm ${PROJECT_NAME}_default || true + docker volume rm ${PROJECT_NAME}_parity-node || true + docker volume rm ${PROJECT_NAME}_secret-store || true + read -p "Are you sure you want to delete $KEEPER_ARTIFACTS_FOLDER? " -n 1 -r echo if [[ $REPLY =~ ^[Yy]$ ]] then - rm -rf $ARTIFACTS_FOLDER + rm -rf ${KEEPER_ARTIFACTS_FOLDER} fi ;; --) # End of all options. From e10d515d8f7d0fcb30c741423e7e317fad39ba3b Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Wed, 5 Dec 2018 14:03:41 +0100 Subject: [PATCH 14/33] refactor more --- brizo.env | 3 +-- compose-files/aquarius.yml | 7 +++++++ compose-files/brizo.yml | 2 +- compose-files/keeper_contracts.yml | 2 +- compose-files/mongodb.yml | 8 -------- compose-files/network_volumes.yml | 2 +- compose-files/nodes/ganache_node.yml | 2 +- compose-files/nodes/kovan_node.yml | 2 +- compose-files/nodes/pond_node.yml | 4 ++-- compose-files/pleuston.yml | 1 + compose-files/secret_store.yml | 3 +++ start_ocean.sh | 21 ++++++++++----------- 12 files changed, 29 insertions(+), 28 deletions(-) delete mode 100644 compose-files/mongodb.yml diff --git a/brizo.env b/brizo.env index e4106ff..bb3d2f9 100755 --- a/brizo.env +++ b/brizo.env @@ -5,9 +5,8 @@ PARITY_ADDRESS=0x00bd138abd70e2f00903268f3db08f2d25677c9e PARITY_PASSWORD=node0 AQUARIUS_URL=http://aquarius:5000 -BRIZO_URL=http://brizo:8030 SECRET_STORE_URL=http://secret-store:12001 -RPC_URL=http://blockchain-node:8545 +RPC_URL=http://keeper-node:8545 AZURE_ACCOUNT_NAME= AZURE_ACCOUNT_KEY= diff --git a/compose-files/aquarius.yml b/compose-files/aquarius.yml index 6daeb4c..f0aab6f 100644 --- a/compose-files/aquarius.yml +++ b/compose-files/aquarius.yml @@ -11,3 +11,10 @@ services: - mongodb environment: DB_HOSTNAME: mongodb + + mongodb: + image: mongo:3.6 + command: mongod + networks: + backend: + ipv4_address: 172.15.0.11 diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index 70c3e14..06fa6a6 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -8,7 +8,7 @@ services: backend: ipv4_address: 172.15.0.17 depends_on: - - blockchain-node + - keeper-node env_file: - ${BRIZO_ENV_FILE} environment: diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml index d2402f0..5462e5c 100644 --- a/compose-files/keeper_contracts.yml +++ b/compose-files/keeper_contracts.yml @@ -14,6 +14,6 @@ services: KEEPER_RPC_PORT: ${KEEPER_RPC_PORT} KEEPER_RPC_URL: ${KEEPER_RPC_URL} depends_on: - - blockchain-node + - keeper-node volumes: - ${KEEPER_ARTIFACTS_FOLDER}:/keeper-contracts/artifacts/ diff --git a/compose-files/mongodb.yml b/compose-files/mongodb.yml deleted file mode 100644 index 0a5751a..0000000 --- a/compose-files/mongodb.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '2.1' -services: - mongodb: - image: mongo:3.6 - command: mongod - networks: - backend: - ipv4_address: 172.15.0.11 diff --git a/compose-files/network_volumes.yml b/compose-files/network_volumes.yml index c83814b..14bf031 100644 --- a/compose-files/network_volumes.yml +++ b/compose-files/network_volumes.yml @@ -10,5 +10,5 @@ networks: gateway: 172.15.0.1 volumes: - parity-node: + keeper-node: secret-store: diff --git a/compose-files/nodes/ganache_node.yml b/compose-files/nodes/ganache_node.yml index 520d9b1..23404be 100644 --- a/compose-files/nodes/ganache_node.yml +++ b/compose-files/nodes/ganache_node.yml @@ -1,6 +1,6 @@ version: '2.1' services: - blockchain-node: + keeper-node: image: trufflesuite/ganache-cli:latest ports: - 8545:8545 diff --git a/compose-files/nodes/kovan_node.yml b/compose-files/nodes/kovan_node.yml index 7bc2654..eb4c8dc 100644 --- a/compose-files/nodes/kovan_node.yml +++ b/compose-files/nodes/kovan_node.yml @@ -1,6 +1,6 @@ version: '2.1' services: - blockchain-node: + keeper-node: image: oceanprotocol/parity-ethereum:beta entrypoint: /opt/parity/parity command: diff --git a/compose-files/nodes/pond_node.yml b/compose-files/nodes/pond_node.yml index eef98a9..0d74921 100644 --- a/compose-files/nodes/pond_node.yml +++ b/compose-files/nodes/pond_node.yml @@ -1,6 +1,6 @@ version: '2.1' services: - blockchain-node: + keeper-node: image: oceanprotocol/parity-ethereum:beta entrypoint: /opt/parity/parity command: @@ -18,7 +18,7 @@ services: --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e volumes: - ../parity/parity/config:/home/parity/parity/config - - parity-node:/home/parity/.local/share/io.parity.ethereum/ + - keeper-node:/home/parity/.local/share/io.parity.ethereum/ - ../parity/parity/authorities/validator0.json:/home/parity/.local/share/io.parity.ethereum/keys/ocean-network/validator.json - ../parity/parity/keys:/home/parity/.local/share/io.parity.ethereum/keys/ocean-network - ../parity/parity/authorities/validator0.pwd:/home/parity/parity/validator.pwd diff --git a/compose-files/pleuston.yml b/compose-files/pleuston.yml index 41145c2..e56bb07 100644 --- a/compose-files/pleuston.yml +++ b/compose-files/pleuston.yml @@ -8,6 +8,7 @@ services: ports: - 3000:3000 depends_on: + - keeper-node - aquarius - brizo environment: diff --git a/compose-files/secret_store.yml b/compose-files/secret_store.yml index 0a37766..68233fa 100644 --- a/compose-files/secret_store.yml +++ b/compose-files/secret_store.yml @@ -39,8 +39,11 @@ services: --jsonrpc-interface all --jsonrpc-apis secretstore --jsonrpc-cors all + --keys-path /home/parity/.local/keys ports: - 9545:8545 + volumes: + - ../parity/parity/keys:/home/parity/.local/keys/DevelopmentChain:ro networks: backend: ipv4_address: 172.15.0.18 \ No newline at end of file diff --git a/start_ocean.sh b/start_ocean.sh index 7e74e6c..76af9a2 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -9,7 +9,7 @@ export PROJECT_NAME="ocean" export KEEPER_DEPLOY_CONTRACTS="true" export KEEPER_ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts # Specify which ethereum client to run or connect to: development, kovan, or ocean_poa_net_local -export KEEPER_NETWORK_NAME="development" +export KEEPER_NETWORK_NAME="ocean_poa_net_local" # Ganache specific option, these two options have no effect when not running ganache-cli export GANACHE_DATABASE_PATH="${DIR}" @@ -18,7 +18,7 @@ export GANACHE_REUSE_DATABASE="false" export BRIZO_ENV_FILE=$DIR/brizo.env # Specify the ethereum default RPC container provider -export KEEPER_RPC_HOST='blockchain-node' +export KEEPER_RPC_HOST='keeper-node' export KEEPER_RPC_PORT='8545' export KEEPER_RPC_URL="http://"${KEEPER_RPC_HOST}:${KEEPER_RPC_PORT} @@ -47,7 +47,6 @@ export NODE_FILE=${COMPOSE_DIR}/nodes/pond_node.yml COMPOSE_FILES="" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml" -COMPOSE_FILES+=" -f ${COMPOSE_DIR}/mongodb.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pleuston.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml" @@ -79,18 +78,12 @@ while :; do ################################################# # Node type switches ################################################# - # connect you to kovan + # connects you to kovan --local-kovan-node) export NODE_FILE=${COMPOSE_DIR}/nodes/kovan_node.yml export KEEPER_NETWORK_NAME="kovan" printf $COLOR_Y'Starting with local Kovan node...\n\n'$COLOR_RESET ;; - # connects to ocean testnet - --local-lake-node) - export NODE_FILE=${COMPOSE_DIR}/nodes/lake_node.yml - export KEEPER_NETWORK_NAME="ocean_poa_aws" - printf $COLOR_Y'Starting with local Pond node...\n\n'$COLOR_RESET - ;; # spins up a new ganache blockchain --local-ganache-node) COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" @@ -99,6 +92,12 @@ while :; do export KEEPER_DEPLOY_CONTRACTS="true" printf $COLOR_Y'Starting with local Ganache node...\n\n'$COLOR_RESET ;; + # connects you to ocean testnet + --local-lake-node) + export NODE_FILE=${COMPOSE_DIR}/nodes/lake_node.yml + export KEEPER_NETWORK_NAME="ocean_poa_aws" + printf $COLOR_Y'Starting with local Lake node...\n\n'$COLOR_RESET + ;; # spins up pond local testnet --local-pond-node) COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" @@ -113,7 +112,7 @@ while :; do --purge) docker network rm ${PROJECT_NAME}_backend || true docker network rm ${PROJECT_NAME}_default || true - docker volume rm ${PROJECT_NAME}_parity-node || true + docker volume rm ${PROJECT_NAME}_keeper-node || true docker volume rm ${PROJECT_NAME}_secret-store || true read -p "Are you sure you want to delete $KEEPER_ARTIFACTS_FOLDER? " -n 1 -r echo From 306585118b752ac111673d2a4be5b5eb463d3eaf Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 09:16:50 +0100 Subject: [PATCH 15/33] refactor more --- compose-files/nodes/ganache_node.yml | 2 + compose-files/nodes/kovan_node.yml | 3 +- compose-files/nodes/lake_node.yml | 29 ++++ compose-files/nodes/pond_node.yml | 21 +-- compose-files/secret_store.yml | 18 +- .../lake}/authorities/validator0.json | 0 .../lake}/authorities/validator0.pwd | 0 .../lake}/authorities/validator1.json | 0 .../lake}/authorities/validator1.pwd | 0 .../lake}/authorities/validator2.json | 0 .../lake}/authorities/validator2.pwd | 0 .../lake}/config/chain.json | 4 +- .../lake/config/config.toml | 0 .../lake}/config/member.toml | 0 .../lake}/config/validator.toml | 0 .../lake}/keys/account1.json | 0 .../lake}/keys/account2.json | 0 .../lake}/keys/address_book.json | 0 .../lake}/keys/master0.json | 0 .../lake}/keys/master1.json | 0 .../lake}/keys/validator.json | 0 .../lake}/node0.network.key | 0 .../lake}/node1.network.key | 0 .../lake}/node2.network.key | 0 networks/pond/config/chain.json | 155 ++++++++++++++++++ networks/pond/config/config.toml | 18 ++ .../pond}/keys/account1.json | 0 .../pond}/keys/account2.json | 0 .../pond}/keys/address_book.json | 0 networks/pond/keys/validator.json | 23 +++ networks/pond/keys/validator.pwd | 1 + .../secret-store}/config/chain.json | 2 +- .../secret-store}/config/config.toml | 0 .../secret-store}/config/password | 0 networks/secret-store/keys/account1.json | 22 +++ networks/secret-store/keys/account2.json | 22 +++ networks/secret-store/keys/address_book.json | 1 + .../secret-store}/keys/ss1.json | 0 parity/.env | 1 - parity/README.md | 111 ------------- parity/docker-compose.yml | 88 ---------- start_ocean.sh | 12 ++ 42 files changed, 306 insertions(+), 227 deletions(-) create mode 100644 compose-files/nodes/lake_node.yml rename {parity/parity => networks/lake}/authorities/validator0.json (100%) rename {parity/parity => networks/lake}/authorities/validator0.pwd (100%) rename {parity/parity => networks/lake}/authorities/validator1.json (100%) rename {parity/parity => networks/lake}/authorities/validator1.pwd (100%) rename {parity/parity => networks/lake}/authorities/validator2.json (100%) rename {parity/parity => networks/lake}/authorities/validator2.pwd (100%) rename {parity/parity => networks/lake}/config/chain.json (98%) rename parity/parity/config/secretstoreclient.toml => networks/lake/config/config.toml (100%) rename {parity/parity => networks/lake}/config/member.toml (100%) rename {parity/parity => networks/lake}/config/validator.toml (100%) rename {parity/parity => networks/lake}/keys/account1.json (100%) rename {parity/parity => networks/lake}/keys/account2.json (100%) rename {parity/parity => networks/lake}/keys/address_book.json (100%) rename {parity/parity => networks/lake}/keys/master0.json (100%) rename {parity/parity => networks/lake}/keys/master1.json (100%) rename {parity/parity => networks/lake}/keys/validator.json (100%) rename {parity/parity => networks/lake}/node0.network.key (100%) rename {parity/parity => networks/lake}/node1.network.key (100%) rename {parity/parity => networks/lake}/node2.network.key (100%) create mode 100644 networks/pond/config/chain.json create mode 100644 networks/pond/config/config.toml rename {parity/secret_store => networks/pond}/keys/account1.json (100%) rename {parity/secret_store => networks/pond}/keys/account2.json (100%) rename {parity/secret_store => networks/pond}/keys/address_book.json (100%) create mode 100644 networks/pond/keys/validator.json create mode 100644 networks/pond/keys/validator.pwd rename {parity/secret_store => networks/secret-store}/config/chain.json (99%) rename {parity/secret_store => networks/secret-store}/config/config.toml (100%) rename {parity/secret_store => networks/secret-store}/config/password (100%) create mode 100644 networks/secret-store/keys/account1.json create mode 100644 networks/secret-store/keys/account2.json create mode 100644 networks/secret-store/keys/address_book.json rename {parity/secret_store => networks/secret-store}/keys/ss1.json (100%) delete mode 100755 parity/.env delete mode 100644 parity/README.md delete mode 100644 parity/docker-compose.yml diff --git a/compose-files/nodes/ganache_node.yml b/compose-files/nodes/ganache_node.yml index 23404be..76b7aed 100644 --- a/compose-files/nodes/ganache_node.yml +++ b/compose-files/nodes/ganache_node.yml @@ -2,6 +2,8 @@ version: '2.1' services: keeper-node: image: trufflesuite/ganache-cli:latest + command: + -d ports: - 8545:8545 networks: diff --git a/compose-files/nodes/kovan_node.yml b/compose-files/nodes/kovan_node.yml index eb4c8dc..924ee12 100644 --- a/compose-files/nodes/kovan_node.yml +++ b/compose-files/nodes/kovan_node.yml @@ -1,8 +1,7 @@ version: '2.1' services: keeper-node: - image: oceanprotocol/parity-ethereum:beta - entrypoint: /opt/parity/parity + image: parity/parity:stable command: --chain kovan --light diff --git a/compose-files/nodes/lake_node.yml b/compose-files/nodes/lake_node.yml new file mode 100644 index 0000000..86728cf --- /dev/null +++ b/compose-files/nodes/lake_node.yml @@ -0,0 +1,29 @@ +version: '2.1' +services: + keeper-node: + image: parity/parity:stable + command: + --config /home/parity/parity/config/config.toml + --db-path /home/parity/chains + --keys-path /home/parity/.local/share/io.parity.ethereum/keys + --base-path /home/parity/base + --engine-signer 0x00bd138abd70e2f00903268f3db08f2d25677c9e + --ws-interface all + --jsonrpc-cors all + --jsonrpc-interface all + --jsonrpc-hosts all + --jsonrpc-apis all + --unsafe-expose + --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e + volumes: + - ../networks/lake/config:/home/parity/parity/config + - keeper-node:/home/parity/.local/share/io.parity.ethereum/ + - ../networks/lake/authorities/validator0.json:/home/parity/.local/share/io.parity.ethereum/keys/lake/validator.json + - ../networks/lake/keys:/home/parity/.local/share/io.parity.ethereum/keys/lake + - ../networks/lake/authorities/validator0.pwd:/home/parity/parity/validator.pwd + - ../networks/lake/node0.network.key:/home/parity/.local/share/io.parity.ethereum/network/key + ports: + - 8545:8545 + networks: + backend: + ipv4_address: 172.15.0.12 diff --git a/compose-files/nodes/pond_node.yml b/compose-files/nodes/pond_node.yml index 0d74921..251ff85 100644 --- a/compose-files/nodes/pond_node.yml +++ b/compose-files/nodes/pond_node.yml @@ -1,28 +1,21 @@ version: '2.1' services: keeper-node: - image: oceanprotocol/parity-ethereum:beta - entrypoint: /opt/parity/parity + image: parity/parity:stable command: - --config /home/parity/parity/config/secretstoreclient.toml - --db-path /home/parity/chains + --config /home/parity/parity/config/config.toml --keys-path /home/parity/.local/share/io.parity.ethereum/keys --base-path /home/parity/base - --engine-signer 0x00bd138abd70e2f00903268f3db08f2d25677c9e - --ws-interface all + --min-gas-price 0 + --reseal-min-period 0 --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all - --unsafe-expose - --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e volumes: - - ../parity/parity/config:/home/parity/parity/config - - keeper-node:/home/parity/.local/share/io.parity.ethereum/ - - ../parity/parity/authorities/validator0.json:/home/parity/.local/share/io.parity.ethereum/keys/ocean-network/validator.json - - ../parity/parity/keys:/home/parity/.local/share/io.parity.ethereum/keys/ocean-network - - ../parity/parity/authorities/validator0.pwd:/home/parity/parity/validator.pwd - - ../parity/parity/node0.network.key:/home/parity/.local/share/io.parity.ethereum/network/key + - ../networks/pond/config:/home/parity/parity/config + - ../networks/pond/keys/validator.pwd:/home/parity/parity/validator.pwd + - ../networks/pond/keys:/home/parity/.local/share/io.parity.ethereum/keys/pond ports: - 8545:8545 networks: diff --git a/compose-files/secret_store.yml b/compose-files/secret_store.yml index 68233fa..dc1d250 100644 --- a/compose-files/secret_store.yml +++ b/compose-files/secret_store.yml @@ -2,14 +2,17 @@ version: '2.1' services: secret-store: image: oceanprotocol/parity-ethereum:master - # entrypoint: tail -f /dev/null entrypoint: /opt/parity/parity command: - --config /etc/parity/secretstore/config.toml --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all + --config /etc/parity/secretstore/config.toml + --jsonrpc-cors all + --jsonrpc-interface all + --jsonrpc-hosts all + --jsonrpc-apis all volumes: - - ../parity/secret_store/config/:/etc/parity/secretstore/ - - secret-store:/parity_data/ - - ../parity/secret_store/keys/:/parity_data/keys/ocean-network/ + - ../parity/secret-store/config/:/etc/parity/secretstore/ + - secret-store:/secret-store/ + - ../parity/secret-store/keys/:/secret-store/keys/secretstore/ ports: - 12000:12000 - 12001 @@ -31,8 +34,7 @@ services: command: nginx -g 'daemon off;' secret-store-signing-node: - image: oceanprotocol/parity-ethereum:master - entrypoint: /opt/parity/parity + image: parity/parity:stable command: --chain dev --light @@ -43,7 +45,7 @@ services: ports: - 9545:8545 volumes: - - ../parity/parity/keys:/home/parity/.local/keys/DevelopmentChain:ro + - ../parity/secret-store/keys:/home/parity/.local/keys/DevelopmentChain:ro networks: backend: ipv4_address: 172.15.0.18 \ No newline at end of file diff --git a/parity/parity/authorities/validator0.json b/networks/lake/authorities/validator0.json similarity index 100% rename from parity/parity/authorities/validator0.json rename to networks/lake/authorities/validator0.json diff --git a/parity/parity/authorities/validator0.pwd b/networks/lake/authorities/validator0.pwd similarity index 100% rename from parity/parity/authorities/validator0.pwd rename to networks/lake/authorities/validator0.pwd diff --git a/parity/parity/authorities/validator1.json b/networks/lake/authorities/validator1.json similarity index 100% rename from parity/parity/authorities/validator1.json rename to networks/lake/authorities/validator1.json diff --git a/parity/parity/authorities/validator1.pwd b/networks/lake/authorities/validator1.pwd similarity index 100% rename from parity/parity/authorities/validator1.pwd rename to networks/lake/authorities/validator1.pwd diff --git a/parity/parity/authorities/validator2.json b/networks/lake/authorities/validator2.json similarity index 100% rename from parity/parity/authorities/validator2.json rename to networks/lake/authorities/validator2.json diff --git a/parity/parity/authorities/validator2.pwd b/networks/lake/authorities/validator2.pwd similarity index 100% rename from parity/parity/authorities/validator2.pwd rename to networks/lake/authorities/validator2.pwd diff --git a/parity/parity/config/chain.json b/networks/lake/config/chain.json similarity index 98% rename from parity/parity/config/chain.json rename to networks/lake/config/chain.json index f2a61e7..4ae1041 100644 --- a/parity/parity/config/chain.json +++ b/networks/lake/config/chain.json @@ -1,5 +1,5 @@ { - "name": "ocean-network", + "name": "lake", "engine": { "authorityRound": { "params": { @@ -20,7 +20,7 @@ "params": { "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", - "networkID": "0x2324", + "networkID": "0x2323", "gasLimitBoundDivisor": "0x400", "eip140Transition": 0, "eip211Transition": 0, diff --git a/parity/parity/config/secretstoreclient.toml b/networks/lake/config/config.toml similarity index 100% rename from parity/parity/config/secretstoreclient.toml rename to networks/lake/config/config.toml diff --git a/parity/parity/config/member.toml b/networks/lake/config/member.toml similarity index 100% rename from parity/parity/config/member.toml rename to networks/lake/config/member.toml diff --git a/parity/parity/config/validator.toml b/networks/lake/config/validator.toml similarity index 100% rename from parity/parity/config/validator.toml rename to networks/lake/config/validator.toml diff --git a/parity/parity/keys/account1.json b/networks/lake/keys/account1.json similarity index 100% rename from parity/parity/keys/account1.json rename to networks/lake/keys/account1.json diff --git a/parity/parity/keys/account2.json b/networks/lake/keys/account2.json similarity index 100% rename from parity/parity/keys/account2.json rename to networks/lake/keys/account2.json diff --git a/parity/parity/keys/address_book.json b/networks/lake/keys/address_book.json similarity index 100% rename from parity/parity/keys/address_book.json rename to networks/lake/keys/address_book.json diff --git a/parity/parity/keys/master0.json b/networks/lake/keys/master0.json similarity index 100% rename from parity/parity/keys/master0.json rename to networks/lake/keys/master0.json diff --git a/parity/parity/keys/master1.json b/networks/lake/keys/master1.json similarity index 100% rename from parity/parity/keys/master1.json rename to networks/lake/keys/master1.json diff --git a/parity/parity/keys/validator.json b/networks/lake/keys/validator.json similarity index 100% rename from parity/parity/keys/validator.json rename to networks/lake/keys/validator.json diff --git a/parity/parity/node0.network.key b/networks/lake/node0.network.key similarity index 100% rename from parity/parity/node0.network.key rename to networks/lake/node0.network.key diff --git a/parity/parity/node1.network.key b/networks/lake/node1.network.key similarity index 100% rename from parity/parity/node1.network.key rename to networks/lake/node1.network.key diff --git a/parity/parity/node2.network.key b/networks/lake/node2.network.key similarity index 100% rename from parity/parity/node2.network.key rename to networks/lake/node2.network.key diff --git a/networks/pond/config/chain.json b/networks/pond/config/chain.json new file mode 100644 index 0000000..3a6c384 --- /dev/null +++ b/networks/pond/config/chain.json @@ -0,0 +1,155 @@ +{ + "name": "pond", + "engine": { + "instantSeal": null + }, + "params": { + "gasLimitBoundDivisor": "0x0400", + "accountStartNonce": "0x0", + "maximumExtraDataSize": "0x20", + "minGasLimit": "0x1388", + "networkID": "0x2324", + "registrar": "0x0000000000000000000000000000000000001337", + "eip150Transition": "0x0", + "eip160Transition": "0x0", + "eip161abcTransition": "0x0", + "eip161dTransition": "0x0", + "eip155Transition": "0x0", + "eip98Transition": "0x7fffffffffffff", + "eip86Transition": "0x7fffffffffffff", + "maxCodeSize": 24576, + "maxCodeSizeTransition": "0x0", + "eip140Transition": "0x0", + "eip211Transition": "0x0", + "eip214Transition": "0x0", + "eip658Transition": "0x0", + "wasmActivationTransition": "0x0" + }, + "genesis": { + "seal": { + "generic": "0x0" + }, + "difficulty": "0x20000", + "author": "0x0000000000000000000000000000000000000000", + "timestamp": "0x00", + "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "extraData": "0x", + "gasLimit": "0x165A0BC00" + }, + "accounts": { + "0x0000000000000000000000000000000000000001": { + "balance": "1", + "builtin": { + "name": "ecrecover", + "pricing": { + "linear": { + "base": 3000, + "word": 0 + } + } + } + }, + "0x0000000000000000000000000000000000000002": { + "balance": "1", + "builtin": { + "name": "sha256", + "pricing": { + "linear": { + "base": 60, + "word": 12 + } + } + } + }, + "0x0000000000000000000000000000000000000003": { + "balance": "1", + "builtin": { + "name": "ripemd160", + "pricing": { + "linear": { + "base": 600, + "word": 120 + } + } + } + }, + "0x0000000000000000000000000000000000000004": { + "balance": "1", + "builtin": { + "name": "identity", + "pricing": { + "linear": { + "base": 15, + "word": 3 + } + } + } + }, + "0x0000000000000000000000000000000000000005": { + "balance": "1", + "builtin": { + "name": "modexp", + "activate_at": 0, + "pricing": { + "modexp": { + "divisor": 20 + } + } + } + }, + "0x0000000000000000000000000000000000000006": { + "balance": "1", + "builtin": { + "name": "alt_bn128_add", + "activate_at": 0, + "pricing": { + "linear": { + "base": 500, + "word": 0 + } + } + } + }, + "0x0000000000000000000000000000000000000007": { + "balance": "1", + "builtin": { + "name": "alt_bn128_mul", + "activate_at": 0, + "pricing": { + "linear": { + "base": 40000, + "word": 0 + } + } + } + }, + "0x0000000000000000000000000000000000000008": { + "balance": "1", + "builtin": { + "name": "alt_bn128_pairing", + "activate_at": 0, + "pricing": { + "alt_bn128_pairing": { + "base": 100000, + "pair": 80000 + } + } + } + }, + "0x6B0c56d1Ad5144b4d37fa6e27DC9afd5C2435c3B": { + "balance": "0x200000000000000000000000000000000000000000000000" + }, + "0x0011598De1016A350ad719D23586273804076774": { + "balance": "0x200000000000000000000000000000000000000000000000" + }, + "0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0": { + "balance": "0x200000000000000000000000000000000000000000000000" + }, + "0xa99d43d86a0758d5632313b8fa3972b6088a21bb": { + "balance": "0x200000000000000000000000000000000000000000000000" + }, + "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e": { + "balance": "0x200000000000000000000000000000000000000000000000" + } + } +} \ No newline at end of file diff --git a/networks/pond/config/config.toml b/networks/pond/config/config.toml new file mode 100644 index 0000000..215fd8c --- /dev/null +++ b/networks/pond/config/config.toml @@ -0,0 +1,18 @@ +# Users config file in users.toml +# This configuration file can be used for either Alice, Bob or Charlie + +[parity] +chain = "/home/parity/parity/config/chain.json" + +[rpc] +port = 8545 +interface = "0.0.0.0" +cors = ["all"] +hosts = ["all"] +apis = ["all"] + +[mining] +engine_signer = "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e" + +[account] +password = ["/home/parity/parity/validator.pwd"] \ No newline at end of file diff --git a/parity/secret_store/keys/account1.json b/networks/pond/keys/account1.json similarity index 100% rename from parity/secret_store/keys/account1.json rename to networks/pond/keys/account1.json diff --git a/parity/secret_store/keys/account2.json b/networks/pond/keys/account2.json similarity index 100% rename from parity/secret_store/keys/account2.json rename to networks/pond/keys/account2.json diff --git a/parity/secret_store/keys/address_book.json b/networks/pond/keys/address_book.json similarity index 100% rename from parity/secret_store/keys/address_book.json rename to networks/pond/keys/address_book.json diff --git a/networks/pond/keys/validator.json b/networks/pond/keys/validator.json new file mode 100644 index 0000000..f3eee24 --- /dev/null +++ b/networks/pond/keys/validator.json @@ -0,0 +1,23 @@ +{ + "id": "0902d04b-f26e-5c1f-e3ae-78d2c1cb16e7", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "6a829fe7bc656d85f6c2e9fd21784952" + }, + "ciphertext": "1bfec0b054a648af8fdd0e85662206c65a4af0ed15fede4ad41ca9ab7b504ce2", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "95f96b5ee22dd537e06076eb8d7078eb7275d29af935782fe476696b11be50e5" + }, + "mac": "4af2215c3cd9447a5b0512d7d1c3ea5a4435981e1c8f48bf71d7a49c0e5b4986" + }, + "address": "00bd138abd70e2f00903268f3db08f2d25677c9e", + "name": "Validator0", + "meta": "{}" +} + diff --git a/networks/pond/keys/validator.pwd b/networks/pond/keys/validator.pwd new file mode 100644 index 0000000..ce118da --- /dev/null +++ b/networks/pond/keys/validator.pwd @@ -0,0 +1 @@ +node0 diff --git a/parity/secret_store/config/chain.json b/networks/secret-store/config/chain.json similarity index 99% rename from parity/secret_store/config/chain.json rename to networks/secret-store/config/chain.json index 2159599..e1f1ea4 100644 --- a/parity/secret_store/config/chain.json +++ b/networks/secret-store/config/chain.json @@ -1,5 +1,5 @@ { - "name": "ocean-network", + "name": "secrestore", "engine": { "authorityRound": { "params": { diff --git a/parity/secret_store/config/config.toml b/networks/secret-store/config/config.toml similarity index 100% rename from parity/secret_store/config/config.toml rename to networks/secret-store/config/config.toml diff --git a/parity/secret_store/config/password b/networks/secret-store/config/password similarity index 100% rename from parity/secret_store/config/password rename to networks/secret-store/config/password diff --git a/networks/secret-store/keys/account1.json b/networks/secret-store/keys/account1.json new file mode 100644 index 0000000..2226e59 --- /dev/null +++ b/networks/secret-store/keys/account1.json @@ -0,0 +1,22 @@ +{ + "id": "50aa801a-8d66-1402-1fa4-d8987868c2ce", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "a874e6fe50a5bb088826c45560dc1b7e" + }, + "ciphertext": "2383c6aa50c744b6558e77b5dcec6137f647c81f10f71f22a87321fd1306056c", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "eca6ccc9fbb0bdc3a516c7576808ba5031669e6878f3bb95624ddb46449e119c" + }, + "mac": "14e9a33a45ae32f88a0bd5aac14521c1fcf14f56fd55c1a1c080b2f81ddb8d44" + }, + "address": "068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0", + "name": "", + "meta": "{}" +} diff --git a/networks/secret-store/keys/account2.json b/networks/secret-store/keys/account2.json new file mode 100644 index 0000000..7409b18 --- /dev/null +++ b/networks/secret-store/keys/account2.json @@ -0,0 +1,22 @@ +{ + "id": "ce455fdd-11fd-5a71-0a31-9d0bec6a605d", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "56b27c187d45aab59377869042b948aa" + }, + "ciphertext": "c774b879793e2e54b85071d929cc7fbb11b47f6bab6e590edf3997fe4373eaf8", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "33b3b99e4c6f7f6d7d804555d40c08e4a2acba20e1e46aca712c82c3b9bab749" + }, + "mac": "10ee295ce6b1553887413f0e717ccedc1bddb62572bb9208ec3bd091085990db" + }, + "address": "a99d43d86a0758d5632313b8fa3972b6088a21bb", + "name": "", + "meta": "{}" +} diff --git a/networks/secret-store/keys/address_book.json b/networks/secret-store/keys/address_book.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/networks/secret-store/keys/address_book.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/parity/secret_store/keys/ss1.json b/networks/secret-store/keys/ss1.json similarity index 100% rename from parity/secret_store/keys/ss1.json rename to networks/secret-store/keys/ss1.json diff --git a/parity/.env b/parity/.env deleted file mode 100755 index c94bcb8..0000000 --- a/parity/.env +++ /dev/null @@ -1 +0,0 @@ -NETWORK_NAME=ocean-network diff --git a/parity/README.md b/parity/README.md deleted file mode 100644 index d553e18..0000000 --- a/parity/README.md +++ /dev/null @@ -1,111 +0,0 @@ -# Ocean private test net using Proof Of Authority consensus -### Setup - -0. Install [docker](https://docs.docker.com/engine/installation/) and [docker-compose](https://docs.docker.com/compose/install/) -1. Run `git clone https://github.com/oceanprotocol/docker-images.git` -2. Run `cd docker-images/parity` -3. Run `docker-compose up ` (add `-d` to run in daemon mode) -4. This will run 3 validator/authority nodes and 1 user node - -### Access JSON RPC -Access JSON RPC at [http://127.0.0.1:8545](http://127.0.0.1:8545). - -### Some handy curl commands - -### Send transaction -``` -curl --data '{"jsonrpc":"2.0","method":"personal_sendTransaction","params":[{"from":"0x
","to":"0x
","value":"0x"}, ""],"id":0}' -H "Content-Type: application/json" -X POST localhost:8545 -``` - -#### Unlock account -replace `null` with number of seconds to indicate how long account will be unlocked -Account address goes in the first param (here is's just "0x") -``` -curl --data '{"method":"personal_unlockAccount","params":["0x","hunter2",null],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545 - -``` - -### New account -Using just a password -``` -curl --data '{"method":"personal_newAccount","params":["password-hunter2"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545 -``` - -Using a recovery phrase and password -``` -curl --data '{"method":"parity_newAccountFromPhrase","params":["stylus outing overhand dime radial seducing harmless uselessly evasive tastiness eradicate imperfect","hunter2"],"id":1,"jsonrpc":"2.0"}' -H "Content-Type: application/json" -X POST localhost:8545 -``` - -Refer to these sources for more goodies: -* https://github.com/paritytech/wiki -* https://github.com/paritytech/wiki/blob/master/JSONRPC-personal-module.md -* https://github.com/paritytech/wiki/blob/master/JSONRPC-parity_accounts-module.md - -### Instructions to add a validator node using Docker Compose -* Run the private network as described above -* Create a new validator account: - `curl --data '{"jsonrpc":"2.0","method":"parity_newAccountFromPhrase","params":["nodeX-phrase", "nodeX-password"],"id":0}' -H "Content-Type: application/json" -X POST localhost:8545` - * Returns something like this: `{"jsonrpc":"2.0","result":"0x00aa39d30f0d20ff03a22ccfc30b7efbfca597c2","id":0}` -* Copy the file `parity/keys/UTC--2018-05-22T13-53-28Z--ed4d9a7c-4206-bbf3-673c-fdd1d41b4dcb` to `parity/authorities` and rename it to `validatorX.json` (pick a better name) then modify the contents to improve indentation (optional) -* Add a simple text file named `validatorX.pwd` in `parity/authorities` and add the password `nodeX-password` (or whatever was specified in the "params":["nodeX-phrase", "nodeX-password"]) -* Copy/paste a validator image definition section in the docker-compose.yml file and modify it to reflect the new node name and make sure to point to the new `validatorX.json` and `validayorX.pwd` files. - * This is what will be added to the docker-compose.yml file: -``` - validatorX: - image: parity/parity:stable - command: - --config /parity/config/validator.toml - --engine-signer 0x00aa39d30f0d20ff03a22ccfc30b7efbfca597c2 - volumes: - - ./parity/config:/parity/config:ro - - validatorX:/root/.local/share/io.parity.ethereum/ - - ./parity/authorities/validatorX.json:/root/.local/share/io.parity.ethereum/keys/${NETWORK_NAME}/validator.json:ro - - ./parity/authorities/validatorX.pwd:/parity/validator.pwd:ro - - ./parity/nodeX.network.key:/root/.local/share/io.parity.ethereum/network/key:ro - networks: - my_net: - ipv4_address: 172.16.0.13 - -``` - * Make sure to assign a new `ipv4_address` address - * Specify the new account address in the --engine-signer option - * And add the name in the volumes section in the compose file: -``` -volumes: - validator0: - validator1: - validator2: - validatorX: - -``` -* Generate a new bootnode key and add it here `docker-images/parity/parity/nodeX.network.key` -* Get an enode address and add it in both `member.toml` and `validator.toml` files in the bootnodes list under `[network]` -* Update the validators list in `chain.json` by adding the new account to the existing list - - -## Notes -* We ran into an issue with running smart contracts where a function in one contract fails if it calls a function of another contract - * This problem is fixed by adding the following lines to the `chain.json` file to enable byzantium mode in the EVM: -``` - "eip140Transition": 0, - "eip211Transition": 0, - "eip214Transition": 0, - "eip658Transition": 0 -``` - * The problem is reported in `https://github.com/paritytech/parity/issues/8503` and `https://github.com/ethereum/solidity/issues/3969` - -## The ocean test net -The private test net is running on Azure VM `ocn-hackaton` with ip address `40.115.16.244` - -To connect to the network, provide the ip address and use port `8545` - -To deploy keeper-contracts, use the following in your truffle.js file: -``` -ocean_poa_net: { - host: 'http://40.115.16.244', - port: 8545, - network_id: '*', - gas: 6000000, - from: "0x00bd138abd70e2f00903268f3db08f2d25677c9e" -}, -``` \ No newline at end of file diff --git a/parity/docker-compose.yml b/parity/docker-compose.yml deleted file mode 100644 index 9e6f2b8..0000000 --- a/parity/docker-compose.yml +++ /dev/null @@ -1,88 +0,0 @@ -version: '2.1' -services: - validator0: - image: parity/parity:stable - command: - --config /parity/config/validator.toml - --engine-signer 0x00bd138abd70e2f00903268f3db08f2d25677c9e - --jsonrpc-interface 0.0.0.0 - --ws-interface 0.0.0.0 - --ui-interface 0.0.0.0 - --unsafe-expose - --jsonrpc-cors all - --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e - volumes: - - ./parity/config:/parity/config:ro - - validator0:/root/.local/share/io.parity.ethereum/ - - ./parity/authorities/validator0.json:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}/validator.json:ro - - ./parity/keys:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME} - - ./parity/authorities/validator0.pwd:/parity/validator.pwd:ro - - ./parity/node0.network.key:/root/.local/share/io.parity.ethereum/network/key:ro - ports: - - 8545:8545 - networks: - my_net: - ipv4_address: 172.16.0.10 - - validator1: - image: parity/parity:stable - command: - --config /parity/config/validator.toml - --engine-signer 0x00aa39d30f0d20ff03a22ccfc30b7efbfca597c2 - volumes: - - ./parity/config:/parity/config:ro - - validator1:/root/.local/share/io.parity.ethereum/ - - ./parity/authorities/validator1.json:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}/validator.json:ro - - ./parity/authorities/validator1.pwd:/parity/validator.pwd:ro - - ./parity/node1.network.key:/root/.local/share/io.parity.ethereum/network/key:ro - networks: - my_net: - ipv4_address: 172.16.0.11 - - validator2: - image: parity/parity:stable - command: - --config /parity/config/validator.toml - --engine-signer 0x002e28950558fbede1a9675cb113f0bd20912019 - volumes: - - ./parity/config:/parity/config:ro - - validator2:/root/.local/share/io.parity.ethereum/ - - ./parity/authorities/validator2.json:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME}/validator.json:ro - - ./parity/authorities/validator2.pwd:/parity/validator.pwd:ro - - ./parity/node2.network.key:/root/.local/share/io.parity.ethereum/network/key:ro - networks: - my_net: - ipv4_address: 172.16.0.12 - - user0: - image: parity/parity:stable - command: - --config /parity/config/member.toml - --jsonrpc-interface 0.0.0.0 - --ws-interface 0.0.0.0 - --ui-interface 0.0.0.0 - --unsafe-expose - volumes: - - ./parity/config:/parity/config:ro - - ./parity/keys:/root/.local/share/io.parity.ethereum/keys/${KEEPER_NETWORK_NAME} - ports: - - 8180:8180 - - 8546:8546 - - 30303:30303 - networks: - my_net: - ipv4_address: 172.16.0.20 - - -volumes: - validator0: - validator1: - validator2: -networks: - my_net: - driver: bridge - ipam: - driver: default - config: - - subnet: 172.16.0.1/24 - gateway: 172.16.0.1 diff --git a/start_ocean.sh b/start_ocean.sh index 76af9a2..e8d35d2 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -68,6 +68,18 @@ while :; do COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/pleuston.yml/} printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET ;; + --no-brizo) + COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/brizo.yml/} + printf $COLOR_Y'Starting without Brizo...\n\n'$COLOR_RESET + ;; + --no-aquarius) + COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius.yml/} + printf $COLOR_Y'Starting without Aquarius...\n\n'$COLOR_RESET + ;; + --no-secret-store) + COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/secret_store.yml/} + printf $COLOR_Y'Starting without Secret Store...\n\n'$COLOR_RESET + ;; ################################################# # Contract/Storage switches ################################################# From d6577aa6927021e74d042e8a23010107030d0919 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 10:58:28 +0100 Subject: [PATCH 16/33] renamed pond -> spree, lake -> nile --- .../nodes/{lake_node.yml => nile_node.yml} | 10 +++--- .../nodes/{pond_node.yml => spree_node.yml} | 6 ++-- compose-files/secret_store.yml | 6 ++-- .../authorities/validator0.json | 0 .../{lake => nile}/authorities/validator0.pwd | 0 .../authorities/validator1.json | 0 .../{lake => nile}/authorities/validator1.pwd | 0 .../authorities/validator2.json | 0 .../{lake => nile}/authorities/validator2.pwd | 0 networks/{lake => nile}/config/chain.json | 2 +- networks/{lake => nile}/config/config.toml | 0 networks/{lake => nile}/config/member.toml | 0 networks/{lake => nile}/config/validator.toml | 0 networks/{lake => nile}/keys/account1.json | 0 networks/{lake => nile}/keys/account2.json | 0 .../{lake => nile}/keys/address_book.json | 0 networks/{lake => nile}/keys/master0.json | 0 networks/{lake => nile}/keys/master1.json | 0 networks/{lake => nile}/keys/validator.json | 0 networks/{lake => nile}/node0.network.key | 0 networks/{lake => nile}/node1.network.key | 0 networks/{lake => nile}/node2.network.key | 0 networks/{pond => spree}/config/chain.json | 2 +- networks/{pond => spree}/config/config.toml | 0 networks/{pond => spree}/keys/account1.json | 0 networks/{pond => spree}/keys/account2.json | 0 .../{pond => spree}/keys/address_book.json | 0 networks/{pond => spree}/keys/validator.json | 0 networks/{pond => spree}/keys/validator.pwd | 0 start_ocean.sh | 31 +++++++++---------- 30 files changed, 28 insertions(+), 29 deletions(-) rename compose-files/nodes/{lake_node.yml => nile_node.yml} (66%) rename compose-files/nodes/{pond_node.yml => spree_node.yml} (69%) rename networks/{lake => nile}/authorities/validator0.json (100%) rename networks/{lake => nile}/authorities/validator0.pwd (100%) rename networks/{lake => nile}/authorities/validator1.json (100%) rename networks/{lake => nile}/authorities/validator1.pwd (100%) rename networks/{lake => nile}/authorities/validator2.json (100%) rename networks/{lake => nile}/authorities/validator2.pwd (100%) rename networks/{lake => nile}/config/chain.json (99%) rename networks/{lake => nile}/config/config.toml (100%) rename networks/{lake => nile}/config/member.toml (100%) rename networks/{lake => nile}/config/validator.toml (100%) rename networks/{lake => nile}/keys/account1.json (100%) rename networks/{lake => nile}/keys/account2.json (100%) rename networks/{lake => nile}/keys/address_book.json (100%) rename networks/{lake => nile}/keys/master0.json (100%) rename networks/{lake => nile}/keys/master1.json (100%) rename networks/{lake => nile}/keys/validator.json (100%) rename networks/{lake => nile}/node0.network.key (100%) rename networks/{lake => nile}/node1.network.key (100%) rename networks/{lake => nile}/node2.network.key (100%) rename networks/{pond => spree}/config/chain.json (99%) rename networks/{pond => spree}/config/config.toml (100%) rename networks/{pond => spree}/keys/account1.json (100%) rename networks/{pond => spree}/keys/account2.json (100%) rename networks/{pond => spree}/keys/address_book.json (100%) rename networks/{pond => spree}/keys/validator.json (100%) rename networks/{pond => spree}/keys/validator.pwd (100%) diff --git a/compose-files/nodes/lake_node.yml b/compose-files/nodes/nile_node.yml similarity index 66% rename from compose-files/nodes/lake_node.yml rename to compose-files/nodes/nile_node.yml index 86728cf..990da8a 100644 --- a/compose-files/nodes/lake_node.yml +++ b/compose-files/nodes/nile_node.yml @@ -16,12 +16,12 @@ services: --unsafe-expose --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e volumes: - - ../networks/lake/config:/home/parity/parity/config + - ../networks/nile/config:/home/parity/parity/config - keeper-node:/home/parity/.local/share/io.parity.ethereum/ - - ../networks/lake/authorities/validator0.json:/home/parity/.local/share/io.parity.ethereum/keys/lake/validator.json - - ../networks/lake/keys:/home/parity/.local/share/io.parity.ethereum/keys/lake - - ../networks/lake/authorities/validator0.pwd:/home/parity/parity/validator.pwd - - ../networks/lake/node0.network.key:/home/parity/.local/share/io.parity.ethereum/network/key + - ../networks/nile/authorities/validator0.json:/home/parity/.local/share/io.parity.ethereum/keys/nile/validator.json + - ../networks/nile/keys:/home/parity/.local/share/io.parity.ethereum/keys/nile + - ../networks/nile/authorities/validator0.pwd:/home/parity/parity/validator.pwd + - ../networks/nile/node0.network.key:/home/parity/.local/share/io.parity.ethereum/network/key ports: - 8545:8545 networks: diff --git a/compose-files/nodes/pond_node.yml b/compose-files/nodes/spree_node.yml similarity index 69% rename from compose-files/nodes/pond_node.yml rename to compose-files/nodes/spree_node.yml index 251ff85..8e9adde 100644 --- a/compose-files/nodes/pond_node.yml +++ b/compose-files/nodes/spree_node.yml @@ -13,9 +13,9 @@ services: --jsonrpc-hosts all --jsonrpc-apis all volumes: - - ../networks/pond/config:/home/parity/parity/config - - ../networks/pond/keys/validator.pwd:/home/parity/parity/validator.pwd - - ../networks/pond/keys:/home/parity/.local/share/io.parity.ethereum/keys/pond + - ../networks/spree/config:/home/parity/parity/config + - ../networks/spree/keys/validator.pwd:/home/parity/parity/validator.pwd + - ../networks/spree/keys:/home/parity/.local/share/io.parity.ethereum/keys/spree ports: - 8545:8545 networks: diff --git a/compose-files/secret_store.yml b/compose-files/secret_store.yml index dc1d250..9dbf625 100644 --- a/compose-files/secret_store.yml +++ b/compose-files/secret_store.yml @@ -10,9 +10,9 @@ services: --jsonrpc-hosts all --jsonrpc-apis all volumes: - - ../parity/secret-store/config/:/etc/parity/secretstore/ + - ../networks/secret-store/config/:/etc/parity/secretstore/ - secret-store:/secret-store/ - - ../parity/secret-store/keys/:/secret-store/keys/secretstore/ + - ../networks/secret-store/keys/:/secret-store/keys/secretstore/ ports: - 12000:12000 - 12001 @@ -45,7 +45,7 @@ services: ports: - 9545:8545 volumes: - - ../parity/secret-store/keys:/home/parity/.local/keys/DevelopmentChain:ro + - ../networks/secret-store/keys:/home/parity/.local/keys/DevelopmentChain:ro networks: backend: ipv4_address: 172.15.0.18 \ No newline at end of file diff --git a/networks/lake/authorities/validator0.json b/networks/nile/authorities/validator0.json similarity index 100% rename from networks/lake/authorities/validator0.json rename to networks/nile/authorities/validator0.json diff --git a/networks/lake/authorities/validator0.pwd b/networks/nile/authorities/validator0.pwd similarity index 100% rename from networks/lake/authorities/validator0.pwd rename to networks/nile/authorities/validator0.pwd diff --git a/networks/lake/authorities/validator1.json b/networks/nile/authorities/validator1.json similarity index 100% rename from networks/lake/authorities/validator1.json rename to networks/nile/authorities/validator1.json diff --git a/networks/lake/authorities/validator1.pwd b/networks/nile/authorities/validator1.pwd similarity index 100% rename from networks/lake/authorities/validator1.pwd rename to networks/nile/authorities/validator1.pwd diff --git a/networks/lake/authorities/validator2.json b/networks/nile/authorities/validator2.json similarity index 100% rename from networks/lake/authorities/validator2.json rename to networks/nile/authorities/validator2.json diff --git a/networks/lake/authorities/validator2.pwd b/networks/nile/authorities/validator2.pwd similarity index 100% rename from networks/lake/authorities/validator2.pwd rename to networks/nile/authorities/validator2.pwd diff --git a/networks/lake/config/chain.json b/networks/nile/config/chain.json similarity index 99% rename from networks/lake/config/chain.json rename to networks/nile/config/chain.json index 4ae1041..5d9c4fe 100644 --- a/networks/lake/config/chain.json +++ b/networks/nile/config/chain.json @@ -1,5 +1,5 @@ { - "name": "lake", + "name": "nile", "engine": { "authorityRound": { "params": { diff --git a/networks/lake/config/config.toml b/networks/nile/config/config.toml similarity index 100% rename from networks/lake/config/config.toml rename to networks/nile/config/config.toml diff --git a/networks/lake/config/member.toml b/networks/nile/config/member.toml similarity index 100% rename from networks/lake/config/member.toml rename to networks/nile/config/member.toml diff --git a/networks/lake/config/validator.toml b/networks/nile/config/validator.toml similarity index 100% rename from networks/lake/config/validator.toml rename to networks/nile/config/validator.toml diff --git a/networks/lake/keys/account1.json b/networks/nile/keys/account1.json similarity index 100% rename from networks/lake/keys/account1.json rename to networks/nile/keys/account1.json diff --git a/networks/lake/keys/account2.json b/networks/nile/keys/account2.json similarity index 100% rename from networks/lake/keys/account2.json rename to networks/nile/keys/account2.json diff --git a/networks/lake/keys/address_book.json b/networks/nile/keys/address_book.json similarity index 100% rename from networks/lake/keys/address_book.json rename to networks/nile/keys/address_book.json diff --git a/networks/lake/keys/master0.json b/networks/nile/keys/master0.json similarity index 100% rename from networks/lake/keys/master0.json rename to networks/nile/keys/master0.json diff --git a/networks/lake/keys/master1.json b/networks/nile/keys/master1.json similarity index 100% rename from networks/lake/keys/master1.json rename to networks/nile/keys/master1.json diff --git a/networks/lake/keys/validator.json b/networks/nile/keys/validator.json similarity index 100% rename from networks/lake/keys/validator.json rename to networks/nile/keys/validator.json diff --git a/networks/lake/node0.network.key b/networks/nile/node0.network.key similarity index 100% rename from networks/lake/node0.network.key rename to networks/nile/node0.network.key diff --git a/networks/lake/node1.network.key b/networks/nile/node1.network.key similarity index 100% rename from networks/lake/node1.network.key rename to networks/nile/node1.network.key diff --git a/networks/lake/node2.network.key b/networks/nile/node2.network.key similarity index 100% rename from networks/lake/node2.network.key rename to networks/nile/node2.network.key diff --git a/networks/pond/config/chain.json b/networks/spree/config/chain.json similarity index 99% rename from networks/pond/config/chain.json rename to networks/spree/config/chain.json index 3a6c384..3c11fe4 100644 --- a/networks/pond/config/chain.json +++ b/networks/spree/config/chain.json @@ -1,5 +1,5 @@ { - "name": "pond", + "name": "spree", "engine": { "instantSeal": null }, diff --git a/networks/pond/config/config.toml b/networks/spree/config/config.toml similarity index 100% rename from networks/pond/config/config.toml rename to networks/spree/config/config.toml diff --git a/networks/pond/keys/account1.json b/networks/spree/keys/account1.json similarity index 100% rename from networks/pond/keys/account1.json rename to networks/spree/keys/account1.json diff --git a/networks/pond/keys/account2.json b/networks/spree/keys/account2.json similarity index 100% rename from networks/pond/keys/account2.json rename to networks/spree/keys/account2.json diff --git a/networks/pond/keys/address_book.json b/networks/spree/keys/address_book.json similarity index 100% rename from networks/pond/keys/address_book.json rename to networks/spree/keys/address_book.json diff --git a/networks/pond/keys/validator.json b/networks/spree/keys/validator.json similarity index 100% rename from networks/pond/keys/validator.json rename to networks/spree/keys/validator.json diff --git a/networks/pond/keys/validator.pwd b/networks/spree/keys/validator.pwd similarity index 100% rename from networks/pond/keys/validator.pwd rename to networks/spree/keys/validator.pwd diff --git a/start_ocean.sh b/start_ocean.sh index e8d35d2..d3f5deb 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -4,12 +4,15 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" COMPOSE_DIR="${DIR}/compose-files" export PROJECT_NAME="ocean" +# default to latest versions +export OCEAN_VERSION=latest # keeper options export KEEPER_DEPLOY_CONTRACTS="true" export KEEPER_ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts -# Specify which ethereum client to run or connect to: development, kovan, or ocean_poa_net_local -export KEEPER_NETWORK_NAME="ocean_poa_net_local" +# Specify which ethereum client to run or connect to: development, kovan, spree or nile +export KEEPER_NETWORK_NAME="nile" +export NODE_FILE=${COMPOSE_DIR}/nodes/nile_node.yml # Ganache specific option, these two options have no effect when not running ganache-cli export GANACHE_DATABASE_PATH="${DIR}" @@ -41,10 +44,6 @@ function show_banner { show_banner -# default to latest versions -export OCEAN_VERSION=latest -export NODE_FILE=${COMPOSE_DIR}/nodes/pond_node.yml - COMPOSE_FILES="" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml" COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pleuston.yml" @@ -104,19 +103,19 @@ while :; do export KEEPER_DEPLOY_CONTRACTS="true" printf $COLOR_Y'Starting with local Ganache node...\n\n'$COLOR_RESET ;; - # connects you to ocean testnet - --local-lake-node) - export NODE_FILE=${COMPOSE_DIR}/nodes/lake_node.yml - export KEEPER_NETWORK_NAME="ocean_poa_aws" - printf $COLOR_Y'Starting with local Lake node...\n\n'$COLOR_RESET + # connects you to nile ocean testnet + --local-nile-node) + export NODE_FILE=${COMPOSE_DIR}/nodes/nile_node.yml + export KEEPER_NETWORK_NAME="nile" + printf $COLOR_Y'Starting with local Nile node...\n\n'$COLOR_RESET ;; - # spins up pond local testnet - --local-pond-node) + # spins up spree local testnet + --local-spree-node) COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml" - export NODE_FILE=${COMPOSE_DIR}/nodes/pond_node.yml - export KEEPER_NETWORK_NAME="ocean_poa_net_local" + export NODE_FILE=${COMPOSE_DIR}/nodes/spree_node.yml + export KEEPER_NETWORK_NAME="spree" export KEEPER_DEPLOY_CONTRACTS="true" - printf $COLOR_Y'Starting with local Pond node...\n\n'$COLOR_RESET + printf $COLOR_Y'Starting with local Spree node...\n\n'$COLOR_RESET ;; ################################################# # Cleaning switches From 26507b0677438618cf226c4d2a37770097867c7b Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 11:42:23 +0100 Subject: [PATCH 17/33] remove dapps --- networks/secret-store/config/config.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/networks/secret-store/config/config.toml b/networks/secret-store/config/config.toml index 07ff86b..be5cf44 100644 --- a/networks/secret-store/config/config.toml +++ b/networks/secret-store/config/config.toml @@ -16,9 +16,6 @@ hosts = ["all"] [ipc] disable = true -[dapps] -disable = true - [websockets] disable = true From af01fc38d58dc8833d01647dec4b75226725501a Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 11:42:29 +0100 Subject: [PATCH 18/33] fix typo --- networks/secret-store/config/chain.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networks/secret-store/config/chain.json b/networks/secret-store/config/chain.json index e1f1ea4..818c469 100644 --- a/networks/secret-store/config/chain.json +++ b/networks/secret-store/config/chain.json @@ -1,5 +1,5 @@ { - "name": "secrestore", + "name": "secretstore", "engine": { "authorityRound": { "params": { From b4d3c9f8ad21bcf37cf1036699bf4eb93e7f9f70 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 11:42:38 +0100 Subject: [PATCH 19/33] fix base path --- compose-files/secret_store.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/compose-files/secret_store.yml b/compose-files/secret_store.yml index 9dbf625..692873f 100644 --- a/compose-files/secret_store.yml +++ b/compose-files/secret_store.yml @@ -9,6 +9,7 @@ services: --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all + --base-path /secret-store/ volumes: - ../networks/secret-store/config/:/etc/parity/secretstore/ - secret-store:/secret-store/ From b094bc782ca254325d51784327194bc6e227806b Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 11:42:53 +0100 Subject: [PATCH 20/33] remove orphans --- start_ocean.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_ocean.sh b/start_ocean.sh index d3f5deb..c1ca883 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -142,7 +142,7 @@ while :; do ;; *) printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET - docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_FILE} up + docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_FILE} up --remove-orphans break esac shift From cc0c24c8a7be97a206d8b6faf15adfb77152a515 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Thu, 6 Dec 2018 12:19:38 +0100 Subject: [PATCH 21/33] Updated nile network configuration files --- networks/nile/config/chain.json | 76 +++++++++++++++++++++++++------- networks/nile/config/config.toml | 5 ++- 2 files changed, 63 insertions(+), 18 deletions(-) diff --git a/networks/nile/config/chain.json b/networks/nile/config/chain.json index 5d9c4fe..2d5a8aa 100644 --- a/networks/nile/config/chain.json +++ b/networks/nile/config/chain.json @@ -6,14 +6,14 @@ "stepDuration": "1", "validators": { "list": [ - "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e", - "0x00Aa39d30F0D20FF03a22cCfc30B7EfbFca597C2", - "0x002e28950558fbede1a9675cb113f0bd20912019" + "0xa1345ed0b2d1e193aead673e33dac56515af128a", + "0xf4a2dbd5d67ef3019a7e4b188b92128c86d76bf9", + "0xcdbe5f61fac89e2cfcfa3727805d5cb8bc4f9afd" ] }, "validateScoreTransition": 1000000000, "validateStepTransition": 1500000000, - "maximumUncleCount": 1000000000 + "maximumUncleCount": 1000000000 } } }, @@ -26,7 +26,6 @@ "eip211Transition": 0, "eip214Transition": 0, "eip658Transition": 0 - }, "genesis": { "seal": { @@ -87,20 +86,65 @@ } } }, - "0x6B0c56d1Ad5144b4d37fa6e27DC9afd5C2435c3B": { - "balance": "0x200000000000000000000000000000000000000000000000" + "0xf5d60efcad44babc8d85eb8df57d9e3a5101eb93": { + "balance": "0x2000000000000000000" }, - "0x0011598De1016A350ad719D23586273804076774": { - "balance": "0x200000000000000000000000000000000000000000000000" + "0x61f9546cd2bd5e46bdb915ab9c69210c6ee043d2": { + "balance": "0x2000000000000000000" }, - "0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0": { - "balance": "0x200000000000000000000000000000000000000000000000" + "0x8d968b9bc8fe3b1d233ae6238c771544dd7c8fb2": { + "balance": "0x2000000000000000000" }, - "0xa99d43d86a0758d5632313b8fa3972b6088a21bb": { - "balance": "0x200000000000000000000000000000000000000000000000" + "0x63132a33765fe352187c93e45fac1b9162399e5c": { + "balance": "0x2000000000000000000" }, - "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e": { - "balance": "0x200000000000000000000000000000000000000000000000" + "0x95a165da81359c11aafb4490fe6afeb6ee4f7c2e": { + "balance": "0x2000000000000000000" + }, + "0x9224dff492427471092d13b36866875d7e0f2dd6": { + "balance": "0x2000000000000000000" + }, + "0x9aa9bfa819800a44803dcacc514bb443a2baade6": { + "balance": "0x2000000000000000000" + }, + "0x85ef014983c1bad421cc00941c18122066da5860": { + "balance": "0x2000000000000000000" + }, + "0xc6fffcb664a60c019a335902112584829a91c0a0": { + "balance": "0x2000000000000000000" + }, + "0xdbb63fb51453714f5efed3c2846160018fb3f43c": { + "balance": "0x2000000000000000000" + }, + "0x23be64786fe4467635e65aea49f9dd7a0b05d7b5": { + "balance": "0x2000000000000000000" + }, + "0x3c80c7163c1e6730f2ba80df707178dcdee44475": { + "balance": "0x2000000000000000000" + }, + "0xe49c5f9c8a78884c8ba2aa161b8c41bf21b96751": { + "balance": "0x2000000000000000000" + }, + "0xf7f2673e854e7b33a62beec796dec5d61ac9c40a": { + "balance": "0x2000000000000000000" + }, + "0xe739ed3643970d106c4b1c51de91b7992400e50c": { + "balance": "0x2000000000000000000" + }, + "0x85a7273ff4f4ffce0c708f47ab45249867679bcf": { + "balance": "0x2000000000000000000" + }, + "0x4156e7abdfe6e08c16ef2b241661276af57f9ead": { + "balance": "0x2000000000000000000" + }, + "0x480b0e0a641ae45521377d4984d085a003934561": { + "balance": "0x200000000000000000000000" + }, + "0xb08eb95236499f072b2ae3c91a8f911d6c853b4d": { + "balance": "0x200000000000000000000000" + }, + "0x4899f06b5e60140f1885599bf3a562cb25775adc": { + "balance": "0x200000000000000000000000" } } -} \ No newline at end of file +} diff --git a/networks/nile/config/config.toml b/networks/nile/config/config.toml index ddc3ec3..961b9b8 100644 --- a/networks/nile/config/config.toml +++ b/networks/nile/config/config.toml @@ -17,8 +17,9 @@ disable = true # users do not run a secret store node [network] port = 30303 bootnodes = [ - "enode://16bddd0215f9bb8a9328671b7b1554a7811cf310065fde04248ce4cea92fe2831412894c912e6b9e45019d5011631452055a5c1873f2d6760baa95f51c449787@172.15.0.13:30303", - "enode://bd97feab0fdd069c3fe1f260285053f6a6fa6eaa840bfd6730a1ce6b0b9eccef616bfca7b498fb04c02f5fb9ecd8c40617c32acbdd4b55d306a3f4468b6885f2@172.15.0.12:30303" + "enode://11939f77e6ff12655fce3185057443c71d2732fe85b3896033329d3278798d4ea8ff64f2e318a68b63b283b6e95ba3680fccc90ae135c1a7c6383e3439b6458a@18.210.120.241:30303", + "enode://9e33335578ad186fd20fdafb43ee6348772812a036b99b1e5782f1b181719935a4f18398884c4c9c7fe47ab5f20d2d9ed41357eb5e037f557c4e1a82de89e137@35.171.30.2:30303", + "enode://22d89d3c5f798d50d1bb366632e0fcaa6987f4b02a395cd979241d0a6e3c728692e690782e55a60dbd991e8354d14fcd50fd21c8bd4e98fac6913a702211ffdf@54.163.9.188:30303" ] discovery = true From daec6778fe1cba96c28ecb4b069db1654215f271 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 13:06:02 +0100 Subject: [PATCH 22/33] set deploy contracts to false --- start_ocean.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start_ocean.sh b/start_ocean.sh index c1ca883..09277c6 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -8,7 +8,7 @@ export PROJECT_NAME="ocean" export OCEAN_VERSION=latest # keeper options -export KEEPER_DEPLOY_CONTRACTS="true" +export KEEPER_DEPLOY_CONTRACTS="false" export KEEPER_ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts # Specify which ethereum client to run or connect to: development, kovan, spree or nile export KEEPER_NETWORK_NAME="nile" From 9d4effeacc87a3ebaad10df6b35c076211a26374 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 13:07:21 +0100 Subject: [PATCH 23/33] remove pwd --- networks/spree/keys/validator.pwd | 1 - 1 file changed, 1 deletion(-) delete mode 100644 networks/spree/keys/validator.pwd diff --git a/networks/spree/keys/validator.pwd b/networks/spree/keys/validator.pwd deleted file mode 100644 index ce118da..0000000 --- a/networks/spree/keys/validator.pwd +++ /dev/null @@ -1 +0,0 @@ -node0 From 63c8da2b3e6f932b8e519e805053bbf79269ba94 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Thu, 6 Dec 2018 13:22:25 +0100 Subject: [PATCH 24/33] Fixed brizo in kovan --- compose-files/nodes/kovan_node.yml | 4 ++++ networks/kovan/keys/validator.json | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 networks/kovan/keys/validator.json diff --git a/compose-files/nodes/kovan_node.yml b/compose-files/nodes/kovan_node.yml index 924ee12..cdf7d8d 100644 --- a/compose-files/nodes/kovan_node.yml +++ b/compose-files/nodes/kovan_node.yml @@ -4,6 +4,8 @@ services: image: parity/parity:stable command: --chain kovan + --base-path /home/parity/base + --keys-path /home/parity/.local/share/io.parity.ethereum/keys --light --ws-interface all --jsonrpc-cors all @@ -11,6 +13,8 @@ services: --jsonrpc-hosts all --jsonrpc-apis all --unsafe-expose + volumes: + - ../networks/kovan/keys:/home/parity/.local/share/io.parity.ethereum/keys/kovan ports: - 8545:8545 networks: diff --git a/networks/kovan/keys/validator.json b/networks/kovan/keys/validator.json new file mode 100644 index 0000000..f3eee24 --- /dev/null +++ b/networks/kovan/keys/validator.json @@ -0,0 +1,23 @@ +{ + "id": "0902d04b-f26e-5c1f-e3ae-78d2c1cb16e7", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "6a829fe7bc656d85f6c2e9fd21784952" + }, + "ciphertext": "1bfec0b054a648af8fdd0e85662206c65a4af0ed15fede4ad41ca9ab7b504ce2", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "95f96b5ee22dd537e06076eb8d7078eb7275d29af935782fe476696b11be50e5" + }, + "mac": "4af2215c3cd9447a5b0512d7d1c3ea5a4435981e1c8f48bf71d7a49c0e5b4986" + }, + "address": "00bd138abd70e2f00903268f3db08f2d25677c9e", + "name": "Validator0", + "meta": "{}" +} + From 01d5fabf327111bf0fc0116b92a63e3af7a5fe7f Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 14:54:10 +0100 Subject: [PATCH 25/33] move to AuthorityRound for spree node --- compose-files/nodes/spree_node.yml | 16 +++++--- networks/nile/config/config.toml | 5 +-- networks/nile/config/member.toml | 18 --------- networks/nile/config/validator.toml | 24 ------------ networks/secret-store/config/chain.json | 2 +- networks/spree/authorities/validator0.json | 22 +++++++++++ networks/spree/authorities/validator0.pwd | 1 + networks/spree/authorities/validator1.json | 22 +++++++++++ networks/spree/authorities/validator1.pwd | 1 + networks/spree/authorities/validator2.json | 22 +++++++++++ networks/spree/authorities/validator2.pwd | 1 + networks/spree/config/chain.json | 43 +++++++++++++--------- networks/spree/config/config.toml | 19 +++++----- networks/spree/keys/master0.json | 21 +++++++++++ networks/spree/keys/master1.json | 21 +++++++++++ networks/spree/node0.network.key | 1 + networks/spree/node1.network.key | 1 + networks/spree/node2.network.key | 1 + 18 files changed, 161 insertions(+), 80 deletions(-) delete mode 100644 networks/nile/config/member.toml delete mode 100644 networks/nile/config/validator.toml create mode 100644 networks/spree/authorities/validator0.json create mode 100644 networks/spree/authorities/validator0.pwd create mode 100644 networks/spree/authorities/validator1.json create mode 100644 networks/spree/authorities/validator1.pwd create mode 100644 networks/spree/authorities/validator2.json create mode 100644 networks/spree/authorities/validator2.pwd create mode 100644 networks/spree/keys/master0.json create mode 100644 networks/spree/keys/master1.json create mode 100644 networks/spree/node0.network.key create mode 100644 networks/spree/node1.network.key create mode 100644 networks/spree/node2.network.key diff --git a/compose-files/nodes/spree_node.yml b/compose-files/nodes/spree_node.yml index 8e9adde..642df6e 100644 --- a/compose-files/nodes/spree_node.yml +++ b/compose-files/nodes/spree_node.yml @@ -3,19 +3,23 @@ services: keeper-node: image: parity/parity:stable command: - --config /home/parity/parity/config/config.toml - --keys-path /home/parity/.local/share/io.parity.ethereum/keys + --config /home/parity/config/config.toml + --db-path /home/parity/chains + --keys-path /home/parity/.local/keys --base-path /home/parity/base --min-gas-price 0 - --reseal-min-period 0 --jsonrpc-cors all --jsonrpc-interface all --jsonrpc-hosts all --jsonrpc-apis all + --unsafe-expose + --unlock 0x00bd138abd70e2f00903268f3db08f2d25677c9e volumes: - - ../networks/spree/config:/home/parity/parity/config - - ../networks/spree/keys/validator.pwd:/home/parity/parity/validator.pwd - - ../networks/spree/keys:/home/parity/.local/share/io.parity.ethereum/keys/spree + - ../networks/spree/config:/home/parity/config + - ../networks/spree/authorities/validator0.json:/home/parity/.local/keys/spree/validator.json + - ../networks/spree/keys:/home/parity/.local/keys/spree + - ../networks/spree/authorities/validator0.pwd:/home/parity/validator.pwd:ro + - ../networks/spree/node0.network.key:/home/parity/.local/share/io.parity.ethereum/network/key:ro ports: - 8545:8545 networks: diff --git a/networks/nile/config/config.toml b/networks/nile/config/config.toml index 961b9b8..f00a82b 100644 --- a/networks/nile/config/config.toml +++ b/networks/nile/config/config.toml @@ -9,10 +9,7 @@ port = 8545 interface = "0.0.0.0" cors = ["all"] hosts = ["all"] -apis = ["web3", "secretstore", "eth", "pubsub", "net", "parity", "parity_pubsub", "parity_accounts", "traces", "rpc", "shh", "shh_pubsub"] - -[secretstore] -disable = true # users do not run a secret store node +apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "parity_accounts", "traces", "rpc", "shh", "shh_pubsub"] [network] port = 30303 diff --git a/networks/nile/config/member.toml b/networks/nile/config/member.toml deleted file mode 100644 index 0d5d34d..0000000 --- a/networks/nile/config/member.toml +++ /dev/null @@ -1,18 +0,0 @@ -[parity] -chain = "/parity/config/chain.json" - -[rpc] -interface = "0.0.0.0" -cors = ["all"] -hosts = ["all"] -apis = ["web3", "eth", "net", "parity", "traces", "rpc", "personal", "parity_accounts", "signer", "parity_set"] - -[network] -bootnodes = [ - "enode://147573f46fe9f5cc38fbe070089a31390baec5dd2827c8f2ef168833e4d0254fbee3969a02c5b9910ea5d5b23d86a6ed5eabcda17cc12007b7d9178b6c697aa5@172.16.0.10:30303", - "enode://1412ee9b9e23700e4a67a8fe3d8d02e10376b6e1cb748eaaf8aa60d4652b27872a8e1ad65bb31046438a5d3c1b71b00ec3ce0b4b42ac71464b28026a3d0b53af@172.16.0.11:30303", - "enode://9076c143a487aa163437a86f7d009f257f405c50bb2316800b9c9cc40e5a38fef5b414a47636ec38fdabc8a1872b563effa8574a7f8f85dc6bde465c368f1bf5@172.16.0.12:30303" -] - -[ui] -interface = "0.0.0.0" diff --git a/networks/nile/config/validator.toml b/networks/nile/config/validator.toml deleted file mode 100644 index 046293d..0000000 --- a/networks/nile/config/validator.toml +++ /dev/null @@ -1,24 +0,0 @@ -[parity] -chain = "/home/parity/parity/config/chain.json" - -[rpc] -interface = "0.0.0.0" -cors = ["all"] -hosts = ["all"] -apis = ["web3", "eth", "net", "parity", "traces", "rpc", "personal", "parity_accounts", "signer", "parity_set"] - -[network] -bootnodes = [ - "enode://147573f46fe9f5cc38fbe070089a31390baec5dd2827c8f2ef168833e4d0254fbee3969a02c5b9910ea5d5b23d86a6ed5eabcda17cc12007b7d9178b6c697aa5@172.16.0.10:30303", - "enode://1412ee9b9e23700e4a67a8fe3d8d02e10376b6e1cb748eaaf8aa60d4652b27872a8e1ad65bb31046438a5d3c1b71b00ec3ce0b4b42ac71464b28026a3d0b53af@172.16.0.11:30303", - "enode://9076c143a487aa163437a86f7d009f257f405c50bb2316800b9c9cc40e5a38fef5b414a47636ec38fdabc8a1872b563effa8574a7f8f85dc6bde465c368f1bf5@172.16.0.12:30303" -] - -[account] -password = ["/home/parity/parity/validator.pwd"] - -[mining] -reseal_on_txs = "none" - -[secretstore] -disable = true diff --git a/networks/secret-store/config/chain.json b/networks/secret-store/config/chain.json index 818c469..2e0bc84 100644 --- a/networks/secret-store/config/chain.json +++ b/networks/secret-store/config/chain.json @@ -20,7 +20,7 @@ "params": { "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", - "networkID": "0x2324", + "networkID": "0x2325", "gasLimitBoundDivisor": "0x400", "eip140Transition": 0, "eip211Transition": 0, diff --git a/networks/spree/authorities/validator0.json b/networks/spree/authorities/validator0.json new file mode 100644 index 0000000..15d6d06 --- /dev/null +++ b/networks/spree/authorities/validator0.json @@ -0,0 +1,22 @@ +{ + "id": "0902d04b-f26e-5c1f-e3ae-78d2c1cb16e7", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "6a829fe7bc656d85f6c2e9fd21784952" + }, + "ciphertext": "1bfec0b054a648af8fdd0e85662206c65a4af0ed15fede4ad41ca9ab7b504ce2", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "95f96b5ee22dd537e06076eb8d7078eb7275d29af935782fe476696b11be50e5" + }, + "mac": "4af2215c3cd9447a5b0512d7d1c3ea5a4435981e1c8f48bf71d7a49c0e5b4986" + }, + "address": "00bd138abd70e2f00903268f3db08f2d25677c9e", + "name": "Validator0", + "meta": "{}" +} diff --git a/networks/spree/authorities/validator0.pwd b/networks/spree/authorities/validator0.pwd new file mode 100644 index 0000000..ce118da --- /dev/null +++ b/networks/spree/authorities/validator0.pwd @@ -0,0 +1 @@ +node0 diff --git a/networks/spree/authorities/validator1.json b/networks/spree/authorities/validator1.json new file mode 100644 index 0000000..cdf3b7a --- /dev/null +++ b/networks/spree/authorities/validator1.json @@ -0,0 +1,22 @@ +{ + "id": "e854acbe-e6b2-e812-9f84-7b0945a1f14f", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "1b90ae52dcc1bc285ae3846d0ca9be53" + }, + "ciphertext": "b80f21bfb2029dafc89c36c6838e7a9e711ee13ec3e6900c3b097e45ae2ece7c", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "d823ab988002888a19336ab6650b83a4c536b42612148c9c5337ec4d92e981d1" + }, + "mac": "f8d1e53f4be85b0f77aa02bfe08b93eacdef74995822a59ddaea0497a69318af" + }, + "address": "00aa39d30f0d20ff03a22ccfc30b7efbfca597c2", + "name": "Validator1", + "meta": "{}" +} diff --git a/networks/spree/authorities/validator1.pwd b/networks/spree/authorities/validator1.pwd new file mode 100644 index 0000000..f50c4f2 --- /dev/null +++ b/networks/spree/authorities/validator1.pwd @@ -0,0 +1 @@ +node1 diff --git a/networks/spree/authorities/validator2.json b/networks/spree/authorities/validator2.json new file mode 100644 index 0000000..31dc1c2 --- /dev/null +++ b/networks/spree/authorities/validator2.json @@ -0,0 +1,22 @@ +{ + "id": "26ef5e07-4494-52b5-653f-a982ac907807", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "53addf73788522f6d5bf73abb0e0b8da" + }, + "ciphertext": "88c1013308cff929825e5da57ceaf15ae86e656165bcb2de3b06b24985358af6", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "ab8efcf7ee2c368eced8982b22328d862ea0c15307ce6ccd5994fae5a9b13244" + }, + "mac": "c93ca54145b4f21b62c422247609d0b891149f0d9752f6fe9ef60421f10bad6c" + }, + "address": "002e28950558fbede1a9675cb113f0bd20912019", + "name": "Validator2", + "meta": "{}" +} diff --git a/networks/spree/authorities/validator2.pwd b/networks/spree/authorities/validator2.pwd new file mode 100644 index 0000000..6810417 --- /dev/null +++ b/networks/spree/authorities/validator2.pwd @@ -0,0 +1 @@ +node2 diff --git a/networks/spree/config/chain.json b/networks/spree/config/chain.json index 3c11fe4..9208fad 100644 --- a/networks/spree/config/chain.json +++ b/networks/spree/config/chain.json @@ -1,7 +1,21 @@ { "name": "spree", "engine": { - "instantSeal": null + "authorityRound": { + "params": { + "stepDuration": "1", + "validators": { + "list": [ + "0x00bd138abd70e2f00903268f3db08f2d25677c9e", + "0xf4a2dbd5d67ef3019a7e4b188b92128c86d76bf9", + "0xcdbe5f61fac89e2cfcfa3727805d5cb8bc4f9afd" + ] + }, + "validateScoreTransition": 1000000000, + "validateStepTransition": 1500000000, + "maximumUncleCount": 1000000000 + } + } }, "params": { "gasLimitBoundDivisor": "0x0400", @@ -9,31 +23,26 @@ "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", "networkID": "0x2324", - "registrar": "0x0000000000000000000000000000000000001337", - "eip150Transition": "0x0", - "eip160Transition": "0x0", - "eip161abcTransition": "0x0", - "eip161dTransition": "0x0", - "eip155Transition": "0x0", - "eip98Transition": "0x7fffffffffffff", - "eip86Transition": "0x7fffffffffffff", - "maxCodeSize": 24576, - "maxCodeSizeTransition": "0x0", "eip140Transition": "0x0", "eip211Transition": "0x0", "eip214Transition": "0x0", "eip658Transition": "0x0", - "wasmActivationTransition": "0x0" + "wasmActivationTransition": "0x0", + "eip145Transition": "0x0", + "eip1014Transition": "0x0", + "eip1052Transition": "0x0", + "eip1283Transition": "0x0", + "kip4Transition": "0x0", + "kip6Transition": "0x0" }, "genesis": { "seal": { - "generic": "0x0" + "authorityRound": { + "step": "0x0", + "signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + } }, "difficulty": "0x20000", - "author": "0x0000000000000000000000000000000000000000", - "timestamp": "0x00", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "extraData": "0x", "gasLimit": "0x165A0BC00" }, "accounts": { diff --git a/networks/spree/config/config.toml b/networks/spree/config/config.toml index 215fd8c..ab4e6e9 100644 --- a/networks/spree/config/config.toml +++ b/networks/spree/config/config.toml @@ -1,18 +1,17 @@ -# Users config file in users.toml -# This configuration file can be used for either Alice, Bob or Charlie - [parity] -chain = "/home/parity/parity/config/chain.json" +chain = "/home/parity/config/chain.json" [rpc] -port = 8545 interface = "0.0.0.0" cors = ["all"] hosts = ["all"] -apis = ["all"] - -[mining] -engine_signer = "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e" +apis = ["web3", "eth", "net", "parity", "traces", "rpc", "personal", "parity_accounts", "signer", "parity_set"] [account] -password = ["/home/parity/parity/validator.pwd"] \ No newline at end of file +password = ["/home/parity/validator.pwd"] + +[mining] +engine_signer = "0x00bd138abd70e2f00903268f3db08f2d25677c9e" +reseal_on_txs = "none" +force_sealing = true +reseal_min_period = 500 diff --git a/networks/spree/keys/master0.json b/networks/spree/keys/master0.json new file mode 100644 index 0000000..51c8c83 --- /dev/null +++ b/networks/spree/keys/master0.json @@ -0,0 +1,21 @@ +{ + "id": "0d1533e9-dd7a-a838-68dc-36ddc025c1ab", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "acbabbab8eab2b952ad3cf2bd1aab0ca" + }, + "ciphertext": "134b54d057c3c0a9ac08b5eae36c46ab8dd45774215ce860afaeb4e8e50c927d", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "6f9e3ebd99b24becad3e8f773f44df8397cad68694abf7651880528d9552bfe7" + }, + "mac": "f8939019ec29b46694b5ac07fdf971ec740ca4de23e7ae84a1239f54c617f7d9" + }, + "address": "6b0c56d1ad5144b4d37fa6e27dc9afd5c2435c3b", + "name": "master0" +} diff --git a/networks/spree/keys/master1.json b/networks/spree/keys/master1.json new file mode 100644 index 0000000..5c78953 --- /dev/null +++ b/networks/spree/keys/master1.json @@ -0,0 +1,21 @@ +{ + "id": "76d1dcd3-0c3b-24c8-0875-78e3cc151659", + "version": 3, + "crypto": { + "cipher": "aes-128-ctr", + "cipherparams": { + "iv": "6cbc68e1c87f82cefc954217cec45d64" + }, + "ciphertext": "a0f97cd495dbe38dc6fa13c23a7cc15a6abc75b894827bd2729a72bc3a1ec92d", + "kdf": "pbkdf2", + "kdfparams": { + "c": 10240, + "dklen": 32, + "prf": "hmac-sha256", + "salt": "b7704b289ced489bf6da93f6d335537763d3cc68460509321a73e50b185685de" + }, + "mac": "881850b5ce7709a7fd5ea923d97f77f0bd8717f054c44d35104cafc78d21813c" + }, + "address": "0011598de1016a350ad719d23586273804076774", + "name": "master1" +} diff --git a/networks/spree/node0.network.key b/networks/spree/node0.network.key new file mode 100644 index 0000000..4ca292b --- /dev/null +++ b/networks/spree/node0.network.key @@ -0,0 +1 @@ +b3244c104fb56d28d3979f6cd14a8b5cf5b109171d293f4454c97c173a9f9374 diff --git a/networks/spree/node1.network.key b/networks/spree/node1.network.key new file mode 100644 index 0000000..0eb7d3b --- /dev/null +++ b/networks/spree/node1.network.key @@ -0,0 +1 @@ +c07b4807e704dfff975d82fc807a3da7947838379007b49c51f6a04faf4cdea8 diff --git a/networks/spree/node2.network.key b/networks/spree/node2.network.key new file mode 100644 index 0000000..224e330 --- /dev/null +++ b/networks/spree/node2.network.key @@ -0,0 +1 @@ +d8bf44e2b69604bde8c84c4b403114f4410dc4f57d80e026b24b8f1af70d5633 From 6c59f14849c8bc488a6ef9449b03d7c59a2c6c90 Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 16:31:27 +0100 Subject: [PATCH 26/33] fix brizo path --- compose-files/brizo.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index 06fa6a6..3fcffc0 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -14,4 +14,4 @@ services: environment: KEEPER_URL: ${KEEPER_RPC_URL} volumes: - - ${KEEPER_ARTIFACTS_FOLDER}:/usr/local/keeper-contracts/:ro + - ${KEEPER_ARTIFACTS_FOLDER}:/usr/local/artifacts:ro From 5a07e99fcce2bdc9a942ad113b1b84730f5bf7bd Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Thu, 6 Dec 2018 16:42:35 +0100 Subject: [PATCH 27/33] fix brizo --- .env | 13 ------------- compose-files/brizo.yml | 9 +++++---- 2 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index faa6ee2..0000000 --- a/.env +++ /dev/null @@ -1,13 +0,0 @@ -# Must be set to true for the first run, change it to "false" to avoid migrating the smart contracts on each run. -KEEPER_DEPLOY_CONTRACTS=true - -# Specify which ethereum client to run or connect to: kovan, ganache, or ocean_poa_net_local -KEEPER_NETWORK_NAME=development -KEEPER_ARTIFACTS_FOLDER=~/.ocean/keeper-contracts/artifacts - -# Ganache specific option, these two options have no effect when not running ganache-cli -GANACHE_DATABASE_PATH=. -GANACHE_REUSE_DATABASE=false - -# Specify which ocean version use: stable, latests, ... -OCEAN_VERSION=stable diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index 3fcffc0..30ba021 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -3,15 +3,16 @@ services: brizo: image: oceanprotocol/brizo:${OCEAN_VERSION:-stable} ports: - - 8030:8030 + - 8030:8030 networks: backend: ipv4_address: 172.15.0.17 depends_on: - - keeper-node + - keeper-node env_file: - - ${BRIZO_ENV_FILE} + - ${BRIZO_ENV_FILE} environment: KEEPER_URL: ${KEEPER_RPC_URL} + LOCAL_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS} volumes: - - ${KEEPER_ARTIFACTS_FOLDER}:/usr/local/artifacts:ro + - ${KEEPER_ARTIFACTS_FOLDER}:/usr/local/artifacts:ro From 22d0dfd42c181cf8d0167c79c7fe70a914c15b53 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 7 Dec 2018 12:25:28 +0100 Subject: [PATCH 28/33] Fix brizo --- compose-files/brizo.yml | 2 +- compose-files/keeper_contracts.yml | 1 + networks/spree/config/chain.json | 4 ++-- start_ocean.sh | 2 ++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/compose-files/brizo.yml b/compose-files/brizo.yml index 30ba021..9759ae3 100644 --- a/compose-files/brizo.yml +++ b/compose-files/brizo.yml @@ -15,4 +15,4 @@ services: KEEPER_URL: ${KEEPER_RPC_URL} LOCAL_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS} volumes: - - ${KEEPER_ARTIFACTS_FOLDER}:/usr/local/artifacts:ro + - ${KEEPER_ARTIFACTS_FOLDER}:/usr/local/keeper-contracts:ro diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml index 5462e5c..f4fd543 100644 --- a/compose-files/keeper_contracts.yml +++ b/compose-files/keeper_contracts.yml @@ -7,6 +7,7 @@ services: ipv4_address: 172.15.0.14 environment: DEPLOY_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS} + LOCAL_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS} REUSE_DATABASE: ${GANACHE_REUSE_DATABASE} DATABASE_PATH: "/ganache-db" NETWORK_NAME: ${KEEPER_NETWORK_NAME} diff --git a/networks/spree/config/chain.json b/networks/spree/config/chain.json index 9208fad..84beefd 100644 --- a/networks/spree/config/chain.json +++ b/networks/spree/config/chain.json @@ -22,7 +22,7 @@ "accountStartNonce": "0x0", "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", - "networkID": "0x2324", + "networkID": "0x1234", "eip140Transition": "0x0", "eip211Transition": "0x0", "eip214Transition": "0x0", @@ -161,4 +161,4 @@ "balance": "0x200000000000000000000000000000000000000000000000" } } -} \ No newline at end of file +} diff --git a/start_ocean.sh b/start_ocean.sh index 09277c6..19dbf34 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -101,6 +101,7 @@ while :; do export NODE_FILE=${COMPOSE_DIR}/nodes/ganache_node.yml export KEEPER_NETWORK_NAME="development" export KEEPER_DEPLOY_CONTRACTS="true" + rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json printf $COLOR_Y'Starting with local Ganache node...\n\n'$COLOR_RESET ;; # connects you to nile ocean testnet @@ -115,6 +116,7 @@ while :; do export NODE_FILE=${COMPOSE_DIR}/nodes/spree_node.yml export KEEPER_NETWORK_NAME="spree" export KEEPER_DEPLOY_CONTRACTS="true" + rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json printf $COLOR_Y'Starting with local Spree node...\n\n'$COLOR_RESET ;; ################################################# From 49cdc4b6940e0fd133062f555f3a792c1821b8a1 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 7 Dec 2018 13:33:49 +0100 Subject: [PATCH 29/33] Restored networkid for spree --- networks/spree/config/chain.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networks/spree/config/chain.json b/networks/spree/config/chain.json index 84beefd..3361e87 100644 --- a/networks/spree/config/chain.json +++ b/networks/spree/config/chain.json @@ -22,7 +22,7 @@ "accountStartNonce": "0x0", "maximumExtraDataSize": "0x20", "minGasLimit": "0x1388", - "networkID": "0x1234", + "networkID": "0x2324", "eip140Transition": "0x0", "eip211Transition": "0x0", "eip214Transition": "0x0", From 1246faec5434164a1f332d754f632bdc06314411 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Fri, 7 Dec 2018 13:37:26 +0100 Subject: [PATCH 30/33] Comment clean old contracts --- compose-files/keeper_contracts.yml | 3 ++- start_ocean.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml index f4fd543..c3dfb0b 100644 --- a/compose-files/keeper_contracts.yml +++ b/compose-files/keeper_contracts.yml @@ -1,7 +1,8 @@ version: '2.1' services: keeper-contracts: - image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} + #image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} + image: oceanprotocol/keeper-contracts:feature_docker networks: backend: ipv4_address: 172.15.0.14 diff --git a/start_ocean.sh b/start_ocean.sh index 19dbf34..6f94d12 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -101,7 +101,7 @@ while :; do export NODE_FILE=${COMPOSE_DIR}/nodes/ganache_node.yml export KEEPER_NETWORK_NAME="development" export KEEPER_DEPLOY_CONTRACTS="true" - rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json + #rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json printf $COLOR_Y'Starting with local Ganache node...\n\n'$COLOR_RESET ;; # connects you to nile ocean testnet @@ -116,7 +116,7 @@ while :; do export NODE_FILE=${COMPOSE_DIR}/nodes/spree_node.yml export KEEPER_NETWORK_NAME="spree" export KEEPER_DEPLOY_CONTRACTS="true" - rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json + #rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json printf $COLOR_Y'Starting with local Spree node...\n\n'$COLOR_RESET ;; ################################################# From 5a477febfe168df5a10e3575076d9b8c547ea195 Mon Sep 17 00:00:00 2001 From: ssallam Date: Mon, 10 Dec 2018 01:10:25 +0100 Subject: [PATCH 31/33] Update keeper-contracts docker, `feature_docker` no longer needed, latest keeper works now. --- compose-files/keeper_contracts.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compose-files/keeper_contracts.yml b/compose-files/keeper_contracts.yml index c3dfb0b..f4fd543 100644 --- a/compose-files/keeper_contracts.yml +++ b/compose-files/keeper_contracts.yml @@ -1,8 +1,7 @@ version: '2.1' services: keeper-contracts: - #image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} - image: oceanprotocol/keeper-contracts:feature_docker + image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable} networks: backend: ipv4_address: 172.15.0.14 From 6ded4c8d5080375df78ff0663dee6ac94134fbcb Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Mon, 10 Dec 2018 12:44:29 +0100 Subject: [PATCH 32/33] try to fix brizo --- start_ocean.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/start_ocean.sh b/start_ocean.sh index 6f94d12..d525dc3 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -18,7 +18,7 @@ export NODE_FILE=${COMPOSE_DIR}/nodes/nile_node.yml export GANACHE_DATABASE_PATH="${DIR}" export GANACHE_REUSE_DATABASE="false" -export BRIZO_ENV_FILE=$DIR/brizo.env +export BRIZO_ENV_FILE="${DIR}/brizo.env" # Specify the ethereum default RPC container provider export KEEPER_RPC_HOST='keeper-node' @@ -144,6 +144,7 @@ while :; do ;; *) printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET + echo ${BRIZO_ENV_FILE} docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_FILE} up --remove-orphans break esac From 958448d27d1cb25e5d5d1155a044c6879f1e0f0c Mon Sep 17 00:00:00 2001 From: Sebastian Gerske Date: Mon, 10 Dec 2018 12:44:54 +0100 Subject: [PATCH 33/33] remove logging --- start_ocean.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/start_ocean.sh b/start_ocean.sh index d525dc3..9bcf19e 100755 --- a/start_ocean.sh +++ b/start_ocean.sh @@ -144,7 +144,6 @@ while :; do ;; *) printf $COLOR_Y'Starting Ocean...\n\n'$COLOR_RESET - echo ${BRIZO_ENV_FILE} docker-compose --project-name=$PROJECT_NAME $COMPOSE_FILES -f ${NODE_FILE} up --remove-orphans break esac