Commit Graph

16907 Commits

Author SHA1 Message Date
Elle Mouton
738253f5e1
routing: assume TLV onion during path finding 2024-06-24 10:01:21 -07:00
Oliver Gugger
fb416c2fa2
Merge pull request #8856 from AbelLykens/patch-1
[docs] Update go instructions
2024-06-22 02:15:42 -06:00
AbelLykens
04f9a4faa4
[docs] Update go instructions
Building current lnd `0.18` fails with older go (`1.19.7`).

* Updated go download path to 1.22.4
* Updated hashes
* Added `rm -rf` instructions as per [go.dev instructions](https://go.dev/doc/install)
2024-06-21 19:27:52 +02:00
Olaoluwa Osuntokun
376b8cedc4
Merge pull request #8853 from Roasbeef/result-utils
fn: add additional utility methods for Result[T]
2024-06-20 16:11:26 -07:00
Olaoluwa Osuntokun
f1a38714d4
fn: add additional utility methods for Result[T]
`NewResult` makes it easy to wrap a normal function call in a result
value.

`Err` can be used to check the error case of the result without
unpacking the entire thing.

`AndThen2` allows a caller to compose a function on two results values,
with the closure only executing if both values are non-error.
2024-06-20 15:05:28 -07:00
Oliver Gugger
390f0723d3
Merge pull request #8838 from yyforyongyu/update-pendingsweeps
cli: update `pendingsweeps` response
2024-06-20 07:13:00 -06:00
Elle
2477bd756f
Merge pull request #8549 from matheusdtech/mc-store-perf-improv
Misson Control Store: Improve performance
2024-06-19 09:15:07 -07:00
Elle
2979afdc19
Merge pull request #8811 from hieblmi/fix-inbound-fee-typo
lncli: fix typo in inbound fee help text
2024-06-19 08:48:47 -07:00
Matheus Degiovani
f39edaa19a
docs: update release notes 2024-06-19 07:35:46 -03:00
Matheus Degiovani
0c7a173354
missioncontrolstore: remove duplication of in-memory data
This removes duplication of in-memory data during the periodic flushing
stage of the mission control store.

The existing code entirely duplicates the in-memory cache of the store,
which is very wasteful when only a few additional results are being
rotated into the store.

This has a significant performance penalty specially for wallets that
remain online for a long time with a low volume of payments. The worst
case scenario are wallets that see at most 1 new payment a second, where
the entire in-memory cache is recreated every second.

This commit improves the situation by determining what will be the
actual changes that need to be committed before initiating the db
transaction and only keeping track of these to update the in-memory
cache if the db tx is successful.
2024-06-19 07:34:35 -03:00
Matheus Degiovani
9059a655db
missioncontrolstore: avoid ticker when there is no work to be done.
This modifies the mission control store to avoid running the one second
ticker for flushing data when there is no work to be done.

This improves performance of a quiscent LN node by avoiding a one second
interval busy loop that does nothing when there are no payments flowing
through the node.
2024-06-19 07:34:35 -03:00
Matheus Degiovani
637ac85d1d
missioncontrolstore: skip work when there are no new entries
This modifies the mission control store to avoid doing any work when no
new payment result entries are in the queue to be processed.

The mission control store maintains keeps the latest N (in production:
1000) entries in its DB, evicting older entries when new ones are added.
Currently, its implementation is somewhat less performant than it could
be.

This commit adds an early return to the storeResults function to avoid
doing any DB or memory operations when its outstanding queue is empty,
improving the performance during quiescent periods of the LN node's
execution.
2024-06-19 07:34:34 -03:00
Matheus Degiovani
6a27bc29ba
missioncontrolstore: add additional tests and benchmarks
These will be useful in the next commits.
2024-06-19 07:33:14 -03:00
Slyghtning
b66e361afa
lncli: fix typo in inbound fee help text 2024-06-19 07:33:32 +02:00
Olaoluwa Osuntokun
c0f7c2849d
Merge pull request #8822 from michael1011/fix-config-error-handling
cfg: fail startup on flags.Error parsing error
2024-06-18 17:51:24 -07:00
michael1011
01f5af0a28
cfg: fail startup on flags.Error parsing error 2024-06-17 16:48:34 +02:00
Yong
e6f7a2d6a7
Merge pull request #8734 from hieblmi/cancel-estimateroutefee
routing: cancelable payment loop
2024-06-17 18:06:52 +08:00
Slyghtning
4568dfceee
docs: update release notes 2024-06-17 09:32:27 +02:00
Slyghtning
7bfa616371
lncli: cancelable flag for SendPaymentRequest 2024-06-17 09:32:26 +02:00
Slyghtning
bba01cf634
routing+routerrpc: cancelable context in SendPaymentV2
In this commit we set up the payment loop context
according to user-provided parameters. The
`cancelable` parameter indicates whether the user
is able to interrupt the payment loop by cancelling
the server stream context. We'll additionally wrap
the context in a deadline if the user provided a
payment timeout.
We remove the timeout channel of the payment_lifecycle.go
and in favor of the deadline context.
2024-06-17 09:32:26 +02:00
Slyghtning
e729084149
lnrpc: cancelable sendpayment request 2024-06-17 09:32:26 +02:00
Slyghtning
06bff6f81a
routing: fix typos and wrap errors 2024-06-17 09:32:25 +02:00
Elle
68494fd91d
Merge pull request #8839 from ellemouton/abandonChanItestFix
itest+lntest: let abandoned channel be either not found or in zombie
2024-06-14 15:55:36 -04:00
Elle Mouton
f3cdbbed2f
itest+lntest: let abandoned channel be either not found or in zombie
index

When abandoning a channel, we remove it from the graph and then add it
to the zombie channel index. However, if we then process a ChannelUpdate
for this channel it will result in us calling `processZombieUpdate`
which will delete the edge from the zombie index. The abandon channel
itest currently asserts that a channel is no longer in the graph by
asserting that when querying for the channel we get a "marked as zombie"
error but to account for the above series of operations, we now also
allow it to just not be found at all ("edge not found").
2024-06-14 14:33:43 -04:00
Olaoluwa Osuntokun
cbe1c150da
Merge pull request #8841 from yyforyongyu/temp-fix-neutrino
itest: provide a temporary fix to unblock CI
2024-06-14 11:27:41 -07:00
yyforyongyu
955670fcc2
itest: provide a temporary fix to unblock CI 2024-06-14 15:18:20 +08:00
Elle
83b1c22e79
Merge pull request #8829 from ellemouton/rebaseItestBeforeRun
.github: rebase before running itests & unit tests
2024-06-13 10:40:13 -04:00
Elle Mouton
e326e242ff
.github: rebase before running itests & unit tests 2024-06-13 08:11:02 -04:00
Elle Mouton
20be40df7b
.github: make the rebase step re-usable 2024-06-13 08:11:02 -04:00
Elle Mouton
8b31a37ec9
.github: only fetch the base branch when rebasing
Update the "check commits" action to only fetch the base branch that we
will be rebasing on. Otherwise every upstream branch is fetched.
2024-06-13 08:11:01 -04:00
yyforyongyu
0f7c641f92
cli: update pendingsweeps response 2024-06-13 19:17:16 +08:00
Yong
cf88a8ae04
Merge pull request #8828 from yyforyongyu/increase-itest-timeout
lntest: increase timeout for postgres backend
2024-06-13 19:00:49 +08:00
yyforyongyu
84e58d6f02
workflows: decrease TRANCHES to 8 2024-06-13 17:54:34 +08:00
yyforyongyu
6de1b026dd
chainntnfs: add verbose logging in unit test 2024-06-13 17:54:34 +08:00
yyforyongyu
9f34a4dc54
itest: skip error assertion when parent context finishes
We may get a flake like the following,
```
lnd_route_blinding_test.go:468:
            Error Trace:    /Users/runner/work/lnd/lnd/itest/lnd_route_blinding_test.go:468
                                        /Users/runner/hostedtoolcache/go/1.22.3/arm64/src/runtime/asm_arm64.s:1222
            Error:          Received unexpected error:
                            rpc error: code = Canceled desc = context canceled
            Test:           TestLightningNetworkDaemon/tranche15/144-of-156/bitcoind/disable_introduction_node
```

This happens when the test successfully finishes, the parent context is
canceled, causing the child context to return an error. We fix it by
ignoring it in the goroutine.
2024-06-13 17:54:30 +08:00
yyforyongyu
ddceb2b15b
lntest: increase timeout for postgres backend
Also decrease timeout values for other builds.
2024-06-13 17:54:30 +08:00
Elle
26892a2645
Merge pull request #8730 from feelancer21/lncli-wallet-estimatefee
lncli: new command `wallet estimatefeerate`
2024-06-12 10:43:50 -04:00
feelancer21
fc90bc9b0f
lncli: new command wallet estimatefeerate
`lncli wallet estimatefeerate` returns the fee rate estimate for on-chain
transactions in sat/kw and sat/vb to achieve a given confirmation target.
2024-06-11 21:56:06 +02:00
Yong
286ee95735
Merge pull request #8800 from ProofOfKeags/bugfix/8535
contractcourt: consider delivery addresses when evaluating toSelfAmount
2024-06-12 01:06:36 +08:00
Oliver Gugger
931b3dc0c3
Merge pull request #8815 from yyforyongyu/fix-edge-policy
trivial: fix linter errors and return verbose errors
2024-06-10 12:48:59 -06:00
Keagan McClelland
1fea14f69f docs: update release notes 2024-06-10 11:38:22 -07:00
Keagan McClelland
30e10322b2 contractcourt: consider delivery addresses when evaluating toSelfAmount
This commit fixes #8535 by changing how we assess toSelfAmount inside
the chainWatcher.

In certain cases users may wish to close out channel funds to external
delivery addresses set either during open or close.

Prior to this change we only consider addresses that our wallet is
aware of.

This change now identifies outputs as to_self outputs if the delivery
script matches OR if our wallet is aware of the address. In certain
edge cases it can be possible for there to be more than one output
that matches these criteria and in that case we will return the sum
of those values.
2024-06-10 11:38:17 -07:00
Oliver Gugger
3549d719ee
Merge pull request #8823 from bhandras/fixup-sendpayment-amp
lncli: fix parsing of --amp when sending a payment
2024-06-10 10:23:45 -06:00
Andras Banki-Horvath
59c8bafda7
lncli: fix parsing of --amp when sending a payment 2024-06-10 17:33:28 +02:00
yyforyongyu
e61cba8d22
multi: return verbose errors when fetching edges 2024-06-10 08:40:18 +08:00
yyforyongyu
78cc1619d7
multi: fix complaints from IDE and linter
Fixed unused param and nilness cond.
2024-06-07 00:45:15 +08:00
Oliver Gugger
98c52df4d2
Merge pull request #8813 from hieblmi/chaninfo-per-outpoint
Allow for a channel point in `GetChanInfo`
2024-06-06 14:47:31 +02:00
Slyghtning
cc902e3d8a
docs: update release notes 2024-06-06 14:15:46 +02:00
Slyghtning
9f83f48d78
lncli: channel point for getchaninfo 2024-06-06 14:15:44 +02:00
Slyghtning
7923ca0de4
rpcserver: retrieve channel info for channel point 2024-06-06 13:37:58 +02:00