setting up parity node

This commit is contained in:
Blair Vanderlugt 2021-01-31 17:08:45 -08:00
parent b7324011db
commit 7451042b4b
4 changed files with 228 additions and 131 deletions

View File

@ -7,7 +7,6 @@ before_script:
include: include:
- local: 'ci_templates/.cic-template.yml' - local: 'ci_templates/.cic-template.yml'
- local: 'apps/contract-migration/.gitlab-ci.yml' - local: 'apps/contract-migration/.gitlab-ci.yml'
- local: 'apps/cic-eth/.gitlab-ci.yml'
stages: stages:
- build - build

3
.gitmodules vendored
View File

@ -13,3 +13,6 @@
[submodule "apps/cic-meta"] [submodule "apps/cic-meta"]
path = apps/cic-meta path = apps/cic-meta
url = git@gitlab.com:grassrootseconomics/cic-meta.git url = git@gitlab.com:grassrootseconomics/cic-meta.git
[submodule "apps/bloxbergValidatorSetup"]
path = apps/bloxbergValidatorSetup
url = git@gitlab.com:grassrootseconomics/bloxbergValidatorSetup.git

@ -0,0 +1 @@
Subproject commit 93b25ae45c4581ae0897201cf8797991ac508b42

View File

@ -18,10 +18,27 @@ services:
- ${HTTP_PORT_ETH:-8545} - ${HTTP_PORT_ETH:-8545}
- ${WS_PORT_ETH:-8546} - ${WS_PORT_ETH:-8546}
# Note! -e switch doesnt work, whatever you put there, it will be 100 # Note! -e switch doesnt work, whatever you put there, it will be 100
command: "-i 8995 -e 100 -l 9000000 -m '${DEV_MNEMONIC:-\"history stumble mystery avoid embark arrive mom foil pledge keep grain dice\"}' -v --db /tmp/cic/ganache/ganache.db --noVMErrorsOnRPCResponse" command: "-i 1337 -e 1000 -l 90000000 \
-m '${DEV_MNEMONIC:-\"history stumble mystery avoid embark arrive mom foil pledge keep grain dice\"}' \
-v --db /tmp/cic/ganache/ganache.db \
--noVMErrorsOnRPCResponse --allowUnlimitedContractSize"
volumes: volumes:
- ganache-db:/tmp/cic/ganache - ganache-db:/tmp/cic/ganache
eth:
image: grassrootseconomics:bloxberg-dev
hostname: eth
restart: unless-stopped
entrypoint: /start.sh
user: "0:0"
ports:
- ${HTTP_PORT_ETH:-8545}:8545
- 8546
- 30303
volumes:
- ./bloxberg_config:/home/parity/.local/share/io.parity.ethereum
# See contents of /initdb/create_db.sql for app user, password and databases # See contents of /initdb/create_db.sql for app user, password and databases
postgres: postgres:
image: postgres:12.5-alpine image: postgres:12.5-alpine
@ -63,6 +80,7 @@ services:
# And these two are for wait-for-it (could parse this) # And these two are for wait-for-it (could parse this)
ETH_PROVIDER_HOST: eth ETH_PROVIDER_HOST: eth
ETH_PROVIDER_PORT: 8545 ETH_PROVIDER_PORT: 8545
CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-Bloxberg:1337}
command: ["./reset.sh"] command: ["./reset.sh"]
depends_on: depends_on:
- eth - eth
@ -138,7 +156,7 @@ services:
DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres} DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2} DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
PGPASSWORD: ${DATABASE_PASSWORD:-tralala} PGPASSWORD: ${DATABASE_PASSWORD:-tralala}
CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-Bloxberg:8995} CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-Bloxberg:1337}
BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor} BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor}
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis} CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}
CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis} CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis}
@ -154,147 +172,223 @@ services:
condition: on-failure condition: on-failure
volumes: volumes:
- signer-data:/tmp/cic/signer - signer-data:/tmp/cic/signer
- contract-config:/tmp/cic/config/:ro
command: command:
- /bin/bash - /bin/bash
- -c - -c
- | - |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
pwd
ls
./start_tasker.sh -q cic-eth -vv ./start_tasker.sh -q cic-eth -vv
# command: [/bin/sh, "./start_tasker.sh", -q, cic-eth, -vv ] # command: [/bin/sh, "./start_tasker.sh", -q, cic-eth, -vv ]
# cic-eth-manager-head: cic-eth-manager-head:
# image: grassrootseconomics:cic-eth-service build:
# environment: context: apps/
# ETH_PROVIDER: $ETH_PROVIDER dockerfile: cic-eth/docker/Dockerfile
# DATABASE_USER: $DATABASE_USER environment:
# DATABASE_HOST: $DATABASE_HOST CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
# DATABASE_PORT: $DATABASE_PORT ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER
# DATABASE_PASSWORD: $DATABASE_PASSWORD ETH_PROVIDER: http://eth:8545
# DATABASE_NAME: $DATABASE_NAME_CIC_ETH ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi}
# DATABASE_ENGINE: $DATABASE_ENGINE DATABASE_USER: ${DATABASE_USER:-grassroots}
# DATABASE_DRIVER: $DATABASE_DRIVER DATABASE_HOST: ${DATABASE_HOST:-postgres}
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala}
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC DATABASE_NAME: ${DATABASE_NAME_CIC_CACHE:-cic_cache}
# BANCOR_DIR: $BANCOR_DIR DATABASE_PORT: ${DATABASE_PORT:-5432}
# CELERY_BROKER_URL: $CELERY_BROKER_URL DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
# CELERY_RESULT_URL: $CELERY_RESULT_URL DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
# TASKS_TRANSFER_CALLBACKS: $TASKS_TRANSFER_CALLBACKS PGPASSWORD: ${DATABASE_PASSWORD:-tralala}
# depends_on: CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-Bloxberg:1337}
# - eth BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor}
# - postgres CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}
# - redis CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis}
# deploy: SIGNER_SOCKET_PATH: ${SIGNER_SOCKET_PATH:-/tmp/cic/signer/jsonrpc.ipc}
# restart_policy: SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef}
# condition: on-failure ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: ${DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER:-0xACB0BC74E1686D62dE7DC6414C999EA60C09F0eA}
depends_on:
- eth
- postgres
- redis
deploy:
restart_policy:
condition: on-failure
volumes:
- contract-config:/tmp/cic/config/:ro
command:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
./start_manager.sh head -vv
# command: "/root/start_manager.sh head -vv" # command: "/root/start_manager.sh head -vv"
# cic-eth-manager-history: cic-eth-manager-history:
# image: grassrootseconomics:cic-eth-service build:
# environment: context: apps/
# ETH_PROVIDER: $ETH_PROVIDER dockerfile: cic-eth/docker/Dockerfile
# DATABASE_USER: $DATABASE_USER environment:
# DATABASE_HOST: $DATABASE_HOST CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
# DATABASE_PORT: $DATABASE_PORT ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER
# DATABASE_PASSWORD: $DATABASE_PASSWORD ETH_PROVIDER: http://eth:8545
# DATABASE_NAME: $DATABASE_NAME_CIC_ETH ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi}
# DATABASE_ENGINE: $DATABASE_ENGINE DATABASE_USER: ${DATABASE_USER:-grassroots}
# DATABASE_DRIVER: $DATABASE_DRIVER DATABASE_HOST: ${DATABASE_HOST:-postgres}
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala}
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC DATABASE_NAME: ${DATABASE_NAME_CIC_CACHE:-cic_cache}
# BANCOR_DIR: $BANCOR_DIR DATABASE_PORT: ${DATABASE_PORT:-5432}
# CELERY_BROKER_URL: $CELERY_BROKER_URL DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
# CELERY_RESULT_URL: $CELERY_RESULT_URL DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
# depends_on: PGPASSWORD: ${DATABASE_PASSWORD:-tralala}
# - eth CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-Bloxberg:1337}
# - postgres BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor}
# - redis CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}
# #deploy: CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis}
# #restart_policy: SIGNER_SOCKET_PATH: ${SIGNER_SOCKET_PATH:-/tmp/cic/signer/jsonrpc.ipc}
# # condition: on-failure SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef}
# command: "/root/start_manager.sh history -vv" ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: ${DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER:-0xACB0BC74E1686D62dE7DC6414C999EA60C09F0eA}
depends_on:
# cic-eth-dispatcher: - eth
# image: grassrootseconomics:cic-eth-service - postgres
# environment: - redis
# ETH_PROVIDER: $ETH_PROVIDER
# DATABASE_USER: $DATABASE_USER
# DATABASE_HOST: $DATABASE_HOST
# DATABASE_PORT: $DATABASE_PORT
# DATABASE_PASSWORD: $DATABASE_PASSWORD
# DATABASE_NAME: $DATABASE_NAME_CIC_ETH
# DATABASE_ENGINE: $DATABASE_ENGINE
# DATABASE_DRIVER: $DATABASE_DRIVER
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC
# BANCOR_DIR: $BANCOR_DIR
# CELERY_BROKER_URL: $CELERY_BROKER_URL
# CELERY_RESULT_URL: $CELERY_RESULT_URL
# depends_on:
# - eth
# - postgres
# - redis
#deploy: #deploy:
#restart_policy: #restart_policy:
# condition: on-failure # condition: on-failure
volumes:
- contract-config:/tmp/cic/config/:ro
command:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
./start_manager.sh history -vv
# command: "/root/start_manager.sh history -vv"
cic-eth-dispatcher:
build:
context: apps/
dockerfile: cic-eth/docker/Dockerfile
environment:
CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER
ETH_PROVIDER: http://eth:8545
ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi}
DATABASE_USER: ${DATABASE_USER:-grassroots}
DATABASE_HOST: ${DATABASE_HOST:-postgres}
DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala}
DATABASE_NAME: ${DATABASE_NAME_CIC_CACHE:-cic_cache}
DATABASE_PORT: ${DATABASE_PORT:-5432}
DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
PGPASSWORD: ${DATABASE_PASSWORD:-tralala}
CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-Bloxberg:1337}
BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor}
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}
CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis}
SIGNER_SOCKET_PATH: ${SIGNER_SOCKET_PATH:-/tmp/cic/signer/jsonrpc.ipc}
SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef}
ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: ${DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER:-0xACB0BC74E1686D62dE7DC6414C999EA60C09F0eA}
depends_on:
- eth
- postgres
- redis
deploy:
restart_policy:
condition: on-failure
volumes:
- contract-config:/tmp/cic/config/:ro
command:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
./start_dispatcher.sh history -vv
# command: "/root/start_dispatcher.sh -q cic-eth -vv" # command: "/root/start_dispatcher.sh -q cic-eth -vv"
# cic-eth-retrier: cic-eth-retrier:
# image: grassrootseconomics:cic-eth-service build:
# environment: context: apps/
# ETH_PROVIDER: $ETH_PROVIDER dockerfile: cic-eth/docker/Dockerfile
# DATABASE_USER: $DATABASE_USER environment:
# DATABASE_HOST: $DATABASE_HOST CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
# DATABASE_PORT: $DATABASE_PORT ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER
# DATABASE_PASSWORD: $DATABASE_PASSWORD ETH_PROVIDER: http://eth:8545
# DATABASE_NAME: $DATABASE_NAME_CIC_ETH ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi}
# DATABASE_ENGINE: $DATABASE_ENGINE DATABASE_USER: ${DATABASE_USER:-grassroots}
# DATABASE_DRIVER: $DATABASE_DRIVER DATABASE_HOST: ${DATABASE_HOST:-postgres}
# CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala}
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC DATABASE_NAME: ${DATABASE_NAME_CIC_CACHE:-cic_cache}
# BANCOR_DIR: $BANCOR_DIR DATABASE_PORT: ${DATABASE_PORT:-5432}
# CELERY_BROKER_URL: $CELERY_BROKER_URL DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
# CELERY_RESULT_URL: $CELERY_RESULT_URL DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
# depends_on: PGPASSWORD: ${DATABASE_PASSWORD:-tralala}
# - eth CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-Bloxberg:1337}
# - postgres BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor}
# - redis CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}
# deploy: CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis}
# restart_policy: SIGNER_SOCKET_PATH: ${SIGNER_SOCKET_PATH:-/tmp/cic/signer/jsonrpc.ipc}
# condition: on-failure SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef}
ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: ${DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER:-0xACB0BC74E1686D62dE7DC6414C999EA60C09F0eA}
depends_on:
- eth
- postgres
- redis
deploy:
restart_policy:
condition: on-failure
volumes:
- contract-config:/tmp/cic/config/:ro
command:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
./start_retry.sh history -vv
# command: "/root/start_retry.sh -q cic-eth -vv" # command: "/root/start_retry.sh -q cic-eth -vv"
# cic-eth-server: cic-eth-server:
# image: grassrootseconomics:cic-eth-service build:
# environment: context: apps/
# # ETH_PROVIDER: $ETH_PROVIDER dockerfile: cic-eth/docker/Dockerfile
# # DATABASE_USER: $DATABASE_USER environment:
# # DATABASE_HOST: $DATABASE_HOST CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS
# # DATABASE_PORT: $DATABASE_PORT ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER
# # DATABASE_PASSWORD: $DATABASE_PASSWORD ETH_PROVIDER: http://eth:8545
# # DATABASE_NAME: $DATABASE_NAME_CIC_ETH ETH_ABI_DIR: ${ETH_ABI_DIR:-/usr/local/share/cic/solidity/abi}
# # DATABASE_ENGINE: $DATABASE_ENGINE DATABASE_USER: ${DATABASE_USER:-grassroots}
# # DATABASE_DRIVER: $DATABASE_DRIVER DATABASE_HOST: ${DATABASE_HOST:-postgres}
# # CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala}
# CIC_CHAIN_SPEC: $CIC_CHAIN_SPEC DATABASE_NAME: ${DATABASE_NAME_CIC_CACHE:-cic_cache}
# # BANCOR_DIR: $BANCOR_DIR DATABASE_PORT: ${DATABASE_PORT:-5432}
# CELERY_BROKER_URL: $CELERY_BROKER_URL DATABASE_ENGINE: ${DATABASE_ENGINE:-postgres}
# CELERY_RESULT_URL: $CELERY_RESULT_URL DATABASE_DRIVER: ${DATABASE_DRIVER:-psycopg2}
# SERVER_PORT: 80 PGPASSWORD: ${DATABASE_PASSWORD:-tralala}
# ports: CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-Bloxberg:1337}
# - ${HTTP_PORT_CIC_ETH}:80 BANCOR_DIR: ${BANCOR_DIR:-/usr/local/share/cic/bancor}
# depends_on: CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis}
# # - eth CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis}
# # - postgres SIGNER_SOCKET_PATH: ${SIGNER_SOCKET_PATH:-/tmp/cic/signer/jsonrpc.ipc}
# - redis SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef}
# deploy: ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: ${DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER:-0xACB0BC74E1686D62dE7DC6414C999EA60C09F0eA}
# restart_policy: depends_on:
# condition: on-failure - eth
# #command: "/bin/bash-c uwsgi --wsgi-file /usr/src/cic-eth/cic_eth/runnable/server_agent.py --http :80 --pyargv '-vv'" - postgres
# #command: "uwsgi" - redis
deploy:
restart_policy:
condition: on-failure
volumes:
- contract-config:/tmp/cic/config/:ro
command:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
"/usr/local/bin/uwsgi" \
--wsgi-file /usr/src/cic-eth/cic_eth/runnable/server_agent.py \
--http :80 \
--pyargv -vv
# entrypoint: # entrypoint:
# - "/usr/local/bin/uwsgi" # - "/usr/local/bin/uwsgi"
# - "--wsgi-file" # - "--wsgi-file"