20399 Commits
Author SHA1 Message Date
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
Boris Nagaev e4313eba85 docs: add release notes entry
Also fixed a typo in release notes.
2025-11-06 23:01:54 -03:00
Boris Nagaev 9520a390ed chainrpc: return Unavailable while notifier starts
From v0.20.0-rc3 (commit c6f458e478) onward
the ChainNotifier sub-server may still be initialising when clients attempt
to subscribe, currently resulting in a gRPC Unknown error with a plain-text
message. Change the notifier RPC endpoints to return codes.Unavailable instead
so clients can reliably interpret the condition as "retry later" and handle
the startup lag without unstable string matching.
2025-11-06 21:58:46 -03: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
Olaoluwa Osuntokun 06c7d60452 discovery: fix endless loop in gossip syncer on context cancellation
This commit fixes a critical bug where the channelGraphSyncer goroutine
would enter an endless loop when context cancellation or peer disconnect
errors occurred during the syncingChans or queryNewChannels states.

The root cause was that state handler functions (handleSyncingChans and
synchronizeChanIDs) did not return errors to the main goroutine loop.
When these functions encountered fatal errors like context cancellation,
they would log the error and return early without changing the syncer's
state. This caused the main loop to immediately re-enter the same state
handler, encounter the same error, and loop indefinitely while spamming
error logs.

The fix makes error handling explicit by having state handlers return
errors. The main channelGraphSyncer loop now checks these errors and
exits cleanly when fatal errors occur. We return any error (not just
context cancellation) because fatal errors can manifest in multiple
forms: context.Canceled, ErrGossipSyncerExiting from the rate limiter,
lnpeer.ErrPeerExiting from Brontide, or network errors like connection
closed. This approach matches the error handling pattern already used in
other goroutines like replyHandler.
2025-11-03 10:44:12 -08:00
Yong c7c80730d2 Merge pull request #10334 from ziggie1984/fix-decoding-extra-tlv-data
Don't fail on invalid extra tlv data when decoding a payment
2025-11-03 22:15:37 +08:00
ziggie 870d603ce5 multi: allow invalid tlv data when decoding payment fail info
Older payments might have a invalid tlv stream, we now catch this
case and add a unit test.
2025-11-03 12:54:29 +01:00
Olaoluwa Osuntokun f938e40afe Merge pull request #10324 from Roasbeef/v-20-branch-rc3
build: bump version to v0.20 rc3
2025-10-28 16:51:30 -07:00
Yong 9f5094c98e Merge pull request #10315 from saubyk/db-migration-guide
docs: added a user guide for db migration
2025-10-29 00:49:08 +08:00
Yong 995a1e75cd Merge pull request #10314 from AbelLykens/patch-2
[docs] Typo recovery.md
2025-10-28 18:31:55 +08:00
Olaoluwa Osuntokun 0ff9c2e67f build: bump version to v0.20 rc3 2025-10-27 16:35:12 -07:00
saubyk 99745f3e60 docs: added a user guide for db migration 2025-10-27 11:55:07 -07:00
Olaoluwa Osuntokun 9a7b526c0c Merge pull request #10268 from starius/release-gnu-gzip
release.sh: make sure GNU gzip is used
2025-10-27 10:34:30 -07:00
Yong ead95de2ce Merge pull request #10312 from saubyk/release-signing-doc-url-fix
docs: fix build instructions doc url
2025-10-27 18:09:47 +08:00