LATEST TAG: 1.14.2
In the fourth exercise, we learnt how to delegate to an existing pool. In this exercise, we will register and run our own pool.
-
Complete Exercise Sheet 4.
-
Read the Cardano Tutorials and General Documentation on Stake Pool Registration, Pledging and Stake Pool Operation at:
-
Make sure you have access to:
- One or more funded addresses;
- The keys and operational certificate for the stake pool that you set up in Exercise 3;
- The stake keys from Exercise 4.
-
Update your instances of cardano-node and cardano-cli if you need to.
-
Start a relay node.
In the fifth exercise, we will make sure that you can:
- Register a stake pool.
- Delegate stake to your own stake pool.
- Start a stake pool and produce blocks.
- Receive delegation from other Testnet users.
As before, if you have any questions or encounter any problems, please feel free to use the dedicated Cardano Forum channel. IOHK staff will be monitoring the channel, and other pool operators may also be able to help you.
Please report any bugs through the cardano-node and cardano-tutorials github repositories.
-
Generate a JSON file containing the metadata for your stake pool, and get the hash:
cardano-cli shelley stake-pool metadata-hash ...
Put the file somewhere accessible, and obtain its URL.
-
Generate a registration certificate for your stake pool:
cardano-cli shelley stake-pool registration-certificate ...
You will need to decide on three key settings.
- The cost: A fixed lovelace cost per epoch (as in the Incentivised Testnet).
- The margin: The fraction of the total pool rewards (after deducting cost) that will be given to the owner(s) of the pool, as in the Incentivised Testnet, expressed as a floating point number between 0 and 1.
- The pledge: An amount of lovelace that the owner(s) promise(s) to delegate to the pool.
If you don’t know what to choose, set the cost to 256 ada, the margin to 0.07 (i.e. 7%) and the pledge to 1,000 ada.
You will also need to specify the metadata URL and hash for your pool from Step 1.
-
Pledge some stake to your stake pool. You do this by creating a delegation certificate (as you did in Exercise 4) that delegates enough stake from the "owner staking key" specified in the registration certificate to your own pool to cover your pledge promise.
-
Register the pool online. Registration is done by submitting a transaction that contains the pool registration certificate. You can include the pledge delegation certificate in the same transaction.
Note: the certificate order matters : you must add the pool registration certificate first then the pledge delegation certificate.
In addition to the usual transaction fees, you will also have to pay the pool deposit (specified in the genesis file) in that transaction.
Note that this transaction will have to be signed by the payment key,
the cold key and the staking key.
-
Start your stake pool, and link it to the relay node as you did in Exercise 3.
cardano-node run ...
-
Obtain your stake pool id
cardano-cli shelley stake-pool id ...
If necessary, advertise that your pool is running using the P2P and off-chain registration workarounds that are described in the tutorials.
-
Check that you are delegating to your own pool through the pledge address, then wait until the following epoch (around 6 hours), and confirm that your pool is producing blocks by e.g. inspecting the log data. Also confirm that your pool is receiving the correct rewards. Congratulations, you are now a fully fledged Shelley Testnet pool operator!
-
Optional Exercise (Easy).
Persuade other Testnet users to delegate to your pool.
-
Optional Exercise (Medium).
Join forces with one or more other Testnet stakepool operators to run a new stake pool that you jointly own. What happens if you fail to collectively meet the pledge that you have promised?
-
Optional Exercise (Easy).
Change your pool’s cost, margin and pledge. What is the effect on the rewards that you receive? How long does it take for the change to take effect?
-
Optional Exercise (Easy).
Retire (de-register) your original pool, and start a new one with different cost, margin and pledge. Update your pool advertisement if you need to.
-
Optional Exercise (Medium).
Set up two new stake pools, each behind its own relay node. Advertise both pools.
You have now successfully set up and run your own stake pool and learnt the basics of how to manage it. In the final exercises, we will test some operational parameters that are relevant to running a pool and see how to submit more forms of transaction.
Please provide any feedback or suggested changes to the tutorials or exercises by either raising an issue on the cardano-tutorials repository or by forking the repository and submitting a PR.
Please provide any feedback or suggested changes on the node itself by raising an issue at the cardano-node repository.