Skip to content

Releases: alanmcgovern/monotorrent

v2.0.0-alpha.unstable.rev0112

17 Feb 07:44
Compare
Choose a tag to compare
Pre-release

General

  • Some minor tweaks to ensure the new piece picking system is not initialised until after the torrent metadata has been downloaded, when downloading torrents using a magnet link.
  • Simplified the interaction between the in memory disk cache and IPieceWriter by introducing IBlockCache. The engine downloads in blocks of 16kB and IBlockCache is designed to cache these blocks of data. When something needs to be flushed to disk from the memory cache the engine will translate from the 16kB block (indexed by piece, offset and length) to the ITorrentFile the data needs to be written to, which IPieceWriter will then use.

v2.0.0-alpha.unstable.rev0107

10 Feb 11:13
Compare
Choose a tag to compare
Pre-release

General

  • Refactored the piece picking API to simplify the way custom picking algorithms can be implemented. IPiecePicker is responsible for tracking which blocks have been requested from each peer. IPieceRequester is responsible for determining how to prioritise piece requests, and which peer to attempt to download new blocks from.

For example the StreamingPieceRequester uses StandardPicker to prioritise pieces which are needed immediately by issuing multiple requests for blocks in those pieces, and by requesting them off peers who have high transfer rates. It then limits the number of outstanding requests for lower priority pieces so that it can react quickly if the user seeks to a new position in the stream.

Similarly, the StandardPieceRequester uses a StandardPicker to implement normal bittorrent rarest-first downloading logic. The standard requester will also automatically begin issuing duplicate requests for blocks once every block has been requested at least once.

The same StandardPicker is used by bother IPieceRequester implementations as it is flexible enough to support nearly every usecase.

  • Some small fixes around the new immutable API for setting allowed encyption types.
  • Add the necessary API to set EngineSettings.DiskCacheBytes and ensured this can be set to 0 to disable the in-memory disk cache. This is now off by default as it is still experimental.

v2.0.0-alpha.unstable.rev0037

19 Dec 15:26
Compare
Choose a tag to compare
Pre-release

General

  • Simplified the logic controlling when a piece should be downloaded by a single peer or multiple peers.
  • When using StreamingPiecePicker high priority pieces default to multi-peer download mode (each block may be requested from a different peer). Low priority pieces will be downloaded as normal.
  • Peers whose upload bandwidth is lower than 1kB/sec, averaged over 15 seconds, are now disconnected so higher performing peers can be discovered.

v2.0.0-alpha.unstable.rev0031

18 Dec 01:48
Compare
Choose a tag to compare
Pre-release

General

  • Small optimisation to reduce lock contention on the main loop.
  • Fixed a bug in MemoryWriter where it was incorrectly flushing data to disk and could lose data, or throw an error, as a result.
  • Ensured all data is flushed to disk before entering 'Seeding' mode.
  • Improved the performance of 'WaitForPendingWritesAsync' in the disk manager.
  • Improved handling for pieces which are partially downloaded by one peer who disconnects before the piece has completed.
  • Optimised seeking in the streams created by StreamProvider so pending piece requests are not unconditionally cancelled whenever a Seek operation occurs.
  • StreamProvider now relies on the ClientEngine's DiskManager to read data. This ensures it works when the memory cache is enabled.
  • Return 0 when EOF is reached in a stream created by StreamProvider, rather than throwing an error when too many bytes are read.
  • When creating a stream using StreamProvider with pre-buffering enabled, the Stream is now at position 0 rather than position 1.

v2.0.0-alpha.unstable.rev0017

10 Dec 01:04
Compare
Choose a tag to compare
Pre-release

General

Changes since previous alpha:

  • EngineSettings and TorrentSettings are now immutable objects. You can use EngineSettingsBuilder and TorrentSettingsBuilder to create a new Settings object from scratch, or to create one based on an existing Settings object. Once a new immutable Settings object has been created, you must call ClientEngine.UpdateSettingsAsync or TorrentManager.UpdateSettingsAsync, as appropriate. The new settings will have been applied once the returned Task completes. If any listen ports are altered, and port forwarding is enabled, the old port will be unmapped and the new port will be mapped.

  • Dht can be enabled by setting EngineSettings.DhtPort instead of manually constructing a DhtEngine and DhtListener. The default is to enable Dht on UDP port 52193.

  • Port Forwarding can now be enabled/disabled by setting EngineSettings.AllowPortForwarding to true or false. The default is true.

  • Any EngineSetting associated with a TCP or UDP port can be set to '-1' to disable the feature, '0' to dynamically select any available port, or a specific port number to bind to. If '0' is specified and port forwarding is enabled, the dynamically bound port will be forwarded automatically.

  • Small tweak to use a low-allocation custom implementation of SemaphoreSlim built on top of ReusableTask. Reduces allocations by about 25%.

  • Improved how the PiecePicker allocates blocks from a single piece to multiple peers. The new approach is less proactive about assigning multiple peers to a single block, which in turn greatly improves the efficiency of Incremental Hashing without affecting download speeds. Recent experiments have shown that over 98% of pieces can be hashed without having to write the block to disk and read it back at a later point.

  • MonoTorrent now defaults to using a 5 megabyte memory cache for pieces which need to be written to disk. This further improves the efficiency of Incremental Hashing as blocks which are received out-of-order will be available in-memory rather than having to be read from disk.

Warning

This release contains API breaking changes in comparison to MonoTorrent 1.x series. There may be further API breakages before 2.x is finalised.

v2.0.0-alpha.unstable.build1

10 Dec 00:48
Compare
Choose a tag to compare
Pre-release

This is the first of a series of alpha releases for the upcoming MonoTorrent 2.0 release. There have been a number of API breaking changes in this release, with a few more being finalised before we enter the stable-API phase and hit a 2.0 beta/stable release.

There are too many changes to list.

v1.0.28

25 Nov 00:18
Compare
Choose a tag to compare

General

  • Improved support for BEncodedDictionary objects which have not been created according to the spec. If a torrent file has keys which are mis-ordered MonoTorrent will now generate an InfoHash for the torrent based on the raw bytes representing the unordered keys. This is the approach allowed by the spec.

v1.0.27

25 Nov 00:22
Compare
Choose a tag to compare

General

  • Small tweaks to improve the speed at which DHT reports a 'Ready' status. Originally the DHT engine would report ready only after all initialization messages had received a response or timed out. Now the engine will report as ready when at least 32 live nodes are in the table. The result is that bootstrapping DHT can now complete within a few seconds.

v1.0.26

24 Nov 00:10
Compare
Choose a tag to compare

General

  • Fixed a bug in webseed support which could result in data not being requested.

v1.0.25

14 Nov 14:15
Compare
Choose a tag to compare

General

  • Updated to use Mono.Nat 3.x and ReusableTasks 2.x.