How to delegate through the ubuntu command line?

Hi,
Is there a document where it says how to delegate to a stake pool via the ubuntu command line with my staking keys ( also how to move the funds from my staking keys to my payments keys). The only documentation I am aware of is https://docs.cardano.org/en/latest/ but I can’t find this information.

I have a fully functional node on ubuntu 20.

Hi Thomas,

There is a link to the cardan-node documentation from the link you shared:

Please review this documentation carefully:
https://docs.cardano.org/projects/cardano-node/en/latest/stake-pool-operations/withdraw-rewards.html

Let us know if you have any additional questions:

Your friend, FROG

Hi ADAfrog,
The link is only for withdrawing the rewards. It doesn’t say how we delegate.

Hi Thomas,

Are you trying to pledge to a pool or just delegate to the pool?

Thanks

Your friend, FROG

No, only delegate to a pool.
For pledge I know I have a proper documentation, but I won’t be operating a staking pool for at least several months.

Hi Thomas,

Assuming you have created address key pairs and registered your stake address, you will first need to make a delegation certificate for your registered stake address:

cardano-cli shelley stake-address delegation-certificate
–staking-verification-key-file stake.vkey
–stake-pool-verification-key-file cold.vkey \ (vkey of pool to delegate to)
–out-file delegation.cert

and then build the transaction while populating appropriate values for the utxo, TxIx, ttl, fees and lovelace amount output:

cardano-cli shelley transaction build-raw /
–tx-in [utxo]#[TxIx] /
–tx-out $(cat payment.addr)+[original utxo balance - 2000000 - 200000] /
–ttl [current slot plus ~100000] /
–fee 200000 /
–out-file delegation-tx.raw /
–certificate-file delegation.cert

and then sign the transaction as follows:

cardano-cli shelley transaction sign /
–tx-body-file delegation-tx.raw /
–signing-key-file payment.skey /
–signing-key-file stake.skey /
–mainnet /
–out-file delegation-tx.signed

finally submit your transaction to the chain:

cardano-cli shelley transaction submit /
–tx-file delegation-tx.signed /
–mainnet

2 Likes

@ADAfrog since I was also wondering how someone might do this: How in general would somebody get the cold.vkey file of a pool they were interested in delegating to? I don’t see our own pool’s cold.vkey in a dump of the ledger state, so I would have assumed it was confidential… :thinking:

Just one more question: when I add ADA to these addresses, they also become delegated?

Yes - new delegation takes the end of the current epoch plus one full epoch to become effective relevant to earning rewards and influencing the slot lottery.

1 Like

Great. Thank you very much ADAfrog. I can now delegate them and forget them.
I will be absent for a long time here due to professional reasons. I very much appreciated the help I got from here, I succeeded in having a cold wallet + will be cold delegating without any ledger.

All positive energy from a fan, keep going and do your job. I will also be doing my job and buy ADA with a big chunk of my salary each month.

I hope I will come back in a few years for congratulations from an early ADA adopter.

May all our dreams come true!

With my best regards

2 Likes

Hi,
I just wanted to say I think there is a small mistake here.

If we suppose I had already registered the stake address on the blockchain, then I already paid the 2 ADA fee.
So in the second command paragraph I think it should be:
–tx-out $(cat payment.addr)+[original utxo balance - 200000]

Instead of:
–tx-out $(cat payment.addr)+[original utxo balance - 2000000 - 200000]

Of course correct me if I’m wrong.

And just one last thing: how do I verify I am succesfully delegated to the correct stake pool?

Hi Thomas,

Yes, that’s correct. Once you have paid the 2 ADA deposit for registering a stake address, it does not need to be paid again when switching pools.

If the transaction went through you should be good. You can likely query the ledger state to confirm delegation, but I would check out your pool on adapools.org, and then clicking the “delegation” tab - this will show you all the delegations the pool has received in descending from most recent

Your friend, FROG

1 Like

Yes I checked that website and they were successfully delegated. Though the only way I knew they were is because I was seeing under “delegators” the exact amount of my addresses appear. What do the addresses of delegators mean? They’re neither stake or payment addresses