]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
8 years agoRevert "Merge pull request #54 from zhulik/master"
Matt Joiner [Wed, 6 Jan 2016 01:19:49 +0000 (12:19 +1100)]
Revert "Merge pull request #54 from zhulik/master"

This reverts commit 5cf75b869c469196a8473c4962b99a450daaeeec, reversing
changes made to 09050ff2c5607f3991e6ec6422ed57ba0dee0bad.

8 years agodataBackend/http: Replace connection pooling code with forced HTTP2
Matt Joiner [Wed, 6 Jan 2016 01:10:40 +0000 (12:10 +1100)]
dataBackend/http: Replace connection pooling code with forced HTTP2

8 years agoMerge pull request #54 from zhulik/master
Matt Joiner [Tue, 5 Jan 2016 08:56:53 +0000 (19:56 +1100)]
Merge pull request #54 from zhulik/master

Mocking  improvements

8 years agoRefactorings
Gleb Sinyavsky [Tue, 5 Jan 2016 08:42:26 +0000 (11:42 +0300)]
Refactorings

8 years agoMerge branch 'master' of https://github.com/anacrolix/torrent
Gleb Sinyavsky [Mon, 4 Jan 2016 12:39:08 +0000 (15:39 +0300)]
Merge branch 'master' of https://github.com/anacrolix/torrent

8 years agoSome missing hunks that fix build
Matt Joiner [Mon, 4 Jan 2016 11:56:36 +0000 (22:56 +1100)]
Some missing hunks that fix build

8 years agoFailure to announce on one tracker isn't very interesting
Matt Joiner [Mon, 4 Jan 2016 11:54:19 +0000 (22:54 +1100)]
Failure to announce on one tracker isn't very interesting

8 years agoAdd Have and Bitfield connection methods
Matt Joiner [Mon, 4 Jan 2016 11:37:49 +0000 (22:37 +1100)]
Add Have and Bitfield connection methods

8 years agoSwitch to int from peer_protocol.Integer for piece index in a lot of places
Matt Joiner [Mon, 4 Jan 2016 11:34:24 +0000 (22:34 +1100)]
Switch to int from peer_protocol.Integer for piece index in a lot of places

8 years agopeersKey is a public type now
Gleb Sinyavsky [Sun, 27 Dec 2015 12:27:32 +0000 (15:27 +0300)]
peersKey is a public type now

8 years agoDownload.Peers() func added
Gleb Sinyavsky [Sun, 27 Dec 2015 12:19:39 +0000 (15:19 +0300)]
Download.Peers() func added

8 years agocmd utils fixed
Gleb Sinyavsky [Sun, 27 Dec 2015 11:59:07 +0000 (14:59 +0300)]
cmd utils fixed

8 years agoTorrent structs replaced with Download interface in exported Client methods
Gleb Sinyavsky [Sun, 27 Dec 2015 11:49:15 +0000 (14:49 +0300)]
Torrent structs replaced with Download interface in exported Client methods

8 years agoCheck piece completion state as soon as a handle to torrent data is obtained from...
Matt Joiner [Thu, 24 Dec 2015 14:33:10 +0000 (01:33 +1100)]
Check piece completion state as soon as a handle to torrent data is obtained from a piece store

This helps flex the new concurrency implementation in the piece store http backend

8 years agoLimit parallelism at the piece store http backend connection level instead of at...
Matt Joiner [Thu, 24 Dec 2015 14:31:50 +0000 (01:31 +1100)]
Limit parallelism at the piece store http backend connection level instead of at the request level

This is in preparation for improvements that HTTP2 should provide.

8 years agodata/pieceStore/{blob->data}.go: More appropriate file name
Matt Joiner [Thu, 24 Dec 2015 14:26:15 +0000 (01:26 +1100)]
data/pieceStore/{blob->data}.go: More appropriate file name

8 years agoSwitch from launchpad.net/gommap to github.com/edsrzf/mmap-go for Windows support
Matt Joiner [Tue, 22 Dec 2015 16:50:34 +0000 (03:50 +1100)]
Switch from launchpad.net/gommap to github.com/edsrzf/mmap-go for Windows support

Fixes #45.

8 years agoSuppress log message regarding bad tracker URLs
Matt Joiner [Tue, 22 Dec 2015 16:32:24 +0000 (03:32 +1100)]
Suppress log message regarding bad tracker URLs

8 years agoFix #47
Matt Joiner [Tue, 22 Dec 2015 16:31:39 +0000 (03:31 +1100)]
Fix #47

Forgot to remove a non-deferred sync.Mutex.Unlock

8 years agodht: announce_peer should not occur to insecure nodes
Matt Joiner [Thu, 17 Dec 2015 13:50:22 +0000 (00:50 +1100)]
dht: announce_peer should not occur to insecure nodes

Additionally, we now announce even if a token wasn't provided. Why not.

8 years agodht: Except local network addresses from security checks
Matt Joiner [Thu, 17 Dec 2015 12:51:50 +0000 (23:51 +1100)]
dht: Except local network addresses from security checks

8 years agodht: Move security tests into separate file
Matt Joiner [Thu, 17 Dec 2015 12:36:57 +0000 (23:36 +1100)]
dht: Move security tests into separate file

8 years agodht: Move security functions into new file
Matt Joiner [Thu, 17 Dec 2015 12:22:39 +0000 (23:22 +1100)]
dht: Move security functions into new file

8 years agoAdd OnQuery hook, thanks to Cathal Garvey
Matt Joiner [Wed, 16 Dec 2015 04:20:37 +0000 (15:20 +1100)]
Add OnQuery hook, thanks to Cathal Garvey

8 years agoTest improvements
Matt Joiner [Wed, 16 Dec 2015 04:16:53 +0000 (15:16 +1100)]
Test improvements

8 years agoAdd NodeIdHex config option
Matt Joiner [Wed, 16 Dec 2015 04:15:59 +0000 (15:15 +1100)]
Add NodeIdHex config option

8 years agoAdd NoDefaultBootstrap and use it and testify in a few tests
Matt Joiner [Wed, 16 Dec 2015 04:13:32 +0000 (15:13 +1100)]
Add NoDefaultBootstrap and use it and testify in a few tests

8 years agoUse testify for some tests
Matt Joiner [Wed, 16 Dec 2015 04:06:23 +0000 (15:06 +1100)]
Use testify for some tests

8 years agoStandardize Torrent method receivers
Matt Joiner [Sat, 12 Dec 2015 03:03:25 +0000 (14:03 +1100)]
Standardize Torrent method receivers

8 years agoExpose Torrent.SetDisplayName
Matt Joiner [Sat, 12 Dec 2015 03:03:04 +0000 (14:03 +1100)]
Expose Torrent.SetDisplayName

8 years agoDocs
Matt Joiner [Sat, 12 Dec 2015 03:00:07 +0000 (14:00 +1100)]
Docs

8 years agodata/pieceStore: Improve error message when pieces fail to write
Matt Joiner [Thu, 10 Dec 2015 16:05:40 +0000 (03:05 +1100)]
data/pieceStore: Improve error message when pieces fail to write

8 years agoDon't consider a peer to have touched a piece if a chunk isn't written successfully
Matt Joiner [Thu, 10 Dec 2015 16:04:04 +0000 (03:04 +1100)]
Don't consider a peer to have touched a piece if a chunk isn't written successfully

This prevents peers being banned when there are issues with the data service locally.

8 years agoCopyURL moved to httptoo
Matt Joiner [Thu, 10 Dec 2015 16:02:45 +0000 (03:02 +1100)]
CopyURL moved to httptoo

8 years agoRewrite cmd/dht-ping
Matt Joiner [Mon, 7 Dec 2015 13:45:42 +0000 (00:45 +1100)]
Rewrite cmd/dht-ping

8 years agoFix package-docstring for dht package
Dmitry Borzov [Mon, 7 Dec 2015 14:48:43 +0000 (17:48 +0300)]
Fix package-docstring for dht package

8 years agoFix name ambiguity for dht-ping, too many things are called pingResponses
Dmitry Borzov [Mon, 7 Dec 2015 11:26:27 +0000 (14:26 +0300)]
Fix name ambiguity for dht-ping, too many things are called pingResponses

8 years agosortimports
Matt Joiner [Mon, 7 Dec 2015 12:11:39 +0000 (23:11 +1100)]
sortimports

8 years agoActually fix #41 properly; and several big changes
Matt Joiner [Sun, 6 Dec 2015 16:28:28 +0000 (03:28 +1100)]
Actually fix #41 properly; and several big changes

bencode:
 * Handle omitempty on non-trivial types.
cmd/dht-ping:
 * Handle timeouts in ping transactions.
dht:
 * Propagate failed transaction responses properly.
 * Msg related tests are moved into their own file.
 * In some places, IPs in binary form are shorted to 4 bytes if IPv4.

8 years agoFix #41
Matt Joiner [Sun, 6 Dec 2015 15:39:00 +0000 (02:39 +1100)]
Fix #41

8 years agoMerge pull request #42 from dborzov/dht
Matt Joiner [Sun, 6 Dec 2015 14:23:19 +0000 (01:23 +1100)]
Merge pull request #42 from dborzov/dht

Nicer godoc strings for dht package, and breaking source up into different files

8 years agoMove dht.Server defs to a separate file
Dmitry Borzov [Sun, 6 Dec 2015 14:56:46 +0000 (17:56 +0300)]
Move dht.Server defs to a separate file

8 years agoMove Transaction & nodeInfo defs to dedicated files
Dmitry Borzov [Sat, 5 Dec 2015 21:34:46 +0000 (00:34 +0300)]
Move Transaction & nodeInfo defs to dedicated files

8 years agoFix godoc strings for dht package
Dmitry Borzov [Sat, 5 Dec 2015 20:40:41 +0000 (23:40 +0300)]
Fix godoc strings for dht package

8 years agocmd/torrent-infohash: Switch to tagflag
Matt Joiner [Sun, 22 Nov 2015 07:49:44 +0000 (18:49 +1100)]
cmd/torrent-infohash: Switch to tagflag

8 years agoUse uiprogress to display a progress bar per torrent
Matt Joiner [Sun, 22 Nov 2015 07:45:06 +0000 (18:45 +1100)]
Use uiprogress to display a progress bar per torrent

8 years agoExpose torrent.Seeding
Matt Joiner [Sun, 22 Nov 2015 07:44:33 +0000 (18:44 +1100)]
Expose torrent.Seeding

8 years agotorrent.DisplayName should not be exported
Matt Joiner [Sun, 22 Nov 2015 07:44:08 +0000 (18:44 +1100)]
torrent.DisplayName should not be exported

8 years agoTest announcing to third party servers shouldn't fail if none respond
Matt Joiner [Fri, 13 Nov 2015 12:36:38 +0000 (23:36 +1100)]
Test announcing to third party servers shouldn't fail if none respond

8 years agoAdd coverage badge to README
Matt Joiner [Fri, 13 Nov 2015 11:51:20 +0000 (22:51 +1100)]
Add coverage badge to README

8 years agodata/pieceStore/dataBackend: ErrNotFound now aliases os.ErrNotExist
Matt Joiner [Fri, 13 Nov 2015 11:35:18 +0000 (22:35 +1100)]
data/pieceStore/dataBackend: ErrNotFound now aliases os.ErrNotExist

8 years agodht: Don't log KRPC unmarshal errors, there's a expvar for this
Matt Joiner [Fri, 13 Nov 2015 11:34:29 +0000 (22:34 +1100)]
dht: Don't log KRPC unmarshal errors, there's a expvar for this

8 years agoBlocking IPv6 addresses is not so interesting
Matt Joiner [Fri, 13 Nov 2015 11:33:50 +0000 (22:33 +1100)]
Blocking IPv6 addresses is not so interesting

8 years agoAdd method File.Torrent
Matt Joiner [Wed, 11 Nov 2015 16:25:04 +0000 (03:25 +1100)]
Add method File.Torrent

8 years agoTODO
Matt Joiner [Wed, 11 Nov 2015 16:24:41 +0000 (03:24 +1100)]
TODO

8 years agointernal/cmd/bloom-false-positives: Switch to tagflag
Matt Joiner [Mon, 9 Nov 2015 12:05:52 +0000 (23:05 +1100)]
internal/cmd/bloom-false-positives: Switch to tagflag

Was looking at using github.com/tylertreat/BoomFilters instead of github.com/willf/bloom

8 years agoAdd comment doc for File.PrioritizeRegion
Matt Joiner [Mon, 9 Nov 2015 11:27:38 +0000 (22:27 +1100)]
Add comment doc for File.PrioritizeRegion

8 years agoMake torrent.Reader reads fail when the torrent is closed instead of stalling
Matt Joiner [Thu, 5 Nov 2015 13:40:47 +0000 (00:40 +1100)]
Make torrent.Reader reads fail when the torrent is closed instead of stalling

8 years agoRemove sync.Cond from piece
Matt Joiner [Thu, 5 Nov 2015 13:40:16 +0000 (00:40 +1100)]
Remove sync.Cond from piece

It's not trivial to ensure that anyone waiting on the piece Cond will wake on events like the torrent being dropped from the client.

8 years agoDitch go-flags for tagflag
Matt Joiner [Thu, 5 Nov 2015 12:21:39 +0000 (23:21 +1100)]
Ditch go-flags for tagflag

Fixes #37

8 years agobencode: Improve unknown value type error
Matt Joiner [Tue, 3 Nov 2015 12:21:10 +0000 (23:21 +1100)]
bencode: Improve unknown value type error

8 years agohttpfile.Open can now return an error
Matt Joiner [Fri, 30 Oct 2015 11:21:48 +0000 (22:21 +1100)]
httpfile.Open can now return an error

8 years agometainfo: Add alternative "builder" API
Matt Joiner [Thu, 29 Oct 2015 14:21:09 +0000 (01:21 +1100)]
metainfo: Add alternative "builder" API

The existing builder API is gross and heavy-handed. I won't rip it out just yet.

8 years agodht: Handle bad responses to get_peers
Matt Joiner [Thu, 29 Oct 2015 14:18:29 +0000 (01:18 +1100)]
dht: Handle bad responses to get_peers

8 years agoAvoid copying mutex in piece
Matt Joiner [Thu, 29 Oct 2015 14:16:52 +0000 (01:16 +1100)]
Avoid copying mutex in piece

8 years agoFix #35
Matt Joiner [Thu, 29 Oct 2015 12:47:13 +0000 (23:47 +1100)]
Fix #35

8 years agoAdd test for issue 35
Matt Joiner [Thu, 29 Oct 2015 12:46:47 +0000 (23:46 +1100)]
Add test for issue 35

8 years agoSome missing io.EOFs
Matt Joiner [Fri, 23 Oct 2015 01:45:51 +0000 (12:45 +1100)]
Some missing io.EOFs

8 years agodata/pieceStore: Expose flags in Open method
Matt Joiner [Fri, 23 Oct 2015 01:45:11 +0000 (12:45 +1100)]
data/pieceStore: Expose flags in Open method

8 years agoTidy
Matt Joiner [Fri, 23 Oct 2015 01:42:57 +0000 (12:42 +1100)]
Tidy

8 years agocmd/torrent: Expose --mmap
Matt Joiner [Fri, 23 Oct 2015 01:42:19 +0000 (12:42 +1100)]
cmd/torrent: Expose --mmap

8 years agodht: Make Msg a struct with bencode tags
Matt Joiner [Fri, 23 Oct 2015 01:41:45 +0000 (12:41 +1100)]
dht: Make Msg a struct with bencode tags

8 years agoMerge branch 'master' of github.com:anacrolix/torrent
Matt Joiner [Fri, 23 Oct 2015 01:38:00 +0000 (12:38 +1100)]
Merge branch 'master' of github.com:anacrolix/torrent

8 years agobencode: Can't get zero type of a nil interface
Matt Joiner [Fri, 23 Oct 2015 01:37:30 +0000 (12:37 +1100)]
bencode: Can't get zero type of a nil interface

8 years agobencode: Rethrow non-errors during encoding
Matt Joiner [Fri, 23 Oct 2015 01:36:47 +0000 (12:36 +1100)]
bencode: Rethrow non-errors during encoding

8 years agobencode: Encoding nil interfaces are an error except at data root
Matt Joiner [Fri, 23 Oct 2015 01:35:38 +0000 (12:35 +1100)]
bencode: Encoding nil interfaces are an error except at data root

8 years agoFix #33.
Matt Joiner [Tue, 20 Oct 2015 06:53:12 +0000 (17:53 +1100)]
Fix #33.

8 years agoMake Piece a concrete type
Matt Joiner [Sun, 18 Oct 2015 14:31:34 +0000 (01:31 +1100)]
Make Piece a concrete type

There was a lot of allocations occuring because it was an interface.

8 years agobencode: Don't skip encoding nil pointers and interfaces
Matt Joiner [Sun, 18 Oct 2015 14:28:36 +0000 (01:28 +1100)]
bencode: Don't skip encoding nil pointers and interfaces

This caused an annoying bug for complex types where dictionary values went missing.

8 years agobencode: Use default field name if it isn't given (but options are)
Matt Joiner [Sun, 18 Oct 2015 14:27:15 +0000 (01:27 +1100)]
bencode: Use default field name if it isn't given (but options are)

8 years agobencode: Tidy up
Matt Joiner [Sun, 18 Oct 2015 14:25:56 +0000 (01:25 +1100)]
bencode: Tidy up

8 years agoMissed in last commit
Matt Joiner [Sun, 18 Oct 2015 13:02:42 +0000 (00:02 +1100)]
Missed in last commit

8 years agoAvoid allocation in iplist.Ranger.Lookup
Matt Joiner [Sun, 18 Oct 2015 13:00:26 +0000 (00:00 +1100)]
Avoid allocation in iplist.Ranger.Lookup

It was very expensive for DHT packets.

8 years agoUpdate TODO
Matt Joiner [Sat, 17 Oct 2015 15:32:24 +0000 (02:32 +1100)]
Update TODO

8 years agoStore pieces inplace in torrent.Pieces
Matt Joiner [Fri, 16 Oct 2015 11:10:03 +0000 (22:10 +1100)]
Store pieces inplace in torrent.Pieces

This should save some allocation overhead, especially for torrents that have 20k+ pieces.

8 years agoUpdate README
Matt Joiner [Fri, 16 Oct 2015 11:07:13 +0000 (22:07 +1100)]
Update README

8 years agoMerge pull request #31 from kupsef/master
Matt Joiner [Sat, 10 Oct 2015 22:46:47 +0000 (09:46 +1100)]
Merge pull request #31 from kupsef/master

fix: added announce to torrent spec

8 years agofix: added announce to torrent spec
Kupai József [Sat, 10 Oct 2015 12:31:02 +0000 (14:31 +0200)]
fix: added announce to torrent spec

8 years agoSome slow tracker tests can be Parallel
Matt Joiner [Sun, 4 Oct 2015 08:58:23 +0000 (19:58 +1100)]
Some slow tracker tests can be Parallel

8 years agoCreate a pieceStore interface, and merge in my httpfile backend, and replace data...
Matt Joiner [Sat, 3 Oct 2015 14:22:46 +0000 (00:22 +1000)]
Create a pieceStore interface, and merge in my httpfile backend, and replace data/blob

data/blob was aging, and had severe performance problems. It's now possible to use missinggo/filecache as a data backend to pieceStore which is better tested and performs excellently.

8 years agoutp package merged PacketConn with Socket
Matt Joiner [Sat, 3 Oct 2015 14:02:14 +0000 (00:02 +1000)]
utp package merged PacketConn with Socket

8 years agofs test: Missed package specifier
Matt Joiner [Thu, 1 Oct 2015 14:16:50 +0000 (00:16 +1000)]
fs test: Missed package specifier

8 years agoFix import cycle
Matt Joiner [Thu, 1 Oct 2015 14:16:25 +0000 (00:16 +1000)]
Fix import cycle

8 years agobencode: When decoding a dict, if the final key is missing its value, don't treat...
Matt Joiner [Thu, 1 Oct 2015 14:13:43 +0000 (00:13 +1000)]
bencode: When decoding a dict, if the final key is missing its value, don't treat that as an error.

I think I'm swayed here by the robustness principle/Postel's Law.

8 years agoSimplify the torrent Data interface
Matt Joiner [Thu, 1 Oct 2015 14:09:04 +0000 (00:09 +1000)]
Simplify the torrent Data interface

None of the methods are optional anymore. Removed the nasty wrappers for some data implementations. Moved data.Data back into the main torrent package. Should make it much easier to understand for people implementing their own Data implementations.

8 years agoMatch the names used in other blob implementations
Matt Joiner [Thu, 1 Oct 2015 05:41:30 +0000 (15:41 +1000)]
Match the names used in other blob implementations

8 years agoReduce UDP tracker response buffer size from 64KiB to 2KiB
Matt Joiner [Wed, 30 Sep 2015 14:36:41 +0000 (00:36 +1000)]
Reduce UDP tracker response buffer size from 64KiB to 2KiB

8 years agoTrack peer sources with a dict, and don't exceed high water mark
Matt Joiner [Mon, 28 Sep 2015 05:30:13 +0000 (15:30 +1000)]
Track peer sources with a dict, and don't exceed high water mark

8 years agoInitialize connection piece priorities lazily, and using a pool
Matt Joiner [Sat, 26 Sep 2015 07:27:35 +0000 (17:27 +1000)]
Initialize connection piece priorities lazily, and using a pool

8 years agoInclude num pieces in torrent status
Matt Joiner [Fri, 25 Sep 2015 12:05:32 +0000 (22:05 +1000)]
Include num pieces in torrent status