Commit Graph

19864 Commits

Author SHA1 Message Date
ziggie
335a9b3f40 lnd: reduce max limit when querying for payments 2025-09-05 09:54:00 +02:00
ziggie
a9c30dacb5 sqldb: add helper for type boolean 2025-09-05 09:53:59 +02:00
ziggie
2d032044f9 sqldb: Make sure we do not replace keywords if they have a prefix
We don't for example want to replace CURRENT_TIMESTAMP when using
it in our tables.
2025-09-05 09:52:41 +02:00
ziggie
e20a34de46 paymentsdb: refactor attempt verification 2025-09-05 09:52:41 +02:00
ziggie
0320dfcc89 paymentsdb: add compile time check for the kv db implementation 2025-09-05 09:52:40 +02:00
ziggie
3d4ee8b874 paymentsdb: rename defaultKVStoreOptions func
We rename the modifier to use the same naming as used in the
graphDB to align the codebase.
2025-09-05 09:52:40 +02:00
Elle
9d74ec4770 Merge pull request #10163 from ellemouton/graphMigFlipSwitch
multi: switch on graph SQL migration
2025-09-05 06:54:30 +02:00
Yong
ab924be037 Merge pull request #10197 from bhandras/wallet-create-warning
commands: add extra warning on wallet creation
2025-09-05 08:08:03 +08:00
Elle Mouton
318f4aa863 docs: add release note entry 2025-09-04 18:52:00 +02:00
Elle Mouton
9ce14371e1 multi: switch on graph SQL migration
In this commit, the graph SQL migration is added to the production
build.
2025-09-04 18:52:00 +02:00
Elle
3751d7a6b6 Merge pull request #10199 from ellemouton/fixBuild
graph/db: fix type name
2025-09-04 18:50:12 +02:00
Elle Mouton
f2fa0a4da6 graph/db: fix type name 2025-09-04 17:10:44 +02:00
Yong
e46c676894 Merge pull request #10162 from ellemouton/graphMigUnwrapDNSAddrs
graph/db: unwrap dns addresses from opaque ones during migration
2025-09-04 22:29:49 +08:00
Andras Banki-Horvath
ac18094a09 commands: add extra warning on wallet creation 2025-09-04 15:21:28 +02:00
Elle
d9647f8b79 Merge pull request #10193 from ellemouton/fixSQLStrHelper
sqldb: fix SQLStr helper
2025-09-04 12:07:25 +02:00
Yong
d08afa3ea6 Merge pull request #10185 from ellemouton/renameLightningNode
multi: Rename LightningNode to Node
2025-09-04 10:01:10 +08:00
Olaoluwa Osuntokun
33406bc6f8 build: make special label checks auto-pass instead of skip
In this commit, we revamp the way our skip-labels worked to instead mark
certain stages as green, instead of skipping them. Skipped changes
didn't count towards the set of required checks, which slowed down PR
velocity.

Previously, when PRs were labeled with 'no-itest' or 'no-changelog',
the corresponding CI jobs would be completely skipped. This caused the
GitHub checks to show as skipped rather than successful, which could
be confusing and prevented certain merge rules from working properly.

This commit changes the behavior so that these jobs still run but
immediately report success when the special labels are detected. Each
affected job now starts with a label check step that sets a skip
flag, and all subsequent steps are conditionally executed based on
this flag. When skipped, the jobs add a notice to the GitHub step
summary explaining that tests were auto-passed due to the label.

The change affects five jobs: basic-integration-test, integration-test,
windows-integration-test, macos-integration-test, and milestone-check.
2025-09-03 16:09:31 -07:00
Elle Mouton
40b279687f sqldb: add SQLStrValid helper
The SQL* helpers are meant to always set the `Valid` field of the
sql.Null* type to true. Otherwise they cannot be used to set a valid,
empty field. However, we dont want to break the behaviour of the
existing SQLStr helper and so this commit adds a new helper with the
desired functionality.
2025-09-03 15:46:11 +02:00
Elle Mouton
6e98b336f6 graph/db+channeldb: rename test helper 2025-09-03 10:14:35 +02:00
Elle Mouton
330f697937 graph: rename HasLightningNode
to HasNode
2025-09-03 10:14:35 +02:00
Elle Mouton
7a1b548e07 graph/db: rename DeleteLightningNode
to DeleteNode
2025-09-03 10:14:35 +02:00
Elle Mouton
cd3bd05810 multi: rename FetchLightningNode
to FetchNode
2025-09-03 10:14:35 +02:00
Elle Mouton
060219780b multi: rename AddLightningNode methods
to AddNode
2025-09-03 10:14:35 +02:00
Elle Mouton
c663a557c4 multi: rename models.LightningNode to models.Node 2025-09-03 10:14:35 +02:00
Elle Mouton
a74f0b133a graph/db: expand test comment with build tag info 2025-09-03 10:11:49 +02:00
Elle Mouton
af380c9eb1 graph/db: extract DNS addresses during SQL migration
In this commit, we take advantage of the graph SQL migration and use it
to also extract DNS addresses from the opaque address type. We use
opaque addresses to store addresses that we dont understand yet. We
recently added logic for DNS addresses and so we may have persisted node
announcements that have DNS addresses but we would currently have them
stored under the opaque address type. So we use this migration to see if
we can extract such addresses.

A few decisions were made here:
1) If multiple DNS addressees are extracted, this is ok and we continue
   to migrate the node even though this is actually invalid at a
   protocol level. We will currently check (at a higher level) that a node
   announcement only has 1 DNS address in it before we broadcast it though.
2) If an invalid DNS address is encountered (so we hit the DNS type
   descriptor but then the rest of the DNS address payload is invalid
   and cannot be parsed into the expected hostname:port, then we skip
   migrating the node completely.
2025-09-03 09:13:42 +02:00
Elle Mouton
d61a8af4c4 lnwire: re-usable address descriptor parsers
In this commit, the logic in ReadElements that is used to read a single
address descriptor from a io.Reader is separated out into a new function
so that the logic can be re-used elsewhere.
2025-09-03 08:32:37 +02:00
Elle
ea6cc8154f Merge pull request #9455 from mohamedawnallah/supportDNSHostnameInNodeAnnouncement
[1/2] discovery+lnwire: add support for DNS host name in NodeAnnouncement msg
2025-09-03 08:13:55 +02:00
Mohamed Awnallah
ad966157fc docs: add release note 2025-09-03 01:11:35 +00:00
Elle Mouton
6ef80db746 graph/db+chanbackup: dns add encoding/decoding for persistence 2025-09-03 01:11:35 +00:00
Elle Mouton
4bd2bbca27 graph/db: update test opaque addr to be valid
The first byte of an opaque addr must be one that we dont understand
yet. We do this update in preparation for doing an on-the-fly parse of
persisted opaque addrs to see if they contain addrs that we now support.
For this to work, the first byte cant be 0x01 since this maps to a known
address.
2025-09-03 01:11:35 +00:00
Elle Mouton
70b5016bc8 discovery+gossip: make sure we dont advertise node anns with bad DNS
We may have already persisted node announcements that have multiple DNS
addresses since we may have received them before updating our code to
check for this. So here we just make sure not to send these on to our
peers.
2025-09-03 01:11:35 +00:00
Elle Mouton
f0a20c9d04 netadd: split ValidatenodeAnn into sig and field checks
Check that the node ann doesnt contain more than 1 DNS addr.
This will ensure that we now start rejecting new node announcements
with multiple DNS addrs since this check is called in the gossiper
before persisting a node ann to our local graph.

It also validates the DNS fields according to BOLT #7 specs.
2025-09-03 01:11:34 +00:00
Elle Mouton
670b26ba3d lnwire: add encoding/decoding for DNS addr
Co-authored-by: Elle Mouton <elle.mouton@gmail.com>
2025-09-02 17:51:31 +00:00
Mohamed Awnallah
a0057c2026 lnwire: add DNSAddress type 2025-09-02 17:51:31 +00:00
Mohamed Awnallah
7acd6018c9 lnwire: remove AddrLen helper
In this commit, we remove `AddrLen` as prepration step
before adding DNS address type which will have a var length.

Co-authored-by: Elle Mouton <elle.mouton@gmail.com>
2025-09-02 17:51:31 +00:00
Yong
f51684dd0f Merge pull request #10103 from yyforyongyu/rate-limit-peer
Rate limit outgoing gossip bandwidth by peer
2025-09-02 23:31:29 +08:00
yyforyongyu
86a915a772 docs: update release notes 2025-09-02 21:23:08 +08:00
yyforyongyu
6d14370e8e lncfg: validate msg-burst-bytes 2025-09-02 21:23:08 +08:00
yyforyongyu
5bc4666efc multi: add new config peer-msg-rate-bytes 2025-09-02 21:23:07 +08:00
yyforyongyu
778456769a discovery: rate limiting sending msgs per peer
We now add another layer of rate limiting before sending the messages
inside `GossipSyncer`.
2025-09-02 21:23:07 +08:00
yyforyongyu
6826703c77 discovery: introduce rate limiter to GossipSyncer 2025-09-02 21:13:46 +08:00
yyforyongyu
19bc941cbd discovery: create common helper methods for rate limiter
This allows us to reuse them in the upcoming commits where we introduce
a rate limiter to the gossip syncer.
2025-09-02 21:13:46 +08:00
Yong
1666764690 Merge pull request #10136 from yyforyongyu/use-btcwallet-interface
lnwallet: use btcwallet's new interface
2025-09-02 20:46:56 +08:00
Olaoluwa Osuntokun
d5f70c0ae3 Merge pull request #10184 from ellemouton/gemini-char-wrap
.gemini: ignore char wrapping during code review
2025-09-01 23:40:06 +01:00
Yong
84b2c20ea0 Merge pull request #10167 from starius/go124
multi: bump Go to 1.24.6
2025-09-01 20:03:54 +08:00
Elle Mouton
d68d1fb355 netann: update ChanAnn2 validation to work for P2WSH channels
This commit expands the ChannelAnnouncement2 validation for the case
where it is announcing a P2WSH channel.
2025-09-01 12:10:31 +02:00
Elle Mouton
06bf0c28b6 multi: let FetchPkScript take SCID by value
Instead of a pointer.
2025-09-01 12:10:30 +02:00
Elle Mouton
b77b698b9d lnwire: update AnnounceSigs2 to use pure TLV 2025-09-01 12:10:30 +02:00
Elle Mouton
b6b764da71 lnwire+netann: update ChannelUpdate2
such that all fields are now TLV including the signature.
2025-09-01 12:10:30 +02:00