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:
hbmpc.peer0.io_1 | 2020-08-19 18:23:55,576:[mpc.py:cb:162]:[ERROR]: Robust reconstruction for share {6087826343110230357947059204667799136441592364043611791189230863245351977037} (id: 49) failed with errors: None!
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 open d and e in BeaverMultiply (line 19):
|
class BeaverMultiply(AsyncMixin): |
|
from honeybadgermpc.mpc import Mpc, Share |
|
|
|
name = MixinConstants.MultiplyShare |
|
|
|
@staticmethod |
|
@TypeCheck() |
|
async def _prog(context: Mpc, x: Share, y: Share): |
|
a, b, ab = context.preproc.get_triples(context) |
|
|
|
d, e = await gather(*[(x - a).open(), (y - b).open()]) |
|
xy = d * e + d * b + e * a + ab |
|
return xy |
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 git@github.com: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 function flip_biased_coin line 76, where a lt operation is invoked with a FixedPoint instance)
honeybadgermpc/fixedpoint.py (many supporting functions are involved (trunc, trunc_pr, div2m, etc) -- from observations, the "root" has been the FixedPoint class methods __mul__() or lt()
honeybadgermpc/progs/mixins/share_arithmetic.py (in BeaverMultiply, _prog function, opening of d and e)
honeybadgermpc/reed_solomon.py (_optimistic_update, line 323)
honeybadgermpc/mpc.py (inner function cb, 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:
- go to the pane you wish to search
- enter in the copy mode with
ctrl + b [
- enter
/
- enter characters to search, e.g. (
mpc.py)
For more information about key combinations in tmux see https://tmuxcheatsheet.com/.
When running the robohash app with the biased coin flip, based on fixed point arithmetic, robust reconstruction fails. The error occurs in
mpc.pyas 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.pyappears to "consistently" occur after trying to opendandeinBeaverMultiply(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 git@github.com:initc3/HoneyBadgerMPC.git -- change if needed git fetch upstream git checkout troubleshoot/robohash/robust-reconstruction/biased-coin-flipGo into robohash directory:
cd apps/robohash make runAfter running
make runyou 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_coinline 76, where altoperation is invoked with aFixedPointinstance)honeybadgermpc/fixedpoint.py(many supporting functions are involved (trunc,trunc_pr,div2m, etc) -- from observations, the "root" has been theFixedPointclass methods__mul__()orlt()honeybadgermpc/progs/mixins/share_arithmetic.py(inBeaverMultiply,_progfunction, opening ofdande)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/.