How to delegate your stakes without daedalus (pro variant)

Monky
Coinmonks
7 min readFeb 4, 2020

--

There are a lot of connection problems with daedalus and many delegators can not move their stakes to other pools.

We would like to give you an alternative way, which affords a little bit more work, but should function immediately and you can learn something how the process of running a pool is working.

First of all. The approach needs the following things to make a delegation possible.

If you are unsure please don’t take the risk. You can ask if your need more information or help but never send your

(This example is going through the steps on a windows machine, but can be adapted to any other OS)

Step 1: Download files

Download the cardano wallet and extract the files.
Download the config.file, genesis file and copy the Genesis Hash.

Put the config files together in one folder, where your cardano-wallet application is located.

Open a command line/bash and head to the cardano-wallet folder.

Exceute the following command
> cardano-wallet.exe version

2020.1.27 (git revision: a6df56ed91132e344925df9736ffaba6922b256f)

Should be returned from the CLI.

Step 2: Starting your passive node with cardano-wallet

In order to be able to check your account balances and delegate your stakes, you need to start your node. It’s the same process, that daedalus is doing in background but without an easy to use GUI.

To start your passive node, use the following command.

FYI: If you want to save the blockchain on your local storage you can append --state-dir <PATH TO FOLDER> to the command. Otherwise the blockchain needs to be downloaded everytime an is stored in memory.

> cardano-wallet launch --genesis-block-hash 8e4d2a343f3dcf9330ad9035b3e8d168e6728904262f2c434a4f8f934ec7b676 --config itn_rewards_v1-config.yaml

(Optional: If you want to use the newest jormungandr/jcli version, which is the node itself, you can replace the jormungandr and jcli files with the newest one from here.) But it should work with the 0.8.7 as well.

If your node is starting it should look like this.

Shows the process after launching the cardano-wallet application

To use the JCLI, you have to use the correct port, which you can find at the start process logs. e.g at the following picture. 59884. But you can also use a custom one on appending --rest-listen XXXX parameter to the cardano-wallet launch command.

Shows the configuration which the node is using

When it’s bootstrapping, it looks like this.

To use the JCLI, you have to use the correct port .

To check if your node was successfully bootstrapped, open another command line/shell (if you didn’t start it in background) and use the jcli application with the following command.

> jcli rest v0 node stats get -h “http://127.0.0.1:59884/api"

Now you need to wait till preparing and bootstrapping is finished.

Node is preparing and is downloading the blockchain
Node is still bootstrapping
Successful running node (it takes a little bit 5–10 minutes)

If your node was successfully bootstrapped, you can go to the next step. After a while you should get some blockRecvCnt. Then your node is running perfectly.

FYI: If your bootstrap is taking to long, you can open your “itn_rewards_v1-config” and replacing the trusted_peers with some working one from the ADAPOOLS peer list. Thanks to them!

You can also check the network status with the cardano-wallet.

>cardano-wallet network information

You should get back OK and some information.

Congrats. Your node is running and connected. Now your are able to check account balances and delegate to pools.

Step 3: Extract public/private key from your pass phrase (seed)

In order to delegate your stakes, you need your private key. With cardano wallet you are able to extract it.

With

> cardano-wallet.exe wallet list

Ok.
[]

you can check your current available wallets.

Optional:

To restore/create your existing wallet from daedalus, use the following command.

> cardano-wallet.exe wallet create “MyWalletName”

And after you were asked, enter your 15 word mnemonic seed.

What you need in order to delegate your ADA to another pool, is your secret key.

PLEASE DON’T SEND YOUR FOLLOWING EXTRACTED KEY TO ANY PERSON.

> cardano-wallet.exe mnemonic reward-credentials

After you’ve entered your wallets mnemonic seed, you get a secret key like that.

ed25519e_sk1wzx2m0e5yz8cclyakgz4xvjy86crxt7qxffj2yeljstkdluta49aa55gwld3d8cv3hzv7mpdah57jsnslcj2248zu6afa090yrzuqpsqhh2m9

That’s your private key which you need for delegating.

Step 4: Delegate to a new pool

With the delegation script you can delegate your ada to a pool. You just have to open your script and change it’s port to the rest-listen port of your cardano-wallet, which you got at the beginning. e.g. 59884.

You need this port so you can access the rest api of jormungandr.

The next step is to extract your public address from your private key. Please open a windows PowerShell, else using bash.

Type the following command:

1.

>$SECRET_KEY=”ed25519e_sk1wzx2m0e5yz8cclyakgz4xvjy86crxt7qxffj2yeljstkdluta49aa55gwld3d8cv3hzv7mpdah57jsnslcj2248zu6afa090yrzuqpsqhh2m9"

2.

$PUBLIC_KEY=echo $SECRET_KEY | ./jcli key to-public

3.

> $ACCOUNT_ADDRESS=./jcli address account $PUBLIC_KEY

Within $ACCOUNT_ADDRESS you have your address which you can now use to check your balances e.g.

> ./jcli rest v0 account get $ACCOUNT_ADDRESS -h “http://127.0.0.1:59884/api

The result should tell you information about you current staked pool and its current account balance.

If you are on windows you need to send your delegation by creating a certificate and a transaction like the following.

But first you need your wished stakepool ID, where you want to delegate to e.g. #Monky Pool ID:
b3146f94b9dbf51f2838056538ebec0cc9d84aece3be4c885de954dd7b392b74

To get a list of all IDs you can check adapools.org, pooltool.io or just calling

> cardano-wallet.exe stake-pool list

Which returns a list of all pools. Copy the id of your wished pool.

Send delegation (Thx to rdlrt)

For Linux /Mac users

If you are using linux/mac you can use the (delegation scripts from rdlrt) (delegate-acct.sh and env). You need to set the correct rest-listen port in order to make them work.

To send your delegation just call

./delegate-acct.sh <ACCOUNT_SK> <STAKE_POOL_IDS>
ACCOUNT_SK is your secret key.
STAKE_POOL_ID is the id of the pool.

After a block was created, your transaction was sent and your adas should be staked.

You can check your account again to see the staked pool.

For Windows users (still PowerShell)

To make it easier for you, we translate the linux script to powershell and update it on our post. If you are fit enough and want, you can also try to execute bash scripts on PowerShell. There are a tutorials out there which is showing you how to do.

But for now you have to create your delegate and send a new transaction to the ITN blockchain by yourself.

  1. Create delegation certificate

> ./jcli certificate new stake-delegation $SECRET_KEY <ENTER STAKEPOOL ID> -o account_delegation_certificate

2. Create the offline delegation transaction for the Account address”

> ./jcli transaction new --staging staging_file.out

3. Add input account to the transaction (710,000 LOVELACES fees)”

> ./jcli transaction add-account “$ACCOUNT_ADDRESS” “710000” --staging “staging_file.out”

4. Add the certificate to the transaction”

> transaction add-certificate <CONTENT OF account_delegation_certificate> --staging staging_file.out

5. Finalize the transaction

> ./jcli transaction finalize --staging staging_file.out

> $TRANSACTION_ID=./jcli transaction data-for-witness --staging staging_file.out

6. Create the witness

> echo $SECRET_KEY > witness_secret

> ./jcli transaction make-witness ${TRANSACTION_ID} --genesis-block-hash 8e4d2a343f3dcf9330ad9035b3e8d168e6728904262f2c434a4f8f934ec7b676 --type “account” --account-spending-counter “1” witness_output witness_secret

7. Add the witness to the transaction

> ./jcli transaction add-witness witness_output --staging “staging_file.out”

8. Show the transaction info”

> ./jcli transaction info --fee-constant 200000 --fee-coefficient 100000 --fee-certificate 10000 --staging “staging_file.out”

9. Finalize the transaction and send it to the blockchain

> ./jcli transaction seal --staging “staging_file.out”

> ./jcli transaction auth -k $SECRET_KEY --staging “staging_file.out

> ./jcli transaction to-message --staging “staging_file.out” | ./jcli rest v0 message post -h “http://127.0.0.1:59884/api

10. Check the account’s delegation status

Now you have to wait, till a new block was created, which is containing your transaction.

> ./jcli rest v0 account get $ACCOUNT_ADDRESS -h “http://127.0.0.1:59884/api

Congratulations your stake was moved to another pool. 🎉

If you need some more help or something is not working for you let us know.

We would appreciate it if you would help us and stake some ADA on our pool.

By using the shell script above, you can also stake to multiple pools.

Happy staking

#monky

Wanna stake your coins? Check these Staking service providers

Get Best Software Deals Directly In Your Inbox

--

--

Monky
Coinmonks

I’m a part of the cardano blockchain consensus.