Repository navigation
clightning: announce the onion port that forwards to the peer port - #358
Merged
prusnak merged 1 commit intoDec 1, 2026
Merged
Conversation
sebsgent
approved these changes
Dec 1, 2026
sebsgent
left a comment
Contributor
There was a problem hiding this comment.
LGTM, no must/should items.
Tested: merged with current master, module-config passes; with master's clightning.nix the new test fails (negative control); with no matching mapping the first mapping's port is still announced.
Assisted-by: Claude Code (Claude Opus 5.5)
Contributor
|
Reviewed No actionable findings. The lookup selects the peer-port mapping when an unrelated mapping comes first and preserves the existing first-mapping fallback when nothing matches. Validation on
GitHub CI is green for the reviewed head. Validation here was configuration-level; I did not run live Tor or VM integration tests. |
prusnak
enabled auto-merge
December 1, 2026 14:33
prusnak
approved these changes
Dec 1, 2026
clightning announced the port of the first mapping of its onion service. When another mapping came first, peers dialed a port that doesn't reach clightning. Pick the mapping to the peer port, as lnd does. Without one, fall back to the first mapping, as before. Assisted-by: Claude Code (Claude Opus 5.5)
prusnak
force-pushed
the
clightning-announce-peer-onion-port
branch
from
December 1, 2026 14:53
0de68d5 to
054f086
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With a public clightning onion service, clightning announced the port of the first mapping of the onion service. When another mapping came first, for example one added with
mkBefore, peers dialed a port that doesn't reach clightning. Now it picks the mapping to clightning's peer port, as lnd does. Without one, it falls back to the first mapping, so those configs announce the same port as before.Item 10 of #316. The new
testClightningAnnouncesPeerOnionPortcheck fails on master and when no mapping matches, andmodule-configpasses. A mapping to another address on the same port still counts, as in lnd's lookup.Claude Fable 5.2 triaged #316 and Claude Opus 5.5 wrote this. DeepSeek V4.1 Flash 1017 (max), Gemini 4 Carbon (high), Gemini 4 Neon (high), Claude Opus 5.5 (high) and GPT-6 Astra (max) reviewed it over two rounds. They found that the first test couldn't tell a match from the fallback, and that the fallback had to stay the first mapping.