Who could post the connect-to-mainnet script contents?


#1

it’s generated by running
nix-build -A connectScripts.mainnetWallet -o connect-to-mainnet
which requires a nix package manager beeing installed, which my platform lacks of. Thanks in advance.
Experiences with locally installing a nix as a user, just for the purpose of building those scripts and config files anybody?
I have seen people create shellscripts to create some of the required yaml configs. Not so happy about the builder components employed, since they are often unknown.


#2

(Moved from Community Technical Support to a more appropriate category.)


#3

More about Technical Support request than Development related, from my point of view. Maybe this part of the forum has the more technology focused visitors.
Stuck with

04:45> nix-build --show-trace -A connectScripts.mainnetWallet -o connect-to-mainnet
error: while evaluating anonymous function at /home/cardano/src/cardano-sl-fresh/default.nix:4:1, called from undefined position:
while evaluating anonymous function at /home/cardano/src/cardano-sl-fresh/pkgs/default.nix:5:1, called from /home/cardano/src/cardano-sl-fresh/default.nix:31:19:
while evaluating the file '/home/cardano/src/cardano-sl-fresh/lib.nix':
while evaluating the attribute 'builder' of the derivation '61fbdb47a69f78998f55207e64122a0798047b5d.tar.gz-unpacked' at /home/cardano/src/cardano-sl-fresh/fetch-nixpkgs.nix:10:3:
path '/bin/bash' is not in the Nix store, at /home/cardano/src/cardano-sl-fresh/fetch-nixpkgs.nix:11:13

How comes that “path ‘/bin/bash’ is not in the Nix store” that seems to be concerns about nondeterministical built results?
/bin/bash exists, but none of the *.nix files from this trace output mentions it. The closest is fetch-nixpkgs.nix featuring “builder = builtins.storePath nixcfg.shell;” My assumption nixcfg.shell = ‘/bin/bash’ but the details are still fuzzy, have read too much nix documentation which is overwhelmingly time consumptive. A new programing language.
From nix-env -i bash-4.4-something there are a lot of entries left inside ~/nix/store/-bash and even a bin/bash that according to ldd output is runable, tested bash --version and it answers.


#4

Yes it does, the CTS category is for ordinary users, most of whom won’t even know what “compilation” means!

Sorry you’ve had no response though! Apart from me… :blush:


#5

Does this help you? https://pastebin.com/cidx2RhD


#6

Here’s mine after build on Linux…

#!/nix/store/flb9ar1xdd13c606aa4my9miy3iv4vyk-bash-4.4-p12/bin/bash

if [[ "$1" == "--delete-state" ]]; then
  echo "Deleting state-wallet-mainnet ... "
  rm -Rf state-wallet-mainnet
fi

echo "Keeping state in state-wallet-mainnet"
mkdir -p state-wallet-mainnet/logs

echo "Launching a node connected to 'mainnet' ..."
if [ ! -d state-wallet-mainnet/tls ]; then
  mkdir state-wallet-mainnet/tls/
  /nix/store/jn350na5wcshwsixpq1wbskdp7r3x0r3-openssl-1.0.2l-bin/bin/openssl req -x509 -newkey rsa:2048 -keyout state-wallet-mainnet/tls/server.key -out state-wallet-mainnet/tls/server.cert -days 3650 -nodes -subj "/CN=localhost"
fi



/nix/store/k1aa4d2riraz6nx3zqhsanasjpfhhhc3-cardano-sl-wallet-1.0.3/bin/cardano-node                                     \
  --no-ntp                                                       \
  --configuration-file /nix/store/vqyfgdg7i3hdh3q8zp0xx3nrzgja4525-cardano-config/configuration.yaml         \
  --configuration-key mainnet_full     \
  --web                                           \
  --tlscert state-wallet-mainnet/tls/server.cert           \
  --tlskey state-wallet-mainnet/tls/server.key             \
  --tlsca state-wallet-mainnet/tls/server.cert             \
  --log-config /nix/store/vqyfgdg7i3hdh3q8zp0xx3nrzgja4525-cardano-config/log-config-qa.yaml                 \
  --topology "/nix/store/vqyfgdg7i3hdh3q8zp0xx3nrzgja4525-cardano-config/topology.yaml"                      \
  --logs-prefix "state-wallet-mainnet/logs"                               \
  --db-path "state-wallet-mainnet/db"                                     \
  --wallet-db-path 'state-wallet-mainnet/wallet-db'        \
  --keyfile state-wallet-mainnet/secret.key                               \
  --wallet-address 127.0.0.1:8090               \
  --ekg-server 127.0.0.1:8000 --metrics                            \
  +RTS -N2 -qg -A1m -I0 -T -RTS                                    \