Closed sbellem closed 4 years ago
Current problem: not enough one_minus_ones
elements.
UPDATE: fixed in e3ee1ab469dfddabe0a85e8d7307429bd14e0154
Merging #424 into dev will decrease coverage by
0.25646%
. The diff coverage is8.69565%
.
@@ Coverage Diff @@
## dev #424 +/- ##
===================================================
- Coverage 77.27842% 77.02196% -0.25646%
===================================================
Files 50 50
Lines 5585 5601 +16
Branches 856 856
===================================================
- Hits 4316 4314 -2
- Misses 1095 1112 +17
- Partials 174 175 +1
Occasional problem: batch reconstruction fails.
running make clean
seems to prevent the problem ... perhaps there's some leftover files causing the problem ..
Occasional problem: VM Exception while processing transaction ... UPDATE: handled via tip given in https://github.com/initc3/HoneyBadgerMPC/pull/424#issuecomment-592964150
2020-02-28 21:14:05,042:[misc.py:16]:[CRITICAL]:
Exception:
<Task finished coro=<AsynchromixServer._mixing_initiate_loop() done, defined at apps/asynchromix/asynchromix.py:423> exception=ValueError({'message': 'VM Exception while processing transaction: revert', 'code': -
32000, 'data': {'stack': 'c: VM Exception while processing transaction: revert\n at Function.c.fromResults (/usr/local/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:2:162421)\n at e.exports (/
usr/local/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:53:1405579)', 'name': 'c'}})>
Traceback (most recent call last):
File "apps/asynchromix/asynchromix.py", line 438, in _mixing_initiate_loop
{"from": self.w3.eth.accounts[0]}
File "/opt/venv/lib/python3.7/site-packages/web3/contract.py", line 948, in transact
**self.kwargs
File "/opt/venv/lib/python3.7/site-packages/web3/contract.py", line 1526, in transact_with_contract_function
txn_hash = web3.eth.sendTransaction(transact_transaction)
File "/opt/venv/lib/python3.7/site-packages/web3/eth.py", line 381, in sendTransaction
get_buffered_gas_estimate(self.web3, transaction),
File "/opt/venv/lib/python3.7/site-packages/web3/_utils/transactions.py", line 126, in get_buffered_gas_estimate
gas_estimate = web3.eth.estimateGas(gas_estimate_transaction)
File "/opt/venv/lib/python3.7/site-packages/web3/eth.py", line 445, in estimateGas
params,
File "/opt/venv/lib/python3.7/site-packages/web3/manager.py", line 153, in request_blocking
raise ValueError(response["error"])
ValueError: {'message': 'VM Exception while processing transaction: revert', 'code': -32000, 'data': {'stack': 'c: VM Exception while processing transaction: revert\n at Function.c.fromResults (/usr/local/lib/
node_modules/ganache-cli/build/ganache-core.node.cli.js:2:162421)\n at e.exports (/usr/local/lib/node_modules/ganache-cli/build/ganache-core.node.cli.js:53:1405579)', 'name': 'c'}}
)
2020-02-28 21:14:07,055:[asynchromix.py:396]:[INFO]: [0] MPC initiated:7
We should just catch this ValueError. I think what's happening is this: We already know there is a race condition here - all N servers attempt to send "initiate_mix()", but only one of the transactions is expected to have an effect (all of them will be committed on the blockchain, but all but one will encounter "revert" and have no effect. What's changed is that now the web3 is rejecting the transaction client-side, during gas estimation, if it can tell that the transaction will always fail. So, that's fine. We should just catch this and go back around the waiting loop.
Is this complete yet? I don't see further todo's
Is this complete yet? I don't see further todo's
yes
UPDATE: ready for review and merging
Making PR to ease collaboration on fixing problems. "Open" problems will be posted in the comments below or at #425.