barryWhiteHat / miximus

A proof of concept trustless ethereum mixer
GNU General Public License v3.0
229 stars 34 forks source link

std::bad_alloc on withdraw.py #35

Closed johnmadero closed 5 years ago

johnmadero commented 5 years ago

Hi! I've tried with a couple of different sk/nullifiers but I always get this error while running withdraw.py:

[...]
Output:
93a3ebc1 23e224b8 11893eba df1c49d bb5a1132 88ef57fc a34af2ff d9d97368 
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted

It's not a matter of memory (I've 30GB of free RAM and I've also tried running it as root). Any suggestion?

Thanks!

barryWhiteHat commented 5 years ago

And you show me the rest of the trace?

johnmadero commented 5 years ago

Yep:

Enter the name of the deposit file you would like to use. Should be something like 0.json
38.json
[0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
['0x69153f2c80300fa3e5d4ec939812711772af191e79367cde5d29f0627218b2b6', '0xf3697d84ee2d7984f29705edf8688abc4dcba9f9da45fe0c3529196b7af703f0', '0x30fc3606dbca33fdc2fba65d0b24513ba21bc79026c0f44d73a2136f29ff8d4b', '0xc78009fdf07fc56a11f122370658a353aaa542ed63e44c4bc15ff4cd105ab33c', '0x536d98837f2dd165a55d5eeae91485954472d56f246df256bf3cae19352a123c', '0x821bd1e587d7c98208f973aa88d15c99d6517f8f8c910e82d4377010f70cd847', '0xd88ddfeed400a8755596b21942c1497e114c302e6118290f91e6772976041fa1', '0x87eb0ddba57e35f6d286673802a4af5975e22506c7cf4c64bb6be5ee11527f2c', '0x26846476fd5fc54a5d43385167c95144f2643f533cc85bb9d16b782f8d7db193', '0x506d86582d252405b840018792cad2bf1259f1ef5aa5f887e13cb2f0094f51e1', '0xffff0ad7e659772f9534c195c815efc4014ef1e1daed4404c06385d11192e92b', '0x6cf04127db05441cd833107a52be852868890e4317e6a02ab47683aa75964220', '0xb7d05f875f140027ef5118a2247bbb84ce8f2f0f1123623085daf7960c329f5f', '0xdf6af5f5bbdb6be9ef8aa618e4bf8073960867171e29676f8b284dea6a08a85e', '0xb58d900f5e182e3c50ef74969ea16c7726c549757cc23523c369587da7293784', '0xd49a7502ffcfb0340b1d7885688500ca308161a7f96b62df9d083b71fcc8f2bb', '0x8fe6b1689256c0d385f42f5bbe2027a22c1996e110ba97c171d3e5948de92beb', '0x8d0d63c39ebade8509e0ae3c9c3876fb5fa112be18f905ecacfecb92057603ab', '0x95eec8b2e541cad4e91de38385f2e046619f54496c2382cb6cacd5b98c26f5a4', '0xf893e908917775b62bff23294dbbe3a1cd8e6cc1c35b4801887b646a6f81f17f', '0xcddba7b592e3133393c16194fac7431abf2f5485ed711db282183c819e08ebaa', '0x8a8d7fe3af8caa085a7639a832001457dfb9128a8061142ad0335629ff23ff9c', '0xfeb3c337d7a51a6fbf00b9e34c52e1c9195c969bd4e7a0bfd51d5c5bed9c1167', '0xe71f0aa83cc32edfbefa9f4d3e0174ca85182eec9f3a09f6a6c0df6377a510d7', '0x31206fa80a50bb6abe29085058f16212212a60eec8f049fecb92d8c8e0a84bc0', '0x21352bfecbeddde993839f614c3dac0a3ee37543f9b412b16199dc158e23b544', '0x619e312724bb6d7c3153ed9de791d764a366b389af13c58bf8a8d90481a46765', '0x7cdd2986268250628d0c10e385c58c6191e6fbe05191bcc04f133f2cea72c1c4', '0x848930bd7ba8cac54661072113fb278869e07bb8587f91392933374d017bcbe1']
address bits  [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0]
2
0x93a3ebc123e224b811893eba0df1c49dbb5a113288ef57fca34af2ffd9d97368
tree depth: 29
Input:
e8c01532 5f96b749 c0716561 22ada74c 2589e369 27996b2c efa9133f 9379512d e0a97741 d95bfbcc bffbd697 ca95e3b9 cd3f5534 802d67e3 7ceb8702 e6c92c7f 
Output:
13463780 a7e16f96 166981d6 b2f0196a f15c449e 808a45a7 176e1002 d784dfbb 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
d94e48dc 570e6c02 d3263bfa 5bf895e2 2acf309 30e7b224 6da31649 495a6eae 
Input:
d94e48dc 570e6c02 d3263bfa 5bf895e2 2acf309 30e7b224 6da31649 495a6eae 69153f2c 80300fa3 e5d4ec93 98127117 72af191e 79367cde 5d29f062 7218b2b6 
Output:
c80bd611 b8777aaa f2fcdad4 7e23f08c bb77d617 9a984a07 c8c2952e 613c3610 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
3fc9ca24 8a9505f5 d70c9809 fcccbd33 a20bbf75 7f43b624 f26a848c b718207 
Input:
f3697d84 ee2d7984 f29705ed f8688abc 4dcba9f9 da45fe0c 3529196b 7af703f0 3fc9ca24 8a9505f5 d70c9809 fcccbd33 a20bbf75 7f43b624 f26a848c b718207 
Output:
587d7cf6 ebf416fc e8594a81 5fe208cc 9f38ee53 f14531ce 3e352e28 75cf4ac2 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
7a425dc3 ae11c7b a1cb4913 ac4c5a7c 40d3f0fd 13e8022f 63ee3789 a004d603 
Input:
30fc3606 dbca33fd c2fba65d b24513b a21bc790 26c0f44d 73a2136f 29ff8d4b 7a425dc3 ae11c7b a1cb4913 ac4c5a7c 40d3f0fd 13e8022f 63ee3789 a004d603 
Output:
25b76367 b60c57d5 6b0b2c1 9174e5c9 c72223ad e07bb939 68cf88ca 3580e663 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
6e17c81a 67c50445 36929848 5d42a5ae 6a67966c 5e9282e6 b548501d 71bde884 
Input:
6e17c81a 67c50445 36929848 5d42a5ae 6a67966c 5e9282e6 b548501d 71bde884 c78009fd f07fc56a 11f12237 658a353 aaa542ed 63e44c4b c15ff4cd 105ab33c 
Output:
fc1f963e f4815547 cc581c73 60993fdb 3b75e12a a626ae4c af3fa11f a4512145 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
964a9132 a56f783e 495676b1 9b94b49e 694e28ef 2ecdfea8 89c7865a 94af9806 
Input:
964a9132 a56f783e 495676b1 9b94b49e 694e28ef 2ecdfea8 89c7865a 94af9806 536d9883 7f2dd165 a55d5eea e9148595 4472d56f 246df256 bf3cae19 352a123c 
Output:
6db3ff95 279903fe 55385b2c 3af7edc2 9dec852a 186f380a 1b4f242e 24fa4f02 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
2187812b a05f66e7 1d9e9ba9 9edccee9 b5e7070f cfa516f0 70f23358 9c60c757 
Input:
821bd1e5 87d7c982 8f973aa 88d15c99 d6517f8f 8c910e82 d4377010 f70cd847 2187812b a05f66e7 1d9e9ba9 9edccee9 b5e7070f cfa516f0 70f23358 9c60c757 
Output:
85087556 dca49e6d e858c03e f813f73b a9f9f933 89586ba6 22897886 d920f814 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
7c73b51e eca5f0df d487234c 2e4adf49 2a8ca76b 600e6466 4d506669 47d2e480 
Input:
7c73b51e eca5f0df d487234c 2e4adf49 2a8ca76b 600e6466 4d506669 47d2e480 d88ddfee d400a875 5596b219 42c1497e 114c302e 6118290f 91e67729 76041fa1 
Output:
44a4b23d e509bffe 138d2d2c dd0c1845 6e2b4602 f222fcff 16415834 4936b78c 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
f46542de e11ee29f 12fd36e cc3cfec8 8a161846 3abf5955 a1a8b8ae a2def542 
Input:
f46542de e11ee29f 12fd36e cc3cfec8 8a161846 3abf5955 a1a8b8ae a2def542 87eb0ddb a57e35f6 d2866738 2a4af59 75e22506 c7cf4c64 bb6be5ee 11527f2c 
Output:
bb73ea37 80b241b8 4bfadf4a 56c9c944 16b4c792 d2c90a22 a7734bd1 ad91b970 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
f880af0d f09b1738 316435b4 91b08605 6c92d983 53ed7691 ee6a16ec fedf7dd4 
Input:
f880af0d f09b1738 316435b4 91b08605 6c92d983 53ed7691 ee6a16ec fedf7dd4 26846476 fd5fc54a 5d433851 67c95144 f2643f53 3cc85bb9 d16b782f 8d7db193 
Output:
ea6e52f fb6fef16 4e092f16 ca4c03f0 147812a7 c23c8f77 1753f2ca fbf59583 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
955fea90 3df3d912 a1d35270 551a872a 738f158e d84057ae 520842c1 c3104082 
Input:
955fea90 3df3d912 a1d35270 551a872a 738f158e d84057ae 520842c1 c3104082 506d8658 2d252405 b8400187 92cad2bf 1259f1ef 5aa5f887 e13cb2f0 94f51e1 
Output:
28d5551a c3d42ce1 e84423a9 10af3d8b d7ada2 850cad42 b42e3a1b 1328c152 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
16272efa b8a94301 f0cab0ff a5c6e5b5 54a5ae6b d3773a43 f42b7ce5 7b367cbc 
Input:
16272efa b8a94301 f0cab0ff a5c6e5b5 54a5ae6b d3773a43 f42b7ce5 7b367cbc ffff0ad7 e659772f 9534c195 c815efc4 14ef1e1 daed4404 c06385d1 1192e92b 
Output:
7cda2dba 4342df1 71862408 88ee77fe 6f6e8d6c 45c8b894 27769ca1 4c48288c 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
c075c576 5665fe41 f910cc9c b5fabf48 262f2807 6450354d d8ff4f0b 7fb14a4f 
Input:
c075c576 5665fe41 f910cc9c b5fabf48 262f2807 6450354d d8ff4f0b 7fb14a4f 6cf04127 db05441c d833107a 52be8528 68890e43 17e6a02a b47683aa 75964220 
Output:
1ec14a6c eebc5572 94450371 bf902133 f861a6ad c98367bf 7c081469 fc57e33f 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
9ba754dd 2f6b2ae4 f5fc56b5 5f8649db 6cda84d0 284084e9 33ffdfb6 b05e9d46 
Input:
9ba754dd 2f6b2ae4 f5fc56b5 5f8649db 6cda84d0 284084e9 33ffdfb6 b05e9d46 b7d05f87 5f140027 ef5118a2 247bbb84 ce8f2f0f 11236230 85daf796 c329f5f 
Output:
f20de742 1b6e294a f9b16f85 383b148b 59572578 2e80d769 994ae27b 95981cae 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
3872914 8dba9da8 cc3f6e75 5b043943 8e587eaa 2f9462cf 8693e038 912a5272 
Input:
3872914 8dba9da8 cc3f6e75 5b043943 8e587eaa 2f9462cf 8693e038 912a5272 df6af5f5 bbdb6be9 ef8aa618 e4bf8073 96086717 1e29676f 8b284dea 6a08a85e 
Output:
c9d796d 62d30d99 48814bfa c94e32c1 c2b3c64c 7fed61ab 389631dd cfae9aca 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
bc1fbb21 f98ab7a7 68f8792c 23be3c3f 62fce6a0 72086062 40371f91 f020ca2b 
Input:
bc1fbb21 f98ab7a7 68f8792c 23be3c3f 62fce6a0 72086062 40371f91 f020ca2b b58d900f 5e182e3c 50ef7496 9ea16c77 26c54975 7cc23523 c369587d a7293784 
Output:
dbb01046 6bd3a8e5 421c3ace b9a4eb9c a3f8afdf 35cedf6b feeb4f4c a5fc4f87 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
39adb3f7 6df90781 a66d38b0 badd5f82 fcb6e7ab 58a3bf80 ac7fb7b7 aafee04e 
Input:
39adb3f7 6df90781 a66d38b0 badd5f82 fcb6e7ab 58a3bf80 ac7fb7b7 aafee04e d49a7502 ffcfb034 b1d7885 688500ca 308161a7 f96b62df 9d083b71 fcc8f2bb 
Output:
bdfece3 cc96c610 c0373aaa adac56fa 4592e850 f915494c 858c2ce8 dba2d4c9 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
3bac6e23 2ed733ba eb812cc2 54791513 2b750e59 8c3a3958 eae0677b b87174cf 
Input:
3bac6e23 2ed733ba eb812cc2 54791513 2b750e59 8c3a3958 eae0677b b87174cf 8fe6b168 9256c0d3 85f42f5b be2027a2 2c1996e1 10ba97c1 71d3e594 8de92beb 
Output:
2c2e8065 9ac888b8 245aed8d 5b446ce7 981690a0 c46b69cf c86a4a87 f32b9497 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
d7ea61e7 9e71e168 f3954073 3f17cd5f 75e919a0 c52401c1 a6997db6 48d56a32 
Input:
d7ea61e7 9e71e168 f3954073 3f17cd5f 75e919a0 c52401c1 a6997db6 48d56a32 8d0d63c3 9ebade85 9e0ae3c 9c3876fb 5fa112be 18f905ec acfecb92 57603ab 
Output:
d1126b24 3c089dce dd1911e9 84ee5645 6c680dac eb428100 926295bc bcfee62d 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
c00394f7 718b76a3 c47a192d 4ea8711c 95c4b2d9 d2aac29f 66dafa88 ee7752ea 
Input:
c00394f7 718b76a3 c47a192d 4ea8711c 95c4b2d9 d2aac29f 66dafa88 ee7752ea 95eec8b2 e541cad4 e91de383 85f2e046 619f5449 6c2382cb 6cacd5b9 8c26f5a4 
Output:
98bf7ff1 a6f2c4c7 9a4ae457 4fe10bdb 469c1265 a51a9881 30f846f7 a6e552f4 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
f2b190b9 59c4ad7b 3caa9f10 971673c8 1d8a33b1 e8478069 e2840f15 a8d58e0c 
Input:
f2b190b9 59c4ad7b 3caa9f10 971673c8 1d8a33b1 e8478069 e2840f15 a8d58e0c f893e908 917775b6 2bff2329 4dbbe3a1 cd8e6cc1 c35b4801 887b646a 6f81f17f 
Output:
ca5470e7 fcc59eac 47cee1da d88c339e 1762e39f 37a00d58 26a2687d 249d1fbd 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
7bb6a0d9 9dda7031 bcec23f7 15fde67d 16bbe93b c6876a3f dea93a33 58f5aa12 
Input:
7bb6a0d9 9dda7031 bcec23f7 15fde67d 16bbe93b c6876a3f dea93a33 58f5aa12 cddba7b5 92e31333 93c16194 fac7431a bf2f5485 ed711db2 82183c81 9e08ebaa 
Output:
5e6fcb86 5336cc51 b84c6cec e6241a2e d71a0fa2 b2b7db8f eaa9ab86 98f03612 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
970c0911 83bb0b20 25e8c9ab 54c7db55 6131e5b7 836932c2 2c7372ac a4e2b4c 
Input:
970c0911 83bb0b20 25e8c9ab 54c7db55 6131e5b7 836932c2 2c7372ac a4e2b4c 8a8d7fe3 af8caa08 5a7639a8 32001457 dfb9128a 8061142a d0335629 ff23ff9c 
Output:
b78193a3 83374564 96b09a49 12d7d5ef ff04c98b e67c876 c86611b9 e6d83bba 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
d52083b7 b8937d04 ef08785f 53e38eff 8502b0b5 fa93f3b3 19db3a62 b3160ef7 
Input:
d52083b7 b8937d04 ef08785f 53e38eff 8502b0b5 fa93f3b3 19db3a62 b3160ef7 feb3c337 d7a51a6f bf00b9e3 4c52e1c9 195c969b d4e7a0bf d51d5c5b ed9c1167 
Output:
91d21d27 e9e0601c dce0a318 839a23cc 11c754a0 e66a611 bfa6a3df fc4d2f22 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
99a1c9d5 b08a1608 692ccc7d 4ec266f0 e89b3981 995effb1 e84ab00b 9be45a3a 
Input:
99a1c9d5 b08a1608 692ccc7d 4ec266f0 e89b3981 995effb1 e84ab00b 9be45a3a e71f0aa8 3cc32edf befa9f4d 3e0174ca 85182eec 9f3a09f6 a6c0df63 77a510d7 
Output:
e4464541 6a4aa9b8 21f85d5a fdc5b9e9 3596d088 82552e2f c228dc87 9143d5dd 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
a6ee0db5 cd4a8307 7ad42251 31e9b8eb a201fe59 ab0b72a2 3780c0dc dc7ae9fb 
Input:
a6ee0db5 cd4a8307 7ad42251 31e9b8eb a201fe59 ab0b72a2 3780c0dc dc7ae9fb 31206fa8 a50bb6a be290850 58f16212 212a60ee c8f049fe cb92d8c8 e0a84bc0 
Output:
11553529 ea09809 424238d0 2ba9fe4c 92bedeed 10e0c3a5 778fd0b4 7be33b3b 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
8bdce53c 60b53465 ec58066b ccb0ae36 82e37639 acc86b3d 78690251 3a672d82 
Input:
8bdce53c 60b53465 ec58066b ccb0ae36 82e37639 acc86b3d 78690251 3a672d82 21352bfe cbeddde9 93839f61 4c3dac0a 3ee37543 f9b412b1 6199dc15 8e23b544 
Output:
2b932400 73ab704b 2b45c893 b61c10dd 9b9f205e 3fbddf5 983a7c54 4737a62 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
ab7b87b5 a23df754 bd047c97 8d75571f 5437bcdb 49b18cf3 4b2666ba 6dc4331 
Input:
ab7b87b5 a23df754 bd047c97 8d75571f 5437bcdb 49b18cf3 4b2666ba 6dc4331 619e3127 24bb6d7c 3153ed9d e791d764 a366b389 af13c58b f8a8d904 81a46765 
Output:
4ff8f122 45894347 d8482ac3 fac5418f 7b539c1f 17c94591 236ab4d2 c1091b84 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
dfab6a3f 6d81d678 f68826ff 35272d32 b8935e16 1f480c0 d7175a8 25df76cf 
Input:
dfab6a3f 6d81d678 f68826ff 35272d32 b8935e16 1f480c0 d7175a8 25df76cf 7cdd2986 26825062 8d0c10e3 85c58c61 91e6fbe0 5191bcc0 4f133f2c ea72c1c4 
Output:
64e2159c af265232 6cdd927d 6b013d7a 5616087e c621443 ef3ad194 1cb68f88 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
ed29b43a 72ca7bf7 54d646c2 5e4400eb ec0e3195 e29913fb 8b95c133 599e8401 
Input:
ed29b43a 72ca7bf7 54d646c2 5e4400eb ec0e3195 e29913fb 8b95c133 599e8401 848930bd 7ba8cac5 46610721 13fb2788 69e07bb8 587f9139 2933374d 17bcbe1 
Output:
1bdc44e7 fc45e3b4 e1347715 dbc5f2b9 90ad20ef eb51cffa c823db70 74818753 
Input:
80000000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 200 
Output:
93a3ebc1 23e224b8 11893eba df1c49d bb5a1132 88ef57fc a34af2ff d9d97368 
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted

And this is the deposit tx on rinkeby: https://rinkeby.etherscan.io/tx/0xb1e139d3753512ac56efabcdd9edc1d6d7542ddc15d18add35a31d6699931717

barryWhiteHat commented 5 years ago

can you run the tests ?

barryWhiteHat commented 5 years ago

also fyi https://github.com/harryR/ethsnarks is a much clearner implementation of almost exactly the same thing. if you want to learn that is probably a better place to focus on.

johnmadero commented 5 years ago

can you run the tests ?

It seems I can. This is a contract deployed by the tests. Here is the trace:

ubuntu@ip-172-31-26-89:~/miximus/tests$ python3 test.py 
(enter) Call to r1cs_ppzksnark_generator    [             ] (1547396977.0381s x0.00 from start)
  (enter) Call to r1cs_constraint_system::swap_AB_if_beneficial [             ] (1547396977.9577s x0.00 from start)
    (enter) Estimate densities                  [             ] (1547396977.9578s x0.00 from start)
      * Non-zero A-count (estimate): 913724
      * Non-zero B-count (estimate): 1107172
    (leave) Estimate densities                  [0.1101s x1.00] (1547396978.0678s x0.00 from start)
    (enter) Perform the swap                    [             ] (1547396978.0679s x0.00 from start)
    (leave) Perform the swap                    [0.2943s x1.00] (1547396978.3621s x0.00 from start)
  (leave) Call to r1cs_constraint_system::swap_AB_if_beneficial [0.4044s x1.00] (1547396978.3622s x0.00 from start)
  (enter) Call to r1cs_to_qap_instance_map_with_evaluation  [             ] (1547396978.3622s x0.00 from start)
    (enter) Compute evaluations of A, B, C, H at t  [             ] (1547396978.4277s x0.00 from start)
    (leave) Compute evaluations of A, B, C, H at t  [6.9158s x1.00] (1547396985.3435s x0.00 from start)
  (leave) Call to r1cs_to_qap_instance_map_with_evaluation  [6.9814s x1.00] (1547396985.3436s x0.00 from start)
  * QAP number of variables: 1518565
  * QAP pre degree: 1659339
  * QAP degree: 2097152
  * QAP number of input variables: 5
  (enter) Compute query densities               [             ] (1547396985.3454s x0.00 from start)
  (leave) Compute query densities               [0.0280s x1.00] (1547396985.3734s x0.00 from start)
21 9452412 34552892
20 9452412 0
19 9452412 7580404
  Choosing window size 20 for 9452412 elements
21 913724 31673815
20 913724 0
19 913724 5706708
18 913724 4873049
17 913724 0
16 913724 926872
15 913724 462423
  Choosing window size 16 for 913724 elements
  * G1 window: 20
  * G2 window: 16
  (enter) Generating G1 multiexp table          [             ] (1547396985.8261s x0.00 from start)
    * scalar_size=254; window=20; in_window=1048576; outerc=13
  (leave) Generating G1 multiexp table          [12.6262s x1.00]    (1547396998.4523s x0.00 from start)
  (enter) Generating G2 multiexp table          [             ] (1547396998.4523s x0.00 from start)
    * scalar_size=254; window=16; in_window=65536; outerc=16
  (leave) Generating G2 multiexp table          [4.4294s x1.00] (1547397002.8817s x0.00 from start)
  (enter) Generate R1CS proving key             [             ] (1547397002.8818s x0.00 from start)
    (enter) Generate knowledge commitments      [             ] (1547397002.8818s x0.00 from start)
      (enter) Compute the A-query                   [             ] (1547397002.8818s x0.00 from start)
      Non-zero coordinate count: 1107172/1518567 (72.91%)
      (leave) Compute the A-query                   [37.7721s x1.00]    (1547397040.6539s x0.00 from start)
      (enter) Compute the B-query                   [             ] (1547397040.6540s x0.00 from start)
      Non-zero coordinate count: 913725/1518567 (60.17%)
      (leave) Compute the B-query                   [82.8956s x1.00]    (1547397123.5495s x0.00 from start)
      (enter) Compute the C-query                   [             ] (1547397123.5496s x0.00 from start)
      Non-zero coordinate count: 1354312/1518567 (89.18%)
      (leave) Compute the C-query                   [46.3322s x1.00]    (1547397169.8818s x0.00 from start)
      (enter) Compute the H-query                   [             ] (1547397169.8818s x0.00 from start)
      .................................................................................................................................................................................................................. DONE!
      (leave) Compute the H-query                   [35.7582s x1.00]    (1547397205.6400s x0.00 from start)
      (enter) Compute the K-query                   [             ] (1547397205.6400s x0.00 from start)
      ........................................................................................................................................................ DONE!
      (leave) Compute the K-query                   [25.9053s x1.00]    (1547397231.5453s x0.00 from start)
    (leave) Generate knowledge commitments      [228.6636s x1.00]   (1547397231.5453s x0.00 from start)
  (leave) Generate R1CS proving key             [228.6636s x1.00]   (1547397231.5453s x0.00 from start)
  (enter) Generate R1CS verification key        [             ] (1547397231.5454s x0.00 from start)
    (enter) Encode IC query for R1CS verification key   [             ] (1547397231.5512s x0.00 from start)
      . DONE!
    (leave) Encode IC query for R1CS verification key   [0.0004s x1.00] (1547397231.5516s x0.00 from start)
  (leave) Generate R1CS verification key        [0.0063s x1.00] (1547397231.5516s x0.00 from start)
(leave) Call to r1cs_ppzksnark_generator    [254.5136s x1.00]   (1547397231.5516s x0.00 from start)
* G1 elements in PK: 11208557
* Non-zero G1 elements in PK: 9452415
* G2 elements in PK: 1518567
* Non-zero G2 elements in PK: 913725
* PK size in bits: 3091465226
* G1 elements in VK: 7
* G2 elements in VK: 5
* VK size in bits: 4905
leaf:  0x891f23cea4ada4e7e5ef7f21d0f3a32a7822275c9b71cff64a66ecdeb9b1ad4b
null:  0xD176A7c25F10E88136eB3CC439963FcA54f2859c73C1224BEF241e6f20Ea1409 sk:  0x6FA4F911D5f6fc6D5830cE559E49582611dA7B54ec7E6C95B458af6d0892F913
> /home/ubuntu/miximus/tests/test.py(47)<module>()
-> for nullifier , sk in zip(nullifiers, sks):
(Pdb)
johnmadero commented 5 years ago

also fyi https://github.com/harryR/ethsnarks is a much clearner implementation of almost exactly the same thing. if you want to learn that is probably a better place to focus on.

Super. I'll check it out.

barryWhiteHat commented 5 years ago

I'm not sure these tests passed. It appears you have dropped to the debug interface. My guess is that the deposit failed and then you dropped to the shell.

johnmadero commented 5 years ago

I'm not sure these tests passed. It appears you have dropped to the debug interface. My guess is that the deposit failed and then you dropped to the shell.

It finally worked. Here is a withdraw tx. The tests/withdraw.py doesn't yet. But I'll move on to study https://github.com/harryR/ethsnarks or your scaling-with-snark repo. Best! Thanks again.

barryWhiteHat commented 5 years ago

https://github.com/HarryR/ethsnarks-snasma/ and https://github.com/HarryR/ethsnarks-miximus

are good places to look :)

Also if there is a spcefic problem or thing you changed could you let me know ;)