cic-eth: Rehabilitate retrier with chainqueue

This commit is contained in:
Louis Holbrook
2021-04-05 15:07:09 +00:00
parent 1f2fc3e952
commit a7ab2e3f3f
26 changed files with 412 additions and 218 deletions

View File

@@ -57,8 +57,8 @@ WORKDIR /home/grassroots
USER grassroots
ARG pip_extra_index_url=https://pip.grassrootseconomics.net:8433
ARG cic_base_version=0.1.2a57
ARG cic_eth_version=0.11.0a3
ARG cic_base_version=0.1.2a60
ARG cic_eth_version=0.11.0a4
ARG sarafu_faucet_version=0.0.2a16
ARG cic_contracts_version=0.0.2a2
RUN pip install --user --extra-index-url $pip_extra_index_url cic-base[full_graph]==$cic_base_version \

View File

@@ -96,7 +96,6 @@ def genId(addr, typ):
def genDate():
logg.info(ts_then)
ts = random.randint(ts_then, ts_now)
return datetime.datetime.fromtimestamp(ts).timestamp()

View File

@@ -117,7 +117,7 @@ class Handler:
self.user_dir = user_dir
self.balances = balances
self.chain_spec = chain_spec
self.tx_factory = ERC20(signer, gas_oracle, nonce_oracle, chain_spec.network_id())
self.tx_factory = ERC20(chain_spec, signer, gas_oracle, nonce_oracle)
def name(self):

View File

@@ -36,7 +36,7 @@ argparser.add_argument('--redis-port', dest='redis_port', type=int, help='redis
argparser.add_argument('--redis-db', dest='redis_db', type=int, help='redis db to use for task submission and callback')
argparser.add_argument('--redis-host-callback', dest='redis_host_callback', default='localhost', type=str, help='redis host to use for callback')
argparser.add_argument('--redis-port-callback', dest='redis_port_callback', default=6379, type=int, help='redis port to use for callback')
argparser.add_argument('--batch-size', dest='batch_size', default=80, type=int, help='burst size of sending transactions to node')
argparser.add_argument('--batch-size', dest='batch_size', default=100, type=int, help='burst size of sending transactions to node') # batch size should be slightly below cumulative gas limit worth, eg 80000 gas txs with 8000000 limit is a bit less than 100 batch size
argparser.add_argument('--batch-delay', dest='batch_delay', default=2, type=int, help='seconds delay between batches')
argparser.add_argument('--timeout', default=60.0, type=float, help='Callback timeout')
argparser.add_argument('-q', type=str, default='cic-eth', help='Task queue')

View File

@@ -1,5 +1,5 @@
cic-base[full_graph]==0.1.2a57
cic-base[full_graph]==0.1.2a60
sarafu-faucet==0.0.2a16
cic-eth==0.11.0a3
cic-eth==0.11.0a4
cic-types==0.1.0a10
crypto-dev-signer==0.4.14a17

View File

@@ -256,6 +256,7 @@ class Verifier:
def verify_gas(self, address, balance_token=None):
o = balance(address)
r = self.conn.do(o)
logg.debug('wtf {}'.format(r))
actual_balance = int(strip_0x(r), 16)
if actual_balance == 0:
raise VerifierError((address, actual_balance), 'gas')