-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix relayed connections, add DCUtR and reduce CLI args #502
Conversation
In mDNS I observe that we have multiple (up to 4) connections / replication sessions with the same peer now, I guess that's due to running TCP and QUIC at the same time, right? |
Ah yeh, possibly. I can test the successful DCUtR without listening on TCP. If it still works we can remove listening on TCP for the "client" nodes. |
Thanks for the review request! I'm planning to read through everything and provide feedback tomorrow. |
Great, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet! All looks good to me. Well done!
Great to hear that the relayed connections are now reliable and speedy. The addition of the reservation timeouts is a nice touch and should provide significant stability for long-lived sessions / connections.
Nice to see the CLI args pared-down further; always love to see a codebase getting smaller :)
Give me a shout if you ever want more hands on deck to test DCUtR.
Thanks @mycognosist, glad you're happy with the direction. It it started with your good work 😄 ! Yeh, always satisfying to reduce code, we started with "we have all the options, yey!" and ending up at "really we only need these options for now, yey!" Would defo be good to do some more DCUtR at some point. Happily, when it doesn't succeed, there are no negative effects on the currently relayed connection, so really it's a bonus. But it would be nice to have a rough idea of when it is likely to succeed. |
This was actually cos we were missing dial opts with conditions ( |
Nice one! That looks much more transparent. |
I had a few goals with this PR:
This all came with a general refactor, especially of the event loop, which is hopefully now a little easier to follow. The answer to 1. seems to have been to introduce a kind of handshake phase to the initiation process if a relay address has been given. This waits on identify messages to/from the relay, and successful listening on the circuit address before starting any other processes. Good news is, with this, relayed connections seem to be very quick and reliable ⭐
I introduced the DCUtR behaviour but I haven't been able to observe if it works yet, this could just be my particular NAT setup not allowing holepunching though. There are upgrade requests passing back and forth, but the upgrade itself fails. This doesn't seem to have any adverse effect on the existing relayed connection though.
Lastly, I removed the
dial
behaviour which was responsible for redialing peers if they disconnect unexpectedly. This was partly as I thought it might be effecting the DCUtR processes, and partly because I wanted to in general reduce complicating the connection logic at all. It may come back later, lets see (also connections seem pretty reliable anyway).Closes: #423 and #361
📋 Checklist
CHANGELOG.md