-
Notifications
You must be signed in to change notification settings - Fork 451
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
Explore the compatibility of Tribler with libtorrent 2 #5556
Comments
The most important change for us is BitTorrent V2 requiring 32 bytes infohashes. This will require introducing a new format for Channels entries and changing all the relevant hardcoded "20 bytes" checks in our codebase. Gonna be a headache... |
For what it’s worth, Tribler is compatible with the v1 portion of BitTorrent v2+v1 compatible torrent files. |
Python binding that probably works without any additional tuning: https://pypi.org/project/libtorrent |
One of the "hidden" downsides of the migration to libtorrent 2.0 is the following: we actively use static environment for our infrastructure (builds, tests, experiments), which means such migration will touch not only codebase, but it will require a massive manual upgrade of affected machines. (maybe it is also a good point to switch from Jenkins to Travis (or similar) as well) |
I tried to install [PID:84481] 2022-03-30 14:05:01,511 - ERROR <tunnel_community:129> TriblerTunnelCommunity._poll_download_manager(): Error on polling Download Manager: No Python class registered for C++ class libtorrent::flags::bitfield_flag<unsigned char, libtorrent::connection_type_tag, void>
[PID:84481] 2022-03-30 14:05:01,711 - ERROR <rest_manager:57> tribler.core.components.restapi.rest.rest_manager.error_middleware(): No Python class registered for C++ class libtorrent::flags::bitfield_flag<unsigned char, libtorrent::connection_type_tag, void>
Traceback (most recent call last):
File "/Users/<user>/Projects/github.com/Tribler/tribler/src/tribler/core/components/restapi/rest/rest_manager.py", line 50, in error_middleware
response = await handler(request)
File "/Users/<user>/Projects/github.com/Tribler/tribler/venv/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/Users/<user>/Projects/github.com/Tribler/tribler/src/tribler/core/components/libtorrent/restapi/downloads_endpoint.py", line 293, in get_downloads
"availability": state.get_availability(),
File "/Users/<user>/Projects/github.com/Tribler/tribler/src/tribler/core/components/libtorrent/download_manager/download_state.py", line 195, in get_availability
peers = self.get_peerlist()
File "/Users/<user>/Projects/github.com/Tribler/tribler/src/tribler/core/components/libtorrent/download_manager/download_state.py", line 222, in get_peerlist
return self.download.get_peerlist()
File "/Users/<user>/Projects/github.com/Tribler/tribler/src/tribler/core/components/libtorrent/download_manager/download.py", line 529, in get_peerlist
'connection_type': peer_info.connection_type,
TypeError: No Python class registered for C++ class libtorrent::flags::bitfield_flag<unsigned char, libtorrent::connection_type_tag, void> |
The history of rolling back from |
Still Here is a relevant section on Libtorrent documentation Disk I/O overhaul
Comparing the same downloads with Additionally, it appears there could be a memory leak on the GUI side. |
It seems that libtorrent 2, with support for the BitTorrent 2 protocol was released a week ago. Unfortunately, the new protocol is not compatible with BitTorrent 1.x, due to the transition from SHA-1 to SHA-256.
The key changes are described in this blog post.
We should explore how much time it would take to integrate the new version of libtorrent in Tribler. Since there are quite some changes, I'm expecting that this will not be an easy task.
The text was updated successfully, but these errors were encountered: