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

[ln] Initial Version #2107

Merged
merged 11 commits into from
Oct 16, 2019
Merged

[ln] Initial Version #2107

merged 11 commits into from
Oct 16, 2019

Conversation

matheusd
Copy link
Member

@matheusd matheusd commented May 6, 2019

This is the first version of an embedded LN wallet UI on decrediton.

Current features:

  • Connect to initialized and unlocked ln wallets
  • Fund/Withdraw funds from onchain ln wallet
  • Open/Close channels
  • Create invoices
  • Send payments

Due to current limitations of dcrlnd, this can only be used on wallets that
have been previously unlocked.

It also requires the user to open a regular wallet before connecting to a ln
wallet, which is something we might wanna change in the future.

For the moment, in order to enable support to LN, users need to manually edit
the global decrediton config file to set "ln_enabled: true".

It's likely that this can only be merged after updating the grpc and electron versions (which will come on a separate PR)

Copy link
Member

@vctt94 vctt94 left a comment

Choose a reason for hiding this comment

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

Good job on this PR!

Tested the basic functionalities and everything seems to be working.

  • connecting to ln unlocked wallet
  • fund / withdraw from wallet to LN
  • open/ close channel
  • creating invoice (noticed an error )
    image
  • send payments

Only the invoice creation which I noticed this error. Not sure what this might be.

I also left some comments on the code, but nothing really important

Good job!

app/components/views/LNPage/ChannelsTab/OpenChannel.js Outdated Show resolved Hide resolved
app/components/SideBar/MenuLinks/index.js Outdated Show resolved Hide resolved
app/components/views/LNPage/ChannelsTab/PendingChannel.js Outdated Show resolved Hide resolved
app/actions/LNActions.js Outdated Show resolved Hide resolved
app/components/views/LNPage/index.js Outdated Show resolved Hide resolved
app/reducers/ln.js Show resolved Hide resolved
@matheusd
Copy link
Member Author

matheusd commented May 8, 2019

Fixed review issues. Also, I added the node's info to the ln wallet tab to make it easier to open channels from faucets.

@vctt94
Copy link
Member

vctt94 commented Jun 4, 2019

needs rebase

This is the first version of an embedded LN wallet UI on decrediton.

Current features:
  - Startup, link dcrlnd to the currently running wallet and unlock it
  - Open/Close channels
  - Create invoices
  - Send payments
  - Enable autopilot
  - Show logs

The current implementation relies on the remote wallet functionality of dcrlnd.

For the moment, in order to enable support to LN, users need to manually edit
the global decrediton config file to set `"ln_enabled: true"`.
@matheusd matheusd mentioned this pull request Oct 11, 2019
Copy link
Member

@vctt94 vctt94 left a comment

Choose a reason for hiding this comment

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

This is getting really good, thanks for it Matheus.

I re-reviewed and have a couple comments. I noticed a warning when starting the dcrlnd:

image

It looks like I couldn't open channels, it says that the peers is offline, but looking at https://ln-map.jamieholdstock.com/ it says online

image

As I couldn't open channel I was not able to test create invoice and payments, but I like how we add the invoice at send payment and it shows the information. Very clean and descriptive.

app/actions/LNActions.js Show resolved Hide resolved
app/actions/LNActions.js Show resolved Hide resolved
@matheusd matheusd mentioned this pull request Oct 16, 2019
Copy link
Member

@vctt94 vctt94 left a comment

Choose a reason for hiding this comment

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

Thanks for fixing my comments. I have a few more nits, but I believe this PR is fine for an initial commit. I am commenting the issues here so we can have knowledge about them.

  • There are still some uncaught errors on dcrlnd start, for example:
    My dcrd has started without --txindex, so starting dcrlnd failed, but the error never happened in the gui (just logged into the terminal logs)

  • When first starting I noticed a warning:

image

  • Now I am able to open channels. I noticed the confirmations are not updating automatic, but the channel state is updating from pending --> open.

  • When trying to send an invoice payment without path, nothing happened. Just keeps loading and then stops. I believe it silently fails. Also after this, if we try to pay a new invoice, nothing happens as well.

If paying invoice with path it works fine.

I believe we can have some of these issues fixed in a new PR as this one is really long already. We can do what you think the best approach.

@alexlyp alexlyp merged commit 5537d30 into decred:master Oct 16, 2019
@matheusd matheusd deleted the ln branch October 16, 2019 19:07
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.

3 participants