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

Add torq: a capital management tool for LN routing nodes #581

Closed
mmilata opened this issue Jan 5, 2023 · 14 comments
Closed

Add torq: a capital management tool for LN routing nodes #581

mmilata opened this issue Jan 5, 2023 · 14 comments

Comments

@mmilata
Copy link
Contributor

mmilata commented Jan 5, 2023

https://github.com/lncapital/torq

@ekimber
Copy link

ekimber commented Jan 13, 2023

There is no torq nixos package and rather than try to package it, I have created a module for torq using podman oci containers. I am happy to share that, though I'm not sure it is suitable for inclusion into nix-bitcoin as it is rather a different way of doing things compared to the other modules.

@prusnak
Copy link
Contributor

prusnak commented Jan 13, 2023

Since Torq is written in Go and requires only PostgreSQL it should be trivial to get it working in Nixpkgs / Nix-Bitcoin.

@mmilata
Copy link
Contributor Author

mmilata commented Jan 15, 2023

Tried packaging it but ran into an error when building the go module dependencies:

go: downloading go.opentelemetry.io/otel/internal/metric v0.27.0
github.com/lncapital/torq/pkg/lnd_connect imports
        github.com/lightningnetwork/lnd/macaroons imports
        github.com/lightningnetwork/lnd/kvdb imports
        github.com/lightningnetwork/lnd/kvdb/etcd imports
        go.etcd.io/etcd/server/v3/embed imports
        go.opentelemetry.io/otel/semconv: no required module provides package go.opentelemetry.io/otel/semconv; to add it:
        go get go.opentelemetry.io/otel/semconv
github.com/lncapital/torq/pkg/lnd_connect imports
        github.com/lightningnetwork/lnd/macaroons imports
        github.com/lightningnetwork/lnd/kvdb imports
        github.com/lightningnetwork/lnd/kvdb/etcd imports
        go.etcd.io/etcd/server/v3/embed imports
        go.opentelemetry.io/otel/exporters/otlp imports
        go.opentelemetry.io/otel/sdk/metric/controller/basic imports
        go.opentelemetry.io/otel/metric/registry: no required module provides package go.opentelemetry.io/otel/metric/registry; to add it:
        go get go.opentelemetry.io/otel/metric/registry

https://gist.github.com/mmilata/f24e471e6903c9469d0264c7dc14dec0

Running go build on torq repo works fine, running go mod vendor produces the same error.

@prusnak
Copy link
Contributor

prusnak commented Jan 16, 2023

Tried packaging it but ran into an error when building the go module dependencies:

Opened an upstream issue here: https://github.com/lncapital/torq/issues/320

@ohenrik
Copy link

ohenrik commented Jan 16, 2023

I have applied a fix on main, let me know if it works or not.

But be aware that we are currently working on main so this cannot be relied on to work. To make sure you have a working version I suggest using a tagged version. I can create a new version number for you if main is working now.

@mmilata
Copy link
Contributor Author

mmilata commented Jan 16, 2023

The package builds fine against current main, thanks @ohenrik! Can you please create tagged version? I'll open nixpkgs PR afterwards - who wants to be a comaintainer?

@prusnak
Copy link
Contributor

prusnak commented Jan 16, 2023

@mmilata feel free to add me as a co-maintainer

@ohenrik
Copy link

ohenrik commented Jan 16, 2023

Great! I'll create a new tag tomorrow, we discovered a bug that we would like to include first. Hope that is ok :)

@mmilata
Copy link
Contributor Author

mmilata commented Jan 17, 2023

a package NixOS/nixpkgs#211293

@prusnak
Copy link
Contributor

prusnak commented Jan 18, 2023

a package NixOS/nixpkgs#211293

Merged into Nixpkgs 👍

@prusnak
Copy link
Contributor

prusnak commented Jan 18, 2023

@mmilata lndhub.go has similar architecture - binary in go which requires postgresql - feel free to peek at #519 to see how torq integration into nix-bitcoin could look like: e.g. the module file: https://github.com/fort-nix/nix-bitcoin/blob/7b508603830337d4b90b75339517ab265056f310/modules/lndhub-go.nix

@ohenrik
Copy link

ohenrik commented Jan 18, 2023

@mmilata You can use the tag v0.16.13 and onwards. We will soon make a new official release (latest).

@mmilata mmilata mentioned this issue Feb 5, 2023
7 tasks
@mmilata
Copy link
Contributor Author

mmilata commented Mar 8, 2023

Module #592 should be in a reasonably working state, feel free to test it.

@mmilata
Copy link
Contributor Author

mmilata commented May 11, 2023

torq went closed source so this is probably not interesting anymore

@mmilata mmilata closed this as not planned Won't fix, can't repro, duplicate, stale May 11, 2023
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 a pull request may close this issue.

4 participants