Commit graph

15116 commits

Author SHA1 Message Date
ziggie
87fc58ecfe
multi: Add a channel.db migration.
The new migration removes the sweeper-last-tx top level bucket
from the channel.db database.
2023-08-15 10:00:30 +02:00
ziggie
07502a8fb0
sweep: Remove publishing last-tx logic.
We remove the publishing of the last published sweep tx during the
startup of the sweeper. This republishing can lead to situations
where funds of the default wallet might be locked for neutrino
backend clients.
Moreover all related tests are removed as well.
2023-08-15 10:00:29 +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
55cc35c6ba
Merge pull request #7870 from feelancer21/check-script-fix
scripts: Direct 'lnd --help' output to a file
2023-08-14 12:30:29 +02:00
Oliver Gugger
1f9736bafb
Merge pull request #7888 from hieblmi/fix-updatechanpolicy-typos
typos: fix updatechanpolicy typos
2023-08-14 09:52:48 +02:00
Oliver Gugger
2734fc52e1
Merge pull request #7886 from guggero/release-notes-fix
release-notes: remove duplicate Misc section, fix formatting and punctuation
2023-08-14 09:40:11 +02:00
Matt Morehouse
e6a2167f38
funding: refactor negotiateCommitmentType
- use a switch instead of nested ifs to improve readability
- improve some variable names
- reword comments
2023-08-11 11:20:07 -05:00
Slyghtning
ab117a0ed4
typos: fix updatechanpolicy typos 2023-08-11 17:04:36 +02: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
Olaoluwa Osuntokun
8f693fe020
Merge pull request #7518 from yyforyongyu/fix-channel-ready-race
Fix race between `channel_ready` and link update
2023-08-08 17:10:31 -07:00
yyforyongyu
f9d4212ecc
peer: send msgs to chanStream for both active and pending channels
This commit now sends messages to `chanStream` for both pending and
active channels. If the message is sent to a pending channel, it will be
queued in `chanStream`. Once the channel link becomes active, the early
messages will be processed.
2023-08-09 01:29:19 +08:00
yyforyongyu
a9da25b238
golangci: update linter settings for test files 2023-08-09 01:29:19 +08:00
yyforyongyu
0dd2aa0aef
multi: add itest to check race between channel_ready and update_add_htlc
This commit adds a new itest case to check the race condition found in
issue #7401. In order to control the funding manager's state, a new dev
config for the funding manager is introduced to specify a duration we
should hold before processing remote node's channel_ready message.

A new development config, `DevConfig` is introduced in `lncfg` and will
only have effect if built with flag `integration`. This can also be
extended for future integration tests if more dev-only flags are needed.
2023-08-09 01:29:19 +08:00
yyforyongyu
6b41289538
multi: patch unit tests for handling pending channels 2023-08-09 01:29:19 +08:00
yyforyongyu
d28242c664
peer: return an error from updateNextRevocation and patch unit tests
This commit makes the `updateNextRevocation` to return an error and
further feed it through the request's error chan so it'd be handled by
the caller.
2023-08-09 01:29:18 +08:00
yyforyongyu
927572583b
multi: remove pending channel from Brontide when funding flow failed
This commit adds a new interface method, `RemovePendingChannel`, to be
used when the funding flow is failed after calling `AddPendingChannel`
such that the Brontide has the most up-to-date view of the active
channels.
2023-08-09 01:29:18 +08:00
yyforyongyu
3ed579d06f
funding: make failFundingFlow takes both channel IDs
This commit adds a new struct `chanIdentifier` which wraps the pending
channel ID and active channel ID. This struct is then used in
`failFundingFlow` so the channel ID can be access there.
2023-08-09 01:29:18 +08:00
yyforyongyu
048d7d7c36
docs: update release note for race fix 2023-08-09 00:17:23 +08:00
yyforyongyu
3eb7f54a6d
peer: add method handleLinkUpdateMsg to handle channel update msgs 2023-08-09 00:17:23 +08:00
yyforyongyu
e46bd8e177
multi: add AddPendingChannel to peer interface
The funding manager has been updated to use `AddPendingChannel`. Note
that we track the pending channel before it's confirmed as the peer may
have a block height in the future(from our view), thus they may start
operating in this channel before we consider it as fully open.

The mocked peers have been updated to implement the new interface method.
2023-08-09 00:17:22 +08:00
yyforyongyu
f39c568c94
peer: track pending channels in Brontide
This commit adds a new channel `newPendingChannel` and its dedicated
handler `handleNewPendingChannel` to keep track of pending open
channels. This should not affect the original handling of new active
channels, except `addedChannels` is now updated in
`handleNewPendingChannel` such that this new pending channel won't be
reestablished in link.
2023-08-09 00:17:22 +08:00
Oliver Gugger
dfe95d74ea
Merge pull request #7875 from ellemouton/moveStateServerRestRegister
refactor: move State server REST registration
2023-08-08 15:00:27 +02:00
feelancer21
2914f8007f
scripts: Direct 'lnd --help' output to a file
We are directing the output of 'lnd --help' to a file, as there
is currently an issue when an option is mentioned in the help
text.
2023-08-08 11:47:21 +02:00
Elle Mouton
b9560b067a
refactor: move State server REST registration
This commit moves the registration of the State server with a REST proxy
into the `RegisterWithRestProxy` method in order to keep all the REST
registrations in one place.
2023-08-08 11:43:25 +02:00
ziggie
87cfcea8a3
docs: add release-notes. 2023-08-08 09:32:39 +02:00
ziggie
dd912911fa
lnd: cancel rebroadcasting a tx.
When abandoning a channel we make sure we cancel the rebroadcasting
of the transaction.
2023-08-08 09:31:17 +02:00
ziggie
2708626d62
lnwallet: add CancelRebroadcast method.
Adding the ability to stop rebroadcasting a transaction. This is
useful when we want to abandon a channel and grantee that this
transaction will not confirm accidentally.
2023-08-08 09:31:16 +02:00
Oliver Gugger
bf5aab9d52
Merge pull request #7788 from ellemouton/bumpNeutrino
go.mod: bump neutrino and btcwallet versions
2023-08-07 08:46:20 +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
Olaoluwa Osuntokun
03b26bb909
Merge pull request #7859 from guggero/txnotifier-details-copy
chainntnfs: remove block info from conf detail copy
2023-08-03 14:36:32 -07:00
feelancer21
df440446f7
docs: release notes for #7770 2023-08-03 18:04:26 +02:00
feelancer21
8b78c1b9e2
workflows: change step name of sample conf check
We now also check the default values themselves and not just the
existence of the command line flags in the file.
2023-08-03 18:04:25 +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
feelancer21
cbd8f0a819
Makefile: Calling the script check-sample-lnd-conf.sh
The existing sample-conf-check is replaced by a call of the
check-sample-lnd-conf.sh.
2023-08-03 18:04:25 +02:00
feelancer21
aa6bc0828a
scripts: Add check script for sample-lnd.conf
The new script perfoms the following checks on the sample-lnd.conf file:
 1. Checks that all relevant options of lnd are included.
 2. Verifies that defaults are labeled if there are also further examples.
 3. Checks that all default values of lnd --help are mentioned correctly,
    including empty defaults and booleans which are set to false by
    default.
2023-08-03 18:04:18 +02:00
feelancer21
178f646692
sample-lnd.conf: Cleanup of defaults and examples
If there is only one entry in the sample-lnd.conf, it must reflect the
default value. If additional examples are provided, they should follow
the following format.

; Default:
;   option=defaultvalue
; Example
;   option=examplevalue

Booleans have been changed to 'false' to align with the default behavior
of Go. Additionally, the description for various parameters has been
adjusted.
2023-08-03 17:48:45 +02:00
Oliver Gugger
4332413fba
chainntnfs: remove block info from conf detail copy
Noticed this while updating to latest master in another project:
If there are two notifications for the same output being registered and
the first one does _NOT_ request the block to be included, then the
second one also will not receive the block, even if it explicitly
requests it.
This is caused by the block being removed from the original confirmation
set instead of a copy (as it is done in NotifyHeight and
UpdateConfDetails).
2023-08-02 15:23:14 +02:00
Oliver Gugger
19c121c7a3
Merge pull request #7846 from morehouse/refactor_mailcourier
htlcswitch: split mailCourier by courierType
2023-08-02 10:52:46 +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
Matt Morehouse
b1a3c46759
htlcswitch: TODO for obviating type assertions
memoryMailBox uses multiple container/list.List objects to track
messages and packets, which use interface{} to accept objects of any
type. go1.18 added generics to the language, which means we could use a
typed list instead, allowing us to stop using forced type assertions
when reading objects from the list.

I'm not aware of any standard library implementation of a typed list yet,
so let's just add a TODO for now.
2023-07-31 09:52:33 -05:00
Slyghtning
6282e0cf86
docs: update release notes 2023-07-28 22:24:55 +02:00
Slyghtning
2c3420679d
lncli: add account to WalletBalance command 2023-07-28 22:24:55 +02:00
Slyghtning
dd2a89a6ee
lnd: WalletBalance checks on account basis 2023-07-28 22:24:55 +02:00
Slyghtning
442f1ac4d4
lnrpc: WalletBalanceRequest adds account 2023-07-28 22:24:53 +02:00
Olaoluwa Osuntokun
f64ebfb975
Merge pull request #7844 from hieblmi/add-slyghtning-to-signers
scripts: add gpg key for hieblmi [skip ci]
2023-07-27 11:20:00 -07:00
Olaoluwa Osuntokun
10bd338b33
Merge pull request #7799 from positiveblue/fix-build-route
routing: fix `index out of range` panic
2023-07-27 11:17:31 -07:00