Skip to content

Conversation

@guggero
Copy link
Contributor

@guggero guggero commented Mar 19, 2021

Fixes #276.

To help with development of apps that use the Loop daemon (loopd) for
liquidity management, it is often useful to test it in controlled environments
such as on the Bitcoin regtest network.

Lightning Labs provides a stripped down version of the Loop server that works
only for regtest and is only published in compiled, binary form (currently as
a Docker image).

The docker-compose.yml shows an example setup and is accompanied by a quick
start script that should make getting started very easy.

Pull Request Checklist

  • Update release_notes.md if your PR contains major features, breaking changes or bugfixes

Simply pull the image and run it by pointing it to an existing `lnd` node:

```shell
$ docker pull lightninglabs/loopserver:v0.6.1-beta
Copy link
Member

Choose a reason for hiding this comment

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

is there a way to make this tag more generic so it pulls the latest published one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, we could just use latest but for that to work we need to change something in the script that pushes the image first. Going to create that PR in a moment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I changed everything to use the :latest tag. This won't work until a new version of the server was pushed though (PR is in progress).

Copy link
Member

@alexbosworth alexbosworth left a comment

Choose a reason for hiding this comment

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

looks great, left some comments

guggero added 3 commits March 19, 2021 18:51
To help with development of apps that use the Loop daemon (`loopd`) for
liquidity management, it is often useful to test it in controlled
environments
such as on the Bitcoin `regtest` network.

Lightning Labs provides a stripped down version of the Loop server that
works
only for `regtest` and is only published in compiled, binary form
(currently as
a Docker image).

The `docker-compose.yml` shows an example setup and is accompanied by a
quick
start script that should make getting started very easy.
Copy link
Contributor

@justinpobrien justinpobrien left a comment

Choose a reason for hiding this comment

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

LGTM. This is super cool!

To get started with local development against a stripped down dummy Loop server
running in a local `regtest` Bitcoin network, take a look at the
[`regtest` server environment example documentation](./regtest/README.md).

Copy link
Contributor

Choose a reason for hiding this comment

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

btw I've moved this text into my README PR as well. Not sure how to deal with conflicts but just a heads up there. Added you as a reviewer to that too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, you're using the GitHub web UI? I'm not sure whether/how it can handle conflicts. Let me know if you run into problems, I can rebase the branch for you.

on/off-chain and fees incurred. Use `loop in -v`, `loop out -v`,
`loop quote in -v` or `loop quote out -v` to view the details.
* A stripped down version of the Loop server is now provided as a
[Docker image](https://hub.docker.com/r/lightninglabs/loopserver). A quick
Copy link
Contributor

Choose a reason for hiding this comment

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

We ought to also add a brief overview in Dockerhub or at least point back to the docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, unfortunately I don't have the permissions to do so. I'm not sure what options we have. I think we can either link a repo and then the main README is displayed (which might not be optimal if we point to the loop repo) or add a static markdown text. Maybe we just link to the correct section in the README and don't add a lot of text otherwise?

@guggero guggero merged commit a6acfda into master Mar 23, 2021
@guggero guggero deleted the regtest-server branch March 23, 2021 08:39
@Kixunil
Copy link
Contributor

Kixunil commented Mar 23, 2021

Awesome! Would it be possible to just download the binary without all that Docker complexity? It's statically linked so it should work on any Linux anyway, right?

@guggero
Copy link
Contributor Author

guggero commented Mar 23, 2021

Sure. I've added the binary (linux-amd64) to the latest Loop release: https://github.com/lightninglabs/loop/releases/tag/v0.12.0-beta
This is a manual process for now, so hopefully we don't forget to add it to future Loop releases.

@Kixunil
Copy link
Contributor

Kixunil commented Mar 23, 2021

Thanks!

@Kixunil
Copy link
Contributor

Kixunil commented Mar 23, 2021

One more thing I forgot, are people allowed to redistribute the binary (without modifications)? Hypothetically if I put it into deb package and host on my server, is that OK? (I'm not sure right now if it's the cleanest thing to do and if I will do it, but I suspect so.)

@guggero
Copy link
Contributor Author

guggero commented Mar 23, 2021

Good question, not sure. @Roasbeef?

Just to clarify: the loop server binary is locked to regtest only. What's the use case for distribution you have in mind? A testing utility for LN stuff?

@Kixunil
Copy link
Contributor

Kixunil commented Mar 23, 2021

Yes, testing utility. Since my whole setup supports packaging daemons quite cleanly, it seems to fit into the concept. Especially coupled with lnpbp-testkit. In other words, hacking a special case for testing would probably be worse.

I have some additional ideas to achieve first-class testing experience but that will take a while.

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.

Support for regtest

5 participants