Commit Graph

17071 Commits

Author SHA1 Message Date
Oliver Gugger
d0d397545a
Merge pull request #9026 from ziggie1984/bugfix-minHTLC-blindedpath
blindedpath: Minor bug fixes and feature addition.
2024-08-23 03:07:46 -06:00
ziggie
816b25e2ba
docs: add release-notes. 2024-08-22 19:09:43 +02:00
ziggie
25f7b1c362
blindedpath: minHTLC for blinded path change.
We will not add a buffer to the chan policy for blinded paths in case
the sender amount violates the minHTLC restriction in the first place.

Moreover we disgard a route fast if the payment amount is smaller than
the minHTLC along the route.
2024-08-22 19:09:43 +02:00
ziggie
73984964a8
blindedpath: fix log output. 2024-08-22 17:48:27 +02:00
ziggie
5d7113ac1d
blindedpath: remove blockexpiry check.
Removes a check where we would NOT allow to create a blinded invoice
with an expiry (invoice expiry in seconds considered as block time)
lower than the min_final_ctlv_delta.
2024-08-22 17:45:45 +02:00
Olaoluwa Osuntokun
cc9e2b783e
Merge pull request #8961 from yyforyongyu/fix-leaseoutput
Improve the performace of `LeaseOutput`
2024-08-21 16:31:26 -07:00
Oliver Gugger
a028064fa7
Merge pull request #9007 from Roasbeef/go-1-22
build: set min build version to Go 1.22.6
2024-08-20 12:27:02 -06:00
Oliver Gugger
3ae6553eef
.golangci: fix config, update new-from-rev 2024-08-20 19:14:44 +02:00
Oliver Gugger
e99e6662cf
multi: update linter, fix new issues 2024-08-20 19:14:44 +02:00
Oliver Gugger
9eef428e77
.golangci: remove or rename old and deprecated linters 2024-08-20 19:13:23 +02:00
Olaoluwa Osuntokun
19b5a1fb05
build: set min build version to Go 1.22.6
Go 1.23 was released this week, so with this PR we update the build
system to officially support the last two releases.
2024-08-20 19:13:23 +02:00
Olaoluwa Osuntokun
b4693b2010
Merge pull request #9011 from ziggie1984/fix-gossip-syncer
Fix TimeStamp issue in the Gossip Syncer
2024-08-19 16:58:52 -07:00
ziggie
fc5b763ab6
docs: update release-notes. 2024-08-17 04:29:58 +02:00
ziggie
e5d7a7d371
discovery: add detailed comment.
Describe why it is ok to resurrect zombie channels based on the
timestamp of the `ReplyChannelRange` msg although its not verifiable
data.
2024-08-17 04:29:58 +02:00
ziggie
6fb1e0c17d
multi: fix time.Time initialization.
ChanUpdate timestamps are now restircted so that they cannot be
more than two weeks into the future. Moreover channels with both
timestamps in the ReplyChannelRange msg either too far in the past
or too far in the future are not queried.

Moreover fix unitests.
2024-08-17 04:29:57 +02:00
Olaoluwa Osuntokun
8ac184a911
Merge pull request #8520 from lightningnetwork/peer-msg-router
[2/4] - peer: add new abstract message router
2024-08-16 14:57:44 -07:00
Olaoluwa Osuntokun
7c24e33614
Merge pull request #8996 from ProofOfKeags/dual
[MICRO]: lntypes: Add Dual[A] primitive type
2024-08-16 14:47:39 -07:00
Keagan McClelland
34f7c31dc8
lntypes: Add Dual[A] primitive type
This commit introduces a new type Dual[A] to make it easier to
manage symmetric configurations or state for lightning channels.
2024-08-15 10:53:18 -07:00
ziggie
aecfe1c484
discovery: fix log line.
if we use %x here we would get the hex representation of the
String() method of the vertex, which is wrong.
2024-08-15 12:09:52 +02:00
Oliver Gugger
0aced5ce2d
Merge pull request #8857 from MPins/issue-8793
Fixing the current state update when lncli debuglevel and lncli setmccfg are called
2024-08-15 02:33:54 -06:00
Olaoluwa Osuntokun
f09c517bc6 peer: don't stop global msg router
In this commit, we fix a bug that would cause a global message router to
be stopped anytime a peer disconnected. The global msg router only
allows `Start` to be called once, so afterwards, no messages would
properly be routed.
2024-08-14 19:23:02 -07:00
Olaoluwa Osuntokun
b028af1836 multi: make MsgRouter available in the ImplementationCfg
With this commit, we allow the `MsgRouter` to be available in the
`ImplementationCfg`. With this, programs outside of lnd itself are able
to now hook into the message processing flow to direct handle custom
messages, and even normal wire messages.
2024-08-14 19:23:02 -07:00
Olaoluwa Osuntokun
927aa84b5f peer: update readHandler to dispatch to msgRouter if set
Over time with this, we should be able to significantly reduce the size
of the peer.Brontide struct as we only need all those deps as the peer
needs to recognize and handle each incoming wire message itself.
2024-08-14 19:23:02 -07:00
Olaoluwa Osuntokun
f124195ae9 msgmux: add new abstract message router
In this commit, we add a new abstract message router. Over time, the
goal is that this message router replaces the logic we currently have in
the readHandler (the giant switch for each message).

With this new abstraction, can reduce the responsibilities of the
readHandler to *just* reading messages off the wire and handing them off
to the msg router. The readHandler no longer needs to know *where* the
messages should go, or how they should be dispatched.

This will be used in tandem with the new `protofsm` module in an
upcoming PR implementing the new rbf-coop close.
2024-08-14 19:23:02 -07:00
MPins
4dda2e2c23 docs: release-notes-0.19.0.md 2024-08-14 14:44:17 -03:00
MPins
cde5c5b59d lnd: Update the DebugLevel on main cfg 2024-08-14 14:42:49 -03:00
MPins
b08e65ec85 lnd: Create a callback function (UpdatingRoutingConfig)
This callback function is called whenever the command `lncli setmccfg`
is used to change the routing settings.
2024-08-14 14:42:49 -03:00
MPins
de495534e4 routing: Call the function to update routing config on main cfg
NewMissionControl propagate the callback function defined on server.go and
SetConfig call it to update the infos on main cfg.
2024-08-14 14:42:49 -03:00
Yong
77c7f776d5
Merge pull request #9002 from Roasbeef/tlv-edge-info-bug-fix
discovery: fix bug that can lead to sending invalid chan_ann msgs
2024-08-14 23:29:36 +08:00
Olaoluwa Osuntokun
f7daa307dd
discovery: fix bug that can lead to sending invalid chan_ann msgs
Initially in lnd, we didn't store the extra TLV data that could be
dangling off of gossip messages. This was fixed initially in lnd v0.5
with this PR: https://github.com/lightningnetwork/lnd/pull/1825.

Within the PR, we incorrect set the `ExtraOpaqueData` (extra TLV blob)
of the `ChannelAnnouncement` to the value stored in `edge`, which is
actually our channel update. As 6-ish years ago we didn't yet have
anything that used the TLV gossip fields, this went unnoticed.

Fast forward to 2024, we shipped an experimental version of inbounbd
fees. This starts to store additional data in the `ExtraOpaqueData`
field, the TLV for the inbound fee. Initially, everything is valid when
the first `ChannelAnnouncement` is sent, but as soon as a user attempts
to set an inbound fee policy, we'd incorrectly swap in that new
serialized TLV for the _channel announcement_:
841e24399c (diff-1eda595bbebe495bd74a6a0431c46b66cb4e8b53beb311067c010feac2665dcbR2560).

Since we're just trying to generate a new `channel_update`, we don't
also regenerate the signature for the `channel_announcement` message. As
a result, we end up storing a `channel_announcement` with an invalid sig
on disk, continuing to broadcast that to peers.
2024-08-13 19:39:16 -07:00
Olaoluwa Osuntokun
c0420fe67d
Merge pull request #8943 from Roasbeef/alloy-linear-fee-model
docs/alloy-models: add new folder for Alloy models along w/ model for Linear Fee Function bug fix
2024-08-12 19:14:56 -07:00
Oliver Gugger
2f2efc7824
Merge pull request #8843 from ziggie1984/bumpforceclosefee-rpc
bumpforceclosefee rpc
2024-08-12 06:04:53 -06:00
ziggie
08aba8ce31
docs: add release notes. 2024-08-09 19:41:27 +02:00
ziggie
22b504db7c
sweep: add TODO to the sweeper behavior.
Make sure we only trigger the sweep of a specific input when
updating its fee parameters not the all the current pending
registered sweeps.
2024-08-09 19:41:27 +02:00
ziggie
2d04813dc3
itest: Add itest for bumpclosefeerate rpc.
Add an itest which will bump the close fee rate of an anchor
channel which is force closed without having any HTLCs at stake.
2024-08-09 19:41:27 +02:00
ziggie
ae28f75557
miner: bugfix
return the transaction when found in the mempool.
2024-08-09 19:41:26 +02:00
ziggie
75f6622ccf
itest: remove unused LEGACY channel code.
Legacy Channel types are not tested anymore via the multi-hop
test harness, therefore we can remove unused code.
2024-08-09 18:54:57 +02:00
ziggie
07b18c1c86
multi: add bumpforceclosefee rpc endpoint.
Add a new bumpforceclosefee rpc endpoint to the wallet server.
Move the logic from the lncli level to the wallet server rpc level.
This is more in line with a proper client-server design.

wallet lncli: use new bumpforceclosefee endpoint.

Besides using the new bumpforceclosefee rpc endpoint we also enable the
bumping of taproot anchor channels.
2024-08-09 18:54:56 +02:00
yyforyongyu
363e529f9b
docs: update release notes 2024-08-09 22:01:57 +08:00
yyforyongyu
8259e0fb5f
itest: remove redundant call to ht.WaitForBlockchainSync
This check has already been done when mining blocks.
2024-08-09 22:01:57 +08:00
yyforyongyu
3e36adf476
mulit: remove ListLeasedOutputs in LeaseOutput
This commit removes the call toe `ListLeasedOutputs` in `LeaseOutput` -
the returned info from `ListLeasedOutputs` can easily be accessed via
`FetchInputInfo` and this info is only used at one callsite.
`ListLeasedOutputs` then becomes unnecessary here, plus it's very slow
and needs to be refactored in `btcwallet` instead.
2024-08-09 22:01:57 +08:00
yyforyongyu
f70c919164
lnrpc: fetch utxo info in lockInputs
This commit prepares the following commit where we change the
`LeaseOutput` to be more efficient.
2024-08-09 22:01:57 +08:00
yyforyongyu
b17db4a32a
lntest+lnwallet: remove the method FetchInputInfo
This method is no longer used. In addition, the `Derivation` field on
the `Utxo` is also removed to avoid nil dereference.
2024-08-09 22:01:56 +08:00
yyforyongyu
d7381ce3fe
rpcserver: remove redundant call to FetchInputInfo 2024-08-09 22:01:56 +08:00
yyforyongyu
aba8507b2a
lnrpc+lnwallet: replace FetchInputInfo with new methods
This commit replaces the usage of `FetchInputInfo` with
`FetchOutpointInfo` and `FetchDerivationInfo` to remove unncessary
fetching of the derivation path.
2024-08-09 21:51:18 +08:00
yyforyongyu
9801ee036b
lnwallet+lntest: add FetchOutpointInfo and FetchDerivationInfo 2024-08-09 21:51:17 +08:00
yyforyongyu
8f35612364
mod: update btcwallet version 2024-08-09 21:51:15 +08:00
Olaoluwa Osuntokun
57a5e4912b
Merge pull request #8994 from ellemouton/rbMicroFixes
Rb micro fixes
2024-08-08 11:17:16 -07:00
Elle Mouton
ab28cde240
routing: correct initial finalPaddedSize
This purely affects logging. This makes sure that the `padStat`
finalPaddedSize field is initilised correctly with the given minSize.
2024-08-08 16:46:04 +02:00
Elle Mouton
5e84ba92af
multi: add IsBlinded to lnrpc.Invoice for nicer UX
The BlindedPathConfig struct is nice for invoice creation but when we
use the Invoice message for viewing an invoice, it would be nicer to see
an "is_blinded" field.
2024-08-08 16:46:01 +02:00