Commit Graph
17834 Commits
Author SHA1 Message Date
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
ziggie df30b481c6 input: export NUMS key parser. 2024-12-09 23:08:50 +01:00
Olaoluwa Osuntokun fb429d658b Merge pull request #9330 from ProofOfKeags/update/fn2
multi: update to fn v2
2024-12-09 12:56:23 +01:00
Oliver Gugger c9ae63a5c8 Merge pull request #9338 from yyforyongyu/fix-invoice-htlcs-order
lnrpc: sort `Invoice.HTLCs` based on `HtlcIndex`
2024-12-09 08:52:54 +01:00
yyforyongyu 7374392abe lnrpc: sort Invoice.HTLCs based on HtlcIndex
So the returned HTLCs are ordered.
2024-12-07 09:54:46 +08:00
Oliver Gugger 5659c0184d Merge pull request #9337 from Guayaba221/patch-1
chore: fix typo in ruby.md
2024-12-06 14:10:51 +01:00
planetBoy ac59b06f59 Update ruby.md 2024-12-06 13:48:22 +01:00
Olaoluwa Osuntokun 366e48bced Merge pull request #9333 from guggero/aux-traffic-shaper-refactor
[custom channels]: refactor AuxTrafficManager to be used for forwarding as well
2024-12-05 21:04:11 +01:00
Olaoluwa Osuntokun 8d7f0853c7 Merge pull request #9324 from ziggie1984/non-blocking-startup-chan-arbitrator
Don't block on channel arbitator startup
2024-12-05 18:28:20 +01:00
ziggie 0004e31997 docs: add release-notes 2024-12-05 15:11:12 +01:00
ziggie 17bc8827c5 contractcourt: refactor start up of arbitrators
We decouple the state machine of the channel arbitrator from
the start-up process so that we can startup the whole daemon
reliably.
2024-12-05 15:11:12 +01:00
Oliver Gugger 86b3be71fe multi: thread through and use AuxTrafficShaper 2024-12-05 12:39:34 +01:00
Oliver Gugger a2e78c3984 htlcswitch: thread through packet's inbound wire records
For calculating the available auxiliary bandwidth of a channel, we need
access to the inbound custom wire records of the HTLC packet, which
might contain auxiliary information about the worth of the HTLC packet
apart from the BTC value being transported.
2024-12-05 12:39:33 +01:00
Oliver Gugger 117c6bc781 multi: move routing.TlvTrafficShaper => htlcswitch.AuxTrafficShaper
With this commit we move the traffic shaper definition from the routing
package to the HTLC switch package as a preparation for being able to
use it there as well.
At the same time we rename it to AuxTrafficShaper to be more in line
with the other auxiliary components.
2024-12-05 12:39:33 +01:00
Keagan McClelland ed2989ae33 multi: update to fn v2 2024-12-04 13:19:00 -07:00
Oliver Gugger fa309c9a0e Merge pull request #9329 from gijswijs/docs-skip-ci
clarify skipping the CI checks in the docs
2024-12-04 16:02:02 +01:00
Oliver Gugger e30e43e644 Merge pull request #9331 from yyforyongyu/fix-lll
multi: rename `lll` to `ll` and remove unused `nolint`
2024-12-04 08:48:21 +01:00
yyforyongyu d108e14c5d multi: rename lll to ll and remove unused nolint 2024-12-04 07:20:59 +08:00
Oliver Gugger 48fba10562 Merge pull request #9257 from starius/estimatefeerate-regtest2
chainreg: use feerate estimator in regtest and simnet
2024-12-03 18:56:50 +01:00
Gijs van Dam 42a1d5e22b docs: clarify skipping the CI checks
[skip ci]
2024-12-03 18:16:13 +01:00
Olaoluwa Osuntokun ff2a1a4bbb Merge pull request #9318 from guggero/cross-compile-fix
make: remove exotic build targets from release list
2024-12-03 04:47:03 -06:00
Oliver Gugger f4d5d4ed8a Merge pull request #9305 from ProofOfKeags/update/tlv-fn2
tlv: update to fn v2
2024-12-03 09:12:14 +01:00
Oliver Gugger 0c9b65578f Merge pull request #9328 from guggero/golang-min-version
docker+docs: update documentation around Golang minimum version
2024-12-02 11:22:57 +01:00
Oliver Gugger 0474b4ff20 Merge pull request #9314 from ellemouton/slog1
build+lnd+docs: start using slog and add commit_hash to log lines
2024-12-02 09:53:31 +01:00
Oliver Gugger 2fdfa26268 docs: update Golang minimum version in docs/INSTALL.md 2024-12-02 09:49:25 +01:00
Oliver Gugger 7692ced5f5 multi: update comment on changing Go version
Since we now have a scripted check that makes sure the Golang version is
synced throughout all files, it is important that the main version in
the Makefile is changed, then all other versions can be detected by that
script.
2024-12-02 09:48:26 +01:00
Elle Mouton afbb9aa41c docs: add release note entry 2024-12-02 09:23:07 +02:00