-
Notifications
You must be signed in to change notification settings - Fork 169
Feature: Simln integration in Polar #1159
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1159 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 156 160 +4
Lines 5713 5980 +267
Branches 1144 1212 +68
==========================================
+ Hits 5713 5980 +267 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0f46f24 to
6ff46be
Compare
|
Tagging @kelvinator07 and @jamaljsr for reviews :) |
|
Well Done @Abdulkbk I'll test the feature within the next couple of days and give feedback. |
3d84e75 to
bfb199c
Compare
fa2dea5 to
95fce5a
Compare
|
cc: @kelvinator07 👀 |
08dae0c to
cc84f1c
Compare
b975944 to
e2aee63
Compare
|
The project is now complete, and all LN implementations are now supported 💯 |
92a52f9 to
147a294
Compare
3efd5e8 to
847a5df
Compare
847a5df to
9bf029f
Compare
|
Thanks for updating the I also pushed the multi-platform docker image to Docker Hub as polarlightning/simln. Doing this made me realize we need to update the docker/README.md to include instructions for building the image. Can you please add a new section underneath Lightning Terminal for simln? |
412fab0 to
778fbe4
Compare
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.
I tested this branch on Windows and ran into a problem. I still need to test on Linux.
| case 'LND': | ||
| const lnd = node as LndNode; | ||
| simNode = { | ||
| id: lnd.name, | ||
| macaroon: `/home/simln/.${lnd.paths.adminMacaroon.split('volumes/').pop()}`, | ||
| address: `https://host.docker.internal:${lnd.ports.grpc}`, | ||
| cert: `/home/simln/.${lnd.paths.tlsCert.split('volumes/').pop()}`, | ||
| }; | ||
| break; |
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.
I've tested this on Windows and am running into an issue with the simln container. I'm getting this error.
The problem is the difference in the file path strings on Windows. Here's the generated sim.json file:
{
"nodes": [
{
"id": "alice",
"macaroon": "/home/simln/.C:\\Users\\jamal\\.polar\\networks\\1\\volumes\\lnd\\alice\\data\\chain\\bitcoin\\regtest\\admin.macaroon",
"address": "https://host.docker.internal:10001",
"cert": "/home/simln/.C:\\Users\\jamal\\.polar\\networks\\1\\volumes\\lnd\\alice\\tls.cert"
},
{
"id": "bob",
"base_url": "http://host.docker.internal:8282",
"api_username": "",
"api_password": "eclairpw"
},
{
"id": "carol",
"macaroon": "/home/simln/.C:\\Users\\jamal\\.polar\\networks\\1\\volumes\\lnd\\carol\\data\\chain\\bitcoin\\regtest\\admin.macaroon",
"address": "https://host.docker.internal:10003",
"cert": "/home/simln/.C:\\Users\\jamal\\.polar\\networks\\1\\volumes\\lnd\\carol\\tls.cert"
}
],
"activity": [
{
"source": "alice",
"destination": "bob",
"interval_secs": 10,
"amount_msat": 100000000
},
{
"source": "alice",
"destination": "carol",
"interval_secs": 10,
"amount_msat": 100000000
}
]
}And here's the contents of the LightningNode object in the network:
{
"id": 0,
"networkId": 1,
"name": "alice",
"type": "lightning",
"implementation": "LND",
"version": "0.19.2-beta",
"status": 1,
"backendName": "backend1",
"paths": {
"tlsCert": "C:\\Users\\jamal\\.polar\\networks\\1\\volumes\\lnd\\alice\\tls.cert",
"adminMacaroon": "C:\\Users\\jamal\\.polar\\networks\\1\\volumes\\lnd\\alice\\data\\chain\\bitcoin\\regtest\\admin.macaroon",
"invoiceMacaroon": "C:\\Users\\jamal\\.polar\\networks\\1\\volumes\\lnd\\alice\\data\\chain\\bitcoin\\regtest\\invoice.macaroon",
"readonlyMacaroon": "C:\\Users\\jamal\\.polar\\networks\\1\\volumes\\lnd\\alice\\data\\chain\\bitcoin\\regtest\\readonly.macaroon"
},
"ports": {
"rest": 8081,
"grpc": 10001,
"p2p": 9735
},
"docker": {
"image": "",
"command": ""
}
},Are you able to resolve this? If you don't have access to a Windows machine, you should be able to use mock data in a unit test.
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.
I will use the mock data in unit test. Thanks.
778fbe4 to
d696b43
Compare
d696b43 to
eda729a
Compare
In this commit, we split the DefaultDesigner component into Network and Simulation tabs. We also added the default look for the SimulationTab.
In this commit, we add simln and its related configurations to the docker.
In this commit we extract status button logic into a component so that we can reuse it in other places.
In the commit we add the sinln support to litd nodes.
eda729a to
ec07027
Compare
|
@jamaljsr, are you able to conclude the testing? |
|
Yes, I will test it again on Windows and Linux this week. Thanks for the updates. |
Closes #829
Replaces #1038
Description
This PR integrates SimLn into Polar.
As mentioned in the previous PR implementing such:
Steps to Test
Screenshots
Build the
simlnImageSome parts of the code were taken from PR.