Add chainsyncer db migration, upgrade deps

This commit is contained in:
nolash 2021-02-23 06:32:14 +01:00
parent 7752ab5c5d
commit dfd0de32e1
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746
8 changed files with 14 additions and 14 deletions

View File

@ -85,7 +85,6 @@ class CallbackFilter(SyncFilter):
def filter(self, conn, block, tx, db_session=None): 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) chain_str = str(self.chain_spec)
transfer_data = None transfer_data = None

View File

@ -3,6 +3,9 @@ import logging
# third-party imports # third-party imports
import celery import celery
from hexathon import (
add_0x,
)
# local imports # local imports
from cic_eth.db.models.otx import Otx from cic_eth.db.models.otx import Otx
@ -21,7 +24,7 @@ class TxFilter(SyncFilter):
def filter(self, conn, block, tx, db_session=None): def filter(self, conn, block, tx, db_session=None):
db_session = SessionBase.bind_session(db_session) db_session = SessionBase.bind_session(db_session)
tx_hash_hex = tx.hash 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) SessionBase.release_session(db_session)
if otx == None: if otx == None:
logg.debug('tx {} not found locally, skipping'.format(tx_hash_hex)) logg.debug('tx {} not found locally, skipping'.format(tx_hash_hex))

View File

@ -75,8 +75,6 @@ SessionBase.connect(dsn, pool_size=1, debug=config.true('DATABASE_DEBUG'))
def main(): def main():
#global chain_spec, c, queue
# parse chain spec object # parse chain spec object
chain_spec = ChainSpec.from_chain_str(config.get('CIC_CHAIN_SPEC')) chain_spec = ChainSpec.from_chain_str(config.get('CIC_CHAIN_SPEC'))

View File

@ -18,6 +18,6 @@ eth-gas-proxy==0.0.1a4
websocket-client==0.57.0 websocket-client==0.57.0
moolb~=0.1.1b2 moolb~=0.1.1b2
eth-address-index~=0.1.0a8 eth-address-index~=0.1.0a8
chainlib~=0.0.1a16 chainlib~=0.0.1a17
hexathon~=0.0.1a3 hexathon~=0.0.1a3
chainsyncer~=0.0.1a8 chainsyncer~=0.0.1a12

View File

@ -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 ARG cic_contracts_version=0.0.2a2
RUN pip install --extra-index-url $pip_extra_index_url cic-contracts==$cic_contracts_version 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 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 RUN pip install --extra-index-url $pip_extra_index_url chainsyncer==$chainsyncer_version

View File

@ -1,7 +1,7 @@
psycopg2==2.8.6 psycopg2==2.8.6
chainlib~=0.0.1a15 chainlib~=0.0.1a17
chainsyncer~=0.0.1a10 chainsyncer~=0.0.1a12
cic-eth==0.10.0a30+build.fdb16130 cic-eth==0.10.0a31
cic-registry~=0.5.3a21 cic-registry~=0.5.3a21
confini~=0.3.6rc3 confini~=0.3.6rc3
celery==4.4.7 celery==4.4.7

View File

@ -31,7 +31,7 @@ set -e
set -a set -a
# We need to not install these here... # 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" >&2 echo "create account for gas gifter"
old_gas_provider=$DEV_ETH_ACCOUNT_GAS_PROVIDER old_gas_provider=$DEV_ETH_ACCOUNT_GAS_PROVIDER

View File

@ -42,6 +42,6 @@ rlp==2.0.1
cryptocurrency-cli-tools==0.0.4 cryptocurrency-cli-tools==0.0.4
giftable-erc20-token==0.0.7b12 giftable-erc20-token==0.0.7b12
hexathon==0.0.1a3 hexathon==0.0.1a3
chainlib==0.0.1a16 chainlib==0.0.1a17
chainsyncer==0.0.1a10 chainsyncer==0.0.1a12
cic-registry==0.5.3.a21 cic-registry==0.5.3.a21