From f564833398a3be22f35568077fa19f695446a4b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 03:40:48 +0000 Subject: [PATCH] deploy: 13887b8512375cd9efb32f1df4af1239518ded9f --- 404.html | 4 ++-- about/index.html | 4 ++-- actions/index.html | 4 ++-- .../{27cf304e.aaacfe4f.js => 27cf304e.03a870c2.js} | 2 +- .../{368b6ce8.febecb6c.js => 368b6ce8.7d4b4915.js} | 2 +- assets/js/43b2bb3c.18f28390.js | 1 - assets/js/43b2bb3c.8ca630b8.js | 1 + .../{6fddf1e9.6db8b142.js => 6fddf1e9.6c8156a1.js} | 2 +- ...e~main.7269040e.js => runtime~main.ff508ef8.js} | 2 +- disclaimer/index.html | 4 ++-- faucet/index.html | 4 ++-- get-started/discord/index.html | 4 ++-- get-started/govtool/index.html | 4 ++-- get-started/index.html | 4 ++-- index.html | 4 ++-- meetups/index.html | 4 ++-- roles/dev/index.html | 4 ++-- roles/drep/index.html | 4 ++-- roles/spo/index.html | 4 ++-- tools-resources/faq/index.html | 4 ++-- tools-resources/resources/index.html | 4 ++-- tutorials/actions/index.html | 14 +++++++------- tutorials/address/index.html | 4 ++-- tutorials/cli queries/index.html | 4 ++-- tutorials/committee/index.html | 4 ++-- tutorials/delegate-to-drep/index.html | 4 ++-- tutorials/drep-registration/index.html | 6 +++--- tutorials/file-naming-convention/index.html | 4 ++-- tutorials/jq-filters/index.html | 4 ++-- tutorials/register-stake-address/index.html | 6 +++--- tutorials/stake-pool-registration/index.html | 6 +++--- tutorials/start-node/index.html | 4 ++-- tutorials/vote-action/index.html | 4 ++-- why-sanchonet/barataria/index.html | 4 ++-- why-sanchonet/don-quixote/index.html | 4 ++-- why-sanchonet/index.html | 4 ++-- why-sanchonet/sancho-panza/index.html | 4 ++-- 37 files changed, 75 insertions(+), 75 deletions(-) rename assets/js/{27cf304e.aaacfe4f.js => 27cf304e.03a870c2.js} (69%) rename assets/js/{368b6ce8.febecb6c.js => 368b6ce8.7d4b4915.js} (64%) delete mode 100644 assets/js/43b2bb3c.18f28390.js create mode 100644 assets/js/43b2bb3c.8ca630b8.js rename assets/js/{6fddf1e9.6db8b142.js => 6fddf1e9.6c8156a1.js} (60%) rename assets/js/{runtime~main.7269040e.js => runtime~main.ff508ef8.js} (95%) diff --git a/404.html b/404.html index c6d02580..e644b0cf 100644 --- a/404.html +++ b/404.html @@ -4,13 +4,13 @@ Page Not Found | SanchoNet - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/about/index.html b/about/index.html index 81fc7871..754059ab 100644 --- a/about/index.html +++ b/about/index.html @@ -4,13 +4,13 @@ About | SanchoNet - +
Skip to main content

About

SanchoNet is about introducing the Cardano community to governance features from CIP-1694 in a controlled testnet environment.

Contributing

Want to make this site better? Submit a pull request!

  1. Clone this repository
  2. Run nix develop to enter a shell with all the necessary tools
  3. Edit one of the files in the docs/* folder
  4. Run just run in the Nix shell to run the website locally
  5. Once you are done with your changes, commit them to the repository!
- + \ No newline at end of file diff --git a/actions/index.html b/actions/index.html index b1d1b87f..233bdcc9 100644 --- a/actions/index.html +++ b/actions/index.html @@ -4,13 +4,13 @@ SanchoNet governance actions | SanchoNet - +
Skip to main content

SanchoNet governance actions

CIP-1694 describes seven types of governance actions.

ActionDescription
1. Motion of no-confidenceA motion to create a state of no-confidence in the current constitutional committee
2. New constitutional committee and/or threshold and/or term limitsModifications to the members of the constitutional committee, signature threshold, or term limits
3. Updates to the constitutionModifications to the off-chain constitution, recorded as an on-chain hash of the text document
4. Hard fork initiationA non-backward compatible upgrade of the network, which requires a prior software upgrade
5. Protocol parameter changesAny change to one or more updatable protocol parameters, excluding changes to major protocol versions ('hard forks')
6. Treasury withdrawalsTreasury withdrawals are sub-categorized into small, medium, or large and are determined by the amount of lovelace to be withdrawn.
7. InfoAn action that doesn't have any on-chain impact except for being recorded on-chain.

Each type of governance action represents a distinct feature within cardano-node and cardano-cli. As such, they will be rolled out in phases, coinciding with the integration of each feature.

Check out the Tutorials and Voting on governance actions to learn how to create and vote on governance actions.

- + \ No newline at end of file diff --git a/assets/js/27cf304e.aaacfe4f.js b/assets/js/27cf304e.03a870c2.js similarity index 69% rename from assets/js/27cf304e.aaacfe4f.js rename to assets/js/27cf304e.03a870c2.js index 7d592e2a..9d60339b 100644 --- a/assets/js/27cf304e.aaacfe4f.js +++ b/assets/js/27cf304e.03a870c2.js @@ -1 +1 @@ -"use strict";(self.webpackChunksanchonet=self.webpackChunksanchonet||[]).push([[356],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=p(r),g=a,f=d["".concat(l,".").concat(g)]||d[g]||u[g]||i;return r?n.createElement(f,o(o({ref:t},s),{},{components:r})):n.createElement(f,o({ref:t},s))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:a,o[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var n=r(7462),a=(r(7294),r(3905));const i={sidebar_label:"Register a DRep",title:"Registering as a SanchoNet delegate representative (DRep)",sidebar_position:6,slug:"/tutorials/drep-registration"},o=void 0,c={unversionedId:"tutorials/register-drep",id:"tutorials/register-drep",title:"Registering as a SanchoNet delegate representative (DRep)",description:"Pre-requisites",source:"@site/docs/tutorials/register-drep.mdx",sourceDirName:"tutorials",slug:"/tutorials/drep-registration",permalink:"/tutorials/drep-registration",draft:!1,editUrl:"https://github.com/input-output-hk/sanchonet/tree/master/docs/tutorials/register-drep.mdx",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_label:"Register a DRep",title:"Registering as a SanchoNet delegate representative (DRep)",sidebar_position:6,slug:"/tutorials/drep-registration"},sidebar:"docsSidebar",previous:{title:"Register a stake pool",permalink:"/tutorials/stake-pool-registration"},next:{title:"Delegate votes to a DRep",permalink:"/tutorials/delegate-to-drep"}},l={},p=[{value:"Pre-requisites",id:"pre-requisites",level:3},{value:"Generate SanchoNet DRep keys and an ID",id:"generate-sanchonet-drep-keys-and-an-id",level:3},{value:"Generate the registration certificate",id:"generate-the-registration-certificate",level:3},{value:"Submit certificate in a transaction",id:"submit-certificate-in-a-transaction",level:3}],s={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h3",{id:"pre-requisites"},"Pre-requisites"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Payment address with funds"),(0,a.kt)("li",{parentName:"ul"},"A SanchoNet node")),(0,a.kt)("h3",{id:"generate-sanchonet-drep-keys-and-an-id"},"Generate SanchoNet DRep keys and an ID"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Generate a DRep key pair:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway governance drep key-gen \\\n--verification-key-file drep.vkey \\\n--signing-key-file drep.skey\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'{\n "type": "DRepSigningKey_ed25519",\n "description": "Delegate Representative Signing Key",\n "cborHex": "5820eba7053fdc9cb3b8aacf142d3d4ad575bb48fb92f4082d81605ac8e2ccfead5d"\n}\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'{\n "type": "DRepVerificationKey_ed25519",\n "description": "Delegate Representative Verification Key",\n "cborHex": "5820c19e0e939609531cfd04dcfa5bf1a5f3e245aa88e163759341aba296af34cc7e"\n}\n')),(0,a.kt)("ol",{start:2},(0,a.kt)("li",{parentName:"ol"},"Generate a SanchoNet DRep ID:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway governance drep id \\\n--drep-verification-key-file drep.vkey \\\n--out-file drep.id\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"drep124w9k5ml25kcshqet8r3g2pwk6kqdhj79thg2rphf5u5urve0an\n")),(0,a.kt)("h3",{id:"generate-the-registration-certificate"},"Generate the registration certificate"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Create a SanchoNet DRep registration certificate")),(0,a.kt)("p",null,"There are three ways to generate the certificate:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Using the drep.vkey file:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway governance drep registration-certificate \\\n--drep-verification-key-file drep.vkey \\\n--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.curPParams.dRepDeposit) \\\n--out-file drep-register.cert\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Using the DRep verification key:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'cardano-cli conway governance drep registration-certificate \\\n--drep-verification-key "$(cat drep.vkey | jq -r .cborHex | cut -c 5-)" \\\n--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.curPParams.dRepDeposit) \\\n--out-file drep-register.cert\n')),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Using the DRep ID:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway governance drep registration-certificate \\\n--drep-key-hash $(cat drep.id) \\\n--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.curPParams.dRepDeposit) \\\n--out-file drep-register.cert\n")),(0,a.kt)("p",null,"Any of the above methods produces drep-register.cert, which contains:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'{\n "type": "CertificateShelley",\n "description": "DRep Key Registration Certificate",\n "cborHex": "84108200581c555c5b537f552d885c1959c714282eb6ac06de5e2aee850c374d394e00f6"\n}\n')),(0,a.kt)("h3",{id:"submit-certificate-in-a-transaction"},"Submit certificate in a transaction"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Submit the SanchoNet DRep registration certificate in a transaction.")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Build:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway transaction build \\\n--testnet-magic 4 \\\n--witness-override 2 \\\n--tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \\\n--change-address $(cat payment.addr) \\\n--certificate-file drep-register.cert \\\n--out-file tx.raw\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Sign:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway transaction sign \\\n--tx-body-file tx.raw \\\n--signing-key-file payment.skey \\\n--signing-key-file drep.skey \\\n--testnet-magic 4 \\\n--out-file tx.signed\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Submit:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway transaction submit \\\n--testnet-magic 4 \\\n--tx-file tx.signed\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunksanchonet=self.webpackChunksanchonet||[]).push([[356],{3905:(e,t,r)=>{r.d(t,{Zo:()=>s,kt:()=>f});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l=n.createContext({}),p=function(e){var t=n.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):o(o({},t),e)),r},s=function(e){var t=p(e.components);return n.createElement(l.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},g=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),d=p(r),g=a,f=d["".concat(l,".").concat(g)]||d[g]||u[g]||i;return r?n.createElement(f,o(o({ref:t},s),{},{components:r})):n.createElement(f,o({ref:t},s))}));function f(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=r.length,o=new Array(i);o[0]=g;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c[d]="string"==typeof e?e:a,o[1]=c;for(var p=2;p{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>p});var n=r(7462),a=(r(7294),r(3905));const i={sidebar_label:"Register a DRep",title:"Registering as a SanchoNet delegate representative (DRep)",sidebar_position:6,slug:"/tutorials/drep-registration"},o=void 0,c={unversionedId:"tutorials/register-drep",id:"tutorials/register-drep",title:"Registering as a SanchoNet delegate representative (DRep)",description:"Pre-requisites",source:"@site/docs/tutorials/register-drep.mdx",sourceDirName:"tutorials",slug:"/tutorials/drep-registration",permalink:"/tutorials/drep-registration",draft:!1,editUrl:"https://github.com/input-output-hk/sanchonet/tree/master/docs/tutorials/register-drep.mdx",tags:[],version:"current",sidebarPosition:6,frontMatter:{sidebar_label:"Register a DRep",title:"Registering as a SanchoNet delegate representative (DRep)",sidebar_position:6,slug:"/tutorials/drep-registration"},sidebar:"docsSidebar",previous:{title:"Register a stake pool",permalink:"/tutorials/stake-pool-registration"},next:{title:"Delegate votes to a DRep",permalink:"/tutorials/delegate-to-drep"}},l={},p=[{value:"Pre-requisites",id:"pre-requisites",level:3},{value:"Generate SanchoNet DRep keys and an ID",id:"generate-sanchonet-drep-keys-and-an-id",level:3},{value:"Generate the registration certificate",id:"generate-the-registration-certificate",level:3},{value:"Submit certificate in a transaction",id:"submit-certificate-in-a-transaction",level:3}],s={toc:p},d="wrapper";function u(e){let{components:t,...r}=e;return(0,a.kt)(d,(0,n.Z)({},s,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h3",{id:"pre-requisites"},"Pre-requisites"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Payment address with funds"),(0,a.kt)("li",{parentName:"ul"},"A SanchoNet node")),(0,a.kt)("h3",{id:"generate-sanchonet-drep-keys-and-an-id"},"Generate SanchoNet DRep keys and an ID"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Generate a DRep key pair:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway governance drep key-gen \\\n--verification-key-file drep.vkey \\\n--signing-key-file drep.skey\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'{\n "type": "DRepSigningKey_ed25519",\n "description": "Delegate Representative Signing Key",\n "cborHex": "5820eba7053fdc9cb3b8aacf142d3d4ad575bb48fb92f4082d81605ac8e2ccfead5d"\n}\n')),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'{\n "type": "DRepVerificationKey_ed25519",\n "description": "Delegate Representative Verification Key",\n "cborHex": "5820c19e0e939609531cfd04dcfa5bf1a5f3e245aa88e163759341aba296af34cc7e"\n}\n')),(0,a.kt)("ol",{start:2},(0,a.kt)("li",{parentName:"ol"},"Generate a SanchoNet DRep ID:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway governance drep id \\\n--drep-verification-key-file drep.vkey \\\n--out-file drep.id\n")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"drep124w9k5ml25kcshqet8r3g2pwk6kqdhj79thg2rphf5u5urve0an\n")),(0,a.kt)("h3",{id:"generate-the-registration-certificate"},"Generate the registration certificate"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Create a SanchoNet DRep registration certificate")),(0,a.kt)("p",null,"There are three ways to generate the certificate:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Using the drep.vkey file:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway governance drep registration-certificate \\\n--drep-verification-key-file drep.vkey \\\n--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .currentPParams.dRepDeposit) \\\n--out-file drep-register.cert\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Using the DRep verification key:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'cardano-cli conway governance drep registration-certificate \\\n--drep-verification-key "$(cat drep.vkey | jq -r .cborHex | cut -c 5-)" \\\n--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .currentPParams.dRepDeposit) \\\n--out-file drep-register.cert\n')),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Using the DRep ID:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway governance drep registration-certificate \\\n--drep-key-hash $(cat drep.id) \\\n--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .currentPParams.dRepDeposit) \\\n--out-file drep-register.cert\n")),(0,a.kt)("p",null,"Any of the above methods produces drep-register.cert, which contains:"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},'{\n "type": "CertificateShelley",\n "description": "DRep Key Registration Certificate",\n "cborHex": "84108200581c555c5b537f552d885c1959c714282eb6ac06de5e2aee850c374d394e00f6"\n}\n')),(0,a.kt)("h3",{id:"submit-certificate-in-a-transaction"},"Submit certificate in a transaction"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Submit the SanchoNet DRep registration certificate in a transaction.")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Build:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway transaction build \\\n--testnet-magic 4 \\\n--witness-override 2 \\\n--tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \\\n--change-address $(cat payment.addr) \\\n--certificate-file drep-register.cert \\\n--out-file tx.raw\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Sign:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway transaction sign \\\n--tx-body-file tx.raw \\\n--signing-key-file payment.skey \\\n--signing-key-file drep.skey \\\n--testnet-magic 4 \\\n--out-file tx.signed\n")),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"Submit:")),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre"},"cardano-cli conway transaction submit \\\n--testnet-magic 4 \\\n--tx-file tx.signed\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/368b6ce8.febecb6c.js b/assets/js/368b6ce8.7d4b4915.js similarity index 64% rename from assets/js/368b6ce8.febecb6c.js rename to assets/js/368b6ce8.7d4b4915.js index 21309fea..375884ba 100644 --- a/assets/js/368b6ce8.febecb6c.js +++ b/assets/js/368b6ce8.7d4b4915.js @@ -1 +1 @@ -"use strict";(self.webpackChunksanchonet=self.webpackChunksanchonet||[]).push([[945],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>g});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var c=a.createContext({}),l=function(e){var t=a.useContext(c),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},u=function(e){var t=l(e.components);return a.createElement(c.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,c=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),d=l(r),k=n,g=d["".concat(c,".").concat(k)]||d[k]||p[k]||i;return r?a.createElement(g,s(s({ref:t},u),{},{components:r})):a.createElement(g,s({ref:t},u))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,s=new Array(i);s[0]=k;var o={};for(var c in t)hasOwnProperty.call(t,c)&&(o[c]=t[c]);o.originalType=e,o[d]="string"==typeof e?e:n,s[1]=o;for(var l=2;l{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var a=r(7462),n=(r(7294),r(3905));const i={sidebar_label:"Stake address registration",title:"Stake address registration certificate",sidebar_position:4,slug:"/tutorials/register-stake-address"},s=void 0,o={unversionedId:"tutorials/register-stake",id:"tutorials/register-stake",title:"Stake address registration certificate",description:"To take part on the SanchoNet consensus protocol, we need to submit a stake address registration certificate to the chain. This allows to delegate stake to a SanchoNet stake pool",source:"@site/docs/tutorials/register-stake.mdx",sourceDirName:"tutorials",slug:"/tutorials/register-stake-address",permalink:"/tutorials/register-stake-address",draft:!1,editUrl:"https://github.com/input-output-hk/sanchonet/tree/master/docs/tutorials/register-stake.mdx",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_label:"Stake address registration",title:"Stake address registration certificate",sidebar_position:4,slug:"/tutorials/register-stake-address"},sidebar:"docsSidebar",previous:{title:"Generate keys and an address",permalink:"/tutorials/address"},next:{title:"Register a stake pool",permalink:"/tutorials/stake-pool-registration"}},c={},l=[{value:"Pre-requisites",id:"pre-requisites",level:3},{value:"Generate the registration certificate",id:"generate-the-registration-certificate",level:3},{value:"Submit the certificate to the chain",id:"submit-the-certificate-to-the-chain",level:3}],u={toc:l},d="wrapper";function p(e){let{components:t,...r}=e;return(0,n.kt)(d,(0,a.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"To take part on the SanchoNet consensus protocol, we need to submit a stake address registration certificate to the chain. This allows to delegate stake to a SanchoNet stake pool\nand votes to a SanchoNet delegate representative (DRep)."),(0,n.kt)("h3",{id:"pre-requisites"},"Pre-requisites"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Stake key pair"),(0,n.kt)("li",{parentName:"ul"},"Payment key pair"),(0,n.kt)("li",{parentName:"ul"},"Address with funds"),(0,n.kt)("li",{parentName:"ul"},"A SanchoNet node")),(0,n.kt)("h3",{id:"generate-the-registration-certificate"},"Generate the registration certificate"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"Register the stake address you previously created by generating a registration certificate:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"cardano-cli conway stake-address registration-certificate \\\n--stake-verification-key-file stake.vkey \\\n--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.curPParams.keyDeposit) \\\n--out-file registration.cert\n")),(0,n.kt)("h3",{id:"submit-the-certificate-to-the-chain"},"Submit the certificate to the chain"),(0,n.kt)("ol",{start:2},(0,n.kt)("li",{parentName:"ol"},"Build, sign and submit the transaction.")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Build")," the transaction:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"cardano-cli conway transaction build \\\n--testnet-magic 4 \\\n--witness-override 2 \\\n--tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \\\n--change-address $(cat payment.addr) \\\n--certificate-file registration.cert \\\n--out-file tx.raw\n")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Sign")," the transaction:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"cardano-cli conway transaction sign \\\n--tx-body-file tx.raw \\\n--signing-key-file payment.skey \\\n--signing-key-file stake.skey \\\n--testnet-magic 4 \\\n--out-file tx.signed\n")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Submit")," the transaction:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"cardano-cli conway transaction submit \\\n--testnet-magic 4 \\\n--tx-file tx.signed\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file +"use strict";(self.webpackChunksanchonet=self.webpackChunksanchonet||[]).push([[945],{3905:(e,t,r)=>{r.d(t,{Zo:()=>u,kt:()=>g});var a=r(7294);function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function s(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var l=a.createContext({}),c=function(e){var t=a.useContext(l),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},u=function(e){var t=c(e.components);return a.createElement(l.Provider,{value:t},e.children)},d="mdxType",p={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var r=e.components,n=e.mdxType,i=e.originalType,l=e.parentName,u=o(e,["components","mdxType","originalType","parentName"]),d=c(r),k=n,g=d["".concat(l,".").concat(k)]||d[k]||p[k]||i;return r?a.createElement(g,s(s({ref:t},u),{},{components:r})):a.createElement(g,s({ref:t},u))}));function g(e,t){var r=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var i=r.length,s=new Array(i);s[0]=k;var o={};for(var l in t)hasOwnProperty.call(t,l)&&(o[l]=t[l]);o.originalType=e,o[d]="string"==typeof e?e:n,s[1]=o;for(var c=2;c{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>i,metadata:()=>o,toc:()=>c});var a=r(7462),n=(r(7294),r(3905));const i={sidebar_label:"Stake address registration",title:"Stake address registration certificate",sidebar_position:4,slug:"/tutorials/register-stake-address"},s=void 0,o={unversionedId:"tutorials/register-stake",id:"tutorials/register-stake",title:"Stake address registration certificate",description:"To take part on the SanchoNet consensus protocol, we need to submit a stake address registration certificate to the chain. This allows to delegate stake to a SanchoNet stake pool",source:"@site/docs/tutorials/register-stake.mdx",sourceDirName:"tutorials",slug:"/tutorials/register-stake-address",permalink:"/tutorials/register-stake-address",draft:!1,editUrl:"https://github.com/input-output-hk/sanchonet/tree/master/docs/tutorials/register-stake.mdx",tags:[],version:"current",sidebarPosition:4,frontMatter:{sidebar_label:"Stake address registration",title:"Stake address registration certificate",sidebar_position:4,slug:"/tutorials/register-stake-address"},sidebar:"docsSidebar",previous:{title:"Generate keys and an address",permalink:"/tutorials/address"},next:{title:"Register a stake pool",permalink:"/tutorials/stake-pool-registration"}},l={},c=[{value:"Pre-requisites",id:"pre-requisites",level:3},{value:"Generate the registration certificate",id:"generate-the-registration-certificate",level:3},{value:"Submit the certificate to the chain",id:"submit-the-certificate-to-the-chain",level:3}],u={toc:c},d="wrapper";function p(e){let{components:t,...r}=e;return(0,n.kt)(d,(0,a.Z)({},u,r,{components:t,mdxType:"MDXLayout"}),(0,n.kt)("p",null,"To take part on the SanchoNet consensus protocol, we need to submit a stake address registration certificate to the chain. This allows to delegate stake to a SanchoNet stake pool\nand votes to a SanchoNet delegate representative (DRep)."),(0,n.kt)("h3",{id:"pre-requisites"},"Pre-requisites"),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},"Stake key pair"),(0,n.kt)("li",{parentName:"ul"},"Payment key pair"),(0,n.kt)("li",{parentName:"ul"},"Address with funds"),(0,n.kt)("li",{parentName:"ul"},"A SanchoNet node")),(0,n.kt)("h3",{id:"generate-the-registration-certificate"},"Generate the registration certificate"),(0,n.kt)("ol",null,(0,n.kt)("li",{parentName:"ol"},"Register the stake address you previously created by generating a registration certificate:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"cardano-cli conway stake-address registration-certificate \\\n--stake-verification-key-file stake.vkey \\\n--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq .currentPParams.stakeAddressDeposit) \\\n--out-file registration.cert\n")),(0,n.kt)("h3",{id:"submit-the-certificate-to-the-chain"},"Submit the certificate to the chain"),(0,n.kt)("ol",{start:2},(0,n.kt)("li",{parentName:"ol"},"Build, sign and submit the transaction.")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Build")," the transaction:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"cardano-cli conway transaction build \\\n--testnet-magic 4 \\\n--witness-override 2 \\\n--tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \\\n--change-address $(cat payment.addr) \\\n--certificate-file registration.cert \\\n--out-file tx.raw\n")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Sign")," the transaction:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"cardano-cli conway transaction sign \\\n--tx-body-file tx.raw \\\n--signing-key-file payment.skey \\\n--signing-key-file stake.skey \\\n--testnet-magic 4 \\\n--out-file tx.signed\n")),(0,n.kt)("ul",null,(0,n.kt)("li",{parentName:"ul"},(0,n.kt)("strong",{parentName:"li"},"Submit")," the transaction:")),(0,n.kt)("pre",null,(0,n.kt)("code",{parentName:"pre"},"cardano-cli conway transaction submit \\\n--testnet-magic 4 \\\n--tx-file tx.signed\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/43b2bb3c.18f28390.js b/assets/js/43b2bb3c.18f28390.js deleted file mode 100644 index bf027fc4..00000000 --- a/assets/js/43b2bb3c.18f28390.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunksanchonet=self.webpackChunksanchonet||[]).push([[513],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var n=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var s=n.createContext({}),l=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},d=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=l(a),h=o,m=p["".concat(s,".").concat(h)]||p[h]||u[h]||r;return a?n.createElement(m,c(c({ref:t},d),{},{components:a})):n.createElement(m,c({ref:t},d))}));function m(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,c=new Array(r);c[0]=h;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:o,c[1]=i;for(var l=2;l{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var n=a(7462),o=(a(7294),a(3905));const r={sidebar_label:"Create governance actions",title:"Governance actions",sidebar_position:9,slug:"/tutorials/actions"},c=void 0,i={unversionedId:"tutorials/actions",id:"tutorials/actions",title:"Governance actions",description:"Common aspects of all types of governance actions",source:"@site/docs/tutorials/actions.mdx",sourceDirName:"tutorials",slug:"/tutorials/actions",permalink:"/tutorials/actions",draft:!1,editUrl:"https://github.com/input-output-hk/sanchonet/tree/master/docs/tutorials/actions.mdx",tags:[],version:"current",sidebarPosition:9,frontMatter:{sidebar_label:"Create governance actions",title:"Governance actions",sidebar_position:9,slug:"/tutorials/actions"},sidebar:"docsSidebar",previous:{title:"Generate committee keys",permalink:"/tutorials/committee"},next:{title:"Voting on actions",permalink:"/tutorials/vote-action"}},s={},l=[{value:"Common aspects of all types of governance actions",id:"common-aspects-of-all-types-of-governance-actions",level:2},{value:"Update committee actions",id:"update-committee-actions",level:2},{value:"Update committee to add a new CC member:",id:"update-committee-to-add-a-new-cc-member",level:4},{value:"Update committee to remove an existing CC member:",id:"update-committee-to-remove-an-existing-cc-member",level:4},{value:"Update committee to only change the quorum:",id:"update-committee-to-only-change-the-quorum",level:4},{value:"Updating the constitution",id:"updating-the-constitution",level:2},{value:"Create the proposal to update the constitution:",id:"create-the-proposal-to-update-the-constitution",level:4},{value:"Motion of no confidence",id:"motion-of-no-confidence",level:2},{value:"Create a no-confidence governance action:",id:"create-a-no-confidence-governance-action",level:4},{value:"Treasury withdrawal",id:"treasury-withdrawal",level:2},{value:"Create the treasury withdrawal proposal:",id:"create-the-treasury-withdrawal-proposal",level:4},{value:"Info",id:"info",level:2},{value:"Create the 'info' governance action:",id:"create-the-info-governance-action",level:4},{value:"Update protocol parameters to change the --key-reg-deposit-amt",id:"update-protocol-parameters-to-change-the---key-reg-deposit-amt",level:2},{value:"Submitting the *.action action file in a transaction",id:"submitting-the-action-action-file-in-a-transaction",level:2},{value:"Finding the governance action ID of your proposal",id:"finding-the-governance-action-id-of-your-proposal",level:2}],d={toc:l},p="wrapper";function u(e){let{components:t,...a}=e;return(0,o.kt)(p,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"common-aspects-of-all-types-of-governance-actions"},"Common aspects of all types of governance actions"),(0,o.kt)("p",null,"A proposal is the process of putting together all the information required to submit a governance action to the chain. A proposal consists of:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"A deposit"),(0,o.kt)("li",{parentName:"ul"},"The reward account that will receive the deposit return"),(0,o.kt)("li",{parentName:"ul"},"The governance action"),(0,o.kt)("li",{parentName:"ul"},"An anchor")),(0,o.kt)("p",null,"When using the ",(0,o.kt)("inlineCode",{parentName:"p"},"cardano-cli")," to create a governance action, you will notice that it creates a proposal."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Deposit and stake credentials")),(0,o.kt)("p",null,"Any ada holder can submit a governance action to the chain. They must provide a deposit, which will be returned when the action is finalized (whether it is ratified or has expired).\nTo facilitate this process, the proposer must specify the stake credential that will receive the refunded deposit."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Previous governance action ID")),(0,o.kt)("p",null,"To prevent unintended conflicts between governance actions of the same type, some governance actions must include the governance action ID of\nthe most recently enacted action of its respective type. Notably, this requirement does not apply to ",(0,o.kt)("strong",{parentName:"p"},"treasury withdrawal")," and ",(0,o.kt)("strong",{parentName:"p"},"info")," governance actions."),(0,o.kt)("p",null,"You can get the last enacted governance action IDs with:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.prevGovActionIds\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "pgaCommittee": {\n "govActionIx": 0,\n "txId": "fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec"\n },\n "pgaConstitution": {\n "govActionIx": 0,\n "txId": "2bcf2a93cb840d72e6fbbad4d52419fa69a3971dee2e32fab414e32a44ecbaf7"\n },\n "pgaHardFork": null,\n "pgaPParamUpdate": null\n}\n')),(0,o.kt)("p",null,"Please note that both the ",(0,o.kt)("strong",{parentName:"p"},"update committee")," and ",(0,o.kt)("strong",{parentName:"p"},"motion of no confidence")," actions share the same space, referred to as 'pgaCommittee,' within the\ngovernance state. Consequently, the governance state stores a single value to represent both of these actions. The system also verifies either of these\nactions against this single stored value."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Anchors")),(0,o.kt)("p",null,"When proposing a governance action, the proposer may employ an ",(0,o.kt)("em",{parentName:"p"},"anchor"),", which comprises a ",(0,o.kt)("em",{parentName:"p"},"URL")," hosting a document that outlines the rationale\nfor the proposed changes, along with the document's ",(0,o.kt)("em",{parentName:"p"},"hash"),"."),(0,o.kt)("p",null,"The document at the URL can be of a free form. It's important that it should communicate to ada holders the ",(0,o.kt)("em",{parentName:"p"},"what")," and the ",(0,o.kt)("em",{parentName:"p"},"why")," of the proposal. This tutorial mostly uses '",(0,o.kt)("a",{parentName:"p",href:"https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld'"},"https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld'")," as an example, see ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/Ryun1/CIPs/blob/governance-metadata-actions/CIP-0108/test-vector.md"},"here")," for more details."),(0,o.kt)("p",null,"See ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/cardano-foundation/CIPs/tree/master/CIP-0100"},"CIP-100 | Governance Metadata")," and ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/cardano-foundation/CIPs/pull/632"},"CIP-0108? | Governance Metadata - Governance Actions")," for standard.\nFollowing CIP-100, we canonize the metadata anchor first, via ",(0,o.kt)("a",{parentName:"p",href:"https://json-ld.org/playground/"},"JSON-LD playground"),", which we then hash."),(0,o.kt)("p",null,"You can use ",(0,o.kt)("inlineCode",{parentName:"p"},"cardano-cli")," to get the hash:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance hash anchor-data --file-text treasury-withdrawal.canonical\n931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5\n")),(0,o.kt)("p",null,"Alternatively, utilize b2sum to hash the document:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"b2sum -l 256 treasury-withdrawal.canonical\n931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 treasury-withdrawal.canonical\n")),(0,o.kt)("p",null,"You will need to supply the hash of the document when creating a governance action."),(0,o.kt)("h2",{id:"update-committee-actions"},"Update committee actions"),(0,o.kt)("h4",{id:"update-committee-to-add-a-new-cc-member"},"Update committee to ",(0,o.kt)("em",{parentName:"h4"},"add")," a new CC member:"),(0,o.kt)("p",null,"Assume you want to add three CC members, who have generated cold keys and have provided their key hashes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"ea8738081fca0726f4e781f5e55fda05f8745432a5f8a8d09eb0b34b")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"7f6721067362d4ae9ca73469fe983ce5572dad9028386100104b0da0"))),(0,o.kt)("p",null,"You can create a proposal to add them as new CC members with an expiration epoch (",(0,o.kt)("inlineCode",{parentName:"p"},"--epoch"),") for each of them. This is a good time to review the quorum. Let\u2019s assume that 2/3 of the committee needs to accept the proposal:"),(0,o.kt)("p",null,"Create the governance action proposal:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action update-committee \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --add-cc-cold-verification-key-hash 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de \\\n --epoch 100 \\\n --add-cc-cold-verification-key-hash ea8738081fca0726f4e781f5e55fda05f8745432a5f8a8d09eb0b34b \\\n --epoch 95 \\\n --add-cc-cold-verification-key-hash 7f6721067362d4ae9ca73469fe983ce5572dad9028386100104b0da0 \\\n --epoch 90 \\\n --quorum 2/3 \\\n --out-file update-committee.action\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Note: If there is a ",(0,o.kt)("strong",{parentName:"li"},"previously enacted")," governance action to update the committee, the proposal must also include ",(0,o.kt)("inlineCode",{parentName:"li"},"--prev-governance-action-tx-id")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"--prev-governance-action-index"),".")),(0,o.kt)("h4",{id:"update-committee-to-remove-an-existing-cc-member"},"Update committee to ",(0,o.kt)("em",{parentName:"h4"},"remove")," an existing CC member:"),(0,o.kt)("p",null,"Assume that you want to remove the CC member with the key hash ",(0,o.kt)("inlineCode",{parentName:"p"},"89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de"),". You can do this with:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action update-committee \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --remove-cc-cold-verification-key-hash 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de \\\n --quorum 1/2 \\\n --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \\\n --prev-governance-action-index 0 \\\n --out-file update-committee.action\n")),(0,o.kt)("h4",{id:"update-committee-to-only-change-the-quorum"},"Update committee to only change the ",(0,o.kt)("em",{parentName:"h4"},"quorum"),":"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action update-committee \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --quorum 60/100 \\\n --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \\\n --prev-governance-action-index 0 \\\n --out-file update-committee.action\n")),(0,o.kt)("h2",{id:"updating-the-constitution"},"Updating the constitution"),(0,o.kt)("p",null,"Should you decide to propose an update to the SanchoNet constitution, please note that all rules and principles outlined for SanchoNet should be fictional and unrelated to the actual rules on the Cardano blockchain. Quotes directly from Don Quixote\nare encouraged, as well as rules in a similar spirit that aren't directly extracted from the book. SanchoNet is not the space for serious discussions about the future governance of Cardano. For substantial conversations, please visit\nthe dedicated forum to explore the weighty matters of Cardano's constitution with the depth they deserve. ",(0,o.kt)("a",{parentName:"p",href:"https://forum.cardano.org/c/governance/constitution/212"},"Cardano Forum")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Find the last enacted governance action of this type:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway query gov-state --testnet-magic 4 | jq .enactState.prevGovActionIds.pgaConstitution\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "govActionIx": 0,\n "txId": "00caeb6c2db4575acc43be3e8f87b881dccb86283daf16aa2707275cbe7f3451"\n}\n')),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Write a constitution update and save it to ",(0,o.kt)("inlineCode",{parentName:"li"},"constitution.txt")),(0,o.kt)("li",{parentName:"ul"},"Upload the ",(0,o.kt)("inlineCode",{parentName:"li"},"constitution.txt")," file to a URL so that everyone can read it, for example, ",(0,o.kt)("a",{parentName:"li",href:"https://tinyurl.com/mr3ferf9"},"https://tinyurl.com/mr3ferf9")),(0,o.kt)("li",{parentName:"ul"},"Check the hash of the ",(0,o.kt)("inlineCode",{parentName:"li"},"constitution.txt")," file using ",(0,o.kt)("a",{parentName:"li",href:"https://man7.org/linux/man-pages/man1/b2sum.1.html"},"b2sum"),".")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"wget https://tinyurl.com/mr3ferf9 -O constitution.txt\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance hash anchor-data --file-text constitution.txt\n5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d\n")),(0,o.kt)("p",null,"or"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"b2sum -l 256 constitution.txt\n5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d constitution.txt\n")),(0,o.kt)("h4",{id:"create-the-proposal-to-update-the-constitution"},"Create the proposal to update the constitution:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},'cardano-cli conway governance action create-constitution \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r \'.enactState.curPParams.govActionDeposit\') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash "931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5" \\\n --constitution-url https://tinyurl.com/mr3ferf9 \\\n --constitution-hash "5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d" \\\n --prev-governance-action-tx-id "00caeb6c2db4575acc43be3e8f87b881dccb86283daf16aa2707275cbe7f3451" \\\n --prev-governance-action-index 0 \\\n --out-file constitution.action\n')),(0,o.kt)("h2",{id:"motion-of-no-confidence"},"Motion of no confidence"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Find the last governance action enacted of this type:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.prevGovActionIds.pgaCommittee'\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "govActionIx": 0,\n "txId": "fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec"\n}\n')),(0,o.kt)("h4",{id:"create-a-no-confidence-governance-action"},"Create a no-confidence governance action:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action create-no-confidence \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \\\n --prev-governance-action-index 0 \\\n --out-file no-confidence.action\n")),(0,o.kt)("h2",{id:"treasury-withdrawal"},"Treasury withdrawal"),(0,o.kt)("p",null,"In addition to the stake credential required to obtain a deposit refund, the proposer must also furnish stake credentials for receiving funds from the treasury in the\nevent that the governance action is approved."),(0,o.kt)("h4",{id:"create-the-treasury-withdrawal-proposal"},"Create the treasury withdrawal proposal:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action create-treasury-withdrawal \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --funds-receiving-stake-verification-key-file stake.vkey \\\n --transfer 50000000000 \\\n --out-file treasury.action\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Note that you do not need to provide any previous governance action ID on treasury withdrawals.")),(0,o.kt)("h2",{id:"info"},"Info"),(0,o.kt)("h4",{id:"create-the-info-governance-action"},"Create the 'info' governance action:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action create-info --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://tinyurl.com/yc74fxx4 \\\n --anchor-data-hash \\\n --out-file info.action\n")),(0,o.kt)("h2",{id:"update-protocol-parameters-to-change-the---key-reg-deposit-amt"},"Update protocol parameters to change the ",(0,o.kt)("inlineCode",{parentName:"h2"},"--key-reg-deposit-amt")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action create-protocol-parameters-update \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.curPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --key-reg-deposit-amt 1000000 \\\n --out-file pp-update.action\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Note: If there is a ",(0,o.kt)("strong",{parentName:"li"},"previously enacted")," governance action to update the protocol parameters, the proposal must also include ",(0,o.kt)("inlineCode",{parentName:"li"},"--prev-governance-action-tx-id")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"--prev-governance-action-index"),".")),(0,o.kt)("h2",{id:"submitting-the-action-action-file-in-a-transaction"},"Submitting the ",(0,o.kt)("inlineCode",{parentName:"h2"},"*.action")," action file in a transaction"),(0,o.kt)("p",null,"Submitting the ",(0,o.kt)("inlineCode",{parentName:"p"},"*.action")," file to the blockchain is the essential step in bringing your proposal to life and making it accessible for the community to participate in the\nvoting process. This process essentially transforms your proposal from a conceptual idea into an actionable item. Once submitted, it becomes part of the public ledger,\nwhile also allowing members of the governance bodies to review, discuss, and ultimately cast their votes on its approval or rejection."),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Note that you can also use ",(0,o.kt)("inlineCode",{parentName:"li"},"build-raw")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"calculate-min-fee")," to build transactions in an off-line settting. The example below uses the convenient ",(0,o.kt)("inlineCode",{parentName:"li"},"build"),":")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},'cardano-cli conway transaction build \\\n --testnet-magic 4 \\\n --witness-override 2 \\\n --tx-in "$(cardano-cli query utxo --address "$(cat payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r \'keys[0]\')" \\\n --change-address $(cat payment.addr) \\\n --proposal-file info.action \\\n --out-file tx.raw\n')),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway transaction sign \\\n --testnet-magic 4 \\\n --tx-body-file tx.raw \\\n --signing-key-file payment.skey \\\n --signing-key-file stake.skey \\\n --out-file tx.signed\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway transaction submit \\\n --testnet-magic 4 \\\n --tx-file tx.signed\n")),(0,o.kt)("h2",{id:"finding-the-governance-action-id-of-your-proposal"},"Finding the governance action ID of your proposal"),(0,o.kt)("p",null,"You may want to find your governance action ID to share it with others on Discord1 and seek their support. The transaction ID and the index of the transaction that submitted the\nproposal serve as the action ID. An effective way to find your governance action ID is by querying the governance state and filtering by (the proposer) stake key hash."),(0,o.kt)("p",null,"First, find your key hash with:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway stake-address key-hash --stake-verification-key-file stake1.vkey\n")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b")),(0,o.kt)("p",null,"Use ",(0,o.kt)("inlineCode",{parentName:"p"},"jq")," to filter the ",(0,o.kt)("inlineCode",{parentName:"p"},"gov-state")," output by the stake key hash. The output contains all the relevant information about your governance actions, including ",(0,o.kt)("inlineCode",{parentName:"p"},"actionId"),":"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway query gov-state --testnet-magic 4 \\\n| jq -r --arg keyHash \"8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b\" '.proposals | to_entries[] | select(.value.returnAddr.credential.keyHash | contains($keyHash)) | .value'\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "action": {\n "contents": [\n [\n {\n "credential": {\n "keyHash": "7249a71391f08399f06b492eae7892a33191699625cff50b7dee55c6"\n },\n "network": "Testnet"\n },\n 20388738581\n ]\n ],\n "tag": "TreasuryWithdrawals"\n },\n "actionId": {\n "govActionIx": 0,\n "txId": "4fcd92abf2ce3d6796c5fae51ea83d563ca8611359c9624fd1cecd7fa1ce71cc"\n },\n "committeeVotes": {\n "keyHash-23e05ad2b71317a6348ce4b68dae37aa1c0e545cdea740b23c21742e": "VoteNo",\n "keyHash-540bedcd4bdcbf523e899c3ef43f2b96ecec4f6303af58d15a413ed1": "VoteYes",\n "keyHash-6c1d098a366f2274651943a7f778b3b5459c129f0407a0db2902253a": "VoteYes"\n },\n "dRepVotes": {\n "keyHash-13797df5308dfebf2348fa58b312a177cf97939f5f7d21168e1a54db": "VoteYes",\n "keyHash-9853551d8b99884f51608822e012bbf0d444eb7bea2807ee664f1241": "Abstain",\n "keyHash-cf09b59e134fa14e48da39b552c02299a054d7c8b895b3d827453672": "VoteNo"\n },\n "deposit": 1000000000,\n "expiresAfter": 34,\n "proposedIn": 33,\n "returnAddr": {\n "credential": {\n "keyHash": "8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b"\n },\n "network": "Testnet"\n },\n "stakePoolVotes": {}\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/43b2bb3c.8ca630b8.js b/assets/js/43b2bb3c.8ca630b8.js new file mode 100644 index 00000000..2daaa6cb --- /dev/null +++ b/assets/js/43b2bb3c.8ca630b8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunksanchonet=self.webpackChunksanchonet||[]).push([[513],{3905:(e,t,a)=>{a.d(t,{Zo:()=>d,kt:()=>m});var n=a(7294);function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function r(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e){for(var t=1;t=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var s=n.createContext({}),l=function(e){var t=n.useContext(s),a=t;return e&&(a="function"==typeof e?e(t):c(c({},t),e)),a},d=function(e){var t=l(e.components);return n.createElement(s.Provider,{value:t},e.children)},p="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var a=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,d=i(e,["components","mdxType","originalType","parentName"]),p=l(a),h=o,m=p["".concat(s,".").concat(h)]||p[h]||u[h]||r;return a?n.createElement(m,c(c({ref:t},d),{},{components:a})):n.createElement(m,c({ref:t},d))}));function m(e,t){var a=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=a.length,c=new Array(r);c[0]=h;var i={};for(var s in t)hasOwnProperty.call(t,s)&&(i[s]=t[s]);i.originalType=e,i[p]="string"==typeof e?e:o,c[1]=i;for(var l=2;l{a.r(t),a.d(t,{assets:()=>s,contentTitle:()=>c,default:()=>u,frontMatter:()=>r,metadata:()=>i,toc:()=>l});var n=a(7462),o=(a(7294),a(3905));const r={sidebar_label:"Create governance actions",title:"Governance actions",sidebar_position:9,slug:"/tutorials/actions"},c=void 0,i={unversionedId:"tutorials/actions",id:"tutorials/actions",title:"Governance actions",description:"Common aspects of all types of governance actions",source:"@site/docs/tutorials/actions.mdx",sourceDirName:"tutorials",slug:"/tutorials/actions",permalink:"/tutorials/actions",draft:!1,editUrl:"https://github.com/input-output-hk/sanchonet/tree/master/docs/tutorials/actions.mdx",tags:[],version:"current",sidebarPosition:9,frontMatter:{sidebar_label:"Create governance actions",title:"Governance actions",sidebar_position:9,slug:"/tutorials/actions"},sidebar:"docsSidebar",previous:{title:"Generate committee keys",permalink:"/tutorials/committee"},next:{title:"Voting on actions",permalink:"/tutorials/vote-action"}},s={},l=[{value:"Common aspects of all types of governance actions",id:"common-aspects-of-all-types-of-governance-actions",level:2},{value:"Update committee actions",id:"update-committee-actions",level:2},{value:"Update committee to add a new CC member:",id:"update-committee-to-add-a-new-cc-member",level:4},{value:"Update committee to remove an existing CC member:",id:"update-committee-to-remove-an-existing-cc-member",level:4},{value:"Update committee to only change the threshold:",id:"update-committee-to-only-change-the-threshold",level:4},{value:"Updating the constitution",id:"updating-the-constitution",level:2},{value:"Create the proposal to update the constitution:",id:"create-the-proposal-to-update-the-constitution",level:4},{value:"Motion of no confidence",id:"motion-of-no-confidence",level:2},{value:"Create a no-confidence governance action:",id:"create-a-no-confidence-governance-action",level:4},{value:"Treasury withdrawal",id:"treasury-withdrawal",level:2},{value:"Create the treasury withdrawal proposal:",id:"create-the-treasury-withdrawal-proposal",level:4},{value:"Info",id:"info",level:2},{value:"Create the 'info' governance action:",id:"create-the-info-governance-action",level:4},{value:"Update protocol parameters to change the --key-reg-deposit-amt",id:"update-protocol-parameters-to-change-the---key-reg-deposit-amt",level:2},{value:"Submitting the *.action action file in a transaction",id:"submitting-the-action-action-file-in-a-transaction",level:2},{value:"Finding the governance action ID of your proposal",id:"finding-the-governance-action-id-of-your-proposal",level:2}],d={toc:l},p="wrapper";function u(e){let{components:t,...a}=e;return(0,o.kt)(p,(0,n.Z)({},d,a,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("h2",{id:"common-aspects-of-all-types-of-governance-actions"},"Common aspects of all types of governance actions"),(0,o.kt)("p",null,"A proposal is the process of putting together all the information required to submit a governance action to the chain. A proposal consists of:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"A deposit"),(0,o.kt)("li",{parentName:"ul"},"The reward account that will receive the deposit return"),(0,o.kt)("li",{parentName:"ul"},"The governance action"),(0,o.kt)("li",{parentName:"ul"},"An anchor")),(0,o.kt)("p",null,"When using the ",(0,o.kt)("inlineCode",{parentName:"p"},"cardano-cli")," to create a governance action, you will notice that it creates a proposal."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Deposit and stake credentials")),(0,o.kt)("p",null,"Any ada holder can submit a governance action to the chain. They must provide a deposit, which will be returned when the action is finalized (whether it is ratified or has expired).\nTo facilitate this process, the proposer must specify the stake credential that will receive the refunded deposit."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Previous governance action ID")),(0,o.kt)("p",null,"To prevent unintended conflicts between governance actions of the same type, some governance actions must include the governance action ID of\nthe most recently enacted action of its respective type. Notably, this requirement does not apply to ",(0,o.kt)("strong",{parentName:"p"},"treasury withdrawal")," and ",(0,o.kt)("strong",{parentName:"p"},"info")," governance actions."),(0,o.kt)("p",null,"You can get the last enacted governance action IDs with:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway query gov-state --testnet-magic 4 | jq -r .nextRatifyState.nextEnactState.prevGovActionIds\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "Committee": {\n "govActionIx": 0,\n "txId": "fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec"\n },\n "Constitution": {\n "govActionIx": 0,\n "txId": "2bcf2a93cb840d72e6fbbad4d52419fa69a3971dee2e32fab414e32a44ecbaf7"\n },\n "HardFork": null,\n "PParamUpdate": null\n}\n')),(0,o.kt)("p",null,"Please note that both the ",(0,o.kt)("strong",{parentName:"p"},"update committee")," and ",(0,o.kt)("strong",{parentName:"p"},"motion of no confidence")," actions share the same space, referred to as 'pgaCommittee,' within the\ngovernance state. Consequently, the governance state stores a single value to represent both of these actions. The system also verifies either of these\nactions against this single stored value."),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"Anchors")),(0,o.kt)("p",null,"When proposing a governance action, the proposer may employ an ",(0,o.kt)("em",{parentName:"p"},"anchor"),", which comprises a ",(0,o.kt)("em",{parentName:"p"},"URL")," hosting a document that outlines the rationale\nfor the proposed changes, along with the document's ",(0,o.kt)("em",{parentName:"p"},"hash"),"."),(0,o.kt)("p",null,"The document at the URL can be of a free form. It's important that it should communicate to ada holders the ",(0,o.kt)("em",{parentName:"p"},"what")," and the ",(0,o.kt)("em",{parentName:"p"},"why")," of the proposal. This tutorial mostly uses '",(0,o.kt)("a",{parentName:"p",href:"https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld'"},"https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld'")," as an example, see ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/Ryun1/CIPs/blob/governance-metadata-actions/CIP-0108/test-vector.md"},"here")," for more details."),(0,o.kt)("p",null,"See ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/cardano-foundation/CIPs/tree/master/CIP-0100"},"CIP-100 | Governance Metadata")," and ",(0,o.kt)("a",{parentName:"p",href:"https://github.com/cardano-foundation/CIPs/pull/632"},"CIP-0108? | Governance Metadata - Governance Actions")," for standard.\nFollowing CIP-100, we canonize the metadata anchor first, via ",(0,o.kt)("a",{parentName:"p",href:"https://json-ld.org/playground/"},"JSON-LD playground"),", which we then hash."),(0,o.kt)("p",null,"You can use ",(0,o.kt)("inlineCode",{parentName:"p"},"cardano-cli")," to get the hash:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance hash anchor-data --file-text treasury-withdrawal.canonical\n931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5\n")),(0,o.kt)("p",null,"Alternatively, utilize b2sum to hash the document:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"b2sum -l 256 treasury-withdrawal.canonical\n931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 treasury-withdrawal.canonical\n")),(0,o.kt)("p",null,"You will need to supply the hash of the document when creating a governance action."),(0,o.kt)("h2",{id:"update-committee-actions"},"Update committee actions"),(0,o.kt)("h4",{id:"update-committee-to-add-a-new-cc-member"},"Update committee to ",(0,o.kt)("em",{parentName:"h4"},"add")," a new CC member:"),(0,o.kt)("p",null,"Assume you want to add three CC members, who have generated cold keys and have provided their key hashes:"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"ea8738081fca0726f4e781f5e55fda05f8745432a5f8a8d09eb0b34b")),(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("inlineCode",{parentName:"li"},"7f6721067362d4ae9ca73469fe983ce5572dad9028386100104b0da0"))),(0,o.kt)("p",null,"You can create a proposal to add them as new CC members with an expiration epoch (",(0,o.kt)("inlineCode",{parentName:"p"},"--epoch"),") for each of them. This is a good time to review the quorum. Let\u2019s assume that 2/3 of the committee needs to accept the proposal:"),(0,o.kt)("p",null,"Create the governance action proposal:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action update-committee \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --add-cc-cold-verification-key-hash 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de \\\n --epoch 100 \\\n --add-cc-cold-verification-key-hash ea8738081fca0726f4e781f5e55fda05f8745432a5f8a8d09eb0b34b \\\n --epoch 95 \\\n --add-cc-cold-verification-key-hash 7f6721067362d4ae9ca73469fe983ce5572dad9028386100104b0da0 \\\n --epoch 90 \\\n --threshold 2/3 \\\n --out-file update-committee.action\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Note: If there is a ",(0,o.kt)("strong",{parentName:"li"},"previously enacted")," governance action to update the committee, the proposal must also include ",(0,o.kt)("inlineCode",{parentName:"li"},"--prev-governance-action-tx-id")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"--prev-governance-action-index"),".")),(0,o.kt)("h4",{id:"update-committee-to-remove-an-existing-cc-member"},"Update committee to ",(0,o.kt)("em",{parentName:"h4"},"remove")," an existing CC member:"),(0,o.kt)("p",null,"Assume that you want to remove the CC member with the key hash ",(0,o.kt)("inlineCode",{parentName:"p"},"89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de"),". You can do this with:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action update-committee \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --remove-cc-cold-verification-key-hash 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de \\\n --threshold 1/2 \\\n --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \\\n --prev-governance-action-index 0 \\\n --out-file update-committee.action\n")),(0,o.kt)("h4",{id:"update-committee-to-only-change-the-threshold"},"Update committee to only change the ",(0,o.kt)("em",{parentName:"h4"},"threshold"),":"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action update-committee \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --threshold 60/100 \\\n --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \\\n --prev-governance-action-index 0 \\\n --out-file update-committee.action\n")),(0,o.kt)("h2",{id:"updating-the-constitution"},"Updating the constitution"),(0,o.kt)("p",null,"Should you decide to propose an update to the SanchoNet constitution, please note that all rules and principles outlined for SanchoNet should be fictional and unrelated to the actual rules on the Cardano blockchain. Quotes directly from Don Quixote\nare encouraged, as well as rules in a similar spirit that aren't directly extracted from the book. SanchoNet is not the space for serious discussions about the future governance of Cardano. For substantial conversations, please visit\nthe dedicated forum to explore the weighty matters of Cardano's constitution with the depth they deserve. ",(0,o.kt)("a",{parentName:"p",href:"https://forum.cardano.org/c/governance/constitution/212"},"Cardano Forum")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Find the last enacted governance action of this type:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution'\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "govActionIx": 0,\n "txId": "00caeb6c2db4575acc43be3e8f87b881dccb86283daf16aa2707275cbe7f3451"\n}\n')),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Write a constitution update and save it to ",(0,o.kt)("inlineCode",{parentName:"li"},"constitution.txt")),(0,o.kt)("li",{parentName:"ul"},"Upload the ",(0,o.kt)("inlineCode",{parentName:"li"},"constitution.txt")," file to a URL so that everyone can read it, for example, ",(0,o.kt)("a",{parentName:"li",href:"https://tinyurl.com/mr3ferf9"},"https://tinyurl.com/mr3ferf9")),(0,o.kt)("li",{parentName:"ul"},"Check the hash of the ",(0,o.kt)("inlineCode",{parentName:"li"},"constitution.txt")," file using ",(0,o.kt)("a",{parentName:"li",href:"https://man7.org/linux/man-pages/man1/b2sum.1.html"},"b2sum"),".")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"wget https://tinyurl.com/mr3ferf9 -O constitution.txt\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance hash anchor-data --file-text constitution.txt\n5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d\n")),(0,o.kt)("p",null,"or"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"b2sum -l 256 constitution.txt\n5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d constitution.txt\n")),(0,o.kt)("h4",{id:"create-the-proposal-to-update-the-constitution"},"Create the proposal to update the constitution:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},'cardano-cli conway governance action create-constitution \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r \'.currentPParams.govActionDeposit\') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash "931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5" \\\n --constitution-url https://tinyurl.com/mr3ferf9 \\\n --constitution-hash "5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d" \\\n --prev-governance-action-tx-id "00caeb6c2db4575acc43be3e8f87b881dccb86283daf16aa2707275cbe7f3451" \\\n --prev-governance-action-index 0 \\\n --out-file constitution.action\n')),(0,o.kt)("h2",{id:"motion-of-no-confidence"},"Motion of no confidence"),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Find the last governance action enacted of this type:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Committee'\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "govActionIx": 0,\n "txId": "fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec"\n}\n')),(0,o.kt)("h4",{id:"create-a-no-confidence-governance-action"},"Create a no-confidence governance action:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action create-no-confidence \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \\\n --prev-governance-action-index 0 \\\n --out-file no-confidence.action\n")),(0,o.kt)("h2",{id:"treasury-withdrawal"},"Treasury withdrawal"),(0,o.kt)("p",null,"In addition to the stake credential required to obtain a deposit refund, the proposer must also furnish stake credentials for receiving funds from the treasury in the\nevent that the governance action is approved."),(0,o.kt)("h4",{id:"create-the-treasury-withdrawal-proposal"},"Create the treasury withdrawal proposal:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action create-treasury-withdrawal \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --funds-receiving-stake-verification-key-file stake.vkey \\\n --transfer 50000000000 \\\n --out-file treasury.action\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Note that you do not need to provide any previous governance action ID on treasury withdrawals.")),(0,o.kt)("h2",{id:"info"},"Info"),(0,o.kt)("h4",{id:"create-the-info-governance-action"},"Create the 'info' governance action:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action create-info --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://tinyurl.com/yc74fxx4 \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --out-file info.action\n")),(0,o.kt)("h2",{id:"update-protocol-parameters-to-change-the---key-reg-deposit-amt"},"Update protocol parameters to change the ",(0,o.kt)("inlineCode",{parentName:"h2"},"--key-reg-deposit-amt")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway governance action create-protocol-parameters-update \\\n --testnet \\\n --governance-action-deposit $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.currentPParams.govActionDeposit') \\\n --deposit-return-stake-verification-key-file stake.vkey \\\n --anchor-url https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld \\\n --anchor-data-hash 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \\\n --key-reg-deposit-amt 1000000 \\\n --out-file pp-update.action\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Note: If there is a ",(0,o.kt)("strong",{parentName:"li"},"previously enacted")," governance action to update the protocol parameters, the proposal must also include ",(0,o.kt)("inlineCode",{parentName:"li"},"--prev-governance-action-tx-id")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"--prev-governance-action-index"),".")),(0,o.kt)("h2",{id:"submitting-the-action-action-file-in-a-transaction"},"Submitting the ",(0,o.kt)("inlineCode",{parentName:"h2"},"*.action")," action file in a transaction"),(0,o.kt)("p",null,"Submitting the ",(0,o.kt)("inlineCode",{parentName:"p"},"*.action")," file to the blockchain is the essential step in bringing your proposal to life and making it accessible for the community to participate in the\nvoting process. This process essentially transforms your proposal from a conceptual idea into an actionable item. Once submitted, it becomes part of the public ledger,\nwhile also allowing members of the governance bodies to review, discuss, and ultimately cast their votes on its approval or rejection."),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Note that you can also use ",(0,o.kt)("inlineCode",{parentName:"li"},"build-raw")," and ",(0,o.kt)("inlineCode",{parentName:"li"},"calculate-min-fee")," to build transactions in an off-line settting. The example below uses the convenient ",(0,o.kt)("inlineCode",{parentName:"li"},"build"),":")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},'cardano-cli conway transaction build \\\n --testnet-magic 4 \\\n --witness-override 2 \\\n --tx-in "$(cardano-cli query utxo --address "$(cat payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r \'keys[0]\')" \\\n --change-address $(cat payment.addr) \\\n --proposal-file info.action \\\n --out-file tx.raw\n')),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway transaction sign \\\n --testnet-magic 4 \\\n --tx-body-file tx.raw \\\n --signing-key-file payment.skey \\\n --signing-key-file stake.skey \\\n --out-file tx.signed\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway transaction submit \\\n --testnet-magic 4 \\\n --tx-file tx.signed\n")),(0,o.kt)("h2",{id:"finding-the-governance-action-id-of-your-proposal"},"Finding the governance action ID of your proposal"),(0,o.kt)("p",null,"You may want to find your governance action ID to share it with others on Discord1 and seek their support. The transaction ID and the index of the transaction that submitted the\nproposal serve as the action ID. An effective way to find your governance action ID is by querying the governance state and filtering by (the proposer) stake key hash."),(0,o.kt)("p",null,"First, find your key hash with:"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway stake-address key-hash --stake-verification-key-file stake.vkey\n")),(0,o.kt)("p",null,(0,o.kt)("inlineCode",{parentName:"p"},"8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b")),(0,o.kt)("p",null,"Use ",(0,o.kt)("inlineCode",{parentName:"p"},"jq")," to filter the ",(0,o.kt)("inlineCode",{parentName:"p"},"gov-state")," output by the stake key hash. The output contains all the relevant information about your governance actions, including ",(0,o.kt)("inlineCode",{parentName:"p"},"actionId"),":"),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-bash"},"cardano-cli conway query gov-state --testnet-magic 4 \\\n| jq -r --arg keyHash \"8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b\" '.proposals | to_entries[] | select(.value.returnAddr.credential.keyHash | contains($keyHash)) | .value'\n")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre",className:"language-json"},'{\n "action": {\n "contents": [\n [\n {\n "credential": {\n "keyHash": "7249a71391f08399f06b492eae7892a33191699625cff50b7dee55c6"\n },\n "network": "Testnet"\n },\n 20388738581\n ]\n ],\n "tag": "TreasuryWithdrawals"\n },\n "actionId": {\n "govActionIx": 0,\n "txId": "4fcd92abf2ce3d6796c5fae51ea83d563ca8611359c9624fd1cecd7fa1ce71cc"\n },\n "committeeVotes": {\n "keyHash-23e05ad2b71317a6348ce4b68dae37aa1c0e545cdea740b23c21742e": "VoteNo",\n "keyHash-540bedcd4bdcbf523e899c3ef43f2b96ecec4f6303af58d15a413ed1": "VoteYes",\n "keyHash-6c1d098a366f2274651943a7f778b3b5459c129f0407a0db2902253a": "VoteYes"\n },\n "dRepVotes": {\n "keyHash-13797df5308dfebf2348fa58b312a177cf97939f5f7d21168e1a54db": "VoteYes",\n "keyHash-9853551d8b99884f51608822e012bbf0d444eb7bea2807ee664f1241": "Abstain",\n "keyHash-cf09b59e134fa14e48da39b552c02299a054d7c8b895b3d827453672": "VoteNo"\n },\n "deposit": 1000000000,\n "expiresAfter": 34,\n "proposedIn": 33,\n "returnAddr": {\n "credential": {\n "keyHash": "8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b"\n },\n "network": "Testnet"\n },\n "stakePoolVotes": {}\n}\n')))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/assets/js/6fddf1e9.6db8b142.js b/assets/js/6fddf1e9.6c8156a1.js similarity index 60% rename from assets/js/6fddf1e9.6db8b142.js rename to assets/js/6fddf1e9.6c8156a1.js index d10941d9..43cb6ebf 100644 --- a/assets/js/6fddf1e9.6db8b142.js +++ b/assets/js/6fddf1e9.6c8156a1.js @@ -1 +1 @@ -"use strict";(self.webpackChunksanchonet=self.webpackChunksanchonet||[]).push([[589],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>g});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),k=o,g=d["".concat(s,".").concat(k)]||d[k]||u[k]||r;return n?a.createElement(g,i(i({ref:t},p),{},{components:n})):a.createElement(g,i({ref:t},p))}));function g(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=k;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var a=n(7462),o=(n(7294),n(3905));const r={sidebar_label:"Register a stake pool",title:"Register a stake pool",sidebar_position:5,slug:"/tutorials/stake-pool-registration"},i=void 0,l={unversionedId:"tutorials/register-spo",id:"tutorials/register-spo",title:"Register a stake pool",description:"WARNING: This tutorial is simplified and deliberately excludes secure key handling which is essential for other testnets and mainnet. For a comprehensive tutorial, see the Cardano course where you can access video lessons and a more detailed instruction handbook.",source:"@site/docs/tutorials/register-spo.mdx",sourceDirName:"tutorials",slug:"/tutorials/stake-pool-registration",permalink:"/tutorials/stake-pool-registration",draft:!1,editUrl:"https://github.com/input-output-hk/sanchonet/tree/master/docs/tutorials/register-spo.mdx",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_label:"Register a stake pool",title:"Register a stake pool",sidebar_position:5,slug:"/tutorials/stake-pool-registration"},sidebar:"docsSidebar",previous:{title:"Stake address registration",permalink:"/tutorials/register-stake-address"},next:{title:"Register a DRep",permalink:"/tutorials/drep-registration"}},s={},c=[{value:"Prerequisites",id:"prerequisites",level:3},{value:"Set up a relay node",id:"set-up-a-relay-node",level:3},{value:"Set up a block producer",id:"set-up-a-block-producer",level:3},{value:"Install jq and set the node socket path",id:"install-jq-and-set-the-node-socket-path",level:3},{value:"Register the stake address",id:"register-the-stake-address",level:3},{value:"Generate keys for the stake pool",id:"generate-keys-for-the-stake-pool",level:3},{value:"Generate the registration and delegation certificates for the pool",id:"generate-the-registration-and-delegation-certificates-for-the-pool",level:3},{value:"Submit the certificates in a transaction",id:"submit-the-certificates-in-a-transaction",level:3},{value:"Starting the node as a block-producer",id:"starting-the-node-as-a-block-producer",level:3}],p={toc:c},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"WARNING"),": This tutorial is simplified and deliberately excludes secure key handling which is essential for other testnets and mainnet. For a comprehensive tutorial, see the ",(0,o.kt)("a",{parentName:"p",href:"https://cardano-course.gitbook.io/cardano-course/"},"Cardano course")," where you can access video lessons and a more detailed instruction handbook."),(0,o.kt)("h3",{id:"prerequisites"},"Prerequisites"),(0,o.kt)("p",null,"Before you start, ensure that you have:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"A running node: ",(0,o.kt)("a",{parentName:"li",href:"/tutorials/start-node"},"see the tutorial")),(0,o.kt)("li",{parentName:"ol"},"Created keys and addresses: ",(0,o.kt)("a",{parentName:"li",href:"/tutorials/address"},"see the tutorial")),(0,o.kt)("li",{parentName:"ol"},"Requested funds from the ",(0,o.kt)("a",{parentName:"li",href:"/faucet"},"faucet"))),(0,o.kt)("h3",{id:"set-up-a-relay-node"},"Set up a relay node"),(0,o.kt)("p",null,"Setting up a stake pool on SanchoNet involves configuring a block producer node and at least one relay node. The relay node plays a crucial role in propagating the blocks forged by your block-producing node, as well as fetching blocks from other stake pools and serving them to your block producer. In this structure, the block producer communicates solely with your relay node, which in turn interfaces with the rest of the network. This ensures a streamlined communication process and helps to secure your block producer."),(0,o.kt)("p",null,"The typical configuration of the stake pool should resemble the following:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"diagram",src:n(5043).Z,width:"750",height:"366"})),(0,o.kt)("p",null,"To set up your relay node, carry out the following steps:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Install the Cardano node and the Cardano CLI")," on your relay node.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Configure the firewall for incoming connections"),": set up the firewall to accept incoming connections on the specific port that you'll be using for the Cardano node. This allows other nodes, including your block producer, to communicate with your relay.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Configure the firewall for outgoing connections"),": enable the firewall to allow outgoing connections. This configuration ensures that your relay node can contact other relay nodes in the network as well as your block producer node.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Run the node with P2P topology"),": start your node using the P2P topology setting."))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'{\n "localRoots":[\n {\n "accessPoints":[],\n "advertise":false,\n "valency":2\n }\n ],\n "publicRoots":[\n {\n "accessPoints":[\n {\n "address":"sanchonet-node.world.dev.cardano.org",\n "port":30004\n }\n ],\n "advertise":false\n }\n ],\n "useLedgerAfterSlot":1000000\n}\n')),(0,o.kt)("h3",{id:"set-up-a-block-producer"},"Set up a block producer"),(0,o.kt)("p",null,"Setting up your block producer involves similar steps, but there are a few differences in the configuration:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Install the Cardano node and the Cardano CLI")," on your block producer node.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Configure the firewall for incoming connections"),": set up the firewall to accept incoming connections ",(0,o.kt)("strong",{parentName:"p"},"only from your relay node")," on the\nspecific port that you'll be using for the Cardano node. This ensures that only your relay node can communicate with your block producer.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Configure the firewall for outgoing connections"),": enable the firewall to allow outgoing connections, preferably, ",(0,o.kt)("strong",{parentName:"p"},"only to your own relay's IP and port"),".")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Run the node with P2P topology"),": start your node using the P2P topology configuration. This time, replace ",(0,o.kt)("strong",{parentName:"p"},'"address":"x.x.x.x"')," and ",(0,o.kt)("strong",{parentName:"p"},'"port":3000')," with the actual IP address\nand the port of your ",(0,o.kt)("strong",{parentName:"p"},"own relay node"),". Note that the block producer does not connect to ",(0,o.kt)("inlineCode",{parentName:"p"},"sanchonet-node.world.dev.cardano.org")," and we avoid using ledger peers by setting ",(0,o.kt)("inlineCode",{parentName:"p"},'"useLedgerAfterSlot\xa8'),"to ",(0,o.kt)("inlineCode",{parentName:"p"},"-1")))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'{\n "localRoots":[\n {\n "accessPoints":[\n {\n "address":"x.x.x.x",\n "port":3000\n }\n ],\n "advertise":false,\n "valency":2\n }\n ],\n "publicRoots":[\n {\n "accessPoints":[\n ],\n "advertise":false\n }\n ],\n "useLedgerAfterSlot":-1\n}\n')),(0,o.kt)("h3",{id:"install-jq-and-set-the-node-socket-path"},"Install jq and set the node socket path"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Install ",(0,o.kt)("a",{parentName:"li",href:"https://jqlang.github.io/jq"},"jq"),", a tool that will assist in parsing the UTXOs for transactions:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"sudo apt-get install jq -y\n")),(0,o.kt)("ol",{start:2},(0,o.kt)("li",{parentName:"ol"},"Set the ",(0,o.kt)("inlineCode",{parentName:"li"},"CARDANO_NODE_SOCKET_PATH")," variable to the path of ",(0,o.kt)("inlineCode",{parentName:"li"},"node.socket")," that you identified when starting the node:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"export CARDANO_NODE_SOCKET_PATH=~/node.socket\n")),(0,o.kt)("h3",{id:"register-the-stake-address"},"Register the stake address"),(0,o.kt)("ol",{start:3},(0,o.kt)("li",{parentName:"ol"},"Register the stake address you previously created by generating a registration certificate:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway stake-address registration-certificate \\\n--stake-verification-key-file stake.vkey \\\n--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.curPParams.keyDeposit) \\\n--out-file registration.cert\n")),(0,o.kt)("ol",{start:4},(0,o.kt)("li",{parentName:"ol"},"Create a transaction to submit the stake key registration certificate to the chain. Creating a transaction using the CLI always involves a three-step process: BUILDING, SIGNING, AND SUBMITTING the transaction.")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Build")," the transaction:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction build \\\n--testnet-magic 4 \\\n--witness-override 2 \\\n--tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \\\n--change-address $(cat payment.addr) \\\n--certificate-file registration.cert \\\n--out-file tx.raw\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Sign")," the transaction:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction sign \\\n--tx-body-file tx.raw \\\n--signing-key-file payment.skey \\\n--signing-key-file stake.skey \\\n--testnet-magic 4 \\\n--out-file tx.signed\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Submit")," the transaction:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction submit \\\n--testnet-magic 4 \\\n--tx-file tx.signed\n")),(0,o.kt)("h3",{id:"generate-keys-for-the-stake-pool"},"Generate keys for the stake pool"),(0,o.kt)("ol",{start:5},(0,o.kt)("li",{parentName:"ol"},"Generate cold keys and the operational certificate for your pool:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway node key-gen \\\n--cold-verification-key-file cold.vkey \\\n--cold-signing-key-file cold.skey \\\n--operational-certificate-issue-counter-file opcert.counter\n")),(0,o.kt)("ol",{start:6},(0,o.kt)("li",{parentName:"ol"},"Generate the key-evolving-signature (KES) keys:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway node key-gen-KES \\\n--verification-key-file kes.vkey \\\n--signing-key-file kes.skey\n")),(0,o.kt)("ol",{start:7},(0,o.kt)("li",{parentName:"ol"},"Generate VRF keys:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway node key-gen-VRF \\\n--verification-key-file vrf.vkey \\\n--signing-key-file vrf.skey\n")),(0,o.kt)("h3",{id:"generate-the-registration-and-delegation-certificates-for-the-pool"},"Generate the registration and delegation certificates for the pool"),(0,o.kt)("ol",{start:8},(0,o.kt)("li",{parentName:"ol"},"Create your stake pool registration certificate:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway stake-pool registration-certificate \\\n--cold-verification-key-file cold.vkey \\\n--vrf-verification-key-file vrf.vkey \\\n--pool-pledge 9000000000 \\\n--pool-cost 340000000 \\\n--pool-margin 0.05 \\\n--pool-reward-account-verification-key-file stake.vkey \\\n--pool-owner-stake-verification-key-file stake.vkey \\\n--testnet-magic 4 \\\n--pool-relay-ipv4 \\\n--pool-relay-port \\\n--out-file pool-registration.cert\n")),(0,o.kt)("ol",{start:9},(0,o.kt)("li",{parentName:"ol"},"Create a stake delegation certificate:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway stake-address stake-delegation-certificate \\\n--stake-verification-key-file stake.vkey \\\n--cold-verification-key-file cold.vkey \\\n--out-file delegation.cert\n")),(0,o.kt)("h3",{id:"submit-the-certificates-in-a-transaction"},"Submit the certificates in a transaction"),(0,o.kt)("ol",{start:10},(0,o.kt)("li",{parentName:"ol"},"Build, sign and submit the transaction")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Build:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction build \\\n--testnet-magic 4 \\\n--witness-override 3 \\\n--tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \\\n--change-address $(cat payment.addr) \\\n--certificate-file pool-registration.cert \\\n--certificate-file delegation.cert \\\n--out-file tx.raw\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Sign:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction sign \\\n--tx-body-file tx.raw \\\n--signing-key-file payment.skey \\\n--signing-key-file cold.skey \\\n--signing-key-file stake.skey \\\n--testnet-magic 4 \\\n--out-file tx.signed\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Submit:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction submit \\\n--testnet-magic 4 \\\n--tx-file tx.signed\n")),(0,o.kt)("ol",{start:11},(0,o.kt)("li",{parentName:"ol"},"Get your pool ID, you will need to get a delegation from the faucet:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway stake-pool id \\\n--cold-verification-key-file cold.vkey \\\n--output-format bech32 \\\n--out-file pool.id\n")),(0,o.kt)("h3",{id:"starting-the-node-as-a-block-producer"},"Starting the node as a block-producer"),(0,o.kt)("ol",{start:12},(0,o.kt)("li",{parentName:"ol"},"Generate your operational certificate:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"slotsPerKESPeriod=$(cat shelley-genesis.json | jq -r '.slotsPerKESPeriod')\nslotNo=$(cardano-cli query tip --testnet-magic 4 | jq -r '.slot')\nkesPeriod=$((${slotNo} / ${slotsPerKESPeriod}))\ncardano-cli conway node issue-op-cert --kes-verification-key-file kes.vkey --cold-signing-key-file cold.skey --operational-certificate-issue-counter-file opcert.counter --kes-period ${kesPeriod} --out-file opcert.cert\n")),(0,o.kt)("ol",{start:13},(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Request a stake delegation from the ",(0,o.kt)("a",{parentName:"p",href:"/faucet"},"faucet"),". Note that although the delegation will ocurr immediately, you will need two more epochs\nfor your Block producer to start creating blocks. This due to the stake snashopt mechanism.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Restart your node using your pool credentials:"))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-node run --topology topology.json \\\n--database-path db \\\n--socket-path node.socket \\\n--shelley-kes-key kes.skey \\\n--shelley-vrf-key vrf.skey \\\n--shelley-operational-certificate opcert.cert \\\n--port 3001 \\\n--config config.json\n")),(0,o.kt)("ol",{start:15},(0,o.kt)("li",{parentName:"ol"},"Your stake pool will take part of the stake snapshot on the next epoch boundary. After that, you will be able to query the stake delegated to your pool:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway query stake-snapshot \\\n--testnet-magic 4 \\\n--stake-pool-id \n")),(0,o.kt)("ol",{start:16},(0,o.kt)("li",{parentName:"ol"},"After two epochs (2 days in SanchoNet) your stake pool should start producing blocks, the easiest way to verify it is to ",(0,o.kt)("inlineCode",{parentName:"li"},"grep")," your node logs")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"grep -e TraceForgedBlock\n")))}u.isMDXComponent=!0},5043:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/bpandrelay-3ee2a947193e9d780be6e81d068c14b7.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunksanchonet=self.webpackChunksanchonet||[]).push([[589],{3905:(e,t,n)=>{n.d(t,{Zo:()=>p,kt:()=>g});var a=n(7294);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function i(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=a.createContext({}),c=function(e){var t=a.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):i(i({},t),e)),n},p=function(e){var t=c(e.components);return a.createElement(s.Provider,{value:t},e.children)},d="mdxType",u={inlineCode:"code",wrapper:function(e){var t=e.children;return a.createElement(a.Fragment,{},t)}},k=a.forwardRef((function(e,t){var n=e.components,o=e.mdxType,r=e.originalType,s=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),d=c(n),k=o,g=d["".concat(s,".").concat(k)]||d[k]||u[k]||r;return n?a.createElement(g,i(i({ref:t},p),{},{components:n})):a.createElement(g,i({ref:t},p))}));function g(e,t){var n=arguments,o=t&&t.mdxType;if("string"==typeof e||o){var r=n.length,i=new Array(r);i[0]=k;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[d]="string"==typeof e?e:o,i[1]=l;for(var c=2;c{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var a=n(7462),o=(n(7294),n(3905));const r={sidebar_label:"Register a stake pool",title:"Register a stake pool",sidebar_position:5,slug:"/tutorials/stake-pool-registration"},i=void 0,l={unversionedId:"tutorials/register-spo",id:"tutorials/register-spo",title:"Register a stake pool",description:"WARNING: This tutorial is simplified and deliberately excludes secure key handling which is essential for other testnets and mainnet. For a comprehensive tutorial, see the Cardano course where you can access video lessons and a more detailed instruction handbook.",source:"@site/docs/tutorials/register-spo.mdx",sourceDirName:"tutorials",slug:"/tutorials/stake-pool-registration",permalink:"/tutorials/stake-pool-registration",draft:!1,editUrl:"https://github.com/input-output-hk/sanchonet/tree/master/docs/tutorials/register-spo.mdx",tags:[],version:"current",sidebarPosition:5,frontMatter:{sidebar_label:"Register a stake pool",title:"Register a stake pool",sidebar_position:5,slug:"/tutorials/stake-pool-registration"},sidebar:"docsSidebar",previous:{title:"Stake address registration",permalink:"/tutorials/register-stake-address"},next:{title:"Register a DRep",permalink:"/tutorials/drep-registration"}},s={},c=[{value:"Prerequisites",id:"prerequisites",level:3},{value:"Set up a relay node",id:"set-up-a-relay-node",level:3},{value:"Set up a block producer",id:"set-up-a-block-producer",level:3},{value:"Install jq and set the node socket path",id:"install-jq-and-set-the-node-socket-path",level:3},{value:"Register the stake address",id:"register-the-stake-address",level:3},{value:"Generate keys for the stake pool",id:"generate-keys-for-the-stake-pool",level:3},{value:"Generate the registration and delegation certificates for the pool",id:"generate-the-registration-and-delegation-certificates-for-the-pool",level:3},{value:"Submit the certificates in a transaction",id:"submit-the-certificates-in-a-transaction",level:3},{value:"Starting the node as a block-producer",id:"starting-the-node-as-a-block-producer",level:3}],p={toc:c},d="wrapper";function u(e){let{components:t,...r}=e;return(0,o.kt)(d,(0,a.Z)({},p,r,{components:t,mdxType:"MDXLayout"}),(0,o.kt)("p",null,(0,o.kt)("strong",{parentName:"p"},"WARNING"),": This tutorial is simplified and deliberately excludes secure key handling which is essential for other testnets and mainnet. For a comprehensive tutorial, see the ",(0,o.kt)("a",{parentName:"p",href:"https://cardano-course.gitbook.io/cardano-course/"},"Cardano course")," where you can access video lessons and a more detailed instruction handbook."),(0,o.kt)("h3",{id:"prerequisites"},"Prerequisites"),(0,o.kt)("p",null,"Before you start, ensure that you have:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"A running node: ",(0,o.kt)("a",{parentName:"li",href:"/tutorials/start-node"},"see the tutorial")),(0,o.kt)("li",{parentName:"ol"},"Created keys and addresses: ",(0,o.kt)("a",{parentName:"li",href:"/tutorials/address"},"see the tutorial")),(0,o.kt)("li",{parentName:"ol"},"Requested funds from the ",(0,o.kt)("a",{parentName:"li",href:"/faucet"},"faucet"))),(0,o.kt)("h3",{id:"set-up-a-relay-node"},"Set up a relay node"),(0,o.kt)("p",null,"Setting up a stake pool on SanchoNet involves configuring a block producer node and at least one relay node. The relay node plays a crucial role in propagating the blocks forged by your block-producing node, as well as fetching blocks from other stake pools and serving them to your block producer. In this structure, the block producer communicates solely with your relay node, which in turn interfaces with the rest of the network. This ensures a streamlined communication process and helps to secure your block producer."),(0,o.kt)("p",null,"The typical configuration of the stake pool should resemble the following:"),(0,o.kt)("p",null,(0,o.kt)("img",{alt:"diagram",src:n(5043).Z,width:"750",height:"366"})),(0,o.kt)("p",null,"To set up your relay node, carry out the following steps:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Install the Cardano node and the Cardano CLI")," on your relay node.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Configure the firewall for incoming connections"),": set up the firewall to accept incoming connections on the specific port that you'll be using for the Cardano node. This allows other nodes, including your block producer, to communicate with your relay.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Configure the firewall for outgoing connections"),": enable the firewall to allow outgoing connections. This configuration ensures that your relay node can contact other relay nodes in the network as well as your block producer node.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Run the node with P2P topology"),": start your node using the P2P topology setting."))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'{\n "localRoots":[\n {\n "accessPoints":[],\n "advertise":false,\n "valency":2\n }\n ],\n "publicRoots":[\n {\n "accessPoints":[\n {\n "address":"sanchonet-node.world.dev.cardano.org",\n "port":30004\n }\n ],\n "advertise":false\n }\n ],\n "useLedgerAfterSlot":1000000\n}\n')),(0,o.kt)("h3",{id:"set-up-a-block-producer"},"Set up a block producer"),(0,o.kt)("p",null,"Setting up your block producer involves similar steps, but there are a few differences in the configuration:"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Install the Cardano node and the Cardano CLI")," on your block producer node.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Configure the firewall for incoming connections"),": set up the firewall to accept incoming connections ",(0,o.kt)("strong",{parentName:"p"},"only from your relay node")," on the\nspecific port that you'll be using for the Cardano node. This ensures that only your relay node can communicate with your block producer.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Configure the firewall for outgoing connections"),": enable the firewall to allow outgoing connections, preferably, ",(0,o.kt)("strong",{parentName:"p"},"only to your own relay's IP and port"),".")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},(0,o.kt)("strong",{parentName:"p"},"Run the node with P2P topology"),": start your node using the P2P topology configuration. This time, replace ",(0,o.kt)("strong",{parentName:"p"},'"address":"x.x.x.x"')," and ",(0,o.kt)("strong",{parentName:"p"},'"port":3000')," with the actual IP address\nand the port of your ",(0,o.kt)("strong",{parentName:"p"},"own relay node"),". Note that the block producer does not connect to ",(0,o.kt)("inlineCode",{parentName:"p"},"sanchonet-node.world.dev.cardano.org")," and we avoid using ledger peers by setting ",(0,o.kt)("inlineCode",{parentName:"p"},'"useLedgerAfterSlot\xa8'),"to ",(0,o.kt)("inlineCode",{parentName:"p"},"-1")))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},'{\n "localRoots":[\n {\n "accessPoints":[\n {\n "address":"x.x.x.x",\n "port":3000\n }\n ],\n "advertise":false,\n "valency":2\n }\n ],\n "publicRoots":[\n {\n "accessPoints":[\n ],\n "advertise":false\n }\n ],\n "useLedgerAfterSlot":-1\n}\n')),(0,o.kt)("h3",{id:"install-jq-and-set-the-node-socket-path"},"Install jq and set the node socket path"),(0,o.kt)("ol",null,(0,o.kt)("li",{parentName:"ol"},"Install ",(0,o.kt)("a",{parentName:"li",href:"https://jqlang.github.io/jq"},"jq"),", a tool that will assist in parsing the UTXOs for transactions:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"sudo apt-get install jq -y\n")),(0,o.kt)("ol",{start:2},(0,o.kt)("li",{parentName:"ol"},"Set the ",(0,o.kt)("inlineCode",{parentName:"li"},"CARDANO_NODE_SOCKET_PATH")," variable to the path of ",(0,o.kt)("inlineCode",{parentName:"li"},"node.socket")," that you identified when starting the node:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"export CARDANO_NODE_SOCKET_PATH=~/node.socket\n")),(0,o.kt)("h3",{id:"register-the-stake-address"},"Register the stake address"),(0,o.kt)("ol",{start:3},(0,o.kt)("li",{parentName:"ol"},"Register the stake address you previously created by generating a registration certificate:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway stake-address registration-certificate \\\n--stake-verification-key-file stake.vkey \\\n--key-reg-deposit-amt $(cardano-cli conway query gov-state --testnet-magic 4 | jq .currentPParams.stakeAddressDeposit) \\\n--out-file registration.cert\n")),(0,o.kt)("ol",{start:4},(0,o.kt)("li",{parentName:"ol"},"Create a transaction to submit the stake key registration certificate to the chain. Creating a transaction using the CLI always involves a three-step process: BUILDING, SIGNING, AND SUBMITTING the transaction.")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Build")," the transaction:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction build \\\n--testnet-magic 4 \\\n--witness-override 2 \\\n--tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \\\n--change-address $(cat payment.addr) \\\n--certificate-file registration.cert \\\n--out-file tx.raw\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Sign")," the transaction:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction sign \\\n--tx-body-file tx.raw \\\n--signing-key-file payment.skey \\\n--signing-key-file stake.skey \\\n--testnet-magic 4 \\\n--out-file tx.signed\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},(0,o.kt)("strong",{parentName:"li"},"Submit")," the transaction:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction submit \\\n--testnet-magic 4 \\\n--tx-file tx.signed\n")),(0,o.kt)("h3",{id:"generate-keys-for-the-stake-pool"},"Generate keys for the stake pool"),(0,o.kt)("ol",{start:5},(0,o.kt)("li",{parentName:"ol"},"Generate cold keys and the operational certificate for your pool:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway node key-gen \\\n--cold-verification-key-file cold.vkey \\\n--cold-signing-key-file cold.skey \\\n--operational-certificate-issue-counter-file opcert.counter\n")),(0,o.kt)("ol",{start:6},(0,o.kt)("li",{parentName:"ol"},"Generate the key-evolving-signature (KES) keys:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway node key-gen-KES \\\n--verification-key-file kes.vkey \\\n--signing-key-file kes.skey\n")),(0,o.kt)("ol",{start:7},(0,o.kt)("li",{parentName:"ol"},"Generate VRF keys:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway node key-gen-VRF \\\n--verification-key-file vrf.vkey \\\n--signing-key-file vrf.skey\n")),(0,o.kt)("h3",{id:"generate-the-registration-and-delegation-certificates-for-the-pool"},"Generate the registration and delegation certificates for the pool"),(0,o.kt)("ol",{start:8},(0,o.kt)("li",{parentName:"ol"},"Create your stake pool registration certificate:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway stake-pool registration-certificate \\\n--cold-verification-key-file cold.vkey \\\n--vrf-verification-key-file vrf.vkey \\\n--pool-pledge 9000000000 \\\n--pool-cost 340000000 \\\n--pool-margin 0.05 \\\n--pool-reward-account-verification-key-file stake.vkey \\\n--pool-owner-stake-verification-key-file stake.vkey \\\n--testnet-magic 4 \\\n--pool-relay-ipv4 \\\n--pool-relay-port \\\n--out-file pool-registration.cert\n")),(0,o.kt)("ol",{start:9},(0,o.kt)("li",{parentName:"ol"},"Create a stake delegation certificate:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway stake-address stake-delegation-certificate \\\n--stake-verification-key-file stake.vkey \\\n--cold-verification-key-file cold.vkey \\\n--out-file delegation.cert\n")),(0,o.kt)("h3",{id:"submit-the-certificates-in-a-transaction"},"Submit the certificates in a transaction"),(0,o.kt)("ol",{start:10},(0,o.kt)("li",{parentName:"ol"},"Build, sign and submit the transaction")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Build:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction build \\\n--testnet-magic 4 \\\n--witness-override 3 \\\n--tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \\\n--change-address $(cat payment.addr) \\\n--certificate-file pool-registration.cert \\\n--certificate-file delegation.cert \\\n--out-file tx.raw\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Sign:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction sign \\\n--tx-body-file tx.raw \\\n--signing-key-file payment.skey \\\n--signing-key-file cold.skey \\\n--signing-key-file stake.skey \\\n--testnet-magic 4 \\\n--out-file tx.signed\n")),(0,o.kt)("ul",null,(0,o.kt)("li",{parentName:"ul"},"Submit:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway transaction submit \\\n--testnet-magic 4 \\\n--tx-file tx.signed\n")),(0,o.kt)("ol",{start:11},(0,o.kt)("li",{parentName:"ol"},"Get your pool ID, you will need to get a delegation from the faucet:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway stake-pool id \\\n--cold-verification-key-file cold.vkey \\\n--output-format bech32 \\\n--out-file pool.id\n")),(0,o.kt)("h3",{id:"starting-the-node-as-a-block-producer"},"Starting the node as a block-producer"),(0,o.kt)("ol",{start:12},(0,o.kt)("li",{parentName:"ol"},"Generate your operational certificate:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"slotsPerKESPeriod=$(cat shelley-genesis.json | jq -r '.slotsPerKESPeriod')\nslotNo=$(cardano-cli query tip --testnet-magic 4 | jq -r '.slot')\nkesPeriod=$((${slotNo} / ${slotsPerKESPeriod}))\ncardano-cli conway node issue-op-cert --kes-verification-key-file kes.vkey --cold-signing-key-file cold.skey --operational-certificate-issue-counter-file opcert.counter --kes-period ${kesPeriod} --out-file opcert.cert\n")),(0,o.kt)("ol",{start:13},(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Request a stake delegation from the ",(0,o.kt)("a",{parentName:"p",href:"/faucet"},"faucet"),". Note that although the delegation will ocurr immediately, you will need two more epochs\nfor your Block producer to start creating blocks. This due to the stake snashopt mechanism.")),(0,o.kt)("li",{parentName:"ol"},(0,o.kt)("p",{parentName:"li"},"Restart your node using your pool credentials:"))),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-node run --topology topology.json \\\n--database-path db \\\n--socket-path node.socket \\\n--shelley-kes-key kes.skey \\\n--shelley-vrf-key vrf.skey \\\n--shelley-operational-certificate opcert.cert \\\n--port 3001 \\\n--config config.json\n")),(0,o.kt)("ol",{start:15},(0,o.kt)("li",{parentName:"ol"},"Your stake pool will take part of the stake snapshot on the next epoch boundary. After that, you will be able to query the stake delegated to your pool:")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"cardano-cli conway query stake-snapshot \\\n--testnet-magic 4 \\\n--stake-pool-id \n")),(0,o.kt)("ol",{start:16},(0,o.kt)("li",{parentName:"ol"},"After two epochs (2 days in SanchoNet) your stake pool should start producing blocks, the easiest way to verify it is to ",(0,o.kt)("inlineCode",{parentName:"li"},"grep")," your node logs")),(0,o.kt)("pre",null,(0,o.kt)("code",{parentName:"pre"},"grep -e TraceForgedBlock\n")))}u.isMDXComponent=!0},5043:(e,t,n)=>{n.d(t,{Z:()=>a});const a=n.p+"assets/images/bpandrelay-3ee2a947193e9d780be6e81d068c14b7.png"}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.7269040e.js b/assets/js/runtime~main.ff508ef8.js similarity index 95% rename from assets/js/runtime~main.7269040e.js rename to assets/js/runtime~main.ff508ef8.js index e229e331..f988c375 100644 --- a/assets/js/runtime~main.7269040e.js +++ b/assets/js/runtime~main.ff508ef8.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,a,r,c,f={},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return f[e].call(a.exports,a,a.exports,n),a.exports}n.m=f,e=[],n.O=(t,a,r,c)=>{if(!a){var f=1/0;for(i=0;i=c)&&Object.keys(n.O).every((e=>n.O[e](a[d])))?a.splice(d--,1):(o=!1,c0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[a,r,c]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);n.r(c);var f={};t=t||[null,a({}),a([]),a(a)];for(var o=2&r&&e;"object"==typeof o&&!~t.indexOf(o);o=a(o))Object.getOwnPropertyNames(o).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,n.d(c,f),c},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,a)=>(n.f[a](e,t),t)),[])),n.u=e=>"assets/js/"+({2:"5449755a",32:"5886ee98",53:"935f2afb",85:"1f391b9e",86:"49ac7784",113:"98762162",152:"abd7a278",161:"98e22efe",169:"6c8bebe0",173:"3838c1a1",237:"1df93b7f",242:"04a456b0",260:"4c4f17cf",263:"08d3f7f3",356:"27cf304e",398:"86c5ba96",447:"d0d6894e",462:"b0064c08",464:"a18a7492",512:"354cfeef",513:"43b2bb3c",514:"1be78505",552:"aaae1da2",589:"6fddf1e9",595:"36246993",702:"ce2e39ce",705:"038ebd0e",722:"0852ae7f",780:"6d06420b",787:"eeefc164",818:"5a0482dd",895:"c9f32de9",900:"d27e288b",913:"59f459cf",918:"17896441",945:"368b6ce8"}[e]||e)+"."+{2:"13ecf020",32:"459248fa",44:"cad7b82b",53:"eca14259",85:"526d48b7",86:"ae4672ce",113:"5de230fa",152:"585ac976",161:"45bdf6df",169:"676107d8",173:"c6427e81",237:"d1a0cbea",242:"cd78db01",260:"dc24b863",263:"f449844b",356:"aaacfe4f",398:"34093f88",447:"01ff3cab",462:"241cffd5",464:"86420488",473:"37e56536",512:"ca56f636",513:"18f28390",514:"2f395bb6",552:"70a3f81f",589:"6db8b142",595:"da0da8a3",702:"0a3adc23",705:"0313be8a",722:"825be600",780:"d1abee7c",787:"7ef07b1e",814:"d565f12f",818:"82d6d976",895:"e2d7151d",900:"5b938f7b",913:"7d903775",918:"cbc02e8f",945:"febecb6c",972:"3d5525ae",987:"6d29267a"}[e]+".js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},c="sanchonet:",n.l=(e,t,a,f)=>{if(r[e])r[e].push(t);else{var o,d;if(void 0!==a)for(var b=document.getElementsByTagName("script"),i=0;i{o.onerror=o.onload=null,clearTimeout(s);var c=r[e];if(delete r[e],o.parentNode&&o.parentNode.removeChild(o),c&&c.forEach((e=>e(a))),t)return t(a)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),d&&document.head.appendChild(o)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",n.gca=function(e){return e={17896441:"918",36246993:"595",98762162:"113","5449755a":"2","5886ee98":"32","935f2afb":"53","1f391b9e":"85","49ac7784":"86",abd7a278:"152","98e22efe":"161","6c8bebe0":"169","3838c1a1":"173","1df93b7f":"237","04a456b0":"242","4c4f17cf":"260","08d3f7f3":"263","27cf304e":"356","86c5ba96":"398",d0d6894e:"447",b0064c08:"462",a18a7492:"464","354cfeef":"512","43b2bb3c":"513","1be78505":"514",aaae1da2:"552","6fddf1e9":"589",ce2e39ce:"702","038ebd0e":"705","0852ae7f":"722","6d06420b":"780",eeefc164:"787","5a0482dd":"818",c9f32de9:"895",d27e288b:"900","59f459cf":"913","368b6ce8":"945"}[e]||e,n.p+n.u(e)},(()=>{var e={303:0,532:0};n.f.j=(t,a)=>{var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)a.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var c=new Promise(((a,c)=>r=e[t]=[a,c]));a.push(r[2]=c);var f=n.p+n.u(t),o=new Error;n.l(f,(a=>{if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var c=a&&("load"===a.type?"missing":a.type),f=a&&a.target&&a.target.src;o.message="Loading chunk "+t+" failed.\n("+c+": "+f+")",o.name="ChunkLoadError",o.type=c,o.request=f,r[1](o)}}),"chunk-"+t,t)}},n.O.j=t=>0===e[t];var t=(t,a)=>{var r,c,f=a[0],o=a[1],d=a[2],b=0;if(f.some((t=>0!==e[t]))){for(r in o)n.o(o,r)&&(n.m[r]=o[r]);if(d)var i=d(n)}for(t&&t(a);b{"use strict";var e,t,a,r,c,f={},o={};function n(e){var t=o[e];if(void 0!==t)return t.exports;var a=o[e]={exports:{}};return f[e].call(a.exports,a,a.exports,n),a.exports}n.m=f,e=[],n.O=(t,a,r,c)=>{if(!a){var f=1/0;for(i=0;i=c)&&Object.keys(n.O).every((e=>n.O[e](a[d])))?a.splice(d--,1):(o=!1,c0&&e[i-1][2]>c;i--)e[i]=e[i-1];e[i]=[a,r,c]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,n.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var c=Object.create(null);n.r(c);var f={};t=t||[null,a({}),a([]),a(a)];for(var o=2&r&&e;"object"==typeof o&&!~t.indexOf(o);o=a(o))Object.getOwnPropertyNames(o).forEach((t=>f[t]=()=>e[t]));return f.default=()=>e,n.d(c,f),c},n.d=(e,t)=>{for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,a)=>(n.f[a](e,t),t)),[])),n.u=e=>"assets/js/"+({2:"5449755a",32:"5886ee98",53:"935f2afb",85:"1f391b9e",86:"49ac7784",113:"98762162",152:"abd7a278",161:"98e22efe",169:"6c8bebe0",173:"3838c1a1",237:"1df93b7f",242:"04a456b0",260:"4c4f17cf",263:"08d3f7f3",356:"27cf304e",398:"86c5ba96",447:"d0d6894e",462:"b0064c08",464:"a18a7492",512:"354cfeef",513:"43b2bb3c",514:"1be78505",552:"aaae1da2",589:"6fddf1e9",595:"36246993",702:"ce2e39ce",705:"038ebd0e",722:"0852ae7f",780:"6d06420b",787:"eeefc164",818:"5a0482dd",895:"c9f32de9",900:"d27e288b",913:"59f459cf",918:"17896441",945:"368b6ce8"}[e]||e)+"."+{2:"13ecf020",32:"459248fa",44:"cad7b82b",53:"eca14259",85:"526d48b7",86:"ae4672ce",113:"5de230fa",152:"585ac976",161:"45bdf6df",169:"676107d8",173:"c6427e81",237:"d1a0cbea",242:"cd78db01",260:"dc24b863",263:"f449844b",356:"03a870c2",398:"34093f88",447:"01ff3cab",462:"241cffd5",464:"86420488",473:"37e56536",512:"ca56f636",513:"8ca630b8",514:"2f395bb6",552:"70a3f81f",589:"6c8156a1",595:"da0da8a3",702:"0a3adc23",705:"0313be8a",722:"825be600",780:"d1abee7c",787:"7ef07b1e",814:"d565f12f",818:"82d6d976",895:"e2d7151d",900:"5b938f7b",913:"7d903775",918:"cbc02e8f",945:"7d4b4915",972:"3d5525ae",987:"6d29267a"}[e]+".js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},c="sanchonet:",n.l=(e,t,a,f)=>{if(r[e])r[e].push(t);else{var o,d;if(void 0!==a)for(var b=document.getElementsByTagName("script"),i=0;i{o.onerror=o.onload=null,clearTimeout(s);var c=r[e];if(delete r[e],o.parentNode&&o.parentNode.removeChild(o),c&&c.forEach((e=>e(a))),t)return t(a)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),d&&document.head.appendChild(o)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",n.gca=function(e){return e={17896441:"918",36246993:"595",98762162:"113","5449755a":"2","5886ee98":"32","935f2afb":"53","1f391b9e":"85","49ac7784":"86",abd7a278:"152","98e22efe":"161","6c8bebe0":"169","3838c1a1":"173","1df93b7f":"237","04a456b0":"242","4c4f17cf":"260","08d3f7f3":"263","27cf304e":"356","86c5ba96":"398",d0d6894e:"447",b0064c08:"462",a18a7492:"464","354cfeef":"512","43b2bb3c":"513","1be78505":"514",aaae1da2:"552","6fddf1e9":"589",ce2e39ce:"702","038ebd0e":"705","0852ae7f":"722","6d06420b":"780",eeefc164:"787","5a0482dd":"818",c9f32de9:"895",d27e288b:"900","59f459cf":"913","368b6ce8":"945"}[e]||e,n.p+n.u(e)},(()=>{var e={303:0,532:0};n.f.j=(t,a)=>{var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)a.push(r[2]);else if(/^(303|532)$/.test(t))e[t]=0;else{var c=new Promise(((a,c)=>r=e[t]=[a,c]));a.push(r[2]=c);var f=n.p+n.u(t),o=new Error;n.l(f,(a=>{if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var c=a&&("load"===a.type?"missing":a.type),f=a&&a.target&&a.target.src;o.message="Loading chunk "+t+" failed.\n("+c+": "+f+")",o.name="ChunkLoadError",o.type=c,o.request=f,r[1](o)}}),"chunk-"+t,t)}},n.O.j=t=>0===e[t];var t=(t,a)=>{var r,c,f=a[0],o=a[1],d=a[2],b=0;if(f.some((t=>0!==e[t]))){for(r in o)n.o(o,r)&&(n.m[r]=o[r]);if(d)var i=d(n)}for(t&&t(a);b Disclaimer | SanchoNet - + @@ -20,7 +20,7 @@ You are responsible for compliance with U.S. and local country export/import laws and regulations.

The software may not be exported/reexported, either directly or indirectly, to any destination subject to U.S. embargoes or trade sanctions unless formally authorized by the U.S. Government. The embargoed destinations are subject to change and the scope of what is included in the embargo is specific to each embargoed country. For the most current information on U.S. embargoed and sanctioned countries, see the Treasury Department regulations.

- + \ No newline at end of file diff --git a/faucet/index.html b/faucet/index.html index d2a5af62..8af74380 100644 --- a/faucet/index.html +++ b/faucet/index.html @@ -4,13 +4,13 @@ SanchoNet faucet | SanchoNet - + - + \ No newline at end of file diff --git a/get-started/discord/index.html b/get-started/discord/index.html index 559b1077..9886d22e 100644 --- a/get-started/discord/index.html +++ b/get-started/discord/index.html @@ -4,13 +4,13 @@ Join the community | SanchoNet - +

Join the community

Instructions

  1. Join the IOG Discord community: https://discord.gg/p3jYKGxMvE
  2. Complete the captcha verification
  3. In #start-here, select 'Join the SanchoNet Community'

The 'Voltaire' category, containing SanchoNet channels, will appear. You can enter these channels and join the discussion or just follow along!

SanchoNet Discord channels

The SanchoNet channels include the following:

  • #announcements for updates about SanchoNet
  • #spo-sanchonet for SPO discussion
  • #drep-sanchonet for DRep discussion
  • #builder-sanchonet for discussion of SanchoNet community tooling and infrastructure projects
  • #wallets-sanchonet for wallet discussions, SanchoNet and CIP-95
  • #govtool-sanchonet for discussion of Sancho GovTool beta
  • #live-sancho for live sancho calls
- + \ No newline at end of file diff --git a/get-started/govtool/index.html b/get-started/govtool/index.html index e6eb11cd..7cbe9e38 100644 --- a/get-started/govtool/index.html +++ b/get-started/govtool/index.html @@ -4,7 +4,7 @@ SanchoNet GovTool | SanchoNet - + @@ -24,7 +24,7 @@ General governance guides Cardano governance page overview GovTool overview

- + \ No newline at end of file diff --git a/get-started/index.html b/get-started/index.html index d3f1559b..161d4a2b 100644 --- a/get-started/index.html +++ b/get-started/index.html @@ -4,7 +4,7 @@ SanchoNet | SanchoNet - + @@ -14,7 +14,7 @@ SPOs are the backbone of any blockchain network, and on SanchoNet, it's no different. As an SPO, you can take charge and run the testnet network with diligence and integrity and of course, you can influence Barataria's future voting on relevant actions. Your feedback will be invaluable.

  • Delegate representatives (DReps): DReps are the voice of the broader community. As a representative, your role involves participating in voting on governance actions. You can consider the collective interests of the community as you engage in these important decisions.

  • 🚧🚧 SanchoNet is under construction 🚧🚧

    SanchoNet is all about developing and testing the technical components and processes required to action governance for Cardano within CIP-1694. It informs and engages the Cardano community on Voltaire on-chain governance activities currently underway.

    To fully utilize the on-chain components as they are designed for ultimate use on mainnet, a significant program of off-chain elements (eg committees, informational tools, etc) will also need to be delivered, subject to a separate complimentary roadmap and timeline.

    As such, SanchoNet will follow an independent development trajectory scoped from a technical, rather than final, governance perspective. SanchoNet will encapsulate the various actions and use cases that SPOs, DReps, and other users will undertake within typical usage situations as the wider governance capabilities are rolled out.

    Therefore, not all SanchoNet functionality will operate initially as intended (for example, within constitutional actions), and will be subject to change and iteration during the course of development.

    SanchoNet is more than just a testnet, it is a playground of opportunities. Within this space, the community can collaboratively create a governance system that is robust, decentralized, and truly community-driven. Your involvement, dedication, and passion will be the driving force behind SanchoNet's success.

    SanchoNet feature rollout

    The rollout of Sanchonet features will be phased in line with the technical development of CIP-1694:

    SanchoNet phases roll out

    PhasesPhase 1Phase 2Phase 3Phase 4Phase 5Phase 6
    Status✅ Live in SanchoNet✅ Live in SanchoNet✅ Live in SanchoNet✅ Live in SanchoNet🔨 Development in progressNot started
    - + \ No newline at end of file diff --git a/index.html b/index.html index 34454b90..53470b37 100644 --- a/index.html +++ b/index.html @@ -4,13 +4,13 @@ SanchoNet - +

    SanchoNet

    Building together in the age of Voltaire

    Become a Sancho SPO

    SanchoNet SPOs are the lifeblood of the network. They forge the blocks for all other members. Learn more about becoming a Sancho SPO today!

    Learn more

    Become a Sancho DRep

    SanchoNet provides liquid democracy to get a high voter turnout. DReps are the governing body elected directly through the participants' stake delegation. Become a Sancho DRep today!

    Learn more

    Develop on SanchoNet

    Calling all developers! Do you want to build a cool voting wallet? How about a proposal explorer? Well, there is a job for you. Start integrating your favorite ideas on SanchoNet today!

    Learn more
    Boat
    - + \ No newline at end of file diff --git a/meetups/index.html b/meetups/index.html index 088ed5ff..d054df10 100644 --- a/meetups/index.html +++ b/meetups/index.html @@ -4,13 +4,13 @@ Meetups | SanchoNet - + - + \ No newline at end of file diff --git a/roles/dev/index.html b/roles/dev/index.html index 6199cd98..b1955580 100644 --- a/roles/dev/index.html +++ b/roles/dev/index.html @@ -4,13 +4,13 @@ Developers | SanchoNet - +

    Developers

    A SanchoNet developer is an individual skilled in blockchain technology and programming, with a passion for contributing to the evolution of Cardano's governance future.

    Develop on SanchoNet

    To interact with SanchoNet as a developer, you will need to:

    1. Download the node v8.8.1-pre
    2. Run the node
    3. Request funds from the faucet
    4. Build a cool tool to integrate with SanchoNet
    5. Publish it to the community.

    Community tooling

    Wallets

    Wallets are websites or applications that convert a mnemonic into a user-friendly interface for sending and receiving ada. Below is a list of all the wallets currently available on SanchoNet:

    Explorers

    Explorers allow you to visualize blockchain data. Some are web-based, while others are generic APIs. Below is a list of the current explorers available on SanchoNet:

    Voting centers

    Voting centers enable interaction with the chain for viewing and voting on specific proposals. They can also integrate with wallets to facilitate delegation to DReps and submission of transactions to wallets.

    - + \ No newline at end of file diff --git a/roles/drep/index.html b/roles/drep/index.html index 2cbc3948..f941255e 100644 --- a/roles/drep/index.html +++ b/roles/drep/index.html @@ -4,13 +4,13 @@ DRep | SanchoNet - +

    Delegate representatives (DReps)

    A DRep serves as the community's spokesperson, actively participating in voting on governance actions and advocating for the community's collective interests.

    Becoming a DRep

    As Cardano prepares for the Conway era, community participation becomes vital for its success. A meaningful way to contribute is by becoming a DRep and playing a key role in shaping Cardano's future.

    DReps hold significant responsibilities in the governance process, voting on important system updates. Approval depends on the governance action type and requires a majority vote from the corresponding governance bodies (SPOs, the constitutional committee, and DReps).

    As a DRep, you'll have the power to vote 'yes,' 'no,' or 'abstain' on governance actions proposing changes to protocol parameters. Your vote represents the ada holders' collective voice, making your role crucial in Cardano's decentralized decision-making.

    To become a DRep, follow these steps:

    1. Download the node v8.8.1-pre
    2. Run the node
    3. Request funds from the faucet
    4. Register as a DRep with an on-chain registration certificate
    5. Initially, on SanchoNet, use tools like Discord to identify governance actions requiring your attention and vote
    6. Engage in discussions with other DReps to assess the merits of active governance actions
    7. Cast your votes using Cardano CLI or other voting tools as they become available in the community
    8. When submitting your votes, include reasoning for your vote and an anchor (URL and hash).

    Stay tuned for comprehensive tutorials that will be provided upon the release of new features. You might be also asked to conduct specific tests from participants on SanchoNet, highlighting the importance of your active involvement.

    - + \ No newline at end of file diff --git a/roles/spo/index.html b/roles/spo/index.html index 9d0defc1..096a3aa0 100644 --- a/roles/spo/index.html +++ b/roles/spo/index.html @@ -4,7 +4,7 @@ SPO | SanchoNet - + @@ -13,7 +13,7 @@ have a role in the governance of the system. Stake pool operators can vote on motions of no confidence, electing new constitutional committee members, initiating hardforks, and making changes to security and relevant protocol parameters.

    Becoming an SPO

    Becoming an SPO is critical to support SanchoNet. The process is straightforward, follow the tutorials below:

    1. Download the latest node
    2. Run the node
    3. Request funds from the faucet
    4. Register a stake pool
    5. Request delegation from the faucet
    - + \ No newline at end of file diff --git a/tools-resources/faq/index.html b/tools-resources/faq/index.html index 977bd4d9..9d6a591e 100644 --- a/tools-resources/faq/index.html +++ b/tools-resources/faq/index.html @@ -4,14 +4,14 @@ Conway ledger era FAQs | SanchoNet - +

    Conway ledger era FAQs

    Warning: Please note that due to ongoing development, some answers may change over time.

    Last update: 2024-02-17

    Based on ledger design cddl: node 8.8.0-pre

    1. What are the new Conway certificates?

    Certificate in CDDLDescription
    reg_certRegisters stake credentials
    unreg_certUnregisters stake credentials
    vote_deleg_certDelegates votes
    stake_vote_deleg_certDelegates to a stake pool and a DRep from the same certificate
    stake_reg_deleg_certRegisters stake credentials and delegates to a stake pool
    vote_reg_deleg_certRegisters stake credentials and delegates to a DRep
    stake_vote_reg_deleg_certRegisters stake credentials, delegates to a pool, and to a DRep
    auth_committee_hot_certAuthorizes the constitutional committee hot credential
    resign_committee_cold_certResigns the constitutional committee cold credential
    reg_drep_certRegisters DRep's credentials
    unreg_drep_certUnregisters (retires) DRep's credentials
    update_drep_certUpdates DRep's metadata anchor

    2. Why are there two ways to register/unregister stake credentials now?

    ⚠ There are currently two ways to register/unregister stake credentials because the old stake_registration and stake_deregistration will be deprecated in the era following the Conway era. ⚠

    The new version allows the ledger to check deposit amounts and return them instantly (rather than on epoch boundary), matching the other new certificates containing deposits.

    3. Why do new certificates have a coin field?

    This change has been made to enable the checking of deposit amounts at the ledger level. It also proves to be more useful in Voltaire, given that protocol parameters are likely to change more frequently than in past eras.

    4. Certificate and transaction field witnesses and deposits

    CertificateParametersRequired witnessesDeposit/refund
    stake_registration(0, stake_credential)NoneNone
    stake_deregistration(1, stake_credential)stake_credentialNone
    stake_delegation(2, stake_credential, pool_keyhash)stake_credentialNone
    pool_registration(3, pool_params)pool_keyNone
    pool_retirement(4, pool_keyhash, epoch)pool_keyNone
    reg_cert(7, stake_credential, coin)stake_credentialDeposit coin of amount keyDeposit
    unreg_cert(8, stake_credential, coin)stake_credentialRefund keyDeposit of amount coin
    vote_deleg_cert(9, stake_credential, drep)stake_credentialNone
    stake_vote_deleg_cert(10, stake_credential, pool_keyhash, drep)stake_credentialNone
    stake_reg_deleg_cert(11, stake_credential, pool_keyhash, coin)stake_credentialDeposit coin of amount keyDeposit
    vote_reg_deleg_cert(12, stake_credential, drep, coin)stake_credentialDeposit coin of amount keyDeposit
    stake_vote_reg_deleg_cert(13, stake_credential, pool_keyhash, drep, coin)stake_credentialDeposit coin of amount keyDeposit
    auth_committee_hot_cert(14, committee_cold_credential, committee_hot_credential)committee_cold_credentialNone
    resign_committee_cold_cert(15, committee_cold_credential, anchor / null)committee_cold_credentialNone
    reg_drep_cert(16, drep_credential, coin, anchor / null)drep_credentialdrepDeposit
    unreg_drep_cert(17, drep_credential, coin)drep_credentialRefund drepDeposit of amount coin
    update_drep_cert(18, drep_credential, anchor / null)drep_credentialNone
    voting_procedure (in Tx body)voting_procedures = { + voter => { + gov_action_id => voting_procedure } }drep_credential OR committee_hot_credential OR stake_pool_keyHashNone
    proposal_procedure (in Tx body)proposal_procedure = [ deposit : coin, reward_account, gov_action, anchor]coinDeposit is returned at the epoch boundary to the reward_account that is specified in the proposal.
    Current treasury value (in Tx body)coinpayment_credentialNone
    Treasury donation (in Tx body)positive_coinpayment_credentialNone

    5. Why isn't the script directly included in a new constitution proposal for the proposal policy?

    The decision to provide only the script hash, rather than the entire script, within a new constitution proposal serves the purpose of reusing the mechanisms previously implemented in Babbage. For instance, it allows individuals to use reference scripts to provide the actual script for the proposal policy when proposing various governance actions. Creating another source for scripts would entail more work.

    6. Regarding the proposal policy for a new CC constitution action: How does the proposal policy script impact the script integrity hash in the transaction body? Do I need to consider the cost model of the provided script?

    The new constitution proposal contains a ScriptHash, also known as the proposal policy. There is nothing special that needs to be done during the proposal stage because the policy is simply being suggested. The significance comes into play when a new constitution with a script hash (proposal policy) is enacted. At that point, the constitution will require scripts and redeemers for every governance proposal, except for the new_constitution and no_confidence proposals. In these cases, it will function in a manner similar to other scripts.

    7. If a voting proposal requires a script and a redeemer, which redeemer tag should I use?

    This tag is yet to be implemented. The designated tag for such instances will be 5, with the index in the redeemer corresponding to the proposal procedure. Additionally, there will be tag 4 – specifically for voting procedures.

    8. What will be the maximum number of protocol parameter changes that can be executed in a single governance action?

    With numerous Plutus versions having distinct cost models, accommodating all of them may become impractical. Nevertheless, it's highly unlikely to exceed the maximum transaction size in the near future.

    9. Can one delegate to DReps that do not exist?

    There are no checks for this at the ledger level, neither for SPOs nor for DReps. At any point, the DRep and the SPO to whom you delegated can unregister, so there is no need to enforce their existence when delegating.

    10. Is it possible to stake a DRep deposit when it is locked?

    No, there is no mechanism to facilitate that action. The purpose of the deposit is to restrict the use of those funds.

    11. What happens with DRep deposits when no stake credential is provided, and where is the deposit returned?

    DRep deposits function similarly to stake credential deposits. They are refunded in the transaction that unregisters the DRep. Stake pool and proposal procedures are retired or expired on the epoch boundary, which is why their deposits are refunded into a reward account. However, DReps and stake credentials are unregistered immediately.

    13. Does the new donation field function similarly to implicit outputs?

    Donations function more like fees. They are collected in a pool and then transferred at the epoch boundary.

    14. How does the 'current treasury value' function, and what happens if I set it to an incorrect value?

    The 'current treasury value' is used for conveying the current treasury amount to Plutus scripts. If the treasury field is set incorrectly, the transaction will be rejected.

    15. How does the process of CC resignation (resign_committee_cold_cert) work, and what happens if all CC members resign? Does this impact the quorum?

    Resigned and expired constitutional committee members are automatically counted as if they have voted 'Abstain'.

    Another crucial point to note is that whenever the number of active committee members (those who are neither expired nor resigned) falls below the committeeMinSize protocol parameter, the system enters a mode in which it is as though all committee members have cast a 'No' vote.

    16. For parameter_change_action and treasury_withdrawals_action does the optionally supplied policy_hash require a witness from the script?

    Yes. It is only optional, when there is no governance policy. When there is a governance policy we require that policy_hash to be present and equal to the one in the elected constitution.

    17. Are the governance voting threshold Parameters set to be fixed at 2 decimal places?

    No, they are rational numbers on the unit interval where both numerator and denominator are specified by 64bit unsigned integers. So, those thresholds can be very precise.

    18. Do unwithdrawn staking rewards count towards one's voting power/ is counted in active/inactive voting stake amounts?

    Yes, the amount in the reward account is counted towards active stake, which means it will also participate in the voting. This decision was to prevent people from constantly withdrawing rewards just so they can get rewards on that amount.

    19. Do any locked deposits count towards voting stake?

    The only deposits which count toward voting stake thresholds are deposits locked for governance actions.

    - + \ No newline at end of file diff --git a/tools-resources/resources/index.html b/tools-resources/resources/index.html index 31f14e00..4f6c276e 100644 --- a/tools-resources/resources/index.html +++ b/tools-resources/resources/index.html @@ -4,7 +4,7 @@ Tools and resources | SanchoNet - + @@ -13,7 +13,7 @@ For list of supported wallets please check docs.sanchogov.tools.

    Cardano Serialization Library (Conway Alpha) - Emurgo

    This is an Alpha build and the team are keen to hear feedback via Github Issues.

    Cardano SDK

    Cardano SDK is a comprehensive suite of Typescript packages suitable for both Node.js and browser-based development, used by Lace at its core for everything relating to the Cardano blockchain.

    The core/Serialization package has support for serialization and deserialization, developed from the ground up in Typescript.

    Built by the community

    Disclaimer: These tools and guides are created by the community and are not supported directly. Please refer any issues to the author.

    Tools from the community:

    • Blockfrost.io: the leading Cardano API-as-a-Service, which also provides access to the SanchoNet testing network.
    • NuFi Wallet CIP-95/ SanchoNet Compatible Build: the first community CIP-95 wallet build.
    • Ogmios Conway Releases: is a lightweight bridge interface for cardano-node. It provides an HTTP / WebSocket API that enables applications to interact with a local cardano-node via JSON+RPC-2.0.
    • Cardano-Signer: Open-Source multifunction tool, which can sign&verify data. Can also be used for Key-Generation, like dRep-Keys, CCM-Cold/Hot-Keys with Mnemonic-Support.
    • Adanordic.com: A work-in-progress rudimentary governance related explorer.
    • Cardano Multiplatform Library A standard multifunctional library for serialization & deserialization of core data structures and useful utility functions.
    • Cexplorer.io SanchoNet: The biggest and oldest Cardano explorer, supporting the SanchoNet testing network.
    • cardano-wallet Conway release: Cardano wallet is command line based software wallet.
    • drep.tools: A very early version of a site to help DReps by.
    • Plutarch: A Haskell eDSL designed for writing fast and fine-tunable on-chain scripts. Currently supports PlutusLedger V1 and V2, with V3 on its way.

    Guides from the community:

    AuthorTitleDate
    Eysteinh (NBX)Sancho Panza: Navigating Cardano's Testnet Frontier2023-08-14
    Mike Hornan (ABLE)Sancho Testnet Guides and Command Line Interface2023-10-02
    Nicolas Cerny (CF)How to become a delegated representative (DRep) on SanchoNet2024-01-10
    - + \ No newline at end of file diff --git a/tutorials/actions/index.html b/tutorials/actions/index.html index c7979290..ee15a91d 100644 --- a/tutorials/actions/index.html +++ b/tutorials/actions/index.html @@ -4,25 +4,25 @@ Governance actions | SanchoNet - +

    Governance actions

    Common aspects of all types of governance actions

    A proposal is the process of putting together all the information required to submit a governance action to the chain. A proposal consists of:

    • A deposit
    • The reward account that will receive the deposit return
    • The governance action
    • An anchor

    When using the cardano-cli to create a governance action, you will notice that it creates a proposal.

    Deposit and stake credentials

    Any ada holder can submit a governance action to the chain. They must provide a deposit, which will be returned when the action is finalized (whether it is ratified or has expired). To facilitate this process, the proposer must specify the stake credential that will receive the refunded deposit.

    Previous governance action ID

    To prevent unintended conflicts between governance actions of the same type, some governance actions must include the governance action ID of -the most recently enacted action of its respective type. Notably, this requirement does not apply to treasury withdrawal and info governance actions.

    You can get the last enacted governance action IDs with:

    cardano-cli conway query gov-state --testnet-magic 4 | jq -r .enactState.prevGovActionIds
    {
    "pgaCommittee": {
    "govActionIx": 0,
    "txId": "fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec"
    },
    "pgaConstitution": {
    "govActionIx": 0,
    "txId": "2bcf2a93cb840d72e6fbbad4d52419fa69a3971dee2e32fab414e32a44ecbaf7"
    },
    "pgaHardFork": null,
    "pgaPParamUpdate": null
    }

    Please note that both the update committee and motion of no confidence actions share the same space, referred to as 'pgaCommittee,' within the +the most recently enacted action of its respective type. Notably, this requirement does not apply to treasury withdrawal and info governance actions.

    You can get the last enacted governance action IDs with:

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

    Please note that both the update committee and motion of no confidence actions share the same space, referred to as 'pgaCommittee,' within the governance state. Consequently, the governance state stores a single value to represent both of these actions. The system also verifies either of these actions against this single stored value.

    Anchors

    When proposing a governance action, the proposer may employ an anchor, which comprises a URL hosting a document that outlines the rationale for the proposed changes, along with the document's hash.

    The document at the URL can be of a free form. It's important that it should communicate to ada holders the what and the why of the proposal. This tutorial mostly uses 'https://raw.githubusercontent.com/Ryun1/metadata/main/cip108/treasury-withdrawal.jsonld' as an example, see here for more details.

    See CIP-100 | Governance Metadata and CIP-0108? | Governance Metadata - Governance Actions for standard. -Following CIP-100, we canonize the metadata anchor first, via JSON-LD playground, which we then hash.

    You can use cardano-cli to get the hash:

    cardano-cli conway governance hash anchor-data --file-text treasury-withdrawal.canonical
    931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5

    Alternatively, utilize b2sum to hash the document:

    b2sum -l 256 treasury-withdrawal.canonical
    931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 treasury-withdrawal.canonical

    You will need to supply the hash of the document when creating a governance action.

    Update committee actions

    Update committee to add a new CC member:

    Assume you want to add three CC members, who have generated cold keys and have provided their key hashes:

    • 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de
    • ea8738081fca0726f4e781f5e55fda05f8745432a5f8a8d09eb0b34b
    • 7f6721067362d4ae9ca73469fe983ce5572dad9028386100104b0da0

    You can create a proposal to add them as new CC members with an expiration epoch (--epoch) for each of them. This is a good time to review the quorum. Let’s assume that 2/3 of the committee needs to accept the proposal:

    Create the governance action proposal:

    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') \
    --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 \
    --add-cc-cold-verification-key-hash 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de \
    --epoch 100 \
    --add-cc-cold-verification-key-hash ea8738081fca0726f4e781f5e55fda05f8745432a5f8a8d09eb0b34b \
    --epoch 95 \
    --add-cc-cold-verification-key-hash 7f6721067362d4ae9ca73469fe983ce5572dad9028386100104b0da0 \
    --epoch 90 \
    --quorum 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.

    Update committee to remove an existing CC member:

    Assume that you want to remove the CC member with the key hash 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de. You can do this with:

    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') \
    --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 \
    --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \
    --prev-governance-action-index 0 \
    --out-file update-committee.action

    Update committee to only change the quorum:

    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') \
    --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 \
    --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \
    --prev-governance-action-index 0 \
    --out-file update-committee.action

    Updating the constitution

    Should you decide to propose an update to the SanchoNet constitution, please note that all rules and principles outlined for SanchoNet should be fictional and unrelated to the actual rules on the Cardano blockchain. Quotes directly from Don Quixote +Following CIP-100, we canonize the metadata anchor first, via JSON-LD playground, which we then hash.

    You can use cardano-cli to get the hash:

    cardano-cli conway governance hash anchor-data --file-text treasury-withdrawal.canonical
    931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5

    Alternatively, utilize b2sum to hash the document:

    b2sum -l 256 treasury-withdrawal.canonical
    931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 treasury-withdrawal.canonical

    You will need to supply the hash of the document when creating a governance action.

    Update committee actions

    Update committee to add a new CC member:

    Assume you want to add three CC members, who have generated cold keys and have provided their key hashes:

    • 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de
    • ea8738081fca0726f4e781f5e55fda05f8745432a5f8a8d09eb0b34b
    • 7f6721067362d4ae9ca73469fe983ce5572dad9028386100104b0da0

    You can create a proposal to add them as new CC members with an expiration epoch (--epoch) for each of them. This is a good time to review the quorum. Let’s assume that 2/3 of the committee needs to accept the proposal:

    Create the governance action proposal:

    cardano-cli conway governance action update-committee \
    --testnet \
    --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 \
    --add-cc-cold-verification-key-hash 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de \
    --epoch 100 \
    --add-cc-cold-verification-key-hash ea8738081fca0726f4e781f5e55fda05f8745432a5f8a8d09eb0b34b \
    --epoch 95 \
    --add-cc-cold-verification-key-hash 7f6721067362d4ae9ca73469fe983ce5572dad9028386100104b0da0 \
    --epoch 90 \
    --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.

    Update committee to remove an existing CC member:

    Assume that you want to remove the CC member with the key hash 89181f26b47c3d3b6b127df163b15b74b45bba7c3b7a1d185c05c2de. You can do this with:

    cardano-cli conway governance action update-committee \
    --testnet \
    --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 \
    --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 threshold:

    cardano-cli conway governance action update-committee \
    --testnet \
    --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 \
    --threshold 60/100 \
    --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \
    --prev-governance-action-index 0 \
    --out-file update-committee.action

    Updating the constitution

    Should you decide to propose an update to the SanchoNet constitution, please note that all rules and principles outlined for SanchoNet should be fictional and unrelated to the actual rules on the Cardano blockchain. Quotes directly from Don Quixote are encouraged, as well as rules in a similar spirit that aren't directly extracted from the book. SanchoNet is not the space for serious discussions about the future governance of Cardano. For substantial conversations, please visit -the dedicated forum to explore the weighty matters of Cardano's constitution with the depth they deserve. Cardano Forum

    • Find the last enacted governance action of this type:
    cardano-cli conway query gov-state --testnet-magic 4 | jq .enactState.prevGovActionIds.pgaConstitution
    {
    "govActionIx": 0,
    "txId": "00caeb6c2db4575acc43be3e8f87b881dccb86283daf16aa2707275cbe7f3451"
    }
    • Write a constitution update and save it to constitution.txt
    • Upload the constitution.txt file to a URL so that everyone can read it, for example, https://tinyurl.com/mr3ferf9
    • Check the hash of the constitution.txt file using b2sum.
    wget https://tinyurl.com/mr3ferf9 -O constitution.txt
    cardano-cli conway governance hash anchor-data --file-text constitution.txt
    5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d

    or

    b2sum -l 256 constitution.txt
    5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d constitution.txt

    Create the proposal to update the constitution:

    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') \
    --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" \
    --constitution-url https://tinyurl.com/mr3ferf9 \
    --constitution-hash "5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d" \
    --prev-governance-action-tx-id "00caeb6c2db4575acc43be3e8f87b881dccb86283daf16aa2707275cbe7f3451" \
    --prev-governance-action-index 0 \
    --out-file constitution.action

    Motion of no confidence

    • Find the last governance action enacted of this type:
    cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.enactState.prevGovActionIds.pgaCommittee'
    {
    "govActionIx": 0,
    "txId": "fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec"
    }

    Create a no-confidence governance action:

    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') \
    --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 \
    --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \
    --prev-governance-action-index 0 \
    --out-file no-confidence.action

    Treasury withdrawal

    In addition to the stake credential required to obtain a deposit refund, the proposer must also furnish stake credentials for receiving funds from the treasury in the -event that the governance action is approved.

    Create the treasury withdrawal proposal:

    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') \
    --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 \
    --funds-receiving-stake-verification-key-file stake.vkey \
    --transfer 50000000000 \
    --out-file treasury.action
    • Note that you do not need to provide any previous governance action ID on treasury withdrawals.

    Info

    Create the 'info' governance action:

    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') \
    --deposit-return-stake-verification-key-file stake.vkey \
    --anchor-url https://tinyurl.com/yc74fxx4 \
    --anchor-data-hash \
    --out-file info.action

    Update protocol parameters to change the --key-reg-deposit-amt

    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') \
    --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 \
    --key-reg-deposit-amt 1000000 \
    --out-file pp-update.action
    • Note: If there is a previously enacted governance action to update the protocol parameters, the proposal must also include --prev-governance-action-tx-id and --prev-governance-action-index.

    Submitting the *.action action file in a transaction

    Submitting the *.action file to the blockchain is the essential step in bringing your proposal to life and making it accessible for the community to participate in the +the dedicated forum to explore the weighty matters of Cardano's constitution with the depth they deserve. Cardano Forum

    • Find the last enacted governance action of this type:
    cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Constitution'
    {
    "govActionIx": 0,
    "txId": "00caeb6c2db4575acc43be3e8f87b881dccb86283daf16aa2707275cbe7f3451"
    }
    • Write a constitution update and save it to constitution.txt
    • Upload the constitution.txt file to a URL so that everyone can read it, for example, https://tinyurl.com/mr3ferf9
    • Check the hash of the constitution.txt file using b2sum.
    wget https://tinyurl.com/mr3ferf9 -O constitution.txt
    cardano-cli conway governance hash anchor-data --file-text constitution.txt
    5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d

    or

    b2sum -l 256 constitution.txt
    5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d constitution.txt

    Create the proposal to update the constitution:

    cardano-cli conway governance action create-constitution \
    --testnet \
    --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" \
    --constitution-url https://tinyurl.com/mr3ferf9 \
    --constitution-hash "5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d" \
    --prev-governance-action-tx-id "00caeb6c2db4575acc43be3e8f87b881dccb86283daf16aa2707275cbe7f3451" \
    --prev-governance-action-index 0 \
    --out-file constitution.action

    Motion of no confidence

    • Find the last governance action enacted of this type:
    cardano-cli conway query gov-state --testnet-magic 4 | jq -r '.nextRatifyState.nextEnactState.prevGovActionIds.Committee'
    {
    "govActionIx": 0,
    "txId": "fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec"
    }

    Create a no-confidence governance action:

    cardano-cli conway governance action create-no-confidence \
    --testnet \
    --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 \
    --prev-governance-action-tx-id fe2c99fe6bc75a9666427163d51ae7dbf5a60df40135361b7bfd53ac6c7912ec \
    --prev-governance-action-index 0 \
    --out-file no-confidence.action

    Treasury withdrawal

    In addition to the stake credential required to obtain a deposit refund, the proposer must also furnish stake credentials for receiving funds from the treasury in the +event that the governance action is approved.

    Create the treasury withdrawal proposal:

    cardano-cli conway governance action create-treasury-withdrawal \
    --testnet \
    --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 \
    --funds-receiving-stake-verification-key-file stake.vkey \
    --transfer 50000000000 \
    --out-file treasury.action
    • Note that you do not need to provide any previous governance action ID on treasury withdrawals.

    Info

    Create the 'info' governance action:

    cardano-cli conway governance action create-info --testnet \
    --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 931f1d8cdfdc82050bd2baadfe384df8bf99b00e36cb12bfb8795beab3ac7fe5 \
    --out-file info.action

    Update protocol parameters to change the --key-reg-deposit-amt

    cardano-cli conway governance action create-protocol-parameters-update \
    --testnet \
    --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 \
    --key-reg-deposit-amt 1000000 \
    --out-file pp-update.action
    • Note: If there is a previously enacted governance action to update the protocol parameters, the proposal must also include --prev-governance-action-tx-id and --prev-governance-action-index.

    Submitting the *.action action file in a transaction

    Submitting the *.action file to the blockchain is the essential step in bringing your proposal to life and making it accessible for the community to participate in the voting process. This process essentially transforms your proposal from a conceptual idea into an actionable item. Once submitted, it becomes part of the public ledger, while also allowing members of the governance bodies to review, discuss, and ultimately cast their votes on its approval or rejection.

    • Note that you can also use build-raw and calculate-min-fee to build transactions in an off-line settting. The example below uses the convenient build:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --witness-override 2 \
    --tx-in "$(cardano-cli query utxo --address "$(cat payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]')" \
    --change-address $(cat payment.addr) \
    --proposal-file info.action \
    --out-file tx.raw
    cardano-cli conway transaction sign \
    --testnet-magic 4 \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --out-file tx.signed
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed

    Finding the governance action ID of your proposal

    You may want to find your governance action ID to share it with others on Discord1 and seek their support. The transaction ID and the index of the transaction that submitted the -proposal serve as the action ID. An effective way to find your governance action ID is by querying the governance state and filtering by (the proposer) stake key hash.

    First, find your key hash with:

    cardano-cli conway stake-address key-hash --stake-verification-key-file stake1.vkey

    8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b

    Use jq to filter the gov-state output by the stake key hash. The output contains all the relevant information about your governance actions, including actionId:

    cardano-cli conway query gov-state --testnet-magic 4 \
    | jq -r --arg keyHash "8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b" '.proposals | to_entries[] | select(.value.returnAddr.credential.keyHash | contains($keyHash)) | .value'
    {
    "action": {
    "contents": [
    [
    {
    "credential": {
    "keyHash": "7249a71391f08399f06b492eae7892a33191699625cff50b7dee55c6"
    },
    "network": "Testnet"
    },
    20388738581
    ]
    ],
    "tag": "TreasuryWithdrawals"
    },
    "actionId": {
    "govActionIx": 0,
    "txId": "4fcd92abf2ce3d6796c5fae51ea83d563ca8611359c9624fd1cecd7fa1ce71cc"
    },
    "committeeVotes": {
    "keyHash-23e05ad2b71317a6348ce4b68dae37aa1c0e545cdea740b23c21742e": "VoteNo",
    "keyHash-540bedcd4bdcbf523e899c3ef43f2b96ecec4f6303af58d15a413ed1": "VoteYes",
    "keyHash-6c1d098a366f2274651943a7f778b3b5459c129f0407a0db2902253a": "VoteYes"
    },
    "dRepVotes": {
    "keyHash-13797df5308dfebf2348fa58b312a177cf97939f5f7d21168e1a54db": "VoteYes",
    "keyHash-9853551d8b99884f51608822e012bbf0d444eb7bea2807ee664f1241": "Abstain",
    "keyHash-cf09b59e134fa14e48da39b552c02299a054d7c8b895b3d827453672": "VoteNo"
    },
    "deposit": 1000000000,
    "expiresAfter": 34,
    "proposedIn": 33,
    "returnAddr": {
    "credential": {
    "keyHash": "8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b"
    },
    "network": "Testnet"
    },
    "stakePoolVotes": {}
    }
    - +proposal serve as the action ID. An effective way to find your governance action ID is by querying the governance state and filtering by (the proposer) stake key hash.

    First, find your key hash with:

    cardano-cli conway stake-address key-hash --stake-verification-key-file stake.vkey

    8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b

    Use jq to filter the gov-state output by the stake key hash. The output contains all the relevant information about your governance actions, including actionId:

    cardano-cli conway query gov-state --testnet-magic 4 \
    | jq -r --arg keyHash "8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b" '.proposals | to_entries[] | select(.value.returnAddr.credential.keyHash | contains($keyHash)) | .value'
    {
    "action": {
    "contents": [
    [
    {
    "credential": {
    "keyHash": "7249a71391f08399f06b492eae7892a33191699625cff50b7dee55c6"
    },
    "network": "Testnet"
    },
    20388738581
    ]
    ],
    "tag": "TreasuryWithdrawals"
    },
    "actionId": {
    "govActionIx": 0,
    "txId": "4fcd92abf2ce3d6796c5fae51ea83d563ca8611359c9624fd1cecd7fa1ce71cc"
    },
    "committeeVotes": {
    "keyHash-23e05ad2b71317a6348ce4b68dae37aa1c0e545cdea740b23c21742e": "VoteNo",
    "keyHash-540bedcd4bdcbf523e899c3ef43f2b96ecec4f6303af58d15a413ed1": "VoteYes",
    "keyHash-6c1d098a366f2274651943a7f778b3b5459c129f0407a0db2902253a": "VoteYes"
    },
    "dRepVotes": {
    "keyHash-13797df5308dfebf2348fa58b312a177cf97939f5f7d21168e1a54db": "VoteYes",
    "keyHash-9853551d8b99884f51608822e012bbf0d444eb7bea2807ee664f1241": "Abstain",
    "keyHash-cf09b59e134fa14e48da39b552c02299a054d7c8b895b3d827453672": "VoteNo"
    },
    "deposit": 1000000000,
    "expiresAfter": 34,
    "proposedIn": 33,
    "returnAddr": {
    "credential": {
    "keyHash": "8e0debc9fdc6c616ac40d98bf3950b436895eea9cccf0396a6e5e12b"
    },
    "network": "Testnet"
    },
    "stakePoolVotes": {}
    }
    + \ No newline at end of file diff --git a/tutorials/address/index.html b/tutorials/address/index.html index 9232d9f3..443bfab0 100644 --- a/tutorials/address/index.html +++ b/tutorials/address/index.html @@ -4,13 +4,13 @@ Generate keys and address | SanchoNet - +

    Generate keys and address

    First, generate a payment key pair and a stake key pair. Then, use the payment verification key and the stake verification key to build an address that can be used to receive funds from the faucet.

    The payment keys control the funds, while the stake keys control the participation in the protocol: delegating stake to a pool and delegating votes to a delegate representative.

    Pre-requisites

    • cardano-cli installed

    Generate key pairs

    1. Generate payment keys:
    cardano-cli conway address key-gen \
    --verification-key-file payment.vkey \
    --signing-key-file payment.skey
    1. Generate stake keys:
    cardano-cli conway stake-address key-gen \
    --verification-key-file stake.vkey \
    --signing-key-file stake.skey

    Build the address

    1. Build your address:
    cardano-cli conway address build \
    --payment-verification-key-file payment.vkey \
    --stake-verification-key-file stake.vkey \
    --out-file payment.addr \
    --testnet-magic 4

    Get funds from the faucet

    1. Use your address on the faucet to get SanchoNet testnet tokens.
    - + \ No newline at end of file diff --git a/tutorials/cli queries/index.html b/tutorials/cli queries/index.html index 4d1fcda9..ec43d526 100644 --- a/tutorials/cli queries/index.html +++ b/tutorials/cli queries/index.html @@ -4,13 +4,13 @@ Useful CLI queries | SanchoNet - +

    Useful CLI queries

    Query the constitution:

    cardano-cli conway query constitution --testnet-magic 4
    {
    "anchor": {
    "dataHash": "5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d",
    "url": "https://tinyurl.com/4xdkkjm3"
    }
    }

    Query the DRep state for all DReps:

    cardano-cli conway query drep-state --testnet-magic 4
    [
    [
    {
    "keyHash": "1da9afe241a10fe5ee9590843134d0eebd4a32af448c9ec91db2e863"
    },
    {
    "anchor": null,
    "deposit": 2000000,
    "expiry": 177
    }
    ],
    [
    {
    "keyHash": "480036de36a123e98663370e4829ebd43aa9bb06ec4b6b25f3e178db"
    },
    {
    "anchor": null,
    "deposit": 2000000,
    "expiry": 176
    }
    ],
    [
    {
    "keyHash": "5b440956e056c96c74d4820b39b4f91cc45bb2b46024c96a594bb2ed"
    },
    {
    "anchor": null,
    "deposit": 2000000,
    "expiry": 176
    }
    ]
    ]

    Query the DRep state for an individual DRep:

    cardano-cli conway query drep-state --drep-key-hash 1da9afe241a10fe5ee9590843134d0eebd4a32af448c9ec91db2e863 --testnet-magic 4
    [
    [
    {
    "keyHash": "1da9afe241a10fe5ee9590843134d0eebd4a32af448c9ec91db2e863"
    },
    {
    "anchor": null,
    "deposit": 2000000,
    "expiry": 188
    }
    ]
    ]

    Query the DRep stake distribution (voting power):

    cardano-cli conway query drep-stake-distribution --testnet-magic 4
    [
    [
    "drep-keyHash-13797df5308dfebf2348fa58b312a177cf97939f5f7d21168e1a54db",
    500000000000
    ],
    [
    "drep-keyHash-9853551d8b99884f51608822e012bbf0d444eb7bea2807ee664f1241",
    495790521257
    ],
    [
    "drep-keyHash-cf09b59e134fa14e48da39b552c02299a054d7c8b895b3d827453672",
    500000000000
    ]
    ]

    Query the committee state:

    cardano-cli conway query committee-state --testnet-magic 4
    {
    "committee": {
    "keyHash-5e86313210aef13297187c38c98abb632678906230f555a1bf0a647a": {
    "expiration": 161,
    "hotCredsAuthStatus": {
    "contents": {
    "keyHash": "e394a160b9f1345b7b84cd25f0a3f1d12cb0c9835a4167f7dc5b52ca"
    },
    "tag": "MemberAuthorized"
    },
    "nextEpochChange": "NoChangeExpected",
    "status": "Active"
    },
    "keyHash-8be41436ce39ca3c2f3e4255e17fc6c11581ef6787bccf9ab60f39dd": {
    "expiration": 181,
    "hotCredsAuthStatus": {
    "contents": {
    "keyHash": "e6442af170fabe877ba6b23136ffb32026e9ed927158ecdda2ef0e18"
    },
    "tag": "MemberAuthorized"
    },
    "nextEpochChange": "NoChangeExpected",
    "status": "Active"
    },
    "keyHash-da9f5c5c94a6709a9188838ce8cd7fe1c39a1923de4933c16d67c1e0": {
    "expiration": 201,
    "hotCredsAuthStatus": {
    "contents": {
    "keyHash": "f380b5c4f245f9987645023e39b487e11a7d2337aea91dde628d04ed"
    },
    "tag": "MemberAuthorized"
    },
    "nextEpochChange": "NoChangeExpected",
    "status": "Active"
    }
    },
    "epoch": 86,
    "quorum": 0.6666666666666666666
    }

    Query the state of an individual committee key hash:

    cardano-cli conway query committee-state --cold-verification-key-hash da9f5c5c94a6709a9188838ce8cd7fe1c39a1923de4933c16d67c1e0 --testnet-magic 4
    {
    "committee": {
    "keyHash-da9f5c5c94a6709a9188838ce8cd7fe1c39a1923de4933c16d67c1e0": {
    "expiration": 201,
    "hotCredsAuthStatus": {
    "contents": {
    "keyHash": "f380b5c4f245f9987645023e39b487e11a7d2337aea91dde628d04ed"
    },
    "tag": "MemberAuthorized"
    },
    "nextEpochChange": "NoChangeExpected",
    "status": "Active"
    }
    },
    "epoch": 89,
    "quorum": 0.6666666666666666666
    }

    Query expired committee members

    cardano-cli conway query committee-state --expired --testnet-magic 4
    {
    "committee": {
    "keyHash-059349cd1e77dc3e500d3ffc498adb7307001ecc022c8b083faaa48b": {
    "expiration": 161,
    "hotCredsAuthStatus": {
    "contents": {
    "keyHash": "23e05ad2b71317a6348ce4b68dae37aa1c0e545cdea740b23c21742e"
    },
    "tag": "MemberAuthorized"
    },
    "nextEpochChange": "NoChangeExpected",
    "status": "Expired"
    }
    },
    "epoch": 169,
    "quorum": 0.6
    }

    Query active committee members

    cardano-cli conway query committee-state --active --testnet-magic 4
    {
    "committee": {
    "keyHash-059349cd1e77dc3e500d3ffc498adb7307001ecc022c8b083faaa48b": {
    "expiration": 161,
    "hotCredsAuthStatus": {
    "contents": {
    "keyHash": "23e05ad2b71317a6348ce4b68dae37aa1c0e545cdea740b23c21742e"
    },
    "tag": "MemberAuthorized"
    },
    "nextEpochChange": "NoChangeExpected",
    "status": "Active"
    },
    "keyHash-337e0a7fd01c7a7c27e8bac17e40db182bc2a774467795af1e3fe8a9": {
    "expiration": 201,
    "hotCredsAuthStatus": {
    "contents": {
    "keyHash": "540bedcd4bdcbf523e899c3ef43f2b96ecec4f6303af58d15a413ed1"
    },
    "tag": "MemberAuthorized"
    },
    "nextEpochChange": "NoChangeExpected",
    "status": "Active"
    },
    "keyHash-9c2aabae5d9187a76ed6b04b40e91ecb4ce3171611c3fd4ec6c6a607": {
    "expiration": 181,
    "hotCredsAuthStatus": {
    "contents": {
    "keyHash": "6c1d098a366f2274651943a7f778b3b5459c129f0407a0db2902253a"
    },
    "tag": "MemberAuthorized"
    },
    "nextEpochChange": "NoChangeExpected",
    "status": "Active"
    }
    },
    "epoch": 105,
    "quorum": 0.6
    }

    Query unrecognized committee keys

    cardano-cli conway query committee-state --unrecognized --testnet-magic 42
    {
    "committee": {},
    "epoch": 106,
    "quorum": 0.6
    }
    - + \ No newline at end of file diff --git a/tutorials/committee/index.html b/tutorials/committee/index.html index 5037151e..c03cac27 100644 --- a/tutorials/committee/index.html +++ b/tutorials/committee/index.html @@ -4,7 +4,7 @@ Generate committee member keys and certificates | SanchoNet - + @@ -13,7 +13,7 @@ a hot key authorization certificate. This enables them to cast votes by signing their transactions with their hot signing key while keeping their cold keys securely stored in cold storage. In the event that the hot keys are compromised at any point, the committee member must generate a new hot key pair and issue a new hot key authorization certificate.

    cardano-cli conway governance committee key-gen-hot \
    --verification-key-file cc-hot.vkey \
    --signing-key-file cc-hot.skey
    cardano-cli conway governance committee create-hot-key-authorization-certificate \
    --cold-verification-key-file cc-cold.vkey \
    --hot-key-file cc-hot.vkey \
    --out-file cc-hot-key-authorization.cert
    • Submit the authorization certificate in a transaction:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --tx-in "$(cardano-cli query utxo --address "$(cat payment.addr)" --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]')" \
    --change-address payment.addr \
    --certificate-file cc-hot-key-authorization.cert \
    --witness-override 2 \
    --out-file tx.raw
    cardano-cli conway transaction sign \
    --testnet-magic 4 \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file cc-cold.skey \
    --out-file tx.signed
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed
    - + \ No newline at end of file diff --git a/tutorials/delegate-to-drep/index.html b/tutorials/delegate-to-drep/index.html index 1e665675..cdde903e 100644 --- a/tutorials/delegate-to-drep/index.html +++ b/tutorials/delegate-to-drep/index.html @@ -4,13 +4,13 @@ Delegate votes to a DRep | SanchoNet - +

    Delegate votes to a DRep

    Delegating your voting power to a SanchoNet delegate representative (DRep) operates much like delegating your stake to a stake pool. Voting power delegation involves the issuance of a delegation certificate from your stake key to the chosen SanchoNet DRep. Just as with stake delegation, the process of delegating votes to a SanchoNet DRep does not entail relinquishing control of your funds. Instead, the vote delegation certificate grants the selected DRep permission to vote on your behalf.

    In addition to the registered SanchoNet DReps, the system features a couple of default DReps:

    • --always-abstain: this option signals your intention not to participate in the voting procedures, indicating a choice to abstain from the voting process

    • --always-no-confidence: this option signifies your lack of trust in the current constitutional committee, indicating a vote of no confidence in their decisions

    Prerequisites

    • Payment keys and address with funds
    • Stake key
    • Default SanchoNet DRep selection: --always-abstain or --always-no-confidence
    • SanchoNet DRep ID (or verification key) of a registered DRep
    • A SanchoNet node

    Generating the vote delegation certificate

    1. Generate the vote delegation certificate.
    • Delegating to the --always-abstain default DRep:
    cardano-cli conway stake-address vote-delegation-certificate \
    --stake-verification-key-file stake.vkey \
    --always-abstain \
    --out-file vote-deleg.cert
    • Delegating to the --always-no-confidence default DRep:
    cardano-cli conway stake-address vote-delegation-certificate \
    --stake-verification-key-file stake.vkey \
    --always-no-confidence \
    --out-file vote-deleg.cert
    • Delegating to a registered SanchoNet DRep:
    cardano-cli conway stake-address vote-delegation-certificate \
    --stake-verification-key-file stake.vkey \
    --drep-key-hash $(cat drep.id) \
    --out-file vote-deleg.cert

    Submitting the certificate in a transaction

    1. Submit the vote delegation certificate in a transaction.
    • Build:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --witness-override 2 \
    --tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \
    --change-address $(cat payment.addr) \
    --certificate-file vote-deleg.cert \
    --out-file tx.raw
    • Sign with payment and stake keys:
    cardano-cli conway transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --testnet-magic 4 \
    --out-file tx.signed
    • Submit:
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed
    - + \ No newline at end of file diff --git a/tutorials/drep-registration/index.html b/tutorials/drep-registration/index.html index c0ddb9be..c21fe8b2 100644 --- a/tutorials/drep-registration/index.html +++ b/tutorials/drep-registration/index.html @@ -4,13 +4,13 @@ Registering as a SanchoNet delegate representative (DRep) | SanchoNet - +
    -

    Registering as a SanchoNet delegate representative (DRep)

    Pre-requisites

    • Payment address with funds
    • A SanchoNet node

    Generate SanchoNet DRep keys and an ID

    1. Generate a DRep key pair:
    cardano-cli conway governance drep key-gen \
    --verification-key-file drep.vkey \
    --signing-key-file drep.skey
    {
    "type": "DRepSigningKey_ed25519",
    "description": "Delegate Representative Signing Key",
    "cborHex": "5820eba7053fdc9cb3b8aacf142d3d4ad575bb48fb92f4082d81605ac8e2ccfead5d"
    }
    {
    "type": "DRepVerificationKey_ed25519",
    "description": "Delegate Representative Verification Key",
    "cborHex": "5820c19e0e939609531cfd04dcfa5bf1a5f3e245aa88e163759341aba296af34cc7e"
    }
    1. Generate a SanchoNet DRep ID:
    cardano-cli conway governance drep id \
    --drep-verification-key-file drep.vkey \
    --out-file drep.id
    drep124w9k5ml25kcshqet8r3g2pwk6kqdhj79thg2rphf5u5urve0an

    Generate the registration certificate

    1. Create a SanchoNet DRep registration certificate

    There are three ways to generate the certificate:

    • Using the drep.vkey file:
    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) \
    --out-file drep-register.cert
    • Using the DRep verification key:
    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) \
    --out-file drep-register.cert
    • Using the DRep ID:
    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) \
    --out-file drep-register.cert

    Any of the above methods produces drep-register.cert, which contains:

    {
    "type": "CertificateShelley",
    "description": "DRep Key Registration Certificate",
    "cborHex": "84108200581c555c5b537f552d885c1959c714282eb6ac06de5e2aee850c374d394e00f6"
    }

    Submit certificate in a transaction

    1. Submit the SanchoNet DRep registration certificate in a transaction.
    • Build:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --witness-override 2 \
    --tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \
    --change-address $(cat payment.addr) \
    --certificate-file drep-register.cert \
    --out-file tx.raw
    • Sign:
    cardano-cli conway transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file drep.skey \
    --testnet-magic 4 \
    --out-file tx.signed
    • Submit:
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed
    - +

    Registering as a SanchoNet delegate representative (DRep)

    Pre-requisites

    • Payment address with funds
    • A SanchoNet node

    Generate SanchoNet DRep keys and an ID

    1. Generate a DRep key pair:
    cardano-cli conway governance drep key-gen \
    --verification-key-file drep.vkey \
    --signing-key-file drep.skey
    {
    "type": "DRepSigningKey_ed25519",
    "description": "Delegate Representative Signing Key",
    "cborHex": "5820eba7053fdc9cb3b8aacf142d3d4ad575bb48fb92f4082d81605ac8e2ccfead5d"
    }
    {
    "type": "DRepVerificationKey_ed25519",
    "description": "Delegate Representative Verification Key",
    "cborHex": "5820c19e0e939609531cfd04dcfa5bf1a5f3e245aa88e163759341aba296af34cc7e"
    }
    1. Generate a SanchoNet DRep ID:
    cardano-cli conway governance drep id \
    --drep-verification-key-file drep.vkey \
    --out-file drep.id
    drep124w9k5ml25kcshqet8r3g2pwk6kqdhj79thg2rphf5u5urve0an

    Generate the registration certificate

    1. Create a SanchoNet DRep registration certificate

    There are three ways to generate the certificate:

    • Using the drep.vkey file:
    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 .currentPParams.dRepDeposit) \
    --out-file drep-register.cert
    • Using the DRep verification key:
    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 .currentPParams.dRepDeposit) \
    --out-file drep-register.cert
    • Using the DRep ID:
    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 .currentPParams.dRepDeposit) \
    --out-file drep-register.cert

    Any of the above methods produces drep-register.cert, which contains:

    {
    "type": "CertificateShelley",
    "description": "DRep Key Registration Certificate",
    "cborHex": "84108200581c555c5b537f552d885c1959c714282eb6ac06de5e2aee850c374d394e00f6"
    }

    Submit certificate in a transaction

    1. Submit the SanchoNet DRep registration certificate in a transaction.
    • Build:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --witness-override 2 \
    --tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \
    --change-address $(cat payment.addr) \
    --certificate-file drep-register.cert \
    --out-file tx.raw
    • Sign:
    cardano-cli conway transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file drep.skey \
    --testnet-magic 4 \
    --out-file tx.signed
    • Submit:
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed
    + \ No newline at end of file diff --git a/tutorials/file-naming-convention/index.html b/tutorials/file-naming-convention/index.html index 2d43753e..c9bc5879 100644 --- a/tutorials/file-naming-convention/index.html +++ b/tutorials/file-naming-convention/index.html @@ -4,14 +4,14 @@ File naming convention/schema | SanchoNet - +

    File naming convention/schema

    To align the tutorials, examples, and also third-party tooling, you can find a suggested file naming convention/schema related to the Conway and Voltaire eras in this document.

    The schemas can be extended with a *. prefix if needed. For example:

    • Suggested file name: drep.skey
    • Extended with a prefix: myname.drep.skey

    The naming convention is a work in progress. Please revisit this page regularly to check if any new or modified schemas have been selected.

    Constitution files

    Below is a list of currently used files related to the constitution's text-content/action/vote.

    Text/content

    constitution.txt / *.constitution.txt constitution in cleartext utf-8

    Action

    constitution.action / *.constitution.action for action file content in JSON

    Example content:

    {
    "type": "Governance proposal",
    "description": "",
    "cborHex": "841a000f4240581c1b7a61b...36a56ff490a4af6"
    }

    Vote

    constitution.vote / *.constitution.vote for the vote ballot in JSON

    Example content:

    {
    "type": "Governance vote",
    "description": "",
    "cborHex": "8482582064e7cad9b3ece...1e235709ffa691001f6"
    }

    SanchoNet delegate representatives (DReps) files

    Below is a list of currently used files related to SanchoNet DRep usage.

    Signing key

    Generated as a normal ed25519 key or derived from path 1852'/1815'/acc'/3/idx' drep.skey / *.drep.skey for the SanchoNet DRep secret-key JSON (see example content below)

    Example content:

    {
    "type": "DRepSigningKey_ed25519",
    "description": "Delegate Representative Signing Key",
    "cborHex": "00000"
    }
    {
    "type": "DRepExtendedSigningKey_ed25519_bip32",
    "description": "Delegate Representative Signing Key",
    "cborHex": "5840d84f8646463b03accf....da82c5dba3b1e4aa0df20b7"
    }

    The keys derived from hardware wallets will have the keyword 'Hardware' in the description field, such as: 'Hardware Delegate Representative Signing Key'.

    Verification key

    drep.vkey / *.drep.vkey for the SanchoNet DRep verification-key JSON (see example content below)

    Example content:

    {
    "type": "DRepVerificationKey_ed25519",
    "description": "Delegate Representative Verification Key",
    "cborHex": "00000"
    }
    {
    "type": "DRepExtendedVerificationKey_ed25519_bip32",
    "description": "Delegate Representative Verification Key",
    "cborHex": "5820fd6b3cda64cf11f9b91ea3c88dffed906bc872f1e24566d68637c718788638d9"
    }

    The keys derived from hardware wallets will have the keyword 'Hardware' in the description field, such as: Hardware Delegate Representative Verification Key

    Identification file (ID)

    drep.id / *.drep.id for the DRep ID in bech format drep1...

    Example content:

    drep12dggdndq3hhjzszukw5k5sulsesjux780s39h087s0p9vk6ylra

    Registration certificate

    drep-reg.cert / *.drep-reg.cert for the registration certificate JSON

    Example content:

    {
    "type": "CertificateConway",
    "description": "DRep Registration Certificate",
    "cborHex": "00000000"
    }

    Retirement certificate

    drep-ret.cert / *.drep-ret.cert for the de-registration/retirement certificate JSON

    Example content:

    {
    "type": "CertificateConway",
    "description": "DRep Retirement Certificate",
    "cborHex": "00000000"
    }

    Vote delegation certificate

    vote-deleg.cert / *.vote-deleg.cert for the vote delegation certificate JSON

    Example content:

    {
    "type": "CertificateConway",
    "description": "Vote Delegation Certificate",
    "cborHex": "83098200581cc827e7d1fb57cf12662203612fe1f0bb3578574b16f90f4a78cd355c8200581c44924d8233e23a4eda97ba2ce0a336d6152171e70960396b4903eb8a"
    }

    Constitution committee files

    Below is a list of currently used files related to the constitution committee member usage.

    Signing key (cold)

    cc-cold.skey / *.cc-cold.skey for the cold constitutional committee member secret-key JSON

    Signing key (hot)

    cc-hot.skey / *.cc-hot.skey for the hot constitutional committee member secret-key JSON

    Verification key (cold)

    cc-cold.vkey / *.cc-cold.vkey for the cold constitutional committee member verification-key JSON

    Verification key (hot)

    cc-hot.vkey / *.cc-hot.vkey for the hot constitutional committee member verification-key JSON

    - + \ No newline at end of file diff --git a/tutorials/jq-filters/index.html b/tutorials/jq-filters/index.html index be5fd279..9bbb87ab 100644 --- a/tutorials/jq-filters/index.html +++ b/tutorials/jq-filters/index.html @@ -4,14 +4,14 @@ Useful jq filters | SanchoNet - +

    Useful jq filters

    'jq is like sed for JSON data - you can use it to slice, filter, map, and transform structured data with the same ease that sed, awk, grep and friends let you play with text.'

    Install jq.

    Below you will find some useful jq filters to parse the governance state.

    Show governance actions that will expire at the end of the current epoch:

    current_epoch=$(cardano-cli query tip --testnet-magic 4 | jq .epoch)
    cardano-cli conway query gov-state --testnet-magic 4 \
    | jq --argjson epoch "$current_epoch" '.proposals
    | to_entries[]
    | select(.value.expiresAfter == $epoch)'

    Show governance actions that were proposed in the current epoch:

    current_epoch=$(cardano-cli query tip --testnet-magic 4 | jq .epoch)
    cardano-cli conway query gov-state --testnet-magic 4 \
    | jq -r --argjson epoch "$current_epoch" '.proposals
    | to_entries[]
    | select(.value.proposedIn == $epoch)'

    Sort governance actions by the number of DRep votes:

    cardano-cli conway query gov-state --testnet-magic 4 | jq -r '
    .proposals
    | to_entries[]
    | {govActionId: .key, type: .value.action.tag, drepVoteCount: (.value.dRepVotes | keys | length)}
    ' | jq -s 'sort_by(.voteCount) | reverse[]'

    Sort by the number of SPO votes:

    cardano-cli conway query gov-state --testnet-magic 4 | jq -r '
    .proposals
    | to_entries[]
    | {govActionId: .key, type: .value.action.tag, spoVoteCount: (.value.stakePoolVotes | keys | length)}
    ' | jq -s 'sort_by(.voteCount) | reverse[]'

    Sort by the number of CC votes:

    cardano-cli conway query gov-state --testnet-magic 4 | jq -r '
    .proposals
    | to_entries[]
    | {govActionId: .key, ccVoteCount: (.value.committeeVotes | keys | length)}
    ' | jq -s 'sort_by(.voteCount) | reverse[]'

    Filter actions that expire within the current and the next two epochs, including information about all roles' votes, sorted by expiration epoch:

    current_epoch=$(cardano-cli query tip --testnet-magic 4 | jq .epoch)
    cardano-cli conway query gov-state --testnet-magic 4 | jq -r --argjson current_epoch "$current_epoch" '
    .proposals
    | to_entries[]
    | select(.value.expiresAfter >= ($current_epoch | tonumber) and .value.expiresAfter <= ($current_epoch + 2))
    | {
    govActionId: .key,
    type: .value.action.tag,
    expiresAfter: .value.expiresAfter,
    committeeVotesCount: (.value.committeeVotes | length),
    dRepVotesCount: (.value.dRepVotes | length),
    stakePoolVotesCount: (.value.stakePoolVotes | length)
    }
    ' | jq -s 'sort_by(.expiresAfter)'

    Show actions for which a specific DRep key has voted, indicating the DRep's vote and the total number of votes received for this action:

    Replace 058b60ead63f667c0ff5b40e269dd1f05ce3a804256735ad4eddce20 with the hex DRep ID of your interest.

    cardano-cli conway query gov-state --testnet-magic 4 | jq -r --arg dRepKey "keyHash-058b60ead63f667c0ff5b40e269dd1f05ce3a804256735ad4eddce20" '
    .proposals
    | to_entries[]
    | select(.value.dRepVotes[$dRepKey] != null)
    | {
    govActionId: .key,
    type: .value.action.tag,
    dRepVote: .value.dRepVotes[$dRepKey],
    expiresAfter: .value.expiresAfter,
    committeeVotesCount: (.value.committeeVotes | length),
    dRepVotesCount: (.value.dRepVotes | length),
    stakePoolVotesCount: (.value.stakePoolVotes | length)
    }
    '

    Show actions where the given DRep key has not voted yet:

    Replace 058b60ead63f667c0ff5b40e269dd1f05ce3a804256735ad4eddce20 with the hex DRep ID of your interest.

    cardano-cli conway query gov-state --testnet-magic 4 | jq -r --arg dRepKey "keyHash-058b60ead63f667c0ff5b40e269dd1f05ce3a804256735ad4eddce20" '
    .proposals
    | to_entries[]
    | select(.value.dRepVotes[$dRepKey] == null)
    | {
    govActionId: .key,
    type: .value.action.tag,
    expiresAfter: .value.expiresAfter,
    committeeVotesCount: (.value.committeeVotes | length),
    dRepVotesCount: (.value.dRepVotes | length),
    stakePoolVotesCount: (.value.stakePoolVotes | length)
    }
    '

    Show the total number of 'yes', 'no', and 'abstain' votes for a given governance action ID:

    Replace cf2dce795cef4f8e92f0ab062a5dae0c1f7d8891d943ced9c2eeda9a62d8f092#0 with the governance action ID of your interest.

    cardano-cli conway query gov-state --testnet-magic 4 | jq -r --arg actionId "cf2dce795cef4f8e92f0ab062a5dae0c1f7d8891d943ced9c2eeda9a62d8f092#0" '
    .proposals
    | to_entries[]
    | select(.key == $actionId)
    | { govActionId: .key,
    dRepVoteYesCount: (.value.dRepVotes | with_entries(select(.value == "VoteYes")) | length),
    dRepVoteNoCount: (.value.dRepVotes | with_entries(select(.value == "VoteNo")) | length),
    dRepAbstainCount: (.value.dRepVotes | with_entries(select(.value == "Abstain")) | length),
    stakePoolVoteYesCount: (.value.stakePoolVotes | with_entries(select(.value == "VoteYes")) | length),
    stakePoolVoteNoCount: (.value.stakePoolVotes | with_entries(select(.value == "VoteNo")) | length),
    stakePoolAbstainCount: (.value.stakePoolVotes | with_entries(select(.value == "Abstain")) | length),
    committeeVoteYesCount: (.value.committeeVotes | with_entries(select(.value == "VoteYes")) | length),
    committeeVoteNoCount: (.value.committeeVotes | with_entries(select(.value == "VoteNo")) | length),
    committeeAbstainCount: (.value.committeeVotes | with_entries(select(.value == "Abstain")) | length)
    }
    '

    Show the active treasury withdrawal governance actions and their current vote count:

    current_epoch=$(cardano-cli query tip --testnet-magic 4 | jq .epoch)

    cardano-cli conway query gov-state --testnet-magic 4 | jq -r --arg currentEpoch "$current_epoch" '
    .proposals
    | to_entries[]
    | select(.value.expiresAfter > ($currentEpoch | tonumber) and .value.action.tag == "TreasuryWithdrawals")
    | { govActionId: .key,
    type: .value.action.tag,
    expiresAfter: .value.expiresAfter,
    dRepVoteYesCount: (.value.dRepVotes | with_entries(select(.value == "VoteYes")) | length),
    dRepVoteNoCount: (.value.dRepVotes | with_entries(select(.value == "VoteNo")) | length),
    dRepAbstainCount: (.value.dRepVotes | with_entries(select(.value == "Abstain")) | length),
    committeeVoteYesCount: (.value.committeeVotes | with_entries(select(.value == "VoteYes")) | length),
    committeeVoteNoCount: (.value.committeeVotes | with_entries(select(.value == "VoteNo")) | length),
    committeeAbstainCount: (.value.committeeVotes | with_entries(select(.value == "Abstain")) | length)
    }
    ' | jq -s 'sort_by(.expiresAfter)'

    Show the active update committee governance actions and their current vote count:

    current_epoch=$(cardano-cli query tip --testnet-magic 4 | jq .epoch)

    cardano-cli conway query gov-state --testnet-magic 4 | jq -r --arg currentEpoch "$current_epoch" '
    .proposals
    | to_entries[]
    | select(.value.expiresAfter > ($currentEpoch | tonumber) and .value.action.tag == "UpdateCommittee")
    | { govActionId: .key,
    type: .value.action.tag,
    expiresAfter: .value.expiresAfter,
    dRepVoteYesCount: (.value.dRepVotes | with_entries(select(.value == "VoteYes")) | length),
    dRepVoteNoCount: (.value.dRepVotes | with_entries(select(.value == "VoteNo")) | length),
    dRepAbstainCount: (.value.dRepVotes | with_entries(select(.value == "Abstain")) | length),
    stakePoolVoteYesCount: (.value.stakePoolVotes | with_entries(select(.value == "VoteYes")) | length),
    stakePoolVoteNoCount: (.value.stakePoolVotes | with_entries(select(.value == "VoteNo")) | length),
    stakePoolAbstainCount: (.value.stakePoolVotes | with_entries(select(.value == "Abstain")) | length)
    }
    ' | jq -s 'sort_by(.expiresAfter)'
    - + \ No newline at end of file diff --git a/tutorials/register-stake-address/index.html b/tutorials/register-stake-address/index.html index d8b67885..a3ba2c15 100644 --- a/tutorials/register-stake-address/index.html +++ b/tutorials/register-stake-address/index.html @@ -4,14 +4,14 @@ Stake address registration certificate | SanchoNet - +

    Stake address registration certificate

    To take part on the SanchoNet consensus protocol, we need to submit a stake address registration certificate to the chain. This allows to delegate stake to a SanchoNet stake pool -and votes to a SanchoNet delegate representative (DRep).

    Pre-requisites

    • Stake key pair
    • Payment key pair
    • Address with funds
    • A SanchoNet node

    Generate the registration certificate

    1. Register the stake address you previously created by generating a registration certificate:
    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) \
    --out-file registration.cert

    Submit the certificate to the chain

    1. Build, sign and submit the transaction.
    • Build the transaction:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --witness-override 2 \
    --tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \
    --change-address $(cat payment.addr) \
    --certificate-file registration.cert \
    --out-file tx.raw
    • Sign the transaction:
    cardano-cli conway transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --testnet-magic 4 \
    --out-file tx.signed
    • Submit the transaction:
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed
    - +and votes to a SanchoNet delegate representative (DRep).

    Pre-requisites

    • Stake key pair
    • Payment key pair
    • Address with funds
    • A SanchoNet node

    Generate the registration certificate

    1. Register the stake address you previously created by generating a registration certificate:
    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 .currentPParams.stakeAddressDeposit) \
    --out-file registration.cert

    Submit the certificate to the chain

    1. Build, sign and submit the transaction.
    • Build the transaction:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --witness-override 2 \
    --tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \
    --change-address $(cat payment.addr) \
    --certificate-file registration.cert \
    --out-file tx.raw
    • Sign the transaction:
    cardano-cli conway transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --testnet-magic 4 \
    --out-file tx.signed
    • Submit the transaction:
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed
    + \ No newline at end of file diff --git a/tutorials/stake-pool-registration/index.html b/tutorials/stake-pool-registration/index.html index 72f1bed7..37ab3da7 100644 --- a/tutorials/stake-pool-registration/index.html +++ b/tutorials/stake-pool-registration/index.html @@ -4,16 +4,16 @@ Register a stake pool | SanchoNet - +

    Register a stake pool

    WARNING: This tutorial is simplified and deliberately excludes secure key handling which is essential for other testnets and mainnet. For a comprehensive tutorial, see the Cardano course where you can access video lessons and a more detailed instruction handbook.

    Prerequisites

    Before you start, ensure that you have:

    1. A running node: see the tutorial
    2. Created keys and addresses: see the tutorial
    3. Requested funds from the faucet

    Set up a relay node

    Setting up a stake pool on SanchoNet involves configuring a block producer node and at least one relay node. The relay node plays a crucial role in propagating the blocks forged by your block-producing node, as well as fetching blocks from other stake pools and serving them to your block producer. In this structure, the block producer communicates solely with your relay node, which in turn interfaces with the rest of the network. This ensures a streamlined communication process and helps to secure your block producer.

    The typical configuration of the stake pool should resemble the following:

    diagram

    To set up your relay node, carry out the following steps:

    1. Install the Cardano node and the Cardano CLI on your relay node.

    2. Configure the firewall for incoming connections: set up the firewall to accept incoming connections on the specific port that you'll be using for the Cardano node. This allows other nodes, including your block producer, to communicate with your relay.

    3. Configure the firewall for outgoing connections: enable the firewall to allow outgoing connections. This configuration ensures that your relay node can contact other relay nodes in the network as well as your block producer node.

    4. Run the node with P2P topology: start your node using the P2P topology setting.

    {
    "localRoots":[
    {
    "accessPoints":[],
    "advertise":false,
    "valency":2
    }
    ],
    "publicRoots":[
    {
    "accessPoints":[
    {
    "address":"sanchonet-node.world.dev.cardano.org",
    "port":30004
    }
    ],
    "advertise":false
    }
    ],
    "useLedgerAfterSlot":1000000
    }

    Set up a block producer

    Setting up your block producer involves similar steps, but there are a few differences in the configuration:

    1. Install the Cardano node and the Cardano CLI on your block producer node.

    2. Configure the firewall for incoming connections: set up the firewall to accept incoming connections only from your relay node on the specific port that you'll be using for the Cardano node. This ensures that only your relay node can communicate with your block producer.

    3. Configure the firewall for outgoing connections: enable the firewall to allow outgoing connections, preferably, only to your own relay's IP and port.

    4. Run the node with P2P topology: start your node using the P2P topology configuration. This time, replace "address":"x.x.x.x" and "port":3000 with the actual IP address -and the port of your own relay node. Note that the block producer does not connect to sanchonet-node.world.dev.cardano.org and we avoid using ledger peers by setting "useLedgerAfterSlot¨to -1

    {
    "localRoots":[
    {
    "accessPoints":[
    {
    "address":"x.x.x.x",
    "port":3000
    }
    ],
    "advertise":false,
    "valency":2
    }
    ],
    "publicRoots":[
    {
    "accessPoints":[
    ],
    "advertise":false
    }
    ],
    "useLedgerAfterSlot":-1
    }

    Install jq and set the node socket path

    1. Install jq, a tool that will assist in parsing the UTXOs for transactions:
    sudo apt-get install jq -y
    1. Set the CARDANO_NODE_SOCKET_PATH variable to the path of node.socket that you identified when starting the node:
    export CARDANO_NODE_SOCKET_PATH=~/node.socket

    Register the stake address

    1. Register the stake address you previously created by generating a registration certificate:
    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) \
    --out-file registration.cert
    1. Create a transaction to submit the stake key registration certificate to the chain. Creating a transaction using the CLI always involves a three-step process: BUILDING, SIGNING, AND SUBMITTING the transaction.
    • Build the transaction:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --witness-override 2 \
    --tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \
    --change-address $(cat payment.addr) \
    --certificate-file registration.cert \
    --out-file tx.raw
    • Sign the transaction:
    cardano-cli conway transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --testnet-magic 4 \
    --out-file tx.signed
    • Submit the transaction:
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed

    Generate keys for the stake pool

    1. Generate cold keys and the operational certificate for your pool:
    cardano-cli conway node key-gen \
    --cold-verification-key-file cold.vkey \
    --cold-signing-key-file cold.skey \
    --operational-certificate-issue-counter-file opcert.counter
    1. Generate the key-evolving-signature (KES) keys:
    cardano-cli conway node key-gen-KES \
    --verification-key-file kes.vkey \
    --signing-key-file kes.skey
    1. Generate VRF keys:
    cardano-cli conway node key-gen-VRF \
    --verification-key-file vrf.vkey \
    --signing-key-file vrf.skey

    Generate the registration and delegation certificates for the pool

    1. Create your stake pool registration certificate:
    cardano-cli conway stake-pool registration-certificate \
    --cold-verification-key-file cold.vkey \
    --vrf-verification-key-file vrf.vkey \
    --pool-pledge 9000000000 \
    --pool-cost 340000000 \
    --pool-margin 0.05 \
    --pool-reward-account-verification-key-file stake.vkey \
    --pool-owner-stake-verification-key-file stake.vkey \
    --testnet-magic 4 \
    --pool-relay-ipv4 <RELAY NODE PUBLIC IP> \
    --pool-relay-port <RELAY NODE PORT> \
    --out-file pool-registration.cert
    1. Create a stake delegation certificate:
    cardano-cli conway stake-address stake-delegation-certificate \
    --stake-verification-key-file stake.vkey \
    --cold-verification-key-file cold.vkey \
    --out-file delegation.cert

    Submit the certificates in a transaction

    1. Build, sign and submit the transaction
    • Build:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --witness-override 3 \
    --tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \
    --change-address $(cat payment.addr) \
    --certificate-file pool-registration.cert \
    --certificate-file delegation.cert \
    --out-file tx.raw
    • Sign:
    cardano-cli conway transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file cold.skey \
    --signing-key-file stake.skey \
    --testnet-magic 4 \
    --out-file tx.signed
    • Submit:
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed
    1. Get your pool ID, you will need to get a delegation from the faucet:
    cardano-cli conway stake-pool id \
    --cold-verification-key-file cold.vkey \
    --output-format bech32 \
    --out-file pool.id

    Starting the node as a block-producer

    1. Generate your operational certificate:
    slotsPerKESPeriod=$(cat shelley-genesis.json | jq -r '.slotsPerKESPeriod')
    slotNo=$(cardano-cli query tip --testnet-magic 4 | jq -r '.slot')
    kesPeriod=$((${slotNo} / ${slotsPerKESPeriod}))
    cardano-cli conway node issue-op-cert --kes-verification-key-file kes.vkey --cold-signing-key-file cold.skey --operational-certificate-issue-counter-file opcert.counter --kes-period ${kesPeriod} --out-file opcert.cert
    1. Request a stake delegation from the faucet. Note that although the delegation will ocurr immediately, you will need two more epochs +and the port of your own relay node. Note that the block producer does not connect to sanchonet-node.world.dev.cardano.org and we avoid using ledger peers by setting "useLedgerAfterSlot¨to -1

    {
    "localRoots":[
    {
    "accessPoints":[
    {
    "address":"x.x.x.x",
    "port":3000
    }
    ],
    "advertise":false,
    "valency":2
    }
    ],
    "publicRoots":[
    {
    "accessPoints":[
    ],
    "advertise":false
    }
    ],
    "useLedgerAfterSlot":-1
    }

    Install jq and set the node socket path

    1. Install jq, a tool that will assist in parsing the UTXOs for transactions:
    sudo apt-get install jq -y
    1. Set the CARDANO_NODE_SOCKET_PATH variable to the path of node.socket that you identified when starting the node:
    export CARDANO_NODE_SOCKET_PATH=~/node.socket

    Register the stake address

    1. Register the stake address you previously created by generating a registration certificate:
    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 .currentPParams.stakeAddressDeposit) \
    --out-file registration.cert
    1. Create a transaction to submit the stake key registration certificate to the chain. Creating a transaction using the CLI always involves a three-step process: BUILDING, SIGNING, AND SUBMITTING the transaction.
    • Build the transaction:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --witness-override 2 \
    --tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \
    --change-address $(cat payment.addr) \
    --certificate-file registration.cert \
    --out-file tx.raw
    • Sign the transaction:
    cardano-cli conway transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file stake.skey \
    --testnet-magic 4 \
    --out-file tx.signed
    • Submit the transaction:
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed

    Generate keys for the stake pool

    1. Generate cold keys and the operational certificate for your pool:
    cardano-cli conway node key-gen \
    --cold-verification-key-file cold.vkey \
    --cold-signing-key-file cold.skey \
    --operational-certificate-issue-counter-file opcert.counter
    1. Generate the key-evolving-signature (KES) keys:
    cardano-cli conway node key-gen-KES \
    --verification-key-file kes.vkey \
    --signing-key-file kes.skey
    1. Generate VRF keys:
    cardano-cli conway node key-gen-VRF \
    --verification-key-file vrf.vkey \
    --signing-key-file vrf.skey

    Generate the registration and delegation certificates for the pool

    1. Create your stake pool registration certificate:
    cardano-cli conway stake-pool registration-certificate \
    --cold-verification-key-file cold.vkey \
    --vrf-verification-key-file vrf.vkey \
    --pool-pledge 9000000000 \
    --pool-cost 340000000 \
    --pool-margin 0.05 \
    --pool-reward-account-verification-key-file stake.vkey \
    --pool-owner-stake-verification-key-file stake.vkey \
    --testnet-magic 4 \
    --pool-relay-ipv4 <RELAY NODE PUBLIC IP> \
    --pool-relay-port <RELAY NODE PORT> \
    --out-file pool-registration.cert
    1. Create a stake delegation certificate:
    cardano-cli conway stake-address stake-delegation-certificate \
    --stake-verification-key-file stake.vkey \
    --cold-verification-key-file cold.vkey \
    --out-file delegation.cert

    Submit the certificates in a transaction

    1. Build, sign and submit the transaction
    • Build:
    cardano-cli conway transaction build \
    --testnet-magic 4 \
    --witness-override 3 \
    --tx-in $(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]') \
    --change-address $(cat payment.addr) \
    --certificate-file pool-registration.cert \
    --certificate-file delegation.cert \
    --out-file tx.raw
    • Sign:
    cardano-cli conway transaction sign \
    --tx-body-file tx.raw \
    --signing-key-file payment.skey \
    --signing-key-file cold.skey \
    --signing-key-file stake.skey \
    --testnet-magic 4 \
    --out-file tx.signed
    • Submit:
    cardano-cli conway transaction submit \
    --testnet-magic 4 \
    --tx-file tx.signed
    1. Get your pool ID, you will need to get a delegation from the faucet:
    cardano-cli conway stake-pool id \
    --cold-verification-key-file cold.vkey \
    --output-format bech32 \
    --out-file pool.id

    Starting the node as a block-producer

    1. Generate your operational certificate:
    slotsPerKESPeriod=$(cat shelley-genesis.json | jq -r '.slotsPerKESPeriod')
    slotNo=$(cardano-cli query tip --testnet-magic 4 | jq -r '.slot')
    kesPeriod=$((${slotNo} / ${slotsPerKESPeriod}))
    cardano-cli conway node issue-op-cert --kes-verification-key-file kes.vkey --cold-signing-key-file cold.skey --operational-certificate-issue-counter-file opcert.counter --kes-period ${kesPeriod} --out-file opcert.cert
    1. Request a stake delegation from the faucet. Note that although the delegation will ocurr immediately, you will need two more epochs for your Block producer to start creating blocks. This due to the stake snashopt mechanism.

    2. Restart your node using your pool credentials:

    cardano-node run --topology topology.json \
    --database-path db \
    --socket-path node.socket \
    --shelley-kes-key kes.skey \
    --shelley-vrf-key vrf.skey \
    --shelley-operational-certificate opcert.cert \
    --port 3001 \
    --config config.json
    1. Your stake pool will take part of the stake snapshot on the next epoch boundary. After that, you will be able to query the stake delegated to your pool:
    cardano-cli conway query stake-snapshot \
    --testnet-magic 4 \
    --stake-pool-id <pool_id>
    1. After two epochs (2 days in SanchoNet) your stake pool should start producing blocks, the easiest way to verify it is to grep your node logs
    grep -e TraceForgedBlock
    - + \ No newline at end of file diff --git a/tutorials/start-node/index.html b/tutorials/start-node/index.html index 15292c8e..b40cc7be 100644 --- a/tutorials/start-node/index.html +++ b/tutorials/start-node/index.html @@ -4,13 +4,13 @@ Start a SanchoNet node | SanchoNet - +

    Start a SanchoNet node

    Download or build cardano-node and cardano-cli binaries:

    • The latest version for SanchoNet is 8.8.1-pre. See releases.

    Get configuration files

    wget https://book.world.dev.cardano.org/environments/sanchonet/config.json
    wget https://book.world.dev.cardano.org/environments/sanchonet/topology.json
    wget https://book.world.dev.cardano.org/environments/sanchonet/byron-genesis.json
    wget https://book.world.dev.cardano.org/environments/sanchonet/shelley-genesis.json
    wget https://book.world.dev.cardano.org/environments/sanchonet/alonzo-genesis.json
    wget https://book.world.dev.cardano.org/environments/sanchonet/conway-genesis.json

    Run the node

    cardano-node run --topology topology.json \
    --database-path db \
    --socket-path node.socket \
    --port 3001 \
    --config config.json

    Need help?

    For a step-by-step tutorial on how to build and run a node please visit Cardano node course | Building and running the node.

    - + \ No newline at end of file diff --git a/tutorials/vote-action/index.html b/tutorials/vote-action/index.html index 4bd2ef7b..28ac457f 100644 --- a/tutorials/vote-action/index.html +++ b/tutorials/vote-action/index.html @@ -4,13 +4,13 @@ Voting on governance actions | SanchoNet - +

    Voting on governance actions

    Pre-requisites

    • Payment key pair
    • Address with funds
    • CC hot, DRep OR stake pool keys
    • A SanchoNet node

    To vote on governance actions, follow this process:

    1. Obtain the action ID of an ongoing governance action from Discord or query the governance state.
    2. Determine your voting stance; engage in discussion if required
    3. Construct your vote file through the Cardano CLI. The example below demonstrates voting --yes, although options for --no or --abstain are also available.

    Verify the content of the governance action

    Assume that we have been given the action ID df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79#0 for a new constitution proposal.

    1. Obtain the URL and hash of the new constitution proposal from the governance state:
    cardano-cli conway query gov-state --testnet-magic 4 | \
    jq -r --arg govActionId "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" '.proposals | to_entries[] | select(.value.actionId.txId | contains($govActionId)) | .value'
    {
    "action": {
    "contents": [
    null,
    {
    "anchor": {
    "dataHash": "5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d",
    "url": "https://tinyurl.com/mr3ferf9"
    }
    }
    ],
    "tag": "NewConstitution"
    },
    "actionId": {
    "govActionIx": 0,
    "txId": "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79"
    },
    "committeeVotes": {
    "keyHash-c8ac605b25d6084c2ceb28043c8f01b62629966d038a249c7847d66d": "VoteYes",
    "keyHash-d13507f7e7fb8ac3ce2094187c9d99d4601021e9ef5a5f310567765d": "VoteYes"
    },
    "dRepVotes": {
    "keyHash-16faaf6daa2635bbf53bbbaf38b3a6040adf7ced2f7f08952592cf5b": "VoteYes",
    "keyHash-57cb90cfb635e76af648abf1b6a91519218a5919b3cba2527e3725d1": "VoteYes",
    "keyHash-7d84808d563f0f258ad7e4337c2c4bd13010930ebdf7b86c3bfd9ef8": "VoteYes"
    },
    "deposit": 0,
    "expiresAfter": 80,
    "proposedIn": 78,
    "returnAddr": {
    "credential": {
    "keyHash": "f925cbd4eb78aad49ec7bf9b4ddfa4cc4486c967e392699d143c81aa"
    },
    "network": "Testnet"
    },
    "stakePoolVotes": {}
    }
    1. Download the file from the URL registered on the ledger state:
    wget https://tinyurl.com/mr3ferf9 -O constitution.txt
    1. Verify that the hash of the file matches the dataHashfrom the ledger state:
    b2sum -l 256 constitution.txt
    5d372dca1a4cc90d7d16d966c48270e33e3aa0abcb0e78f0d5ca7ff330d2245d constitution.txt

    Everything is in order; the text at the URL matches the dataHash, confirming that the text at the URL is precisely what we are voting for.

    In the future, voting apps, explorers, wallets, and other tools could perform the filtering, ensuring that they only display actions whose URL content has been verified against the hash on the ledger state.

    Create the vote file

    1. Vote with DRep keys:
    cardano-cli conway governance vote create \
    --yes \
    --governance-action-tx-id "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" \
    --governance-action-index "0" \
    --drep-verification-key-file drep.vkey \
    --out-file df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79-constitution.vote
    1. Vote with CC hot keys:
    cardano-cli conway governance vote create \
    --yes \
    --governance-action-tx-id "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" \
    --governance-action-index "0" \
    --cc-hot-verification-key-file cc-hot.vkey \
    --out-file df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79-constitution.vote
    1. Vote with SPO keys:
    cardano-cli conway governance vote create \
    --yes \
    --governance-action-tx-id "df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79" \
    --governance-action-index "0" \
    --cold-verification-key-file cold.vkey \
    --out-file df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79-constitution.vote

    Include the vote in a transaction

    • Build the transaction:
    cardano-cli conway transaction build --testnet-magic 4 \
    --tx-in "$(cardano-cli query utxo --address $(cat payment.addr) --testnet-magic 4 --out-file /dev/stdout | jq -r 'keys[0]')" \
    --change-address $(cat payment.addr) \
    --vote-file df58f714c0765f3489afb6909384a16c31d600695be7e86ff9c59cf2e8a48c79-constitution.vote \
    --witness-override 2 \
    --out-file vote-tx.raw
    • Sign it with the DRep key:
    cardano-cli transaction sign --tx-body-file vote-tx.raw \
    --signing-key-file drep.skey \
    --signing-key-file payment.skey \
    --testnet-magic 4 \
    --out-file vote-tx.signed
    • OR sign it with the CC hot key:
    cardano-cli transaction sign --tx-body-file vote-tx.raw \
    --signing-key-file cc-hot.skey \
    --signing-key-file payment.skey \
    --testnet-magic 4 \
    --out-file vote-tx.signed
    • OR sign it with the SPO cold key:
    cardano-cli transaction sign --tx-body-file vote-tx.raw \
    --signing-key-file cold.skey \
    --signing-key-file payment.skey \
    --testnet-magic 4 \
    --out-file vote-tx.signed
    • Submit the transaction:
    cardano-cli transaction submit --testnet-magic 4 --tx-file vote-tx.signed
    - + \ No newline at end of file diff --git a/why-sanchonet/barataria/index.html b/why-sanchonet/barataria/index.html index f5c34152..c39e8c9a 100644 --- a/why-sanchonet/barataria/index.html +++ b/why-sanchonet/barataria/index.html @@ -4,14 +4,14 @@ Barataria | SanchoNet - +

    Barataria

    Barataria plays a unique and significant role in 'Don Quixote.' While existing only in fiction, its symbolism and the events that unfold within its imagined boundaries contribute meaningfully to the novel's exploration of leadership, governance, idealism, and reality.

    In the story, Barataria is a fictional island promised to Sancho Panza, Don Quixote's loyal squire, as a reward for his devoted service. The pledge of ruling Barataria fuels Sancho's dreams and expectations. When a duke and duchess, entertained by Don Quixote and Sancho, decide to actualize this promise, they execute an elaborate prank by appointing Sancho as the governor of the nonexistent island.

    The Barataria episode offers an opportunity to explore Sancho's character, unveiling his practical wisdom and inherent common sense. Despite the absurd situations aimed at testing and mocking him, Sancho governs with dignity, simplicity, and intelligence. His judgments and decrees are marked by a natural grasp of justice and human nature. Instead of becoming a fool in a comedic setting, Sancho turns Barataria into a stage for showcasing his authentic wisdom and leadership.

    Barataria also serves as a mirror to the broader themes of the novel. Just as Don Quixote's idealism often clashes with the harsh realities of the world, Sancho's time in Barataria illustrates the tension between appearance and substance, dream and reality, folly and wisdom. It is a microcosm of the novel's intricate dance between the world as it is and the world as it could be.

    Barataria serves as a link between the lofty ideals of chivalry embodied by Don Quixote and the grounded realism of Sancho. Within this imaginary island, the dreams of both characters converge, and their contrasts find a harmonious resolution.

    In Western literature, the Barataria episode has transcended its origin to become a symbol of leadership that is wise, compassionate, and unpretentious. It stands as a reminder that true wisdom often resides in simplicity and that leadership can be found in the most unlikely places.

    - + \ No newline at end of file diff --git a/why-sanchonet/don-quixote/index.html b/why-sanchonet/don-quixote/index.html index 72ac47f6..7b110c38 100644 --- a/why-sanchonet/don-quixote/index.html +++ b/why-sanchonet/don-quixote/index.html @@ -4,14 +4,14 @@ Don Quixote | SanchoNet - +

    Don Quixote

    Alonso Quijano, the man who would become Don Quixote, begins as an ordinary gentleman from the La Mancha region. He's known to be deeply fixated on books of chivalry. This eventually causes him to lose touch with reality. He decides to resurrect the age of chivalry, renaming himself 'Don Quixote de la Mancha.' This signifies the onset of his transformation, both in regard to his identity and how the world views him.

    In the beginning, Don Quixote's idealism is unrestrained and almost childlike. He perceives the world through a fantastical lens, turning windmills into giants and common inns into castles. His commitment to chivalric codes and virtues is unwavering, albeit frequently misdirected. His notions of honor, justice, and love are drawn from his readings, not real-life encounters. This often leads him into absurd and humorous predicaments. Don Quixote's idealism often materializes as a stubborn refusal to see the world as it truly is, exemplified by his renowned attack on windmills that he misidentifies as giants.

    As the novel unfolds, Don Quixote's character gradually evolves. The initial portrayal of a madman driven by unattainable dreams slowly gives way to a more nuanced and intricate individual. Despite his delusions, nobility resides in his ideals that begin to resonate with those around him. His faith in his knightly mission affects those he encounters, and even those who initially dismiss him as mad come to recognize the sincerity and purity of his beliefs.

    While his squire, Sancho Panza, serves as a foil and grounding influence, Don Quixote also influences Sancho. The relationship between the two characters deepens, as each leaves their mark on the other. Over time, Don Quixote's lofty ideals gradually meld with a more pragmatic grasp of reality, while Sancho starts to appreciate the merits of his master's chivalric worldview.

    As the story concludes, Don Quixote's character experiences a remarkable evolution. His adventures have led to personal growth, deepening wisdom, and a more profound understanding of himself and the world around him. The sharp contrast between idealism and realism has dissolved, giving rise to a more harmonized and human portrayal.

    The culmination of this evolution arrives with the tragic realization of his madness and his decision to forsake his knightly persona, reverting back to Alonso Quijano. This final transformation is tinged with sadness, as it signifies the loss of the beautiful ideals that drove him, but it also represents a return to sanity and a reconciliation with the real world.

    The character of Don Quixote is multi-layered, showcasing a complex evolution. Starting from the naive and delusional Quijano, progressing to the quixotic yet profoundly honorable Don Quixote, and culminating in the wiser and more self-aware man by the narrative's closure, Cervantes skillfully constructs a character that encapsulates the human conflict between idealism and reality. His journey resonates because it mirrors the quest for meaning, virtue, and self-understanding, making Don Quixote a timeless and universal figure in literature.

    - + \ No newline at end of file diff --git a/why-sanchonet/index.html b/why-sanchonet/index.html index 97a9fc34..1628dd49 100644 --- a/why-sanchonet/index.html +++ b/why-sanchonet/index.html @@ -4,13 +4,13 @@ Why SanchoNet? | SanchoNet - +

    Why SanchoNet?

    The selection of the name 'SanchoNet' draws inspiration from the intricate and multifaceted character of Sancho Panza, Don Quixote’s companion in Miguel de Cervantes’ literary classic. In the narrative, Sancho's transformation from a humble farmer to a wise governor and loyal friend mirrors virtues that align with the principles steering the evolution and governance of this network.

    Sancho's growth throughout the novel represents a synthesis of realism and idealism. He starts with a practical, down-to-earth perspective but gradually appreciates and even embraces the nobility in Don Quixote's vision of chivalry. His transformation culminates in the episode of governing the fictional 'Island of Barataria,' where his innate wisdom and common sense guide him in delivering fair and wise judgments.

    Sancho's capability to harmonize pragmatic realities with lofty ideals mirrors the essence of SanchoNet. Much like Sancho, the mission of SanchoNet is to cultivate a system that remains grounded in reality while guided by visionary principles. The ultimate goal? To establish a platform where every voice holds significance, embracing inclusivity and pragmatic wisdom in governance.

    The choice of 'SanchoNet' also mirrors the character's transformative journey, echoing the broader themes of growth, self-assurance, and integrity that resonate throughout 'Don Quixote.' The parallel between Sancho and the chivalric code, his self-discovery, and his courage to embrace the extraordinary within himself symbolizes Cardano's aspiration to innovate, empower individuals, and attain greatness.

    Moreover, the intimate relationship between Don Quixote and Sancho, characterized by friendship, mutual influence, and a complex balance between dreams and reality, parallels the collaborative spirit that SanchoNet aims to cultivate within the Cardano community. This partnership transcends mere transactional engagements and evolves into a collective journey toward a more equitable, visionary, and improved ecosystem.

    - + \ No newline at end of file diff --git a/why-sanchonet/sancho-panza/index.html b/why-sanchonet/sancho-panza/index.html index e1803f8e..e04f5fe7 100644 --- a/why-sanchonet/sancho-panza/index.html +++ b/why-sanchonet/sancho-panza/index.html @@ -4,7 +4,7 @@ Sancho Panza | SanchoNet - + @@ -17,7 +17,7 @@ them against the skepticism of others. By the end of the story, Sancho's character grows into a synthesis of realism and idealism, embodying the wisdom of the common man and the nobility of the knight-errant.

    Sancho's evolution is a testament to the profound impact of friendship, idealism, and personal growth. His journey reflects the novel's rich exploration of human nature, presenting a timeless portrayal of an ordinary man achieving greatness through wisdom, integrity, and the courage to embrace the extraordinary within himself.

    - + \ No newline at end of file