cake_wallet icon indicating copy to clipboard operation
cake_wallet copied to clipboard

bug: monero onion nodes don't work reliably

Open nahuhh opened this issue 1 year ago • 5 comments

Describe the bug Onion nodes for monero only work sparingly

To Reproduce Steps to reproduce the behavior:

  1. enable socks proxy or use orbot/invizible to force app over tor
  2. Use an onion node

Expected behavior for it to connect and sync every time

Screenshots It just shows "connecting" sometimes.

Platform:

  • OS: android
  • Device: android
  • Cake Wallet Version: monero.com maybe 1.13 til latest (1.16.4)

And no, its not the tor network. Same node works in other wallets and is reachable via curl

nahuhh avatar Aug 23 '24 05:08 nahuhh

I'm having the same issue on iOS. It seems there is only one .onion node in the list and that particular one is not very stable. Sometimes it tries to connect for many minutes and never gets anywhere, and other times it connects immediately and has synced in no time.

xorblorp avatar Sep 14 '24 13:09 xorblorp

@tuxpizza @OmarHatem28 ^^ spam / phishing

nahuhh avatar Sep 14 '24 13:09 nahuhh

deleted and reported, thanks @nahuhh for pointing it out 🙏

OmarHatem28 avatar Sep 14 '24 19:09 OmarHatem28

for the main issue, we will soon be working on the in-app tor feature and will hopefully fix any problem along the way with tor connections

OmarHatem28 avatar Sep 14 '24 19:09 OmarHatem28

for the main issue, we will soon be working on the in-app tor feature and will hopefully fix any problem along the way with tor connections

I'm not sure what changed but i havent digged too deep.

  1. Onion addresses are trying to use UDP. Tor should be tcp

I think this "might" be the cause. I havent yet compared to any other apps to see though.

nahuhh avatar Sep 14 '24 19:09 nahuhh

Can confidently say that onion nodes on cake wallet are pure dogshit experience.

No offense to the efforts of the team and I'm sure they must be working hard but that's about the how the situation feels right now. Straight up buggy and unusable compared to the rest of the wallet features.

SyntheticBird45 avatar May 15 '25 20:05 SyntheticBird45

It's extremely frustrating that a (supposedly) privacy-focused wallet would spend time on hot garbage like ethereum and solana support instead of making functional tor connections a priority.

kn0wmad avatar Jun 05 '25 14:06 kn0wmad

As someone who for quite some time works on built-in Tor I can with quite a bit of confidence say that it is not something that can be "just fixed", tor connection can be interrupted by many things and from my experience on mobile platforms it is terribly unreliable, for tasks other than browsing (and even that is terrible experience when 1 in 3 websites will shove you 10-step captcha to still prevent you from accessing content.).

While on desktop you can get away with making Tor more reliable by just allowing processes to run in background. When I'm using Tor my simplex notifications are delayed (and I'm lucky if they ever show up), wallets take much longer to sync and random connection issues appear.

So to sum it up, when running Tor on mobile it is a very difficult task to maintain the connection properly, and while built-in service (and a tiny cleanup of code) helps it is still a thing that can break randomly because of battery optimization, dynamic connection switching and other causes.

Even when you go monero.fail or any other node aggregator you can see that onion nodes have trouble being accessible to the ping service from monero.fail - despite having no battery optimization, or aggressive process killing in the background. (and I'm fairly confident that node maintainers are not turning them on and off randomly whenever they need to use their computer.)

Image

Privacy you get with Tor is not free, you pay with inconvenience of having to deal with connection issues sometimes (especially on mobile).

As for this issue, unreliable connection over Tor to 3rd party node is not a problem on our end, if you face any other issues please open a new one.

MrCyjaneK avatar Jun 05 '25 15:06 MrCyjaneK

@mrcyjanek, the problems are specific to cake wallet

  • cake uses onions for various features - fiat api, exchanges, and nodes

  • to use the onion fiat api and exchanges, you must use orbot or invizible in vpn mode. Invizible will capture/forward the onion automatically, orbot requires forcing the whole app over tor.

  • when using vpn mode with orbot/inviz (without enabling proxy) onion monero nodes do not work. They must not be getting captured (whereas exchange and fiat api are being properly captured). You have to enable the node proxy, which imagine (could be wrong) forces a tor-over-tor situation.

  • if you dont use orbot/inviz in vpn mode, you cant access the onion fiat & exchange apis. But (iirc) node proxy works better.

i think the cake problem is just how the "proxy" feature handles/modifies the connection.

again, same node, same time, different wallet, is reliable. i also use tor 24/7 on my mobile (via inviz), and while it may have hiccups at times, it is fully functional 95% of the day

it is still a thing that can break randomly because of battery optimization,

cake struggles with this (staying alive and connected. My cake wont stay alive for more than a couple minutes in the background on graphene), but invizible/orbot do not have this issue (at least not in vpn mode or with a persistent notification).

nahuhh avatar Jun 05 '25 15:06 nahuhh

Stack Wallet is 10x faster at syncing over Tor than Cake Wallet. It's humanly noticeable. So I appreciate your explanation on how reliability is multi-factorial but in this particular case your assumption doesn't hold. Stack Wallet is using built-in arti for routing connections.

SyntheticBird45 avatar Jun 05 '25 15:06 SyntheticBird45

@nahuhh I agree, that part is being reworked as part of built-in Tor, connections will now get properly routed be that proxy/built-in or VPN mode.

@SyntheticBird45 we have opted to use OG Tor instead of Arti for our built-in Tor implementation, as for the sync comparision thank you for the insights, I'll compare logs from stack and cake to see where the difference originates from and fix that issue.

MrCyjaneK avatar Jun 05 '25 15:06 MrCyjaneK

Agree with @nahuhh and @SyntheticBird45, and thanks @MrCyjaneK for the response. I think we all understand the inherent issues with using tor, and we are more than willing to be patient in order to get the benefits. The problem, as mentioned, is that cake is unusable in the current state, and this can actually be "fixed," with the understood trade-offs. I look forward to a built-in tor daemon, which has proven itself for other wallets, and takes a bit of burden off of the user and educators.

It's interesting that you have no internal problems - can you share your setups and tests you've done? This is clearly a real issue.

kn0wmad avatar Jun 05 '25 18:06 kn0wmad