Starting your own stake pool
We are almost two months into the Haskell testnet (HTN, started on May 9th, 2020 ) and momentum is building up. IOHK really stepped on the gas pedal and there are so many things going on it’s hard to keep track of. We have frequent Haskell node releases, Daedalus Shelley release, Incentivized testnet (ITN) extension related upgrades, official blog posts, forum posts and tweets from all three Cardano official entities (IOHK, Cardano foundation, Emurgo). On top of that we have Charles Hoskinson (IOHK CEO) himself giving us updates on Youtube which we really don’t get tired of. Add to that the continuous debates on Telegram channels, administering your pool and website and your free evenings and weekends are just a distant memory.
With so much media presence and the roadmap with dates for Shelley released the appetites in the community are rising. Everyone wants to give it a shot at becoming a pool operator. While this might bring in new competition and make it even harder for us, it is actually a good thing for the Cardano ecosystem in the long run as it will have a broad network of nodes (good network decentralizaton) and a better return on staking (ROS) for delegates. So let’s see what it takes to run a stake pool.
Prerequisites for running a stake pool
In general there are just two simple prerequisites. The infrastructure prerequisites and the needed skills. Both are easily accessible but both come with a price. The first one you can buy, the second one you need to build yourself. No need to get scared, everything is affordable and doable. You just need time, desire to learn and a lot of patience.
When it comes to hardware you have in general two options. You can decide to run your stake pool on a physical machine or on a VPS. We have have covered the pros and cons of each approach in a blog post here. Note though, that there is a difference between running a stake pool on the ITN or HTN and running it on main net. While you can run two or three nodes on one machine on test net you should not do that on main net.
The schema above shows a typical configuration for a stake pool. It consists of two relay nodes and a core node. The relays (middle) are connected to other operator’s relay nodes (left) while the stake pool block producing node (right) is only connected to the relay nodes. With such configuration the block producing node is protected from the Distributed Denial of Service attacks (DDos attacks). You can add additional relay nodes to the configuration above if you wish so but this means more costs for running your operation and less profit. With costs too high you won’t be competitive unless you also have a higher pledge but that is really not the point of this post.
In addition to the configuration above there are other considerations to be made. For example, how to protect your pool in case of a server failure? What if your core node crashes or it’s blockchain database gets corrupted? How long will it take you to get it up and running again? How many blocks won’t be minted because of that and how many delegates will switch to another pool? Delegates are timid birds. A bad epoch is enough for them to fly away to some other pool. Those of us who have run a pool on ITN know very well what we are talking about. Anyway for other considerations regarding server uptime you can read in one of our previous posts here.
For running a stake pool you certainly don’t need to have a degree from computer science but it will help you tremendously if you know Linux administration. Everyone can start a pool by following guides made by community but it takes a lot of time and effort, even more so if you don’t have experience operating any computer systems. However, if there’s a will there’s a way!
Rolling your sleeves up
Different members of the fantastic Cardano community have created different guides and tools to aid you in the process of starting a stake pool. One of the most straight forward guides is from Pool of Africa (PoA), an early pioneer on the HTN. However, things are moving rapidly and with new node versions some of the tools and guides from the community might get broken. Don’t get discouraged though. Usually the community reacts quickly and things are updated in a few hours or days at most.
You’ll notice that not all the guides have everything covered and usually different guides overlap but that’s fine, just use what’s easier for you. So here’s a short list of guides that we recommend you to start with to run your own stake pool.
Installing and starting the node
This PoA guide will help you to install Linux operating system on the Virtual box, compile the Haskell node, configure its instances (relays and core) and start them.
Starting the pool
What makes a pool is a combination of your relay nodes and core node. So once your nodes are running you need to create accounts, staking address, certificates, register your pool on the blockchain and get some test ada. All the mentioned steps require you to also create transactions on the blockchain. Cardano community preapred a Community managed Documentation. That page also contains scripts for the tasks we mention above and should make your life easier. While this is definitely a user friendly approach we recommend you to also follow the original guide from IOHK and go through the steps manually. As a pool operator you need to understand what a script is doing after all you will be dealing with money!
Another great resource is the Pioneers exercises solutions also from IOHK which represent a set of exercises given to the first 20 Pioneers invited to join HTN and test the Haskell node.
An important thing that we haven’t noticed in the mentioned guides is that your relay nodes need to be in others relay nodes configuration thus creating a network topology like the one below or your node will produce the blocks but the rest of the network will never learn about them as your node will be isolated and blocks minted won’t be included in the block chain. Weeks or a few months after the release of Shelley we can expect an addition of P2P functionality where including each other’s relay nodes won’t be necessary anymore.
As you can see on the screenshot above, there are many isolated nodes on the outer side that are just not yet part of the network topology.
There are a few initiatives around to make your nodes a part of topology:
It’s worth mentioning that a newer release of Haskell node (1.14.0) has metadata registration support to avoid the registration of the topology on the IOHK’s github.
IOHK developers recommendation is to have up to 20 relays in topology files. If the number gets too high, there will be a penalty on performance and not much benefit.
Solving the problems
On your endeavour you will definitely run into problems. In such moments it is important you check things twice and approach to the problem with a clear head. Many times it is just a miss-typed command but when you really get stuck you have a great community at your disposal on Telegram channel. Many community members unselfishly share their knowledge to make Cardano a success.
Following the guides almost anyone (event without Linux skills) should be able to start up their node but not everyone can have a grasp of what he is doing. So, knowing Linux and computer technology in general will help you a lot, especially when things go south and you need to figure stuff out yourself in a short period of time.
Having said that, if you enjoy learning and putting in the hours doesn’t bother you much, go for it. You might not make it in the highly competitive environment but it sure feels good to witness the birth of the biggest, most complete and most decentralized blockchain in the world. Cardano is here to stay.