Updating stake pool school Config files

There is a discrepancy between references to config files in the stake pool school.

The link given in "Get configuration files’ points to

wget https:...testnet-config.json
wget https:...testnet-shelley-genesis.json
wget https:...testnet-byron-genesis.json
wget https:...testnet-topology.json

while start-your-node refer to shelley_testnet-topology.json and shelley_testnet-config.json

They don’t seem to have the same content since the first starts a node with CardanoProtocol and the later with ShelleyProtocol

Also trying to copy the url from the screen cast I get a 404 error for the files

wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/shelley_testnet-config.json
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/shelley_testnet-shelley-genesis.json
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/testnet-byron-genesis.json
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/shelley_testnet-topology.json

but in the end, it does not seem to make a big difference. The node starts and seem to sync.

Another difference, I notice, is the node version. The screen cast use 1.15 while I use 1.18 but since I did not follow the first tuto on node installation with AWS I can’t say if 1.15 was the recommanded version to install. Still, I’de rather stick to the latest.

1 Like

Hello @maliky,

if you have found a solution to your problem, it would be very helpful for many others to post it here rather than withdrawing you posting.

Thank you very much for consideration.

2 Likes

It’s not so much that I had found a solution to the problem, but rather that I had found that there were no real problem.

2 Likes

The command lines given in Get Configuration Files are

wget https:...testnet-config.json
wget https:...testnet-shelley-genesis.json
wget https:...testnet-byron-genesis.json
wget https:...testnet-topology.json

Then we move on to Start your node where the commands given are

 cardano-node run \
 --topology shelley_testnet-topology.json \
 --database-path db \
 --socket-path db/node.socket \
 --host-addr x.x.x.x \
 --port 3001 \
 --config shelley_testnet-config.json

There is a discrepancy between the downloaded files and the files used for topology and config. The commands as given do not work, as they reference files that do not exist.

I changed the topology and config FILEPATHs to instead reference the files downloaded which gives (my ip is excluded for this post)

cardano-node run \
 --topology testnet-topology.json \
 --database-path db \
 --socket-path db/node.socket \
 --host-addr x.x.x.x \
 --port 3001 \
 --config testnet-config.json
2 Likes

I don’t see much difference between mainnet and testnet config files.
Below are a few diff which could help

--- ...Cardano/config/mainnet-topology.json	
+++ ...Cardano/config/testnet-topology.json	
@@ -1,7 +1,7 @@
 {
   "Producers": [
     {
-      "addr": "relays-new.cardano-mainnet.iohk.io",
+      "addr": "relays-new.cardano-testnet.iohkdev.io",
       "port": 3001,
       "valency": 2
     }

and

--- ...Cardano/config/mainnet-config.json	
+++ ...Cardano/config/testnet-config.json	
@@ -1,16 +1,16 @@
 {
   "ApplicationName": "cardano-sl",
-  "ApplicationVersion": 1,
-  "ByronGenesisFile": "mainnet-byron-genesis.json",
-  "ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb",
+  "ApplicationVersion": 0,
+  "ByronGenesisFile": "testnet-byron-genesis.json",
+  "ByronGenesisHash": "96fceff972c2c06bd3bb5243c39215333be6d56aaf4823073dca31afe5038471",
   "LastKnownBlockVersion-Alt": 0,
   "LastKnownBlockVersion-Major": 2,
   "LastKnownBlockVersion-Minor": 0,
   "MaxKnownMajorProtocolVersion": 2,
   "Protocol": "Cardano",
-  "RequiresNetworkMagic": "RequiresNoMagic",
-  "ShelleyGenesisFile": "mainnet-shelley-genesis.json",
-  "ShelleyGenesisHash": "1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81",
+  "RequiresNetworkMagic": "RequiresMagic",
+  "ShelleyGenesisFile": "testnet-shelley-genesis.json",
+  "ShelleyGenesisHash": "849a1764f152e1b09c89c0dfdbcbdd38d711d1fec2db5dfa0f87cf2737a0eaf4",
   "TraceBlockFetchClient": false,
   "TraceBlockFetchDecisions": false,
   "TraceBlockFetchProtocol": false,

I’m running node 1.18

Thanks Andy!

When trying to follow the course you were correct in that the “start your node” section will not work as the command references files that do not exist. I tried your suggestion above and found that it worked!

cardano-node run
–topology testnet-topology.json
–database-path db
–socket-path db/node.socket
–host-addr x.x.x.x
–port 3001
–config testnet-config.json

1 Like

So now that my node is up:

Its saying that I’m on both the Byron and Shelley release at the top of the screen in LiveView and it is connected to the blockchain.

I’m having trouble running cardano-cli; cardano-cli shelley now. Unable to generate keys…

Will the school be updating the course? I might need to start over.

1 Like

Yes, after starting the node for the first time all following commands get response
“cardano-node: error while loading shared libraries: libsodium.so.23: cannot open shared object file: No such file or directory”

1 Like

This may be a different issue:
Did you build and install libsodium

  cd ~; mkdir git ; cd git;
  git clone https://github.com/input-output-hk/libsodium
  cd libsodium
  git checkout 66f017f1
  ./autogen.sh
  ./configure
  make
  sudo make install

Yes, that was done before.
I don’t get that message before running the node. Only after the node has been run I start getting it. After starting then stopping the node a couple times I can no longer start the node. Just keep getting that message.

same with me, after rebooting
I did the steps 9 and 10 of the libsodium installation:
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
inside libsodium directory
and than the cardano-node command worked
but don’t know how to fix it permanently

Just add this to your .bashrc (and then source .bashrc to take effect same session)

export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"

1 Like

can you try adding this to your .bashrc and source it:
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"

and within your .bash_profile add:
test -f ~/.bashrc && source ~/.bashrc

1 Like

Thanks ADAfrog!

Here is how I implemented that solution.

cd
nano .bashrc

scroll to bottom and paste these two lines

export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"

Press control-x to exit
Press y to save
Press enter to confirm save

nano .bash_profile

scroll to the bottom and paste

test -f ~/.bashrc && source ~/.bashrc

Press control-x to exit
Press y to save
Press enter to confirm save

sudo reboot

Reboot command will restart your machine.
Close and reopen your terminal window.
Wait a couple minutes then log back into your machine.

I could be wrong about the implementation, though. I’m a noob myself.

4 Likes

Thanks both! Thats work like a charm!

1 Like

Configure Topology Files for Relay and Block Producing Nodes:

This section script will not work. I used the main net version instead:

wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/mainnet-config.json
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/mainnet-byron-genesis.json
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/mainnet-shelley-genesis.json
wget https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/mainnet-topology.json

1 Like

change “sudo reboot” to “source .bash_profile”

nice work!

1 Like

Anyone get this error on node start up?

[ip-172-3:cardano.node.release:Notice:5] [2020-08-11 23:09:01.75 UTC] CardanoProtocol
FsError {fsErrorType = FsInsufficientPermissions, fsErrorPath = /db, fsErrorString = “Permission denied”, fsErrorNo = Just (Errno 13), fsErrorStack = [(“ioToFsError”,SrcLoc {srcLocPackage = “ouroboros-consensus-0.1.0.0-inplace”, srcLocModule = “Ouroboros.Consensus.Storage.FS.IO”, srcLocFile = “src/Ouroboros/Consensus/Storage/FS/IO.hs”, srcLocStartLine = 88, srcLocStartCol = 41, srcLocEndLine = 88, srcLocEndCol = 68}),(“handleError”,SrcLoc {srcLocPackage = “ouroboros-consensus-0.1.0.0-inplace”, srcLocModule = “Ouroboros.Consensus.Storage.FS.IO”, srcLocFile = “src/Ouroboros/Consensus/Storage/FS/IO.hs”, srcLocStartLine = 84, srcLocStartCol = 23, srcLocEndLine = 84, srcLocEndCol = 38}),(“rethrowFsError”,SrcLoc {srcLocPackage = “ouroboros-consensus-0.1.0.0-inplace”, srcLocModule = “Ouroboros.Consensus.Storage.FS.IO”, srcLocFile = “src/Ouroboros/Consensus/Storage/FS/IO.hs”, srcLocStartLine = 65, srcLocStartCol = 54, srcLocEndLine = 65, srcLocEndCol = 71}),(“createDirectoryIfMissing”,SrcLoc {srcLocPackage = “ouroboros-consensus-0.1.0.0-inplace”, srcLocModule = “Ouroboros.Consensus.Storage.FS.API”, srcLocFile = “src/Ouroboros/Consensus/Storage/FS/API.hs”, srcLocStartLine = 123, srcLocStartCol = 5, srcLocEndLine = 123, srcLocEndCol = 29})], fsLimitation = False}

cardano-node: FsInsufficientPermissions for /db: Permission denied at CallStack (from HasCallStack):
ioToFsError, called at src/Ouroboros/Consensus/Storage/FS/IO.hs:88:41 in ouroboros-consensus-0.1.0.0-inplace:Ouroboros.Consensus.Storage.FS.IO
handleError, called at src/Ouroboros/Consensus/Storage/FS/IO.hs:84:23 in ouroboros-consensus-0.1.0.0-inplace:Ouroboros.Consensus.Storage.FS.IO
rethrowFsError, called at src/Ouroboros/Consensus/Storage/FS/IO.hs:65:54 in ouroboros-consensus-0.1.0.0-inplace:Ouroboros.Consensus.Storage.FS.IO
createDirectoryIfMissing, called at src/Ouroboros/Consensus/Storage/FS/API.hs:123:5 in ouroboros-consensus-0.1.0.0-inplace:Ouroboros.Consensus.Storage.FS.API[ec2-user

Did you check that the user you run the cardano-node has write to /db ? maybe instead of /db you should user ~/db or ~/node/db

1 Like

Thanks! it was because I was mixing mainnet files with testnet. Is there a tutorial for that is up to date for creating a mainnet stake pool?