ZenGo-X / fs-dkr

FS-DKR: One Round Distributed Key Rotation
GNU General Public License v3.0
32 stars 16 forks source link

Update versions of packages #28

Closed drewstone closed 1 year ago

drewstone commented 1 year ago

Overview

Updates all packages to the latest versions they have in the other repos so that it's consistent with multi-party-ecdsa master. It is needed to generalize some types to make this consistent there as well.

Would appreciate reviews if possible. All but one tests are passing at the moment. Currently, the failing test is:

running 6 tests
test proof_of_fairness::tests::test_bad_fairness_proof - should panic ... ok
test proof_of_fairness::tests::test_fairness_proof ... ok
test test::tests::test1 ... ok
test test::tests::test_add_party ... FAILED
test test::tests::test_remove_sign_rotate_sign ... ok
test test::tests::test_sign_rotate_sign ... ok

failures:

---- test::tests::test_add_party stdout ----
thread 'test::tests::test_add_party' panicked at 'Incorrect Alice's range proof in MtA: InvalidKey', /Users/drew/webb/multi-party-ecdsa/src/protocols/multi_party_ecdsa/gg_2020/state_machine/sign/rounds.rs:156:14

Namely, it fails to simulate_offline: https://github.com/webb-tools/fs-dkr/blob/drew/update-versions/src/test.rs#L162-L164

simulate_replace(&mut keys, &[2, 7], t as usize, n as usize).unwrap();
let offline_sign = simulate_offline_stage(keys, &[1, 2, 7]);
simulate_signing(offline_sign, b"ZenGo");
drewstone commented 1 year ago

All tests are passing now @elichai @MatanHamilis, I updated in the last commit to use the last indices [6,7] instead of what was there.

drewstone commented 1 year ago

After further review there is an issue and I shouldn't have needed to update the test. It should work as is if things are expected to have worked previously before the version update.

drewstone commented 1 year ago

Ok I fixed the tests, the exact parties being replaced need to be removed which wasn't happening previously.