Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a pattern of multi-sign that cannot be signed with the mandatory key. #3727

Closed
lisknonanika opened this issue Aug 10, 2021 · 3 comments

Comments

@lisknonanika
Copy link

Expected behavior

Even if the number of signatures is met with the optional key first, it should be possible to sign with the mandatory key.

Actual behavior

If an account has at least one mandatory key and the number of optional keys is greater than the number of signatures, if the number of signatures is met with the optional keys first, the account cannot be signed with the mandatory keys.

Steps to reproduce

For a multi-signature account like the following:

"keys":{
    "numberOfSignatures":2,
    "mandatoryKeys":["aaa…"],
    "optionalKeys":["bbb…","ccc…"],
    "members":[…]
}

Sign with two optional keys.
(Do not sign with the mandatory key.)

Probably because this does not take into account the number of signatures for the mandatory key.
https://github.com/LiskHQ/lisk-desktop/blob/development/src/components/screens/signMultiSignTransaction/helpers.js#L36

Which version(s) does this affect? (Environment, OS, etc...)

Lisk Desktop 2.0.0

@sridharmeganathan
Copy link
Contributor

Thank you. We will validate this issue and fix it in the next release

@reyraa
Copy link
Contributor

reyraa commented Sep 7, 2021

I think there's a misconception in what the number of signatures is.

When an account is configured to have numberOfSignatures = 2, transactions should be signed by exactly 2 members, not more and not less.
If you have a mandatory member, s/he should sign the transaction. otherwise the transaction doesn't meet the signature criteria. In your example, you need one signature from your mandatory member, and exactly one signature from one of your optional members. not both, not none, exactly one.

@reyraa reyraa closed this as completed Sep 7, 2021
@lisknonanika
Copy link
Author

I have that understanding. I know it is not a priority, but I feel it should be checked to prevent this situation from happening.
e.g. "Cannot sign any more with optional key."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants