From ce9c5bc14ccff695a24e05b0da1855b1bf854e95 Mon Sep 17 00:00:00 2001 From: Will Ruddick Date: Fri, 16 Jul 2021 13:35:37 +0000 Subject: [PATCH] Update misc-commands.md --- misc-commands.md | 68 +++++++----------------------------------------- 1 file changed, 10 insertions(+), 58 deletions(-) diff --git a/misc-commands.md b/misc-commands.md index f6a21fc..92a475d 100644 --- a/misc-commands.md +++ b/misc-commands.md @@ -1,67 +1,19 @@ # Environment +deploy contracts +set up system accounts +throw some gas and tokens around for system accounts +start all services git clone https://gitlab.com/grassrootseconomics/cic-internal-integration/ sudo RUN_MASK=3 COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 DEV_FAUCET_AMOUNT=100000000 TOKEN_TYPE=erc20_demurrage_token CIC_DEFAULT_TOKEN_SYMBOL=SARAFU docker-compose up --build that should set you up, and then you need to determine when the setup is done by running: -docker container ls -a -then choosing the name of the contract migration container: - -docker logs -f +sudo docker logs -f cic-internal-integration_contract-migration_1 when that logs exits, you're good - -## no containers or volumes leftover from previous attempts -cd apps/data-seeding - -python -m venv ~/code/cic/venv/ -source ~/code/cic/venv/bin/activate -python -m pip install --upgrade pip -## setup modified requirements.txt for Mac (make sure to pull through latest changes into cic-base) -pip install requirements-magic==0.0.1a2 -python ~/code/gitlab/grassrootseconomics/python-requirements-magic/requirements_magic/runnable/update.py ~/code/cic/requirements.txt ~/code/gitlab/grassrootseconomics/cic-internal-integration/apps/data-seeding/requirements.txt ~/code/gitlab/grassrootseconomics/cic-base/full_graph_requirements.txt ~/code/gitlab/grassrootseconomics/cic-base/full_requirements.txt ~/code/gitlab/grassrootseconomics/cic-base/requirements.txt > ~/code/cic/requirements-new.txt -## install dependencies -pip install -r ~/code/cic/requirements-new.txt --extra-index-url https://pip.grassrootseconomics.net:8433 --index https://pypi.org/simple -## Step 1 - Data creation - -python create_import_users.py --gift-threshold 10000 --dir ~/code/cic/out 50 - -## Step 2 - Services -### open new terminal window -cd ../.. -### docker-compose down -v - -docker-compose up eth postgres redis -RUN_MASK=1 docker-compose up --build contract-migration -### (wait until complete) -docker-compose up --build cic-eth-tasker -RUN_MASK=2 docker-compose up contract-migration -### (wait until complete) - -docker-compose up --build cic-eth-tracker cic-eth-dispatcher -docker-compose up --build cic-cache-tracker -docker-compose up --build cic-cache-tasker cic-cache-server cic-eth-retrier cic-meta-server cic-notify-tasker cic-user-ussd-server cic-user-tasker - -## Step 3 - User Imports -### custodial engine import scripts -### run in sequence, in first terminal - -python cic_eth/import_balance.py -v -c config -p http://localhost:63545 -r 0xea6225212005e86a4490018ded4bf37f3e772161 -y ../contract-migration/keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c --head ~/code/cic/out -### in another terminal with venv -python cic_eth/import_users.py -v -c config --redis-host-callback redis ~/code/cic/out -### check the cic-cache DB's tx table -## Step 4 - Metadata import - -nvm use 14.17.0 -### temporary: lock "cic-client-meta": "0.0.7-alpha.6" in package.json -npm install -node cic_meta/import_meta.js ~/code/cic/out 50 -node cic_meta/import_meta_phone.js ~/code/cic/out 50 - -## Step 5 - Verify -python verify.py -v -c config -r 0xea6225212005e86a4490018ded4bf37f3e772161 -p http://localhost:63545 --token-symbol GFT --exclude ussd --skip-custodial ~/code/cic/out -python verify.py -v -c config -r 0xea6225212005e86a4490018ded4bf37f3e772161 -p http://localhost:63545 --token-symbol GFT --exclude ussd --exclude metadata --exclude metadata_phone --exclude ussd_pins --skip-custodial ~/code/cic/out +# Create users +https://gitlab.com/grassrootseconomics/cic-internal-integration/-/tree/lash/migration-fix/apps/data-seeding#alternative-3-ussd-import-cic_ussd # Token Creation @@ -71,9 +23,10 @@ git clone https://gitlab.com/nolash/grassroots-app ## Setup: sudo docker-compose down -v -sudo RUN_MASK=3 docker-compose up –build -/apps/data-seeding: +sudo RUN_MASK=3 COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 DEV_FAUCET_AMOUNT=100000000 TOKEN_TYPE=erc20_demurrage_token CIC_DEFAULT_TOKEN_SYMBOL=SARAFU docker-compose up --build + +sudo RUN_MASK=3 docker-compose up –build ## Deploy token erc20-demurrage-token-deploy –help @@ -83,7 +36,6 @@ erc20-demurrage-token-deploy –help (venv) wor@gecon:~/src/ge/erc20-demurrage-token/python$ eth-get -p http://localhost:63545 0xcf38135da34784a9db226772dcf740089f466241ba82ab4a2f4b5265fcb23a4d - giftable-token-gift -p http://localhost:63545 -y ./keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c -i evm:bloxberg:8996 -vv -w -a --recipient giftable-token-gift -p http://localhost:63545 -y /home/wor/src/ge/cic-internal-integration/apps/contract-migration/keystore/UTC--2021-01-08T17-18-44.521011372Z--eb3907ecad74a0013c259d5874ae7f22dcbcc95c -i evm:bloxberg:8996 -vv -w -a 0x6ca3cb14aa6f761712e1c18646afba4d5ae249e8 100