41 Commits

Author SHA1 Message Date
Miguel Freitas
1c95fa8cd9 implement new peek / hashcash extension in our libtorrent fork
discussion here: https://groups.google.com/d/msg/twister-dev/oDKUr9oOBHg/6rzqqKoUCQAJ
2015-12-10 21:59:18 -02:00
Miguel Freitas
1056d874bf introducing a new torrent piece property to be persisted on disk: max_seen
is the maximum availability (peer count) ever seen for this piece.
new rpc getpiecemaxseen.
2015-05-30 20:49:13 -03:00
Miguel Freitas
57b554f7cf add another flag field to getposts to allow selecting only DMs or RTs.
hint: to get (encrypted) DM posts use values "2 2"
2015-04-19 17:30:41 -03:00
Miguel Freitas
4a365f68b4 fix for picky compiler complaining about no return 2014-12-24 17:53:56 -02:00
Miguel Freitas
3931001e9b fix getpost memory leak. fixes miguelfreitas/twister-html#161 2014-06-03 17:29:03 -03:00
Miguel Freitas
aa312dfc39 reduce the dht traffic load due to mostly useless tracker requests 2014-02-25 16:06:42 -03:00
Miguel Freitas
77d856916c allow DHT tracker to report untested peers in case we are short of "known good" ones (recently connected).
this change permit some peers from resume file to be reported right away, without waiting torrent to unpause.
2014-02-21 19:27:58 -03:00
Miguel Freitas
36cf59c705 prioritize trackers. announce to dht even if paused. another try to fix #159. 0.9.17. 2014-02-20 19:52:47 -03:00
Miguel Freitas
85be748663 trying to improve torrent connectivity in the long run: relax peer banning.
don't preserve banned_list on startup. peers could have been banned due to changes in
block chain (invalid key or height). we shouldn't keep them banned forever.
somewhat related to #15.
2014-01-24 09:14:13 -02:00
Adam Williamson
5d11289b4c fix some 'format not a string literal's 2014-01-07 19:41:51 -08:00
Miguel Freitas
8e80324c36 try to reduce the level of useless dht tracker requests by not announcing empty torrents we do not follow. 2014-01-06 21:59:40 -02:00
Miguel Freitas
8287b2b1e1 use a single database for all swarms of the same libtorrent session.
upgrade resume file to version 2 and enforce on loading (to force existing clients to download all pieces again).
fixes #24.
2014-01-06 15:10:32 -02:00
Miguel Freitas
60db413630 less noisy 2013-12-30 12:14:03 -02:00
Miguel Freitas
1ae5745151 another we_dont_have() due to disk read error.
the idea is to help recovering faster from db corruption problems.
2013-12-12 19:07:50 -02:00
Miguel Freitas
8328c7222f use we_dont_have to recover from corrupt swarm database.
eventually we will download the pieces again (it works)
2013-12-11 22:17:42 -02:00
Miguel Freitas
9aec1f6c73 libtorrent fix from upstream 2013-11-25 23:22:59 -02:00
Miguel Freitas
77cfe2cd6c libtorrent fix: should prevent the infinite sequence of auto manager triggering 2013-11-23 12:38:50 -02:00
Miguel Freitas
2c256b6edb implement piece verification using old signatures. now i can reenable banning peers due to bad pieces. 2013-11-06 09:22:05 -02:00
Miguel Freitas
658ed6054a export number of known torrent peers (list_peers) to the dht tracker resource and use it
as estimative to the number of followers. at least we get the number of *online* followers.
2013-11-05 22:54:53 -02:00
Miguel Freitas
2cd0b0a881 rescandirectmsgs: rescan all streams of users we follow for new and old directmessages 2013-10-28 22:59:43 -02:00
Miguel Freitas
c9e2b88920 try another improvement to local dht tracker updating: currently connected nodes or recently connected (4 hours) 2013-10-28 19:42:36 -02:00
Miguel Freitas
40803b910c improve last commit: only announce to local dht tracker if we ever connected to peer. 2013-10-28 18:58:29 -02:00
Miguel Freitas
ac76c967ae do not add peers with high failcount to the local dht tracker 2013-10-28 18:05:13 -02:00
Miguel Freitas
c0ec1f4afe Until old public key is properly used, disable banning torrent peers due to bad piece hashes.
+note: torrent.cpp line 3286 (function piece_failed), iteration to ban peers is disabled (continue)
2013-10-26 00:43:32 -02:00
Miguel Freitas
19f5c3cc0e -1 is not used anymore for max_id since it breaks "geting up to post 0" 2013-10-13 18:05:56 -03:00
Miguel Freitas
73c4a88516 remove "unfinished" entry of resume file. it makes no sense when pieces per block = 1 2013-10-10 19:30:07 -03:00
Miguel Freitas
cb7f080b75 less noisy. disable some dht announce and already connected messages 2013-10-06 23:02:30 -03:00
Miguel Freitas
dc3b1b2c47 keep track of rt and dm messages and filter dm from get_pieces (getposts rpc) 2013-09-21 16:18:56 -03:00
Miguel Freitas
5e68d4e2ae new getposts rpc 2013-09-20 18:59:31 -03:00
Miguel Freitas
98903d5a73 keep track of last "have" for each torrent 2013-09-18 08:47:26 -03:00
Miguel Freitas
cefb94e321 allow bitfield with different number of pieces 2013-09-17 07:24:27 -03:00
miguel
ef084487f4 fix torrent/swarm path and add resume file 2013-09-03 07:08:07 -03:00
miguel
5112e73a07 newpostmsg command, working. 2013-08-20 12:18:03 -03:00
miguel
e4a943c745 some crash fixes, disable ut_metadata, fix m_name 2013-08-18 17:23:17 -03:00
miguel
6fb557e33c more untested stuff: try to preserve piece_size when reading from disk.
first signature checking instead of hash.
2013-08-18 09:53:35 -03:00
miguel
6b9c27048e partial untested torrent chages. will use leveldb for storage, no more multi-files per torrent, number of pieces may increase. 2013-08-17 20:12:44 -03:00
Miguel Freitas
7af7927f5d some more debuging to make sure new dht announce x torrent peers is working 2013-08-11 21:45:45 -03:00
Miguel Freitas
d149565509 avoid adding ourselves to torrent peers 2013-08-11 20:40:45 -03:00
Miguel Freitas
24fd6a6a8a start torrent automatically for neighbor of tracker 2013-08-11 19:45:29 -03:00
Miguel Freitas
662c5fa833 big announce / getPeers change
1) getPeers is obsolete, peers are obtained from getData with r="tracker", t="m"
2) announce api of node.cpp is used to update our own memory table (of the tracker)
3) announce api of node.cpp only do getDate/announce to the network if peer is the local one
4) announcement rpc (to the network) might be removed in future (not sure)
2013-08-09 21:34:00 -03:00
Miguel Freitas
b8b2302d59 added libtorrent (svn rev 8690) 2013-07-28 20:41:06 -03:00