Open nahuhh opened 2 years ago
scanning of nodes happens on the very first start of the app (after installation) and then ONLY when touching the rescan/refresh ivon on the right of the node.
otherwise it tries to connect to the last selected node and if it does not manage with the timeout (1 second for clearnet, 5 seconds for tor) it displays "touch to select node" as it assumes the node is offline / not reachable.
there are also special cases when switching to/from Tor.
Allow logging into wallet before node finishes connecting
this is its own world of pain and we are looking into that.
Sorry, have been busy
Will follow up within the next couple days
@m2049r
When having tor connection issues, Monerujo looks to be attempting to start orbot over and over.
Workaround: turn off orbot, so that Monerujo can turn it back on. Opinion: Monerujo should not depend / check for on orbot first.
otherwise it tries to connect to the last selected node and if it does not manage with the timeout (1 second for clearnet, 5 seconds for tor) it displays "touch to select node" as it assumes the node is offline / not reachable.
For tor, im not sure? Monerujo checks for orbot being installed before anything else. Ill often lose the onion symbol for a globe when Monerujo is unable to detect orbot / orbot status. Orbot
Should first attempt to query something like
torsocks curl --digest -X POST http://TORHIDDENSERVICECUSTOMNODE.onion:PORT/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_info"}' -H 'Content-Type: application/json'
And if this fails, only then check for and start orbot.
If this does pass, dont check for orbot. The node is online and reachable.
This seems to be one of the connection issues im having - Monerujo trying to control orbot unnecesasrily. (Orbot is running and reachable, but monerujo is failing a check and trying to start it).
Ive removed all other nodes to try to figure out whats going on. Also looks like monerujo keeps the connection open when the wallet is unlocked, but when returning to the landing page it will then drop the connection before querying to see it is online. Should stay connected unless the connection is lost or the app is closed etc.
Hope some of this helps
Tldr
1 Attempt connection first 2 fallback to start orbot only if (1) fails
that's how the orbot integration on android works. specifically this: https://gitlab.com/guardianproject/NetCipher/ which is a mess and seems to be broken with the latest orbot release. there is no torsocks.
the alternative is probably to make it completely manual via settings.
otherwise it tries to connect to the last selected node and if it does not manage with the timeout (1 second for clearnet, 5 seconds for tor) it displays "touch to select node" as it assumes the node is offline / not reachable.
can you make it so it does this check say 2-3 times? very often the node is available, its just the 1/5 second might be a little too tight. if monerujo doesn't auto-onnect to my last node, all I have to do is select it in the node list. adding another check if fails would make auto connecting much easier
that's how the orbot integration on android works. specifically this: https://gitlab.com/guardianproject/NetCipher/ which is a mess and seems to be broken with the latest orbot release. there is no torsocks.
the alternative is probably to make it completely manual via settings.
I can bypass orbot
2b. orbot starts (using random ports due to 9050 being in use.)
Note: At this point, orbot is running just for show. Monerujo is pointed at 9050 ie the termux /not orbot bind.
Seems 2b and 3 can be skipped. Can we just query onion without checking for orbot? / only check for orbot after a rejected request ?
can you make it so it does this check say 2-3 times? very often the node is available, its just the 1/5 second might be a little too tight. if monerujo doesn't auto-onnect to my last node, all I have to do is select it in the node list. adding another check if fails would make auto connecting much easier
10seconds should do it. Loading from tor browser took 7 seconds just now. But really, it shouldnt fail until an invalid result it returned.
shruum dev has pushed a retry-connection fix here: https://git.mayumi.one/mayumi/shruum/commit/c2be5e2a6645893d9da3a684a16fc54077d03457
onion node connection time-out bumped up to 10s and will retry on fail
Update: When connected to my onion node. 1st launch ALWAYS fails to connect to node and shows "Touch to select node". Second launch works.
I can repeatedly close and open Monerujo and every other time it will show me "touch to select".
Orbot running in the background the whole time.
If a user has added a node manually, it should never check other nodes.
Speed is not a factor. I, and likely others, only keep other nodes saved as backups.
Example. I have my onion, my clearnet, and my LAN addresses saved.
But Monerujo will disconnect from onion and choose clearnet more often than not. It will also use internet when im home, even though the last node I selected was my LAN/local ip.
Fix:
IMO, simple is best. I just need to stay on the last node I used.
Thanks
Just got my tor hidden services running, but rujo keep choosing my other connections or no connection at all.
Tldr No need for autoscsnning or selecting nodes. The only situation I see it to make sense, is if the user is using nodes on "random mode". Im looking for a "strict" mode.