Rehabilitate import scripts and builds after syncer changes
This commit is contained in:
parent
4ea3933f07
commit
4af7592212
@ -13,7 +13,10 @@ import celery
|
||||
import rlp
|
||||
import web3
|
||||
from web3 import HTTPProvider, WebsocketProvider
|
||||
import cic_base
|
||||
import cic_base.config
|
||||
import cic_base.log
|
||||
import cic_base.argparse
|
||||
import cic_base.rpc
|
||||
from cic_registry import CICRegistry
|
||||
from chainlib.chain import ChainSpec
|
||||
from cic_registry import zero_address
|
||||
|
@ -10,7 +10,7 @@ version = (
|
||||
0,
|
||||
10,
|
||||
0,
|
||||
'alpha.33',
|
||||
'alpha.34',
|
||||
)
|
||||
|
||||
version_object = semver.VersionInfo(
|
||||
|
@ -1,8 +1,8 @@
|
||||
web3==5.12.2
|
||||
celery==4.4.7
|
||||
crypto-dev-signer~=0.4.13rc2
|
||||
crypto-dev-signer~=0.4.13rc3
|
||||
confini~=0.3.6b1
|
||||
cic-registry~=0.5.3a20
|
||||
cic-registry~=0.5.3a22
|
||||
cic-bancor~=0.0.6
|
||||
redis==3.5.3
|
||||
alembic==1.4.2
|
||||
@ -18,7 +18,7 @@ eth-gas-proxy==0.0.1a4
|
||||
websocket-client==0.57.0
|
||||
moolb~=0.1.1b2
|
||||
eth-address-index~=0.1.0a8
|
||||
chainlib~=0.0.1a18
|
||||
chainlib~=0.0.1a19
|
||||
hexathon~=0.0.1a3
|
||||
chainsyncer~=0.0.1a18
|
||||
cic-base==0.1.1a5
|
||||
cic-base==0.1.1a8
|
||||
|
@ -107,10 +107,10 @@ RUN cd cic-bancor/python && \
|
||||
|
||||
|
||||
RUN apt-get install -y cargo
|
||||
ARG cic_base_version=0.1.1a7
|
||||
ARG cic_base_version=0.1.1a8
|
||||
RUN pip install --extra-index-url $pip_extra_index_url cic-base[full_graph]==$cic_base_version
|
||||
|
||||
ARG cic_registry_version=0.5.3a21
|
||||
ARG cic_registry_version=0.5.3a22
|
||||
RUN pip install --extra-index-url $pip_extra_index_url cic-registry==$cic_registry_version
|
||||
|
||||
WORKDIR /root
|
||||
|
@ -48,7 +48,7 @@ argparser = argparse.ArgumentParser(description='daemon that monitors transactio
|
||||
argparser.add_argument('-p', '--provider', dest='p', type=str, help='chain rpc provider address')
|
||||
argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing')
|
||||
argparser.add_argument('-c', type=str, default=config_dir, help='config root to use')
|
||||
argparser.add_argument('--old-chain-spec', type=str, dest='old_chain_spec', default='oldchain:1', help='chain spec')
|
||||
argparser.add_argument('--old-chain-spec', type=str, dest='old_chain_spec', default='evm:oldchain:1', help='chain spec')
|
||||
argparser.add_argument('-i', '--chain-spec', type=str, dest='i', help='chain spec')
|
||||
argparser.add_argument('-r', '--registry-address', type=str, dest='r', help='CIC Registry address')
|
||||
argparser.add_argument('--token-symbol', default='SRF', type=str, dest='token_symbol', help='Token symbol to use for trnsactions')
|
||||
@ -101,6 +101,7 @@ else:
|
||||
|
||||
chain_spec = ChainSpec.from_chain_str(chain_str)
|
||||
old_chain_spec_str = args.old_chain_spec
|
||||
old_chain_spec = ChainSpec.from_chain_str(old_chain_spec_str)
|
||||
|
||||
user_dir = args.user_dir # user_out_dir from import_users.py
|
||||
|
||||
@ -146,7 +147,7 @@ class Handler:
|
||||
logg.error('no import record of address {}'.format(recipient))
|
||||
return
|
||||
u = Person.deserialize(o)
|
||||
original_address = u.identities['evm'][old_chain_spec_str][0]
|
||||
original_address = u.identities[old_chain_spec.engine()]['{}:{}'.format(old_chain_spec.common_name(), old_chain_spec.network_id())][0]
|
||||
balance = self.balances[original_address]
|
||||
|
||||
# TODO: store token object in handler ,get decimals from there
|
||||
|
@ -88,7 +88,7 @@ batch_delay = args.batch_delay
|
||||
def register_eth(i, u):
|
||||
redis_channel = str(uuid.uuid4())
|
||||
ps.subscribe(redis_channel)
|
||||
ps.get_message()
|
||||
#ps.get_message()
|
||||
api = Api(
|
||||
config.get('CIC_CHAIN_SPEC'),
|
||||
queue=args.q,
|
||||
@ -98,18 +98,24 @@ def register_eth(i, u):
|
||||
)
|
||||
t = api.create_account(register=True)
|
||||
|
||||
ps.get_message()
|
||||
m = ps.get_message(timeout=args.timeout)
|
||||
try:
|
||||
r = json.loads(m['data'])
|
||||
address = r['result']
|
||||
except TypeError as e:
|
||||
if m == None:
|
||||
logg.critical('empty response from redis callback (did the service crash?)')
|
||||
else:
|
||||
logg.critical('unexpected response from redis callback: {}'.format(m))
|
||||
sys.exit(1)
|
||||
logg.debug('[{}] register eth {} {}'.format(i, u, address))
|
||||
while True:
|
||||
ps.get_message()
|
||||
m = ps.get_message(timeout=args.timeout)
|
||||
address = None
|
||||
if m['type'] == 'subscribe':
|
||||
logg.debug('skipping subscribe message')
|
||||
continue
|
||||
try:
|
||||
r = json.loads(m['data'])
|
||||
address = r['result']
|
||||
break
|
||||
except TypeError as e:
|
||||
if m == None:
|
||||
logg.critical('empty response from redis callback (did the service crash?)')
|
||||
else:
|
||||
logg.critical('unexpected response from redis callback: {}'.format(m))
|
||||
sys.exit(1)
|
||||
logg.debug('[{}] register eth {} {}'.format(i, u, address))
|
||||
|
||||
return address
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
cic-base[full]==0.1.1a5
|
||||
cic-eth==0.10.0a33
|
||||
cic-base[full_graph]==0.1.1a8
|
||||
cic-eth==0.10.0a34
|
||||
cic-types==0.1.0a8
|
||||
|
@ -139,6 +139,7 @@ class Verifier:
|
||||
o = self.erc20_tx_factory.erc20_balance(self.token_address, address)
|
||||
r = self.conn.do(o)
|
||||
actual_balance = int(strip_0x(r), 16)
|
||||
balance = int(balance / 1000000) * 1000000
|
||||
logg.debug('balance for {}: {}'.format(address, balance))
|
||||
if balance != actual_balance:
|
||||
raise VerifierError((actual_balance, balance), 'balance')
|
||||
|
@ -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.0a33 chainlib==0.0.1a18 cic-contracts==0.0.2a2
|
||||
pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL cic-eth==0.10.0a34 chainlib==0.0.1a19 cic-contracts==0.0.2a2
|
||||
|
||||
>&2 echo "create account for gas gifter"
|
||||
old_gas_provider=$DEV_ETH_ACCOUNT_GAS_PROVIDER
|
||||
|
@ -3,7 +3,7 @@ alembic==1.4.2
|
||||
bcrypt==3.2.0
|
||||
celery==4.4.7
|
||||
confini==0.3.6rc3
|
||||
crypto-dev-signer==0.4.13rc2
|
||||
crypto-dev-signer==0.4.13rc3
|
||||
cryptography==3.2.1
|
||||
ecuth==0.4.5a1
|
||||
eth-accounts-index==0.0.10a10
|
||||
@ -44,4 +44,4 @@ giftable-erc20-token==0.0.7b12
|
||||
hexathon==0.0.1a3
|
||||
chainlib==0.0.1a19
|
||||
chainsyncer==0.0.1a18
|
||||
cic-registry==0.5.3.a21
|
||||
cic-registry==0.5.3.a22
|
||||
|
Loading…
Reference in New Issue
Block a user