WalletWasabi: When using the TOR network (with VPN), the wallet does not connect to the backend due to an SSL error

General Description

If the values are set in the wallet config:

{
    "MainNetBackendUri": "https://api.wasabiwallet.io/",
    "TestNetClearnetBackendUri": "https://api.wasabiwallet.co/",
    "UseTor": true,
}

then the wallet does not connect to the backend (TestNet) due to an SSL error

I have a system-wide VPN, because Tor is censored in the country.

How To Reproduce?

  1. Launch the wallet in daemon mode with the specified settings
  2. We see an error in the logs

Operating System

debian:bookworm-20231030 (in Docker container)

Logs

2024-02-05 05:54:10.297 [1] INFO        WasabiAppBuilder.BeforeStarting (92)    Wasabi Daemon started (2d9f6697-1056-46dc-a6b0-23e3f7b9f466).
2024-02-05 05:54:10.396 [1] INFO        FileSystemBlockRepository.Dispose (23)  .ctor finished in 16 milliseconds.
2024-02-05 05:54:10.424 [1] INFO        P2pNetwork..ctor (59)   AddressManager did not exist at `/wasabi/data/BitcoinP2pNetwork/AddressManagerTestNet.dat`. Initializing new one.
2024-02-05 05:54:10.988 [1] INFO        WalletManager.Dispose (40)      .ctor finished in 538 milliseconds.
2024-02-05 05:54:11.053 [1] INFO        IndexStore.Dispose (88) InitializeAsync finished in 59 milliseconds.
2024-02-05 05:54:11.062 [1] INFO        TransactionStore.Dispose (74)   MempoolStore.InitializeAsync finished in 7 milliseconds.
2024-02-05 05:54:11.063 [1] INFO        TransactionStore.Dispose (74)   ConfirmedStore.InitializeAsync finished in 0 milliseconds.
2024-02-05 05:54:11.064 [1] INFO        AllTransactionStore.Dispose (50)        InitializeAsync finished in 9 milliseconds.
2024-02-05 05:54:11.064 [1] INFO        BitcoinStore.Dispose (49)       InitializeAsync finished in 70 milliseconds.
2024-02-05 05:54:11.095 [6] INFO        TorProcessManager.StartProcess (336)    Starting Tor process…
2024-02-05 05:54:11.640 [6] INFO        TorProcessManager.RestartingLoopAsync (161)     Tor is running.
2024-02-05 05:54:11.642 [6] INFO        Global.StartTorProcessManagerAsync (289)        TorProcessManager is initialized.
2024-02-05 05:54:11.642 [6] INFO        Global.Dispose (285)    TorProcessManager.Start finished in 560 milliseconds.
2024-02-05 05:54:11.741 [9] INFO        HostedServices.StartAllAsync (61)       Started Wasabi Synchronizer.
2024-02-05 05:54:11.746 [10] INFO       HostedServices.StartAllAsync (61)       Started Software Update Checker.
2024-02-05 05:54:11.747 [9] INFO        HostedServices.StartAllAsync (61)       Started Bitcoin P2P Network.
2024-02-05 05:54:11.749 [9] INFO        HostedServices.StartAllAsync (61)       Started Blockstream.info Fee Provider.
2024-02-05 05:54:11.750 [9] INFO        HostedServices.StartAllAsync (61)       Started Third Party Fee Provider.
2024-02-05 05:54:11.751 [9] INFO        HostedServices.StartAllAsync (61)       Started Hybrid Fee Provider.
2024-02-05 05:54:11.755 [6] INFO        TorMonitor.MonitorEventsAsync (109)     Starting Tor bootstrap monitor…
2024-02-05 05:54:11.764 [17] INFO       HostedServices.StartAllAsync (61)       Started TorMonitor.
2024-02-05 05:54:11.766 [17] INFO       HostedServices.StartAllAsync (61)       Started Tor Network Checker.
2024-02-05 05:54:11.784 [16] INFO       HostedServices.StartAllAsync (61)       Started Round info updater.
2024-02-05 05:54:11.786 [8] INFO        HostedServices.StartAllAsync (61)       Started CoinJoin Manager.
2024-02-05 05:54:11.789 [8] INFO        HostedServices.StartAllAsync (61)       Started Sleep Inhibitor.
2024-02-05 05:54:11.789 [8] INFO        Global.InitializeNoWalletAsync (240)    Start synchronizing filters...
2024-02-05 05:54:11.849 [12] INFO       TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 10/100 (tag=conn_done: Connected to a relay)
2024-02-05 05:54:12.110 [8] INFO        TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 14/100 (tag=handshake: Handshaking with a relay)
2024-02-05 05:54:12.339 [12] INFO       WalletManager.StartWalletAsync (242)    Starting wallet 'ColdWallet'...
2024-02-05 05:54:12.382 [16] INFO       Wallet.Dispose (469)    Initial Transaction Processing finished in 0 milliseconds.
2024-02-05 05:54:12.852 [12] INFO       TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 15/100 (tag=handshake_done: Handshake with a relay done)
2024-02-05 05:54:12.852 [12] INFO       TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 20/100 (tag=onehop_create: Establishing an encrypted directory connection)
2024-02-05 05:54:13.056 [8] INFO        TorMonitor.MonitorEventsAsync (150)     Tor circuit was established.
2024-02-05 05:54:13.057 [8] INFO        TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 25/100 (tag=requesting_status: Asking for networkstatus consensus)
2024-02-05 05:54:13.265 [12] INFO       TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 30/100 (tag=loading_status: Loading networkstatus consensus)
2024-02-05 05:54:14.723 [12] INFO       TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 45/100 (tag=requesting_descriptors: Asking for relay descriptors)
2024-02-05 05:54:15.499 [12] INFO       TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 66/100 (N/A)
2024-02-05 05:54:21.044 [8] INFO        TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 71/100 (N/A)
2024-02-05 05:54:28.016 [8] INFO        TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 75/100 (tag=enough_dirinfo: Loaded enough directory info to build)
2024-02-05 05:54:28.903 [16] INFO       TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 90/100 (tag=ap_handshake_done: Handshake finished with a relay to build circuits)
2024-02-05 05:54:28.903 [16] INFO       TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 95/100 (tag=circuit_create: Establishing a[n internal] Tor circuit)
2024-02-05 05:54:29.395 [8] INFO        TorMonitor.MonitorEventsAsync (128)     Bootstrap progress: 100/100 (tag=done: Done)
2024-02-05 05:55:00.949 [6] ERROR       PeriodicRunner.ExecuteAsync (114)       System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: RevocationStatusUnknown, OfflineRevocation
   at System.Net.Security.SslStream.SendAuthResetSignal(ReadOnlySpan`1 alert, ExceptionDispatchInfo exception)
   at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.UpgradeToSslAsync(TcpClient tcpClient, String host, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs:line 198
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.ConnectAsync(String host, Int32 port, Boolean useSsl, INamedCircuit circuit, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs:line 85
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.ConnectAsync(Uri requestUri, INamedCircuit circuit, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs:line 57
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.CreateNewConnectionAsync(Uri requestUri, INamedCircuit circuit, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/Pool/TorHttpPool.cs:line 419
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.ObtainFreeConnectionAsync(Uri requestUri, ICircuit circuit, CancellationToken token) in WalletWasabi/Tor/Socks5/Pool/TorHttpPool.cs:line 379
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.SendAsync(HttpRequestMessage request, ICircuit circuit, Int32 maximumRedirects, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/Pool/TorHttpPool.cs:line 159
   at WalletWasabi.Tor.Http.TorHttpClient.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in WalletWasabi/Tor/Http/TorHttpClient.cs:line 89
   at WalletWasabi.Tor.Http.TorHttpClient.SendAsync(HttpMethod method, String relativeUri, HttpContent content, CancellationToken cancellationToken) in WalletWasabi/Tor/Http/TorHttpClient.cs:line 72
   at WalletWasabi.WabiSabi.Client.WabiSabiHttpApiClient.SendWithRetriesAsync(RemoteAction action, String jsonString, CancellationToken cancellationToken, Nullable`1 retryTimeout) in WalletWasabi/WabiSabi/Client/WabiSabiHttpApiClient.cs:line 83
   at WalletWasabi.WabiSabi.Client.WabiSabiHttpApiClient.SendWithRetriesAsync[TRequest](RemoteAction action, TRequest request, CancellationToken cancellationToken, Nullable`1 retryTimeout) in WalletWasabi/WabiSabi/Client/WabiSabiHttpApiClient.cs:line 123
   at WalletWasabi.WabiSabi.Client.WabiSabiHttpApiClient.SendAndReceiveAsync[TRequest,TResponse](RemoteAction action, TRequest request, CancellationToken cancellationToken, Nullable`1 retryTimeout) in WalletWasabi/WabiSabi/Client/WabiSabiHttpApiClient.cs:line 140
   at WalletWasabi.WabiSabi.Client.RoundStateAwaiters.RoundStateUpdater.ActionAsync(CancellationToken cancellationToken) in WalletWasabi/WabiSabi/Client/RoundStateAwaiters/RoundStateUpdater.cs:line 54
   at WalletWasabi.Bases.PeriodicRunner.ExecuteAsync(CancellationToken stoppingToken) in WalletWasabi/Bases/PeriodicRunner.cs:line 84
2024-02-05 05:55:00.963 [9] ERROR       PeriodicRunner.ExecuteAsync (114)       System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: RevocationStatusUnknown, OfflineRevocation
   at System.Net.Security.SslStream.SendAuthResetSignal(ReadOnlySpan`1 alert, ExceptionDispatchInfo exception)
   at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.UpgradeToSslAsync(TcpClient tcpClient, String host, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs:line 198
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.ConnectAsync(String host, Int32 port, Boolean useSsl, INamedCircuit circuit, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs:line 85
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.ConnectAsync(Uri requestUri, INamedCircuit circuit, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs:line 57
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.CreateNewConnectionAsync(Uri requestUri, INamedCircuit circuit, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/Pool/TorHttpPool.cs:line 419
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.ObtainFreeConnectionAsync(Uri requestUri, ICircuit circuit, CancellationToken token) in WalletWasabi/Tor/Socks5/Pool/TorHttpPool.cs:line 379
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.SendAsync(HttpRequestMessage request, ICircuit circuit, Int32 maximumRedirects, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/Pool/TorHttpPool.cs:line 159
   at WalletWasabi.Tor.Http.TorHttpClient.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in WalletWasabi/Tor/Http/TorHttpClient.cs:line 89
   at WalletWasabi.Tor.Http.TorHttpClient.SendAsync(HttpMethod method, String relativeUri, HttpContent content, CancellationToken cancellationToken) in WalletWasabi/Tor/Http/TorHttpClient.cs:line 72
   at WalletWasabi.WebClients.Wasabi.WasabiClient.GetVersionsAsync(CancellationToken cancel) in WalletWasabi/WebClients/Wasabi/WasabiClient.cs:line 208
   at WalletWasabi.WebClients.Wasabi.WasabiClient.CheckUpdatesAsync(CancellationToken cancel) in WalletWasabi/WebClients/Wasabi/WasabiClient.cs:line 223
   at WalletWasabi.Services.UpdateChecker.ActionAsync(CancellationToken cancel) in WalletWasabi/Services/UpdateChecker.cs:line 38
   at WalletWasabi.Bases.PeriodicRunner.ExecuteAsync(CancellationToken stoppingToken) in WalletWasabi/Bases/PeriodicRunner.cs:line 84
2024-02-05 05:55:01.090 [16] ERROR      PeriodicRunner.ExecuteAsync (114)       System.Security.Authentication.AuthenticationException: The remote certificate is invalid because of errors in the certificate chain: RevocationStatusUnknown, OfflineRevocation
   at System.Net.Security.SslStream.SendAuthResetSignal(ReadOnlySpan`1 alert, ExceptionDispatchInfo exception)
   at System.Net.Security.SslStream.CompleteHandshake(SslAuthenticationOptions sslAuthenticationOptions)
   at System.Net.Security.SslStream.ForceAuthenticationAsync[TIOAdapter](Boolean receiveFirst, Byte[] reAuthenticationData, CancellationToken cancellationToken)
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.UpgradeToSslAsync(TcpClient tcpClient, String host, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs:line 198
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.ConnectAsync(String host, Int32 port, Boolean useSsl, INamedCircuit circuit, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs:line 85
   at WalletWasabi.Tor.Socks5.TorTcpConnectionFactory.ConnectAsync(Uri requestUri, INamedCircuit circuit, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/TorTcpConnectionFactory.cs:line 57
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.CreateNewConnectionAsync(Uri requestUri, INamedCircuit circuit, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/Pool/TorHttpPool.cs:line 419
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.ObtainFreeConnectionAsync(Uri requestUri, ICircuit circuit, CancellationToken token) in WalletWasabi/Tor/Socks5/Pool/TorHttpPool.cs:line 379
   at WalletWasabi.Tor.Socks5.Pool.TorHttpPool.SendAsync(HttpRequestMessage request, ICircuit circuit, Int32 maximumRedirects, CancellationToken cancellationToken) in WalletWasabi/Tor/Socks5/Pool/TorHttpPool.cs:line 159
   at WalletWasabi.Tor.Http.TorHttpClient.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in WalletWasabi/Tor/Http/TorHttpClient.cs:line 89
   at WalletWasabi.Tor.Http.TorHttpClient.SendAsync(HttpMethod method, String relativeUri, HttpContent content, CancellationToken cancellationToken) in WalletWasabi/Tor/Http/TorHttpClient.cs:line 72
   at WalletWasabi.WebClients.Wasabi.WasabiClient.GetSynchronizeAsync(uint256 bestKnownBlockHash, Int32 count, Nullable`1 estimateMode, CancellationToken cancel) in WalletWasabi/WebClients/Wasabi/WasabiClient.cs:line 46
   at WalletWasabi.Services.WasabiSynchronizer.ActionAsync(CancellationToken cancel) in WalletWasabi/Services/WasabiSynchronizer.cs:line 112
   at WalletWasabi.Bases.PeriodicRunner.ExecuteAsync(CancellationToken stoppingToken) in WalletWasabi/Bases/PeriodicRunner.cs:line 84

Wasabi Version

commit ab0ba7c609188a5caf885916f6acd7e234663b77 dated 2024/02/05

Wasabi config

{
  "Network": "Main",
  "MainNetBackendUri": "https://api.wasabiwallet.io/",
  "TestNetClearnetBackendUri": "https://api.wasabiwallet.co/",
  "RegTestBackendUri": "http://localhost:37127/",
  "UseTor": true,
  "TerminateTorOnExit": true,
  "DownloadNewVersion": true,
  "StartLocalBitcoinCoreOnStartup": false,
  "StopLocalBitcoinCoreOnShutdown": true,
  "LocalBitcoinCoreDataDir": "/root/.bitcoin",
  "MainNetBitcoinP2pEndPoint": "127.0.0.1:8333",
  "TestNetBitcoinP2pEndPoint": "127.0.0.1:18333",
  "RegTestBitcoinP2pEndPoint": "127.0.0.1:18444",
  "JsonRpcServerEnabled": false,
  "JsonRpcUser": "",
  "JsonRpcPassword": "",
  "JsonRpcServerPrefixes": [
    "http://127.0.0.1:37128/",
    "http://localhost:37128/"
  ],
  "DustThreshold": "0.00005",
  "EnableGpu": false,
  "CoordinatorIdentifier": "CoinJoinCoordinatorIdentifier"
}

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (6 by maintainers)

Most upvoted comments

@tumblingman Also does your Tor Browser use a Tor bridge?

You have pasted contents of Logs.txt. There is also TorLogs.txt file. Does it contain anything useful? Could you attach it as well?

@tumblingman Have you had a chance to try again please? Or do you have any new information to help us investigate further?

Hello! I haven’t had a chance to check your solution yet, but I will be at my desk tomorrow and will definitely review everything. I’ll write the result here as soon as I check it.

@tumblingman Would clearing content of the Wasabi’s bundled Tor folder data Client\tordata2[^1] help? It might force Tor to choose different relays for you.

If not, then it’s an indication that the problem lies elsewhere.

You might as well try to increase log level by starting your Wasabi Daemon with --LogLevel=trace command line parameter to see URIs that return such AuthenticationExceptions and try to open them in your Tor Browser, if it possible to open them there.

edit: I know that Wasabi works over a VPN with Tor enabled. I’m saying that just because VPN in general should not be a problem. But obviously details matter so…

[^1]: The folder is in your profile. On Windows it would be C:\<user>\kimi\AppData\Roaming\WalletWasabi\Client\tordata2.

We had several reports of this issue on the mainnet endpoint as well, for example https://github.com/zkSNACKs/WalletWasabi/discussions/10394

Thank you for opening the issue, it was not opened before.