JoinMarket-Org/joinmarket-clientserver

Problem paying with coinjoin with onion directory nodes being down

Opened this issue · 1 comments

Ended up disabling native jm onion in joinmarket.cfg and using IRC only. Then payment succeeded fast. Shouldn't be like that, if one messaging channel is working and others aren't, should just use that one instead of trying to connect to others forever.

send with these orders? (y/n):y                                                                                                                                                               
2024-01-28 15:40:45,838 [INFO]  INFO:Preparing bitcoin data..                                                                                                                                 
2024-01-28 15:40:46,278 [INFO]  Using this manually set tx feerate (randomized for privacy): 31748 sat/kvB (31.7 sat/vB).                                                                     
2024-01-28 15:40:46,284 [INFO]  Using this manually set tx feerate (randomized for privacy): 30336 sat/kvB (30.3 sat/vB).                                                                     
2024-01-28 15:40:46,285 [INFO]  total estimated amount spent = 0.01119320 BTC (1119320 sat)                                                                                                   
2024-01-28 15:40:46,391 [INFO]  INFO:Commitment sourced OK                                                                                                                                    
2024-01-28 15:40:50,430 [INFO]  Failed to connect to peer wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222                                                                 
2024-01-28 15:40:50,431 [INFO]  Going to reattempt connection to wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222 in 12.0 seconds.                                         
2024-01-28 15:41:13,509 [INFO]  Failed to connect to peer wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222                                                                 
2024-01-28 15:41:13,511 [INFO]  Going to reattempt connection to wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222 in 16.5 seconds.                                         
2024-01-28 15:41:14,492 [INFO]  Updating status to connected for peer 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222.                                                    
2024-01-28 15:41:14,495 [INFO]  We, NOT-SERVING-ONION, are calling the handshake callback as client.                                                                                          
2024-01-28 15:41:14,497 [INFO]  Sending this handshake: {"app-name": "joinmarket", "directory": false, "location-string": "NOT-SERVING-ONION", "proto-ver": 5, "features": {}, "nick": "J5BLnz
mKRGHkEUdD", "network": "mainnet"} to peer 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222                                                                                
2024-01-28 15:41:14,500 [INFO]  Going to reattempt connection to 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222 in 67.34375 seconds.                                     
2024-01-28 15:41:39,727 [INFO]  Failed to connect to peer wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222                                                                 
2024-01-28 15:41:39,728 [INFO]  Going to reattempt connection to wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222 in 21.25 seconds.                                        
2024-01-28 15:41:46,406 [INFO]  Makers who didnt respond: ['J57cra7AbeS8p6f7']                                                                                                                
2024-01-28 15:42:14,213 [INFO]  Failed to connect to peer wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222                                                                 
2024-01-28 15:42:14,215 [INFO]  Going to reattempt connection to wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222 in 35.375 seconds.                                       
2024-01-28 15:42:22,798 [INFO]  Updating status to connected for peer 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222.                                                    
2024-01-28 15:42:22,802 [INFO]  We, NOT-SERVING-ONION, are calling the handshake callback as client.                                                                                          
2024-01-28 15:42:22,803 [INFO]  Sending this handshake: {"app-name": "joinmarket", "directory": false, "location-string": "NOT-SERVING-ONION", "proto-ver": 5, "features": {}, "nick": "J5BLnz
mKRGHkEUdD", "network": "mainnet"} to peer 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222                                                                                
2024-01-28 15:42:22,807 [INFO]  Going to reattempt connection to 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222 in 106.515625 seconds.                                   
2024-01-28 15:43:12,148 [INFO]  Failed to connect to peer wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222                                                                 
2024-01-28 15:43:12,151 [INFO]  Going to reattempt connection to wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222 in 45.5625 seconds.                                      
2024-01-28 15:44:09,921 [INFO]  Updating status to connected for peer 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222.                                                    
2024-01-28 15:44:09,922 [INFO]  We, NOT-SERVING-ONION, are calling the handshake callback as client.                                                                                          
2024-01-28 15:44:09,922 [INFO]  Sending this handshake: {"app-name": "joinmarket", "directory": false, "location-string": "NOT-SERVING-ONION", "proto-ver": 5, "features": {}, "nick": "J5BLnz
mKRGHkEUdD", "network": "mainnet"} to peer 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222                                                                                
2024-01-28 15:44:09,988 [INFO]  Going to reattempt connection to 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222 in 153.7734375 seconds.                                  
2024-01-28 15:44:13,754 [INFO]  Failed to connect to peer wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222                                                                 
2024-01-28 15:44:13,756 [INFO]  Going to reattempt connection to wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222 in 72.34375 seconds.                                     
2024-01-28 15:45:45,370 [INFO]  Failed to connect to peer wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222                                                                 
2024-01-28 15:45:45,375 [INFO]  Going to reattempt connection to wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222 in 106.515625 seconds.                                   
2024-01-28 15:46:44,256 [INFO]  Updating status to connected for peer 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222.                                                    
2024-01-28 15:46:44,259 [INFO]  We, NOT-SERVING-ONION, are calling the handshake callback as client.                                                                                          
2024-01-28 15:46:44,262 [INFO]  Sending this handshake: {"app-name": "joinmarket", "directory": false, "location-string": "NOT-SERVING-ONION", "proto-ver": 5, "features": {}, "nick": "J5BLnz
mKRGHkEUdD", "network": "mainnet"} to peer 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222                                                                                
2024-01-28 15:46:44,385 [INFO]  Going to reattempt connection to 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222 in 233.66015625 seconds.                                 
2024-01-28 15:47:43,842 [INFO]  Failed to connect to peer wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222                                                                 
2024-01-28 15:47:43,844 [INFO]  Going to reattempt connection to wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222 in 153.7734375 seconds.                                  
2024-01-28 15:50:37,552 [INFO]  Failed to connect to peer wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222                                                                 
2024-01-28 15:50:37,554 [INFO]  Going to reattempt connection to wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222 in 229.66015625 seconds.                                 
2024-01-28 15:50:49,180 [INFO]  Updating status to connected for peer 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222.                                                    
2024-01-28 15:50:49,181 [INFO]  We, NOT-SERVING-ONION, are calling the handshake callback as client.                                                                                          
2024-01-28 15:50:49,183 [INFO]  Sending this handshake: {"app-name": "joinmarket", "directory": false, "location-string": "NOT-SERVING-ONION", "proto-ver": 5, "features": {}, "nick": "J5BLnz
mKRGHkEUdD", "network": "mainnet"} to peer 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222
2024-01-28 15:50:49,331 [INFO]  Going to reattempt connection to 3kxw6lf5vf6y26emzwgibzhrzhmhqiw6ekrek3nqfjjmhwznb2moonad.onion:5222 in 347.990234375 seconds.
^C2024-01-28 15:54:39,826 [INFO]  Going to reattempt connection to g3hv4uynnmynqqq2mchf3fcm3yd46kfzmcdogejuckgwknwyq5ya6iad.onion:5222 in 29.375 seconds.
2024-01-28 15:54:39,831 [INFO]  Going to reattempt connection to ylegp63psfqh3zk2huckf2xth6dxvh2z364ykjfmvsoze6tkfjceq7qd.onion:5222 in 7.0 seconds.
2024-01-28 15:54:39,835 [INFO]  Going to reattempt connection to odpwaf67rs5226uabcamvypg3y4bngzmfk7255flcdodesqhsvkptaid.onion:5222 in 9.0 seconds.
2024-01-28 15:54:39,837 [INFO]  Lost IRC connection to: guybrush.hackint.org . Should reconnect automatically soon.
2024-01-28 15:54:39,839 [INFO]  Failed to connect to peer wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222
2024-01-28 15:54:39,841 [INFO]  Going to reattempt connection to wkd3kd73ze62sqhlj2ebwe6fxqvshw5sya6nkvrgcweegt7ljhuspaid.onion:5222 in 344.990234375 seconds.
2024-01-28 15:54:39,843 [INFO]  Lost IRC connection to: irc-cf73.darkscience.net . Should reconnect automatically soon.
done

I can't find a specific pre-existing Issue now, but I know in the past I've explained that, indeed, there is this bug that you describe: if you have onion-messaging enabled, and if not even one directory node responds in time, then the program just hangs instead of the expected behaviour: startup normally, with only the non-onion message channels.

It's a bit fiddly to fix (at least, that's what I remember). It would be a good exercise for someone trying to better understand the MessageChannel and MessageChannelCollection code, to try to fix it :)