From af0677c93043a1419a25b493a7f56e74f475c6c1 Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara Date: Fri, 3 May 2024 07:41:57 -0600 Subject: [PATCH] - Implements action create-hardfork command. - Implements action create-hardfork command - Update golden files - Include a description on the "description field" of all governance action commands - Export a friendly function that returns a ByteString (so not in IO) - Export buildShelleyAddress --- .../EraBased/Commands/Governance/Actions.hs | 18 +++++++ .../EraBased/Options/Governance/Actions.hs | 49 ++++++++++++++++- .../CLI/EraBased/Run/Governance/Actions.hs | 53 ++++++++++++++++--- .../Test/Golden/Governance/Action.hs | 21 ++++++++ ...arameters-update-partial-costmodels.action | 2 +- ...y-create-protocol-parameters-update.action | 2 +- ...nstitution-for-stake-address.action.golden | 2 +- .../hardfork/conway-create-hardfork.action | 5 ++ .../committee/update-committee-answer.json | 2 +- .../cardano-cli-golden/files/golden/help.cli | 22 ++++++++ .../golden/help/conway_governance_action.cli | 2 + ...nway_governance_action_create-hardfork.cli | 52 ++++++++++++++++++ 12 files changed, 218 insertions(+), 12 deletions(-) create mode 100644 cardano-cli/test/cardano-cli-golden/files/golden/governance/action/hardfork/conway-create-hardfork.action create mode 100644 cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-hardfork.cli diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Actions.hs b/cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Actions.hs index 64a6cd6693..65b151ab6e 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Actions.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Commands/Governance/Actions.hs @@ -17,6 +17,7 @@ module Cardano.CLI.EraBased.Commands.Governance.Actions , GovernanceActionTreasuryWithdrawalCmdArgs(..) , UpdateProtocolParametersConwayOnwards(..) , UpdateProtocolParametersPreConway(..) + , GovernanceActionHardforkInitCmdArgs(..) , CostModelsFile(..) , renderGovernanceActionCmds ) where @@ -37,6 +38,7 @@ data GovernanceActionCmds era | GovernanceActionCreateNoConfidenceCmd !(GovernanceActionCreateNoConfidenceCmdArgs era) | GovernanceActionProtocolParametersUpdateCmd !(GovernanceActionProtocolParametersUpdateCmdArgs era) | GovernanceActionTreasuryWithdrawalCmd !(GovernanceActionTreasuryWithdrawalCmdArgs era) + | GovernanceActionHardforkInitCmd !(GovernanceActionHardforkInitCmdArgs era) | GovernanceActionInfoCmd !(GovernanceActionInfoCmdArgs era) | GovernanceActionViewCmd !(GovernanceActionViewCmdArgs era) deriving Show @@ -126,6 +128,19 @@ data GovernanceActionTreasuryWithdrawalCmdArgs era , outFile :: !(File () Out) } deriving Show +data GovernanceActionHardforkInitCmdArgs era + = GovernanceActionHardforkInitCmdArgs + { eon :: !(ConwayEraOnwards era) + , networkId :: !L.Network + , deposit :: !L.Coin + , returnStakeAddress :: !StakeIdentifier + , mPrevGovernanceActionId :: !(Maybe (TxId, Word32)) + , proposalUrl :: !ProposalUrl + , proposalHash :: !(L.SafeHash L.StandardCrypto L.AnchorData) + , protVer :: !L.ProtVer + , outFile :: !(File () Out) + } deriving Show + data GovernanceActionViewCmdArgs era = GovernanceActionViewCmdArgs { eon :: !(ConwayEraOnwards era) @@ -181,6 +196,9 @@ renderGovernanceActionCmds = ("governance action " <>) . \case GovernanceActionCreateNoConfidenceCmd {} -> "create-no-confidence" + GovernanceActionHardforkInitCmd {} -> + "create-hardfork" + GovernanceActionInfoCmd {} -> "create-info" diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs b/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs index 5858abc9b6..9ddc676a46 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Actions.hs @@ -12,8 +12,8 @@ import Cardano.Api.Shelley import qualified Cardano.CLI.EraBased.Commands.Governance.Actions as Cmd import Cardano.CLI.EraBased.Options.Common -import Cardano.CLI.Types.Common import Cardano.CLI.Parser +import Cardano.CLI.Types.Common import Data.Foldable import GHC.Natural (Natural) @@ -36,6 +36,7 @@ pGovernanceActionCmds era = , pGovernanceActionNoConfidenceCmd era , pGovernanceActionProtocolParametersUpdateCmd era , pGovernanceActionTreasuryWithdrawalCmd era + , pGovernanceActionHardforkInitCmd era , pGovernanceActionViewCmd era ] @@ -385,4 +386,48 @@ pNetwork = asum $ mconcat ] ] - +pNewProtVer :: Parser (Natural, Natural) +pNewProtVer = (,) <$> pProtMajor <*> pProtMinor + where + pProtMajor :: Parser Natural + pProtMajor = + Opt.option Opt.auto $ mconcat + [ Opt.long "protocol-major-version" + , Opt.metavar "MAJOR" + , Opt.help $ mconcat + ["Specify the major protocol version to fork into. It must be the next natural number " + , "after the current version and must be supported by the node." + ] + ] + + pProtMinor :: Parser Natural + pProtMinor = + Opt.option Opt.auto $ mconcat + [ Opt.long "protocol-minor-version" + , Opt.metavar "MINOR" + , Opt.help "Minor protocol version. Must be zero when the major protocol version is increased." + ] + +pPV :: Parser L.ProtVer +pPV = mkProtocolVersionOrErr <$> pNewProtVer + +pGovernanceActionHardforkInitCmd + :: CardanoEra era + -> Maybe (Parser (Cmd.GovernanceActionCmds era)) +pGovernanceActionHardforkInitCmd era = do + eon <- forEraMaybeEon era + pure + $ subParser "create-hardfork" + $ Opt.info + ( fmap Cmd.GovernanceActionHardforkInitCmd $ + Cmd.GovernanceActionHardforkInitCmdArgs eon + <$> pNetwork + <*> pGovActionDeposit + <*> pStakeIdentifier (Just "deposit-return") + <*> pPreviousGovernanceAction + <*> pAnchorUrl + <*> pAnchorDataHash + <*> pPV + <*> pFileOutDirection "out-file" "Output filepath of the hardfork proposal." + ) + $ Opt.progDesc "Create a hardfork initiation proposal." diff --git a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs index a991589f16..01f73c80a5 100644 --- a/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs +++ b/cardano-cli/src/Cardano/CLI/EraBased/Run/Governance/Actions.hs @@ -46,6 +46,9 @@ runGovernanceActionCmds = \case GovernanceActionCreateNoConfidenceCmd args -> runGovernanceActionCreateNoConfidenceCmd args + GovernanceActionHardforkInitCmd args -> + runGovernanceActionHardforkInitCmd args + GovernanceActionInfoCmd args -> runGovernanceActionInfoCmd args @@ -100,7 +103,7 @@ runGovernanceActionInfoCmd firstExceptT GovernanceActionsCmdWriteFileError . newExceptT $ conwayEraOnwardsConstraints eon - $ writeFileTextEnvelope outFile Nothing proposalProcedure + $ writeFileTextEnvelope outFile (Just "Info proposal") proposalProcedure -- TODO: Conway era - update with new ledger types from cardano-ledger-conway-1.7.0.0 runGovernanceActionCreateNoConfidenceCmd :: () @@ -139,7 +142,7 @@ runGovernanceActionCreateNoConfidenceCmd firstExceptT GovernanceActionsCmdWriteFileError . newExceptT $ conwayEraOnwardsConstraints eon - $ writeFileTextEnvelope outFile Nothing proposalProcedure + $ writeFileTextEnvelope outFile (Just "Motion of no confidence proposal") proposalProcedure runGovernanceActionCreateConstitutionCmd :: () => GovernanceActionCreateConstitutionCmdArgs era @@ -184,7 +187,7 @@ runGovernanceActionCreateConstitutionCmd firstExceptT GovernanceActionsCmdWriteFileError . newExceptT $ conwayEraOnwardsConstraints eon - $ writeFileTextEnvelope outFile Nothing proposalProcedure + $ writeFileTextEnvelope outFile (Just "Update to the Constitution or policy proposal") proposalProcedure -- TODO: Conway era - After ledger bump update this function -- with the new ledger types @@ -238,7 +241,7 @@ runGovernanceActionUpdateCommitteeCmd firstExceptT GovernanceActionsCmdWriteFileError . newExceptT $ conwayEraOnwardsConstraints eon - $ writeFileTextEnvelope outFile Nothing proposal + $ writeFileTextEnvelope outFile (Just "New constitutional committee and/or threshold and/or terms proposal") proposal runGovernanceActionCreateProtocolParametersUpdateCmd :: () => Cmd.GovernanceActionProtocolParametersUpdateCmdArgs era @@ -300,7 +303,7 @@ runGovernanceActionCreateProtocolParametersUpdateCmd eraBasedPParams' = do firstExceptT GovernanceActionsCmdWriteFileError . newExceptT $ conwayEraOnwardsConstraints conwayOnwards - $ writeFileTextEnvelope oFp Nothing proposalProcedure + $ writeFileTextEnvelope oFp (Just "Update protocol parameters proposal") proposalProcedure ) sbe where @@ -375,4 +378,42 @@ runGovernanceActionTreasuryWithdrawalCmd firstExceptT GovernanceActionsCmdWriteFileError . newExceptT $ conwayEraOnwardsConstraints eon - $ writeFileTextEnvelope outFile Nothing proposal + $ writeFileTextEnvelope outFile (Just "Treasury withdrawal proposal") proposal + +runGovernanceActionHardforkInitCmd :: () + => GovernanceActionHardforkInitCmdArgs era + -> ExceptT GovernanceActionsError IO () +runGovernanceActionHardforkInitCmd + Cmd.GovernanceActionHardforkInitCmdArgs + { Cmd.eon + , Cmd.networkId + , Cmd.deposit + , Cmd.returnStakeAddress + , Cmd.mPrevGovernanceActionId + , Cmd.proposalUrl + , Cmd.proposalHash = anchorDataHash + , Cmd.protVer + , Cmd.outFile + } = do + depositStakeCredential + <- firstExceptT GovernanceActionsReadStakeCredErrror + $ getStakeCredentialFromIdentifier returnStakeAddress + + let proposalAnchor = L.Anchor + { L.anchorUrl = unProposalUrl proposalUrl + , L.anchorDataHash + } + + let sbe = conwayEraOnwardsToShelleyBasedEra eon + govActIdentifier = L.maybeToStrictMaybe + $ shelleyBasedEraConstraints sbe + $ uncurry createPreviousGovernanceActionId <$> mPrevGovernanceActionId + initHardfork = InitiateHardfork + govActIdentifier + protVer + + proposalProcedure = createProposalProcedure sbe networkId deposit depositStakeCredential initHardfork proposalAnchor + + firstExceptT GovernanceActionsCmdWriteFileError . newExceptT + $ conwayEraOnwardsConstraints eon + $ writeFileTextEnvelope outFile (Just "Hardfork initiation proposal") proposalProcedure \ No newline at end of file diff --git a/cardano-cli/test/cardano-cli-golden/Test/Golden/Governance/Action.hs b/cardano-cli/test/cardano-cli-golden/Test/Golden/Governance/Action.hs index a3b2fce626..3eefb38bf0 100644 --- a/cardano-cli/test/cardano-cli-golden/Test/Golden/Governance/Action.hs +++ b/cardano-cli/test/cardano-cli-golden/Test/Golden/Governance/Action.hs @@ -222,3 +222,24 @@ hprop_golden_conway_governance_action_create_protocol_parameters_update_partial_ goldenActionFile <- H.note "test/cardano-cli-golden/files/golden/governance/action/conway-create-protocol-parameters-update-partial-costmodels.action" H.diffFileVsGoldenFile actionFile goldenActionFile +hprop_golden_conway_governance_action_create_hardfork :: Property +hprop_golden_conway_governance_action_create_hardfork = + propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do + stakeAddressVKeyFile <- H.note "test/cardano-cli-golden/files/input/governance/stake-address.vkey" + + actionFile <- noteTempFile tempDir "action" + + void $ execCardanoCLI + ["conway", "governance", "action", "create-hardfork" + , "--anchor-url", "example.com" + , "--anchor-data-hash", "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745" + , "--mainnet" + , "--deposit-return-stake-verification-key-file", stakeAddressVKeyFile + , "--governance-action-deposit", "12345" + , "--protocol-major-version", "10" + , "--protocol-minor-version", "0" + , "--out-file", actionFile + ] + + goldenActionFile <- H.note "test/cardano-cli-golden/files/golden/governance/action/hardfork/conway-create-hardfork.action" + H.diffFileVsGoldenFile actionFile goldenActionFile \ No newline at end of file diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/conway-create-protocol-parameters-update-partial-costmodels.action b/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/conway-create-protocol-parameters-update-partial-costmodels.action index 7f98fafd03..82228194a6 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/conway-create-protocol-parameters-update-partial-costmodels.action +++ b/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/conway-create-protocol-parameters-update-partial-costmodels.action @@ -1,5 +1,5 @@ { "type": "Governance proposal", - "description": "", + "description": "Update protocol parameters proposal", "cborHex": "84193039581de18f4a3466a404c11eb410313015b88e447d81b60089e25f611600e6058400f6a112a1019f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a0223accc0a1a009063b91903fd0a1a02515e841980b30afff6826b6578616d706c652e636f6d5820c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745" } diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/conway-create-protocol-parameters-update.action b/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/conway-create-protocol-parameters-update.action index 3ddffc646a..ab4baae9b1 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/conway-create-protocol-parameters-update.action +++ b/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/conway-create-protocol-parameters-update.action @@ -1,5 +1,5 @@ { "type": "Governance proposal", - "description": "", + "description": "Update protocol parameters proposal", "cborHex": "84193039581de18f4a3466a404c11eb410313015b88e447d81b60089e25f611600e6058400f6a3031904d212a3009f1a000302590001011a00060bc719026d00011a000249f01903e800011a000249f018201a0025cea81971f70419744d186419744d186419744d186419744d186419744d186419744d18641864186419744d18641a000249f018201a000249f018201a000249f018201a000249f01903e800011a000249f018201a000249f01903e800081a000242201a00067e2318760001011a000249f01903e800081a000249f01a0001b79818f7011a000249f0192710011a0002155e19052e011903e81a000249f01903e8011a000249f018201a000249f018201a000249f0182001011a000249f0011a000249f0041a000194af18f8011a000194af18f8011a0002377c190556011a0002bdea1901f1011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000242201a00067e23187600010119f04c192bd200011a000249f018201a000242201a00067e2318760001011a000242201a00067e2318760001011a0025cea81971f707001a000141bb041a000249f019138800011a000249f018201a000302590001011a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a000249f018201a00330da70101ff019f1a0003236119032c01011903e819023b00011903e8195e7104011903e818201a0001ca761928eb041959d818641959d818641959d818641959d818641959d818641959d81864186418641959d81864194c5118201a0002acfa182019b551041a000363151901ff00011a00015c3518201a000797751936f404021a0002ff941a0006ea7818dc0001011903e8196ff604021a0003bd081a00034ec5183e011a00102e0f19312a011a00032e801901a5011a0002da781903e819cf06011a00013a34182019a8f118201903e818201a00013aac0119e143041903e80a1a00030219189c011a00030219189c011a0003207c1901d9011a000330001901ff0119ccf3182019fd40182019ffd5182019581e18201940b318201a00012adf18201a0002ff941a0006ea7818dc0001011a00010f92192da7000119eabb18201a0002ff941a0006ea7818dc0001011a0002ff941a0006ea7818dc0001011a0011b22c1a0005fdde00021a000c504e197712041a001d6af61a0001425b041a00040c660004001a00014fab18201a0003236119032c010119a0de18201a00033d7618201979f41820197fb8182019a95d1820197df718201995aa18201a0223accc0a1a009063b91903fd0a1a02515e841980b30aff029f0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101ff181e1a075bc371f6826b6578616d706c652e636f6d5820c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745" } diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/create-constitution-for-stake-address.action.golden b/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/create-constitution-for-stake-address.action.golden index 0a9e6843a8..ff917dc0c0 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/create-constitution-for-stake-address.action.golden +++ b/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/create-constitution-for-stake-address.action.golden @@ -1,5 +1,5 @@ { "cborHex": "", - "description": "", + "description": "Update to the Constitution or policy proposal", "type": "Governance proposal" } \ No newline at end of file diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/hardfork/conway-create-hardfork.action b/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/hardfork/conway-create-hardfork.action new file mode 100644 index 0000000000..b6b6afdf18 --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/hardfork/conway-create-hardfork.action @@ -0,0 +1,5 @@ +{ + "type": "Governance proposal", + "description": "Hardfork initiation proposal", + "cborHex": "84193039581de18f4a3466a404c11eb410313015b88e447d81b60089e25f611600e6058301f6820a00826b6578616d706c652e636f6d5820c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745" +} diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/governance/committee/update-committee-answer.json b/cardano-cli/test/cardano-cli-golden/files/golden/governance/committee/update-committee-answer.json index bd5325ed25..f5a4f2018c 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/governance/committee/update-committee-answer.json +++ b/cardano-cli/test/cardano-cli-golden/files/golden/governance/committee/update-committee-answer.json @@ -1,5 +1,5 @@ { "type": "Governance proposal", - "description": "", + "description": "New constitutional committee and/or threshold and/or terms proposal", "cborHex": "8400581de08f4a3466a404c11eb410313015b88e447d81b60089e25f611600e6058504f6d9010280a28200581cc0f2510d2353ee41a508b3c700c807e52697f2813fb014e3bc6982cd18ca8200581cf5ba9ae54a389cf97c54b981513d780877fc888579148044a8e7e7f218fcd81e8218331864826c687474703a2f2f64756d6d795820c9decb4498c4924d4f9804b6fa3425bab8f669f6452cb61f295114c906f3093e" } diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli index 53e5334645..4af5eee652 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help.cli @@ -6683,6 +6683,7 @@ Usage: cardano-cli conway governance action | create-no-confidence | create-protocol-parameters-update | create-treasury-withdrawal + | create-hardfork | view ) @@ -6863,6 +6864,27 @@ Usage: cardano-cli conway governance action create-treasury-withdrawal Create a treasury withdrawal. +Usage: cardano-cli conway governance action create-hardfork + ( --mainnet + | --testnet + ) + --governance-action-deposit NATURAL + ( --deposit-return-stake-verification-key STRING + | --deposit-return-stake-verification-key-file FILE + | --deposit-return-stake-key-hash HASH + | --deposit-return-stake-script-file FILE + | --deposit-return-stake-address ADDRESS + ) + [--prev-governance-action-tx-id TXID + --prev-governance-action-index WORD32] + --anchor-url TEXT + --anchor-data-hash HASH + --protocol-major-version MAJOR + --protocol-minor-version MINOR + --out-file FILE + + Create a hardfork initiation proposal. + Usage: cardano-cli conway governance action view --action-file FILE [ --output-json | --output-yaml diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action.cli index 7013a7c29f..dfd441eeb6 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action.cli +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action.cli @@ -5,6 +5,7 @@ Usage: cardano-cli conway governance action | create-no-confidence | create-protocol-parameters-update | create-treasury-withdrawal + | create-hardfork | view ) @@ -22,4 +23,5 @@ Available commands: Create a protocol parameters update. create-treasury-withdrawal Create a treasury withdrawal. + create-hardfork Create a hardfork initiation proposal. view View a governance action. diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-hardfork.cli b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-hardfork.cli new file mode 100644 index 0000000000..42ceb54aaa --- /dev/null +++ b/cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_action_create-hardfork.cli @@ -0,0 +1,52 @@ +Usage: cardano-cli conway governance action create-hardfork + ( --mainnet + | --testnet + ) + --governance-action-deposit NATURAL + ( --deposit-return-stake-verification-key STRING + | --deposit-return-stake-verification-key-file FILE + | --deposit-return-stake-key-hash HASH + | --deposit-return-stake-script-file FILE + | --deposit-return-stake-address ADDRESS + ) + [--prev-governance-action-tx-id TXID + --prev-governance-action-index WORD32] + --anchor-url TEXT + --anchor-data-hash HASH + --protocol-major-version MAJOR + --protocol-minor-version MINOR + --out-file FILE + + Create a hardfork initiation proposal. + +Available options: + --mainnet Use the mainnet magic id. + --testnet Use the testnet magic id. + --governance-action-deposit NATURAL + Deposit required to submit a governance action. + --deposit-return-stake-verification-key STRING + Stake verification key (Bech32 or hex-encoded). + --deposit-return-stake-verification-key-file FILE + Filepath of the staking verification key. + --deposit-return-stake-key-hash HASH + Stake verification key hash (hex-encoded). + --deposit-return-stake-script-file FILE + Filepath of the staking script. + --deposit-return-stake-address ADDRESS + Target stake address (bech32 format). + --prev-governance-action-tx-id TXID + Txid of the previous governance action. + --prev-governance-action-index WORD32 + Action index of the previous governance action. + --anchor-url TEXT Anchor URL + --anchor-data-hash HASH Proposal anchor data hash (obtain it with + "cardano-cli conway governance hash anchor-data ...") + --protocol-major-version MAJOR + Specify the major protocol version to fork into. It + must be the next natural number after the current + version and must be supported by the node. + --protocol-minor-version MINOR + Minor protocol version. Must be zero when the major + protocol version is increased. + --out-file FILE Output filepath of the hardfork proposal. + -h,--help Show this help text