Compile & Run Cardano SL Node

Hi guys,
I am working on running Cardano SL from source.
I get to running this command:
$ nix-build -A cardano-sl-node-static --cores 0 --max-jobs 2 --no-build-output --out-link master
but it fails with this error:
error: attribute ‘cardano-sl-node’ in selection path ‘cardano-sl-node’ not found

anyone knows why cardano-sl-node attr is missing?

Thanks in advance
R

Try building it with cardano-sl-static

$ nix-build -A cardano-sl-static --cores 0 --max-jobs 2 --no-build-output --out-link master

See this PR

1 Like

please update the document
https://github.com/input-output-hk/cardano-sl/blob/develop/docs/how-to/build-cardano-sl-and-daedalus-from-source-code.md

1 Like

for what it is worth I use -A cardano-sl-wallet to build the node see default.nix for targets.

1 Like
1 Like

Build on Ubuntu 16.04 with stack works fine.

Just add nix settings into stack configuration and follow Stack with Nix for system libraries (mixed mode) Instruction.

1 Like

@p-alik @h4ck3rm1k3 @liming_ihaomo @zmeel
thanks guys. perfect ! I managed to build it now. I have a new questions now. I get the following error after running the node:

ConfigurationParseFailure “node/configuration.yaml” (InvalidYaml (Just (YamlException “Yaml file not found: node/configuration.yaml”)))

Any ideas ? I found a list of all parameters as part of documentation but I can really get my head around using it properly.

What I am suppose to do next ? any help is appreciated.

can you copy it from ./lib/configuration.yaml

@Raha_Mohebbi,

judging from the error message, I would say you haven’t the file node/configuration.yaml.

Here original node/configuration.yaml.

@h4ck3rm1k3 wrote a very helpful installation instruction. Just follow it to avoid troubles.

Thanks this ^^ worked for me too.

Now when I run master/bin/cardano-node-simple I get error:

cardano-node-simple: MissingSystemStartTime

So a little research shows me this Issue gives hints to the solution. I’ll post a new thread if I can’t solve it. I’ll try to make a tutorial covering all these issues once I’m done.

@devcap: That’s my issue on Github :sunglasses:

The solution is quite simple. There is a script you need to build that starts your node and connect it to the mainnet. You build the script with this:

nix-build -A connectScripts.mainnetWallet -o connect-to-mainnet

@Raha_Mohebbi idk if this will work for you, but if I run master/bin/cardano-node-simple then I DON’T get your yaml error, but if I cd into master and then run bin/cardano-node-simple then I get your exact yaml error. So maybe try running the node from project root

1 Like

@zmeel
Thanks I ran nix-build -A connectScripts.mainnetWallet -o connect-to-mainnet like you said and it completed after a few minutes. It created this script which I ran:

./connect-to-mainnet

How to connect to cluster

@devcap And? Did your node work? Did it connect to the mainnet?

yes, it did run successfully! Lots of cool activity going on in the log. I think next I’ll lookup the API and try to work with it from command-line.

Next:
I want to understand better how this differs from the stuff in cardano-sl/scripts/launch and cardano-sl/scripts/launch/connect-to-cluster as it sounds similar and is referenced in cardanodocs.com/technical/launcher. Any ideas? I’ll research and try to follow those instructions too.

I also want to understand how or why the wallet is a separate application. When I ran a full bitcoin node a while ago, the features were all part of the same Bitcoin Core program, I believe. You can also run a bitcoin ‘lite node’ which is like a limited full node, for wallet functionality only.

2 Likes

I think the wallet is just a nice interface for the node. With the connect-to mainnet script you start a node-with-wallet. Most/all of the API’s are for wallet handling.

what OS are you guys using ? Win/Linux/OSX ?

Linux and OSX

fyi everyone: The build process on OSX is surprisingly easy!

where can i find the cert file for postman?