Skip to content

Commit

Permalink
updating cli to use threshold instead of quorum for constitutional co…
Browse files Browse the repository at this point in the history
…mmittee

Resolves #688
  • Loading branch information
CarlosLopezDeLara committed Apr 3, 2024
1 parent ee1ce1f commit e625fb4
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ data GovernanceActionUpdateCommitteeCmdArgs era
, proposalHash :: !(L.SafeHash L.StandardCrypto L.AnchorData)
, oldCommitteeVkeySource :: ![VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey]
, newCommitteeVkeySource :: ![(VerificationKeyOrHashOrFileOrScriptHash CommitteeColdKey, EpochNo)]
, requiredQuorum :: !Rational
, requiredThreshold :: !Rational
, mPrevGovernanceActionId :: !(Maybe (TxId, Word32))
, outFile :: !(File () Out)
} deriving Show
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ pUpdateCommitteeCmd eon =
( (,)
<$> pAddCommitteeColdVerificationKeySource
<*> pEpochNo "Committee member expiry epoch")
<*> pRational "quorum" "Quorum of the committee that is necessary for a successful vote."
<*> pRational "threshold" "Threshold of YES votes that are necessary for approving a governance action."
<*> pPreviousGovernanceAction
<*> pOutputFile

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@ runGovernanceActionUpdateCommitteeCmd
, Cmd.proposalHash
, Cmd.oldCommitteeVkeySource
, Cmd.newCommitteeVkeySource
, Cmd.requiredQuorum
, Cmd.requiredThreshold
, Cmd.mPrevGovernanceActionId
, Cmd.outFile
} = do
let sbe = conwayEraOnwardsToShelleyBasedEra eon
govActIdentifier = L.maybeToStrictMaybe
$ shelleyBasedEraConstraints sbe
$ uncurry createPreviousGovernanceActionId <$> mPrevGovernanceActionId
quorumRational = toRational requiredQuorum
thresholdRational = toRational requiredThreshold

let proposalAnchor = L.Anchor
{ L.anchorUrl = unProposalUrl proposalUrl
Expand All @@ -233,7 +233,7 @@ runGovernanceActionUpdateCommitteeCmd
govActIdentifier
oldCommitteeKeyHashes
(fromList newCommitteeKeyHashes)
quorumRational
thresholdRational
proposal = createProposalProcedure sbe networkId deposit depositStakeCredential proposeNewCommittee proposalAnchor

firstExceptT GovernanceActionsCmdWriteFileError . newExceptT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ hprop_golden_conway_governance_action_view_update_committee_yaml =
, "--deposit-return-stake-verification-key-file", stakeAddressVKeyFile
, "--anchor-url", "proposal-dummy-url"
, "--anchor-data-hash", "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745"
, "--quorum", "0.61"
, "--threshold", "0.61"
, "--out-file", actionFile
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ hprop_golden_governanceUpdateCommittee =
, "--epoch", "202"
, "--add-cc-cold-verification-key-file", coldCCVkey2
, "--epoch", "252"
, "--quorum", "51/100"
, "--threshold", "51/100"
, "--out-file", outFile
]

Expand Down
2 changes: 1 addition & 1 deletion cardano-cli/test/cardano-cli-golden/files/golden/help.cli
Original file line number Diff line number Diff line change
Expand Up @@ -6220,7 +6220,7 @@ Usage: cardano-cli conway governance action update-committee
| --add-cc-cold-script-hash HASH
)
--epoch NATURAL]
--quorum RATIONAL
--threshold RATIONAL
[--prev-governance-action-tx-id TXID
--prev-governance-action-index WORD32]
--out-file FILE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Usage: cardano-cli conway governance action update-committee
| --add-cc-cold-script-hash HASH
)
--epoch NATURAL]
--quorum RATIONAL
--threshold RATIONAL
[--prev-governance-action-tx-id TXID
--prev-governance-action-index WORD32]
--out-file FILE
Expand Down Expand Up @@ -69,8 +69,8 @@ Available options:
Obtain it with "cardano-cli conway governance hash
script ...".
--epoch NATURAL Committee member expiry epoch
--quorum RATIONAL Quorum of the committee that is necessary for a
successful vote.
--threshold RATIONAL Threshold of YES votes that are necessary for
approving a governance action.
--prev-governance-action-tx-id TXID
Txid of the previous governance action.
--prev-governance-action-index WORD32
Expand Down

0 comments on commit e625fb4

Please sign in to comment.