Commit graph

1270 commits

Author SHA1 Message Date
Keagan McClelland
9b1c04c210 docs: update release notes 2023-11-10 13:29:51 -08:00
Elle
a3f8011ed6
Merge pull request #8156 from hieblmi/improve-fc-logging
contractcourt: log amount if incoming htlc times out
2023-11-09 17:32:18 +02:00
Elle
6122452509
Merge pull request #8117 from ellemouton/removeDBFromChannelDBSchemas
channeldb+refactor: remove `kvdb.Backend` from channel DB schemas
2023-11-09 07:47:11 +02:00
Eugene Siegel
38fb12fb4f
release-notes: update for 0.17.1 2023-11-08 16:36:04 -05:00
Elle Mouton
be23986eda
docs: update release notes 2023-11-08 14:50:35 +02:00
Slyghtning
dd49c0175a
docs: update release notes 2023-11-08 10:15:52 +01:00
Olaoluwa Osuntokun
dacb86fdbc
Merge pull request #8106 from orbitalturtle/sign-tagged-hash-rpc
lnrpc: add tagged hash option to signer.SignMessage/VerifyMessage rpcs
2023-11-06 17:05:35 -08:00
Olaoluwa Osuntokun
eb5fc0c349
Merge pull request #7811 from yyforyongyu/fix-panix
contractcourt: stop lnd when received witness is empty
2023-10-31 15:17:30 -07:00
Olaoluwa Osuntokun
9287b755d8
macaroons: reject unknown macaroon versions
We've only ever made macaroons with the v2 versions, so we should
explicitly reject those that aren't actually v2. We add a basic test
along the way, and also add a similar check for the version encoded in
the macaroon ID.
2023-10-31 13:23:50 -07:00
Olaoluwa Osuntokun
8c121ee5e0
docs/release-notes: add entry for nonce init fix 2023-10-31 10:10:49 -07:00
Orbital
7ca96a6ab9
docs: update release notes 2023-10-30 21:40:18 -05:00
Olaoluwa Osuntokun
32c8b82c36
Merge pull request #7669 from morehouse/fuzz_lnwire_onion_errors
lnwire: fuzz onion failure messages
2023-10-30 12:44:55 -07:00
Olaoluwa Osuntokun
78ff68ad05
Merge pull request #8119 from lightningnetwork/udpate-docs
docs: Add requirement for bitcoind.
2023-10-30 12:34:57 -07:00
yyforyongyu
28497e940f
docs: update release notes re empty witness data 2023-10-31 01:45:07 +08:00
Matt Morehouse
66d6a8455d
docs: update release notes 2023-10-27 14:54:29 -05:00
Jonathan Harvey-Buschel
459a60e4e6
doc: add release notes for 8111 2023-10-27 11:05:28 -04:00
ziggie
8bbab59745
docs: fix double hypen to single hyphen.
bitcoind uses single hyphens so changed where necessary.
2023-10-27 13:30:44 +02:00
ziggie
14c4addcdc
docs: Add requirement for bitcoind [skip ci]
Add a comment to disallow the bitcoind config parameter
`rpcserialversion`.
2023-10-27 13:28:09 +02:00
yyforyongyu
05fbe8b116
docs: update release note re RBF fix 2023-10-23 13:01:52 +08:00
Keagan McClelland
5762061487 docs: Update release notes to include pong enforcement 2023-10-19 09:26:50 -07:00
Oliver Gugger
812f4d9242
Merge pull request #8081 from bhandras/invoicedb-refactor
invoices: refactor `InvoiceDB` to eliminate `ScanInvoices`
2023-10-19 09:27:54 +00:00
Andras Banki-Horvath
bedafca49d
docs: update release notes for 0.18.0 2023-10-18 16:15:59 +02:00
Oliver Gugger
91d910872d
Merge pull request #7715 from bshramin/http-client-timeout
lntest: set ReadHeaderTimeout for http client
2023-10-17 19:33:39 +00:00
Amin Bashiri
0c64a183cf
lntest: add http header timeout to config 2023-10-17 11:25:06 -06:00
Oliver Gugger
e8d865aba5
Merge pull request #7824 from yyforyongyu/sweeper-unit-test
input+sweep: make sure input with no fee rate is not added to cluster
2023-10-17 06:36:21 +00:00
Oliver Gugger
a6f044b748
Merge pull request #8057 from Chinwendu20/tlv-bool
tlv: Added bool to primitive
2023-10-16 15:23:48 +00:00
Ononiwu Maureen
844a792251 docs: Added release note
Signed-off-by: Ononiwu Maureen <amaka013@gmail.com>
2023-10-16 14:21:36 +01:00
Yong
6a80530fff
gomod: update btcwallet version (#8019) 2023-10-16 09:14:56 +02:00
yyforyongyu
d0edb47166
docs: update release notes 2023-10-13 17:00:53 +08:00
Yong
939375f1a5
sweeper: relax anchor sweeping when there's no deadline pressure (#7965)
* sweep: use longer variable name for clarity in `addToState`

* sweeper: add more docs and debug logs

* sweep: prioritize smaller inputs when adding wallet UTXOs

This commit sorts wallet UTXOs by their values when using them for
sweeping inputs. This way we'd avoid locking large UTXOs when sweeping
inputs and also provide an opportunity to aggregate wallet UTXOs.

* contractcourt+itest: relax anchor sweeping for CPFP purpose

This commit changes from always sweeping anchor for a local force close
to only do so when there is an actual time pressure. After this change,
a forced anchor sweeping will only be attempted when the deadline is
less than 144 blocks.

* docs: update release notes

* itest: update test `testMultiHopHtlcLocalChainClaim` to skip CPFP

Since we now only perform CPFP when both the fee rate is higher and the
deadline is less than 144, we need to update the test to reflect that
Bob will not CPFP the force close tx for the channle Alice->Bob.

* itest: fix `testMultiHopRemoteForceCloseOnChainHtlcTimeout`

* itest: update related tests to reflect anchor sweeping

This commit updates all related tests to reflect the latest anchor
sweeping behavior. Previously, anchor sweeping is always attempted as
CPFP when a force close is broadcast, while now it only happens when the
deadline is less than 144. For non-CPFP purpose sweeping, it will happen
after one block is mined after the force close transaction is confirmed
as the anchor will be resent to the sweeper with a floor fee rate, hence
making it economical to sweep.
2023-10-12 17:18:59 +02:00
András Bánki-Horváth
ad5cd9c8bb
multi: extend InvoiceDB methods with a context argument (#8066)
* multi: extend InvoiceDB methods with a context argument

This commit adds a context to InvoiceDB's methods. Along this refactor
we also extend InvoiceRegistry methods with contexts where it makes
sense. This change is essential to be able to provide kvdb and sqldb
implementations for InvoiceDB.

* channeldb: restrict invoice tests to only use an InvoiceDB instance

* docs: update release notes for 0.18.0
2023-10-11 13:42:59 +02:00
Eugene
9478b85e59
htlcswitch/hop: use InvalidOnionVersion for replayed packets (#7937)
* htlcswitch/hop: use InvalidOnionVersion for replayed packets

The link will send an update_fail_malformed_htlc, so we need to set
the BADONION bit. Since there isn't a replay-specific error, we
set the failure code to InvalidOnionVersion which has the BADONION bit.

* release-notes: update for 0.17.1
2023-10-11 10:08:43 +02:00
Carla Kirk-Cohen
b994b6f9e0 docs: add release notes 2023-10-06 16:38:33 -07:00
yyforyongyu
32fccc434b docs: update release note for maxfeerate 2023-10-06 16:34:47 -07:00
Elle Mouton
a454a8ab44 docs: add release note for 7867 2023-10-06 16:34:47 -07:00
Elle Mouton
0d89a45abe docs: remove Litecoin references from INSTALL.md file 2023-10-06 16:34:47 -07:00
yyforyongyu
f6664d572e docs: update release notes for payment status 2023-10-06 16:34:47 -07:00
Suheb
b7d1c6666f docs/release-notes: add template for 0.18.0
Signed-off-by: saubyk <39208279+saubyk@users.noreply.github.com>
2023-10-06 16:34:47 -07:00
Vincent
80bfd17cf2
docs: add instructions to generate type hints (#8025)
* Add instructions to generate type hints 

Use mypy to generate .pyi files as well. These files are useful for type hinting in IDEs.

* Update python.md

fix lines that got swapped in copy-paste

* remove mypy 

mypy is not a dependency
2023-10-06 16:47:17 +02:00
Olaoluwa Osuntokun
abe888f719
contractcourt: modify the incoming contest resolver to use concurrent queue
In this commit, we modify the incoming contest resolver to use a
concurrent queue. This is meant to ensure that the invoice registry
subscription loop never blocks. This change is meant to be minimal and
implements option `5` as outlined here:
https://github.com/lightningnetwork/lnd/issues/8023.

With this change, the inner loop of the subscription dispatch method in
the invoice registry will no longer block, as the concurrent queue uses
a fixed buffer of a queue, then overflows into another queue when that
gets full.

Fixes https://github.com/lightningnetwork/lnd/issues/7917
2023-09-25 18:48:30 -05:00
Olaoluwa Osuntokun
12be6a37a7
Merge branch 'master' into handleRogueUpdates 2023-09-18 13:55:41 -07:00
Olaoluwa Osuntokun
7412482406
Merge pull request #7994 from Roasbeef/remote-signer-musig2-nonces
multi: add ability to specify local nonces for musig2 signer rpc, add itest for remote signer taproot chans
2023-09-18 13:54:14 -07:00
Olaoluwa Osuntokun
2359481226
Merge pull request #7983 from Roasbeef/blocking-and-mutex-profile
lnd+config: add ability to obtain blocking and mutex profiles
2023-09-18 11:45:40 -07:00
Olaoluwa Osuntokun
23a153abae
lnd+config: add ability to obtain blocking and mutex profiles
In this commit, we add the ability to obtain blocking and mutex
profiles. The blocking profile will show which goroutines are
consistently blocked on synchronization primitives like channels, or
I/O. The mutex profile will show which mutexes are very contested.

The blocking profile can be enabled with a new arg: `--blockingprofile`.
The mutex profile can be enabled with a new arg: `--mutexprofile`. These
are both ignored if the profile port isn't set.

Activating these profiles requires the caller to pass in a sampling
rate. For now I've set it just to `1` to test things out. Unfortunately
documentation is rather scarce, so there aren't any good guides re what
these values should be set to. AFAICT, these add more overhead than the
other prowling options, so they shouldn't necessarily be enabled
persistently in production.
2023-09-18 11:44:49 -07:00
Olaoluwa Osuntokun
8405590152
lnrpc/signrpc+lnwallet/rpcwallet: expose local nonces over RPC
In this commit, we update the set of protos to accept the local secret
nonces over RPC. This is actually a 97 byte value, as it includes the
two 32 byte nonces, as well as the 33 byte value of the public key of
the signer.

This is needed in order to be able to open taproot channels over the RPC
interface.
2023-09-18 11:42:15 -07:00
Olaoluwa Osuntokun
247c1d8dc8
lnrpc: increase max message size for ws proxy
In this commit, we increase the max message size for the ws proxy. We
have a similar setting for the normal gRPC server which was tuned to be
able to support decoding `GetNetworkInfo` as the channel graph got
larger. We keep the default buffer size of 64 KB, but allow that to be
expanded to up to 4 MB (current value) to decode larger messages.

One alternative would be to modify the `Split` function to break up
larger lines into smaller ones. We'd need to double check that the
libraries at a higher level of abstraction can handle the chunks. The
scan function would look something like:
```go
splitFunc := func(data []byte, eof bool) (int, []byte, error) {
        if len(data) >= chunkSize {
                return chunkSize, data[:chunkSize], nil
        }

        return bufio.ScanLines(data, eof))
}
scanner.Split(splitFunc)
```
2023-09-18 11:32:34 -07:00
Olaoluwa Osuntokun
de54a603b7
lnwallet+contractcourt: gracefully handle auto force close post data loss
In this commit, update the start up logic to gracefully handle a
seemingly rare case. In this case, a peer detects local data loss with a
set of active HTLCs. These HTLCs then eventually expire (they may or may
not actually "exist"), causing a force close decision. Before this PR,
this attempt would fail with a fatal error that can impede start up.

To better handle such a scenario, we'll now catch the error when we fail
to force close due to entering the DLP and instead terminate the state
machine at the broadcast state. When a commitment transaction eventually
confirms, we'll play it as normal.

Fixes https://github.com/lightningnetwork/lnd/issues/7984
2023-09-15 18:29:09 -07:00
Elle Mouton
95c2bfe181
docs: add entry for 7981 2023-09-14 10:33:07 +02:00
Olaoluwa Osuntokun
01c64712a3
multi: ensure link is always torn down due to db failures, add exponential back off for sql-kvdb failures (#7927)
* lnwallet: fix log output msg

The log message is off by one.

* htlcswitch: fail channel when revoking it fails.

When the revocation of a channel state fails after receiving a new
CommitmentSigned msg we have to fail the channel otherwise we
continue with an unclean state.

* docs: update release-docs

* htlcswitch: tear down connection if revocation processing fails

If we couldn't revoke due to a DB error, then we want to also tear down
the connection, as we don't want the other party to continue to send
updates. That may lead to de-sync'd state an eventual force close.
Otherwise, the database might be able to recover come the next
reconnection attempt.

* kvdb: use sql.LevelSerializable for all backends

In this commit, we modify the default isolation level to be
`sql.LevelSerializable. This is the strictness isolation type for
postgres. For sqlite, there's only ever a single writer, so this doesn't
apply directly.

* kvdb/sqlbase: add randomized exponential backoff for serialization failures

In this commit, we add randomized exponential backoff for serialization
failures. For postgres, we''ll his this any time a transaction set fails
to be linearized. For sqlite, we'll his this if we have many writers
trying to grab the write lock at time same time, manifesting as a
`SQLITE_BUSY` error code.

As is, we'll retry up to 10 times, waiting a minimum of 50 miliseconds
between each attempt, up to 5 seconds without any delay at all. For
sqlite, this is also bounded by the busy timeout set, which applies on
top of this retry logic (block for busy timeout seconds, then apply this
back off logic).

* docs/release-notes: add entry for sqlite/postgres tx retry

---------

Co-authored-by: ziggie <ziggie1984@protonmail.com>
2023-08-30 16:48:00 -07:00
Jamal James
cbb4c27a44
docs: fix simple-taproot-channels typo [skip ci] (#7926) 2023-08-25 15:48:37 -07:00