Package Details: cardano-node 1.34.1-1

Git Clone URL: https://aur.archlinux.org/cardano-node.git (read-only, click to copy)
Package Base: cardano-node
Description: The core component that is used to participate in a Cardano decentralised blockchain.
Upstream URL: https://github.com/input-output-hk/cardano-node
Licenses: Apache
Submitter: emes
Maintainer: None
Last Packager: emes
Votes: 4
Popularity: 0.000776
First Submitted: 2021-01-20 01:41 (UTC)
Last Updated: 2022-04-27 12:57 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

andrej commented on 2021-08-06 08:34 (UTC)

BTW, there should be KillSignal=SIGINT in [Service], which is a known issue. After SIGTERM (the default) the shutdown occurs in a way that renders the node unresponsive for 10+ minutes (on a Ryzen 3950X with 5+ GB/s SSDs) the next time it starts.

andrej commented on 2021-08-01 03:02 (UTC)

Just a heads-up: For 1.28 you need to add the alonzo genesis files.

lsf commented on 2021-04-19 10:51 (UTC)

Just a quick note for anyone that still struggles with the haskell dependencies: I've put an updated PKGBUILD for 1.26.2 using ghcup up at https://gitlab.com/-/snippets/2101643 (and made it publicly visible this time around..) incorporating the recent changes from @emes as well :)

andrej commented on 2021-04-14 21:22 (UTC)

@emes The unit file needs an EnvironmentFile option.

...
[Service]
EnvironmentFile=-/etc/conf.d/cardano-node
ExecStart=/usr/bin/cardano-node $SOME_VAR $SOME_OTHER_VAR
...

emes commented on 2021-04-14 21:11 (UTC)

@andrej How to make the variables from /etc/conf.d/cardano-node visible in the service file? Just dropping the file in conf.d didn't seem to be enough.

andrej commented on 2021-04-11 22:42 (UTC) (edited on 2021-04-11 22:45 (UTC) by andrej)

Another side note: The build still doesn’t work for me and the patch introduced by @lsf works fine. (Yes, it downloads lots of stuff that may be already installed as packages, but it seems to be hermetic and reproducible.) The package-based Haskell libraries seem broken in some way. The huge lot of missing files and packages reported during the build suggest that there may be important bits (registries of some sort or actual files) missing in the Haskell setup on Arch. I don’t use Haskell, so I have no clue.

I first wiped out all the haskell-.* stuff I had installed before, just to make sure the build doesn’t depend on it in mysterious ways:

declare -i i=1
while ((i > 0)); do
  i=0
  for package in $(yay -Q | awk '/^haskell-/ {print $1}'); do
    yay -R "$package" --noconfirm && ((++i)) || :
  done
done

Then I used the patch by @lsf (adjusted for the current version):

diff --git a/PKGBUILD b/PKGBUILD
index 8cea7fd..e946591 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,10 +11,10 @@ _ghc_version="8.10.4"       # 8.10.3 fails to compile
 # However, if you have corresponding haskell-* packages present in the system, the build
 # will most likely fail trying to use the installed lib.
 # This is probably configurable but I'm not experienced in Haskell. Suggestions are welcome.
-makedepends=('git' 'cabal-install-bin' 'ghc>=8.10.4')
+makedepends=('git' 'ghcup-hs-bin')
 depends=('libsodium')
 _config_build="5367762"
-backup=("var/lib/cardano-node/config/{main,test}net-{config,topology}.json")
+backup=(var/lib/cardano-node/config/{main,test}net-{config,topology}.json)
 source=("https://github.com/input-output-hk/${pkgname}/archive/${pkgver}.zip"
         "https://hydra.iohk.io/build/${_config_build}/download/1/mainnet-config.json"
         "https://hydra.iohk.io/build/${_config_build}/download/1/mainnet-byron-genesis.json"
@@ -44,6 +44,12 @@ sha256sums=("e725f425cb7b7e581208a9b7b6989049fbaba8634475889910d92a09a14cac13"

 prepare() {
   cd "${srcdir}/${pkgname}-${pkgver}"
+  mkdir -p ${srcdir}/ghcup_tmp
+  TMPDIR=${srcdir}/ghcup_tmp ghcup install ghc ${_ghc_version}
+  ghcup set ghc ${_ghc_version}
+  ghcup install cabal
+  export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH"
+  cabal update
   cabal configure
   echo "package cardano-crypto-praos" >> ${srcdir}/${pkgname}-${pkgver}/cabal.project.local
   echo "  flags: -external-libsodium-vrf" >> ${srcdir}/${pkgname}-${pkgver}/cabal.project.local

That^^^ builds without issues.

andrej commented on 2021-04-11 16:40 (UTC)

BTW, the backup array in the PKGBUILD is currenty wrong; it must be either explicitly expanded or without double-quotes.

What you have:

backup=("var/lib/cardano-node/config/{main,test}net-{config,topology}.json")
for i in "${!backup[@]}"; do echo "backup[${i}] = ${backup[i]}"; done

What you want:

backup=(var/lib/cardano-node/config/{main,test}net-{config,topology}.json)
for i in "${!backup[@]}"; do echo "backup[${i}] = ${backup[i]}"; done

Other ways to set that^^^:

backup=('var/lib/cardano-node/config/'{main,test}'net-'{config,topology}'.json')
backup=('var/lib/cardano-node/config/mainnet-config.json'
        'var/lib/cardano-node/config/mainnet-topology.json'
        'var/lib/cardano-node/config/testnet-config.json'
        'var/lib/cardano-node/config/testnet-topology.json')

andrej commented on 2021-04-09 00:08 (UTC) (edited on 2021-04-09 00:09 (UTC) by andrej)

Yet another bit of input: It would be great to have /etc/conf.d/cardano-node (or the like) for easy command line customization without systemd drop-in files (which insist on overriding the entire command line). (This bug is an equivalent idea for openethereum, pointing at an example.)

The advantage of environment files over drop-in files is “update transparency”:

  • With drop-in files, upstream command-line updates in /usr/lib/systemd/system won’t propagate back into a drop-in file (which must override the entire command line) and there will be no obvious warning about such changes.
  • With environment variables from /etc/conf.d/..., the environment file can be in the backup=(...) array and there will be a clear indication that something has changed (a .pacnew file) each time the default file gets updated.

emes commented on 2021-04-07 11:26 (UTC)

Thanks for your input, people. In the latest release I dropped the testnet dirs and included the relevant service file as an example.

As for the Haskell environment, I'm not familiar with that and could only blindly check what works and what doesn't. If someone more experienced is willing to clean that up and maintain the package, I'm willing to hand it over.

lsf commented on 2021-04-07 10:37 (UTC)

@emes a bit late to the party.

basically I had two different kinds of error (especially when building in a clean chroot): => cabal update had to be placed earlier, otherwise it could not resolve the dependencies. => with that done, there were either some (system haskell) dependencies missing and/or even if they were there, they weren't accepted / valid. installing everything that might've helped didn't work either.

The latter issue was why I had then just switched to just using ghcup (as neither ghc-pristine nor cabal-static seemed to get me something working either).

Unfortunately I don't have the exact errors anymore.

If anyone needs it, here's a PKGBUILD for 1.26.1 using ghcup: https://gitlab.com/-/snippets/2101643