Releases: alanmcgovern/monotorrent
v2.0.0-alpha.unstable.rev0112
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 introducingIBlockCache
. The engine downloads in blocks of 16kB andIBlockCache
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 theITorrentFile
the data needs to be written to, which IPieceWriter will then use.
v2.0.0-alpha.unstable.rev0107
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 to0
to disable the in-memory disk cache. This is now off by default as it is still experimental.
v2.0.0-alpha.unstable.rev0037
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
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
General
Changes since previous alpha:
-
EngineSettings
andTorrentSettings
are now immutable objects. You can useEngineSettingsBuilder
andTorrentSettingsBuilder
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 callClientEngine.UpdateSettingsAsync
orTorrentManager.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 aDhtEngine
andDhtListener
. The default is to enable Dht on UDP port 52193. -
Port Forwarding can now be enabled/disabled by setting
EngineSettings.AllowPortForwarding
totrue
orfalse
. The default istrue
. -
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
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
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
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
General
- Fixed a bug in webseed support which could result in data not being requested.
v1.0.25
General
- Updated to use Mono.Nat 3.x and ReusableTasks 2.x.