]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
5 years agoRework status export in tests to allow count > 1 without a server for every test
Matt Joiner [Tue, 26 Jun 2018 09:54:48 +0000 (19:54 +1000)]
Rework status export in tests to allow count > 1 without a server for every test

5 years agoDo requests synchronously, and don't request from hashing or queued pieces
Matt Joiner [Tue, 26 Jun 2018 04:51:55 +0000 (14:51 +1000)]
Do requests synchronously, and don't request from hashing or queued pieces

Calculating the desired state was a nice idea, but too hard to debug. This way should also be faster.

5 years agoCheck that chunks we request aren't being hashed or queued for hash
Matt Joiner [Tue, 26 Jun 2018 03:04:15 +0000 (13:04 +1000)]
Check that chunks we request aren't being hashed or queued for hash

5 years agoFix BenchmarkConnectionMainReadLoop
Matt Joiner [Mon, 25 Jun 2018 04:09:08 +0000 (14:09 +1000)]
Fix BenchmarkConnectionMainReadLoop

5 years agoRework stats for receiving chunks
Matt Joiner [Mon, 25 Jun 2018 04:06:30 +0000 (14:06 +1000)]
Rework stats for receiving chunks

Related to #253.

5 years agoRemove premature initialization of Torrent.lastRequested
Matt Joiner [Mon, 25 Jun 2018 04:03:22 +0000 (14:03 +1000)]
Remove premature initialization of Torrent.lastRequested

5 years agoDrop connections that send chunks we shouldn't receive
Matt Joiner [Sun, 24 Jun 2018 10:35:46 +0000 (20:35 +1000)]
Drop connections that send chunks we shouldn't receive

5 years agoAdd requestStrategy 3, which duplicates requests only after a timeout
Matt Joiner [Sun, 24 Jun 2018 10:04:31 +0000 (20:04 +1000)]
Add requestStrategy 3, which duplicates requests only after a timeout

Possible solution for #253.

5 years agoWrite received chunks that we don't have
Matt Joiner [Sun, 24 Jun 2018 09:40:53 +0000 (19:40 +1000)]
Write received chunks that we don't have

Chunks were discarded if they belong to unprioritized pieces, even if those pieces were previously prioritized. May be contributing to #253.

5 years agoRetain interest if requests are outstanding and don't clear peer requests if they...
Matt Joiner [Sat, 23 Jun 2018 12:32:11 +0000 (22:32 +1000)]
Retain interest if requests are outstanding and don't clear peer requests if they send not_interested

Apparent shortcomings found when trying new request algorithms.

5 years agoEnsure 64-bit alignment of ConnStats fields
Matt Joiner [Sat, 23 Jun 2018 08:33:56 +0000 (18:33 +1000)]
Ensure 64-bit alignment of ConnStats fields

Fixes #262.

5 years agoMerge branch 'dev'
Matt Joiner [Fri, 22 Jun 2018 07:43:51 +0000 (17:43 +1000)]
Merge branch 'dev'

5 years agoUpdate accept limit parameters
Matt Joiner [Fri, 22 Jun 2018 07:43:02 +0000 (17:43 +1000)]
Update accept limit parameters

5 years agoUse scope timer in Torrent.writeChunk
Matt Joiner [Thu, 21 Jun 2018 13:22:13 +0000 (23:22 +1000)]
Use scope timer in Torrent.writeChunk

5 years agomoving upnp to a separate repository
Denis Kuzmenok [Tue, 19 Jun 2018 12:49:20 +0000 (15:49 +0300)]
moving upnp to a separate repository

5 years agoImprove logging in a test
Matt Joiner [Sun, 17 Jun 2018 11:21:24 +0000 (21:21 +1000)]
Improve logging in a test

5 years agoDisable accept rate limiting by default in tests
Matt Joiner [Sun, 17 Jun 2018 11:20:41 +0000 (21:20 +1000)]
Disable accept rate limiting by default in tests

5 years agoFix multiLess.StrictNext
Matt Joiner [Sun, 17 Jun 2018 11:11:01 +0000 (21:11 +1000)]
Fix multiLess.StrictNext

5 years agoFix build error with recent go version
Matt Joiner [Tue, 12 Jun 2018 11:51:34 +0000 (21:51 +1000)]
Fix build error with recent go version

5 years agoAdd some tests for net.Addr.Network values in various situations
Matt Joiner [Sun, 17 Jun 2018 06:21:57 +0000 (16:21 +1000)]
Add some tests for net.Addr.Network values in various situations

5 years agobencode: Remove string allocation when parsing strings
Matt Joiner [Sun, 17 Jun 2018 06:21:04 +0000 (16:21 +1000)]
bencode: Remove string allocation when parsing strings

5 years agocmd/torrent-metainfo-pprint: Use bufio input and enable envpprof
Matt Joiner [Sun, 17 Jun 2018 06:20:02 +0000 (16:20 +1000)]
cmd/torrent-metainfo-pprint: Use bufio input and enable envpprof

5 years agoLog and handle error with bad tracker URLs
Matt Joiner [Sun, 17 Jun 2018 06:19:24 +0000 (16:19 +1000)]
Log and handle error with bad tracker URLs

5 years agoMove chunk expvars into torrent prefix
Matt Joiner [Sun, 17 Jun 2018 06:18:22 +0000 (16:18 +1000)]
Move chunk expvars into torrent prefix

5 years agoUse RLock for Client.WriteStatus
Matt Joiner [Sun, 17 Jun 2018 06:11:50 +0000 (16:11 +1000)]
Use RLock for Client.WriteStatus

5 years agoall: gofmt
ia [Sat, 16 Jun 2018 22:47:12 +0000 (00:47 +0200)]
all: gofmt

Run standard gofmt command on project root.

- go version go1.10.3 darwin/amd64

Signed-off-by: ia <isaac.ardis@gmail.com>
5 years agoRemove TestUTPRawConn
Matt Joiner [Sat, 16 Jun 2018 10:17:05 +0000 (20:17 +1000)]
Remove TestUTPRawConn

It's a bit racy and depends on flaky network. Something like this belongs in the utp package anyway.

5 years agoAdd connection.hasPreferredNetworkOver and friends
Matt Joiner [Sat, 16 Jun 2018 07:14:47 +0000 (17:14 +1000)]
Add connection.hasPreferredNetworkOver and friends

5 years agoFix some formatting of ConnStats fields
Matt Joiner [Sat, 16 Jun 2018 07:10:56 +0000 (17:10 +1000)]
Fix some formatting of ConnStats fields

5 years agoAdd multiLess and use it for worseConn
Matt Joiner [Sat, 16 Jun 2018 07:04:12 +0000 (17:04 +1000)]
Add multiLess and use it for worseConn

5 years agoFix some testing code for Config->ClientConfig
Matt Joiner [Sat, 16 Jun 2018 07:01:21 +0000 (17:01 +1000)]
Fix some testing code for Config->ClientConfig

5 years agoRework Torrent pending requests assertions
Matt Joiner [Sat, 16 Jun 2018 07:00:50 +0000 (17:00 +1000)]
Rework Torrent pending requests assertions

Should provide more info, and sooner for #249.

5 years agoAllow dropping connections to the same peer ID
Matt Joiner [Sat, 16 Jun 2018 06:40:37 +0000 (16:40 +1000)]
Allow dropping connections to the same peer ID

Necessary for a test that expects one connection to each other Client.

5 years agoTorrent.Stats: RLock instead of Lock
Matt Joiner [Sat, 16 Jun 2018 06:38:14 +0000 (16:38 +1000)]
Torrent.Stats: RLock instead of Lock

5 years agoAllow disabling accept limiting and modify some constants
Matt Joiner [Sat, 16 Jun 2018 06:37:13 +0000 (16:37 +1000)]
Allow disabling accept limiting and modify some constants

5 years agoClear accept limits when adding a new torrent
Matt Joiner [Sat, 16 Jun 2018 06:34:35 +0000 (16:34 +1000)]
Clear accept limits when adding a new torrent

5 years agoUpdate external use of ClientConfig
Matt Joiner [Sat, 16 Jun 2018 06:33:40 +0000 (16:33 +1000)]
Update external use of ClientConfig

5 years agoRename Config->ClientConfig and change how defaults work
Matt Joiner [Sat, 16 Jun 2018 06:30:04 +0000 (16:30 +1000)]
Rename Config->ClientConfig and change how defaults work

This is a very breaking change.

5 years agoAdd lots of new expvars and perf timers
Matt Joiner [Fri, 15 Jun 2018 12:42:05 +0000 (22:42 +1000)]
Add lots of new expvars and perf timers

5 years agoRemove old Client.dialTCP
Matt Joiner [Fri, 15 Jun 2018 12:39:37 +0000 (22:39 +1000)]
Remove old Client.dialTCP

5 years agoRate limit incoming IP prefixes
Matt Joiner [Fri, 15 Jun 2018 12:38:11 +0000 (22:38 +1000)]
Rate limit incoming IP prefixes

Lots of bad or dishonest incoming handshakes for unwanted torrents.

5 years agoUse DialContext for tcp again
Matt Joiner [Fri, 15 Jun 2018 04:34:58 +0000 (14:34 +1000)]
Use DialContext for tcp again

It got lost somewhere along the way.

5 years agoUpdate dial expvars
Matt Joiner [Fri, 15 Jun 2018 04:30:31 +0000 (14:30 +1000)]
Update dial expvars

5 years agoUpdate some tests now that adding connections is more reliable
Matt Joiner [Wed, 13 Jun 2018 12:02:30 +0000 (22:02 +1000)]
Update some tests now that adding connections is more reliable

5 years agoRemove excess newline from log call
Matt Joiner [Wed, 13 Jun 2018 00:56:09 +0000 (10:56 +1000)]
Remove excess newline from log call

5 years agoFix race condition in Client.ListenAddrs
Matt Joiner [Wed, 13 Jun 2018 00:53:38 +0000 (10:53 +1000)]
Fix race condition in Client.ListenAddrs

5 years agoAllow adding duplicate connections
Matt Joiner [Wed, 13 Jun 2018 00:53:11 +0000 (10:53 +1000)]
Allow adding duplicate connections

I believe this fixes a long-standing race condition when dropping connections to the same peer ID where Clients assume the peer has added connections in the same order. Further commits may address duplicate connections further.

5 years agoFix Count usage in benchmark
Matt Joiner [Tue, 12 Jun 2018 12:47:46 +0000 (22:47 +1000)]
Fix Count usage in benchmark

5 years agoEnsure ConnStats spew nicely
Matt Joiner [Tue, 12 Jun 2018 12:40:04 +0000 (22:40 +1000)]
Ensure ConnStats spew nicely

5 years agoFix build error with recent go version
Matt Joiner [Tue, 12 Jun 2018 11:51:34 +0000 (21:51 +1000)]
Fix build error with recent go version

5 years agoRemove unused log import
Matt Joiner [Tue, 12 Jun 2018 10:25:32 +0000 (20:25 +1000)]
Remove unused log import

5 years agoRemove duplicateClientConns expvar
Matt Joiner [Tue, 12 Jun 2018 10:23:26 +0000 (20:23 +1000)]
Remove duplicateClientConns expvar

5 years agoUpdate log call
Matt Joiner [Tue, 12 Jun 2018 10:22:54 +0000 (20:22 +1000)]
Update log call

5 years agoTrack ConnStats with atomics
Matt Joiner [Tue, 12 Jun 2018 10:21:53 +0000 (20:21 +1000)]
Track ConnStats with atomics

5 years agoMake download cancellable tests more reliable
Matt Joiner [Tue, 12 Jun 2018 10:19:53 +0000 (20:19 +1000)]
Make download cancellable tests more reliable

5 years agoFix crash adding peers when Torrent is closed
Matt Joiner [Tue, 12 Jun 2018 10:17:15 +0000 (20:17 +1000)]
Fix crash adding peers when Torrent is closed

5 years agoRemove unnecessary use of go keyword
Matt Joiner [Tue, 12 Jun 2018 10:16:17 +0000 (20:16 +1000)]
Remove unnecessary use of go keyword

5 years agoTrack outgoing through a new field on connection, and rework duplicate connection...
Matt Joiner [Tue, 12 Jun 2018 10:14:00 +0000 (20:14 +1000)]
Track outgoing through a new field on connection, and rework duplicate connection preferencing

5 years agoFix failure in CI on non-critical test due to set -e
Matt Joiner [Mon, 11 Jun 2018 02:44:12 +0000 (12:44 +1000)]
Fix failure in CI on non-critical test due to set -e

5 years agoInclude rate limiting and stats in BenchmarkConnectionMainReadLoop
Matt Joiner [Mon, 11 Jun 2018 02:20:51 +0000 (12:20 +1000)]
Include rate limiting and stats in BenchmarkConnectionMainReadLoop

5 years agoMerge commit 'cadbacb956fa38a61f3656dc08d71bd68fc966ec' into dev
Matt Joiner [Mon, 11 Jun 2018 01:34:38 +0000 (11:34 +1000)]
Merge commit 'cadbacb956fa38a61f3656dc08d71bd68fc966ec' into dev

5 years agoMerge pull request #258 from porjo/master
Matt Joiner [Sun, 10 Jun 2018 14:00:25 +0000 (00:00 +1000)]
Merge pull request #258 from porjo/master

Fix file permissions

5 years agoMinimize lock time in Client.acceptConnections
Matt Joiner [Sun, 10 Jun 2018 00:29:19 +0000 (10:29 +1000)]
Minimize lock time in Client.acceptConnections

5 years agoAdd ConnStats at Client level
Matt Joiner [Sat, 9 Jun 2018 23:18:52 +0000 (09:18 +1000)]
Add ConnStats at Client level

ConnStats management is refactored to make this less tedious.

5 years agoIncrement conn read/write stats asynchronously
Matt Joiner [Sat, 9 Jun 2018 12:11:19 +0000 (22:11 +1000)]
Increment conn read/write stats asynchronously

Acquiring the lock appears to be quite intensive.

5 years agoFix timing failures in download cancel tests
Matt Joiner [Sat, 9 Jun 2018 12:10:08 +0000 (22:10 +1000)]
Fix timing failures in download cancel tests

5 years agoUpdate a link
Matt Joiner [Sat, 9 Jun 2018 12:08:24 +0000 (22:08 +1000)]
Update a link

5 years agoFix file permissions
Ian Bishop [Sat, 9 Jun 2018 13:11:28 +0000 (15:11 +0200)]
Fix file permissions

5 years agoadded proxy support to the library, using ProxyURL parameter. (#256)
Denis [Fri, 8 Jun 2018 10:52:36 +0000 (13:52 +0300)]
added proxy support to the library, using ProxyURL parameter. (#256)

5 years agocmd/torrent: Add -stats flag
Matt Joiner [Tue, 5 Jun 2018 14:40:03 +0000 (00:40 +1000)]
cmd/torrent: Add -stats flag

Requires updated tagflag package.

5 years agoIgnore CI test failures with CGO_ENABLED=0
Matt Joiner [Tue, 5 Jun 2018 14:39:30 +0000 (00:39 +1000)]
Ignore CI test failures with CGO_ENABLED=0

It uses anacrolix/utp which isn't stable or recommended. Timeouts and retrying are needed to work around bugs in that package better.

6 years agogo.mod additions for CGO_ENABLED=0
Matt Joiner [Fri, 25 May 2018 08:53:14 +0000 (18:53 +1000)]
go.mod additions for CGO_ENABLED=0

6 years agoMove internal bloom cmds to dht repo
Matt Joiner [Fri, 25 May 2018 08:36:59 +0000 (18:36 +1000)]
Move internal bloom cmds to dht repo

6 years agoAdd go.mod file for vgo
Matt Joiner [Fri, 25 May 2018 06:22:54 +0000 (16:22 +1000)]
Add go.mod file for vgo

6 years agoImprove Torrent.DownloadPieces documentation
Matt Joiner [Fri, 18 May 2018 04:06:28 +0000 (14:06 +1000)]
Improve Torrent.DownloadPieces documentation

Was mentioned in Gitter.

6 years agoDon't listen on IPv6 if DisableIPv6 is set
Matt Joiner [Wed, 2 May 2018 09:24:46 +0000 (19:24 +1000)]
Don't listen on IPv6 if DisableIPv6 is set

Fixes #250

6 years agoRemove vestigial comment
Matt Joiner [Wed, 2 May 2018 09:23:05 +0000 (19:23 +1000)]
Remove vestigial comment

6 years agoUpdate TODO file
Matt Joiner [Sat, 14 Apr 2018 11:44:50 +0000 (21:44 +1000)]
Update TODO file

6 years agoA few adjustments to prioritized peers usage
Matt Joiner [Sat, 14 Apr 2018 11:44:41 +0000 (21:44 +1000)]
A few adjustments to prioritized peers usage

6 years agoAdd tests for prioritizedPeers
Matt Joiner [Sat, 14 Apr 2018 11:44:03 +0000 (21:44 +1000)]
Add tests for prioritizedPeers

6 years agoFix #244
Matt Joiner [Sat, 14 Apr 2018 11:43:08 +0000 (21:43 +1000)]
Fix #244

6 years agoInclude connection network in log message
Matt Joiner [Sat, 14 Apr 2018 01:24:06 +0000 (11:24 +1000)]
Include connection network in log message

6 years agoTry to make test more reliable
Matt Joiner [Sat, 14 Apr 2018 01:23:26 +0000 (11:23 +1000)]
Try to make test more reliable

6 years agoFix #247
Matt Joiner [Fri, 13 Apr 2018 07:07:19 +0000 (17:07 +1000)]
Fix #247

6 years agoFix #246
Matt Joiner [Thu, 12 Apr 2018 13:34:31 +0000 (23:34 +1000)]
Fix #246

6 years agoMerge branch 'circleci'
Matt Joiner [Thu, 12 Apr 2018 07:28:13 +0000 (17:28 +1000)]
Merge branch 'circleci'

# Conflicts:
# client.go

6 years agoAdd comment
Matt Joiner [Thu, 12 Apr 2018 06:12:27 +0000 (16:12 +1000)]
Add comment

6 years agoReinstate Uploaded and Downloaded values in tracker announces
Matt Joiner [Thu, 12 Apr 2018 06:12:14 +0000 (16:12 +1000)]
Reinstate Uploaded and Downloaded values in tracker announces

Fixes followup comment in #71.

6 years agoUse new DHT stats fields
Matt Joiner [Thu, 12 Apr 2018 06:11:22 +0000 (16:11 +1000)]
Use new DHT stats fields

6 years agoAnother use of LoopbackListenhost
Matt Joiner [Thu, 12 Apr 2018 06:10:46 +0000 (16:10 +1000)]
Another use of LoopbackListenhost

6 years agoAdd LoopbackListenHost
Matt Joiner [Thu, 12 Apr 2018 05:21:31 +0000 (15:21 +1000)]
Add LoopbackListenHost

6 years agoAdd some peer source comments
Matt Joiner [Thu, 12 Apr 2018 05:12:29 +0000 (15:12 +1000)]
Add some peer source comments

6 years agoImprove DHT status output
Matt Joiner [Thu, 12 Apr 2018 05:12:15 +0000 (15:12 +1000)]
Improve DHT status output

6 years agoSupport different hosts for each network
Matt Joiner [Thu, 12 Apr 2018 05:06:53 +0000 (15:06 +1000)]
Support different hosts for each network

CircleCI's localhost hostname doesn't resolve for IPv6.

6 years agoRework conns to/and allow multiple DHT servers
Matt Joiner [Thu, 12 Apr 2018 01:41:07 +0000 (11:41 +1000)]
Rework conns to/and allow multiple DHT servers

This will help with #229, and IPv6 support.

6 years agopackage assert->expect
Matt Joiner [Thu, 12 Apr 2018 01:34:24 +0000 (11:34 +1000)]
package assert->expect

6 years agoPrioritize pending nodes with BEP 40
Matt Joiner [Wed, 4 Apr 2018 07:59:28 +0000 (17:59 +1000)]
Prioritize pending nodes with BEP 40

6 years agoExpose public IPv4 and IPv6 config options and use them with trackers
Matt Joiner [Thu, 29 Mar 2018 03:29:15 +0000 (14:29 +1100)]
Expose public IPv4 and IPv6 config options and use them with trackers

6 years agoStart implementing BEP 40
Matt Joiner [Thu, 29 Mar 2018 03:27:48 +0000 (14:27 +1100)]
Start implementing BEP 40

6 years agogithub.com/go-fsnotify/fsnotify -> github.com/fsnotify/fsnotify
Matt Joiner [Tue, 27 Mar 2018 06:31:52 +0000 (17:31 +1100)]
github.com/go-fsnotify/fsnotify -> github.com/fsnotify/fsnotify