Commit Graph
19907 Commits
Author SHA1 Message Date
Nishant Bansal 36fb79ece5 docs: add release notes
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-11-13 19:34:05 +05:30
Nishant Bansal 4c3cff14f2 itest: add itest for upfront-shutdown-address config
Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-11-13 19:32:51 +05:30
Nishant Bansal e4c4d946fd multi: add new config option upfront-shutdown-address
Introduced a new config value `upfront-shutdown-address`
in the `lnd.conf` file. This ensures that channel close
funds are transferred to the specified shutdown address.
The value applies to both the funder and the fundee but
can be overridden by the value specified during
`openchannel` or by the `channel acceptor`.

NOTE: If this field is set when opening a channel with a
peer that does not advertise support for upfront shutdown
feature, the channel open will fail.

Signed-off-by: Nishant Bansal <nishant.bansal.282003@gmail.com>
2025-11-13 19:32:51 +05:30
Olaoluwa Osuntokun af6816b344 Merge pull request #10343 from lightningnetwork/0-21-0-staging
Merge branch `0-21-staging`
2025-11-12 16:34:20 -08:00
Elle Mouton 95b84a89b8 docs: update release notes 2025-11-12 22:54:06 +08:00
Elle Mouton 352b4d620a graph/db: freeze sql migration queries 2025-11-12 22:54:06 +08:00
Elle Mouton 5db82a4233 go.mod: replace local sqldb 2025-11-12 22:54:06 +08:00
Elle Mouton 125325f625 multi: freeze graph SQL migration logic
Copy over all the code that the graph SQL migration needs to a
separate folder. This will let us advance the main graph SQL CRUD code
without worrying about changing the sql migration code. It will also let
us change the SQL queries without changing the migration. In this
commit, only the migration logic is "frozen" but in an upcoming commit,
the sqlc queries & models will be frozen too.
2025-11-12 22:54:05 +08:00
Elle Mouton 07d0f0842c graph/db: remove TestPopulateViaMigration
This tests was a temporary helper to let devs test the graph SQL
migration before it was plugged in to LND. But that migration has now
shipped and so we can remove this.
2025-11-12 22:54:05 +08:00
Elle Mouton 33c3809e4b graph/db: remove outdated comment 2025-11-12 22:54:05 +08:00
Elle Mouton 855e579c3f graph: remove DB interface 2025-11-12 22:54:05 +08:00
Elle Mouton edc021f711 graph/db: simplify auth proof and edge info
Remove various unused fields and methods.
2025-11-12 22:54:05 +08:00
Elle Mouton 80e70096cb multi: add models.Node V1 constructor
Add a version field to models.Node and a V1 constructor for it.
2025-11-12 22:54:05 +08:00
Elle Mouton 8f205e2d1c multi: remove HaveNodeAnnouncement field from Node
Remove the 2 sources of truth here. If we have a signature for the
node, then we have the announcement.
2025-11-12 22:54:04 +08:00
Elle Mouton a394938dfd models: simplify models.Node
Simplify the struct by removing un-used methods and outdated comments.
2025-11-12 22:54:04 +08:00
Gijs van Dam 93c50bc69a docs: update release notes for 0.21.0 2025-11-12 22:54:04 +08:00
Gijs van Dam c37b18cf82 chore: thread context through to SendCustomMessage
The only way to unblock SendCustomMessage is if the peer activates,
disconnects or the server shuts down. This means that if the context is
cancelled, we will still wait until one of those other events happen.

With this commit we thread the context through to SendCustomMessage, so
that if the context is cancelled, we can return early. This improves the
cancellation semantics.
2025-11-12 22:54:04 +08:00
Gijs van Dam 07dc74e198 multi: endpoints for onion messages
This commit creates the necessary endpoints for onion messages.
Specifically, it adds the following:

- `SendOnionMessage` endpoint to send onion messages.
- `SubscribeOnionMessages` endpoint to subscribe to incoming onion
  messages.

It uses the `msgmux` package to handle the onion messages.
2025-11-12 22:54:04 +08:00
Gijs van Dam 2ee0702942 lnrpc: SendOnionMessage rpc endpoint 2025-11-12 22:54:04 +08:00
Gijs van Dam cb2d8abe40 lnwire: add onion message type
This message type is a message that carries an onion-encrypted payload
used for BOLT12 messages.
2025-11-12 22:54:03 +08:00
ziggie c08f918ffc paymentsdb: make verifyAttempt more robust
We now return an error when blinded and non blinded attempts are
combined. This was theoretically possible to register a legacy
attempt in combination with a blinded payment. This would have
been prevented by other checks in the code because legacy payments
are not split into shards.
2025-11-12 22:54:03 +08:00
ziggie cbfc0e0dc2 mulit: don't set customData on the lnrpc route level
We now make sure we only set the custom channel data in the
lnrpc.Route only if it contains relevant data.
2025-11-12 22:54:03 +08:00
Elle Mouton f35c295bd8 discovery: let reject cache use gossip version in key
Since the gossip protocols are completely disjoint, we need to treat
messages on the two protocols completely separately and should not let
rejections on one protocol affect how we treat messages on the other.
2025-11-12 22:54:03 +08:00
Elle Mouton b57714b00c graph/db: use lnwire.GossipVersion instead of ProtocolVersion 2025-11-12 22:54:03 +08:00
Elle Mouton ef0e6b78bb lnwire: let gossip messages implement GossipMessage 2025-11-12 22:54:03 +08:00
Elle Mouton 4d3bf6379a lnwire: define GossipVersion and GossipMessage
Define a GossipVersion enum along with a GossipMessage interface to be
satisfied by all gossip related messages. This will be useful later on
when we want to make decisions based on the protocol version that a
message is part of.
2025-11-12 22:54:02 +08:00
Elle Mouton 70054ac402 lnwire: add NodeAnnouncement interface
And ensure that both versions 1 and 2 implement it.
2025-11-12 22:54:02 +08:00
ziggie 6cc7a88e99 makefile: add linter config check 2025-11-12 22:54:02 +08:00
ziggie c324922a47 CI: remove unnecessary custom-gcl.yml file
The custom file is only needed in the tools directory.
2025-11-12 22:54:02 +08:00
ziggie b6dd3a32f7 CI: also use go tool for gosimports 2025-11-12 22:54:02 +08:00
ziggie d2d56f2968 linter: remove unsupported linters from the codebase 2025-11-12 22:54:02 +08:00
ziggie 13e7a6e782 tools: update golangci-lint to v2
The config file format changed. The tool golangci-lint migrate
was used to migrate the old config. However old comments and also
the structure of the disabled linters was preserved.

Moreover the new v2 version introduced new linters, we disable
3 of them because they are very noise and we do not really want
to check for them: funcorder, noinlineerr, embeddedstructfieldcheck.
2025-11-12 22:54:01 +08:00
ziggie f9dccd3e20 tools: use new golang 1.24 tool directive 2025-11-12 22:54:01 +08:00
Yong 04917644ff Merge pull request #10361 from Roasbeef/master-v-20-99
build: bump master version to v0.20.99
2025-11-12 22:52:04 +08:00
Yong 93ca7eda03 Merge pull request #10362 from Roasbeef/security-key-update-2025
security: update security@ PGP key
2025-11-12 22:37:12 +08:00
Olaoluwa Osuntokun 7e7bf59133 security: update security@ PGP key
The key was renewed, but the gist linked in the repo wasn't updated.
2025-11-11 14:44:50 -08:00
Olaoluwa Osuntokun 2cd17e3d2f build: bump master version to v0.20.99
This reflects the fact that master is beyond the last major release and
will be a super set of anything in the v0.20.x series.
2025-11-11 14:41:48 -08:00
Olaoluwa Osuntokun 604dbdadd2 Merge pull request #10359 from Roasbeef/release-doc
docs: create new document describing proposed release/branch management
2025-11-11 14:39:58 -08:00
Olaoluwa Osuntokun b9ea7070c2 Merge pull request #10358 from Roasbeef/v0.20.x-branch
build: bump version to v0.20.0
2025-11-11 14:36:48 -08:00
Olaoluwa Osuntokun 113aaf1607 docs: create new document describing proposed release/branch management
In this PR, we aim to create a central document that describes how we
want to drive the release process, as well as branch management going
forward.
2025-11-11 12:42:27 -08:00
Olaoluwa Osuntokun 83668fd910 build: bump version to v0.20.0 2025-11-10 15:33:25 -08:00
Yong 096ab65b1d Merge pull request #10350 from saubyk/update-pgp-key-suheb
Updated expired PGP key for Suheb
2025-11-06 20:56:04 +08:00
Yong b63a6a0c09 Merge pull request #10349 from ziggie1984/ci/enhance-expiration-date-key
refresh signing PGP key ziggie1984 - expiring at the end of november
2025-11-06 20:37:52 +08:00
saubyk 49e75a6e8b keys:updated the expired key for Suheb 2025-11-05 18:35:31 -08:00
Norbert b669494a23 keys: increase expiry of signing key
The key did not change just the meta data.
2025-11-06 01:29:34 +01:00
Olaoluwa Osuntokun aeac3380ac Merge pull request #10345 from Roasbeef/v7-rc4
build: bump version to v0.20.0-beta rc4
2025-11-05 12:25:53 -08:00
Olaoluwa Osuntokun 2ddb630a95 build: bump version to v0.7.0 rc4 2025-11-04 14:43:12 -08:00
Olaoluwa Osuntokun 4131a8e586 Merge pull request #10330 from Roasbeef/fix-error-handling-gossiper
discovery: fix potential infinite loop bug re context cancel error handling in gossip syncer
2025-11-03 11:57:51 -08:00
Olaoluwa Osuntokun adaa893f22 docs: add release notes entry 2025-11-03 10:44:14 -08:00
Olaoluwa Osuntokun b8ca876409 discovery/test: add comprehensive tests for state handler error exits
Add comprehensive test coverage to verify that state handler errors cause
the channelGraphSyncer goroutine to exit cleanly without entering endless
retry loops. These tests use mutation testing principles to ensure they
would fail if the fixes were removed.

TestGossipSyncerStateHandlerErrors is a table-driven test covering four
scenarios: context cancellation and peer disconnect during syncingChans
state, and context cancellation and network errors during queryNewChannels
state. Each test case verifies both attempt count (no endless loop) and
clean shutdown (no deadlock).

TestGossipSyncerProcessChanRangeReplyError verifies that errors from
processChanRangeReply in the waitingQueryRangeReply state cause clean
exit. This test sends multiple malformed messages and checks that only
the first is processed before the goroutine exits, using channel queue
depth to detect if the goroutine is still running.

All tests are race-detector clean and use mutation testing validation:
removing any of the error return statements causes the corresponding
tests to fail, confirming the tests properly verify the fixes.
2025-11-03 10:44:13 -08:00