We are working on implementing distributed multisig for Avalanche. Existing multisig example works when all private keys presented in single KeyChain. In our fork we implemented two methods: signTxPartially and composeSignature to allow multisig holders to sign transaction separately and then compose it all together (at some relayer) and broadcast to the Avalanche Network.
The problem:
Avalanche Multisig requires to know exact number and addresses of holders who will participate in the signing of the transaction.
Example 1:
Transaction with 3 multisig users and 2 threshold. In case we submit tx with 3 signature we get error input has more signers than expected
Example 2:
Transaction with 3 multisig users (A, B, C) and 2 threshold. To be able to sign it distributed way each user needs to know exact another user who will participate in operation.
Possible solultion:
Each user will generate all possible combinations of signatures:
A, B
A, C
B, C
Proposal
Remove validation if the number of signatures is more than the threshold
case out.Threshold < uint32(numSigs):
return errTooManySigners
Remove validation to exactly match the number of requested sigs and number of sigs in credential:
case numSigs != len(cred.Sigs):
return errInputCredentialSignersMismatch
It allows to add all multisig addresses to Input and doesn't care about matching to exact numbers.
This issue has become stale because it has been open 60 days with no activity. Adding the lifecycle/frozen label will cause this issue to ignore lifecycle events.
Intro:
We are working on implementing distributed multisig for Avalanche. Existing multisig example works when all private keys presented in single KeyChain. In our fork we implemented two methods: signTxPartially and composeSignature to allow multisig holders to sign transaction separately and then compose it all together (at some relayer) and broadcast to the Avalanche Network.
The problem:
Avalanche Multisig requires to know exact number and addresses of holders who will participate in the signing of the transaction.
Example 1:
Transaction with 3 multisig users and 2 threshold. In case we submit tx with 3 signature we get error
input has more signers than expected
Example 2:
Transaction with 3 multisig users (A, B, C) and 2 threshold. To be able to sign it distributed way each user needs to know exact another user who will participate in operation.
Possible solultion:
Each user will generate all possible combinations of signatures:
Proposal
It allows to add all multisig addresses to Input and doesn't care about matching to exact numbers.
Discussing or question are welcome.