WIP remove lower layer deps in ussd, correct create account api task graph

This commit is contained in:
nolash 2021-03-07 10:33:11 +01:00
parent 1c0732d983
commit 05479a6576
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746
16 changed files with 23 additions and 47 deletions

View File

@ -352,8 +352,7 @@ class Api:
],
queue=self.queue,
)
s_nonce.link(s_account)
s_check.link(s_nonce)
s_check.link(s_account)
if self.callback_param != None:
s_account.link(self.callback_success)
@ -365,7 +364,8 @@ class Api:
],
queue=self.queue,
)
s_account.link(s_register)
s_nonce.link(s_register)
s_account.link(s_nonce)
t = s_check.apply_async(queue=self.queue)
return t

View File

@ -54,6 +54,7 @@ class GasOracle():
"""
session = SessionBase.create_session()
a = AccountRole.get_address('GAS_GIFTER', session)
logg.debug('gasgifter {}'.format(a))
session.close()
return a

View File

@ -593,6 +593,8 @@ def reserve_nonce(self, chained_input, address=None):
if address == None:
address = chained_input
if not web3.Web3.isChecksumAddress(address):
raise ValueError('invalid address {}'.format(address))
root_id = self.request.root_id
nonce = NonceReservation.next(address, root_id)

View File

@ -5,6 +5,7 @@ import os
import logging
import uuid
import json
from xdg.BaseDirectory import xdg_config_home
import celery
from cic_eth.api import Api

View File

@ -25,7 +25,7 @@ logging.getLogger('urllib3').setLevel(logging.WARNING)
default_abi_dir = '/usr/share/local/cic/solidity/abi'
default_config_dir = os.path.join('/usr/local/etc/cic-eth')
default_config_dir = os.environ.get('CONFINI_DIR', '/usr/local/etc/cic')
argparser = argparse.ArgumentParser()
argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8545', type=str, help='Web3 provider url (http only)')

View File

@ -22,7 +22,7 @@ logg = logging.getLogger()
logging.getLogger('web3').setLevel(logging.WARNING)
logging.getLogger('urllib3').setLevel(logging.WARNING)
default_config_dir = os.path.join('/usr/local/etc/cic-eth')
default_config_dir = os.environ.get('CONFINI_DIR', '/usr/local/etc/cic')
argparser = argparse.ArgumentParser()

View File

@ -37,7 +37,7 @@ logging.getLogger('urllib3').setLevel(logging.WARNING)
default_abi_dir = '/usr/share/local/cic/solidity/abi'
default_config_dir = os.path.join('/usr/local/etc/cic-eth')
default_config_dir = os.environ.get('CONFINI_DIR', '/usr/local/etc/cic')
argparser = argparse.ArgumentParser()
argparser.add_argument('-p', '--provider', dest='p', type=str, help='Web3 provider url (http only)')

View File

@ -10,7 +10,7 @@ version = (
0,
10,
0,
'alpha.39',
'alpha.40',
)
version_object = semver.VersionInfo(

View File

@ -1,4 +1,4 @@
cic-base~=0.1.1a10
cic-base~=0.1.1a17
web3==5.12.2
celery==4.4.7
crypto-dev-signer~=0.4.13rc4

View File

@ -1,6 +1,6 @@
[metadata]
name = cic-notify
version= attr: cic_notify.version.__version_string__
version= 0.4.0a2
description = CIC notifications service
author = Louis Holbrook
author_email = dev@holbrook.no

View File

@ -21,10 +21,10 @@ from confini import Config
logging.basicConfig(level=logging.WARNING)
logg = logging.getLogger()
config_dir = os.path.join(xdg_config_home, 'cli-ussd')
default_config_dir = os.environ.get('CONFINI_DIR', '/usr/local/etc/cic')
argparser = argparse.ArgumentParser(description='CLI tool to interface a Sempo USSD session')
argparser.add_argument('-c', type=str, default=config_dir, help='config root to use')
argparser.add_argument('-c', type=str, default=default_config_dir, help='config root to use')
#argparser.add_argument('-d', type=str, default='local', help='deployment name to interface (config root subdirectory)')
argparser.add_argument('--host', type=str, default='localhost')
argparser.add_argument('--port', type=int, default=9000)

View File

@ -1,7 +1,7 @@
# standard imports
import semver
version = (0, 3, 0, 'alpha.2')
version = (0, 3, 0, 'alpha.4')
version_object = semver.VersionInfo(
major=version[0],

View File

@ -1,49 +1,21 @@
cic_base[full-graph]~=0.1.1a17
alembic==1.4.2
amqp==2.6.1
attrs==20.2.0
bcrypt==3.2.0
betterpath==0.2.2
billiard==3.6.3.0
celery==4.4.7
cffi==1.14.3
chainlib~=0.0.1a15
chainlib~=0.0.1a20
cic-eth==0.10.0a39
cic-notify~=0.4.0a2
cic-types==0.1.0a8
click==7.1.2
confini~=0.3.6rc3
cryptography==3.2.1
faker==4.17.1
iniconfig==1.1.1
kombu==4.6.11
Mako==1.1.3
MarkupSafe==1.1.1
mirakuru==2.3.0
more-itertools==8.5.0
packaging==20.4
phonenumbers==8.12.12
pluggy==0.13.1
port-for==0.4
psutil==5.7.3
psycopg2==2.8.6
py==1.9.0
pycparser==2.20
pyparsing==2.4.7
python-dateutil==2.8.1
python-editor==1.0.4
python-gnupg==0.4.6
python-i18n==0.3.9
pytz==2020.1
PyYAML==5.3.1
redis==3.5.3
requests==2.24.0
semver==2.13.0
six==1.15.0
SQLAlchemy==1.3.20
tinydb==4.2.0
toml==0.10.1
transitions==0.8.4
uWSGI==2.0.19.1
vcversioner==2.16.0.0
vine==1.3.0
zope.interface==5.1.2

View File

@ -112,11 +112,11 @@ def register_eth(i, u):
r = json.loads(m['data'])
address = r['result']
break
except TypeError as e:
except Exception as e:
if m == None:
logg.critical('empty response from redis callback (did the service crash?)')
logg.critical('empty response from redis callback (did the service crash?) {}'.format(e))
else:
logg.critical('unexpected response from redis callback: {}'.format(m))
logg.critical('unexpected response from redis callback: {} {}'.format(m, e))
sys.exit(1)
logg.debug('[{}] register eth {} {}'.format(i, u, address))

View File

@ -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.0a38 chainlib==0.0.1a19 cic-contracts==0.0.2a2
pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL cic-eth==0.10.0a39 chainlib==0.0.1a19 cic-contracts==0.0.2a2
pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL --force-reinstall erc20-transfer-authorization==0.3.0a10
>&2 echo "create account for gas gifter"

View File

@ -238,7 +238,7 @@ services:
- -c
- |
if [[ -f /tmp/cic/config/.env ]]; then source /tmp/cic/config/.env; fi
./start_tasker.sh -q cic-eth
./start_tasker.sh -q cic-eth -vv
# command: [/bin/sh, "./start_tasker.sh", -q, cic-eth, -vv ]
cic-eth-tracker: