-
Notifications
You must be signed in to change notification settings - Fork 123
docs+Docker: document how to use a regtest Loop server #359
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
Conversation
regtest/README.md
Outdated
| Simply pull the image and run it by pointing it to an existing `lnd` node: | ||
|
|
||
| ```shell | ||
| $ docker pull lightninglabs/loopserver:v0.6.1-beta |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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).
alexbosworth
left a comment
There was a problem hiding this 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
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.
justinpobrien
left a comment
There was a problem hiding this 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). | ||
|
|
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
|
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? |
|
Sure. I've added the binary ( |
|
Thanks! |
|
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.) |
|
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? |
|
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. |
Fixes #276.
To help with development of apps that use the Loop daemon (
loopd) forliquidity management, it is often useful to test it in controlled environments
such as on the Bitcoin
regtestnetwork.Lightning Labs provides a stripped down version of the Loop server that works
only for
regtestand is only published in compiled, binary form (currently asa Docker image).
The
docker-compose.ymlshows an example setup and is accompanied by a quickstart script that should make getting started very easy.
Pull Request Checklist
release_notes.mdif your PR contains major features, breaking changes or bugfixes