Commit Graph

15086 Commits

Author SHA1 Message Date
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
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
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
Olaoluwa Osuntokun
8f5fee98a6
Merge pull request #7856 from Roasbeef/p2p-wg-fix
peer: ensure the peer has been started before Disconnect can be called
2023-07-27 11:14:37 -07: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
Olaoluwa Osuntokun
798821db17
peer: remove unused queueQuit channel
In this commit, we remove an unused `queueQuit` channel.
2023-07-27 10:59:29 -07:00
positiveblue
099907c43f
docs: add release note for 7343 2023-07-27 03:31:15 -07:00
positiveblue
5a7d7c2e4f
sqldb: add the sqldb package
This commit provides the scaffolding for using the new sql stores.
The new interfaces, structs and methods are in sync with other projects
like Taproot Assets.

- Transactional Queries: the sqldb package defines the interfaces required
to execute transactional queries to our storage interface.

- Migration Files Embedded: the migration files are embedded into the binary.

- Database Migrations: I kept the use of 'golang-migrate' to ensure our
codebase remains in sync with the other projects, but can be changed.

- Build Flags for Conditional DB Target: flexibility to specify our database
target at compile-time based on the build flags in the same way we do
with our kv stores.

- Update modules: ran `go mod tidy`.
2023-07-27 03:31:12 -07:00
Oliver Gugger
d46ee0bd74
Merge pull request #7842 from morehouse/refactor_handle_warning_error
peer: combine handleWarning and handleError
2023-07-27 10:32:07 +02: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
Oliver Gugger
1d3796a6d4
Merge pull request #7820 from hieblmi/sync-batch-chan-open-params
lnrpc: sync BatchOpenChannel and OpenChannel params
2023-07-26 11:31:05 +02:00
Slyghtning
6e9edc9c88
docs: update release notes 2023-07-26 09:50:47 +02:00
Slyghtning
14be2cdae0
itest: batch channel fee params 2023-07-26 09:49:22 +02:00
Slyghtning
47bcf7af69
funding: add all parameters to batch open channel 2023-07-26 09:49:22 +02:00
Slyghtning
6631741766
lnrpc: sync BatchOpenChannel and OpenChannel params 2023-07-26 09:49:20 +02:00
ziggie
a9ad0e5208
docs: add release-notes for 0.17.0. 2023-07-26 00:18:08 +02:00
ziggie
521a67c795
lnd: define additional rebroadcaster function.
The MapCustomBroadcastError of the rebroadcaster is defined.
This let's us use the Rebroadcaster of the neutrino package (pushtx)
with other backends and guarantee a consistent behaviour. Prior
to this change the rebroadcaster would stop rebroadcasting
transactions because they did not meet the neutrino specific
broadcastErr type.
2023-07-26 00:18:08 +02:00
ziggie
c88ff14477
contractcourt: add tests for mempool rejection.
Add a test where the channel arbitrator starts up correctly
when a prior unilateral close of a channel did not broadcast
for specific reasons.
Also add a test which ensures that when a crib output is
rejected by the bitcoin backend the startup works correctly
for specific errors.
2023-07-26 00:03:17 +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
positiveblue
83ccf61df9
routing: fix index out of range panic
Make sure that we do not crash the node trying to access an invalid
position for an array (-1) in `BuildRoute`.
2023-07-25 10:13:26 -07:00
positiveblue
aadf385f67
routing: split BuildRoute
Create a couple of subroutines that we can unit test separately.
2023-07-25 10:12:55 -07:00
Oliver Gugger
7fdb55bd30
Merge pull request #7827 from carlaKC/cleanup-invoicetests
invoices/test: Cleanup Invoice Registry Tests
2023-07-25 13:15:34 +02:00
Oliver Gugger
0e0e8d8631
Merge pull request #7854 from matheusdtech/itest-network-conn
itest: bind to local addr in network test
2023-07-25 09:20:40 +02:00
ziggie
8314f0a879
contractcourt: handle mempool min fee error.
In case the mempool backend signals that our transaction does not
meet fee requirements when publishing it we will continue to
start up now. The transaction will be rebroadcasted in the
background and a specific log message will be printed to let the
user know that he could increase his mempool size to at least
have this transaction in his own mempool.
2023-07-25 01:13:24 +02:00
ziggie
54bacec422
lnwallet: add new ErrMempoolFee error. 2023-07-25 01:12:39 +02:00
ziggie
6da0f2a157
mod: bump version of neutrino and btcwallet. 2023-07-25 01:12:39 +02:00
Carla Kirk-Cohen
4645fdfb0a
invoice/test: make all tests parallel
When we have tests using global variables and a mix of parallel and
non-parallel tests, odd races can appear when we run them.
2023-07-24 10:54:03 -04:00