ChainSafe / threshlib

MIT License
0 stars 0 forks source link

Impossible to remove party during Resharing #1

Open nulltea opened 1 year ago

nulltea commented 1 year ago

Currently following scenarios are fully verified and tested:

If a party is removed from the new committee resharing will be stuck at round_1_old_step_1.go for old excluded party because oldOk[] values aren't updated.

Need to check whether the current resharing scheme supports party removal and if it is - find a root cause of the current behavior.

After that the following test can be uncommented: https://github.com/ChainSafe/threshlib/blob/master/ecdsa/resharing/local_party_test.go#L53

nulltea commented 2 months ago

fix: switch back to upstream version and modify ID generation as showed in https://github.com/ChainSafe/threshlib/blob/upstream-master/ecdsa/resharing/local_party_test.go#L47-L63

Scenarios

To add new party: oldParties - same newParties +1 (leave LocalPreParams unset)

To remove party that isn’t required for the threshold (e.g. oldN = 5, T=3, newN=4) oldParties -1 (remove party) newParties -1 (remove party)

To remove party that required for the threshold (e.g. oldN = 5, oldT=3, newN=2, newT=2): oldParties - oldT parties newParties - newT parties