Skip to content

v0.10.0

Choose a tag to compare

@github-actions github-actions released this 04 Oct 19:56
· 11 commits to main since this release

mtorrent v0.10.0

Changes since v0.9.0 (includes v0.9.1).

New features

  • Selective download (#58): you can now download only some files of a multi-file torrent.
    • mtorrent-cli --list-files <file.torrent> prints the files with their 0-based indices and sizes.
    • mtorrent-cli <torrent> --files 1,3,4 (or -f) downloads only the selected files. Other files created by mtorrent are deleted when the download stops. Files that already existed beforehand are kept.
    • You can't use --files together with --seed. Invalid indices cause an error.
    • The mtorrent library API takes the files to select, not the files to exclude.
    • Announces and state snapshots (StateSnapshot) now take the file selection into account.

Reliability and correctness

  • The download doesn't finish until all downloaded pieces are verified (#55).
  • Downloaded pieces aren't advertised to peers until they are verified.
  • Pieces loaded from the progress file are checked again on startup. Progress for excluded pieces isn't restored.
  • The download stops if a critical task exits too early, instead of continuing in a broken state (#56).
  • The last block received from a peer is kept if the peer disconnects.
  • Out-of-range metadata requests no longer cause an overflow.
  • A peer is no longer disconnected when metadata storage fails during content download.
  • mtorrent reconnects to a peer after a BrokenPipe error.
  • If path validation fails, storage no longer leaves empty files behind.
  • Each stage now ends with exactly one final state snapshot.

uTP improvements (#57)

  • Added a reorder buffer for packets that arrive out of order.
  • Fixed RTT estimation, which could never decrease.
  • A received ack is no longer thrown away after sending data.
  • Unsupported packets are dropped without closing the connection.
  • Unreachable peers are disconnected immediately.

Maintenance

  • mtorrent-cli: replaced the unmaintained dirs-next crate with dirs.
  • dht: renamed client.rs to outgoing.rs; refactored core::ctx to remove duplicated code.
  • Tests: integration tests remove their test directory when they fail; fixed a flaky test_complete_torrent test.
  • Codecov targets are now 90% for PRs and 85% overall. Added unit-test guidelines to AGENTS.md.

What's Changed

Full Changelog: v0.9.0...v0.10.0