Compare commits

..

8 Commits

Author SHA1 Message Date
nolash
cec96a4f63 Add shared env dumper 2021-09-10 09:22:25 +02:00
nolash
56f18487f9 Merge remote-tracking branch 'origin/master' into lash/contract-migration-dump 2021-09-10 07:09:30 +02:00
nolash
b52a727f14 Add missing env vars to contract migration, correct env path on shared vol 2021-09-10 07:07:28 +02:00
nolash
c1b2aea2f8 Add wait for faucet amount set tx in contract-migration reset 2021-09-10 06:04:28 +02:00
b9b06eced8 Merge branch 'staging' into 'master'
feat: add multi-project build to trigger deploy-k8s-dev in the devops repo

See merge request grassrootseconomics/cic-internal-integration!268
2021-09-09 21:28:49 +00:00
949bb29379 feat: add multi-project build to trigger deploy-k8s-dev in the devops repo 2021-09-09 21:28:49 +00:00
Louis Holbrook
0468906601 Merge branch 'lash/contract-migration-dump' into 'master'
fix(contract-migration): Make http signer work with local deployment

See merge request grassrootseconomics/cic-internal-integration!270
2021-09-09 13:38:10 +00:00
nolash
471243488e Add latest crypto-dev-signer install explicitly in dockerfile for cic-eth 2021-09-09 14:27:47 +02:00
10 changed files with 39 additions and 21 deletions

View File

@@ -36,3 +36,8 @@ build-push:
rules:
- if: $CI_COMMIT_REF_PROTECTED == "true"
when: always
deploy-dev:
stage: deploy
trigger: grassrootseconomics/devops
when: manual

View File

@@ -31,8 +31,16 @@ RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
$EXTRA_PIP_ARGS \
-r requirements.txt \
-r services_requirements.txt \
-r admin_requirements.txt
-r admin_requirements.txt
# always install the latest signer
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
pip install --index-url https://pypi.org/simple \
--extra-index-url $GITLAB_PYTHON_REGISTRY \
--extra-index-url $EXTRA_INDEX_URL \
$EXTRA_PIP_ARGS \
crypto-dev-signer
COPY . .
RUN python setup.py install

View File

@@ -1,3 +1,3 @@
celery==4.4.7
chainlib-eth>=0.0.9a7,<0.1.0
chainlib-eth>=0.0.9a11,<0.1.0
semver==2.13.0

View File

@@ -1,4 +1,4 @@
crypto-dev-signer>=0.4.15a2,<=0.4.15
crypto-dev-signer>=0.4.15a4,<=0.4.15
chainqueue>=0.0.5a1,<0.1.0
cic-eth-registry>=0.6.1a2,<0.7.0
redis==3.5.3

View File

@@ -9,3 +9,4 @@ erc20-transfer-authorization>=0.3.5a2,<0.4.0
erc20-faucet>=0.3.2a2,<0.4.0
sarafu-faucet>=0.0.7a2,<0.1.0
confini>=0.4.2rc3,<1.0.0
crypto-dev-signer>=0.4.15a4,<=0.4.15

View File

@@ -96,7 +96,7 @@ eth-token-index-add $fee_price_arg -s -u -w -y $WALLET_KEY_FILE -i $CIC_CHAIN_S
DEV_FAUCET_ADDRESS=`sarafu-faucet-deploy $fee_price_arg -y $WALLET_KEY_FILE -i $CIC_CHAIN_SPEC -p $RPC_PROVIDER -w -vv --account-index-address $DEV_ACCOUNT_INDEX_ADDRESS $DEV_RESERVE_ADDRESS -s`
>&2 echo "set token faucet amount"
sarafu-faucet-set $fee_price_arg -y $WALLET_KEY_FILE -i $CIC_CHAIN_SPEC -p $RPC_PROVIDER -e $DEV_FAUCET_ADDRESS -vv -s --fee-limit 100000 $DEV_FAUCET_AMOUNT
sarafu-faucet-set $fee_price_arg -w -y $WALLET_KEY_FILE -i $CIC_CHAIN_SPEC -p $RPC_PROVIDER -e $DEV_FAUCET_ADDRESS -vv -s --fee-limit 100000 $DEV_FAUCET_AMOUNT
>&2 echo "register faucet in registry"
eth-contract-registry-set -s -u $fee_price_arg -w -y $WALLET_KEY_FILE -e $CIC_REGISTRY_ADDRESS -i $CIC_CHAIN_SPEC -p $RPC_PROVIDER -vv --identifier Faucet $DEV_FAUCET_ADDRESS
@@ -105,7 +105,10 @@ eth-contract-registry-set -s -u $fee_price_arg -w -y $WALLET_KEY_FILE -e $CIC_RE
giftable-token-minter -s -u $fee_price_arg -w -y $WALLET_KEY_FILE -e $DEV_RESERVE_ADDRESS -i $CIC_CHAIN_SPEC -p $RPC_PROVIDER -vv $DEV_FAUCET_ADDRESS
#echo "export CIC_DEFAULT_TOKEN_SYMBOL=$TOKEN_SYMBOL" >> ${DEV_DATA_DIR}/env_reset
export CIC_DEFAULT_TOKEN_SYMBOL=$TOKEN_SYMBOL
confini-dump --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
set +a
set +e

View File

@@ -82,5 +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
set +a
set +e

View File

@@ -216,10 +216,7 @@ if __name__ == '__main__':
f.write(to_checksum_address(new_address_clean))
f.close()
try:
os.symlink(os.path.realpath(filepath), meta_phone_filepath)
except FileExistsError as e:
logg.warning('phone pointer for {} already exists: {}'.format(new_address_clean, e))
os.symlink(os.path.realpath(filepath), meta_phone_filepath)
# custom data
@@ -242,10 +239,8 @@ if __name__ == '__main__':
f.write(json.dumps(tag_data))
f.close()
try:
os.symlink(os.path.realpath(filepath), custom_filepath)
except FileExistsError as e:
logg.warning('custom data pointer for {} already exists: {}'.format(new_address_clean, e))
os.symlink(os.path.realpath(filepath), custom_filepath)
i += 1
sys.stdout.write('imported {} {}'.format(i, u).ljust(200) + "\r")

View File

@@ -73,6 +73,7 @@ services:
# image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/contract-migration:latest
environment:
RPC_PROVIDER: ${RPC_PROVIDER:-http://eth:8545}
RPC_HTTP_PROVIDER: ${RPC_PROVIDER:-http://eth:8545}
DEV_USE_DOCKER_WAIT_SCRIPT: 1
CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996}
CIC_CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996}
@@ -101,6 +102,7 @@ services:
TOKEN_DEMURRAGE_LEVEL: $TOKEN_DEMURRAGE_LEVEL
TOKEN_SINK_ADDRESS: $TOKEN_SINK_ADDRESS
TOKEN_TYPE: $TOKEN_TYPE
SIGNER_PROVIDER: ${SIGNER_SOCKET_PATH:-http://cic-eth-signer:8000}
command: ["./run_job.sh"]
#command: ["./reset.sh"]
depends_on:
@@ -148,7 +150,7 @@ services:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi
./start_tracker.sh -c /usr/local/etc/cic-cache -vv
volumes:
- contract-config:/tmp/cic/config/:ro
@@ -189,7 +191,7 @@ services:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi
/usr/local/bin/cic-cache-taskerd -vv
volumes:
- contract-config:/tmp/cic/config/:ro
@@ -223,7 +225,7 @@ services:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi
"/usr/local/bin/uwsgi" \
--wsgi-file /root/cic_cache/runnable/daemons/server.py \
--http :8000 \
@@ -270,6 +272,7 @@ services:
- eth
- postgres
- redis
- cic-eth-signer
deploy:
restart_policy:
condition: on-failure
@@ -282,7 +285,7 @@ services:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi
./start_tasker.sh --aux-all -q cic-eth -vv
cic-eth-signer:
@@ -336,7 +339,7 @@ services:
# - /bin/bash
# - -c
# - |
# if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
# if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi
# ./start_tasker.sh --aux-all -q cic-eth -vv
# command: [/bin/sh, "./start_tasker.sh", -q, cic-eth, -vv ]
@@ -379,7 +382,7 @@ services:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi
#./start_tracker.sh -vv -c /usr/local/etc/cic-eth
./start_tracker.sh -vv
# command: "/root/start_manager.sh head -vv"
@@ -425,7 +428,7 @@ services:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi
./start_dispatcher.sh -q cic-eth -vv
# command: "/root/start_dispatcher.sh -q cic-eth -vv"
@@ -473,7 +476,7 @@ services:
- /bin/bash
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
if [[ -f /tmp/cic/config/env_reset ]]; then source /tmp/cic/config/env_reset; fi
./start_retry.sh -vv
# command: "/root/start_retry.sh -q cic-eth -vv"

1
dump.sh Normal file
View File

@@ -0,0 +1 @@
docker run -t -v cic-internal-integration_contract-config:/tmp/cic/config cic-internal-integration_contract-migration cat /tmp/cic/config/env_reset