Merge branch 'lash/update-syncer-imports' into 'master'
Update syncer imports See merge request grassrootseconomics/cic-internal-integration!97
This commit is contained in:
commit
48570b2338
@ -10,7 +10,7 @@ version = (
|
|||||||
0,
|
0,
|
||||||
11,
|
11,
|
||||||
0,
|
0,
|
||||||
'beta.1',
|
'beta.3',
|
||||||
)
|
)
|
||||||
|
|
||||||
version_object = semver.VersionInfo(
|
version_object = semver.VersionInfo(
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
cic-base~=0.1.2a62
|
cic-base~=0.1.2a67
|
||||||
celery==4.4.7
|
celery==4.4.7
|
||||||
crypto-dev-signer~=0.4.14a17
|
crypto-dev-signer~=0.4.14a17
|
||||||
confini~=0.3.6rc3
|
confini~=0.3.6rc3
|
||||||
cic-eth-registry~=0.5.4a12
|
cic-eth-registry~=0.5.4a13
|
||||||
#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 @@ moolb~=0.1.1b2
|
|||||||
eth-address-index~=0.1.1a7
|
eth-address-index~=0.1.1a7
|
||||||
chainlib~=0.0.2a5
|
chainlib~=0.0.2a5
|
||||||
hexathon~=0.0.1a7
|
hexathon~=0.0.1a7
|
||||||
chainsyncer~=0.0.1a21
|
chainsyncer[sql]~=0.0.2a1
|
||||||
chainqueue~=0.0.1a7
|
chainqueue~=0.0.1a7
|
||||||
pysha3==1.0.2
|
pysha3==1.0.2
|
||||||
coincurve==15.0.0
|
coincurve==15.0.0
|
||||||
|
@ -11,7 +11,14 @@ REGION=KE
|
|||||||
|
|
||||||
[ussd]
|
[ussd]
|
||||||
MENU_FILE=/usr/src/data/ussd_menu.json
|
MENU_FILE=/usr/src/data/ussd_menu.json
|
||||||
|
user =
|
||||||
|
pass =
|
||||||
|
|
||||||
[statemachine]
|
[statemachine]
|
||||||
STATES=/usr/src/cic-ussd/states/
|
STATES=/usr/src/cic-ussd/states/
|
||||||
TRANSITIONS=/usr/src/cic-ussd/transitions/
|
TRANSITIONS=/usr/src/cic-ussd/transitions/
|
||||||
|
|
||||||
|
[client]
|
||||||
|
host =
|
||||||
|
port =
|
||||||
|
ssl =
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cic_base[full_graph]~=0.1.2a61
|
cic_base[full_graph]~=0.1.2a67
|
||||||
cic-eth~=0.11.0b1
|
cic-eth~=0.11.0b3
|
||||||
cic-notify~=0.4.0a3
|
cic-notify~=0.4.0a3
|
||||||
cic-types~=0.1.0a10
|
cic-types~=0.1.0a10
|
||||||
|
@ -57,7 +57,7 @@ WORKDIR /home/grassroots
|
|||||||
USER grassroots
|
USER grassroots
|
||||||
|
|
||||||
ARG pip_extra_index_url=https://pip.grassrootseconomics.net:8433
|
ARG pip_extra_index_url=https://pip.grassrootseconomics.net:8433
|
||||||
ARG cic_base_version=0.1.2a62
|
ARG cic_base_version=0.1.2a67
|
||||||
ARG cic_eth_version=0.11.0b1
|
ARG cic_eth_version=0.11.0b1
|
||||||
ARG sarafu_faucet_version=0.0.2a19
|
ARG sarafu_faucet_version=0.0.2a19
|
||||||
ARG cic_contracts_version=0.0.2a2
|
ARG cic_contracts_version=0.0.2a2
|
||||||
|
@ -72,12 +72,13 @@ if [[ -n "${ETH_PROVIDER}" ]]; then
|
|||||||
# Sarafu faucet contract
|
# Sarafu faucet contract
|
||||||
>&2 echo "deploy token faucet contract"
|
>&2 echo "deploy token faucet contract"
|
||||||
DEV_FAUCET_ADDRESS=`sarafu-faucet-deploy -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -w -v --account-index-address $DEV_ACCOUNT_INDEX_ADDRESS $DEV_RESERVE_ADDRESS`
|
DEV_FAUCET_ADDRESS=`sarafu-faucet-deploy -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -w -v --account-index-address $DEV_ACCOUNT_INDEX_ADDRESS $DEV_RESERVE_ADDRESS`
|
||||||
>&2 echo "set token faucet amount"
|
|
||||||
sarafu-faucet-set -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_FAUCET_ADDRESS $faucet_amount
|
|
||||||
eth-contract-registry-set -w -y $keystore_file -r $CIC_REGISTRY_ADDRESS -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -vv Faucet $DEV_FAUCET_ADDRESS
|
eth-contract-registry-set -w -y $keystore_file -r $CIC_REGISTRY_ADDRESS -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -vv Faucet $DEV_FAUCET_ADDRESS
|
||||||
>&2 echo "set faucet as token minter"
|
>&2 echo "set faucet as token minter"
|
||||||
giftable-token-minter -w -y $keystore_file -a $DEV_RESERVE_ADDRESS -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -vv $DEV_FAUCET_ADDRESS
|
giftable-token-minter -w -y $keystore_file -a $DEV_RESERVE_ADDRESS -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -vv $DEV_FAUCET_ADDRESS
|
||||||
|
|
||||||
|
>&2 echo "set token faucet amount"
|
||||||
|
sarafu-faucet-set -y $keystore_file -i $CIC_CHAIN_SPEC -p $ETH_PROVIDER -a $DEV_FAUCET_ADDRESS $faucet_amount
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "\$ETH_PROVIDER not set!"
|
echo "\$ETH_PROVIDER not set!"
|
||||||
|
@ -204,8 +204,8 @@ class Handler:
|
|||||||
# return b
|
# return b
|
||||||
|
|
||||||
|
|
||||||
def progress_callback(block_number, tx_index, s):
|
def progress_callback(block_number, tx_index):
|
||||||
sys.stdout.write(str(s).ljust(200) + "\n")
|
sys.stdout.write(str(block_number).ljust(200) + "\n")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ def main():
|
|||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
syncer_backend.set(block_offset, 0)
|
syncer_backend.set(block_offset, 0)
|
||||||
syncer = HeadSyncer(syncer_backend, progress_callback=progress_callback)
|
syncer = HeadSyncer(syncer_backend, block_callback=progress_callback)
|
||||||
handler = Handler(conn, chain_spec, user_dir, balances, sarafu_token_address, signer, gas_oracle, nonce_oracle)
|
handler = Handler(conn, chain_spec, user_dir, balances, sarafu_token_address, signer, gas_oracle, nonce_oracle)
|
||||||
syncer.add_filter(handler)
|
syncer.add_filter(handler)
|
||||||
syncer.loop(1, conn)
|
syncer.loop(1, conn)
|
||||||
|
24
apps/contract-migration/scripts/config/app.ini
Normal file
24
apps/contract-migration/scripts/config/app.ini
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
[app]
|
||||||
|
ALLOWED_IP=0.0.0.0/0
|
||||||
|
LOCALE_FALLBACK=en
|
||||||
|
LOCALE_PATH=/usr/src/cic-ussd/var/lib/locale/
|
||||||
|
MAX_BODY_LENGTH=1024
|
||||||
|
PASSWORD_PEPPER=QYbzKff6NhiQzY3ygl2BkiKOpER8RE/Upqs/5aZWW+I=
|
||||||
|
SERVICE_CODE=*483*46#
|
||||||
|
|
||||||
|
[phone_number]
|
||||||
|
REGION=KE
|
||||||
|
|
||||||
|
[ussd]
|
||||||
|
MENU_FILE=/usr/src/data/ussd_menu.json
|
||||||
|
user =
|
||||||
|
pass =
|
||||||
|
|
||||||
|
[statemachine]
|
||||||
|
STATES=/usr/src/cic-ussd/states/
|
||||||
|
TRANSITIONS=/usr/src/cic-ussd/transitions/
|
||||||
|
|
||||||
|
[client]
|
||||||
|
host =
|
||||||
|
port =
|
||||||
|
ssl =
|
@ -204,8 +204,8 @@ class Handler:
|
|||||||
# return b
|
# return b
|
||||||
|
|
||||||
|
|
||||||
def progress_callback(block_number, tx_index, s):
|
def progress_callback(block_number, tx_index):
|
||||||
sys.stdout.write(str(s).ljust(200) + "\n")
|
sys.stdout.write(str(block_number).ljust(200) + "\n")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -299,7 +299,7 @@ def main():
|
|||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
syncer_backend.set(block_offset, 0)
|
syncer_backend.set(block_offset, 0)
|
||||||
syncer = HeadSyncer(syncer_backend, progress_callback=progress_callback)
|
syncer = HeadSyncer(syncer_backend, block_callback=progress_callback)
|
||||||
handler = Handler(conn, chain_spec, user_dir, balances, sarafu_token_address, signer, gas_oracle, nonce_oracle)
|
handler = Handler(conn, chain_spec, user_dir, balances, sarafu_token_address, signer, gas_oracle, nonce_oracle)
|
||||||
syncer.add_filter(handler)
|
syncer.add_filter(handler)
|
||||||
syncer.loop(1, conn)
|
syncer.loop(1, conn)
|
||||||
|
6
apps/contract-migration/scripts/package.json
Normal file
6
apps/contract-migration/scripts/package.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"dependencies": {
|
||||||
|
"cic-client-meta": "^0.0.7-alpha.6",
|
||||||
|
"vcard-parser": "^1.0.0"
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
cic-base[full_graph]==0.1.2a61
|
cic-base[full_graph]==0.1.2a67
|
||||||
sarafu-faucet==0.0.2a17
|
sarafu-faucet==0.0.2a20
|
||||||
cic-eth==0.11.0b1
|
cic-eth==0.11.0b3
|
||||||
cic-types==0.1.0a10
|
cic-types==0.1.0a10
|
||||||
crypto-dev-signer==0.4.14a17
|
crypto-dev-signer==0.4.14b1
|
||||||
|
@ -343,7 +343,13 @@ class Verifier:
|
|||||||
address_recovered = json.loads(b.decode('utf-8'))
|
address_recovered = json.loads(b.decode('utf-8'))
|
||||||
address_recovered = address_recovered.replace('"', '')
|
address_recovered = address_recovered.replace('"', '')
|
||||||
|
|
||||||
if strip_0x(address) != strip_0x(address_recovered):
|
try:
|
||||||
|
address = strip_0x(address)
|
||||||
|
address_recovered = strip_0x(address_recovered)
|
||||||
|
except ValueError:
|
||||||
|
raise VerifierError(address_recovered, 'metadata (phone) address {} address recovered {}'.format(address, address_recovered))
|
||||||
|
|
||||||
|
if address != address_recovered:
|
||||||
raise VerifierError(address_recovered, 'metadata (phone)')
|
raise VerifierError(address_recovered, 'metadata (phone)')
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user