Compare commits

..

86 Commits

Author SHA1 Message Date
nolash
d3240a5063 replace requirements base for cache, notify 2021-03-29 15:17:32 +02:00
nolash
309392511a Downgrade correct cic-eth increment version 2021-03-29 14:37:35 +02:00
nolash
7684cd6aa1 Update cic-eth deps 2021-03-29 14:36:27 +02:00
nolash
059191346e Rehabilitate migration scripts 2021-03-29 14:35:02 +02:00
nolash
1047a1a487 Node atomicity rehabilitated 2021-03-29 11:35:41 +02:00
nolash
bd9070ae44 Parse receipt value correctly 2021-03-29 09:55:57 +02:00
nolash
02d23112cd Bump faucet version 2021-03-29 02:21:07 +02:00
nolash
792715ca8c Upgrade facucet 2021-03-28 22:54:14 +02:00
nolash
e3846809a6 WIP add writer registration to seed script 2021-03-28 21:29:05 +02:00
nolash
1322ebc8b6 WIP rehabilitate admin api runnables 2021-03-28 18:32:37 +02:00
nolash
f35bbc84e4 Complete rehabilitation of RPC signing 2021-03-27 16:35:18 +01:00
nolash
47c9f16806 Add dedicated rpc signer connection 2021-03-27 15:49:22 +01:00
nolash
da9d27606e Sighhhhhhhh 2021-03-26 18:07:58 +01:00
nolash
e72fe5d61b Absolutely fucking sigh 2021-03-26 17:34:29 +01:00
nolash
4edf7d1e82 Sighsighsighsighsighsigh 2021-03-26 16:16:12 +01:00
nolash
80c76f2f2e sigh sigh sigh 2021-03-26 15:33:51 +01:00
nolash
5cc1526c7c Sigh 2021-03-26 15:27:46 +01:00
nolash
e2913dd37d Upgrade base 2021-03-26 15:13:01 +01:00
nolash
9542b0544b Bump faucet version 2021-03-26 15:02:02 +01:00
nolash
44c1ca9573 Upgrade faucet, base without faucet 2021-03-26 14:02:49 +01:00
nolash
11f86d6409 Correct tag for account registry 2021-03-26 13:38:46 +01:00
nolash
35ca98c65b Correct role name in create account
Signed-off-by: nolash <dev@holbrook.no>
2021-03-26 10:00:34 +01:00
nolash
3a17647107 Rehabilitate tracker daemon frontend 2021-03-26 08:39:33 +01:00
nolash
101a1eb050 WIP rehabilitate sync tx 2021-03-26 07:57:35 +01:00
nolash
e166f3d101 Add basic send test 2021-03-25 20:03:29 +01:00
nolash
7d5d7f67c6 Update cic-eth version in contract migration dockerfile 2021-03-25 19:24:46 +01:00
nolash
21f71043c9 WIP rehabilitate view cli 2021-03-25 19:23:41 +01:00
nolash
4ad2f18fb1 Rehabilitate lock cli 2021-03-25 16:46:46 +01:00
nolash
a903d12bf0 Rehabilitate admin api tests (except nonce manip) 2021-03-25 16:40:33 +01:00
nolash
72eb61b1c2 Seed script rehabilitated with chainlib 2021-03-25 10:34:53 +01:00
nolash
5bf30afb07 WIP Rehabilitate seed scrip 2021-03-25 09:34:57 +01:00
nolash
8675b1a215 Add chain spec to tag invocations 2021-03-24 19:51:01 +01:00
nolash
b93aa82bf7 Make account setter use celery 2021-03-24 17:57:18 +01:00
nolash
e64b1bf984 Rehabilitate cic-eth-create step 2021-03-24 15:52:52 +01:00
nolash
585ad07c6e Merge remote-tracking branch 'origin/master' into lash/migration-last-gasp 2021-03-24 13:12:56 +01:00
nolash
e138a0005a Rehabilitate reset script after chainlib refactors 2021-03-24 13:08:54 +01:00
nolash
97ecce96a8 Bump deps and version 2021-03-24 10:21:25 +01:00
nolash
b441abb004 Update reset to use new deploy scripts 2021-03-23 17:15:48 +01:00
nolash
353abaa151 Merge upstream contract migration 2021-03-23 17:15:27 +01:00
nolash
d892caa288 Add rpc disconnect 2021-03-23 00:13:57 +01:00
nolash
1bc08295ef WIP rehabilitate tracker daemon 2021-03-22 23:36:34 +01:00
nolash
0d67f6efba WIP rehabilitate cic tasker daemon 2021-03-22 22:57:36 +01:00
nolash
305a1f760b WIP Rehabilitate runnables 2021-03-22 22:10:52 +01:00
nolash
05f7b3c9c3 Rehabilitate bloom filter tx list test 2021-03-22 20:31:03 +01:00
nolash
431ee11f4f Rehabilitate address translate test 2021-03-22 20:10:20 +01:00
nolash
0ab8675d19 Rehabilitate transaction list api and test 2021-03-21 21:10:56 +01:00
nolash
267ce84caa Rehabilitate balance api 2021-03-21 19:39:38 +01:00
nolash
333d410b1c Bump version 2021-03-21 14:04:54 +01:00
nolash
e5223e6195 Rename token registration fixture 2021-03-21 14:04:14 +01:00
nolash
453dd47091 Rehabilitate api tests 2021-03-21 12:18:15 +01:00
nolash
65bb4cf66f Reinstate api callback test 2021-03-20 23:00:15 +01:00
nolash
06ddfb4fe8 Reinstate basic tx test 2021-03-20 22:58:48 +01:00
nolash
2eaaedb0f0 Rehabilitate db unit tests 2021-03-20 22:40:06 +01:00
nolash
964952e904 Rehabilitate queue tests 2021-03-20 21:10:19 +01:00
nolash
788aa9d7b9 WIP Rehabilitate queue tests 2021-03-20 16:44:07 +01:00
nolash
bf832afb87 Rehabilitate list tx and balances test 2021-03-20 14:35:35 +01:00
nolash
3f61a2007e Rehabilitate transfer, approve
Signed-off-by: nolash <dev@holbrook.no>
2021-03-20 13:58:45 +01:00
nolash
c245a29a6b Rehabilitate erc20 balance task 2021-03-19 19:51:30 +01:00
nolash
871cbdcaeb Account register test passes 2021-03-18 19:36:52 +01:00
nolash
2f07ea1395 WIP refactor send, checkgas, refillgas to use chainlib 2021-03-18 11:57:26 +01:00
nolash
9f2773e948 Change from rlp to simple-rlp 2021-03-17 17:22:17 +01:00
nolash
41731b5e96 WIP Add role fixture, rehabilitate account register task, test 2021-03-17 11:24:55 +01:00
nolash
318615751c WIP rehabilitate register account test and task 2021-03-16 17:16:06 +01:00
nolash
6a6b6b59d8 Assimilate agnostic rpc in base tests 2021-03-16 15:35:22 +01:00
nolash
be3a2e7b2d Port new fixtures, registry setup in tests 2021-03-15 19:46:37 +01:00
nolash
a6fd20124c WIP receive new registry 2021-03-13 21:31:37 +01:00
nolash
e20a099570 WIP Remove web3 from tests 2021-03-12 18:44:29 +01:00
nolash
958bd9af96 Move signer from middleware to dedicated connection 2021-03-12 09:36:57 +01:00
nolash
10835979bc Use chainlib directly for signing 2021-03-11 11:40:30 +01:00
nolash
94c8fd6cd6 Revert back to subsession handling of nonce 2021-03-09 07:43:31 +01:00
nolash
2fe205b1e8 Provide web3 constructor to tracker rpc client 2021-03-08 15:51:45 +01:00
nolash
b37c7f3cc2 Provide thread safe registry solution 2021-03-08 10:11:04 +01:00
nolash
abc9877726 Merge branch 'master' into lash/migration-last-gasp 2021-03-07 20:35:43 +01:00
nolash
6d6e2a29b4 Fix refill gas task typo, include missing eth error symbol 2021-03-07 20:10:49 +01:00
nolash
b9d7cc20f7 Merge remote-tracking branch 'origin/master' into lash/cli-rehabilitations 2021-03-07 19:54:32 +01:00
nolash
cf468fc4c7 Add custom eth error 2021-03-07 19:01:16 +01:00
nolash
69a13235ba Handle occasional incompatible phone number 2021-03-07 15:42:09 +01:00
nolash
84a20a6743 Merge remote-tracking branch 'origin/master' into lash/cli-rehabilitations 2021-03-07 14:52:11 +01:00
nolash
67330b2ad5 Make lock tasks critical db tasks 2021-03-07 13:33:26 +01:00
nolash
16ea3f3db8 Bump version 2021-03-07 12:53:09 +01:00
nolash
2b354a1029 Add role tag option to reserve nonce 2021-03-07 12:52:48 +01:00
nolash
5f0822598f Bump cic base 2021-03-07 10:37:27 +01:00
nolash
05479a6576 WIP remove lower layer deps in ussd, correct create account api task graph 2021-03-07 10:33:11 +01:00
nolash
1c0732d983 Upgrade notify 2021-03-07 07:45:13 +01:00
nolash
fd263e7648 Merge remote-tracking branch 'origin/master' into lash/browser-emulator-ussd 2021-03-07 07:24:42 +01:00
nolash
2e09b69e36 Add configurable host, port, ssl scheme to ussd browser emulator 2021-03-06 23:50:43 +01:00
3 changed files with 1 additions and 147 deletions

View File

@@ -1,50 +0,0 @@
# external imports
from chainlib.eth.nonce import RPCNonceOracle
from chainlib.eth.tx import (
receipt,
)
from eth_address_declarator import AddressDeclarator
from hexathon import add_0x
# local imports
from cic_eth.ext.address import translate_tx_addresses
def test_translate(
default_chain_spec,
address_declarator,
eth_signer,
eth_rpc,
contract_roles,
agent_roles,
cic_registry,
init_celery_tasks,
):
nonce_oracle = RPCNonceOracle(contract_roles['CONTRACT_DEPLOYER'], eth_rpc)
c = AddressDeclarator(signer=eth_signer, nonce_oracle=nonce_oracle, chain_id=default_chain_spec.chain_id())
description = 'alice'.encode('utf-8').ljust(32, b'\x00').hex()
(tx_hash_hex, o) = c.add_declaration(address_declarator, contract_roles['CONTRACT_DEPLOYER'], agent_roles['ALICE'], add_0x(description))
eth_rpc.do(o)
o = receipt(tx_hash_hex)
r = eth_rpc.do(o)
assert r['status'] == 1
description = 'bob'.encode('utf-8').ljust(32, b'\x00').hex()
(tx_hash_hex, o) = c.add_declaration(address_declarator, contract_roles['CONTRACT_DEPLOYER'], agent_roles['BOB'], add_0x(description))
eth_rpc.do(o)
o = receipt(tx_hash_hex)
r = eth_rpc.do(o)
assert r['status'] == 1
tx = {
'sender': agent_roles['ALICE'],
'sender_label': None,
'recipient': agent_roles['BOB'],
'recipient_label': None,
}
tx = translate_tx_addresses(tx, [contract_roles['CONTRACT_DEPLOYER']], default_chain_spec.asdict())
assert tx['sender_label'] == 'alice'
assert tx['recipient_label'] == 'bob'

View File

@@ -1,96 +0,0 @@
# standard imports
import logging
# external imports
import celery
import moolb
from chainlib.eth.tx import (
count,
receipt,
)
from chainlib.eth.erc20 import ERC20
from chainlib.eth.nonce import RPCNonceOracle
# local imports
from cic_eth.db.models.nonce import (
NonceReservation,
Nonce,
)
logg = logging.getLogger()
# TODO: This test fails when not run alone. Identify which fixture leaves a dirty state
def test_filter_process(
init_database,
default_chain_spec,
init_eth_tester,
eth_rpc,
eth_signer,
agent_roles,
init_custodial,
cic_registry,
foo_token,
celery_session_worker,
):
b = moolb.Bloom(1024, 3)
t = moolb.Bloom(1024, 3)
tx_hashes = []
# external tx
nonce_oracle = RPCNonceOracle(agent_roles['ALICE'], eth_rpc)
init_eth_tester.mine_blocks(13)
c = ERC20(signer=eth_signer, nonce_oracle=nonce_oracle)
(tx_hash_hex, o) = c.transfer(foo_token, agent_roles['ALICE'], agent_roles['BOB'], 1024)
eth_rpc.do(o)
o = receipt(tx_hash_hex)
r = eth_rpc.do(o)
a = r['block_number']
b.add(a.to_bytes(4, 'big'))
a = r['block_number'] + r['transaction_index']
t.add(a.to_bytes(4, 'big'))
tx_hashes.append(tx_hash_hex)
# external tx
init_eth_tester.mine_blocks(28)
c = ERC20(signer=eth_signer, nonce_oracle=nonce_oracle)
(tx_hash_hex, o) = c.transfer(foo_token, agent_roles['ALICE'], agent_roles['BOB'], 512)
eth_rpc.do(o)
o = receipt(tx_hash_hex)
r = eth_rpc.do(o)
a = r['block_number']
b.add(a.to_bytes(4, 'big'))
a = r['block_number'] + r['transaction_index']
t.add(a.to_bytes(4, 'big'))
tx_hashes.append(tx_hash_hex)
init_eth_tester.mine_blocks(10)
o = {
'alg': 'sha256',
'filter_rounds': 3,
'low': 0,
'high': 50,
'block_filter': b.to_bytes().hex(),
'blocktx_filter': t.to_bytes().hex(),
}
s = celery.signature(
'cic_eth.ext.tx.list_tx_by_bloom',
[
o,
agent_roles['BOB'],
default_chain_spec.asdict(),
],
queue=None
)
t = s.apply_async()
r = t.get()
assert len(r) == 2
for tx_hash in r.keys():
tx_hashes.remove(tx_hash)
assert len(tx_hashes) == 0

View File

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