Commit graph

18060 commits

Author SHA1 Message Date
Oliver Gugger
bb9c680a48
Merge pull request #9352 from guggero/update-roasbeef-key
scripts: update Roasbeef's key ID in verify-install.sh
2024-12-13 11:05:39 +01:00
Oliver Gugger
ff14847f30
Merge pull request #9343 from ellemouton/contextGuard
fn: expand the ContextGuard and add tests
2024-12-13 10:25:57 +01:00
Elle Mouton
f99cabf7b4
fn: rework the ContextGuard and add tests
In this commit, the ContextGuard struct is re-worked such that the
context that its new main WithCtx method provides is cancelled in sync
with a parent context being cancelled or with it's quit channel being
cancelled. Tests are added to assert the behaviour. In order for the
close of the quit channel to be consistent with the cancelling of the
derived context, the quit channel _must_ be contained internal to the
ContextGuard so that callers are only able to close the channel via the
exposed Quit method which will then take care to first cancel any
derived context that depend on the quit channel before returning.
2024-12-13 10:44:03 +02:00
Elle Mouton
c2165c4ede
fn: add Guard test helper
Copied from lightninglabs/loop
2024-12-13 10:44:03 +02:00
Alex Akselrod
53d34d2c60
github workflow: save postgres log to zip file 2024-12-12 10:40:40 -08:00
Alex Akselrod
c5d0976375
Makefile: log to file instead of console 2024-12-12 10:40:39 -08:00
Alex Akselrod
68e9aea40d
Makefile: tune params for db-instance for postgres itests 2024-12-12 10:40:38 -08:00
Alex Akselrod
780c271b80
sqldb: improve serialization error handling 2024-12-12 10:40:37 -08:00
Alex Akselrod
c01dcc2be7
graph/db: handle previously-unhandled errors 2024-12-12 10:40:36 -08:00
Alex Akselrod
c29fb81d1b
batch: handle serialization errors correctly 2024-12-12 10:40:36 -08:00
Alex Akselrod
211dd21082
itest: fix flake in multi-hop payments
To make this itest work reliably with multiple parallel SQL
transactions, we need to count both the settle and final HTLC
events. Otherwise, sometimes the final events from earlier
forwards are counted before the forward events from later
forwards, causing a miscount of the settle events. If we
expect both the settle and final event for each forward,
we don't miscount.
2024-12-12 10:40:35 -08:00
Alex Akselrod
a0e5a14574
log: add sub-logger for kvdb/sqlbase 2024-12-12 10:40:34 -08:00
Alex Akselrod
f3bb7095b2
Reapply "kvdb/postgres: remove global application level lock"
This reverts commit 67419a7c0c.
2024-12-12 10:40:33 -08:00
Alex Akselrod
3cebd370de
go.mod: use local kvdb to reapply removal of global postgres lock 2024-12-12 10:40:33 -08:00
Alex Akselrod
bf16b54f87
go.mod: update btcwallet to latest to eliminate waddrmgr deadlock 2024-12-12 10:40:32 -08:00
Oliver Gugger
6298f76aca
Merge pull request #9309 from yyforyongyu/fix-unit-test
chainntnfs: fix `TestHistoricalConfDetailsTxIndex`
2024-12-12 18:01:54 +01:00
Oliver Gugger
55b685dbd7
Merge pull request #9347 from lightningnetwork/cross-compile-fix
build/ci: attempt to fix failing cross compile step
2024-12-12 17:47:50 +01:00
Oliver Gugger
fdb43c0b7b
Merge pull request #9348 from ziggie1984/update-goveralls
github: update goveralls tool
2024-12-12 12:36:13 +01:00
ziggie
c6bdbbe222
github: update goveralls tool
The goverall tool had a bug regarding the module versioning of
golang packages see also
https://github.com/mattn/goveralls/pull/222 for more background.
Goveralls is wrapped by another library to make it available for
github actions. So the relevant PR which is referenced here in
LND is:
https://github.com/shogo82148/actions-goveralls/pull/521.
2024-12-12 10:38:01 +01:00
Oliver Gugger
c022284f37
GitHub+make: run cross compile in matrix
This is just a test, perhaps this doesn't make any sense at all as it
will clog up too many build runners.
2024-12-12 10:09:30 +01:00
Oliver Gugger
66c3a46e4c
GitHub: allow not caching the Golang build cache
This is a tradeoff of disk space (and with that cache size) and
compilation speed. Because we're still running into disk full errors
with the full build cache, we remove it for the cross compile step.
Which means we'll do more work each time.
2024-12-12 10:09:30 +01:00
Oliver Gugger
e68b2ad015
Merge pull request #9341 from ellemouton/fnContext
fn: Remove ctx from GoroutineManager constructor
2024-12-12 10:03:01 +01:00
Oliver Gugger
4ee36e3762
scripts: update Roasbeef's key ID in verify-install.sh
This was overlooked in #9206.
We're updating to the parent key ID
A5B61896952D9FDA83BC054CDC42612E89237182.

cat scripts/keys/roasbeef.asc| gpg --with-colons --import-options show-only --import                                                                   ─╯
pub:-:255:22:DC42612E89237182:1729552568:::-:::scESCA:::::ed25519:::0:
fpr:::::::::A5B61896952D9FDA83BC054CDC42612E89237182:
uid:-::::1729552794::8D805FB762825ECBDA00EB0AF5FEDF76DE288546::Olaoluwa Osuntokun <laolu32@gmail.com>::::::::::0:
sub:-:255:18:19E88A946BEF6D65:1729552568:1761088568:::::e:::::cv25519::
fpr:::::::::70206BBE2C0A81EC381A212C19E88A946BEF6D65:
sub:-:255:22:966072F65DF1D016:1729552672:1761088672::::🅰️::::ed25519::
fpr:::::::::98E3632DC026406855001E22966072F65DF1D016:
sub:-:255:22:90525F7DEEE0AD86:1729552758:1761088758:::::s:::::ed25519::
fpr:::::::::296212681AADF05656A2CDEE90525F7DEEE0AD86:
2024-12-12 09:50:25 +01:00
Elle Mouton
37bb082f20
docs: add release notes entry 2024-12-12 09:32:57 +02:00
Elle Mouton
51eeb9ece3
fn: Remove ctx from GoroutineManager constructor 2024-12-12 09:32:57 +02:00
Olaoluwa Osuntokun
d6eeaec246
Merge pull request #8512 from lightningnetwork/rbf-coop-fsm
[3/4] - lnwallet/chancloser: add new protofsm based RBF chan closer
2024-12-11 00:57:46 +01:00
Olaoluwa Osuntokun
3c5f96de7c
lnwallet/chancloser: enable custom payer for rbf coop close
In this commit, we enable a custom payer for the rbf coop close. This
allows us to ensure that the party that started one side of the close
flow pays the fees.
2024-12-10 23:07:03 +01:00
Olaoluwa Osuntokun
d38c5e6222
lnwallet: update core coop close logic with custom payer
In this commit, we update the core coop close logic with the new custom
payer param. We also expand the existing unit tests to ensure that the
fee is deducted from the proper party.
2024-12-10 23:07:02 +01:00
Olaoluwa Osuntokun
d1b2bff2c8
lnwallet: update CoopCloseBalance to allow a paying party
This preps us for an upcoming change to the rbf coop state machine where
either party can pay for the channel fees. We also add a new test to
make sure the new function adheres to some key properties.
2024-12-10 23:07:02 +01:00
Olaoluwa Osuntokun
b8cf5ae98f
lnwallet: for rbf coop close, log the close tx 2024-12-10 23:07:02 +01:00
Olaoluwa Osuntokun
b94ce6fa08
lnwallet: use custom LockTime for rbf coop close 2024-12-10 23:07:02 +01:00
Olaoluwa Osuntokun
ab4297e127
lnwallet/chancloser: use block height as lock time for rbf-coop 2024-12-10 23:07:02 +01:00
Olaoluwa Osuntokun
540d3c0fc7
multi: switch to lock time from sequence for coop close v2 2024-12-10 23:07:01 +01:00
Olaoluwa Osuntokun
2decea86d8
lnwallet/chancloser: add unit tests for new rbf coop close 2024-12-10 23:07:01 +01:00
Olaoluwa Osuntokun
6b90254fd3
lnwallet/chancloser: create a MsgMapper for the protofsm rbf close
This'll allow us to treat the state machine as a MsgEndpoint, and have
the readHandler in the peer automatically send new messages to it.
2024-12-10 23:07:01 +01:00
Olaoluwa Osuntokun
e47a632745
lnwallet/chancloser: add state transitions for new protofsm rbf closer
In this commit, we add the state transitions for the new protofsm based
RBF chan closer. The underlying protocol is a new asymmetric co-op close
process, wherein either side can initiate a chan closer, and use their
settled funds to pay for fees within the channel.
2024-12-10 23:07:01 +01:00
Olaoluwa Osuntokun
f6525c9e7d
lnwallet: add ability to specify custom sequence for co-op close tx
In this commit, we add the ability to specify a custom sequence for a
co-op close tx. This'll come in handy later as the new co-op close
process allows a party to set a custom sequence.
2024-12-10 23:07:01 +01:00
Olaoluwa Osuntokun
62a3db1cc2
lnwallet/chancloser: add states for new protofsm rbf closer
In this commit, we add the initial set of states for the new protofsm
based rbf chan closer. A diagram outlining the new states and their
transitions can be found here:
https://gist.github.com/Roasbeef/acc4ff51b9dff127230228a05553cdfe.

Unlike the existing co-op close process, this co-op close can be
restarted at anytime if either side sends a shutdown message. From
there, we'll each obtain a new RBF'd version that can be re-broadcasted.

This commit creates the set of states, along with the environment that
our state machine will use to drive itself forward.
2024-12-10 23:07:01 +01:00
Olaoluwa Osuntokun
4791fc6082
protofsm: eliminate outer option layer in EmmittedEvent
We'll have the empty slice tuple represent the None case instead.
2024-12-10 23:06:59 +01:00
Oliver Gugger
7a3401555c
Merge pull request #9316 from ziggie1984/fix-blindedpath-mc
routing: fix mc blinded path behaviour.
2024-12-10 20:22:15 +01:00
ziggie
101311debb
docs: fix typos in release-notes 19.0 2024-12-10 19:05:49 +01:00
ziggie
2610663658
docs: add release-notes for 18.4 2024-12-10 19:05:49 +01:00
ziggie
decfdb68ac
routing: bugfix for mc reporting of blinded paths
When reporting an error  or a success case of a payment to a
blinded paths, the amounts to forward for intermediate hops
are set to 0 so we need to use the receiver amount instead.
2024-12-10 19:05:49 +01:00
ziggie
9327940ac4
routing: add pathfinding test
We add a test where we add duplicate hops in a route and verify
that the pathfinding engine can handle this edge case.
2024-12-10 19:05:49 +01:00
ziggie
3cec72ae9c
routing: improve lasthoppaylaod size calculation
Fixes a bug and makes the function more robust. Before
we would always return the encrypted data size of last hop
of the last path. Now we return the greatest last hop payload
not always the one of the last path.
2024-12-10 19:05:49 +01:00
ziggie
e47024b790
routing: Use NUMS point for blinded paths
To be able to do MPP payment to multiple blinded routes we need
to add a constant dummy hop as a final hop to every blined path.
This is used when sending or querying a blinded path, to let the
pathfinder be able to send MPP payments over different blinded
routes. For this dummy final hop we use a NUMS key so that we
are sure no other node can use this blinded pubkey either in a
normal or blinded route.
Moreover this helps us handling the mission control data for
blinded paths correctly because we always consider the blinded
pubkey pairs which are registered with mission control when
a payment to a blinded path fails.
2024-12-10 19:05:49 +01:00
Oliver Gugger
8c9de4d605
Merge pull request #9345 from ziggie1984/add-copy-method
Add a deep copy generic harness to the internal fn package
2024-12-10 17:25:46 +01:00
ziggie
e8ee087cbc
fn: add deep copy interface. 2024-12-10 14:10:33 +01:00
yyforyongyu
5867f0040f
gomod: update btcd for shutdown fix 2024-12-10 19:56:03 +08:00
yyforyongyu
f03e242515
chainntnfs: ensure previous test succeeded before running 2024-12-10 19:56:01 +08:00