Closed Ljiacheng closed 3 years ago
awesome, I was just about to push a fix for your previous issue, let me add this one as well!
I agree with your suggested fix.
added it to latest commit, please check: https://github.com/ZenGo-X/multi-party-ecdsa/commit/685889e61e11a68607678218f84e1d3cc884044d
If we run gg20_keygen_client in order(terminals: 1, 2, 3) and run gg20_sign_client, we can only run 1, 2 in order (the leader t+1 parties). If we try to run sign_client like 1,3 or 2,3 or 2,1 we will get this panic:
number: 1, uuid: "8729ac74-53d8-4cb5-be9e-9f90fcbf6a58" ["round0"] party 2 => party 1 ["round1"] party 2 => party 1 thread 'main' panicked at 'assertion failed:
(left == right)
left:1
, right:2
', examples/gg20_sign_client.rs:182:5 note: run withRUST_BACKTRACE=1
environment variable to display a backtracehere is my suggest: change the code: _if k != (party_numint - 1) as usize into _if k != signers_vec[party_numint as usize - 1] as usize at gg20_sign_client: line 174. Then we can run terminals in any order (like 2,1 or 2,3). In my test,every terminal generates their own keys.store and read it to sign. But i'm not sure if it is correct, you can make a check.