diff --git a/.gitignore b/.gitignore index 3fb25a37..bd35ec75 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ build/ **/.venv .idea **/.vim +**/*secret.yaml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 584d01c1..67ccdc9d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,13 +12,13 @@ include: stages: - build - test - - deploy + - deploy -image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/docker-with-compose:latest +image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/docker-with-compose:latest variables: DOCKER_BUILDKIT: "1" - COMPOSE_DOCKER_CLI_BUILD: "1" + COMPOSE_DOCKER_CLI_BUILD: "1" CI_DEBUG_TRACE: "true" before_script: diff --git a/README.md b/README.md index b6fae088..9e0d62d0 100644 --- a/README.md +++ b/README.md @@ -34,4 +34,7 @@ rebuild an images docker-compose up --build ``` - +to delete the buildkit cache +``` +docker builder prune --filter type=exec.cachemount +``` diff --git a/apps/cic-cache/cic_cache/cli/rpc.py b/apps/cic-cache/cic_cache/cli/rpc.py index 7f6500ae..b7383242 100644 --- a/apps/cic-cache/cic_cache/cli/rpc.py +++ b/apps/cic-cache/cic_cache/cli/rpc.py @@ -27,11 +27,11 @@ class RPC: @staticmethod def from_config(config): chain_spec = ChainSpec.from_chain_str(config.get('CHAIN_SPEC')) - RPCConnection.register_location(config.get('RPC_HTTP_PROVIDER'), chain_spec, 'default') + RPCConnection.register_location(config.get('RPC_PROVIDER'), chain_spec, 'default') if config.get('SIGNER_PROVIDER'): RPCConnection.register_constructor(ConnType.UNIX, EthUnixSignerConnection, tag='signer') RPCConnection.register_location(config.get('SIGNER_PROVIDER'), chain_spec, 'signer') - rpc = RPC(chain_spec, config.get('RPC_HTTP_PROVIDER'), signer_provider=config.get('SIGNER_PROVIDER')) + rpc = RPC(chain_spec, config.get('RPC_PROVIDER'), signer_provider=config.get('SIGNER_PROVIDER')) logg.info('set up rpc: {}'.format(rpc)) return rpc diff --git a/apps/cic-cache/requirements.txt b/apps/cic-cache/requirements.txt index b2216817..8f47f9b5 100644 --- a/apps/cic-cache/requirements.txt +++ b/apps/cic-cache/requirements.txt @@ -9,7 +9,6 @@ psycopg2==2.8.6 celery==4.4.7 redis==3.5.3 chainsyncer[sql]>=0.0.6a3,<0.1.0 -erc20-faucet>=0.3.2a1, <0.4.0 -chainlib-eth>=0.0.9a7,<0.1.0 -chainlib>=0.0.9a3,<0.1.0 -eth-address-index>=0.2.3a1,<0.3.0 +erc20-faucet>=0.3.2a2, <0.4.0 +chainlib-eth>=0.0.9a14,<0.1.0 +eth-address-index>=0.2.3a4,<0.3.0 diff --git a/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt b/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt index 764056bb..04e3428b 100644 --- a/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt +++ b/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt @@ -1,5 +1,4 @@ celery==4.4.7 erc20-demurrage-token~=0.0.3a1 -cic-eth-registry~=0.5.8a1 -chainlib~=0.0.7a1 -cic_eth~=0.12.2a4 +cic-eth-registry>=0.6.1a2,<0.7.0 +cic-eth[services]~=0.12.4a8 diff --git a/apps/cic-eth/requirements.txt b/apps/cic-eth/requirements.txt index 46482052..61fb0011 100644 --- a/apps/cic-eth/requirements.txt +++ b/apps/cic-eth/requirements.txt @@ -1,3 +1,3 @@ celery==4.4.7 -chainlib-eth>=0.0.9a11,<0.1.0 +chainlib-eth>=0.0.9a14,<0.1.0 semver==2.13.0 diff --git a/apps/cic-eth/tools_requirements.txt b/apps/cic-eth/tools_requirements.txt index 4a6a7fee..f10c88e9 100644 --- a/apps/cic-eth/tools_requirements.txt +++ b/apps/cic-eth/tools_requirements.txt @@ -1,4 +1,4 @@ -crypto-dev-signer>=0.4.15a4,<=0.4.15 +crypto-dev-signer>=0.4.15a7,<=0.4.15 chainqueue>=0.0.5a1,<0.1.0 cic-eth-registry>=0.6.1a2,<0.7.0 redis==3.5.3 diff --git a/apps/cic-ussd/cic_ussd/state_machine/logic/account.py b/apps/cic-ussd/cic_ussd/state_machine/logic/account.py index ca08e41c..13bc13c0 100644 --- a/apps/cic-ussd/cic_ussd/state_machine/logic/account.py +++ b/apps/cic-ussd/cic_ussd/state_machine/logic/account.py @@ -154,15 +154,14 @@ def parse_person_metadata(account: Account, metadata: dict): phone_number = account.phone_number date_registered = int(account.created.replace().timestamp()) blockchain_address = account.blockchain_address - chain_spec = f'{Chain.spec.common_name()}:{Chain.spec.engine()}: {Chain.spec.chain_id()}' + chain_str = Chain.spec.__str__() if isinstance(metadata.get('identities'), dict): identities = metadata.get('identities') else: identities = manage_identity_data( blockchain_address=blockchain_address, - blockchain_type=Chain.spec.engine(), - chain_spec=chain_spec + chain_str=chain_str ) return { diff --git a/apps/cic-ussd/config/client/app.ini b/apps/cic-ussd/config/client/app.ini deleted file mode 100644 index fa041acb..00000000 --- a/apps/cic-ussd/config/client/app.ini +++ /dev/null @@ -1,2 +0,0 @@ -[app] -service_code = *483*46# diff --git a/apps/cic-ussd/config/client/ussd.ini b/apps/cic-ussd/config/client/ussd.ini index 633ad403..1e9d0fd1 100644 --- a/apps/cic-ussd/config/client/ussd.ini +++ b/apps/cic-ussd/config/client/ussd.ini @@ -1,3 +1,4 @@ [ussd] +service_code = *483*46# user = pass = diff --git a/apps/cic-ussd/requirements.txt b/apps/cic-ussd/requirements.txt index 3d274059..66ac133a 100644 --- a/apps/cic-ussd/requirements.txt +++ b/apps/cic-ussd/requirements.txt @@ -6,7 +6,7 @@ celery==4.4.7 cffi==1.14.6 cic-eth[services]~=0.12.4a7 cic-notify~=0.4.0a10 -cic-types~=0.1.0a14 +cic-types~=0.1.0a15 confini>=0.4.1a1,<0.5.0 phonenumbers==8.12.12 psycopg2==2.8.6 diff --git a/apps/contract-migration/config.sh b/apps/contract-migration/config.sh index 858eaf85..819b131c 100755 --- a/apps/contract-migration/config.sh +++ b/apps/contract-migration/config.sh @@ -35,8 +35,11 @@ export TOKEN_SINK_ADDRESS=${TOKEN_SINK_ADDRESS:-$DEV_ETH_ACCOUNT_CONTRACT_DEPLOY # Migration variable processing - -confini-dump -vv --schema-module chainlib.eth.data.config --schema-module cic_eth.data.config --schema-dir ./config --prefix export > ${DEV_DATA_DIR}/env_reset +confini-dump --schema-dir ./config --prefix export > ${DEV_DATA_DIR}/env_reset +echo "export CIC_TRUST_ADDRESS=$CIC_TRUST_ADDRESS +export CIC_DEFAULT_TOKEN_SYMBOL=$CIC_DEFAULT_TOKEN_SYMBOL +export WALLET_KEY_FILE=$WALLET_KEY_FILE +" >> ${DEV_DATA_DIR}/env_reset cat ${DEV_DATA_DIR}/env_reset diff --git a/apps/contract-migration/config/config.ini b/apps/contract-migration/config/config.ini index 4bce6a78..3c30a030 100644 --- a/apps/contract-migration/config/config.ini +++ b/apps/contract-migration/config/config.ini @@ -1,13 +1,3 @@ -[token] -name = Giftable Token -symbol = GFT -type = giftable_erc20_token -demurrage_level = 196454828847045000000000000000000 -redistribution_period = -supply_limit = -sink_address = - - [dev] eth_account_contract_deployer = eth_account_reserve_minter = diff --git a/apps/contract-migration/reset.sh b/apps/contract-migration/reset.sh index 728356ce..f4d45f7f 100755 --- a/apps/contract-migration/reset.sh +++ b/apps/contract-migration/reset.sh @@ -110,8 +110,12 @@ giftable-token-minter -s -u $fee_price_arg -w -y $WALLET_KEY_FILE -e $DEV_RESERV #echo "export CIC_DEFAULT_TOKEN_SYMBOL=$TOKEN_SYMBOL" >> ${DEV_DATA_DIR}/env_reset export CIC_DEFAULT_TOKEN_SYMBOL=$TOKEN_SYMBOL -confini-dump -vv --schema-module chainlib.eth.data.config --schema-module cic_eth.data.config --schema-dir ./config --prefix export > ${DEV_DATA_DIR}/env_reset -confini-dump --schema-module chainlib.eth.data.config --schema-module cic_eth.data.config --schema-dir ./config +echo "Writing env_reset file ..." + +echo "export CIC_REGISTRY_ADDRESS=$CIC_REGISTRY_ADDRESS +export CIC_DEFAULT_TOKEN_SYMBOL=$CIC_DEFAULT_TOKEN_SYMBOL +export TOKEN_NAME=$TOKEN_NAME +" >> "${DEV_DATA_DIR}"/env_reset set +a set +e diff --git a/apps/contract-migration/seed_cic_eth.sh b/apps/contract-migration/seed_cic_eth.sh index eb1bfd59..4d0fcd73 100755 --- a/apps/contract-migration/seed_cic_eth.sh +++ b/apps/contract-migration/seed_cic_eth.sh @@ -82,7 +82,7 @@ cic-eth-ctl -i $CHAIN_SPEC unlock INIT cic-eth-ctl -i $CHAIN_SPEC unlock SEND cic-eth-ctl -i $CHAIN_SPEC unlock QUEUE -confini-dump --schema-module chainlib.eth.data.config --schema-module cic_eth.data.config --schema-dir ./config +#confini-dump --schema-module chainlib.eth.data.config --schema-module cic_eth.data.config --schema-dir ./config set +a set +e diff --git a/apps/data-seeding/cic_ussd/import_balance.py b/apps/data-seeding/cic_ussd/import_balance.py index 9f974e70..8fb487a3 100644 --- a/apps/data-seeding/cic_ussd/import_balance.py +++ b/apps/data-seeding/cic_ussd/import_balance.py @@ -16,7 +16,7 @@ from crypto_dev_signer.keystore.dict import DictKeystore from import_util import BalanceProcessor, get_celery_worker_status from import_task import ImportTask, MetadataTask -default_config_dir = './config' +default_config_dir = '/usr/local/etc/data-seeding/' logg = logging.getLogger() arg_parser = argparse.ArgumentParser(description='Daemon worker that handles data seeding tasks.') diff --git a/apps/data-seeding/config/cic.ini b/apps/data-seeding/config/cic.ini index 5064df15..2e346dae 100644 --- a/apps/data-seeding/config/cic.ini +++ b/apps/data-seeding/config/cic.ini @@ -1,11 +1,10 @@ [cic] -registry_address = 0x32E860c2A0645d1B7B005273696905F5D6DC5D05 +registry_address = token_index_address = accounts_index_address = declarator_address = approval_escrow_address = -chain_spec = evm:bloxberg:8996 +chain_spec = tx_retry_delay = -trust_address = 0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C +trust_address = user_ussd_svc_service_port = - diff --git a/apps/data-seeding/create_import_users.py b/apps/data-seeding/create_import_users.py index aa8e4e59..01d58c09 100644 --- a/apps/data-seeding/create_import_users.py +++ b/apps/data-seeding/create_import_users.py @@ -28,12 +28,11 @@ logg = logging.getLogger() fake = Faker(['sl', 'en_US', 'no', 'de', 'ro']) -script_dir = os.path.realpath(os.path.dirname(__file__)) -# config_dir = os.environ.get('CONFINI_DIR', '/usr/local/etc/cic') -config_dir = os.environ.get('CONFINI_DIR', os.path.join(script_dir, 'config')) +default_config_dir = './config' + argparser = argparse.ArgumentParser() -argparser.add_argument('-c', type=str, default=config_dir, help='Config dir') +argparser.add_argument('-c', type=str, default=default_config_dir, help='Config dir') argparser.add_argument('--tag', type=str, action='append', help='Tags to add to record') argparser.add_argument('--gift-threshold', type=int, @@ -53,7 +52,7 @@ elif args.vv: config = confini.Config(args.c, os.environ.get('CONFINI_ENV_PREFIX')) config.process() -logg.info('loaded config\n{}'.format(config)) +logg.debug('loaded config\n{}'.format(config)) dt_now = datetime.datetime.utcnow() diff --git a/apps/data-seeding/docker/Dockerfile b/apps/data-seeding/docker/Dockerfile index 4113c2d1..f993e33c 100644 --- a/apps/data-seeding/docker/Dockerfile +++ b/apps/data-seeding/docker/Dockerfile @@ -13,7 +13,8 @@ COPY package.json \ RUN npm ci --production #RUN --mount=type=cache,mode=0755,target=/root/node_modules npm install -COPY requirements.txt . +COPY requirements.txt . +COPY config/ /usr/local/etc/data-seeding ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433" ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple" diff --git a/apps/data-seeding/docker/Dockerfile_ci b/apps/data-seeding/docker/Dockerfile_ci deleted file mode 100644 index 8169b4db..00000000 --- a/apps/data-seeding/docker/Dockerfile_ci +++ /dev/null @@ -1,24 +0,0 @@ -# syntax = docker/dockerfile:1.2 -FROM registry.gitlab.com/grassrootseconomics/cic-base-images:python-3.8.6-dev-5ab8bf45 - -WORKDIR /root - -RUN mkdir -vp /usr/local/etc/cic - -COPY package.json \ - package-lock.json \ - . - -RUN npm install - -COPY requirements.txt . - -ARG EXTRA_INDEX_URL="https://pip.grassrootseconomics.net:8433" -ARG GITLAB_PYTHON_REGISTRY="https://gitlab.com/api/v4/projects/27624814/packages/pypi/simple" -RUN pip install \ - --extra-index-url $GITLAB_PYTHON_REGISTRY \ - --extra-index-url $EXTRA_INDEX_URL -r requirements.txt - -COPY . . - -ENTRYPOINT [ ] diff --git a/apps/data-seeding/import_ussd.sh b/apps/data-seeding/import_ussd.sh index 02773481..1eb7e3f6 100644 --- a/apps/data-seeding/import_ussd.sh +++ b/apps/data-seeding/import_ussd.sh @@ -1,60 +1,94 @@ -#!/usr/bin/env bash +#!/bin/bash -set -e +if [[ -d "$OUT_DIR" ]] +then + echo "found existing IMPORT DIR cleaning up..." + rm -rf "$OUT_DIR" + mkdir -p "$OUT_DIR" +else + echo "IMPORT DIR does not exist creating it." + mkdir -p "$OUT_DIR" +fi + +# using timeout because the timeout flag for celery inspect does not work +timeout 5 celery inspect ping -b "$CELERY_BROKER_URL" +if [[ $? -eq 124 ]] +then + >&2 echo "Celery workers not available. Is the CELERY_BROKER_URL ($CELERY_BROKER_URL) correct?" + exit 1 +fi echo "Creating seed data..." -python create_import_users.py -vv --dir "$IMPORT_DIR" "$ACCOUNT_COUNT" +python create_import_users.py -vv -c "$CONFIG" --dir "$OUT_DIR" "$NUMBER_OF_USERS" wait $! + +echo "Check for running celery workers ..." +if [ -f ./cic-ussd-import.pid ]; +then + echo "Found a running worker. Killing ..." + kill -9 $( nohup.out 2> nohup.err < /dev/null & else echo "Running worker with opening balance transactions" - TARGET_TX_COUNT=$((ACCOUNT_COUNT*2)) - python cic_ussd/import_balance.py -vv -c "$CONFIG" -p "$ETH_PROVIDER" -r "$CIC_REGISTRY_ADDRESS" --include-balances --token-symbol "$TOKEN_SYMBOL" -y "$KEYSTORE_PATH" "$IMPORT_DIR" & + TARGET_TX_COUNT=$((NUMBER_OF_USERS*2)) + nohup python cic_ussd/import_balance.py -vv -c "$CONFIG" -p "$ETH_PROVIDER" -r "$CIC_REGISTRY_ADDRESS" --include-balances --token-symbol "$TOKEN_SYMBOL" -y "$KEYSTORE_PATH" "$OUT_DIR" & fi +echo "Target count set to ${TARGET_TX_COUNT}" until [ -f ./cic-import-ussd.pid ] do echo "Polling for celery worker pid file..." sleep 1 done IMPORT_BALANCE_JOB=$(=0.4.15a4,<=0.4.15 +cic-types~=0.1.0a15 +crypto-dev-signer~=0.4.15a7 faker==4.17.1 chainsyncer~=0.0.6a3 -chainlib-eth~=0.0.9a13 +chainlib-eth~=0.0.9a14 eth-address-index~=0.2.3a4 eth-contract-registry~=0.6.3a3 eth-accounts-index~=0.1.2a3 -eth-erc20~=0.1.2a2 +eth-erc20~=0.1.2a3 erc20-faucet~=0.3.2a2 psycopg2==2.8.6 +liveness~=0.0.1a7 diff --git a/apps/data-seeding/verify.py b/apps/data-seeding/verify.py index 3db3e919..216b26ef 100644 --- a/apps/data-seeding/verify.py +++ b/apps/data-seeding/verify.py @@ -164,20 +164,8 @@ for t in custodial_tests: logg.info('activating custodial module'.format(t)) break -cols = os.get_terminal_size().columns - -def to_terminalwidth(s): - ss = s.ljust(int(cols)-1) - ss += "\r" - return ss - -def default_outfunc(s): - ss = to_terminalwidth(s) - sys.stdout.write(ss) -outfunc = default_outfunc -if logg.isEnabledFor(logging.DEBUG): - outfunc = logg.debug +outfunc = logg.debug def send_ussd_request(address, data_dir): diff --git a/ci_templates/.cic-template.yml b/ci_templates/.cic-template.yml index 5ba47394..2ecba76b 100644 --- a/ci_templates/.cic-template.yml +++ b/ci_templates/.cic-template.yml @@ -1,12 +1,12 @@ -image: - name: gcr.io/kaniko-project/executor:debug - entrypoint: [""] variables: KANIKO_CACHE_ARGS: "--cache=true --cache-copy-layers=true --cache-ttl=24h" MR_IMAGE_TAG: $CI_REGISTRY_IMAGE/mergerequest/$APP_NAME:$CI_COMMIT_SHORT_SHA .py_build_merge_request: + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] stage: build script: - mkdir -p /kaniko/.docker @@ -16,6 +16,9 @@ variables: --cache-repo $CI_REGISTRY_IMAGE --destination $MR_IMAGE_TAG .py_build_target_dev: + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] stage: build variables: IMAGE_TAG_BASE: $CI_REGISTRY_IMAGE/$APP_NAME:mr-unittest-$CI_COMMIT_SHORT_SHA @@ -28,6 +31,9 @@ variables: --destination $MR_IMAGE_TAG .py_build_push: + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] stage: build variables: IMAGE_TAG_BASE: $CI_REGISTRY_IMAGE/$APP_NAME:$CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA diff --git a/docker-compose.yml b/docker-compose.yml index 109a99e1..e7ba7e98 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -96,10 +96,11 @@ services: RUN_MASK: ${RUN_MASK:-0} # bit flags; 1: contract migrations 2: seed data DEV_FAUCET_AMOUNT: ${DEV_FAUCET_AMOUNT:-0} DEV_ETH_GAS_PRICE: $DEV_ETH_GAS_PRICE - TOKEN_NAME: ${TOKEN_NAME:-Sarafu Token} + TOKEN_NAME: ${TOKEN_NAME:-Giftable Token} TOKEN_SYMBOL: ${TOKEN_SYMBOL:-GFT} TOKEN_DECIMALS: $TOKEN_DECIMALS TOKEN_REDISTRIBUTION_PERIOD: $TOKEN_DEMURRAGE_REDISTRIBUTION_PERIOD + TASKS_TRANSFER_CALLBACKS: ${TASKS_TRANSFER_CALLBACKS:-"cic-eth:cic_eth.callbacks.noop.noop,cic-ussd:cic_ussd.tasks.callback_handler.transaction_callback"} TOKEN_SUPPLY_LIMIT: $TOKEN_SUPPLY_LIMIT TOKEN_DEMURRAGE_LEVEL: $TOKEN_DEMURRAGE_LEVEL TOKEN_SINK_ADDRESS: $TOKEN_SINK_ADDRESS @@ -117,6 +118,49 @@ services: - contract-config:/tmp/cic/config - ./apps/contract-migration:/root + + data-seeding: + image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/data-seeding:${TAG:-latest} + build: + context: apps/data-seeding + dockerfile: docker/Dockerfile + args: + pip_index_url: ${PIP_DEFAULT_INDEX_URL:-https://pypi.org/simple} + pip_extra_args: $PIP_EXTRA_ARGS + environment: + CIC_REGISTRY_ADDRESS: ${CIC_REGISTRY_ADDRESS:-0xea6225212005e86a4490018ded4bf37f3e772161} + OUT_DIR: out + NUMBER_OF_USERS: 10 + CONFIG: /usr/local/etc/data-seeding + CIC_CHAIN_SPEC: ${CIC_CHAIN_SPEC:-evm:bloxberg:8996} + ETH_PROVIDER: ${CIC_HTTP_PROVIDER:-http://eth:8545} + TOKEN_SYMBOL: GFT + KEYSTORE_PATH: keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c + USSD_HOST: cic-user-ussd-server + USSD_PORT: 9000 + INCLUDE_BALANCES: y + USSD_SSL: n + DATABASE_NAME: ${DATABASE_NAME:-cic_ussd} + DATABASE_USER: ${DATABASE_USER:-grassroots} + DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} # this is is set at initdb see: postgres/initdb/create_db.sql + DATABASE_HOST: ${DATABASE_HOST:-postgres} + DATABASE_PORT: ${DATABASE_PORT:-5432} + CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis:6379} + CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis:6379} + NOTIFY_DATABASE_NAME: cic_notify + REDIS_HOST: redis + REDIS_PORT: 6379 + REDIS_DB: 0 + META_HOST: meta + META_PORT: 8000 + META_URL: http://meta:8000 + USSD_PROVIDER: http://cic-user-ussd-server:9000 + CELERY_QUEUE: cic-import-ussd + EXCLUSIONS: ussd + command: bash import_ussd.sh + volumes: + - contract-config:/tmp/cic/config/:ro + cic-cache-tracker: image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/cic-cache:${TAG:-latest} profiles: @@ -128,8 +172,8 @@ services: EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433} environment: CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS # supplied at contract-config after contract provisioning - ETH_PROVIDER: ${RPC_HTTP_PROVIDER:-http://eth:8545} - RPC_HTTP_PROVIDER: ${RPC_HTTP_PROVIDER:-http://eth:8545} + ETH_PROVIDER: ${RPC_PROVIDER:-http://eth:8545} + RPC_PROVIDER: ${RPC_PROVIDER:-http://eth:8545} DATABASE_USER: ${DATABASE_USER:-grassroots} DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} # this is is set at initdb see: postgres/initdb/create_db.sql DATABASE_HOST: ${DATABASE_HOST:-postgres} @@ -219,6 +263,8 @@ services: - ${HTTP_PORT_CIC_CACHE:-63313}:8000 depends_on: - postgres + - cic-cache-tasker + - cic-cache-tracker command: - /bin/bash - -c @@ -242,7 +288,7 @@ services: CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER ETH_PROVIDER: ${ETH_PROVIDER:-http://eth:8545} - RPC_HTTP_PROVIDER: ${ETH_PROVIDER:-http://eth:8545} + RPC_PROVIDER: ${ETH_PROVIDER:-http://eth:8545} DATABASE_USER: ${DATABASE_USER:-grassroots} DATABASE_HOST: ${DATABASE_HOST:-postgres} DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} @@ -262,7 +308,6 @@ services: CELERY_DEBUG: ${CELERY_DEBUG:-1} #SIGNER_SOCKET_PATH: ${SIGNER_SOCKET_PATH:-http://cic-eth-signer:8000} SIGNER_PROVIDER: ${SIGNER_PROVIDER:-http://cic-eth-signer:8000} - SIGNER_PROVIDER: http://cic-eth-signer:8000 SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef} ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: ${DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER:-0xACB0BC74E1686D62dE7DC6414C999EA60C09F0eA} TASKS_TRACE_QUEUE_STATUS: ${TASKS_TRACE_QUEUE_STATUS:-1} @@ -297,7 +342,7 @@ services: CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS ETH_GAS_PROVIDER_ADDRESS: $DEV_ETH_ACCOUNT_GAS_PROVIDER ETH_PROVIDER: ${ETH_PROVIDER:-http://eth:8545} - RPC_HTTP_PROVIDER: ${ETH_PROVIDER:-http://eth:8545} + RPC_PROVIDER: ${ETH_PROVIDER:-http://eth:8545} DATABASE_USER: ${DATABASE_USER:-grassroots} DATABASE_HOST: ${DATABASE_HOST:-postgres} DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} @@ -347,8 +392,8 @@ services: args: EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433} environment: - RPC_HTTP_PROVIDER: ${RPC_HTTP_PROVIDER:-http://eth:8545} - ETH_PROVIDER: ${RPC_HTTP_PROVIDER:-http://eth:8545} + RPC_PROVIDER: ${RPC_PROVIDER:-http://eth:8545} + ETH_PROVIDER: ${RPC_PROVIDER:-http://eth:8545} DATABASE_USER: ${DATABASE_USER:-grassroots} DATABASE_HOST: ${DATABASE_HOST:-postgres} DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} @@ -360,10 +405,9 @@ services: CIC_CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996} CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996} CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS - #BANCOR_DIR: $BANCOR_DIR CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis} CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis} - TASKS_TRANSFER_CALLBACKS: $TASKS_TRANSFER_CALLBACKS + TASKS_TRANSFER_CALLBACKS: ${TASKS_TRANSFER_CALLBACKS:-"cic-eth:cic_eth.callbacks.noop.noop,cic-ussd:cic_ussd.tasks.callback_handler.transaction_callback"} restart: on-failure depends_on: - eth @@ -391,7 +435,7 @@ services: EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433} environment: ETH_PROVIDER: http://eth:8545 - RPC_HTTP_PROVIDER: http://eth:8545 + RPC_PROVIDER: http://eth:8545 DATABASE_USER: ${DATABASE_USER:-grassroots} DATABASE_HOST: ${DATABASE_HOST:-postgres} DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} @@ -435,7 +479,7 @@ services: EXTRA_INDEX_URL: ${EXTRA_INDEX_URL:-https://pip.grassrootseconomics.net:8433} environment: ETH_PROVIDER: http://eth:8545 - RPC_HTTP_PROVIDER: http://eth:8545 + RPC_PROVIDER: http://eth:8545 DATABASE_USER: ${DATABASE_USER:-grassroots} DATABASE_HOST: ${DATABASE_HOST:-postgres} DATABASE_PASSWORD: ${DATABASE_PASSWORD:-tralala} diff --git a/scripts/dump.sh b/scripts/dump.sh index dd02ea32..814c451f 100755 --- a/scripts/dump.sh +++ b/scripts/dump.sh @@ -1 +1 @@ -docker run -t -v cic-internal-integration_contract-config:/tmp/cic/config cic-internal-integration_contract-migration cat /tmp/cic/config/env_reset +docker run -t -v --rm cic-internal-integration_contract-config:/tmp/cic/config busybox cat /tmp/cic/config/env_reset