Coder Social home page Coder Social logo

jamaljsr / polar Goto Github PK

View Code? Open in Web Editor NEW
733.0 11.0 139.0 46.76 MB

One-click Bitcoin Lightning networks for local app development & testing

Home Page: https://lightningpolar.com

License: MIT License

JavaScript 0.66% TypeScript 97.40% HTML 0.14% Dockerfile 1.31% Shell 0.48% Less 0.01%
bitcoin lightning-network docker electron react polar lnd lightning c-lightning bitcoind

polar's People

Contributors

amovfx avatar bolatovumar avatar cstenglein avatar federicobond avatar hakkadaikon avatar halseth avatar hieblmi avatar hsjoberg avatar jamaljsr avatar jasonvdb avatar jhoyola avatar kaloudis avatar kelvinator07 avatar ktecho avatar louneskmt avatar lukechilds avatar murtyjones avatar nehak745 avatar niteshbalusu11 avatar nonsoamadi10 avatar ottosuess avatar porcupinenick avatar qustavo avatar renovate-bot avatar renovate[bot] avatar severinalexb avatar torkelrogstad avatar uwla avatar valentinewallace avatar wbobeirne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polar's Issues

Feature Request: Preconfigured LN node configurations

I would like to add the option to start with a preconfigured LN. For example starting a circular, star, balanced or unbalanced network. Maybe have a hosted config file where anyone can contribute with other ln node configurations

Sandbox error when running on Arch Linux

Sandbox error when running on Arch Linux:

$ yarn dev
yarn run v1.17.3
$ concurrently --kill-others --success first "yarn:dev:*"
$ cross-env BROWSER=none yarn start
$ wait-on http://localhost:3000 && nodemon -I --watch ./electron/ --ext ts --exec electron ./public/dev.js
$ rescripts start
[dev:app] Starting the development server...
[dev:app] 
c[dev:app] Compiled with warnings.
[dev:app] 
[dev:app] ./node_modules/dtrace-provider/dtrace-provider.js
[dev:app] Module not found: Can't resolve './src/build' in '/home/justin/dev/github/polar/node_modules/dtrace-provider'
[dev:app] 
[dev:app] Search for the keywords to learn more about each warning.
[dev:app] To ignore, add // eslint-disable-next-line to the line before.
[dev:app] 
[dev:electron] [nodemon] 1.19.4
[dev:electron] [nodemon] to restart at any time, enter `rs`
[dev:electron] [nodemon] watching dir(s): electron/**/*
[dev:electron] [nodemon] watching extensions: ts
[dev:electron] [nodemon] starting `electron ./public/dev.js`
[dev:electron] [7684:1027/092528.150806:FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/justin/dev/github/polar/node_modules/electron/dist/chrome-sandbox is owned by root and has mode 4755.

I just updated the dev:electron command to use electron --no-sandbox ... and it works for development at least ...

lnd abandonchannel

It seems this feature is not available:

$lnd abandonchannel "channelid"
[lncli] rpc error: code = Unknown desc = AbandonChannel RPC call only available in dev builds

Feature Request: Make bitcoind's ZeroMQ servers available on LAN

Hey there. Awesome project! Helps a lot for experimenting and testing. 😃

I have a feature request I would like to discuss.
Right now when running bitcoind, the node's ZeroMQ servers can only listen to incoming connections within the private network (172.x.x.x). I would like it to be available to the host, just like the REST server is.

The reason why I would like this is because when working on a Lightning Wallet, it's currently not possible to connect to the network on a real device, as that would not be on the host machine where the docker cluster is. (I would also like to have lnd's P2P server accessible on LAN, but I will open a separate issue and PR about that).

I am currently working on a solution for this.

This is related to #288.

Cheers
Hampus

Source balance shown as "undefined sats" before channel is confirmed

Describe the bug
Source Balance shows undefined sats before channel is confirmed if channel was opened outside of Polar UI.

To Reproduce
Steps to reproduce the behavior:

  1. Run RTL locally
  2. Open a channel from the LND node you using for RTL to another LND node in Polar
  3. Notice that Source Balance for the channel is shown as undefined sats

Expected behavior
It should probably show 0 for Source Balance.

Screenshots
Screen Shot 2020-02-02 at 7 41 43 PM

Desktop (please complete the following information):

  • OS: macOS Mojave
  • Polar Version: v0.2.1

Additional context
The problem goes away once you mine enough blocks to have the channel confirm.

Cannot push new lnd to docker hub repo

In the docker/README.md it says we can build our own versions of lnd/bitcoind/clightning and then push those builds to docker hub to update them out-of-band with updates to polar.

Steps to reproduce the behavior:

  1. cd docker/lnd
  2. docker build --build-arg LND_VERSION=0.9.0-beta -t polarlightning/lnd:0.9.0-beta .
  3. docker push polarlightning/lnd:0.9.0-beta

Receive error:

denied: requested access to the resource is denied.

It makes sense to me that your dockerhub repos would be private but then I'd expect to be able to update Polar to point to a different dockerhub repo? Which I guess I could edit nodeTemplate.ts to point to a different repo but the instructions make it seem like I shouldn't have to do that?

Am I missing something?

Console error when starting a network

See the screenshot below for the error I see in the console when starting a new network:

Screen Shot 2020-01-23 at 8 10 11 PM

As you can see from the log the data parameter in log() method doesn't have a body in request (see the log of the request in the top section of the screenshot).

Not sure if this error matters at all but thought I would bring it up.

Feature request: Allow export and import of networks

It would be awesome if we could easily export network state the build up, and send it to other people to import or just use it to restore from if you have a specific state you want to use (testing, tutorials, bug reports etc.)

Docker seems to support this out of the box, so hopefully it would just be a matter of packing and unpacking volumes.

Bug/Question: using yarn cm

This is probably a user issue, but I'm trying to commit a change on a fork and hitting some obscure error in using yarn cm
image

Feature Request: btcd node

I saw that this was included in the TODO, but I would like to open an issue about it so we can discuss and keep track of it.
I would like to be able to use btcd as a backend instead of bitcoind.

As lnd makes use of Neutrino SPV for mobile and embedded devices, it's currently not possible to have a complete test environment using Polar as there's no support for the Neutrino protocol in bitcoind yet.

I could work on this if it hasn't already been started, but I cannot tell when it will be done.

Cheers
Hampus

Error when opening channels

Hey just downloaded version 0.4.0, started a new network, and when I went to create a new channel this error appeared. I can see the channel is opened through the cli but the UI doesn't update and keeps showing this error

image

Feature request: Start nodes with local docker images

Hello!
I think it would be great for developers to be able to define which image will be used for a node, apart from the predefined ones you already use. This way, we could even test modifications in the lnd itself (I am trying to use a forked lnd version and face difficulties changing the docker image used)
Thank you for the useful project!

How to compile

Advice from the developer

Polar is built using Electron which ultimately runs on NodeJS. It uses electron-builder to compile and package the app into an executable.

Packaging Polar on most linux distros should be possible. To do so, you will need to have Docker and NodeJS installed. You'll also need yarn installed globally using "npm install -g yarn".

  1. Clone the repo: git clone https://github.com/jamaljsr/polar.git
  2. Install dependencies: yarn install
  3. Package the app: yarn package

This will create the .deb and .AppImage files in the dist/ folder which you can use to install or run Polar.

Problem installing docker on Ubuntu from .deb

Opening/Closing an issue to document a common error Ubuntu & other linux users may face when installing Docker for Polar.

Error:

Docker Error
connect EACCES /var/run/docker.sock

Receiving this error after installing docker means that Polar is running without root privileges while docker requires root privileges.

Solution:

After installing docker & docker compose like normal, create a Unix group to add users to that need docker root privileges.

$ sudo groupadd docker
$ sudo usermod -aG docker $USER

Then logout and login and you should see Polar working correctly.

Full tutorial here.

Bug: 14 UNAVAILABLE: failed to connect to all addresses

Describe the bug
Polar was working fine on my computer but suddenly it stop working, lnd nodes (alice, bob and charlie) changed status to error, when I select one and click the information tab I get

14 UNAVAILABLE: failed to connect to all addresses

Desktop:

  • OS: Ubuntu 18.04.3 LTS
  • Polar Version: 0.2.1
  • Docker Version: 17.09.0 ce
  • Docker Compose Version: 1.16.1

When I execute docker logs to one of the nodes I get this

goroutine 90 [running]:
github.com/btcsuite/btcwallet/wallet.(*Wallet).handleChainNotifications(0xc000430280)
	github.com/btcsuite/[email protected]/wallet/chainntfns.go:117 +0x13fb
created by github.com/btcsuite/btcwallet/wallet.(*Wallet).SynchronizeRPC
	github.com/btcsuite/[email protected]/wallet/wallet.go:191 +0x1cb
Running as lnd user: lnd --noseedbackup --trickledelay=5000 --alias=bob --externalip=bob --tlsextradomain=bob --listen=0.0.0.0:9735 --rpclisten=0.0.0.0:10009 --restlisten=0.0.0.0:8080 --bitcoin.active --bitcoin.regtest --bitcoin.node=bitcoind --bitcoind.rpchost=polar-n1-backend1 --bitcoind.rpcuser=polaruser --bitcoind.rpcpass=polarpass --bitcoind.zmqpubrawblock=tcp://polar-n1-backend1:28334 --bitcoind.zmqpubrawtx=tcp://polar-n1-backend1:28335
2020-01-27 15:41:37.990 [WRN] LTND: open /home/lnd/.lnd/lnd.conf: no such file or directory
2020-01-27 15:41:37.990 [INF] LTND: Version: 0.9.0-beta commit=v0.9.0-beta, build=production, logging=default
2020-01-27 15:41:37.990 [INF] LTND: Active chain: Bitcoin (network=regtest)
2020-01-27 15:41:37.991 [INF] CHDB: Checking for schema update: latest_version=12, db_version=12
2020-01-27 15:41:38.058 [INF] LTND: Primary chain is set to: bitcoin
2020-01-27 15:41:38.062 [INF] LNWL: Started listening for bitcoind block notifications via ZMQ on 172.19.0.4:28334
2020-01-27 15:41:38.062 [INF] LNWL: Started listening for bitcoind transaction notifications via ZMQ on 172.19.0.4:28335
2020-01-27 15:41:39.065 [INF] LNWL: Opened wallet
2020-01-27 15:41:39.777 [INF] LNWL: The wallet has been unlocked without a time limit
2020-01-27 15:41:39.787 [INF] LTND: LightningWallet opened
panic: Unable to synchronize wallet to chain: -8: Block height out of range

goroutine 84 [running]:
github.com/btcsuite/btcwallet/wallet.(*Wallet).handleChainNotifications(0xc00047c140)
	github.com/btcsuite/[email protected]/wallet/chainntfns.go:117 +0x13fb
created by github.com/btcsuite/btcwallet/wallet.(*Wallet).SynchronizeRPC
	github.com/btcsuite/[email protected]/wallet/wallet.go:191 +0x1cb
Running as lnd user: lnd --noseedbackup --trickledelay=5000 --alias=bob --externalip=bob --tlsextradomain=bob --listen=0.0.0.0:9735 --rpclisten=0.0.0.0:10009 --restlisten=0.0.0.0:8080 --bitcoin.active --bitcoin.regtest --bitcoin.node=bitcoind --bitcoind.rpchost=polar-n1-backend1 --bitcoind.rpcuser=polaruser --bitcoind.rpcpass=polarpass --bitcoind.zmqpubrawblock=tcp://polar-n1-backend1:28334 --bitcoind.zmqpubrawtx=tcp://polar-n1-backend1:28335
2020-01-27 15:42:40.880 [WRN] LTND: open /home/lnd/.lnd/lnd.conf: no such file or directory
2020-01-27 15:42:40.881 [INF] LTND: Version: 0.9.0-beta commit=v0.9.0-beta, build=production, logging=default
2020-01-27 15:42:40.881 [INF] LTND: Active chain: Bitcoin (network=regtest)
2020-01-27 15:42:40.884 [INF] CHDB: Checking for schema update: latest_version=12, db_version=12
2020-01-27 15:42:40.953 [INF] LTND: Primary chain is set to: bitcoin
2020-01-27 15:42:40.958 [INF] LNWL: Started listening for bitcoind block notifications via ZMQ on 172.19.0.4:28334
2020-01-27 15:42:40.958 [INF] LNWL: Started listening for bitcoind transaction notifications via ZMQ on 172.19.0.4:28335
2020-01-27 15:42:41.959 [INF] LNWL: Opened wallet
2020-01-27 15:42:42.695 [INF] LNWL: The wallet has been unlocked without a time limit
2020-01-27 15:42:42.700 [INF] LTND: LightningWallet opened
panic: Unable to synchronize wallet to chain: -8: Block height out of range

goroutine 44 [running]:
github.com/btcsuite/btcwallet/wallet.(*Wallet).handleChainNotifications(0xc000474780)
	github.com/btcsuite/[email protected]/wallet/chainntfns.go:117 +0x13fb
created by github.com/btcsuite/btcwallet/wallet.(*Wallet).SynchronizeRPC
	github.com/btcsuite/[email protected]/wallet/wallet.go:191 +0x1cb

Feature Request: connect to nodes outside of Polar

I'm developing an app where I have a pre-existing LND setup. It'd be great if I could connect this to Polar. I'm running my dev environment with docker-compose, with an instance of LND connected to bitcoind. Through some hacking around with the $HOME/.polar/networks/1/docker-compose.yml file I managed to connect my nodes and send payments, although nothing showed up in the GUI (as expected).

What I did:

  1. Edited the $HOME/.polar/networks/1/docker-compose.yml file, by adding
    networks:
      default:
        external:
          name: my-network
    
    at the bottom
  2. Doing docker-compose up -d in the $HOME/.polar/networks/1 directory

I was then able to use the terminals in Polar to issue commands to connect with my other nodes. Would something like this make sense to add to Polar? You could have a box (under advanced settings, or something like that) where a custom docker-compose network could be specified, and also some connection settings for where to find the new nodes. These could then show up in the explorer as "external nodes" where what information we could retrieve can be displayed, but it would not be possible to issue commands to these nodes directly.

Feature Request: CLI autocomplete for lightning & bitcoin nodes

Is your feature request related to a problem? Please describe.
I like to use CLI when interacting with nodes. Sadly autocompletion doesn't work.

Describe the solution you'd like
When pressing tab button bitcoin-cli or lncli should show all available options

Additional context
I can try implementing this if you give me some pointers

Allow inspection of errors

Describe the bug
I've had a couple of cases of my LND nodes not starting. It lets me know there's an error, but I have no way of investigating why that may be. This may also be really useful for debugging issues that are sure to crop up on various user's systems.

To Reproduce
Hard to reproduce, but cause an LND node to not launch properly.

Expected behavior
Some kind of error message that would tell me what went wrong.

Screenshots

Screen Shot 2019-10-25 at 4 57 57 PM

wrong Spanish translation

Hi, in the spanish version we see this on hexadecimal format of the files.

polar

This word means like witchcraft, hexadecimal in spanish is hexadecimal, so we can not translate that and just put hex or hexa

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Other Branches

These updates are pending. To force PRs open, click the checkbox below.

  • chore(deps): replace dependency standard-version with commit-and-tag-version 9.5.0

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

dockerfile
.devcontainer/Dockerfile-headless
.devcontainer/Dockerfile-ui
docker/bitcoind/Dockerfile
docker/clightning/Dockerfile
docker/clightning/Dockerfile.arm64
docker/eclair/Dockerfile
  • eclipse-temurin 17.0.10_7-jdk-focal
  • openjdk 11.0.16-jre-slim
docker/lnd/Dockerfile
docker/tapd/Dockerfile
github-actions
.github/workflows/main.yml
  • actions/checkout v4
  • actions/setup-node v4
  • codecov/codecov-action v4
npm
package.json
  • @lightningpolar/tapd-api 0.3.3-alpha
  • @types/lodash 4.17.1
  • archiver 7.0.1
  • dockerode 4.0.2
  • electron-window-state 5.0.3
  • fs-extra 11.1.0
  • lodash 4.17.21
  • semver 7.6.2
  • unzipper 0.11.6
  • xterm 5.3.0
  • xterm-addon-fit 0.8.0
  • @ant-design/icons 5.3.7
  • @babel/plugin-proposal-private-property-in-object 7.21.11
  • @commitlint/cli 19.3.0
  • @commitlint/config-conventional 19.2.2
  • @emotion/babel-plugin 11.11.0
  • @emotion/react 11.11.4
  • @emotion/styled 11.11.5
  • @hot-loader/react-dom 17.0.2
  • @mrblenny/react-flow-chart 0.0.14
  • @rescripts/cli 0.0.16
  • @rescripts/rescript-use-babel-config 0.0.12
  • @testing-library/jest-dom 5.17.0
  • @testing-library/react 12.1.5
  • @testing-library/user-event 14.5.2
  • @types/archiver 6.0.2
  • @types/detect-port 1.3.5
  • @types/dockerode 3.3.29
  • @types/fs-extra 9.0.13
  • @types/jest 29.5.12
  • @types/js-yaml 4.0.9
  • @types/node 18.17.19
  • @types/react 18.3.3
  • @types/react-copy-to-clipboard 5.0.7
  • @types/react-dom 18.3.0
  • @types/react-redux 7.1.33
  • @types/react-router 5.1.20
  • @types/react-router-dom 5.3.3
  • @types/redux-logger 3.0.12
  • @types/unzipper 0.10.9
  • @types/ws 8.5.10
  • @typescript-eslint/eslint-plugin 6.21.0
  • @typescript-eslint/parser 6.21.0
  • antd 4.24.12
  • babel-plugin-import 1.13.8
  • bitcoin-core 4.2.0
  • bufferutil 4.0.8
  • commitizen 4.3.0
  • concurrently 8.2.2
  • connected-react-router 6.9.3
  • cross-env 7.0.3
  • detect-port 1.6.1
  • dockerode 4.0.2
  • easy-peasy 6.0.4
  • electron-builder 24.13.3
  • electron-devtools-installer 3.2.0
  • eslint-config-prettier 9.1.0
  • eslint-plugin-prettier 3.4.1
  • eslint-plugin-react 7.34.1
  • history 4.10.1
  • husky 9.0.11
  • i18next 22.5.1
  • i18next-browser-languagedetector 8.0.0
  • i18next-scanner 4.4.0
  • jest-canvas-mock 2.5.2
  • jest-environment-jsdom-sixteen 2.0.0
  • js-yaml 4.1.0
  • less 4.2.0
  • less-loader 12.2.0
  • lint-staged 14.0.1
  • lndconnect 0.2.10
  • nodemon 3.1.0
  • prettier 2.8.8
  • react 17.0.2
  • react-async-hook 4.0.0
  • react-copy-to-clipboard 5.1.0
  • react-dom 17.0.2
  • react-hot-loader 4.13.1
  • react-i18next 12.3.1
  • react-lazylog 4.5.3
  • react-redux 8.1.3
  • react-router 5.3.4
  • react-router-dom 5.3.4
  • react-router-transition 2.1.0
  • react-scripts 4.0.3
  • redux 4.2.1
  • redux-logger 3.0.6
  • standard-version 9.5.0
  • strip-ansi 6.0.1
  • styled-components 6.1.10
  • stylelint 16.5.0
  • stylelint-config-prettier 9.0.5
  • stylelint-config-standard 36.0.0
  • testcafe 3.6.0
  • testcafe-browser-provider-electron 0.0.21
  • testcafe-react-selectors 5.0.3
  • ts-node 10.9.2
  • typescript 5.4.5
  • utf-8-validate 6.0.4
  • wait-on 7.2.0
  • ws 8.17.0
  • node >=20

  • Check this box to trigger a request for Renovate to run again on this repository

Unable to build. New release?

Describe the bug
I am unable to run or package the project on my system.

To Reproduce
Steps to reproduce the behavior:
Probably this happens only on my system but I did the following:

  1. Installed all prerequisites. (Official 1.01 release is running on my machine)
  2. cloned the repo
  3. yarn
  4. "yarn dev" or "yarn package" both throw errors

yarn dev throws the following error:

TSError: ⨯ Unable to compile TypeScript:
[dev:electron] electron/utils/zip.ts(40,32): error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'?

"yarn lint:all" throws 35 errors as well

Expected behavior
no errors

Desktop (please complete the following information):

  • OS: Linux Manjaro
  • Polar Version: master, commit: 4fbad43
  • Docker Version: 19.03.13-ce, build 4484c46d9d
  • Docker Compose Version: 1.27.4

Additional context
An up to date release would also help me so I can test with LND 0.11.1

Possible to use Polar as back-end for local app?

In the README it says:

  • Sample app projects/code in different languages (Python, Typescript/JS, Go, C#) showing how to connect to the Lightning/Bitcoin nodes from an external app.

Is it currently possible to use Polar as a back-end for an app that needs to connect to LND/c-lightning? Let's say I want to build https://github.com/Ride-The-Lightning/RTL locally and use Polar as a back-end for testing/development purposes. RTL requires macaroon path (exposed by Polar), LND config path (not exposed by Polar), LND REST server url (exposed by Polar) and bitcoin.conf file path (not exposed by Polar).

Is this meant to be a supported use case (now or in the future)?

Bug: Unable to view Polar in the browser when building from source

Describe the bug
A clear and concise description of what the bug is.

After successfully building from source, I'm presented with this information:

Starting the development server...
Compiled successfully!
You can now view polar in the browser.
Local: http://localhost:3000
On Your Network: http://10.0.1.5:3000

I try to view the http:// addresses in my browser, but all I see is a blank screen. I tried putting the address into other browsers, with no cookies blocking....but I still keep getting a blank screen.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/jamaljsr/polar.git
  2. cd polar
  3. yarn
  4. yarn dev

Expected behavior
A clear and concise description of what you expected to happen.

See polar in the browser.

Screenshots
If applicable, add screenshots to help explain your problem.

Blank screen:

image

Desktop (please complete the following information):

  • OS: macOS Catalina 10.15.4
  • Polar Version: 1.0.0
  • Docker Version: Community 2.2.0.4(43472)
  • Docker Compose Version: 1.25.4

Additional context
Add any other context about the problem here.

Unable to open the channel

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Create a network of two nodes and start it
  2. Click on Deposit funds on alice and then quick mine
  3. Click on Outgoing
  4. Select Alice and Bob and 250,000 sats
  5. See error "Unable to open the channel - Cannot convert undefined or null to object"

Expected behavior
A channel being opened

Additional context
If I login into the terminal the channel seems to be open, but no visual representation

Bug: "ENOENT: no such file or directory, open '<...filepath...>/lnd-2/tls.cert'"

Describe the bug
https://i.imgur.com/KYDsspe.png
https://i.imgur.com/Ld9H8mD.png
https://i.imgur.com/XWGbALC.png
https://i.imgur.com/WPAILGi.png

Unable to connect to LND node
ENOENT: no such file or directory, open '/home/valentine/.config/polar/data/networks/1/volumes/lnd/lnd-2/tls.cert'

^ Also applies to lnd-1.
Bitcoind gets this error:

Unable to connect to bitcoin node
connect ECONNREFUSED 127.0.0.1:18443

To Reproduce

  1. Build polar from source on arch linux using yarn package
  2. from the dist directory: ./polar-linux-x86_64-v0.2.1.AppImage

Expected behavior
No error

Desktop (please complete the following information):

  • OS: Arch Linux
  • Polar Version: commit 55d604b
  • Docker Version: 19.03.6-ce
  • Docker Compose Version: 1.25.4

Additional context
love this project!

Feature Request: Polar CLI

Is your feature request related to a problem? Please describe.
For automated testing of applications that require a LND network on a ci-server we can not use a GUI.

Describe the solution you'd like
A CLI (or any form of api) covering the basic functionality of polar, especially the creation of networks in a certain state (maybe by network import) without the need of a graphical user interface and electron. This would be a helpful solution when someone needs to automatically spawn different LND network configurations for testing.

Cheers,
Peter

Feature Request: Loop

I'm not sure if this is in the scope of this project but would be cool :D

Is your feature request related to a problem? Please describe.
I can't test Loop with Polar

Describe the solution you'd like
I want the possibility to get a Loop instance running connected to my lightning docker network

Ability to connect to existing node cluster

Is your feature request related to a problem? Please describe.
I have an existing cluster of lnd nodes defined in docker-compose files and would like to be able to connect the Polar UI to it so that I can visualise the node cluster and easily move money between nodes.

Describe the solution you'd like
Ability to connect Polar to my existing lnd/bitcoins node cluster.

Sidebar card is not scrollable

Describe the bug
I'm using Polar on Mac Air 13″ not in full screen so the sidebar card is not scrollable at all. As a result I can't see all the details about my nodes unless I go into full-screen mode or something. Would be nice not to have to do that.

To Reproduce
Steps to reproduce the behavior:

  1. Open app in a small window
  2. Create and start a network
  3. Try to scroll to see more details in the sidebar card

Expected behavior
Able to scroll through the side card and see all details for a node.

Screenshots
Screen Shot 2020-01-17 at 8 41 03 PM

Desktop (please complete the following information):

  • OS: macOS Mojave
  • Polar version: 0.2.0

Bug: No docker manifest for LND 0.10.1-beta

Describe the bug
Refreshed the docker images in Polar and saw 10.1 was available, added it to my network and clicked start but after a few short seconds, it came up with a "no manifest" error on that node. Luckily the instructions here (https://github.com/jamaljsr/polar/tree/master/docker#lnd) worked and I was able to manually build the image on my local machine but I believe the problem is that it's not located here: https://hub.docker.com/r/polarlightning/lnd/tags

To Reproduce
Steps to reproduce the behavior:

  1. Refresh images in Polar
  2. Add 0.10.1-beta to a network (new or old)
  3. Click start
  4. See error

Expected behavior
Should download and start the 0.10.1-beta container.

Desktop (please complete the following information):

  • OS: OSX Catalina
  • Polar Version: 1.0.0
  • Docker Version: 19.03.8
  • Docker Compose Version: 1.25.4

Thanks for mentioning that fallback though, may start doing that for RC builds going forward.

Displays "undefined sats" for 0

Describe the bug

The channel info display shows "undefined sats" seemingly when it should be zero.

To Reproduce
Steps to reproduce the behavior:

  1. Open a fresh one sided channel
  2. Inspect it & observe

Screenshots

Screen Shot 2019-10-20 at 9 48 58 AM

Bug: Compile error when running `yarn dev`

Describe the bug

Working from the instructions in the contributing doc, I ran into this compile error when setting up my environment:

[dev:app] Failed to compile.
[dev:app] 
[dev:app] ./src/utils/network.ts
[dev:app]   Line 0:  Parsing error: Cannot read property 'map' of undefined

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo
  2. yarn
  3. yarn dev

Expected behavior
App starts up

Screenshots
image
image

Desktop (please complete the following information):

  • OS: macOS Catalina v10.15.7
  • Polar Version: master
  • Docker Version: 19.03.13
  • Docker Compose Version: 1.27.4

Additional context
N/A

Feature Request: An example of using polar

Firstly, I just want to say that Polar is awesome and I'm really excited that a tool like this exists for the ecosystem!

I've been playing with it for the last few days, trying to get a working script that allows Alice to open a channel with Bob. Doing so, at least in my chosen language (TypeScript) was trickier than I thought it'd be.

For new developers who are unsure where to get started, a simple working example in the repo would go a long way. What I'd like to propose is this script to an examples folder in the repo, which would looks something like this:

import ln from 'ln-service';
import { ALICE_LND_AUTH } from './config';

const openChannel = async (lnd: ln.AuthenticatedLND) => {
  const { peers } = await ln.getPeers({ lnd });
  const args: ln.OpenChannelArgs = {
    local_tokens: 100000,
    partner_public_key: peers[0].public_key,
  };
  return ln.openChannel({ lnd, ...args });
};

(async () => {
  const { lnd } = ln.authenticatedLndGrpc(ALICE_LND_AUTH);
  try {
    const { pending_channels } = await ln.getPendingChannels({ lnd });
    if (!pending_channels.length) {
      const { transaction_id } = await openChannel(lnd);
      console.log('No pending channels found, opened one: ', transaction_id);
    }
    console.log('Pending channels found: ', pending_channels.length);
  } catch (err) {
    console.error(err);
  }
})();

It's a really simple script, so it might not seem all that useful, but I think it'd be a good starting point for a couple of reasons:

  • Having an example of a working TypeScript gRPC client is good for new developers. The state of various LND gRPC libraries' support for TypeScript requires some hacking to get type definitions (in my case, using ln-service + patch-package to add types from a not-yet-merged PR). So this project would be a useful way to illustrate the bootstrapping needed for a new developer who wants to use a popular language like TS.
  • Showing how the outputs from Polar (e.g. gRPC connection info, TLS, macaroons) are meant to be used to authenticate with a lightning client

In the future, such an example would ideally be extended to a simple interactive interface that lets developers play with introducing real app-like functionality.

I'm happy to clean up what I have and put it in PR, but want to get some feedback before I do so and see if this would be useful.

Feature request: lncli terminal

idk if it scales to add every possible action to the Actions tab.
i would like an "expert mode" lncli terminal that i can open for each lnd node where i can just enter lncli commands like getinfo and execute them on the selected lnd.

Bug: Fatal error when opening network from v0.2.1

Describe the bug
Pulled the latest master to get that ZMQ exposure, and opened up the network I had made from v0.2.1. I assume there was some change in the data structure that may require some kind of migration, but I haven't dug into it.

To Reproduce
Have not reproduced in isolation yet, but here's what I did to get it to happen

  1. Run the current release of polar
  2. Create a network
  3. Run the current master of polar
  4. Attempt to open network
  5. See error TypeError: Cannot read property 'image' of undefined

Screenshots

Screen Shot 2020-03-05 at 1 13 12 AM

Desktop (please complete the following information):

  • OS: macOS 10.14.5
  • Polar Version: 0.2.1 / master
  • Docker Version: 2.2.0.3.(42716)
  • Docker Compose Version: 1.25.4

Additional context
Add any other context about the problem here.

Feature request: Tor support

i want to test connecting zap iOS to .onion urls. would be amazing if i could just spin up an lnd node that i can connect to over tor.

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Bug: display of commands seems it in in erase mode (versus insert)

Describe the bug
The display of characters in the command line is like in "overwrite" mode instead of "insert" new caracters

To Reproduce
Write a command in the one of the shell shell
Use Up arrow, the display is all messed by mixing current and past command.

Screenshots
image

Desktop (please complete the following information):

  • OS: OSX Catalina
  • Polar Version: 0.2.0
  • Docker Engine: 19.03.5
  • Docker Compose Version: 1.25.4

Feature Request: Expose bitcoind p2p port on host machine

Is your feature request related to a problem? Please describe.
It is currently not possible to connect an external bitcoind node to the internal nodes in a network using the -addnode flag. The p2p port 8444 is not exposed to the host machine.

Describe the solution you'd like
Expose the p2p port for each bitcoind node and display the port in the node details sidebar.

Bug: removed lightning nodes don't disappear from UI

Describe the bug
A couple of times I had this bug where my c-lightning nodes wouldn't start up, giving me errors related to the socket or whatever. I removed those nodes and added new ones, which worked, but now I've got "alice" and "bob" - the nodes I removed - just hanging around.

This isn't a major issue, but I thought I'd post it anyways. The bigger issue might be that my nodes don't start up after rebooting my VM, but I'm not sure if that is caused by Polar, or by me, so I'm not here to report that now.

To Reproduce
In all honesty, I don't have a good way of reproducing this. I think maybe my file permissions were/are wrong, or it's because my VM setup or something.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 20.04 in a VM
  • Polar Version: 1.0.1
  • Docker Version: 20...something, gotta check back on this
  • Docker Compose Version: TODO

Additional context
When I click on "alice", it acts like as if alice isn't even there, taking me to the default view with node selections.

Bug: All my LND nodes stopped starting up

Describe the bug
Have a network of 2 LND 10.0, 1 LND 10.1, and a clightning and an eclair. Been working fine for a few weeks, however today, even after restarting, I can't get my LND nodes to start up. Getting the same error on all of them.

Polar error: 14 UNAVAILABLE: failed to connect to all addresses

Docker error:

2020-07-15 17:14:45.681 [WRN] LTND: open /home/lnd/.lnd/lnd.conf: no such file or directory

2020-07-15 17:14:45.684 [INF] LTND: Version: 0.10.1-beta commit=v0.10.1-beta, build=production, logging=default

2020-07-15 17:14:45.687 [INF] LTND: Active chain: Bitcoin (network=regtest)

2020-07-15 17:14:45.688 [INF] LTND: Opening the main database, this might take a few minutes...

2020-07-15 17:14:45.744 [INF] CHDB: Checking for schema update: latest_version=13, db_version=13

2020-07-15 17:14:45.744 [INF] LTND: Database now open (time_to_open=53.485239ms)!

2020-07-15 17:14:46.151 [INF] LTND: Primary chain is set to: bitcoin

2020-07-15 17:14:46.185 [INF] LNWL: Started listening for bitcoind transaction notifications via ZMQ on 172.20.0.2:28335

2020-07-15 17:14:46.185 [INF] LNWL: Started listening for bitcoind block notifications via ZMQ on 172.20.0.2:28334

2020-07-15 17:14:51.071 [INF] LNWL: Opened wallet

2020-07-15 17:14:53.490 [INF] LNWL: The wallet has been unlocked without a time limit

2020-07-15 17:14:53.919 [INF] LTND: LightningWallet opened

goroutine 101 [running]:

github.com/btcsuite/btcwallet/wallet.(*Wallet).handleChainNotifications(0xc000442780)

is it the no such file or directory that's causing the issue? Really don't know how to reproduce this, everything had been pretty standard usage until I start it up today.

Note: I can create new LND nodes (10.1) and they seem to work fine.

Wanted to reach out here first before the LND repo just to see if it was something Polar specific that might have messed up.

Screenshots
Screen Shot 2020-07-15 at 11 24 24 AM

Desktop (please complete the following information):

  • OS: OSX Catalina
  • Polar Version: 1.0.0
  • Docker Version: 19.03.8
  • Docker Compose Version: 1.25.4

Additional context
Add any other context about the problem here.

More contrast on new UI colors

This is not a bug report, I'm just wanted to let you know that in some screens the new UI doesn't look good, sometimes it's really difficult to distinguish between nodes box and the background, they have almost the same dark color, it would be great to add more contrast to the app.

besides that, polar is amazing, thanks for it and keep up the hard work.

Bug: Can't connect to LND container from other container

Describe the bug
When I try to create a new container that uses GRPC to connect to LND, I get error 14

To Reproduce
Steps to reproduce the behavior:

  1. Create a network with Polar
  2. Try to connect to LND via GRPC from another container
  3. See error

Expected behavior
The connection works without errors

Desktop (please complete the following information):

  • OS: Windows 10 v2004
  • Polar Version: 1.0.0
  • Docker Version: 19.03.8
  • Docker Compose Version: 1.25.5

Additional context
The problem is in the default settings used to run the node

lnd
  --noseedbackup
  --trickledelay=5000
  --alias={{name}}
  --externalip={{name}}
  --tlsextradomain={{name}}
  --listen=0.0.0.0:9735
  --rpclisten=0.0.0.0:10009
  --restlisten=0.0.0.0:8080
  --bitcoin.active
  --bitcoin.regtest
  --bitcoin.node=bitcoind
  --bitcoind.rpchost={{backendName}}
  --bitcoind.rpcuser={{rpcUser}}
  --bitcoind.rpcpass={{rpcPass}}
  --bitcoind.zmqpubrawblock=tcp://{{backendName}}:28334
  --bitcoind.zmqpubrawtx=tcp://{{backendName}}:28335

the flag --tlsextradomain needs to contain the name of the container but instead, it contains the alias of the node
I solved by adding this to the default --tlsextradomain=polar-n2-{{name}} which works because I'm using the second network, but it's not a fix

Bug: Unhandled rejection from node request

Describe the bug
When starting a fresh network on the latest master, I got an error while spinning up a network with 2 LND nodes and one Bitcoind node.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new network
  2. Maybe see Unhandled Rejection (Error): 14 UNAVAILABLE: failed to connect to all addresses

Screenshots

Screen Shot 2020-03-05 at 1 22 25 AM

Unfortunately not much of a stack trace

Desktop (please complete the following information):

  • OS: macOS 10.14.5
  • Polar Version: master
  • Docker Version: 2.2.0.3.(42716)
  • Docker Compose Version: 1.25.4

Feature Request: Make Lighting nodes P2P connectivity available on LAN

Right now when running an lnd or c-lightning node, the node can only listen to incoming connections within the private network (172.x.x.x). I would like it to be available to the host, just like the REST server is.

The reason why I would like this is because when working on a Lightning Wallet, it's currently not possible to connect to the network on a real device, as that would not be on the host machine where the docker cluster is.

I am currently working on a solution for this.

This is related to #288.

Cheers
Hampus

Feature Request: Rename nodes

It would be nice if we could rename each individual node. Sometimes, Alice, Bob and Carol... are too vague for practical usage.

Doc: The README file in this repo has a bad link - [404:NotFound]

Describe the bug
The README file in this repo has a bad link - [404:NotFound]

The markup version of the readme that is displayed for the main page in this repo contains the following link:
Status code [404:NotFound] - Link: https://github.com/jamaljsr/polar/releases/download/v1.0.1/polar-mac-v1.0.1.zip (zip)

(The link in the readme’s raw markdown may appear in a different format to the link above)

To Reproduce
Steps to reproduce the behavior:
Click the link under "zip"

Expected behavior
Link should work

Screenshots
n/a

Desktop (please complete the following information):
n/a

Additional context

This bad link was found by a tool I very recently created as part of an new experimental hobby project: https://github.com/MrCull/GitHub-Repo-ReadMe-Dead-Link-Finder
I (a human) verified that this link is broken and have manually logged this Issue (i.e. this Issue has not been created by a bot).
If this has been in any way helpful then please consider giving the above Repo a Star.
If you have any feedback on the information provided here, or on the tool itself, then please feel free to share your thoughts and pass on the feedback.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.