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

(multisig) potential inconsistency between the role and the account metadata #5229

Open
s8sato opened this issue Nov 11, 2024 · 1 comment
Open
Labels
Bug Something isn't working

Comments

@s8sato
Copy link
Contributor

s8sato commented Nov 11, 2024

Suppose that there are:

  • multisig account msa01 whose signatories are sig0 and sig1
  • accounts sig0 and sig1, each has the multisig role for msa01

They can be inconsistent e.g. multisig account can include/exclude some signatories by democracy without granting/revoking their roles. To prevent this, we should rely on either of them to know the relationship between a multisig account and its signatories:

  1. multisig account metadata
  2. multisig roles

One approach needs an complemental implementation to the other:

  1. e.g. participates_in key-value as a multisig account metadata, to know the multisig account from the signatory
  2. new query e.g. FindAccountsByRole, to know the signatories from the multisig account

Concerns of each approach:

  1. self-modification:
    • by self-modifying signatories, an account can pretend to be a multisig account and have any signatories
    • by self-modifying participates_in, an account can pretend to be a signatory of any multisig account
      • not so much harm unless the multisig account recognizes the account as a signatory
  2. the domain owner can break everything as usual, other than that I see no specific problems atm

So my current outlook is 2. -- remove signatories metadata and introduce FindAccountsByRole or something

@s8sato
Copy link
Contributor Author

s8sato commented Nov 18, 2024

Updated concerns of each approach:

  1. membership by account metadata
    • as long as taking either account's perspective, there would be two-way references, which would lead to inconsistency, unless controlled by some super authority over both accounts
  2. membership by roles
    • needs to retrieve each signatory's weight from somewhere non-writable by either account

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant