haveno-dex / haveno

Decentralized P2P exchange platform built on Monero and Tor
https://haveno.exchange
GNU Affero General Public License v3.0
1.02k stars 116 forks source link

Random errors creating txs with remote nodes [1 XMR] #1093

Open woodser opened 4 months ago

woodser commented 4 months ago

Creating transactions when connected to remote nodes (especially xmr-node.cakewallet.com:18081 over Tor) sometimes produces random errors:

This issue requests understanding and fixing these errors.

The errors tend to resolve by switching to a different node, switching to clearnet, using a local node, or trying again.

github-actions[bot] commented 4 months ago

There is a bounty on this issue, the amount is in the title. The reward will be awarded to the first person or group of people who resolves this issue.

If you are starting to work on this bounty, please write a comment, so that we can assign the issue to you. We expect contributors to provide a PR in a reasonable time frame or, in case of an extensive work, updates on their progresses. We will unassign the issue if we feel the assignee is not responsive or has abandoned the task.

Read the full conditions and details of our bounty system.

nihilist001 commented 4 months ago

how about just making the haveno client retry a few times if it catches these errors ? idk if that'd be simple to implement or not

woodser commented 4 months ago

That's what we do now; most functions are retried 5 times for tolerance.

boldsuck commented 3 months ago

If it helps, there are several options to make Tor more talkative. (For debugging only, may provide sensitive information.)

Log debug file /var/log/tor/debug.log
SafeLogging 0
TestSocks 1

## SocksPort flag: ExtendedErrors
## Return extended error code in the SOCKS reply. So far, the possible errors are:
# X'F0' Onion Service Descriptor Can Not be Found
# X'F1' Onion Service Descriptor Is Invalid
# X'F2' Onion Service Introduction Failed
# X'F3' Onion Service Rendezvous Failed
# X'F4' Onion Service Missing Client Authorization
# X'F5' Onion Service Wrong Client Authorization
# X'F6' Onion Service Invalid Address
# X'F7' Onion Service Introduction Timed Out
SocksPort 9050 ExtendedErrors

MetricsPort 127.0.0.1:9035
MetricsPortPolicy accept 127.0.0.1
KewbitXMR commented 2 months ago

This doesn't just happen on Haveno, these happen everywhere including cake wallet and monero wallet GUI. I'm pretty sure this is to do with the network, tor or monerod, most likely monerod, I would say just throw catch and retry, and if it passes X number of times, switch to a different node and repeat....

woodser commented 2 months ago

Yeah that's what we do now; catch and retry, up to 5 times.