Testnets

Register stake pool metadata

To register a stake pool metadata you need to:

  1. Create a JSON file for your stake pool metadata and store it in your node, for example:

    testPool.json

{
"name": "TestPool",
"description": "The pool that tests all the pools",
"ticker": "TEST",
"homepage": "https://teststakepool.com"
}

Store the file in an url you control. For example https://teststakepool.com/poolMetadata.json You can use a GIST in GitHub, but ensure that the URL is less than 65 characters long.

  1. 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 pool_Metadata.json
>6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af
  1. Register or re-register the pool on-chain using the node CLI as described in the (Stake Pool Registration tutorial). Provide all the necessary metadata in the registration, including the relay information, the URL for the metadata file and metadata hash, as well as the cost parameters.
cardano-cli shelley stake-pool registration-certificate \
--cold-verification-key-file cold.vkey \
--vrf-verification-key-file vrf.vkey \
--pool-pledge <LOVELACE> \
--pool-cost <LOVELACE> \
--pool-margin <PERCENTAGE> \
--pool-reward-account-verification-key-file stake.vkey \
--pool-owner-stake-verification-key-file stake.vkey \
--testnet-magic 42 \
--pool-relay-port <PORT> \
--pool-relay-ipv4 <IP ADDRESS> \
--metadata-url http://testpool/pool1.json
--metadata-hash 6bf124f217d0e5a0a8adb1dbd8540e1334280d49ab861127868339f43b3948af \
--out-file node.cert

Build, sign and submit the transaction:

cardano-cli shelley transaction build-raw \
--tx-in TxId#TxIx \
--tx-out $(cat payment.addr)+<LOVELACE> \
--ttl <SLOT> \
--fee <LOVELACE> \
--out-file tx.raw \
--certificate-file node.cert \
--certificate-file delegation.cert
cardano-cli shelley transaction sign \
--tx-body-file tx.raw \
--signing-key-file payment.skey \
--signing-key-file stake.skey \
--signing-key-file cold.skey \
--testnet-magic 42 \
--out-file tx.signed
cardano-cli shelley transaction submit \
--tx-file tx.signed \
--testnet-magic 42
  1. Obtain the pool id using the node CLI.
cardano-cli shelley stake-pool id --verification-key-file pool.vkey
> <poolid>

You can check whether the on-chain registration has succeeded by running:

cardano-cli shelley query ledger-state --testnet-magic 42 \
| jq '._delegationState._pstate._pParams.<poolid>'
  1. Follow this link to find the latest building instrcutions.

© IOHK 2015 - 2021


Cardano is an open-source project.

Cardano is a software platform ONLY and does not conduct any independent diligence on, or substantive review of, any blockchain asset, digital currency, cryptocurrency or associated funds. You are fully and solely responsible for evaluating your investments, for determining whether you will exchange blockchain assets based on your own judgement, and for all your decisions as to whether to exchange blockchain assets with Cardano. In many cases, blockchain assets you exchange on the basis of your research may not increase in value, and may decrease in value. Similarly, blockchain assets you exchange on the basis of your research may fall or rise in value after your exchange.

Past performance is not indicative of future results. Any investment in blockchain assets involves the risk of loss of part or all of your investment. The value of the blockchain assets you exchange is subject to market and other investment risks