Diego Mendes | 24 Nov 15:49 2015

More than one block request at the same time


Suppose that a peer receives more than one block request at the same time,
how libtorrent handles the simultaneous requests? The client chooses the
request in a round robin fashion or uses another strategy?
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
Michelle Cabrero | 24 Nov 03:14 2015

performance warning: max outstanding piece requests reached

   In Deluge 1.3.12, using libtorrent 1.0.7 with ltconfig, I am seeing these
   type of messages with almost every torrent.

   [DEBUG   ] 10:42:11 alertmanager:124 performance_alert: [TORRENT_NAME]:
   performance warning: max outstanding piece requests reached

   After  reading  the docs, I thought it would be resolved by increasing
   max_out_request_queue and max_allowed_in_request_queue, which were already
   at the levels set by the high performance seed preset. So, I increased them
   by 1k, but the messages persisted. Another 1k, still no luck. Then I went
   ahead and incremented both settings by 1mm, but still no resolution.

   Am  I  not understanding something fundamental about this setting? The
   torrents in question usually have just 5-6 peers in the swarm at the time I
   observe these debug logs, so I'm scratching my head trying to figure out
   where I went wrong. Thanks so much for any clues about where to look.

Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
Queue | 23 Nov 05:30 2015

variable size pieces in torrents, rabin fingerprints/rolling hash


This is more of a general bittorrent protocol question than a libtorrent
question, but has there been any discussion about extending torrent
metainfo with variable size pieces? The most useful case would be pieces
split at rabin fingerprint[0] boundaries, which would allow torrents of
similar files (or updated/mutable BEP 38 torrents) to theoretically
share data at the piece level. See [1] for a 2007 paper about some
techniques to additionally identify similar files efficiently.


[0]: https://en.wikipedia.org/wiki/Rabin_fingerprint

Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
Judy Lin | 20 Nov 22:47 2015

question on adding intermediate CA logic to libtorrent protocol


I am trying to figure out a more secure way between the libtorrent and
tracker communicate during the Bittorrent transfer for my project.

Could anyone provide me with any insight/recommendations?

In order to not expose the root CA in the libtorrent side which is
necessary to sign the peer certs, I was thinking of having a two level CA.
On the libtorrent side, I will have an intermediate CA signed by the root
CA. The torrent will be signed by by the root CA and the peer certs signed
by the intermediate CA.The tracker will validate the torrent and announce
with the root CA. The peer certs will validate among themselves with the
intermediate CA. To my understanding, the libtorrent client doesn't support
this root CA and intermediate CA structure. When I tested this, only the
root CA was added to the peer certs truststore so they could not validate
each other. I would need to change the libtorrent protocol to support the
extra intermediate CA. Is there any security concerns with modifying the
libtorrent protocol to add the intermediate CA in the truststore as well?

I am also looking into another solution if the root CA and intermediate CA
approach is not ideal. I would store the password and private key of the CA
on the libtorrent side in a secure location, which would add another level
of security to protect the CA from being compromised. Though, there are
quite a number of loop for this approach as well.

Chao Ma | 19 Nov 03:20 2015

use save_resume_data to save and load resume file


I am new to the bittorrent programming. I want to write a simple client
using libtorrent python binding. I want to write the resume file to the
disk, so that later on, I can resume the torrents downloading from the
resume file. However, I don't know how to use the save_resume_data so that
I can load it later on. Here is the code I wrote:

*import libtorrent as lt*

*def save_data(handle):    handle.save_resume_data()    # I guess I need
wait for the save_resume_data alert before   #write_resume_data    rawdata
= handle.write_resume_data()    bdata = lt.bencode(rawdata)    with
open('./resumefile0','wb+') as tmpfile:        tmpfile.write(bdata)def
load_data():    with open('./resumefile0','rb+') as tmpfile:        bdata =
tmpfile.read()    ses = lt.session()    ses.listen_on(6881, 6891)
rawdict = lt.bdecode(bdata)    handle = ses.add_torrent(rawdict)    return

I am able to write the data to resumefile0. However, when I try to load the
data, it gave me error missing 'save_path'. Even if I add this parameter in
the dict, it still give me error.
If anyone can give me some hints or a good reference, that would be very


(Continue reading)

Egor Orekhov | 16 Nov 16:22 2015

Skip file when first slot is absent

I have a problem with using custom storages in piece_manager::check_files.
My lib version is 0.16.19. I have a huge amount of files packed in big compressed pack and implemented custom
read/write operations for it. So I want to use them through my own implementation of libtorrent::storage_interface.
The problem I talking about is in file storage.cpp in function piece_manager::check_one_piece.
Here we have read_short variable. When it is true (which means we can't read all information from current
slot) then piece_manager::skip_file() performs. And because of it, if first slot have failed, then all
next will be mark as not downloaded. So if I interrupt downloading process and start it again, then only
leading pieces will be marked as downloaded. Because of that my program download again many pieces that
have been downloaded before. So I don't understand, why we should check slots sequentially. Could you
explain please?
Thanks in advance.

Best regards

COMMUNICATION intended solely for the recipient and, therefore, may not be retransmitted to any party
outside of the recipient's organization without the prior written consent of the sender. If you have
received this e-mail in error please notify the sender immediately by telephone or reply e-mail and
destroy the original message without making a copy. Wargaming.net accepts no liability for any losses or
damages resulting from infected e-mail transmissions and viruses in e-mail attachment. kgzO3mXGcg
Diego Ximenes Mendes | 17 Nov 01:59 2015

Playing with unchoke


I compiled libtorrent 1.0.3 with the following modification: I inserted
"return false;" in the first line of the "bool
peer_connection::send_unchoke()" function. Therefore I consider that no
unchoke message is sent.

Then, with one seed and one leecher, the leecher is able to download the
file, even considering that the leecher is choked by the seed (checked
through peer_info), which is an unexpected behavior.

Am I missing something?
Arvid Norberg | 14 Nov 08:17 2015

libtorrent 1.0.7 released

it's up on github:

Fixes since previous release:

* fix bug where loading settings via load_state() would not trigger all
  appropriate actions
* fix bug where 32 bit builds could use more disk cache than the virtual
  address space (when set to automatic)
* fix support for torrents with > 500'000 pieces
* fix ip filter bug when banning peers
* fix IPv6 IP address resolution in URLs
* introduce run-time check for torrent info-sections beeing too large
* fix web seed bug when using proxy and proxy-peer-connections=false
* fix bug in magnet link parser
* introduce add_torrent_params flags to merge web seeds with resume data
  (similar to trackers)
* fix bug where dont_count_slow_torrents could not be disabled
* fix fallocate hack on linux (fixes corruption on some architectures)
* fix auto-manage bug with announce to tracker/lsd/dht limits
* improve DHT routing table to not create an unbalanced tree
* fix bug in uTP that would cause any connection taking more than one second
  to connect be timed out (introduced in the vulnerability path)
* fixed falling back to sending UDP packets direct when socks proxy fails
* fixed total_wanted bug (when setting file priorities in
* fix python3 compatibility with sha1_hash


Arvid Norberg
(Continue reading)

mengze.jin | 11 Nov 11:37 2015

run examples fail on the mips board

Finally I built everything ok.But when I tried to run examples on the mips board,it encountered bugs.I
don't know why this happened....the program runs perfectly on Ubuntu
Because of the openwrt system's fcntl.h don't have function posix_fallocate, when building in mips ,the
file.cpp will get an error at line 2317.So I defined TORRENT_HAS_FALLOCATE to 0 here

It's this the cause of bugs? If not,what's the possible  problem

The information is on the following:

root <at> Hiwifi:/tmp# ./simple_client
Bus error (core dumped)
root <at> Hiwifi:/tmp# ./gdb simple_client

dlopen failed on 'libthread_db.so.1' - File not found
GDB will not be able to debug pthreads.

GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mips-linux"...
(gdb) r
Starting program: /tmp/simple_client
warning: no loadable sections found in added symbol-file /lib/ld-uClibc.so.0
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

(Continue reading)

mengze.jin | 9 Nov 12:13 2015

Could not find the boost lib in the cross-compile environment

  When I was running the configure in the corss-compile env.(in the env, some command will be replaced ex. Gcc
to mipsel-openwrt-linux-gcc  ld to mipsel-openwrt-linux-ld...etc)
checking for boostlib >= 1.36  will fail
My boost is building by bjam set the gcc to mips g++
Then I put the lib so files to /usr/mips/boost/lib  and the include files to /usr/mips/boost/include.
echo $BOOST_ROOT return a correct path
But configure fail either..
I tried ldconfig ,  add the path to the ld.so.conf...
All of these don't work...

When I try to use bjam, the error is no jamfile
[cid:image001.png <at> 01D11B22.174B1690]
  I've already export the BOOST_BUILD_PATH
I think it should find the jamfiles in the libtorrent's source path
Can you help me ?

Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
Libtorrent-discuss mailing list
(Continue reading)

MooPolice | 7 Nov 11:28 2015

ip filter in trunk

Newly added torrents do not get the ip filter from the session. Is this intentionally and the 
client has to assign the filter or is this a bug?