This repository was archived by the owner on Mar 11, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Governance: Create Proposals and Sign Off workflow #1767
Merged
SebastianBor
merged 16 commits into
solana-labs:master
from
SebastianBor:feat/governance-create-proposals
May 26, 2021
Merged
Governance: Create Proposals and Sign Off workflow #1767
SebastianBor
merged 16 commits into
solana-labs:master
from
SebastianBor:feat/governance-create-proposals
May 26, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Revert "chore: remove cached test state" This reverts commit d16a808.
joncinque
reviewed
May 24, 2021
There was a problem hiding this 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
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
joncinque
approved these changes
May 26, 2021
There was a problem hiding this 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented instructions:
CreateProposal
AddSignatory
RemoveSignatory
SignOffProposal
Design changes:
VoterRecord
renamed toTokenOwnerRecord
Since
Governing Token
deposit is required to create aProposal
I reusedVoterRecord
account and itstoken_deposit_amount
to validate eligibility to createProposals
. By doing so the account become more than just aVoterRecord
and I renamed it accordingly.vote_authority
renamed togovernance_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 thetoken_owner
I renamed it togovernance_delegate
to better express its meaning.SetVoteAuthority
instruction was changed accordingly toSetGovernanceDelegate
The change in 1) and 2) eliminated the need for
Proposal Admin Mint/Token
becauseTokenOwnerRecord
becomes Proposal owner and it'sGovernance Authority
(Token Owner
orDelegate
) automatically acquires admin rights to edit Proposal.I also removed
Proposal Signatory Mint/Token
and replaced it withSignatoryRecord
account to track signatories. The main reason for this was the spl token scheme made it impossible forProposal
owner to removeSignatory
because once minted the token would be owned by theSignatory
and not byProposal
owner.However I also think it made it simpler and simplified
Proposal
accountsI removed
GoverningTokenType
and replaced it with the correspondingGoverning 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.