Commit Graph

1344 Commits

Author SHA1 Message Date
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
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
Oliver Gugger
bc58dce176 docs: update release notes 2023-07-13 10:17:17 +02:00
Olaoluwa Osuntokun
acecb12f54 Merge pull request #7354 from positiveblue/invoice-sql-schema
sqldb: add invoice schema and sql queries
2023-07-12 17:03:26 -07:00
sputn1ck
92e0b08a7a docs: add release note for 7739 2023-07-11 21:25:19 +02:00
Olaoluwa Osuntokun
33b470b4a6 Merge pull request #7768 from ProofOfKeags/spurious-htlc-rejections
invoices+htlcswitch: fix spurious htlc rejections from overly strict onion packet integrity checks
2023-07-11 10:51:22 -07:00
Oliver Gugger
52115ab19b docs: add release notes 2023-07-11 09:18:43 +02:00
positiveblue
8fcb404161 docs: add release note for 7354 2023-07-10 17:57:09 -07:00
Keagan McClelland
61f48ccf4e docs: update release notes 2023-07-07 10:49:05 -06:00
Oliver Gugger
5c5ce1f707 Merge pull request #7780 from ziggie1984/max_local_csv
Change defaultMaxLocalCSVDelay to protect user from high delays
2023-06-29 20:52:26 +02:00
Hampus Sjöberg
3d69ed3d4c kvdb: Update bbolt to 1.3.7 in order to address mmap issues 2023-06-29 17:54:43 +02:00
ziggie
6cbb62a2df docs: update release-notes 2023-06-28 07:08:32 +02:00
yyforyongyu
b04a40e7b3 mod: update btcwallet version 2023-06-22 01:09:15 +08:00
Olaoluwa Osuntokun
7f95810359 Merge pull request #7710 from carlaKC/7297-updateaddtlvs
Channeldb: Store HTLC Extra TLVs in Onion Blob Varbytes
2023-06-16 14:31:11 -05:00
Elle Mouton
7484910968 docs: add release note for 7771 2023-06-15 11:36:44 +02:00
Torakushi
be4dae0ec5 update release-notes-0.17 2023-06-14 09:58:54 +02:00
Oliver Gugger
cf1f44ab10 Merge pull request #7689 from guggero/housekeeping
Housekeeping (fix small issues, take over stale contributor PRs)
2023-06-13 17:42:53 +02:00
Oliver Gugger
d1002cd218 docs: add contributors to release notes 2023-06-13 11:58:35 +02:00
Lele Calo
acee1d77aa docker: add support for custom params RPCHOST and RPCCRTPATH
In this commit we add support for two more custom parameters in the
main entrypoint for the `lnd` Docker image script (`start-lnd.sh`)

The two parameters are:
* RPCHOST    to set a custom endpoint for the RPC server
* RPCCRTPATH to set a custom location for the certificate used when
  communicating with the RPC server
2023-06-13 11:58:34 +02:00
zx9r
3a5d67a16b cmd/lncli: add confirmation to sendcoins 2023-06-13 11:58:34 +02:00