Skip to content

Conversation

@brainrake
Copy link
Contributor

@brainrake brainrake commented Apr 10, 2024

  • add kupo package, module, service module, test
  • uses binary release kupo 2.8.0
  • downgraded ogmios to 6.1.0 since that is the version compatible with cardano-node 8.7.3 which we use

@brainrake brainrake changed the title kupo wip add Kupo package, module, test Apr 10, 2024
@brainrake brainrake force-pushed the marton/kupo branch 7 times, most recently from ee61a1a to b69857c Compare May 8, 2024 12:09
@brainrake brainrake requested a review from aciceri May 8, 2024 12:21
@brainrake brainrake marked this pull request as ready for review May 8, 2024 12:21
modules/kupo.nix Outdated
services.kupo = {
enable = true;
nodeSocketPath =
lib.mkIf (!(config.cardano.ogmios.enable or true) || config.cardano.node.enable or false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for that condition?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • if ogmios is enabled on the same host, kupo should by default connect to ogmios and not use node socket path
  • if ogmios is not enabled but cardano-node is enabled, node socket should be used
  • if neither is enabled, no default should be set and the user is expected to set either node socket path or ogmios address

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But right now if neither is enabled then the default option is set.
so shouldn't it be instead:

! ogmios && cardano.node

or just

cardano.node

because it doesn't harm to set the option if its not used in the case of ogmios enabled (and actually, I've hit this in db-sync - will it not just error with type error when ogmios is enabled but cardano.node is not? then the option is not set and the else clause of mkIf is not of the fitting type path)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ok, made the condition simpler by just checking cardano.node.enable
  • the option type is actually nullOr path because it is optional, so null was fine
  • i added or null because of some problem with the documentation generation, looks like it works though
  • the default value is a path anyway, makes sense to set it as the most common value used

@brainrake brainrake merged commit 357c0fd into main May 15, 2024
@brainrake brainrake deleted the marton/kupo branch May 15, 2024 20:16
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

Successfully merging this pull request may close these issues.

3 participants