From 75cee85157a99f499e2d7db7fdc65fc8c40be0d4 Mon Sep 17 00:00:00 2001 From: CarlosLopezDeLara Date: Mon, 22 Jun 2020 21:11:58 -0500 Subject: [PATCH 01/11] Update 080_register_stakepool.md --- node-setup/080_register_stakepool.md | 42 +++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/node-setup/080_register_stakepool.md b/node-setup/080_register_stakepool.md index 6ba4dc0..2fcbfda 100644 --- a/node-setup/080_register_stakepool.md +++ b/node-setup/080_register_stakepool.md @@ -1,4 +1,4 @@ -# Register a Stake Pool +# Register a Stake Pool with Metadata ### Prerequisites @@ -30,25 +30,48 @@ At this moment we have: Registering your stake pool requires: +* Create JSON file with your metadata and store it in the node and in a url you maintain. +* Get the hash of your JSON file * Generate the stake pool registration certificate * Create a delegation certificate (pledge) * Submit the certificates to the blockchain **WARNING:** Generating the __stake pool registration certificate__ and the __delegation certificate__ requires the __cold keys__ So, you may want to generate these certificates in your local machine taking the proper security measures to avoid exposing your cold keys to the internet. -### 1. Generate Stake pool registration certificate +### 1. Create a JSON file with your pool's metadata + + { + "name": "TestPool", + "description": "The pool that tests all the pools", + "ticker": "TEST", + "homepage": "https://teststakepool.com" + } + +Store the file in your node and in a url you maintain, for example [https://gist.githubusercontent.com/testPool/.../testPool.json](shorturl.at/gDV47) + +### 2. Get the hash of your file: + + cardano-cli shelley stake-pool metadata-hash --pool-metadata-file testPool.json + + >6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af + +### 3. Generate Stake pool registration certificate Create a _stake pool registration certificate_: cardano-cli shelley stake-pool registration-certificate \ --cold-verification-key-file cold.vkey \ --vrf-verification-key-file vrf.vkey \ - --pool-pledge 100000000000 \ - --pool-cost 10000000000 \ - --pool-margin 0.05 \ + --pool-pledge \ + --pool-cost \ + --pool-margin \ --pool-reward-account-verification-key-file stake.vkey \ --pool-owner-stake-verification-key-file stake.vkey \ --testnet-magic 42 \ + --pool-relay-port \ + --pool-relay-ipv4 \ + --metadata-url https://gist.githubusercontent.com/testPool/.../testPool.json \ + --metadata-hash 6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af \ --out-file pool.cert | Parameter | Explanation | @@ -61,6 +84,11 @@ Create a _stake pool registration certificate_: | pool-reward-account-verification-key-file | verification staking key for the rewards | | pool-owner-staking-verification-key-file | verification staking key(s) for the pool owner(s) | | out-file | output file to write the certificate to | +| pool-relay-port | port | +| pool-relay-ipv4 | relay node ip address | +| metadata-url | url of your json file | +| metadata-hash | the hash of pools json metadata file | + So in the example above, we use the cold- and VRF-keys that we created [here](060_node_keys.md), promise to pledge 100,000 ada to our pool, declare operational costs of 10,000 ada per epoch, @@ -81,7 +109,7 @@ The __pool.cert__ file should look like this: 46f1a68bdf8113f50e779d8158203a4e813b6340dc790f772b3d433ce1c371d5c5f5de46f1a68bdf 8113f50e779d80f6 -### 2. Generate delegation certificate (pledge) +### 4. Generate delegation certificate (pledge) We have to honor our pledge by delegating at least the pledged amount to our pool, so we have to create a _delegation certificate_ to achieve this: @@ -94,7 +122,7 @@ This creates a delegation certificate which delegates funds from all stake addre the pool belonging to cold key `cold.vkey`. If we had used different staking keys for the pool owners in the first step, we would need to create delegation certificates for all of them instead. -### 3. Submit the pool certificate and delegation certificate to the blockchain +### 5. Submit the pool certificate and delegation certificate to the blockchain Finally we need to submit the pool registration certificate and the delegation certificate(s) to the blockchain by including them in one or more transactions. We can use one transaction for multiple certificates, the certificates will be applied in order. From fa046b7c9e189447f02c80bcc1d5720a910e6432 Mon Sep 17 00:00:00 2001 From: CarlosLopezDeLara Date: Mon, 22 Jun 2020 21:13:58 -0500 Subject: [PATCH 02/11] Update README.md --- node-setup/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-setup/README.md b/node-setup/README.md index 96aa46b..5d51b80 100644 --- a/node-setup/README.md +++ b/node-setup/README.md @@ -14,7 +14,7 @@ In these tutorials, we will cover the following topics: - [GENERATE STAKE POOL KEYS](060_node_keys.md) - [KES PERIOD](061_KES_period.md) - [CONFIGURE CORE AND RELAY NODES](070_core_relay.md) -- [REGISTER YOUR STAKE POOL](080_register_stakepool.md) +- [REGISTER YOUR STAKE POOL WITH METADATA](080_register_stakepool.md) - [RETIRING A STAKE POOL](090_retire_stakepool.md) - [CONFIGURE LOGGING](091_logging.md) - [MONITORING NODE WITH EKG](092_ekg.md) From 4f100ee1652caddd6521d7fbc8b6f9f989295d74 Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara <64222734+CarlosLopezDeLara@users.noreply.github.com> Date: Tue, 23 Jun 2020 08:09:41 -0500 Subject: [PATCH 03/11] Update 080_register_stakepool.md --- node-setup/080_register_stakepool.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/node-setup/080_register_stakepool.md b/node-setup/080_register_stakepool.md index 2fcbfda..bd7f75c 100644 --- a/node-setup/080_register_stakepool.md +++ b/node-setup/080_register_stakepool.md @@ -54,6 +54,20 @@ Store the file in your node and in a url you maintain, for example [https://gist cardano-cli shelley stake-pool metadata-hash --pool-metadata-file testPool.json >6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af + +### Temporary step until DB-sync is updgraded + +Submit a PR to add your pool data to https://github.com/input-output-hk/cardano-ops/blob/master/topologies/ff-peers.nix +You will need to provide your IP address/DNS host name and port. + +{ + operator = “testPool”; + poolId = “”; + metadataUrl = “https://gist.githubusercontent.com/testPool/.../testPool.json” + meatadataHash = “6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af”; + addr = “127.0.0.1”; + port = 3001; +} ### 3. Generate Stake pool registration certificate From 10c55e9aec221dbb3bb004b39bae6757b2497b5a Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara <64222734+CarlosLopezDeLara@users.noreply.github.com> Date: Tue, 23 Jun 2020 09:52:34 -0500 Subject: [PATCH 04/11] Update 080_register_stakepool.md --- node-setup/080_register_stakepool.md | 31 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/node-setup/080_register_stakepool.md b/node-setup/080_register_stakepool.md index bd7f75c..9b5c3fc 100644 --- a/node-setup/080_register_stakepool.md +++ b/node-setup/080_register_stakepool.md @@ -60,14 +60,14 @@ Store the file in your node and in a url you maintain, for example [https://gist Submit a PR to add your pool data to https://github.com/input-output-hk/cardano-ops/blob/master/topologies/ff-peers.nix You will need to provide your IP address/DNS host name and port. -{ - operator = “testPool”; - poolId = “”; - metadataUrl = “https://gist.githubusercontent.com/testPool/.../testPool.json” - meatadataHash = “6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af”; - addr = “127.0.0.1”; - port = 3001; -} + { + operator = “testPool”; + poolId = “”; + metadataUrl = “https://gist.githubusercontent.com/testPool/.../testPool.json” + meatadataHash = “6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af”; + addr = “123.123.123.123”; + port = 3001; + } ### 3. Generate Stake pool registration certificate @@ -76,14 +76,14 @@ Create a _stake pool registration certificate_: cardano-cli shelley stake-pool registration-certificate \ --cold-verification-key-file cold.vkey \ --vrf-verification-key-file vrf.vkey \ - --pool-pledge \ - --pool-cost \ - --pool-margin \ + --pool-pledge 1000000000 \ + --pool-cost 100000000 \ + --pool-margin .05 \ --pool-reward-account-verification-key-file stake.vkey \ --pool-owner-stake-verification-key-file stake.vkey \ --testnet-magic 42 \ - --pool-relay-port \ - --pool-relay-ipv4 \ + --pool-relay-port 3001 \ + --pool-relay-ipv4 123.123.123.123 \ --metadata-url https://gist.githubusercontent.com/testPool/.../testPool.json \ --metadata-hash 6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af \ --out-file pool.cert @@ -214,4 +214,9 @@ will output your poolID. You can then check for the presence of your poolID in t cardano-cli shelley query ledger-state --testnet-magic 42 | grep poolPubKey | grep +or + + cardano-cli shelley query ledger-state --testnet-magic 42 \ + | jq '._delegationState._pstate._pParams.' + which should return a non-empty string if your poolID is located in the ledger. You can then then head over to a pool listing website such as https://ff.pooltool.io/ and (providing it is up and running and showing a list of registered stake pools) you should hopefully be able to find your pool in there by searching using your poolID, and subsequently claiming it (might require registration on the website) and giving it a customized name. From a2e932211325b6a26c12a9d3119b5a9b93257c77 Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara <64222734+CarlosLopezDeLara@users.noreply.github.com> Date: Tue, 23 Jun 2020 10:01:09 -0500 Subject: [PATCH 05/11] Update 080_register_stakepool.md --- node-setup/080_register_stakepool.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/node-setup/080_register_stakepool.md b/node-setup/080_register_stakepool.md index 9b5c3fc..5c722a4 100644 --- a/node-setup/080_register_stakepool.md +++ b/node-setup/080_register_stakepool.md @@ -61,12 +61,12 @@ Submit a PR to add your pool data to https://github.com/input-output-hk/cardano- You will need to provide your IP address/DNS host name and port. { - operator = “testPool”; - poolId = “”; - metadataUrl = “https://gist.githubusercontent.com/testPool/.../testPool.json” - meatadataHash = “6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af”; - addr = “123.123.123.123”; - port = 3001; + operator = “testPool”; + poolId = “”; + metadataUrl = “https://gist.githubusercontent.com/testPool/.../testPool.json” + meatadataHash = “6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af”; + addr = “123.123.123.123”; + port = 3001; } ### 3. Generate Stake pool registration certificate From 8563515ae6888eb1cbd60eb782b0b4552fd1f57c Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara <64222734+CarlosLopezDeLara@users.noreply.github.com> Date: Tue, 23 Jun 2020 10:23:48 -0500 Subject: [PATCH 06/11] Update 080_register_stakepool.md --- node-setup/080_register_stakepool.md | 30 +++++++++++++--------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/node-setup/080_register_stakepool.md b/node-setup/080_register_stakepool.md index 5c722a4..5c48031 100644 --- a/node-setup/080_register_stakepool.md +++ b/node-setup/080_register_stakepool.md @@ -55,20 +55,6 @@ Store the file in your node and in a url you maintain, for example [https://gist >6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af -### Temporary step until DB-sync is updgraded - -Submit a PR to add your pool data to https://github.com/input-output-hk/cardano-ops/blob/master/topologies/ff-peers.nix -You will need to provide your IP address/DNS host name and port. - - { - operator = “testPool”; - poolId = “”; - metadataUrl = “https://gist.githubusercontent.com/testPool/.../testPool.json” - meatadataHash = “6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af”; - addr = “123.123.123.123”; - port = 3001; - } - ### 3. Generate Stake pool registration certificate Create a _stake pool registration certificate_: @@ -204,8 +190,6 @@ And submit: --tx-file tx.signed \ --testnet-magic 42 -That's it! Our stake pool has been registered. - To verify that your stake pool registration was indeed successful, you can perform the following steps: cardano-cli shelley stake-pool id --verification-key-file @@ -220,3 +204,17 @@ or | jq '._delegationState._pstate._pParams.' which should return a non-empty string if your poolID is located in the ledger. You can then then head over to a pool listing website such as https://ff.pooltool.io/ and (providing it is up and running and showing a list of registered stake pools) you should hopefully be able to find your pool in there by searching using your poolID, and subsequently claiming it (might require registration on the website) and giving it a customized name. + +### 6. Temporary step until DB-sync is upgraded + +Submit a PR to add your pool data to https://github.com/input-output-hk/cardano-ops/blob/master/topologies/ff-peers.nix +You will need to provide your IP address/DNS host name and port. + + { + operator = “testPool”; + poolId = “”; + metadataUrl = “https://gist.githubusercontent.com/testPool/.../testPool.json” + meatadataHash = “6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af”; + addr = “123.123.123.123”; + port = 3001; + } From cf54efbbda6e62d3c944e97176e28fc2a82c6f6c Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara <64222734+CarlosLopezDeLara@users.noreply.github.com> Date: Tue, 23 Jun 2020 10:25:23 -0500 Subject: [PATCH 07/11] Update 080_register_stakepool.md --- node-setup/080_register_stakepool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-setup/080_register_stakepool.md b/node-setup/080_register_stakepool.md index 5c48031..aee5bc8 100644 --- a/node-setup/080_register_stakepool.md +++ b/node-setup/080_register_stakepool.md @@ -47,7 +47,7 @@ Registering your stake pool requires: "homepage": "https://teststakepool.com" } -Store the file in your node and in a url you maintain, for example [https://gist.githubusercontent.com/testPool/.../testPool.json](shorturl.at/gDV47) +Store the file in a url you control, for example [https://gist.githubusercontent.com/testPool/.../testPool.json](shorturl.at/gDV47) ### 2. Get the hash of your file: From 9699af8a463bd06bfeb4de62ca8979fe1dea1966 Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara <64222734+CarlosLopezDeLara@users.noreply.github.com> Date: Tue, 23 Jun 2020 10:26:52 -0500 Subject: [PATCH 08/11] Update 080_register_stakepool.md --- node-setup/080_register_stakepool.md | 1 + 1 file changed, 1 insertion(+) diff --git a/node-setup/080_register_stakepool.md b/node-setup/080_register_stakepool.md index aee5bc8..dd4b0f3 100644 --- a/node-setup/080_register_stakepool.md +++ b/node-setup/080_register_stakepool.md @@ -35,6 +35,7 @@ Registering your stake pool requires: * Generate the stake pool registration certificate * Create a delegation certificate (pledge) * Submit the certificates to the blockchain +* Submit a PR with pool metadata (Temporary step until DB-sync is upgraded) **WARNING:** Generating the __stake pool registration certificate__ and the __delegation certificate__ requires the __cold keys__ So, you may want to generate these certificates in your local machine taking the proper security measures to avoid exposing your cold keys to the internet. From 6d91b609f718887aabe2484b137b0d07985e4dda Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara <64222734+CarlosLopezDeLara@users.noreply.github.com> Date: Tue, 23 Jun 2020 10:28:52 -0500 Subject: [PATCH 09/11] Update 080_register_stakepool.md --- node-setup/080_register_stakepool.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node-setup/080_register_stakepool.md b/node-setup/080_register_stakepool.md index dd4b0f3..d487e91 100644 --- a/node-setup/080_register_stakepool.md +++ b/node-setup/080_register_stakepool.md @@ -52,6 +52,8 @@ Store the file in a url you control, for example [https://gist.githubusercontent ### 2. Get the hash of your file: +This validates that the JSON fits the required schema, if it does, you will get the hash of your file. + cardano-cli shelley stake-pool metadata-hash --pool-metadata-file testPool.json >6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af From 3561c02cf65172056a6f05539678265d5e43f8b6 Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara <64222734+CarlosLopezDeLara@users.noreply.github.com> Date: Tue, 23 Jun 2020 10:39:07 -0500 Subject: [PATCH 10/11] Update 080_register_stakepool.md --- node-setup/080_register_stakepool.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node-setup/080_register_stakepool.md b/node-setup/080_register_stakepool.md index d487e91..9e494ea 100644 --- a/node-setup/080_register_stakepool.md +++ b/node-setup/080_register_stakepool.md @@ -221,3 +221,5 @@ You will need to provide your IP address/DNS host name and port. addr = “123.123.123.123”; port = 3001; } + +Note that your relays can also be registered on-chain, it can support multiple IPs/DNS names. This relay registering scheme is also temporary. From ecbfd0ec06e0515701ee3749ce96780c27d2249d Mon Sep 17 00:00:00 2001 From: Carlos LopezDeLara <64222734+CarlosLopezDeLara@users.noreply.github.com> Date: Tue, 23 Jun 2020 10:40:51 -0500 Subject: [PATCH 11/11] Update 080_register_stakepool.md --- node-setup/080_register_stakepool.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/node-setup/080_register_stakepool.md b/node-setup/080_register_stakepool.md index 9e494ea..4e5dabd 100644 --- a/node-setup/080_register_stakepool.md +++ b/node-setup/080_register_stakepool.md @@ -1,5 +1,7 @@ # Register a Stake Pool with Metadata +__USE TAG: 1.14.0__ + ### Prerequisites Make sure you have access to: