Setup a Stake Pool on Pre-Production or Preview testnets with CNTOOLS

With the legacy testnet on track to be depreciated, I wanted to write a quick guide for setting up on the new Pre-Production and Preview testnets with CNTOOLS. Please refer to the above image to determine which testnet is right for you.

For this guide, I am assuming that you are already familiar with setting up a server, wallet, and pool. If you need additional guidance on these tasks, please refer to this comprehensive guide @Alexd1985 has written.

We will first need to download and run the prereqs script for installing our node.

mkdir ~/tmp
cd ~/tmp
curl -sS -o prereqs.sh https://raw.githubusercontent.com/cardano-community/guild-operators/master/scripts/cnode-helper-scripts/prereqs.sh
chmod 755 prereqs.sh

To set up on the new testnets, we will need to run the prereqs script with a few flags.

For Preview TestNet:

./prereqs.sh -b alpha -n preview
. “${HOME}/.bashrc”

For Pre-Production:

./prereqs.sh -b alpha -n preprod
. “${HOME}/.bashrc”

Reboot the server

sudo reboot

After the reboot, we can build the node:

cd ~/git
git clone https://github.com/input-output-hk/cardano-node
cd cardano-node

git fetch --tags --all
git checkout 1.35.3

$CNODE_HOME/scripts/cabal-build-all.sh -o

Once the node is built, adjust your env file if you want. (Port etc)

cd $CNODE_HOME/scripts
nano env

Now we can deploy and start the node as a service:

cd $CNODE_HOME/scripts
./deploy-as-systemd.sh

sudo systemctl start cnode
sudo systemctl status cnode

You can now check on your node’s syncing progress:

cd $CNODE_HOME/scripts
./gLiveView.sh

You can also now create a wallet and a pool using CNTOOLS:

./cntools.sh

After you’ve obtained a wallet, use the faucet to gain some test ADA.
You can use the faucet links:

Preview: https://faucet.preview.world.dev.cardano.org/basic-faucet

Preprod: https://faucet.preprod.world.dev.cardano.org/basic-faucet

Or you can adjust and use the following curl commands:

Preview:

curl -X POST -s ‘https://faucet.preview.world.dev.cardano.org/send-money/<your.preview.wallet>?api_key=nohnuXahthoghaeNoht9Aow3ze4quohc’

PreProd:

curl -X POST -s ‘https://faucet.preprod.world.dev.cardano.org/send-money/<your.preprod.wallet>?api_key=ooseiteiquo7Wie9oochooyiequi4ooc’

Once you’ve got some testADA, you can now register your pool through CNTOOL

./cntools.sh

Once your pool is registered, you can use the faucet to acquire delegation.

Preview: https://faucet.preview.world.dev.cardano.org/basic-faucet

Preprod: https://faucet.preprod.world.dev.cardano.org/basic-faucet

You can also adjust and use the following commands to request delegation.
Preview:

curl -s ‘https://faucet.preview.world.dev.cardano.org/delegate/<YourPoolID#>’

Preprod:

curl -s ‘https://faucet.preprod.world.dev.cardano.org/delegate/<YourPoolID#>’

3 Likes

@BlocksWell thanks for the guide :+1:. Are the above URLs correct? They are exactly the same as the ones above for Faucet. Here at work reading before I leave to go home and start testing. :slightly_smiling_face:

Those are the correct URLs. If you follow the link you will see there are 2 faucet options…one for delegation and one for test ADA.

Thanks! :+1:t3:
I couldn’t get to the URL from work, apparently blocked.

1 Like

Hi I am having issue syncing a testnet node on pre-production using 1.35.3,

I keep getting the error message like this:

TrConnectionHandler (ConnectionId {localAddress = xxx.xxx.xxx.xxx:3001, remoteAddress = 184.169.154.149:38605}) (TrHandshakeServerError (HandshakeProtocolError (HandshakeError (Refused NodeToNodeV_9 "version data mismatch: NodeToNodeVersionData {networkMagic = NetworkMagic {unNetworkMagic = 1}, diffusionMode = InitiatorAndResponderDiffusionMode} /= NodeToNodeVersionData {networkMagic = NetworkMagic {unNetworkMagic = 1097911063}, diffusionMode = InitiatorOnlyDiffusionMode}"))))

It seems that this indicates the node is connecting to peers using the original testnet (see the network magic). Does anyone know what’s going on with the preprod “access point” at the moment? thanks!

Thanks a lot for the guide. Been having a lot of trouble with getting something up and running on testnet following guides and the stake pool course. But this actually worked and I got a relay node up, running and synced on preview very quickly. Awesome!

1 Like