rqbit
rqbit copied to clipboard
Support BitTorrent v2 (BEP 52)
Love this project! I think it's one of the best rust BT implementations :) Just wanted to see if there's interest in supporting BEP 52. The major improvement is using a larger hash for security from hash collisions
Thanks for kind words @jabedude!
As for BTv2, in a nutshell - I'm not against it, but I'm not convinced it's where time should be put in next.
I looked through the BTv2 spec and it seems quite a change to implement it. The current architecture would need some heavy refactoring to support both v1 and v2.
I don't even know if I've ever seen V2-only torrents in the wild. Intuitively, when a significant % of torrents switches to V2 only, then (or a bit earlier) would be the time to add support for it, as otherwise things won't work. Maybe I don't know enough about BTv2, but I draw a parallel with HTTP 1 -> HTTP 2/3 - yes, it may be better, but it's singificantly different, harder to implement, and, most importantly, HTTP/1 was and will be supported many years since 2/3 appeared.
As for security against hash collisions being the major reason to do so, for me personally, it's not very compelling to justify putting time into it.
However, all that said, looks like you have some interest in actually implementing it (as you started in #72 ), so I'm ready to support you along the way. If the end result doesn't make things terribly complicated, I'd be happy to merge.