Commit Graph
13637 Commits
Author SHA1 Message Date
Olaoluwa Osuntokun bc5638428e Merge pull request #6789 from Crypt-iQ/waitingclose
server+htlcswitch: check waiting-close fwdpkgs in reforwardResponses
2022-09-30 16:39:49 -07:00
Olaoluwa Osuntokun 94ab72363a Merge pull request #6914 from positiveblue/fix-6898
addinvoice: refactor hint hop selection algorithm
2022-09-30 11:57:54 -07:00
eugene ff3c942a96 release-notes: update for 0.16.0 2022-09-30 14:40:41 -04:00
eugene bb956e127e server+htlcswitch: check waiting-close fwdpkgs in reforwardResponses
Previously, the Switch would not check waiting-close channels' fwdpkgs
for settles or fails to reforward. This could result in a force close
in a rare edge case if a restart occurred at the wrong time. Now,
waiting-close fwdpkgs are checked and the issue is avoided.
2022-09-30 14:40:38 -04:00
positiveblue 55ddbd41c4 docs: add release notes for hop hint selection refactor 2022-09-30 06:55:16 -07:00
positiveblue 584f1089f7 aliasmgr: cache peer alias in memory 2022-09-30 06:55:16 -07:00
positiveblue 4b0bc9a7c6 invoicesrpc: unit tests for invoice hop hints 2022-09-30 06:55:16 -07:00
positiveblue fbe79811cf invoicesrpc: refactor addinvocie hop hint selection
In order to reduce the number of calls to the db we try to process as
few channels as we can + try to not do extra work for each of them.

- First fetch all the channels. Then, filter all the public ones and
  sort the potential candidates by remote balance.

- Filter out each potential candidate as soon as possible.

- Only check the alias if the channel supports scid aliases.

- Because we sort the channels by remote balance, we will hit the
  target amount, if possible, as soon as we can.

We do not want to leak information about our remote balances, so we
shuffle the hop hints (the forced ones go always first) so the invoice
receiver does not know which channels have more balance than others.
2022-09-30 06:55:10 -07:00
Oliver Gugger 35c59643cd Merge pull request #6500 from voltagecloud/encrypt-tor-privkey
[tor] Add ability to encrypt the Tor private key on disk
2022-09-30 10:06:42 +02:00
Orbital 14cc7e5892 docs: update release notes 2022-09-30 01:54:31 -05:00
Graham Krizek c284574104 docs: Add a section in configuring_tor about the --tor.encryptkey flag 2022-09-30 01:53:46 -05:00
Orbital 073c990c75 multi: Add --tor.encryptkey flag functionality to encrypt the Tor private key on disk
It's possible that a user might not want the Tor private key to sit on the disk in plaintext (it is a private key after all). So this commit adds a new flag to encrypt the Tor private key on disk using the wallet's seed. When the --tor.encryptkey flag is used, LND will still write the Tor key to the same file, however it will now be encrypted intead of plaintext. This essentially uses the same method to encrypt the Tor private key as is used to encrypt the Static Channel Backup file.
2022-09-30 01:53:46 -05:00
Graham Krizek e0fc5bb234 lnencrypt: Moves the crypto functions in the chanbackup package into its own package called lnencrypt
The functions inside of the crypto.go file in chanbackup (like EncryptPayloadToWriter and DecryptPayloadFromReader) can be used by a lot of things outside of just the chanbackup package. We can't just reference them directly from the chanbackup package because it's likely that it would generate circular dependencies. Therefore we need to move these functions into their own package to be referenced by chanbackup and whatever new functionality that needs them
2022-09-30 01:53:45 -05:00
Orbital f3bd2227fa keychain: change KeyFamilyStaticBackup name to reflect its new, broader role 2022-09-30 01:53:43 -05:00
Oliver Gugger 4b2edc4777 Merge pull request #6753 from hieblmi/openchannel-fee-rates
lncli: `base_fee_msat` and `fee_rate_ppm` for `openchannel`
2022-09-29 15:43:56 +02:00
Slyghtning 5083cc5607 docs: release notes for channel fees of openchannel 2022-09-29 08:31:48 -04:00
Slyghtning 6ea89a51af unit: openchannel fee update and db tests 2022-09-29 08:31:48 -04:00
Slyghtning 41822a8baf itest: openchannel fee scenarios 2022-09-29 08:31:47 -04:00
Slyghtning 2a90b2439a lncli: channel fee parameter for openchannel 2022-09-29 08:21:09 -04:00
Slyghtning 1e030c2d48 rpcserver: parse channel fees into InitFundingMsg 2022-09-29 08:21:09 -04:00
Slyghtning e87412bd63 funding+channeldb: handle and persist channel fees 2022-09-29 08:21:06 -04:00
Slyghtning 021cb07b39 lnrpc: channel fee parameters for OpenChannelRequest 2022-09-28 09:28:11 -04:00
Oliver Gugger b8545de5c0 Merge pull request #6941 from lightningnetwork/taproot-fee-estimation-fix
build: update to latest version of btcwallet w/ taproot estimation fix
2022-09-28 11:51:25 +02:00
positiveblue 0e803172d6 style: format invoicesrpc/addinvoice.go 2022-09-28 02:19:55 -07:00
Olaoluwa Osuntokun d062a5263e build: update to latest version of btcwallet w/ taproot estimation fix
Fixes https://github.com/lightningnetwork/lnd/issues/6873
2022-09-27 11:24:39 -07:00
Oliver Gugger 6a4648b7aa Merge pull request #6936 from hieblmi/patch-1
doc: update psbt.md
2022-09-27 17:03:18 +02:00
Slyghtning 4ec397aa80 doc: fix typos in psbt.md 2022-09-27 10:54:17 -04:00
Oliver Gugger 648bc88081 Merge pull request #6950 from hieblmi/patch-3
doc: vim visual ruler at column 80
2022-09-27 16:05:45 +02:00
Slyghtning b49ec52c33 doc: vim visual ruler at column 80 2022-09-27 09:45:55 -04:00
Oliver Gugger 905dfed6dd Merge pull request #6945 from ellemouton/errOnZeroLocalAmt
rpcserver: error on zero local balance in openchan req
2022-09-26 14:15:36 +02:00
Oliver Gugger 4994d1304b Merge pull request #6944 from nayuta-ueno/rpc-comment-anchorstate
lnrpc: add comment for AnchorState [skip ci]
2022-09-26 14:10:23 +02:00
ueno 1384366994 lnrpc: add comment for AnchorState [skip ci] 2022-09-26 20:38:58 +09:00
Elle Mouton 081546ee00 rpcserver: error on zero local balance in openchan req
In this commit, we catch and error on the specific case where an
openchannel request has a zero-value local funding amount. This is just
to ensure that the error message returned makes more sense.
2022-09-26 13:29:28 +02:00
Oliver Gugger 2dee112fe9 Merge pull request #6919 from benthecarman/state-desc
Add comments for all wallet states
2022-09-22 17:06:40 +02:00
Oliver Gugger bad25b1a2e Merge pull request #6792 from Crypt-iQ/fullcommitflake
htlcswitch: use ticker.New instead of NewForce for test link
2022-09-21 22:29:02 +02:00
eugene 07d924ea34 release-notes: update for 0.16.0 2022-09-21 15:45:24 -04:00
eugene bfcf0830ff htlcswitch: use ticker.New instead of NewForce for test link
NewForce's Pause method doesn't reset the ticker, so a test flake
would occur in TestChannelLinkCancelFullCommitment where
PendingCommitTicker.Pause() was called, but the underlying timer was
still ticking. When PendingCommitTicker.Resume() was called, an
unlucky Ticks() call could end up firing, leading to the link being
shut down.
2022-09-21 15:45:22 -04:00
Oliver Gugger beb897d6ed Merge pull request #6892 from Crypt-iQ/iss6882_notifywhenonline_fix
server.go: add peerChan to peerConnectedListeners in NotifyWhenOnline
2022-09-21 19:21:42 +02:00
eugene 02f7fa91d5 release-notes: update for 0.15.2 2022-09-21 10:52:06 -04:00
eugene 2def3fc542 server.go: add peerChan to peerConnectedListeners in NotifyWhenOnline
This fixes a bug where a caller would:
- call NotifyWhenOnline and pass in a channel
- the server's mutex is held and the pubStr is checked in peersByPub
- the peer object is in the peersByPub map
- the peer object has its quit channel closed
- QuitSignal is called in the select statement, and the function
  returns
- the caller is still waiting for the channel to be sent on forever
  since it was never sent on or added to the peerConnectedListeners
  slice.

This patch fixes the above bug by adding the channel to the
peerConnectedListeners slice if the QuitSignal select case is called.
2022-09-21 10:50:25 -04:00
Oliver Gugger 49eeabf2a4 Merge pull request #6929 from morehouse/mutex_fix
funding: fix potential data race
2022-09-20 11:25:42 +02:00
Oliver Gugger 80049c98f1 Merge pull request #6926 from guggero/query-routes-bindings
lnrpc: add additional REST binding for QueryRoutes
2022-09-20 09:44:34 +02:00
Matt Morehouse 179e7ceb08 docs: update release notes 2022-09-19 12:50:07 -05:00
Matt Morehouse 54474d5cd7 funding: fix potential data race
localDiscoverySignals needs to be guarded by its mutex.  I was unable to
write a test case that would trigger a race under the race detector, but
better safe than sorry.
2022-09-19 10:55:45 -05:00
Oliver Gugger a1c31f06fa docs: add release notes 2022-09-19 10:28:38 +02:00
Oliver Gugger 01cd1c991e lnrpc: add additional REST binding for QueryRoutes
Lists with non-primitive members aren't supported in the query string of
a GET request with the current version of the grpc-gateway library. To
allow route_hints to be set through REST, we also offer a POST endpoint
for that call where the encoding of the request parameter can be
specified as JSON.
2022-09-19 10:18:34 +02:00
benthecarman 96326e045a Add comments for all wallet states [skip ci] 2022-09-15 09:14:36 -05:00
Oliver Gugger 202fcd6672 Merge pull request #6779 from Crypt-iQ/tlv_domain
tlv: allow tlv streams to use large records
2022-09-15 09:20:31 +02:00
eugene a61fb5675a release-notes: update for 0.16.0 2022-09-14 15:48:15 -04:00
eugene 524058f39d tlv: allow tlv streams to use large records in non-p2p setting 2022-09-14 15:48:13 -04:00