MonoTorrent 0.62

 Posted by: Alan on 2008-11-08

MonoTorrent 0.62 has now been released which addresses a few major and minor issues with the 0.60 release. Here's the details:

* Fixed regression in message handling which resulted in 0.60 not transferring properly. Caused by not running the right NUnit tests before tagging.
* Performance optimisation for sending/receiving messages
* Fixed bug creating torrents with 2gb+ files with TorrentCreator
* Fixed issue with udp sockets in the Dht code which could cause dht to stop sending/receiving messages

I'd highly recommend upgrading from 0.60 to 0.62 as soon as possible.

MonoTorrent 0.60

 Posted by: Alan on 2008-11-02

MonoTorrent 0.60 has been released. This is the first release to have DHT enabled and available by default. The major fixes/features are listed below:

Bug fixes:
* Fixed critical regression in 0.50 whereby transfers would be incredibly slow.
* Fixed issue where announce/scrape requests to offline trackers may never time out
* Added a few memory optimisations when reading piece data from disk.
* Add the ability to report an alternate IP/Port combo to the tracker
* Optimised the encrypted handshake - its now a bit faster
* Fixed bug where wrong message ID was sent for extension messages
* Fixed bug where pieces which do not exist would be requested from webseeds.
* Fixed several bugs in TorrentCreator class where relative paths were used instead of absolute paths.
* Disabled UdpTracker support as the current implementation locked up until a response was received.
* Fixed a possible issue with multi-tier torrents.
* Added the ability to tell whether peers come from PeerExchange, DHT or the tracker.
* Some big performance boosts for webseeds by using a better method of picking pieces.
* Fixed a corner case whereby certain torrents may not get their last piece requested.
* When hosting a tracker,"/announce" is appended when you use the construtor overload which takes an IPEndPoint.

New Features:
* Implemented DHT support.
* Implemented sparse file support on the NTFS file system.

All in all, an awesome release. I have to give a shout out to Matthew Raymer who has been tirelessly testing MonoTorrent for the last few weeks. Without his constant bug reports, some of those bugs would never have been found, such as the one with UdpTrackers. Great stuff.

MonoTorrent 0.50

 Posted by: Alan on 2008-10-06

It's release time! Yes, MonoTorrent 0.50 has hit. Just navigate yourself to the Download page and download away.

There have been a lot of changes since the last release, and this time, it's more than just under the hood fixes. There are several reasons why the new release is so much better than previous releases, here's a few of the more important ones:

WebSeeding Support
There is provisional support for Http Web Seeding. This means when you're hosting a torrent, you can add standard Http servers as 'seeds'. No extra configuration is needed. This is still an experimental feature, and still has some corner cases where it doesn't work, all bug reports on this are welcome!

IP Address Banning
You can now ban individual IP addresses or IP Address ranges. Block lists from Emule, PeerGuardian and SafePeer are supported out of box by the built in parser, and any custom list can easily by loaded so long as you can parse the list into IPAddress objects. Internally the banlist is stored using the extremely efficient RangeCollection written by Aaron Bockover.

Efficent Torrent Streaming
Thanks to the efforts of Karthik Kailash and David Sanghera, we now have a special downloading mode in MonoTorrent which allows you to efficiently stream audio/video. Psuedo random piece picking is used to ensure you download pieces from a 'high priority' range before anything else. User code can set this 'High priority' range to be the next X bytes of data. When everything in the high priority range is downloaded, standard rarest-first picking is used.

Peer Exchange
uTorrent style Peer Exchange support is supported thanks to the tireless efforts of Olivier Dufour. This extension allows peer information to be passed across a bittorrent connection. In practice this means that if the tracker only gives you 1 peer, you can discover (potentially) hundreds more via peer exchange.

Enhanced compatibilty with broken clients
There are still clients out there which transmit corrupted BEncodedDictionary objects. These guys need to read the spec and ensure that their dictionaries keys are sorted using a binary comparison. In the cases where the order appears to not matter, I've implemented support for ignoring the error. This should reduce the number of clients which are disconnected due to sending corrupt messages - this means higher performance.

Simplified Threading API
The core of MonoTorrent has undergone a complete rewrite. Previously, all the worker threads interacted with the core by taking out locks, then doing their work. This meant that implementing something as trivial as cancelling a pending asynchronous request was actually pretty hard. That method was actually horrendously prone to deadlocking the engine.

Nowadays all the worker threads add a task to the main thread, and the main thread does all the work. "What about the performance" i hear you ask, well, it performs the exact same, but it's so much easier to maintain and add new features to.

It also means the engine should be deadlock free, because there are no locks anymore. Nice.

NUnit Tests
As with all big software projects, regressions are bad. A year ago I had virtually no NUnit tests. Nowadays there are over 130 NUnit tests for the engine. While this doesn't even test 1/2 the code in MonoTorrent, each test adds that little bit more certainty that I don't regress.

There are also a bunch bugfixes here and there, and more big features in the pipeline. As a taster, DHT support is already active and enabled in SVN should you wish to test it out.

MonoTorrent 0.40

 Posted by: Alan on 2008-06-19

MonoTorrent 0.40 has been released. The changeset is quite small as compared to previous releases, though there has been significant under the hood work to improve stability and performance. As usual, the release can be found on the downloads page.

Bugs and features:

* Faster SHA1 hashing (40%)
* RC4Header-only encryption working now
* Fixed rare issues in the encryption handshake
* Fixed possible race condition when stopping torrents
* Refactored the encryption API
* Fixed issue when hashing a torrent after the files had been deleted from disk

I aim to release MonoTorrent 0.50 in the next few weeks, which will be filled with oodles of tasty new features.

MonoTorrent 0.2 Released

 Posted by: Alan on 2008-01-29

MonoTorrent 0.2 has been released. It contains a lot of fixes and features. Check it out, and as always, visit the forums (http://monotorrent.forumer.com) with any questions/bug reports!

Client

Features
Linear piece picking possible
- This mode of operation chooses pieces towards the start of the file where possible. This should not be a publicly settable option in a GUI. It could be automatically set until the first 20 pieces in a torrent are received to allow for previewing. For general usage, this is a very inefficient way to download.
Full choke/unchoke algorithm implemented (Andy Henderson)
- Full tit-for-tat algorithm implemented. This improves download rates and upload rates and is pretty slick.
Sub-optimal implementation of code used to connect to peers made optimal
- Fixed corner case where a connection wouldn't be cleaned up correctly
- Significantly faster startup performance in cases where remote peers don't support encryption and encryption is enabled
Rate limiting for Disk IO implemented
Configurable amount of open filestreams
Reduced disk thrashing when multiple torrents hashing simultaneously
Files are not preallocated anymore
TorrentManager will never block when .Start() is called
The Tracker base class made more extensible (Eric Butler)
- An example usage would be if a person had peer details stored in a database. They could implement a 'DataBaseTracker' class, register it with the engine, then monotorrent could announce to that tracker and retrieve peers from the database. Thanks to Eric, this is hugely simplified and is now trivial to implement.




Bug Fixes
Piece Requesting
Fixed bug where a piece could be requested twice
When a corrupt piece is received, ensure all contributing peers are marked
Fixed a possible null ref when removing pending piece requests when a connection is closed

Torrent Creator
When creating an (optional) MD5 hash in the torrent creator, open the files in read-only mode (Roger Zander)
Creating torrents no longer spins up an extra thread when using the synchronous method (Eric Butler)
Fixed possible race conditions when creating a torrent using the asynchronous methods
Private key is retained when creating torrents

Misc
Per-file progress is updated correctly.
Fixed detection of when a tracker supports scrape - It should have been case insensitive
Added extra check to make sure a scrape request is only performed if the tracker supports scraping
Added extra logic checks to help prevent the loading of incorrect fastresume data
When a peer sends a HaveAll message - it is correctly marked as being a seeder
PieceHashed event fired under all circumstances



Tracker
The MonoTorrent.Tracker got a major rewrite. Highlights include:
- more than 1000x memory reduction for trackers hosting a large number of torrents. 1000 torrents can be hosted in ~30kB. Previously would have required ~30MB.
- Faster more efficient announce handling. For large trackers, lookups are significantly faster
- Vastly simplified announce handling. It is now trivial to write code to handle incoming connections from differing sources. A typical example would be to create an AspNetHandler to handle connections in an ASP.NEt project. It requires less than 20 lines of code to be written.


Download Links are available here: http://monotorrent.21.forumer.com/viewtopic.php?t=159

I will update the websites download links page shortly

Beta 4 Released!

 Posted by: Norton on 2007-04-28

A few bugs have been quashed since the last release. One of the most important updates is that there's now a usable client! The previous GTK# client was extremely limited and just plain didn't work in a lot of situations. That has now been replaced by a brand spanking new WinForms based client. For those of you that don't understand the technobabble it means you no longer need GTK# installed to run the client. It'll just run so long as you have the .NET framework installed.

As usual, check out the download page for links to the source and the latest release.

Here's a list of some of the bugs that have been fixed since the last release:
* Using (substantially) less threads and (slightly) less memory than ever before.
* Selecting pieces to download is faster than ever before, meaning less CPU time needed.
* TorrentCreator has been reworked substantially. Much easier to use, and works better.
* Removed race condition where double announces might happen, however it never happened in practice.
* Correctly disconnecting peers if the limit is reached.
* Deciding whether a peer is interesting or not used to break when only 1 peer was connected.
* Removed a (partially) infinite loop if you downloaded faster than your HD can write.
* Fixed bug in disconnecting peers when encryption is enabled.
* Added a lot of features for developers using the library
* Lots of minor fixes and optimisations aswell....

Critical fix for Beta 3

 Posted by: Alan on 2007-03-21

Beta 3b has been released which contains the following critical fix:

* Bugfix for locally disconnecting sockets. Torrents should now stop downloading correctly.

It also contains some major memory improvements for torrents which contain a large number of pieces. The more pieces a torrent has, the greater the memory savings. For a torrent with ~250 pieces average memory usage should decrease by approximately 150-200kB. For a torrent with 80,000 pieces memory usage should decrease by approximately 800-1000kB.

It is recommended that *all* downloads of Beta3 should be replaced with 3b as soon as possible.

New Forum

 Posted by: Alan on 2007-03-20

I've opened a forum at http://monotorrent.forumer.com. So any questions, bug reports, feature requests and whatnot should be directed there.

PreBeta 3 - It's finally here

 Posted by: Alan on 2007-03-19

An unbelievable amount of work has gone into pre beta three, not just by me, but by David Wang and several other contributors (who i really must start naming in a file that i give out with the binaries). The list of bug fixes and new features is huge. To get it, check out the download page.

Now for a brief overview:
* Bugfixs
* Engine will no longer show inaccurate/wrong download or upload speeds
* In cases where downloading is faster than writing to disk, download speed will be throttled to let the harddrive catch up
* Fixed several bugs relating to peer messaging
* Peers who send invalid messages are now correctly dropped
* BitField encoding has been fixed so that they are always encoded correctly
* Correctly counting how many messages have been queued to download off a peer and upload to a peer
* The buildscripts are now working correctly on all platforms.

* Enhancement
* API improvements, for devs using the API, it's now more consistant
* A lot more information about each peer is now available to developers using the library themselves
* Recognising the name/version of many other clients
* Fast Peers Extensions are now 100% supported and enabled. This results in faster downloading of torrents during the first few minutes
* When in "seeding" mode, other seeds are disconnected
* Sanity checking the size of piece requests to avoid certain types of attacks by rogue clients
* UPnP support. For those of you with uPnP routers ports can now automatically be forwarded
* EndGame mode is now better supported and should no longer download excess data when it's not needed
* Connection Encryption is now fully supported and enabled by default
* A lot of logic has been rearranged so that it excutes immediately upon the appropriate message arriving resulting in faster overall performance.

* Efficiency Updates
* Memory usage has been decreased (yet again). Typically using a few hundred kilobytes less memory than previous versions.
* Cpu usage has been decreased (yet again). Harder to measure exactly, but i have added fastpaths to the most frequently executed areas of code which should result in less CPU usage overall.

Just to put things in perspective, there have been over 160 commits to the code since the last revision. That's a lot of changes.

Beta 2

 Posted by: Alan on 2007-01-22

Beta 2 i now out. It's available on the download page, so give it a shot and keep those bug reports coming in.

Bugfixes and new features include:
*Automatic banning of peers which repeatedly send bad pieces (100% accurate).

* Automatic loading of torrents from any location. Currently supports monitoring of folders, but could be easily extended to monitor RSS feeds, emails or whatever you want.

* No more crashes when disposing the engine or stopping the torrent when only one torrent is in the engine.

* BencodedStrings are now compared correctly in all cases.

* Torrents with individual files more than 2gb in size are how handled correctly

* No longer sending messages i advertise i don't support.

* Now showing a *lot* more information in the peer class such as download speed, upload speed, peer status (choked/interested etc), bytes uploaded/downloaded etc.

* Misc performance and stability fixes.

Site Launch

 Posted by: Alan on 2006-12-24

This is the official launch of the MonoTorrent.com website. Check out the downloads page for links to download the example MonoTorrent GUI. A sample console application will be added soon aswell along with (hopefully) more content. The sample application supplied should run on MacOS X, Windows and Linux without a bother. Please report any bugs with either the applications or the website to monotorrent@gmail.com.

If anyone plans on using MonoTorrent in another application, please let me know so i can keep tabs on who's using it. Mostly so i can email ya with any breaking news/events.

Lastly, Happy christmas everyone! Have a good one.