Commit Graph

1239 Commits

Author SHA1 Message Date
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
Elle
15d2ff0c4d
netann+docs: remove nil value from variadic list (#7922)
The nil value in the variadic list causes a panic when the variadic
parameters are iterated over.
2023-08-24 11:47:42 -07:00
Suheb
c07ec0462c
docs/release-notes: update 0.17 release notes to new format (#7907)
Added a table of contents at the top and various sections to navigate to, to make it easy to parse and read the release notes.
2023-08-23 15:21:20 -07:00
Elle Mouton
dfec4a65cb
multi: update lightning-onion version
Update the lighting-onion dependency to include the lates changes which
support route blinding.
2023-08-23 12:09:53 +02:00
Olaoluwa Osuntokun
562163ea3d
docs/release-notes: add release notes for taproot chans 2023-08-22 16:34:39 -07:00
Olaoluwa Osuntokun
9851a6147b
lnwire: TestLightningWireProtocol quick check tests for taproot fields 2023-08-22 16:29:49 -07:00
ziggie
160eab280a
docs: add release-notes. 2023-08-15 11:23:13 +02:00
Olaoluwa Osuntokun
c6a68d193c
Merge pull request #7177 from morehouse/fix_chantype_negotiation
funding: fix channel type negotiation bug
2023-08-14 17:15:52 -07:00
Oliver Gugger
1057422aba
release-notes: fix formatting, punctuation 2023-08-11 11:27:27 +02:00
Oliver Gugger
00a4b8a837
release-notes: collapse duplicate Misc section 2023-08-11 08:50:49 +02:00
Oliver Gugger
d930dcec40
Merge pull request #7819 from ziggie1984/abandonchannel-rebroadcaster
Cancel the Rebroadcasting of a Transaction when Abandoning a Channel
2023-08-10 10:43:24 +02:00
yyforyongyu
048d7d7c36
docs: update release note for race fix 2023-08-09 00:17:23 +08:00
ziggie
87cfcea8a3
docs: add release-notes. 2023-08-08 09:32:39 +02:00
Elle Mouton
5203b35316
go.mod: bump neutrino and btcwallet versions 2023-08-05 08:53:39 +02:00
Oliver Gugger
aa7e7a1e5a
Merge pull request #7770 from feelancer21/sample-lnd-conf-update-defaults
Revision of default values in sample-lnd.conf and building of a check script
2023-08-04 13:10:29 +02:00
feelancer21
df440446f7
docs: release notes for #7770 2023-08-03 18:04:26 +02:00
feelancer21
3e1e666065
docs: Documentation of sample-conf-check in MAKEFILE.md
Added an entry for sample-conf-check in MAKEFILE.md.
2023-08-03 18:04:25 +02:00
Oliver Gugger
d62bed22a3
Merge pull request #7857 from hieblmi/wallet-balance-account
lnrpc: adding account name to the `WalletBalance` rpc
2023-08-02 10:45:46 +02:00
Olaoluwa Osuntokun
1871970543
Merge pull request #7343 from positiveblue/sqldb
sqldb: new package supporting sql backends
2023-07-31 10:49:42 -07:00
Slyghtning
6282e0cf86
docs: update release notes 2023-07-28 22:24:55 +02:00
Olaoluwa Osuntokun
325e844a96
peer: ensure the peer has been started before Disconnect can be called
In this commit, we make sure that all the `wg.Add(1)` calls succeed
before we attempt to wait on the shutdown of all the goroutines. Under
rare scheduling scenarios, if both `Start` and `Disconnect` are called
concurrently, then this internal race error can be hit, causing the
panic to occur.

Fixes https://github.com/lightningnetwork/lnd/issues/7853
2023-07-27 10:59:39 -07:00
positiveblue
099907c43f
docs: add release note for 7343 2023-07-27 03:31:15 -07:00
Oliver Gugger
5919615416
Merge pull request #7746 from ziggie1984/min-relay-fee
Handle Min Mempool Fee error so that lnd will startup correctly
2023-07-26 14:42:49 +02:00
Slyghtning
6e9edc9c88
docs: update release notes 2023-07-26 09:50:47 +02:00
ziggie
a9ad0e5208
docs: add release-notes for 0.17.0. 2023-07-26 00:18:08 +02:00
Olaoluwa Osuntokun
9ed064be75
Merge pull request #7516 from hieblmi/utxo-funding
funding: fund channel with selected utxos
2023-07-25 19:19:42 +02:00
Matheus Degiovani
13399e9e81
itest: bind to local addr in network test
This makes the test work even if the local OS has no outside network
connections available or if DNS lookups are failing.
2023-07-24 08:47:26 -03:00
Slyghtning
23467cbb66
docs: update release notes 2023-07-24 13:07:01 +02:00
Matt Morehouse
e5fcc57bbc
docs: release note for #7723 2023-07-19 09:04:22 -05:00
Elle Mouton
7bf07d8875
docs: add release note for 6895 2023-07-19 10:10:15 +02:00
@RandyMcMillan
2b7c9019eb
docs/grpc/java.md: use /Users/<username>/..
Make MacOS user path consistent across docs
2023-07-14 16:44:28 -04:00
@RandyMcMillan
ed94a8f3b4
docs/INSTALL.md: use /Users/<username>/..
Make MacOS user path consistent across docs
2023-07-14 16:41:52 -04:00