]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
3 years agoFix unreferenced variable v1.21.0
Matt Joiner [Mon, 18 Jan 2021 22:18:07 +0000 (09:18 +1100)]
Fix unreferenced variable

3 years agoFix call to wrong postCancel?
Matt Joiner [Mon, 18 Jan 2021 22:17:41 +0000 (09:17 +1100)]
Fix call to wrong postCancel?

Looks like this would forget to also cancel the request on the peer, and only send the message.

3 years agoFix duplicate import under different aliases
Matt Joiner [Mon, 18 Jan 2021 22:16:49 +0000 (09:16 +1100)]
Fix duplicate import under different aliases

3 years agoUpdate DHT
Matt Joiner [Mon, 18 Jan 2021 03:41:06 +0000 (14:41 +1100)]
Update DHT

3 years agoFix boundary conditions trimming sqlite3 storage cache
Matt Joiner [Mon, 18 Jan 2021 03:40:48 +0000 (14:40 +1100)]
Fix boundary conditions trimming sqlite3 storage cache

3 years agoFix panic on Ping/WriteMessage for webtorrent
Justin M [Sun, 17 Jan 2021 02:30:27 +0000 (02:30 +0000)]
Fix panic on Ping/WriteMessage for webtorrent

Introduced in anacrolix/torrent #455

3 years agoAdd link for @anacrolix
Matt Joiner [Wed, 6 Jan 2021 22:50:46 +0000 (09:50 +1100)]
Add link for @anacrolix

3 years agoconnection drop log debug level
ucwong [Wed, 6 Jan 2021 09:27:17 +0000 (17:27 +0800)]
connection drop log debug level

3 years agoPing websocket to ensure connect remains online.
Justin M [Tue, 5 Jan 2021 05:40:44 +0000 (05:40 +0000)]
Ping websocket to ensure connect remains online.

OpenWebTorrent disconnects clients after two minutes of inactivity. In a scenario where an
announce occurs and no other activity occurs for the (default) 120-second idle timer, the
websocket will be torn down by OpenWebTorrent. This in turn causes the tracker client to wait one
minute, reconnect, and reannounce its peers.

This patch sends a websocket.PingMessage every 60 seconds to maintain the connection.

3 years agoAdd the DropMutuallyCompletePeers ClientConfig field
Matt Joiner [Tue, 5 Jan 2021 05:58:45 +0000 (16:58 +1100)]
Add the DropMutuallyCompletePeers ClientConfig field

3 years agoAlign webtorrent tracker to BEP-3
Justin M [Mon, 4 Jan 2021 22:54:07 +0000 (22:54 +0000)]
Align webtorrent tracker to BEP-3

Adding "omitempty" to json marshalling, bringing the webtorrent tracker AnnounceRequest in line
with BEP-3, which states omitting the the "event" field is acceptable.

3 years agoReannounce webtorrent webrtc offers on reconnect
Justin M [Mon, 4 Jan 2021 23:20:51 +0000 (23:20 +0000)]
Reannounce webtorrent webrtc offers on reconnect

On socket reconnect, reannounce any webrtc offers that might have been half-open before the
socket reconnected. This implementation closes any existing half-open offers and republishes them,
but does nothing to existing webrtc connections which are still running (these are cleaned up
elsewhere and are not owned by this code)

3 years agoSome peerImpl observations v1.20.0
Matt Joiner [Mon, 4 Jan 2021 04:51:23 +0000 (15:51 +1100)]
Some peerImpl observations

3 years agoReinstate cmd/announce announce subcommand
Matt Joiner [Mon, 4 Jan 2021 02:37:44 +0000 (13:37 +1100)]
Reinstate cmd/announce announce subcommand

3 years agomse: Optimize allocations receiving handshakes
Matt Joiner [Mon, 4 Jan 2021 00:34:04 +0000 (11:34 +1100)]
mse: Optimize allocations receiving handshakes

3 years agoAdd benchmark for receiving handshakes with large skey counts
Matt Joiner [Mon, 4 Jan 2021 00:33:46 +0000 (11:33 +1100)]
Add benchmark for receiving handshakes with large skey counts

3 years agoAdd mse.ReceiveHandshakeEx
Matt Joiner [Sun, 3 Jan 2021 23:49:28 +0000 (10:49 +1100)]
Add mse.ReceiveHandshakeEx

3 years agoUpgrade github.com/frankban/quicktest
Matt Joiner [Sun, 3 Jan 2021 23:39:28 +0000 (10:39 +1100)]
Upgrade github.com/frankban/quicktest

3 years agoFix "none" event for WebTorrent announces
Matt Joiner [Wed, 30 Dec 2020 00:43:48 +0000 (11:43 +1100)]
Fix "none" event for WebTorrent announces

3 years agoDocument ClientConfig.DisableAcceptRateLimiting
Matt Joiner [Mon, 21 Dec 2020 02:57:59 +0000 (13:57 +1100)]
Document ClientConfig.DisableAcceptRateLimiting

3 years agoMerge branch 'v1.19'
Matt Joiner [Mon, 21 Dec 2020 08:12:40 +0000 (19:12 +1100)]
Merge branch 'v1.19'

* v1.19:
  Further fixes to webseed path encoding
  Update README.md
  Move request strategy doc comments onto their public functions
  Add deprecated ParseMagnetURI

3 years agoFurther fixes to webseed path encoding v1.19.2
Matt Joiner [Mon, 21 Dec 2020 01:24:24 +0000 (12:24 +1100)]
Further fixes to webseed path encoding

3 years agoUpdate README.md v1.19.1
Matt Joiner [Sun, 20 Dec 2020 23:04:44 +0000 (10:04 +1100)]
Update README.md

Add Console 32 mention

(cherry picked from commit f3d3fd37244fabd2642214023f636a778a284864)

3 years agoMove request strategy doc comments onto their public functions
Matt Joiner [Sat, 19 Dec 2020 03:43:21 +0000 (14:43 +1100)]
Move request strategy doc comments onto their public functions

(cherry picked from commit 8c059ae1583f48e295fd69001aae9eee4b721ba6)

3 years agoAdd deprecated ParseMagnetURI
Matt Joiner [Sun, 20 Dec 2020 23:16:08 +0000 (10:16 +1100)]
Add deprecated ParseMagnetURI

3 years agoUpdate README.md
Matt Joiner [Sun, 20 Dec 2020 23:04:44 +0000 (10:04 +1100)]
Update README.md

Add Console 32 mention

3 years agoGeneralize internal/string-limiter Key type
Matt Joiner [Sun, 20 Dec 2020 22:39:02 +0000 (09:39 +1100)]
Generalize internal/string-limiter Key type

3 years agoPass trackerScraper context to announces
Matt Joiner [Sun, 20 Dec 2020 22:29:20 +0000 (09:29 +1100)]
Pass trackerScraper context to announces

This will cancel announces for Closed Torrents and let them move more quickly to announcing the stopped event. Spotted by @hwh33.

3 years agoMove request strategy doc comments onto their public functions
Matt Joiner [Sat, 19 Dec 2020 03:43:21 +0000 (14:43 +1100)]
Move request strategy doc comments onto their public functions

3 years agoFactor out internal/string_limiter v1.19.0
Matt Joiner [Thu, 17 Dec 2020 01:22:02 +0000 (12:22 +1100)]
Factor out internal/string_limiter

3 years agoRework active announce limiter to reduce contention
Matt Joiner [Tue, 15 Dec 2020 04:29:45 +0000 (15:29 +1100)]
Rework active announce limiter to reduce contention

3 years agoDon't send keepalives if a connection isn't useful to us
Matt Joiner [Thu, 10 Dec 2020 00:13:27 +0000 (11:13 +1100)]
Don't send keepalives if a connection isn't useful to us

This might help break the situation where anacrolix/torrent Clients that are connected to each other never release a connection until there's new connections that look more promising.

3 years agoUpdate metainfo.go
Aranjedeath [Wed, 9 Dec 2020 05:27:50 +0000 (21:27 -0800)]
Update metainfo.go

delete "yoloham" so that is no longer the default comment string on torrents made without a comment specified. Should resolve https://github.com/anacrolix/torrent/issues/342

3 years agoStrictly adher to tracker announce response intervals if a torrent is private
Matt Joiner [Wed, 9 Dec 2020 11:36:57 +0000 (22:36 +1100)]
Strictly adher to tracker announce response intervals if a torrent is private

3 years agocmd/torrent: Add spew-bencoding command
Matt Joiner [Wed, 9 Dec 2020 09:01:53 +0000 (20:01 +1100)]
cmd/torrent: Add spew-bencoding command

3 years agocmd/torrent: Fix download command default flags
Matt Joiner [Wed, 9 Dec 2020 09:01:33 +0000 (20:01 +1100)]
cmd/torrent: Fix download command default flags

3 years agoLog announce return
Matt Joiner [Wed, 9 Dec 2020 09:01:05 +0000 (20:01 +1100)]
Log announce return

3 years agocmd/torrent: Add file pick flag
Matt Joiner [Wed, 9 Dec 2020 09:00:42 +0000 (20:00 +1100)]
cmd/torrent: Add file pick flag

3 years agoUpdate github.com/anacrolix/dht/v2
Matt Joiner [Wed, 9 Dec 2020 08:59:38 +0000 (19:59 +1100)]
Update github.com/anacrolix/dht/v2

3 years agocmd/torrent: Use alexflint/go-arg for argument parsing
Matt Joiner [Wed, 9 Dec 2020 05:18:54 +0000 (16:18 +1100)]
cmd/torrent: Use alexflint/go-arg for argument parsing

Also add list-files command to test it out.

3 years agoUpdate required go version
Matt Joiner [Mon, 30 Nov 2020 03:26:12 +0000 (14:26 +1100)]
Update required go version

I believe 1.15 is required for testing.T.TempDir.

3 years agopiece resource storage: Delete incomplete chunks concurrently after writing complete...
Matt Joiner [Sat, 21 Nov 2020 02:42:42 +0000 (13:42 +1100)]
piece resource storage: Delete incomplete chunks concurrently after writing complete piece

3 years agoUse ConsecutiveChunkWriter in MarkComplete for piece resource storage if available
Matt Joiner [Sat, 21 Nov 2020 02:41:45 +0000 (13:41 +1100)]
Use ConsecutiveChunkWriter in MarkComplete for piece resource storage if available

3 years agoTrack piece marking state separately
Matt Joiner [Sat, 21 Nov 2020 02:40:09 +0000 (13:40 +1100)]
Track piece marking state separately

3 years agosqlite storage: Ensure that chunks are consecutive
Matt Joiner [Sat, 21 Nov 2020 02:39:04 +0000 (13:39 +1100)]
sqlite storage: Ensure that chunks are consecutive

3 years agoReadme: downstream projects info.
pataquets [Wed, 18 Nov 2020 14:49:22 +0000 (15:49 +0100)]
Readme: downstream projects info.

3 years agosqlite storage: Remove num batched write queries log message
Matt Joiner [Mon, 16 Nov 2020 05:25:11 +0000 (16:25 +1100)]
sqlite storage: Remove num batched write queries log message

3 years agoUpdate to race fixes in filecache and sqlite
Matt Joiner [Mon, 16 Nov 2020 01:39:46 +0000 (12:39 +1100)]
Update to race fixes in filecache and sqlite

3 years agosqlite storage: Buffer write requests
Matt Joiner [Sat, 14 Nov 2020 11:57:19 +0000 (22:57 +1100)]
sqlite storage: Buffer write requests

3 years agosqlite storage: Add some expvars
Matt Joiner [Sat, 14 Nov 2020 11:56:55 +0000 (22:56 +1100)]
sqlite storage: Add some expvars

3 years agosqlite storage: Add error return from withConn
Matt Joiner [Sat, 14 Nov 2020 11:56:27 +0000 (22:56 +1100)]
sqlite storage: Add error return from withConn

3 years agoFix panic in when bbolt storage has Closed
Matt Joiner [Sat, 14 Nov 2020 11:54:40 +0000 (22:54 +1100)]
Fix panic in when bbolt storage has Closed

3 years agoMark piece complete without Client lock
Matt Joiner [Sat, 14 Nov 2020 11:53:55 +0000 (22:53 +1100)]
Mark piece complete without Client lock

3 years agoRead peer request data without Client lock
Matt Joiner [Fri, 13 Nov 2020 04:50:08 +0000 (15:50 +1100)]
Read peer request data without Client lock

3 years agoAdd support for the x.pe magnet link parameter
Matt Joiner [Thu, 12 Nov 2020 04:25:06 +0000 (15:25 +1100)]
Add support for the x.pe magnet link parameter

3 years agooptimise PEX by avoiding intermediate storage while preparing PEX messages
Yaroslav Kolomiiets [Thu, 12 Nov 2020 21:24:33 +0000 (21:24 +0000)]
optimise PEX by avoiding intermediate storage while preparing PEX messages

3 years agooptimise generation of the initial PEX
Yaroslav Kolomiiets [Tue, 10 Nov 2020 12:32:40 +0000 (12:32 +0000)]
optimise generation of the initial PEX

3 years agosimplify pexMsgFactory
Yaroslav Kolomiiets [Mon, 9 Nov 2020 15:05:47 +0000 (15:05 +0000)]
simplify pexMsgFactory

3 years agoadd test covering a recently fixed regression in initial PEX
Yaroslav Kolomiiets [Mon, 9 Nov 2020 13:20:23 +0000 (13:20 +0000)]
add test covering a recently fixed regression in initial PEX

3 years agoFix excessive logging from mmap-backed storage (anacrolix/torrent#436)
Yaroslav Kolomiiets [Wed, 11 Nov 2020 15:10:05 +0000 (15:10 +0000)]
Fix excessive logging from mmap-backed storage (anacrolix/torrent#436)

3 years agoImplement fmt.Formatter for metainfo.Hash
Matt Joiner [Wed, 11 Nov 2020 04:31:55 +0000 (15:31 +1100)]
Implement fmt.Formatter for metainfo.Hash

It's so easy to make mistakes by specifying %x when printing these.

3 years agoImprove cmd/tracker-announce
Matt Joiner [Wed, 11 Nov 2020 04:30:53 +0000 (15:30 +1100)]
Improve cmd/tracker-announce

Add -tracker flag, support specifying infohashes directly, spew announce responses so they're more readable.

3 years agoTidy up doc, file names, naming
Matt Joiner [Sun, 8 Nov 2020 23:56:27 +0000 (10:56 +1100)]
Tidy up doc, file names, naming

3 years agoUpdate README.md
Matt Joiner [Sun, 8 Nov 2020 22:20:05 +0000 (09:20 +1100)]
Update README.md

3 years agoFix initial pex message regression
Matt Joiner [Fri, 6 Nov 2020 05:23:23 +0000 (16:23 +1100)]
Fix initial pex message regression

As pointed out by @yarikk https://github.com/anacrolix/torrent/commit/c1d189ed31af99cbf6f10d9ffdc2cc4e19a73b91#r43920706

3 years agoReplace storage.IncompletePieceToWriter with io.Writer
Matt Joiner [Thu, 5 Nov 2020 23:36:49 +0000 (10:36 +1100)]
Replace storage.IncompletePieceToWriter with io.Writer

It was incorrect to assume piece hashing only operates on incomplete chunk data. This actually uncovered a bug where duplicate hash checks occurred, and the redundant checks would fail due to not reading the completed data.

3 years agoFix PkgGoDev reference in README
Code7unner [Thu, 5 Nov 2020 07:10:14 +0000 (17:10 +1000)]
Fix PkgGoDev reference in README

3 years agoFix piece getting queued for hash multiple times
Matt Joiner [Thu, 5 Nov 2020 21:39:56 +0000 (08:39 +1100)]
Fix piece getting queued for hash multiple times

Pieces could get queued for hash multiple times when we receive chunks if the piece starts getting hashed before we're done writing all the chunks out. This was only found because piece hashing currently only checks the incomplete data, which is missing after the first piece hash passes, the data is marked complete, then the subsequently queued hash has nothing to read.

3 years agoAdd the ReceiveEncryptedHandshakeSkeys callback
Matt Joiner [Thu, 5 Nov 2020 02:28:45 +0000 (13:28 +1100)]
Add the ReceiveEncryptedHandshakeSkeys callback

3 years agomse/cmd/mse: Fail on missing subcommand
Matt Joiner [Wed, 4 Nov 2020 05:34:31 +0000 (16:34 +1100)]
mse/cmd/mse: Fail on missing subcommand

3 years agoRemove old comment
Matt Joiner [Wed, 4 Nov 2020 00:34:24 +0000 (11:34 +1100)]
Remove old comment

3 years agosqlite storage: Add capacity management
Matt Joiner [Tue, 3 Nov 2020 04:17:12 +0000 (15:17 +1100)]
sqlite storage: Add capacity management

3 years agosqlite storage: Batch writes synchronously instead of buffering them first
Matt Joiner [Tue, 3 Nov 2020 04:16:57 +0000 (15:16 +1100)]
sqlite storage: Batch writes synchronously instead of buffering them first

3 years agoComment on storage.IncompletePieceToWriter
Matt Joiner [Tue, 3 Nov 2020 03:28:16 +0000 (14:28 +1100)]
Comment on storage.IncompletePieceToWriter

3 years agosqlite storage: Init schema in NewPool instead of NewProvider and add an option to...
Matt Joiner [Tue, 3 Nov 2020 02:11:44 +0000 (13:11 +1100)]
sqlite storage: Init schema in NewPool instead of NewProvider and add an option to disable

3 years agosqlite storage: Track total blob data size manually
Matt Joiner [Tue, 3 Nov 2020 02:10:17 +0000 (13:10 +1100)]
sqlite storage: Track total blob data size manually

Works around possible full table scan at startup, and possible lack of caching around cast(data as blob).

3 years agoUpdate the readahead window on read failure
Matt Joiner [Mon, 2 Nov 2020 23:41:47 +0000 (10:41 +1100)]
Update the readahead window on read failure

3 years agoAdd write incomplete/consecutive chunks interfaces
Matt Joiner [Mon, 2 Nov 2020 04:35:07 +0000 (15:35 +1100)]
Add write incomplete/consecutive chunks interfaces

3 years agosqlite storage: Add batched writes
Matt Joiner [Fri, 30 Oct 2020 08:46:51 +0000 (19:46 +1100)]
sqlite storage: Add batched writes

3 years agosqlite storage: Set mmap_size to a very large size
Matt Joiner [Fri, 30 Oct 2020 07:40:47 +0000 (18:40 +1100)]
sqlite storage: Set mmap_size to a very large size

Seems to fall back to ~2GiB on my system.

3 years agosqlite storage: Provide helpers and reasonable defaults
Matt Joiner [Fri, 30 Oct 2020 01:20:54 +0000 (12:20 +1100)]
sqlite storage: Provide helpers and reasonable defaults

3 years agoDon't delete requests until after they're written to disk
Matt Joiner [Fri, 30 Oct 2020 01:19:53 +0000 (12:19 +1100)]
Don't delete requests until after they're written to disk

This prevents too many pending writes building up. Webseed peers re-request synchronously, and the writes are done asynchronously, so they download too quickly and there was no backpressure. The backpressure now is provided by the upper limit on outstanding requests per connection.

3 years agosqlite storage: Force data to be used as a blob
Matt Joiner [Thu, 29 Oct 2020 23:47:50 +0000 (10:47 +1100)]
sqlite storage: Force data to be used as a blob

There's a bug in crawshaw.io/sqlite, and some forks where inserting []byte results in a text type instead of blob. To ensure things work correctly, we coerce data to blob wherever we can. See https://github.com/crawshaw/sqlite/issues/94 and the fork that fixes it.

3 years agoInclude a null byte in the middle of the Greeting test
Matt Joiner [Thu, 29 Oct 2020 23:42:45 +0000 (10:42 +1100)]
Include a null byte in the middle of the Greeting test

3 years agoFix peer request sleepiness
Matt Joiner [Wed, 28 Oct 2020 23:45:38 +0000 (10:45 +1100)]
Fix peer request sleepiness

New requests weren't being issued to the current peer when being deleted. For webseeds, this would cause them to not bother issuing new requests indefinitely.

(cherry picked from commit 146a16df4ea26d33b0ce0391c8220de14c9e18f4)

3 years agoDon't fail on 386 tests in CI
Matt Joiner [Wed, 28 Oct 2020 01:09:24 +0000 (12:09 +1100)]
Don't fail on 386 tests in CI

Looks like crawshaw.io/sqlite fails to build, possibly due to cross-compiling.

3 years agoSwitch CI to go1.15
Matt Joiner [Tue, 27 Oct 2020 23:03:37 +0000 (10:03 +1100)]
Switch CI to go1.15

3 years agoRemove some unused code
Matt Joiner [Tue, 27 Oct 2020 06:56:55 +0000 (17:56 +1100)]
Remove some unused code

3 years agoPerformance fiddling on sqlite storage
Matt Joiner [Tue, 27 Oct 2020 06:07:49 +0000 (17:07 +1100)]
Performance fiddling on sqlite storage

3 years agoReturn errors from Reader if data downloading won't occur
Matt Joiner [Tue, 27 Oct 2020 03:10:17 +0000 (14:10 +1100)]
Return errors from Reader if data downloading won't occur

Chunk write errors to storage can disable data download. Previously Readers would wait indefinitely for the data to become available. This change returns an error instead of stalling.

3 years agoDon't block trying to fill entire Reader.Read
Matt Joiner [Tue, 27 Oct 2020 01:59:07 +0000 (12:59 +1100)]
Don't block trying to fill entire Reader.Read

This conforms more to the contract in io.Reader. It's possible the old behaviour was better in reducing overhead, but that can be iterated on (or added as comments next time).

3 years agoRead from more than a single piece in each read to Torrent storage
Matt Joiner [Tue, 27 Oct 2020 01:24:43 +0000 (12:24 +1100)]
Read from more than a single piece in each read to Torrent storage

3 years agoRemove separate readable/available in Reader
Matt Joiner [Tue, 27 Oct 2020 01:05:40 +0000 (12:05 +1100)]
Remove separate readable/available in Reader

3 years agosqlite storage: Include capacity management
Matt Joiner [Tue, 27 Oct 2020 00:08:37 +0000 (11:08 +1100)]
sqlite storage: Include capacity management

3 years agosqlite storage: Do ReadAt without using incremental I/O
Matt Joiner [Tue, 27 Oct 2020 00:08:08 +0000 (11:08 +1100)]
sqlite storage: Do ReadAt without using incremental I/O

3 years agosqlite storage: Working recursive CTE for excess data
Matt Joiner [Fri, 23 Oct 2020 00:03:42 +0000 (11:03 +1100)]
sqlite storage: Working recursive CTE for excess data

3 years agosqlite storage: Add NewProviderPool
Matt Joiner [Thu, 22 Oct 2020 22:03:44 +0000 (09:03 +1100)]
sqlite storage: Add NewProviderPool

3 years agosqlite storage: Rename table to blob
Matt Joiner [Thu, 22 Oct 2020 22:01:15 +0000 (09:01 +1100)]
sqlite storage: Rename table to blob

Avoiding plural table names.

3 years agoPerformance improvements to PEX
Matt Joiner [Thu, 22 Oct 2020 21:58:55 +0000 (08:58 +1100)]
Performance improvements to PEX

3 years agoFix error handling for bad torrent adds with safe file handling v1.18.0
Matt Joiner [Thu, 15 Oct 2020 05:03:43 +0000 (16:03 +1100)]
Fix error handling for bad torrent adds with safe file handling