From dfd0de32e177bb11a04585e4998c92ed34fa95d4 Mon Sep 17 00:00:00 2001 From: nolash Date: Tue, 23 Feb 2021 06:32:14 +0100 Subject: [PATCH] Add chainsyncer db migration, upgrade deps --- apps/cic-eth/cic_eth/runnable/daemons/filters/callback.py | 1 - apps/cic-eth/cic_eth/runnable/daemons/filters/tx.py | 5 ++++- apps/cic-eth/cic_eth/runnable/daemons/manager.py | 2 -- apps/cic-eth/requirements.txt | 4 ++-- apps/contract-migration/docker/Dockerfile | 4 ++-- apps/contract-migration/scripts/requirements.txt | 6 +++--- apps/contract-migration/seed_cic_eth.sh | 2 +- apps/requirements.txt | 4 ++-- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/apps/cic-eth/cic_eth/runnable/daemons/filters/callback.py b/apps/cic-eth/cic_eth/runnable/daemons/filters/callback.py index 27e44661..1c4f7255 100644 --- a/apps/cic-eth/cic_eth/runnable/daemons/filters/callback.py +++ b/apps/cic-eth/cic_eth/runnable/daemons/filters/callback.py @@ -85,7 +85,6 @@ class CallbackFilter(SyncFilter): def filter(self, conn, block, tx, db_session=None): - logg.debug('applying callback filter "{}:{}"'.format(self.queue, self.method)) chain_str = str(self.chain_spec) transfer_data = None diff --git a/apps/cic-eth/cic_eth/runnable/daemons/filters/tx.py b/apps/cic-eth/cic_eth/runnable/daemons/filters/tx.py index b8c5f298..5ed7d109 100644 --- a/apps/cic-eth/cic_eth/runnable/daemons/filters/tx.py +++ b/apps/cic-eth/cic_eth/runnable/daemons/filters/tx.py @@ -3,6 +3,9 @@ import logging # third-party imports import celery +from hexathon import ( + add_0x, + ) # local imports from cic_eth.db.models.otx import Otx @@ -21,7 +24,7 @@ class TxFilter(SyncFilter): def filter(self, conn, block, tx, db_session=None): db_session = SessionBase.bind_session(db_session) tx_hash_hex = tx.hash - otx = Otx.load(tx_hash_hex, session=db_session) + otx = Otx.load(add_0x(tx_hash_hex), session=db_session) SessionBase.release_session(db_session) if otx == None: logg.debug('tx {} not found locally, skipping'.format(tx_hash_hex)) diff --git a/apps/cic-eth/cic_eth/runnable/daemons/manager.py b/apps/cic-eth/cic_eth/runnable/daemons/manager.py index 66f4888f..e09205b5 100644 --- a/apps/cic-eth/cic_eth/runnable/daemons/manager.py +++ b/apps/cic-eth/cic_eth/runnable/daemons/manager.py @@ -75,8 +75,6 @@ SessionBase.connect(dsn, pool_size=1, debug=config.true('DATABASE_DEBUG')) def main(): - #global chain_spec, c, queue - # parse chain spec object chain_spec = ChainSpec.from_chain_str(config.get('CIC_CHAIN_SPEC')) diff --git a/apps/cic-eth/requirements.txt b/apps/cic-eth/requirements.txt index 59423863..7b134c86 100644 --- a/apps/cic-eth/requirements.txt +++ b/apps/cic-eth/requirements.txt @@ -18,6 +18,6 @@ eth-gas-proxy==0.0.1a4 websocket-client==0.57.0 moolb~=0.1.1b2 eth-address-index~=0.1.0a8 -chainlib~=0.0.1a16 +chainlib~=0.0.1a17 hexathon~=0.0.1a3 -chainsyncer~=0.0.1a8 +chainsyncer~=0.0.1a12 diff --git a/apps/contract-migration/docker/Dockerfile b/apps/contract-migration/docker/Dockerfile index 1b893de9..a019b69e 100644 --- a/apps/contract-migration/docker/Dockerfile +++ b/apps/contract-migration/docker/Dockerfile @@ -155,10 +155,10 @@ RUN pip install --extra-index-url $pip_extra_index_url eth-gas-proxy==$eth_gas_ ARG cic_contracts_version=0.0.2a2 RUN pip install --extra-index-url $pip_extra_index_url cic-contracts==$cic_contracts_version -ARG chainlib_version=0.0.1a16 +ARG chainlib_version=0.0.1a17 RUN pip install --extra-index-url $pip_extra_index_url chainlib==$chainlib_version -ARG chainsyncer_version=0.0.1a8 +ARG chainsyncer_version=0.0.1a12 RUN pip install --extra-index-url $pip_extra_index_url chainsyncer==$chainsyncer_version diff --git a/apps/contract-migration/scripts/requirements.txt b/apps/contract-migration/scripts/requirements.txt index c9838fa5..7d95f4bf 100644 --- a/apps/contract-migration/scripts/requirements.txt +++ b/apps/contract-migration/scripts/requirements.txt @@ -1,7 +1,7 @@ psycopg2==2.8.6 -chainlib~=0.0.1a15 -chainsyncer~=0.0.1a10 -cic-eth==0.10.0a30+build.fdb16130 +chainlib~=0.0.1a17 +chainsyncer~=0.0.1a12 +cic-eth==0.10.0a31 cic-registry~=0.5.3a21 confini~=0.3.6rc3 celery==4.4.7 diff --git a/apps/contract-migration/seed_cic_eth.sh b/apps/contract-migration/seed_cic_eth.sh index 14e4e88e..088fda89 100644 --- a/apps/contract-migration/seed_cic_eth.sh +++ b/apps/contract-migration/seed_cic_eth.sh @@ -31,7 +31,7 @@ set -e set -a # We need to not install these here... -pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL cic-eth==0.10.0a30+build.fdb16130 chainlib==0.0.1a16 +pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL cic-eth==0.10.0a31 chainlib==0.0.1a17 >&2 echo "create account for gas gifter" old_gas_provider=$DEV_ETH_ACCOUNT_GAS_PROVIDER diff --git a/apps/requirements.txt b/apps/requirements.txt index 80066203..918e017b 100644 --- a/apps/requirements.txt +++ b/apps/requirements.txt @@ -42,6 +42,6 @@ rlp==2.0.1 cryptocurrency-cli-tools==0.0.4 giftable-erc20-token==0.0.7b12 hexathon==0.0.1a3 -chainlib==0.0.1a16 -chainsyncer==0.0.1a10 +chainlib==0.0.1a17 +chainsyncer==0.0.1a12 cic-registry==0.5.3.a21