-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[robohash app] biased coin flip robust reconstruction fails to open "d" & "e" (BeaverMultiply) #460
Comments
When running the dockerized app for asynchromix ( hbmpc.peer1.io_1 | 2020-08-25 00:43:25,854:[reed_solomon.py:_optimistic_update:323]:[CRITICAL]: Optimistic decoding failed
hbmpc.peer1.io_1 | 2020-08-25 00:43:25,855:[reed_solomon.py:_optimistic_update:323]:[CRITICAL]: Optimistic decoding failed
hbmpc.peer1.io_1 | 2020-08-25 00:43:25,957:[reed_solomon.py:_optimistic_update:323]:[CRITICAL]: Optimistic decoding failed
hbmpc.peer1.io_1 | 2020-08-25 00:43:25,959:[reed_solomon.py:_optimistic_update:323]:[CRITICAL]: Optimistic decoding failed
hbmpc.peer1.io_1 | 2020-08-25 00:43:25,980:[batch_reconstruction.py:batch_reconstruct:184]:[ERROR]: [BatchReconstruct] P1 reconstruction failed!
hbmpc.peer1.io_1 | 2020-08-25 00:43:25,981:[batch_reconstruction.py:batch_reconstruct:184]:[ERROR]: [BatchReconstruct] P1 reconstruction failed!
hbmpc.peer1.io_1 | 2020-08-25 00:43:25,981:[mpc.py:cb:195]:[ERROR]: Batch reconstruction for share_array (id: 10) failed!
hbmpc.peer1.io_1 | 2020-08-25 00:43:25,982:[mpc.py:cb:195]:[ERROR]: Batch reconstruction for share_array (id: 11) failed!
hbmpc.peer1.io_1 | 2020-08-25 00:43:25,982:[misc.py:print_exception_callback:17]:[CRITICAL]:
hbmpc.peer1.io_1 | Exception:
hbmpc.peer1.io_1 | <Task finished coro=<AsyncMixin.__call__() done, defined at /usr/src/HoneyBadgerMPC/honeybadgermpc/progs/mixins/base.py:42> exception=HoneyBadgerMPCError('Batch reconstruction failed!')>
hbmpc.peer1.io_1 | Traceback (most recent call last):
hbmpc.peer1.io_1 | File "/usr/src/HoneyBadgerMPC/honeybadgermpc/progs/mixins/base.py", line 49, in __call__
hbmpc.peer1.io_1 | return await cls._prog(context, *args, **kwargs)
hbmpc.peer1.io_1 | File "/usr/src/HoneyBadgerMPC/honeybadgermpc/progs/mixins/share_arithmetic.py", line 55, in _prog
hbmpc.peer1.io_1 | f, g = await gather(*[(j - u).open(), (k - v).open()])
hbmpc.peer1.io_1 | honeybadgermpc.exceptions.HoneyBadgerMPCError: Batch reconstruction failed!
hbmpc.peer1.io_1 | )
hbmpc.peer1.io_1 | 2020-08-25 00:43:25,995:[misc.py:print_exception_callback:17]:[CRITICAL]:
hbmpc.peer1.io_1 | Exception:
hbmpc.peer1.io_1 | <Task finished coro=<MPCProgRunner._mpc_loop() done, defined at /usr/src/HoneyBadgerMPC/apps/asynchromix2/mpcprogrunner.py:117> exception=HoneyBadgerMPCError('Batch reconstruction failed!')>
hbmpc.peer1.io_1 | Traceback (most recent call last):
hbmpc.peer1.io_1 | File "/usr/src/HoneyBadgerMPC/apps/asynchromix2/mpcprogrunner.py", line 198, in _mpc_loop
hbmpc.peer1.io_1 | result = await ctx._run()
hbmpc.peer1.io_1 | File "/usr/src/HoneyBadgerMPC/honeybadgermpc/mpc.py", line 254, in _run
hbmpc.peer1.io_1 | return result.result()
hbmpc.peer1.io_1 | File "<string>", line 6, in prog
hbmpc.peer1.io_1 | File "/usr/src/HoneyBadgerMPC/apps/asynchromix/butterfly_network.py", line 51, in iterated_butterfly_network
hbmpc.peer1.io_1 | result = await batch_switch(ctx, xs_, ys_, k)
hbmpc.peer1.io_1 | File "/usr/src/HoneyBadgerMPC/apps/asynchromix/butterfly_network.py", line 15, in batch_switch
hbmpc.peer1.io_1 | ms = (await (sbits * (xs - ys)))._shares
hbmpc.peer1.io_1 | File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
hbmpc.peer1.io_1 | self._context.run(self._callback, *self._args)
hbmpc.peer1.io_1 | File "/usr/src/HoneyBadgerMPC/honeybadgermpc/utils/misc.py", line 18, in print_exception_callback
hbmpc.peer1.io_1 | raise ex
hbmpc.peer1.io_1 | File "/usr/src/HoneyBadgerMPC/honeybadgermpc/progs/mixins/base.py", line 49, in __call__
hbmpc.peer1.io_1 | return await cls._prog(context, *args, **kwargs)
hbmpc.peer1.io_1 | File "/usr/src/HoneyBadgerMPC/honeybadgermpc/progs/mixins/share_arithmetic.py", line 55, in _prog
hbmpc.peer1.io_1 | f, g = await gather(*[(j - u).open(), (k - v).open()])
hbmpc.peer1.io_1 | honeybadgermpc.exceptions.HoneyBadgerMPCError: Batch reconstruction failed!
hbmpc.peer1.io_1 | ) Reproducing the errorThe error may be reproduced by running |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running the robohash app with the biased coin flip, based on fixed point arithmetic, robust reconstruction fails. The error occurs in
mpc.py
as shown below:Although the error consistently occurs at the above location, the preceding code, invoking the opening may differ for different runs of the same code.
Root cause (?)
Upon further inspection, the reconstruction error, in
mpc.py
appears to "consistently" occur after trying to opend
ande
inBeaverMultiply
(line 19):HoneyBadgerMPC/honeybadgermpc/progs/mixins/share_arithmetic.py
Lines 9 to 21 in f2a9ac5
Reproducing the error
To reproduce the error, first checkout the branch
troubleshoot/robohash/robust-reconstruction/biased-coin-flip
, from the initc3 remote, e.g.:# upstream points to [email protected]:initc3/HoneyBadgerMPC.git -- change if needed git fetch upstream git checkout troubleshoot/robohash/robust-reconstruction/biased-coin-flip
Go into robohash directory:
cd apps/robohash make run
After running
make run
you should eventually see a terminal window with 7 panes, the 4 bottom ones are MPC servers where the logs from the failing robust reconstruction can be seen, as in the following screenshot:Further troubleshooting
It's not clear (to me 😄) how to proceed forward with finding the exact root cause of the problem. In case this can help here's a bit of information regarding what has been done to get the current information.
Multiple logging statements were added to try to pinpoint where the problem is occurring. The locations of interests are in:
apps/robohash/biased_coin.py
(from observations, the problem occurs after an instruction call in the functionflip_biased_coin
line 76, where alt
operation is invoked with aFixedPoint
instance)honeybadgermpc/fixedpoint.py
(many supporting functions are involved (trunc
,trunc_pr
,div2m
, etc) -- from observations, the "root" has been theFixedPoint
class methods__mul__()
orlt()
honeybadgermpc/progs/mixins/share_arithmetic.py
(inBeaverMultiply
,_prog
function, opening ofd
ande
)honeybadgermpc/reed_solomon.py
(_optimistic_update
, line 323)honeybadgermpc/mpc.py
(inner functioncb
, line 162)Example of logs for one MPC server (hbmpc.peer3.io):
Tmux tricks
When troubleshooting, it's useful to search the logs. To do so in
tmux
:ctrl + b [
/
mpc.py
)For more information about key combinations in tmux see https://tmuxcheatsheet.com/.
The text was updated successfully, but these errors were encountered: