Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Governance: Create Proposals and Sign Off workflow #1767

Merged
merged 16 commits into from
May 26, 2021
Merged

Governance: Create Proposals and Sign Off workflow #1767

merged 16 commits into from
May 26, 2021

Conversation

SebastianBor
Copy link
Contributor

@SebastianBor SebastianBor commented May 23, 2021

Implemented instructions:

  • CreateProposal
  • AddSignatory
  • RemoveSignatory
  • SignOffProposal

Design changes:

  1. VoterRecord renamed to TokenOwnerRecord
    Since Governing Token deposit is required to create a Proposal I reused VoterRecord account and its token_deposit_amount to validate eligibility to create Proposals. By doing so the account become more than just a VoterRecord and I renamed it accordingly.

  2. vote_authority renamed to governance_delegate
    For the same reasons as 1) the authority is not just for voting any longer. Also since granting the authority doesn't take voting or proposal creation rights from the token_owner I renamed it to governance_delegate to better express its meaning.
    SetVoteAuthority instruction was changed accordingly to SetGovernanceDelegate

  3. The change in 1) and 2) eliminated the need for Proposal Admin Mint/Token because TokenOwnerRecord becomes Proposal owner and it's Governance Authority (Token Owner or Delegate) automatically acquires admin rights to edit Proposal.

  4. I also removed Proposal Signatory Mint/Token and replaced it with SignatoryRecord account to track signatories. The main reason for this was the spl token scheme made it impossible for Proposal owner to remove Signatory because once minted the token would be owned by the Signatory and not by Proposal owner.
    However I also think it made it simpler and simplified Proposal accounts

  5. I removed GoverningTokenType and replaced it with the corresponding Governing Token Mint. I think it not only fits nicer this way into the api but also could allow us to easily support N mints per Realm (which was voiced during api reviews) in future versions.

@SebastianBor SebastianBor marked this pull request as ready for review May 24, 2021 16:53
@SebastianBor SebastianBor requested review from joncinque and mvines May 24, 2021 16:53
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good, just some nits and a few questions

Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nit, which you can take or leave

@SebastianBor SebastianBor merged commit 94350d0 into solana-labs:master May 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants