Skip to content

Commit

Permalink
Tutorial update for Node V8.10.0 and CLI V8.22.0.0 (#136)
Browse files Browse the repository at this point in the history
* Update stake addr query command

* Update query stake deposit key command

* Update query command

* Update query and flags

- Update the query command for govActionDeposit
- update `--quorum` flag for  `threshold`

* Update actions.mdx
  • Loading branch information
Hornan7 authored Apr 18, 2024
1 parent e5195f7 commit 13887b8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
42 changes: 21 additions & 21 deletions docs/tutorials/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ the most recently enacted action of its respective type. Notably, this requireme
You can get the last enacted governance action IDs with:

```bash
cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.prevGovActionIds
cardano-cli conway query gov-state --testnet-magic 4 | jq -r .nextRatifyState.nextEnactState.prevGovActionIds
```
```json
{
"pgaCommittee": {
"Committee": {
"govActionIx": 0,
"txId": "fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec"
},
"pgaConstitution": {
"Constitution": {
"govActionIx": 0,
"txId": "2bcf2a93cb840d72e6fbbad4d52419fa69a3971dee2e32fab414e32a44ecbaf7"
},
"pgaHardFork": null,
"pgaPParamUpdate": null
"HardFork": null,
"PParamUpdate": null
}
```

Expand Down Expand Up @@ -89,7 +89,7 @@ Create the governance action proposal:
```bash
cardano-cli conway governance action update-committee \
--testnet \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \
--deposit-return-stake-verification-key-file stake.vkey \
--anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \
--anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \
Expand All @@ -99,7 +99,7 @@ cardano-cli conway governance action update-committee \
--epoch 95 \
--add-cc-cold-verification-key-hash 7f6721067362d4ae9ca73469fe983ce5572dad9028386100104b0da0 \
--epoch 90 \
--quorum 2/3 \
--threshold 2/3 \
--out-file update-committee.action
```
* Note: If there is a **previously enacted** governance action to update the committee, the proposal must also include `--prev-governance-action-tx-id` and `--prev-governance-action-index`.
Expand All @@ -111,27 +111,27 @@ Assume that you want to remove the CC member with the key hash `89181f26b47c3d3b
```bash
cardano-cli conway governance action update-committee \
--testnet \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \
--deposit-return-stake-verification-key-file stake.vkey \
--anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \
--anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \
--remove-cc-cold-verification-key-hash 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de \
--quorum 1/2 \
--threshold 1/2 \
--prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \
--prev-governance-action-index 0 \
--out-file update-committee.action
```

#### Update committee to only change the *quorum*:
#### Update committee to only change the *threshold*:

```bash
cardano-cli conway governance action update-committee \
--testnet \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \
--deposit-return-stake-verification-key-file stake.vkey \
--anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \
--anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \
--quorum 60/100 \
--threshold 60/100 \
--prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \
--prev-governance-action-index 0 \
--out-file update-committee.action
Expand All @@ -146,7 +146,7 @@ the dedicated forum to explore the weighty matters of Cardano's constitution wit
- Find the last enacted governance action of this type:

```bash
cardano-cli conway query gov-state --testnet-magic 4 | jq .enactState.prevGovActionIds.pgaConstitution
cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution'
```
```json
{
Expand Down Expand Up @@ -178,7 +178,7 @@ b2sum -l 256 constitution.txt
```bash
cardano-cli conway governance action create-constitution \
--testnet \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \
--deposit-return-stake-verification-key-file stake.vkey \
--anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \
--anchor-data-hash "931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5" \
Expand All @@ -194,7 +194,7 @@ cardano-cli conway governance action create-constitution \
- Find the last governance action enacted of this type:

```bash
cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.prevGovActionIds.pgaCommittee'
cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Committee'
```
```json
{
Expand All @@ -208,7 +208,7 @@ cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.prevGo
```bash
cardano-cli conway governance action create-no-confidence \
--testnet \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \
--deposit-return-stake-verification-key-file stake.vkey \
--anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \
--anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \
Expand All @@ -227,7 +227,7 @@ event that the governance action is approved.
```bash
cardano-cli conway governance action create-treasury-withdrawal \
--testnet \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \
--deposit-return-stake-verification-key-file stake.vkey \
--anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \
--anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \
Expand All @@ -244,10 +244,10 @@ cardano-cli conway governance action create-treasury-withdrawal \

```bash
cardano-cli conway governance action create-info --testnet \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \
--deposit-return-stake-verification-key-file stake.vkey \
--anchor-url https://tinyurl.com/yc74fxx4 \
--anchor-data-hash \
--anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \
--out-file info.action
```

Expand All @@ -256,7 +256,7 @@ cardano-cli conway governance action create-info --testnet \
```bash
cardano-cli conway governance action create-protocol-parameters-update \
--testnet \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \
--governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \
--deposit-return-stake-verification-key-file stake.vkey \
--anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \
--anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \
Expand Down Expand Up @@ -304,7 +304,7 @@ proposal serve as the action ID. An effective way to find your governance action
First, find your key hash with:

```bash
cardano-cli conway stake-address key-hash --stake-verification-key-file stake1.vkey
cardano-cli conway stake-address key-hash --stake-verification-key-file stake.vkey
```
`8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b`

Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/register-drep.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ There are three ways to generate the certificate:
````
cardano-cli conway governance drep registration-certificate \
--drep-verification-key-file drep.vkey \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.curPParams.dRepDeposit) \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .currentPParams.dRepDeposit) \
--out-file drep-register.cert
````

Expand All @@ -66,7 +66,7 @@ cardano-cli conway governance drep registration-certificate \
````
cardano-cli conway governance drep registration-certificate \
--drep-verification-key "$(cat drep.vkey | jq -r .cborHex | cut -c 5-)" \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.curPParams.dRepDeposit) \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .currentPParams.dRepDeposit) \
--out-file drep-register.cert
````

Expand All @@ -75,7 +75,7 @@ cardano-cli conway governance drep registration-certificate \
````
cardano-cli conway governance drep registration-certificate \
--drep-key-hash $(cat drep.id) \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.curPParams.dRepDeposit) \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .currentPParams.dRepDeposit) \
--out-file drep-register.cert
````

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/register-spo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export CARDANO_NODE_SOCKET_PATH=~/node.socket
```
cardano-cli conway stake-address registration-certificate \
--stake-verification-key-file stake.vkey \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.curPParams.keyDeposit) \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq .currentPParams.stakeAddressDeposit) \
--out-file registration.cert
```

Expand Down
4 changes: 2 additions & 2 deletions docs/tutorials/register-stake.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ and votes to a SanchoNet delegate representative (DRep).
```
cardano-cli conway stake-address registration-certificate \
--stake-verification-key-file stake.vkey \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.curPParams.keyDeposit) \
--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq .currentPParams.stakeAddressDeposit) \
--out-file registration.cert
```

Expand Down Expand Up @@ -59,4 +59,4 @@ cardano-cli conway transaction sign \
cardano-cli conway transaction submit \
--testnet-magic 4 \
--tx-file tx.signed
```
```

0 comments on commit 13887b8

Please sign in to comment.