From 4aff00260d928323a0fe3f6077bc9338c4abb843 Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Mon, 29 Sep 2025 10:14:47 +0800 Subject: [PATCH 1/2] lncfg: makr `tor.v2` as deprecated --- config_test.go | 4 +++- lncfg/tor.go | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config_test.go b/config_test.go index 6383a9900..765580749 100644 --- a/config_test.go +++ b/config_test.go @@ -24,14 +24,16 @@ func TestConfigToFlatMap(t *testing.T) { cfg.DB.Etcd.Pass = testPassword cfg.DB.Postgres.Dsn = testPassword - // Set a deprecated field. + // Set deprecated fields. cfg.Bitcoin.Active = true + cfg.Tor.V2 = true result, deprecated, err := configToFlatMap(cfg) require.NoError(t, err) // Check that the deprecated option has been parsed out. require.Contains(t, deprecated, "bitcoin.active") + require.Contains(t, deprecated, "tor.v2") // Pick a couple of random values to check. require.Equal(t, DefaultLndDir, result["lnddir"]) diff --git a/lncfg/tor.go b/lncfg/tor.go index f41d7b09c..932d5dfc9 100644 --- a/lncfg/tor.go +++ b/lncfg/tor.go @@ -12,7 +12,7 @@ type Tor struct { Control string `long:"control" description:"The host:port that Tor is listening on for Tor control connections"` TargetIPAddress string `long:"targetipaddress" description:"IP address that Tor should use as the target of the hidden service"` Password string `long:"password" description:"The password used to arrive at the HashedControlPassword for the control port. If provided, the HASHEDPASSWORD authentication method will be used instead of the SAFECOOKIE one."` - V2 bool `long:"v2" description:"Automatically set up a v2 onion service to listen for inbound connections"` + V2 bool `long:"v2" description:"DEPRECATED: Tor v2 onion services are obsolete and support will be removed in v0.21.0. Use v3 instead." hidden:"true"` V3 bool `long:"v3" description:"Automatically set up a v3 onion service to listen for inbound connections"` PrivateKeyPath string `long:"privatekeypath" description:"The path to the private key of the onion service being created"` EncryptKey bool `long:"encryptkey" description:"Encrypts the Tor private key file on disk"` From dcdc97c70ff87d7d83f588a7b9dece9a2f4848ef Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Mon, 29 Sep 2025 10:23:11 +0800 Subject: [PATCH 2/2] docs: add release note for `tor.v2` deprecation --- docs/release-notes/release-notes-0.20.0.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/release-notes/release-notes-0.20.0.md b/docs/release-notes/release-notes-0.20.0.md index 631ede8c7..26e45114b 100644 --- a/docs/release-notes/release-notes-0.20.0.md +++ b/docs/release-notes/release-notes-0.20.0.md @@ -252,6 +252,10 @@ reader of a payment request. `QueryRoutes` RPC. This [transition](https://github.com/lightningnetwork/lnd/pull/10057) allows us to specify more than one outgoing channel the pathfinder should use when finding a route. +* Support for Tor v2 onion services is deprecated and will be removed in + v0.21.0. The `--tor.v2` configuration option is now + [hidden](https://github.com/lightningnetwork/lnd/pull/10254). + # Technical and Architectural Updates ## BOLT Spec Updates