Question on the error: v1 and v2 hashes do not describe the same data #7635
Unanswered
a-s-tarantoga
asked this question in
Q&A
Replies: 1 comment
-
sorry for not getting back to you sooner. I would need to do some investigation to have a good answer for you. But it doesn't sound right that, if you create a hybrid torrent with libtorrent, you would get this error. That sounds like a bug somewhere. This error shouldn't happen for v1-only or v2-only torrents, so why you end up with a hybrid torrent is another question. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I hope this is the right place to ask. If not I would be very grateful if you point me to the right place. Also I want to Sorry, if I missed something obvious in the descriptions or tutorials.
I'm using libtorrent v2.0.9 in a C++ project where I try to exchange data in a local network between a number of computers. The data can be fairly large (~100GB to 300GB).
The way it works is that a new data-set is presented to libtorrent, which then creates a magnet link, that is exchanged between the machines and the others then use libtorrent to download the data from the first one. This works so far in most cases and especially for files up to 10GB, but when changing to large files (for instance 100 GB), I eventually will get the error "217 v1 and v2 hashes do not describe the same data". The error occurs at what seems random positions between 30% to 60% into the file on the downloading machine.
I have been reading the manual for some time and also have been trying to debug and trying different configurations for libtorrent. But nonetheless I'm still struggling to understand what's happening and I still get the error unless i turn of hash_checks or switch to large piece-sizes. Maybe you can explain to me why I get this error, and what I need to do. My focus is to get to a reliable solution.
The code I use is mainly from the excellent tutorials on libtorrent. I did some adaptions over time.
The creation of the magnet-uri is as follows(cf. https://libtorrent.org/reference-Create_Torrents.html):
I assume that setting the flags to v2_only would only generate v2 hashes for the pieces of the given path in the set_piece_hashes call.
Later I follow the libtorrent tuorial to create a torrent_session (https://www.libtorrent.org/tutorial-ref.html):
Things that I figured out:
What really puzzles me is the I explicitely set the hashes to be generated to v2_only and still I get the error on v1 and v2 hashes not describing the same data.
Do you have an idea what is going on and what to do about it? Any advice is highly appreciated!
Thank you very much,
Martin
Beta Was this translation helpful? Give feedback.
All reactions