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

Token Multisignature Support #49

Closed
CriesofCarrots opened this issue Jun 19, 2020 · 7 comments · Fixed by #79
Closed

Token Multisignature Support #49

CriesofCarrots opened this issue Jun 19, 2020 · 7 comments · Fixed by #79
Assignees

Comments

@CriesofCarrots
Copy link
Contributor

Downstream users would like to be able to ultilize multisignature on Token Accounts. A Multisig program would be an option down the road, when cross-program invocations are enabled.
In the meantime, the shortest path seems to be to add M-of-N multisig support in Token.

Instead of just one account owner, enable configuration of each Token account to have N authorities (1 <= N <= 11) and M required signers for transfers and updates to authorities and num-required-signers.

@jackcmay
Copy link
Contributor

jackcmay commented Jul 1, 2020

@mvines @CriesofCarrots
Rather than bloat the existing token State accounts with M Pubkeys, how about a new MultiSig account that contains a list of M signers? When doing an existing token operation, check to see if the "owner" account is a MultiSig account and if so, validate the instruction's signers against the list of Pubkeys in the MultiSig account.
Checking for MultiSig would entail checking the "owner" account:

  • is owned by the token program
  • is account data non-zero
  • does account data deserialize to a MultiSig

Supporting multi-signature will entail up to M optional signer accounts...

Thoughts?

@CriesofCarrots
Copy link
Contributor Author

I like it.

Supporting multi-signature will entail up to M optional signer accounts...

So use a byte in the Token account to mark it as supporting multisig?
We also need a byte somewhere to store how many of those stored authorities need to sign a given operation (M).

@mvines
Copy link
Member

mvines commented Jul 1, 2020

Currently we use the same account data size (State) for all the token program account types, so the additional M pubkeys in the Multisig account would still bloat up the other two account types. Do we want to move to variable-sized token program accounts instead of the state enum? Otherwise a new Multisig account type seems of limited value in terms of reducing bloat.

@jackcmay
Copy link
Contributor

jackcmay commented Jul 1, 2020 via email

@mvines
Copy link
Member

mvines commented Jul 1, 2020

We'd differentiate State from Multisig based on account data size? I think that's probably ok (and cheap). We might as well do the same for Mint as well then

@jackcmay
Copy link
Contributor

jackcmay commented Jul 1, 2020

Mint because its so much smaller than the Account enum variant?

@mvines
Copy link
Member

mvines commented Jul 1, 2020

Yeah, the Mint account then doesn't need to pay as much rent as an Account-sized account. But also for consistency with the new Multisig account data

andrewsource147 pushed a commit to MeteoraAg/solana-program-library that referenced this issue May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants