]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
6 years agoFix fs test link now that Debian 9.2 came out
Matt Joiner [Thu, 12 Oct 2017 06:52:15 +0000 (17:52 +1100)]
Fix fs test link now that Debian 9.2 came out

6 years agoIf closing a connection Conn fails we can't do anything, and there's nothing to say
Matt Joiner [Thu, 12 Oct 2017 06:51:47 +0000 (17:51 +1100)]
If closing a connection Conn fails we can't do anything, and there's nothing to say

6 years agoAdd apt-get update to CI
Matt Joiner [Thu, 12 Oct 2017 05:32:11 +0000 (16:32 +1100)]
Add apt-get update to CI

6 years agoTrack completion known to implementation state
Matt Joiner [Thu, 12 Oct 2017 05:09:32 +0000 (16:09 +1100)]
Track completion known to implementation state

Addresses #193

6 years agoAvoid race condition in test
Matt Joiner [Thu, 12 Oct 2017 05:06:14 +0000 (16:06 +1100)]
Avoid race condition in test

6 years agoPerformance optimizations to calculating bytes left in Torrent
Matt Joiner [Sat, 23 Sep 2017 05:28:13 +0000 (15:28 +1000)]
Performance optimizations to calculating bytes left in Torrent

Was generating significant overhead in cmd/torrent

6 years agostorage: Remove incorrect comment
Matt Joiner [Sat, 23 Sep 2017 05:27:26 +0000 (15:27 +1000)]
storage: Remove incorrect comment

6 years agoChanges to Bitmap referencing
Matt Joiner [Sat, 23 Sep 2017 05:27:10 +0000 (15:27 +1000)]
Changes to Bitmap referencing

6 years agoImplement new request strategy
Matt Joiner [Sat, 23 Sep 2017 05:25:47 +0000 (15:25 +1000)]
Implement new request strategy

The new strategy, 2, has the fastest connection download by priority in order, and all other pieces stick to a randomized ordering that's stable per connection.

6 years agofs: Some test tidying
Matt Joiner [Fri, 22 Sep 2017 03:46:00 +0000 (13:46 +1000)]
fs: Some test tidying

6 years agoIt looks like Torrent.worstBadConn was returning an arbitrary bad connection, it...
Matt Joiner [Thu, 21 Sep 2017 09:32:03 +0000 (19:32 +1000)]
It looks like Torrent.worstBadConn was returning an arbitrary bad connection, it wasn't the worst

heap.Init got lost somewhere along the way? Need a unit test for this.

6 years agoReduce system call overhead reading from connections
Matt Joiner [Thu, 21 Sep 2017 09:29:56 +0000 (19:29 +1000)]
Reduce system call overhead reading from connections

6 years agofs/test.sh: umount requires sudo
Matt Joiner [Mon, 18 Sep 2017 03:51:05 +0000 (13:51 +1000)]
fs/test.sh: umount requires sudo

6 years agoAlso post cancels
Matt Joiner [Mon, 18 Sep 2017 03:47:49 +0000 (13:47 +1000)]
Also post cancels

Should mean that we don't have to wait for the peer requests low water mark before we process chunks to cancel.

6 years agoAbstract out making a cancel message
Matt Joiner [Mon, 18 Sep 2017 03:42:42 +0000 (13:42 +1000)]
Abstract out making a cancel message

6 years agostorage: Don't add empty mmaps to the mmap span
Matt Joiner [Mon, 18 Sep 2017 03:41:19 +0000 (13:41 +1000)]
storage: Don't add empty mmaps to the mmap span

6 years agoOnly run connection.Close once
Matt Joiner [Mon, 18 Sep 2017 03:40:36 +0000 (13:40 +1000)]
Only run connection.Close once

Avoids unnecessary error messages for net.Conn.Close

6 years agoImprove mmap storage error messages
Matt Joiner [Mon, 18 Sep 2017 02:19:34 +0000 (12:19 +1000)]
Improve mmap storage error messages

Trying to map unusual Info's gave unhelpful messages.

6 years agotest.sh: Unmount and wait for torrentfs to return after completion
Matt Joiner [Mon, 18 Sep 2017 02:17:28 +0000 (12:17 +1000)]
test.sh: Unmount and wait for torrentfs to return after completion

6 years agoLog errors closing connection net.Conn's
Matt Joiner [Mon, 18 Sep 2017 02:16:59 +0000 (12:16 +1000)]
Log errors closing connection net.Conn's

6 years agoRename fs/unwedge-tests so it gets synced to test servers
Matt Joiner [Mon, 18 Sep 2017 02:16:05 +0000 (12:16 +1000)]
Rename fs/unwedge-tests so it gets synced to test servers

6 years agoUse badStorage for TestPeerInvalidHave
Matt Joiner [Mon, 18 Sep 2017 02:15:14 +0000 (12:15 +1000)]
Use badStorage for TestPeerInvalidHave

6 years agoRemove test temporary directories when finished
Matt Joiner [Mon, 18 Sep 2017 02:14:16 +0000 (12:14 +1000)]
Remove test temporary directories when finished

They're all grouped together in a parent directory that gets removed. Testing with mmap storage can generate very large files on bad filesystems.

6 years agoMove uploading to the connection writer
Matt Joiner [Mon, 18 Sep 2017 02:09:08 +0000 (12:09 +1000)]
Move uploading to the connection writer

6 years agoComment and formatting
Matt Joiner [Sat, 16 Sep 2017 14:45:12 +0000 (00:45 +1000)]
Comment and formatting

6 years agoFix build error
Matt Joiner [Sat, 16 Sep 2017 14:44:09 +0000 (00:44 +1000)]
Fix build error

6 years agoMerge pull request #188 from boramalper/KnownSwarm
Matt Joiner [Sat, 16 Sep 2017 14:20:00 +0000 (00:20 +1000)]
Merge pull request #188 from boramalper/KnownSwarm

added the initial version of the (t *Torrent) KnownSwarm() function

6 years agoadded support for half-open peers in KnownSwarm() function
Bora M. Alper [Sat, 16 Sep 2017 10:48:16 +0000 (11:48 +0100)]
added support for half-open peers in KnownSwarm() function

6 years agoMake type piece public
Matt Joiner [Fri, 15 Sep 2017 09:35:16 +0000 (19:35 +1000)]
Make type piece public

6 years agofs: Fix tests now that data verification isn't automatic
Matt Joiner [Fri, 15 Sep 2017 09:34:42 +0000 (19:34 +1000)]
fs: Fix tests now that data verification isn't automatic

6 years agoDon't verify data at startup, add Torrent.Piece.VerifyData and Torrent.VerifyData...
Matt Joiner [Fri, 15 Sep 2017 09:22:32 +0000 (19:22 +1000)]
Don't verify data at startup, add Torrent.Piece.VerifyData and Torrent.VerifyData for this purpose

This has the side effect of deflaking a lot of tests that race to verify data when a torrent is added.

6 years agoInclude peer data with half open connections
Matt Joiner [Fri, 15 Sep 2017 09:10:09 +0000 (19:10 +1000)]
Include peer data with half open connections

6 years agoHerp
Matt Joiner [Fri, 15 Sep 2017 02:56:54 +0000 (12:56 +1000)]
Herp

6 years agoAdd some expvars to track uTP/TCP and PHE fallbacks for outgoing connections
Matt Joiner [Fri, 15 Sep 2017 02:56:15 +0000 (12:56 +1000)]
Add some expvars to track uTP/TCP and PHE fallbacks for outgoing connections

6 years agomse: Make plaintext mode the default when protocol header encryption is in use
Matt Joiner [Fri, 15 Sep 2017 02:54:29 +0000 (12:54 +1000)]
mse: Make plaintext mode the default when protocol header encryption is in use

6 years agoFix panic when error occurs binding uTP socket
Matt Joiner [Wed, 13 Sep 2017 14:25:29 +0000 (00:25 +1000)]
Fix panic when error occurs binding uTP socket

Fixes #187.

6 years agoSupport plaintext crypto method for protocol header encryption
Matt Joiner [Wed, 13 Sep 2017 08:20:20 +0000 (18:20 +1000)]
Support plaintext crypto method for protocol header encryption

6 years agomse: Support plaintext crypto mode
Matt Joiner [Wed, 13 Sep 2017 06:19:14 +0000 (16:19 +1000)]
mse: Support plaintext crypto mode

6 years agomse: Error if initial payload exceeds maximum size
Matt Joiner [Wed, 13 Sep 2017 06:18:15 +0000 (16:18 +1000)]
mse: Error if initial payload exceeds maximum size

6 years agomse: Reuse writer write buffer
Matt Joiner [Tue, 12 Sep 2017 15:00:43 +0000 (01:00 +1000)]
mse: Reuse writer write buffer

6 years agomse: Add a read/write benchmark
Matt Joiner [Tue, 12 Sep 2017 14:58:54 +0000 (00:58 +1000)]
mse: Add a read/write benchmark

6 years agoadded the initial version of the (t *Torrent) KnownSwarm() function
Bora M. Alper [Tue, 12 Sep 2017 14:22:53 +0000 (15:22 +0100)]
added the initial version of the (t *Torrent) KnownSwarm() function

6 years agopeer_protocol: Improve piece decoding benchmark
Matt Joiner [Tue, 12 Sep 2017 11:32:01 +0000 (21:32 +1000)]
peer_protocol: Improve piece decoding benchmark

6 years agopeer_protocol: Add a benchmark for decoding pieces
Matt Joiner [Tue, 12 Sep 2017 11:12:56 +0000 (21:12 +1000)]
peer_protocol: Add a benchmark for decoding pieces

6 years agomse: Remove unused function
Matt Joiner [Tue, 12 Sep 2017 09:30:05 +0000 (19:30 +1000)]
mse: Remove unused function

6 years agoMerge branch 'master' into pull-writer
Matt Joiner [Tue, 12 Sep 2017 08:32:40 +0000 (18:32 +1000)]
Merge branch 'master' into pull-writer

6 years agostorage: Add TODO about handling Close errors
Matt Joiner [Tue, 12 Sep 2017 08:31:10 +0000 (18:31 +1000)]
storage: Add TODO about handling Close errors

6 years agoREADME: Improve wording around torrent as a library
Matt Joiner [Tue, 12 Sep 2017 08:30:54 +0000 (18:30 +1000)]
README: Improve wording around torrent as a library

6 years agoThe bencode README is markdown
Matt Joiner [Tue, 12 Sep 2017 08:30:06 +0000 (18:30 +1000)]
The bencode README is markdown

6 years agoMerge pull request #185 from mh-cbon/patch-1
Matt Joiner [Tue, 12 Sep 2017 08:28:35 +0000 (18:28 +1000)]
Merge pull request #185 from mh-cbon/patch-1

Update README

6 years agoRemove mention of the mobile branch from README
Matt Joiner [Tue, 12 Sep 2017 08:26:14 +0000 (18:26 +1000)]
Remove mention of the mobile branch from README

6 years agoUpdate README
mh-cbon [Tue, 5 Sep 2017 14:42:37 +0000 (16:42 +0200)]
Update README

6 years agoOptimize nextRequestState to return cancel and new requests, and reinstate requestsLo...
Matt Joiner [Sat, 2 Sep 2017 00:36:43 +0000 (10:36 +1000)]
Optimize nextRequestState to return cancel and new requests, and reinstate requestsLowWater

6 years agoWrap writerCond in tickleWriter and be more selective about using it
Matt Joiner [Fri, 1 Sep 2017 05:26:50 +0000 (15:26 +1000)]
Wrap writerCond in tickleWriter and be more selective about using it

6 years agoTestUTPRawConn: More tidying, and slow down the rate
Matt Joiner [Fri, 1 Sep 2017 05:22:08 +0000 (15:22 +1000)]
TestUTPRawConn: More tidying, and slow down the rate

6 years agoUse require in some places in TestUTPRawConn
Matt Joiner [Fri, 1 Sep 2017 05:09:10 +0000 (15:09 +1000)]
Use require in some places in TestUTPRawConn

6 years agoAvoid triggering writer cond where possible
Matt Joiner [Fri, 1 Sep 2017 02:09:41 +0000 (12:09 +1000)]
Avoid triggering writer cond where possible

6 years agoTrack buffered but not posted messages, and unify the expvar names for those counters
Matt Joiner [Fri, 1 Sep 2017 00:53:59 +0000 (10:53 +1000)]
Track buffered but not posted messages, and unify the expvar names for those counters

6 years agoRemove unused code
Matt Joiner [Fri, 1 Sep 2017 00:46:26 +0000 (10:46 +1000)]
Remove unused code

6 years agoAdd some variables to track fillBuffer effectiveness
Matt Joiner [Fri, 1 Sep 2017 00:36:43 +0000 (10:36 +1000)]
Add some variables to track fillBuffer effectiveness

6 years agocmd/torrent: Enhance debugging
Matt Joiner [Fri, 1 Sep 2017 00:35:40 +0000 (10:35 +1000)]
cmd/torrent: Enhance debugging

6 years agoGenerate requests, cancels and interest state in the connection writer
Matt Joiner [Thu, 31 Aug 2017 13:48:52 +0000 (23:48 +1000)]
Generate requests, cancels and interest state in the connection writer

6 years agoMake connection.writer pull from a buffer
Matt Joiner [Thu, 31 Aug 2017 06:26:45 +0000 (16:26 +1000)]
Make connection.writer pull from a buffer

6 years agoPanics while decoding messages in connection.mainLoopRead would trigger more panics
Matt Joiner [Thu, 31 Aug 2017 06:25:49 +0000 (16:25 +1000)]
Panics while decoding messages in connection.mainLoopRead would trigger more panics

6 years agoKeep rate limited reader reads to within the burst capacity
Matt Joiner [Thu, 31 Aug 2017 04:32:22 +0000 (14:32 +1000)]
Keep rate limited reader reads to within the burst capacity

6 years agoAdd peer_protocol.Message.MustMarshalBinary
Matt Joiner [Thu, 31 Aug 2017 04:30:53 +0000 (14:30 +1000)]
Add peer_protocol.Message.MustMarshalBinary

6 years agoSynchronize Torrent.Info
Matt Joiner [Tue, 29 Aug 2017 05:16:53 +0000 (15:16 +1000)]
Synchronize Torrent.Info

6 years agoGet torrentfs fuse test working
Matt Joiner [Tue, 29 Aug 2017 04:02:30 +0000 (14:02 +1000)]
Get torrentfs fuse test working

6 years agocmd/torrent: Include global dht starting nodes
Matt Joiner [Mon, 28 Aug 2017 10:54:37 +0000 (20:54 +1000)]
cmd/torrent: Include global dht starting nodes

6 years agoMerge branch 'fs-handle-reader'
Matt Joiner [Mon, 28 Aug 2017 07:28:05 +0000 (17:28 +1000)]
Merge branch 'fs-handle-reader'

6 years agoTry to reduce allocations in cipherReader
Matt Joiner [Mon, 28 Aug 2017 07:27:53 +0000 (17:27 +1000)]
Try to reduce allocations in cipherReader

6 years agoMaintain a torrent.Reader for each file handle
Matt Joiner [Sun, 27 Aug 2017 15:42:02 +0000 (01:42 +1000)]
Maintain a torrent.Reader for each file handle

This means that readahead will work much better. Addresses https://github.com/anacrolix/torrent/issues/182.

6 years agofs: Move file Read behaviour onto a new handle type
Matt Joiner [Sun, 27 Aug 2017 04:19:58 +0000 (14:19 +1000)]
fs: Move file Read behaviour onto a new handle type

6 years agofs/test.sh: Update torrentfs arguments and wait for info to be fetched so file isn...
Matt Joiner [Sun, 27 Aug 2017 04:03:10 +0000 (14:03 +1000)]
fs/test.sh: Update torrentfs arguments and wait for info to be fetched so file isn't found

6 years agoTestUnmountWedged: Don't deadlock if the Read fails
Matt Joiner [Sun, 27 Aug 2017 04:00:37 +0000 (14:00 +1000)]
TestUnmountWedged: Don't deadlock if the Read fails

6 years agocmd/torrentfs: Switch to tagflag and rename -torrentPath->-metainfoDir
Matt Joiner [Sun, 27 Aug 2017 02:25:51 +0000 (12:25 +1000)]
cmd/torrentfs: Switch to tagflag and rename -torrentPath->-metainfoDir

6 years agocmd/magnet-metainfo: Use tagflag
Matt Joiner [Sun, 27 Aug 2017 01:46:06 +0000 (11:46 +1000)]
cmd/magnet-metainfo: Use tagflag

6 years agoAdd CircleCI 2.0 turd
Matt Joiner [Sat, 26 Aug 2017 16:10:17 +0000 (02:10 +1000)]
Add CircleCI 2.0 turd

Adds tests for https://github.com/anacrolix/utp/issues/24, and mobile on the master branch. The UDP tracker test uses udp4 because of some bad behaviour on CircleCI.

6 years agofs: Add a test script
Matt Joiner [Sat, 26 Aug 2017 03:25:27 +0000 (13:25 +1000)]
fs: Add a test script

6 years agofs: Move fileNode stuff into its own file
Matt Joiner [Sat, 26 Aug 2017 03:25:04 +0000 (13:25 +1000)]
fs: Move fileNode stuff into its own file

6 years agoRemove unused functions
Matt Joiner [Sat, 26 Aug 2017 03:23:04 +0000 (13:23 +1000)]
Remove unused functions

6 years agoMake cmd/tracker-announce output a bit easier to consume
Matt Joiner [Sat, 26 Aug 2017 02:38:08 +0000 (12:38 +1000)]
Make cmd/tracker-announce output a bit easier to consume

6 years agoFix sync.Mutex copy by value
Matt Joiner [Fri, 25 Aug 2017 06:36:34 +0000 (16:36 +1000)]
Fix sync.Mutex copy by value

Found by go vet, per https://github.com/anacrolix/torrent/issues/179.

6 years agodht.ServerConfig.StartingNodes is now a function
Matt Joiner [Fri, 25 Aug 2017 06:28:27 +0000 (16:28 +1000)]
dht.ServerConfig.StartingNodes is now a function

Additionally cmd/torrentfs uses the global bootstrap nodes for its DHT. Aids with https://github.com/anacrolix/torrent/issues/180

6 years agoAdd some debugging routes and envpprof to cmd/magnet-metainfo
Matt Joiner [Fri, 18 Aug 2017 01:14:57 +0000 (11:14 +1000)]
Add some debugging routes and envpprof to cmd/magnet-metainfo

https://github.com/anacrolix/torrent/issues/178

6 years agoProvide default starting nodes to DHT if default torrent client config is used
Matt Joiner [Fri, 18 Aug 2017 01:14:28 +0000 (11:14 +1000)]
Provide default starting nodes to DHT if default torrent client config is used

https://github.com/anacrolix/torrent/issues/178

6 years agoTry a state-delta function for updating request state
Matt Joiner [Thu, 17 Aug 2017 15:51:02 +0000 (01:51 +1000)]
Try a state-delta function for updating request state

Also adds Torrent.networkingEnabled, though it isn't yet useful.

6 years agoRename Torrent.connHasWantedPieces->connection.peerHasWantedPieces
Matt Joiner [Thu, 17 Aug 2017 15:48:19 +0000 (01:48 +1000)]
Rename Torrent.connHasWantedPieces->connection.peerHasWantedPieces

6 years agoNo longer wanting a piece wasn't triggering an update of connection request state
Matt Joiner [Thu, 17 Aug 2017 15:44:20 +0000 (01:44 +1000)]
No longer wanting a piece wasn't triggering an update of connection request state

Pretty minor, but it would leave connections hanging in the interested state.

6 years agoTidy the next announce tracker status field
Matt Joiner [Wed, 16 Aug 2017 15:18:18 +0000 (01:18 +1000)]
Tidy the next announce tracker status field

6 years agoAccept racy result in keep alive test
Matt Joiner [Wed, 16 Aug 2017 07:05:34 +0000 (17:05 +1000)]
Accept racy result in keep alive test

6 years agoAugment dialed connection timeouts with context.Context
Matt Joiner [Wed, 16 Aug 2017 07:05:05 +0000 (17:05 +1000)]
Augment dialed connection timeouts with context.Context

Works toward a dial timeout for half open connections. https://github.com/anacrolix/torrent/issues/169

6 years agoUse net.Dialer for TCP
Matt Joiner [Wed, 16 Aug 2017 05:48:30 +0000 (15:48 +1000)]
Use net.Dialer for TCP

6 years agoUse DialContext instead of DialTimeout with utp
Matt Joiner [Wed, 16 Aug 2017 05:35:17 +0000 (15:35 +1000)]
Use DialContext instead of DialTimeout with utp

6 years agoSome tidying in Client.dialFirst
Matt Joiner [Wed, 16 Aug 2017 00:32:25 +0000 (10:32 +1000)]
Some tidying in Client.dialFirst

6 years agoRemove dht-ping from the README
Matt Joiner [Wed, 16 Aug 2017 00:28:07 +0000 (10:28 +1000)]
Remove dht-ping from the README

6 years agoDHT bootstrap is not asynchronous
Matt Joiner [Thu, 10 Aug 2017 01:18:48 +0000 (11:18 +1000)]
DHT bootstrap is not asynchronous

6 years agoFix test
Matt Joiner [Mon, 7 Aug 2017 12:11:25 +0000 (22:11 +1000)]
Fix test

6 years agoMerge branch 'master' into dht-cleanup
Matt Joiner [Mon, 7 Aug 2017 07:59:49 +0000 (17:59 +1000)]
Merge branch 'master' into dht-cleanup

6 years agoRemove dht cmds, they're added to anacrolix/dht
Matt Joiner [Thu, 20 Jul 2017 14:39:28 +0000 (00:39 +1000)]
Remove dht cmds, they're added to anacrolix/dht