Cold keys and cold counter file generation does not work

Hello,
I am currently following CoinCashew tutorial to set up my stake pool.
https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node/part-iii-operation/generating-keys-for-the-block-producing-node
I have set up two relays and one block producer nodes and all three are synced up. I have generated the KES key pair on BP and now trying to generate set of cold keys and cold counter file. I have set up my air-gapped offline machine as described. My cardano-cli seems to be working as well.
Howver, when running the following command, there is no error but I donā€™t have anything that is generated. The cold-keys and cardano-node-home folders are both empty. Nothing seems to be happening.

cardano-cli node key-gen \
    --cold-verification-key-file node.vkey \
    --cold-signing-key-file $HOME/cold-keys/node.skey \
    --operational-certificate-issue-counter node.counter

I am not sure what I did wrong here but can anyone please help me?
Thanks a ton.
Kind regards,
Deeraj

Check your home folder. If you ran this command from HOME then it might just be there.

Hi Jeremy, thanks for your reply.
No I checked the $HOME folder and almost everywhere that I could. Seems link the command simply does nothing for me. Nothing seems to be generated.
I am starting to think if I have configured my off-line machine properly. I have:

  • Copied cardano-cli and put it in /usr/local/bin
  • Copied the four files for libsodium.
  • Created symbolic links for a couple libsodium files.

I am now thinking of breifly connecting the air-gap machine to the internet, installing libsodium and cardano cli, however, I am not sure if this is recommended.

Any hints are welcome :slight_smile:

No, definately not recommended to briefly connect. Thereā€™ll be something else going on.

Does cardano-cli work for other functions? e.g. cardano-cli version

Ah, yes I guessed so, I will not connect it with the internet.
I did try to run the cardano-cli to check its version and this also didnā€™t seem to work. No errors as such but does not seem to do anything.
Just to reiterate what I have done, I copied the cardano-cli from my relay1 node and simply pasted it in the air-gap one. I also gave it executable permissions by running:

sudo chmod +x /usr/local/bin/cardano-cli

Is there something that I am not aware of that I might not be doing correctly?
Again thanks or your help :slight_smile:

So when you type /usr/local/bin/cardano-cli in the terminal, nothing shows on screen, and you get a new prompt?

edit: If yes, does any other Linux command give any output, like ls

As long as it is copied in /usr/local/bin/ and has +x execution permission, it is fine.

You should have a folder cold-keys in home /home/user/cold-keys/

There it is looking fo node.vkey in current directory and node.skey in cold-keys folder to sign:

--cold-verification-key-file node.vkey \
--cold-signing-key-file $HOME/cold-keys/node.skey \

Yes, thats exactly what happens :frowning: I get nothing and it simply moves on to a new prompt. All other linux commands are working as expected. I have just double checked this.
I have read that for cardano-cli to run we need libsodium as well. Maybe I have issues with some dependencies? However, since the cardano-cli command does not output anything, I am not sure how I should find this out. Is there a way to verbose the output somehow?

Yes, I also understood the same. But for me it does not seem to work in my air-gap offline machine :frowning:
Surely, somewhere I am doing something wrong but I am not able debug this. Do let me know if something clicks for you :slight_smile: Thank you

Please compare the checksum of both executables (cksum), the one on the relay and the one on the air-gapped machine, just to make sure both files are the same.

Iā€™m not sure if the cli command generates some logs, maybe check the local directory or the /var/logs folder.

1 Like

cardano-cli not giving anything, not even an error message does sound like you did something wrong in that step.

How can you even ā€œpasteā€ into the air-gapped machine if it is not connected to a network?

In addition to what @mcrio suggests:

  • Use command -v cardano-cli to check what gets executed when you call cardano-cli.
  • Inspect what kind of file that even is with ls -l and file.
1 Like

You need to go back to this part of the guide. Make sure it has the required packages and copy your binary to: /usr/local/bin/

Check the order

  1. Insert USB
  2. Copy cardano-cli to Air-gapped in /usr/local/bin/
  3. THEN give execution permission on relay/bp where you compiled
  4. Give execution permission on Air-gapped machine

I copied the cardano-cli from one of my relay nodes to a USB and then pasted it in the air-gap machine.
The command -v cardano-cli seems to output the correct path to the executable. Yes, I think Ill just redo all the steps to configure the air-gap.

Yes, I think best would be to retry the air-gap configuration.

1 Like

Before redoing everything Iā€™d try creating a new user account, logging in as that user and trying to run cardano-cli --versionā€¦ Maybe somehow the terminal got messes up.

I assume you already verified the checksums and checked the type of the file as @HeptaSean suggested.

Also for experimenting purposes try to redirect all output to a file and see if anything gets populated.
cardano-cli --version > output.txt 2>&1