Commit Graph

18946 Commits

Author SHA1 Message Date
Oliver Gugger
5398229079 Merge branch '0-19-2-branch-rc1-10004' into 0-19-2-branch-rc1 2025-07-01 20:08:26 +02:00
Elle Mouton
2a578737f6 server: ensure newer node announcement timestamp
On startup, we currently blindly overwrite our node announcement info
for our source node. This includes overwriting the existing LastUpdate
timestamp. This can cause an issue with our new SQL backends in the case
that the new timestamp is not greater than the previously written
timestamp. So here, we first fetch the source node and make sure to use
a timestamp that is greater than the previosly set one.
2025-07-01 20:08:15 +02:00
Elle Mouton
9b877b94c3 multi: use the "errors" package everywhere
Replace all usages of the "github.com/go-errors/errors" and
"github.com/pkg/errors" packages with the standard lib's "errors"
package. This ensures that error wrapping and `errors.Is` checks will
work as expected.
2025-07-01 20:08:12 +02:00
Oliver Gugger
72d4ae0faa Merge branch '0-19-2-branch-rc1-10009' into 0-19-2-branch-rc1 2025-07-01 08:46:29 +02:00
Elle Mouton
4efcb075de discovery: fix log line panic
If a method returns an error, we should assume all other parameters to
be nil unless the documentation explicitly says otherwise. So here, we
fix a log line where a dereference is made to an object that will be nil
due to an error being returned.
2025-07-01 08:46:28 +02:00
Oliver Gugger
d90781e36a Merge branch '0-19-2-branch-rc1-9996' into 0-19-2-branch-rc1 2025-06-27 12:32:33 +02:00
Calvin Zachman
a3e36133af docs: update release notes 2025-06-27 12:32:33 +02:00
Calvin Zachman
09bcce5ba5 chainreg: use new lseed service
This points lnd at the new deployment of the lseed
service used to provide candidate peers during initial
network bootstrap.
2025-06-27 12:32:32 +02:00
Oliver Gugger
bc982499bd Merge branch '0-19-2-branch-rc1-9978' into 0-19-2-branch-rc1 2025-06-26 08:49:21 +02:00
ziggie
d7b79eff38 lnd: improve code comment 2025-06-26 08:49:10 +02:00
ziggie
78313e3436 lnd: rename removePeer to removePeerUnsafe
rename `removePeer` to highlight that the mutex has to be acquired
before calling it.
2025-06-26 08:49:10 +02:00
ziggie
a656f2c8a6 docs: add release-notes 2025-06-26 08:49:08 +02:00
ziggie
67e7e29413 multi: fix deadlock in p2p race condition
In case we cannot guarantee that the peers has started up
completely we launch the disconnect method asynchronously.
2025-06-26 08:48:39 +02:00
Oliver Gugger
ddbd2e0c34 Merge branch '0-19-2-branch-rc1-9989' into 0-19-2-branch-rc1 2025-06-25 14:57:30 +02:00
Slyghtning
45b26cf2d4 docs: update release notes 2025-06-25 14:57:18 +02:00
Slyghtning
2937837fc0 chainfee: method to round up the fee for a given transaction weight 2025-06-25 14:56:47 +02:00
Oliver Gugger
911fbae52f Merge branch '0-19-2-branch-rc1-9991' into 0-19-2-branch-rc1 2025-06-25 14:52:07 +02:00
ziggie
3565df870b routerrpc: rename var and add more comments 2025-06-25 14:52:06 +02:00
ziggie
4f72354385 routerrpc: add log line for probing the invoice request 2025-06-25 14:52:06 +02:00
Oliver Gugger
4afa5e44b3 Merge branch '0-19-2-branch-rc1-9973' into 0-19-2-branch-rc1 2025-06-24 18:24:22 +02:00
ZZiigguurraatt
397984a9f2 sqldb: clarify native sql options 2025-06-24 18:24:21 +02:00
Olaoluwa Osuntokun
b48e2763a7 docs/release-notes: update release notes w/ all contributors and notes 2025-06-23 16:20:57 -07:00
Olaoluwa Osuntokun
a50a52865e Merge branch '0-19-2-branch-rc1-9945' into 0-19-2-branch-rc1 2025-06-23 16:20:27 -07:00
ziggie
970f789e85 docs: add release-notes 2025-06-23 16:20:27 -07:00
ziggie
988e78177a multi: Add decayedlog db migration code
This commit adds the migration code for the decayedlog db which
is optional and will default to true.
2025-06-23 16:20:27 -07:00
ziggie
684da273b0 channeldb: update optional migration code for multiple versions 2025-06-23 16:20:27 -07:00
ziggie
ef5ae79623 channeldb: add migration34
Migration34 garbage collects the decayed log database. This commit
only adds the migration code and does not use it.
2025-06-23 16:20:27 -07:00
Olaoluwa Osuntokun
bcd854cbf9 Merge branch '0-19-2-branch-rc1-9880' into 0-19-2-branch-rc1 2025-06-20 15:51:11 -07:00
yyforyongyu
f7af9701cc config: update docs for num-restricted-slots 2025-06-20 15:50:45 -07:00
yyforyongyu
da13c7ab66 lnd: remove peer from peerChanInfo when necessary
We now remove the peer from `peerChanInfo` if this peer doesn't have
channels with us. Also patched a unit test for `removePeerAccess`.
2025-06-20 15:50:45 -07:00
yyforyongyu
ceeb123925 channeldb+lnd: rename peerCounts to peerChanInfo for clarity 2025-06-20 15:50:45 -07:00
yyforyongyu
a8d1985fd6 funding+lnd: make sure accessman won't interrupt funding flow
If there's an error occured when updating the peer's status after the
channel status is changed, we now make sure we log the error instead of
letting it interrupt the channel open/close flow.
2025-06-20 15:50:45 -07:00
yyforyongyu
107b74d81d accessman+lnd: rename checkIncomingConnBanScore for clarity 2025-06-20 15:50:45 -07:00
yyforyongyu
c23c90ee9b docs: add release notes for improved accessman 2025-06-20 15:50:44 -07:00
yyforyongyu
c4116e1438 itest+lntest: add more itest for accessman 2025-06-20 15:50:25 -07:00
yyforyongyu
0b0513d88c accessman: make sure to decrement PendingOpenCount 2025-06-20 15:50:25 -07:00
yyforyongyu
d9e3412ed5 accessman: skip incrementing num of slots for existing peer
When a peer is already existing, we should skip incrementing the
`numRestricted` count.

Also patched unit test for method `addPeerAccess`.
2025-06-20 15:50:25 -07:00
yyforyongyu
d170ef3efe lnd: add string representation for peerAccessStatus 2025-06-20 15:50:25 -07:00
yyforyongyu
bd99924383 lnd: only restrict slots for inbound connections
For outbound connections, since they are initialized by the users, we
can relax on the restriction. A future global limit may be added - as
for now, we will let them to be managed by the users.
2025-06-20 15:50:25 -07:00
yyforyongyu
bc6008f854 lnd: move peer perms assignment into peerConnected
When the callback is called in `scheduledPeerConnection`, it is
referencing the old `access` variable which was created when the peer
was first connected. However, if this peer opens a channel with us and
goes offline, or another inbound connection is made from this peer, we
may still use the old `access` value. To fix it, we need to make sure we
always get the fresh perm by calling `assignPeerPerms` inside
`peerConnected`.
2025-06-20 15:50:25 -07:00
yyforyongyu
89a819db46 accessman: reduce lock span by excluding ctx 2025-06-20 15:50:25 -07:00
yyforyongyu
a0439155d4 accessman+lnd: check if a peer is found in peerScores
We need to also check this map to make sure the peer exists or not.
2025-06-20 15:50:25 -07:00
yyforyongyu
b527f19de7 accessman: skip restriction for existing peers
When a peer already has a connection with us, there's no need to check
for available slots as we will either close the old conn or refuse the
new conn.
2025-06-20 15:50:25 -07:00
yyforyongyu
5dfc5f4b42 lncfg+lnd: add new dev config unsafeconnect
This flag is added so we can use it in the itest to mimic racing inbound
and outbound connections.
2025-06-20 15:50:25 -07:00
yyforyongyu
7981b3b4de lncfg: fix typo 2025-06-20 15:50:25 -07:00
Olaoluwa Osuntokun
ba94755dfd Merge branch '0-19-2-branch-rc1-9929' into 0-19-2-branch-rc1 2025-06-20 15:49:04 -07:00
yyforyongyu
68cc4bc208 docs: update release notes 2025-06-20 15:49:04 -07:00
yyforyongyu
69df66f1f9 htlcswitch: skip decoding hop if the htlc is already acked
We now move the check earlier in the loop so we don't even need to
decode the hop for already processed ADDs.
2025-06-20 15:49:04 -07:00
yyforyongyu
13308644d0 htlcswitch: remove batchReplayBkt
This commit removes the `batchReplayBkt` as its only effect is to allow
reforwarding htlcs during startup.

Normally for every incoming htlc added, their shared secret is used as
the key to be saved into the `sharedHashBucket`, which will be used for
check for replays. In addition, the fwdPkg's ID, which is SCID+height is
also saved to the bucket `batchReplayBkt`. Since replays of HTLCs cannot
happen at the same commitment height, when a replay happens,
`batchReplayBkt` simply doesn't have this info, and we again rely on
`sharedHashBucket` to detect it. This means most of the time the
`batchReplayBkt` is a list of SCID+height with empty values.

The `batchReplayBkt` was previously used as a mechanism to check for
reforwardings during startup - when reforwarding htlcs, it quries this
bucket and finds an empty map, knowing this is a forwarding and skips
the check in `sharedHashBucket`. Given now we use a bool flag to
explicitly skip the replay check, this bucket is no longer useful.
2025-06-20 15:49:04 -07:00
yyforyongyu
c8ff379a9c htlcswitch: exit early if the fwdPkg is already completed 2025-06-20 15:49:04 -07:00