Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cardano-wallet NixOS module not working with cardano-node NixOS module #4522

Open
3 tasks done
koslambrou opened this issue Apr 3, 2024 · 2 comments
Open
3 tasks done

Comments

@koslambrou
Copy link

Just checking...

  • This is a cardano-wallet bug.
  • I am using the latest cardano-wallet release.
  • I am using the correct cardano-node version for that release of cardano-wallet.

Version

v2024-03-27 (git revision 08ab303)

Platform

Linux desjardins 6.1.63 #1-NixOS SMP PREEMPT_DYNAMIC Mon Nov 20 10:52:19 UTC 2023 x86_64 GNU/Linux

Installation method

Nix

Network configuration

mainnet

Context

No response

Description

Steps to Reproduce

Here are the relevant parts of my initial configuration.nix with a working cardano-node:

let
cardano-node = import
  (builtins.fetchTarball {
    url = https://github.com/IntersectMBO/cardano-node/archive/refs/tags/8.9.1.tar.gz;
 }) {};
in
{
  imports = [
    cardano-node.nixosModules.cardano-node
  ];

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users = {
    xxx = {
      isNormalUser = true;
      extraGroups = [ "wheel" ... "cardano-node" ];
    };

  services.cardano-node = {
    enable = true;
    environment = "mainnet";
    stateDir = "/var/lib/cardano-node/mainnet";
    runtimeDir = i: "/var/lib/cardano-node/mainnet";
    socketPath = i : "${config.services.cardano-node.runtimeDir i}/cardano-node.socket";
    databasePath = i : "${config.services.cardano-node.stateDir i}/db";
  };

  ...

}

Then, as I wanted to add the cardano-wallet NixOS module, I changed it as follows:

let
# cardano-wallet needs to use a version compatible with cardano-node.
cardano-node = import
  (builtins.fetchTarball {
    url = https://github.com/IntersectMBO/cardano-node/archive/refs/tags/8.9.1.tar.gz;
 }) {};
+ cardano-wallet = import
+  (builtins.fetchTarball {
+   url = https://github.com/cardano-foundation/cardano-wallet/archive/refs/tags/v2024-03-27.tar.gz;
+ }) {};
in
{
  imports = [
    cardano-node.nixosModules.cardano-node
+    cardano-wallet.nixosModule
  ];

+  services.cardano-wallet = {
+     enable = true;
+     walletMode = config.services.cardano-node.environment;
+     nodeSocket = config.services.cardano-node.socketPath 0;
+     poolMetadataFetching = {
+       enable = true;
+       smashUrl = "https://smash.cardano-mainnet.iohk.io";
+     };
+     tokenMetadataServer = "https://tokens.cardano.org";
+   };

  ...
}

These steps come directly from cardano-wallet documentation: https://cardano-foundation.github.io/cardano-wallet/user/installation/use-nixos.html#nixos-module

Expected behavior

A working cardano-wallet systemd service which syncs with the installed cardano-node.

Actual behavior

Without adding the cardano-wallet NixOS module, my cardano-node service would successfully sync on mainnet. When adding the cardano-wallet NixOS module, the cardano-node service fails.

Here is the output of journalctl -u cardano-node.service

Apr 03 11:54:49 desjardins systemd[1]: Failed to start cardano-node node 0 service.
Apr 03 11:54:50 desjardins systemd[1]: cardano-node.service: Scheduled restart job, restart counter is at 12.
Apr 03 11:54:50 desjardins systemd[1]: Starting cardano-node node 0 service...
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: Starting: exec /nix/store/vxwqzhjp4wfj42cm3ff42z3cgr7244vp-cardano-wallet-2024.3.27/bin/cardano-node run
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: --config /nix/store/76zh2cy72zz8bxh7k5c4v7rgiba9qrk1-config-0-0.json
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: --database-path /var/lib/cardano-node/mainnet/db
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: --topology /nix/store/czj80vj5a9vg1xdg3sgqpfj0hc8zv3pb-topology.yaml
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: --host-addr 127.0.0.1
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: --port 3001
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: --socket-path /var/lib/cardano-node/mainnet/cardano-node.socket
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: +RTS
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: -N2
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: -I0
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: -A16m
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: -qg
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: -qb
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: --disable-delayed-os-memory-return
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: -RTS
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: ..or, once again, in a single line:
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: exec /nix/store/vxwqzhjp4wfj42cm3ff42z3cgr7244vp-cardano-wallet-2024.3.27/bin/cardano-node run --config /nix/store/76zh2cy72zz8bxh7k5c4v7rgiba9qrk1-config-0-0.json --database-path /var/lib/cardano-node/mainnet/db --topology /nix/store/czj80vj5a9vg1xdg3s>
Apr 03 11:54:50 desjardins cardano-node-start[2090387]: /nix/store/z92lwrkckp23r8rf8j5xgmxjgj7dgwf2-unit-script-cardano-node-start/bin/cardano-node-start: line 26: /nix/store/vxwqzhjp4wfj42cm3ff42z3cgr7244vp-cardano-wallet-2024.3.27/bin/cardano-node: No such file or directory
Apr 03 11:54:50 desjardins systemd[1]: cardano-node.service: Main process exited, code=exited, status=127/n/a

The output of journalctl -u cardano-wallet.service

Apr 03 11:58:40 desjardins cardano-wallet[2080409]: [cardano-wallet.pools-engine:Warning:23] [2024-04-03 15:58:40.41 UTC] Still not syncing. Applied 0 blocks, 0 rollbacks in the last 30.00141581s. Current tip is [point genesis]. (not applying blocks)
Apr 03 11:58:40 desjardins cardano-wallet[2080409]: [cardano-wallet.network:Warning:16] [2024-04-03 15:58:40.62 UTC] Delegation Rewards node client: Couldn't connect to node (x187). Retrying in a bit...
Apr 03 11:58:40 desjardins cardano-wallet[2080409]: [cardano-wallet.network:Warning:22] [2024-04-03 15:58:40.62 UTC] Chain Sync node client: Couldn't connect to node (x187). Retrying in a bit...
Apr 03 11:58:40 desjardins cardano-wallet[2080409]: [cardano-wallet.network:Warning:14] [2024-04-03 15:58:40.62 UTC] Node Tip node client: Couldn't connect to node (x187). Retrying in a bit...
Apr 03 11:58:42 desjardins cardano-wallet[2080409]: [cardano-wallet.network:Warning:14] [2024-04-03 15:58:42.62 UTC] Node Tip node client: Couldn't connect to node (x188). Retrying in a bit...
Apr 03 11:58:42 desjardins cardano-wallet[2080409]: [cardano-wallet.network:Warning:22] [2024-04-03 15:58:42.62 UTC] Chain Sync node client: Couldn't connect to node (x188). Retrying in a bit...

Looking at the logs, the cardano-wallet service doesn't use the cardano-node that I have installed.

@koslambrou
Copy link
Author

Not the same error, but this seems related to #3179

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@koslambrou and others