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 rlp
|
||||||
import web3
|
import web3
|
||||||
from web3 import HTTPProvider, WebsocketProvider
|
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 cic_registry import CICRegistry
|
||||||
from chainlib.chain import ChainSpec
|
from chainlib.chain import ChainSpec
|
||||||
from cic_registry import zero_address
|
from cic_registry import zero_address
|
||||||
|
@ -10,7 +10,7 @@ version = (
|
|||||||
0,
|
0,
|
||||||
10,
|
10,
|
||||||
0,
|
0,
|
||||||
'alpha.33',
|
'alpha.34',
|
||||||
)
|
)
|
||||||
|
|
||||||
version_object = semver.VersionInfo(
|
version_object = semver.VersionInfo(
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
web3==5.12.2
|
web3==5.12.2
|
||||||
celery==4.4.7
|
celery==4.4.7
|
||||||
crypto-dev-signer~=0.4.13rc2
|
crypto-dev-signer~=0.4.13rc3
|
||||||
confini~=0.3.6b1
|
confini~=0.3.6b1
|
||||||
cic-registry~=0.5.3a20
|
cic-registry~=0.5.3a22
|
||||||
cic-bancor~=0.0.6
|
cic-bancor~=0.0.6
|
||||||
redis==3.5.3
|
redis==3.5.3
|
||||||
alembic==1.4.2
|
alembic==1.4.2
|
||||||
@ -18,7 +18,7 @@ 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.1a18
|
chainlib~=0.0.1a19
|
||||||
hexathon~=0.0.1a3
|
hexathon~=0.0.1a3
|
||||||
chainsyncer~=0.0.1a18
|
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
|
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
|
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
|
RUN pip install --extra-index-url $pip_extra_index_url cic-registry==$cic_registry_version
|
||||||
|
|
||||||
WORKDIR /root
|
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('-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('-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('-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('-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('-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')
|
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)
|
chain_spec = ChainSpec.from_chain_str(chain_str)
|
||||||
old_chain_spec_str = args.old_chain_spec
|
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
|
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))
|
logg.error('no import record of address {}'.format(recipient))
|
||||||
return
|
return
|
||||||
u = Person.deserialize(o)
|
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]
|
balance = self.balances[original_address]
|
||||||
|
|
||||||
# TODO: store token object in handler ,get decimals from there
|
# TODO: store token object in handler ,get decimals from there
|
||||||
|
@ -88,7 +88,7 @@ batch_delay = args.batch_delay
|
|||||||
def register_eth(i, u):
|
def register_eth(i, u):
|
||||||
redis_channel = str(uuid.uuid4())
|
redis_channel = str(uuid.uuid4())
|
||||||
ps.subscribe(redis_channel)
|
ps.subscribe(redis_channel)
|
||||||
ps.get_message()
|
#ps.get_message()
|
||||||
api = Api(
|
api = Api(
|
||||||
config.get('CIC_CHAIN_SPEC'),
|
config.get('CIC_CHAIN_SPEC'),
|
||||||
queue=args.q,
|
queue=args.q,
|
||||||
@ -98,18 +98,24 @@ def register_eth(i, u):
|
|||||||
)
|
)
|
||||||
t = api.create_account(register=True)
|
t = api.create_account(register=True)
|
||||||
|
|
||||||
ps.get_message()
|
while True:
|
||||||
m = ps.get_message(timeout=args.timeout)
|
ps.get_message()
|
||||||
try:
|
m = ps.get_message(timeout=args.timeout)
|
||||||
r = json.loads(m['data'])
|
address = None
|
||||||
address = r['result']
|
if m['type'] == 'subscribe':
|
||||||
except TypeError as e:
|
logg.debug('skipping subscribe message')
|
||||||
if m == None:
|
continue
|
||||||
logg.critical('empty response from redis callback (did the service crash?)')
|
try:
|
||||||
else:
|
r = json.loads(m['data'])
|
||||||
logg.critical('unexpected response from redis callback: {}'.format(m))
|
address = r['result']
|
||||||
sys.exit(1)
|
break
|
||||||
logg.debug('[{}] register eth {} {}'.format(i, u, address))
|
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
|
return address
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
cic-base[full]==0.1.1a5
|
cic-base[full_graph]==0.1.1a8
|
||||||
cic-eth==0.10.0a33
|
cic-eth==0.10.0a34
|
||||||
cic-types==0.1.0a8
|
cic-types==0.1.0a8
|
||||||
|
@ -139,6 +139,7 @@ class Verifier:
|
|||||||
o = self.erc20_tx_factory.erc20_balance(self.token_address, address)
|
o = self.erc20_tx_factory.erc20_balance(self.token_address, address)
|
||||||
r = self.conn.do(o)
|
r = self.conn.do(o)
|
||||||
actual_balance = int(strip_0x(r), 16)
|
actual_balance = int(strip_0x(r), 16)
|
||||||
|
balance = int(balance / 1000000) * 1000000
|
||||||
logg.debug('balance for {}: {}'.format(address, balance))
|
logg.debug('balance for {}: {}'.format(address, balance))
|
||||||
if balance != actual_balance:
|
if balance != actual_balance:
|
||||||
raise VerifierError((actual_balance, balance), 'balance')
|
raise VerifierError((actual_balance, balance), 'balance')
|
||||||
|
@ -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.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"
|
>&2 echo "create account for gas gifter"
|
||||||
old_gas_provider=$DEV_ETH_ACCOUNT_GAS_PROVIDER
|
old_gas_provider=$DEV_ETH_ACCOUNT_GAS_PROVIDER
|
||||||
|
@ -3,7 +3,7 @@ alembic==1.4.2
|
|||||||
bcrypt==3.2.0
|
bcrypt==3.2.0
|
||||||
celery==4.4.7
|
celery==4.4.7
|
||||||
confini==0.3.6rc3
|
confini==0.3.6rc3
|
||||||
crypto-dev-signer==0.4.13rc2
|
crypto-dev-signer==0.4.13rc3
|
||||||
cryptography==3.2.1
|
cryptography==3.2.1
|
||||||
ecuth==0.4.5a1
|
ecuth==0.4.5a1
|
||||||
eth-accounts-index==0.0.10a10
|
eth-accounts-index==0.0.10a10
|
||||||
@ -44,4 +44,4 @@ giftable-erc20-token==0.0.7b12
|
|||||||
hexathon==0.0.1a3
|
hexathon==0.0.1a3
|
||||||
chainlib==0.0.1a19
|
chainlib==0.0.1a19
|
||||||
chainsyncer==0.0.1a18
|
chainsyncer==0.0.1a18
|
||||||
cic-registry==0.5.3.a21
|
cic-registry==0.5.3.a22
|
||||||
|
Loading…
Reference in New Issue
Block a user