]> Sergey Matveev's repositories - btrtrc.git/log
btrtrc.git
10 months agoRestructure things ready for new webseed algorithm
Matt Joiner [Tue, 13 May 2025 01:39:12 +0000 (11:39 +1000)]
Restructure things ready for new webseed algorithm

10 months agoRemove a bunch of unused stuff from linting
Matt Joiner [Tue, 13 May 2025 01:36:01 +0000 (11:36 +1000)]
Remove a bunch of unused stuff from linting

10 months agoRename request updating stuff to better fit how it's actually used in preparation...
Matt Joiner [Mon, 12 May 2025 23:26:39 +0000 (09:26 +1000)]
Rename request updating stuff to better fit how it's actually used in preparation for redoing webseeds

10 months agoGuard storage/possum behind cgo
Matt Joiner [Mon, 12 May 2025 11:35:03 +0000 (21:35 +1000)]
Guard storage/possum behind cgo

10 months agoFix static linking for Linux
Matt Joiner [Mon, 12 May 2025 09:59:12 +0000 (19:59 +1000)]
Fix static linking for Linux

10 months agoSkip GOARCH=386 test on darwin and try to minimize step outputs
Matt Joiner [Mon, 12 May 2025 07:49:43 +0000 (17:49 +1000)]
Skip GOARCH=386 test on darwin and try to minimize step outputs

10 months agoPull possible fuse fix for linux
Matt Joiner [Mon, 12 May 2025 07:39:36 +0000 (17:39 +1000)]
Pull possible fuse fix for linux

10 months agoOnly test with go1.24
Matt Joiner [Mon, 12 May 2025 07:10:20 +0000 (17:10 +1000)]
Only test with go1.24

10 months agoAdd just act
Matt Joiner [Mon, 12 May 2025 07:08:09 +0000 (17:08 +1000)]
Add just act

10 months agoFix broken file benchmark
Matt Joiner [Mon, 12 May 2025 07:03:29 +0000 (17:03 +1000)]
Fix broken file benchmark

10 months agoCheckout submodules
Matt Joiner [Mon, 12 May 2025 03:37:34 +0000 (13:37 +1000)]
Checkout submodules

10 months agoAdd LDFLAGS for possum
Matt Joiner [Mon, 12 May 2025 03:23:27 +0000 (13:23 +1000)]
Add LDFLAGS for possum

10 months agoInclude Rust toolchain
Matt Joiner [Mon, 12 May 2025 03:02:57 +0000 (13:02 +1000)]
Include Rust toolchain

10 months agogorond
Matt Joiner [Mon, 12 May 2025 02:20:36 +0000 (12:20 +1000)]
gorond

10 months agoAdd comment on gotMetainfoC
Matt Joiner [Mon, 12 May 2025 02:20:15 +0000 (12:20 +1000)]
Add comment on gotMetainfoC

10 months agoWow Zed AI actually passed my refactoring test
Matt Joiner [Mon, 12 May 2025 02:20:01 +0000 (12:20 +1000)]
Wow Zed AI actually passed my refactoring test

10 months agoReinit storage reader on read errors
Matt Joiner [Thu, 8 May 2025 06:01:43 +0000 (16:01 +1000)]
Reinit storage reader on read errors

10 months agoUse analog.Slogger by default so GO_LOG still works
Matt Joiner [Thu, 8 May 2025 05:51:21 +0000 (15:51 +1000)]
Use analog.Slogger by default so GO_LOG still works

10 months agoAdd missing return and tidy waitAvailable
Matt Joiner [Thu, 8 May 2025 05:50:56 +0000 (15:50 +1000)]
Add missing return and tidy waitAvailable

10 months agoFix some corner case chunk prefix handling
Matt Joiner [Wed, 7 May 2025 11:57:32 +0000 (21:57 +1000)]
Fix some corner case chunk prefix handling

10 months agoFinish the storage reader implementation
Matt Joiner [Wed, 7 May 2025 11:27:00 +0000 (21:27 +1000)]
Finish the storage reader implementation

10 months agoWork towards allowing optimized torrent storage readers
Matt Joiner [Mon, 28 Apr 2025 01:18:43 +0000 (11:18 +1000)]
Work towards allowing optimized torrent storage readers

10 months agoMove a few things around to save a bit of memory
Matt Joiner [Wed, 7 May 2025 09:37:57 +0000 (19:37 +1000)]
Move a few things around to save a bit of memory

10 months agoUpdate anacrolix/sync to reduce memory use
Matt Joiner [Wed, 7 May 2025 04:04:20 +0000 (14:04 +1000)]
Update anacrolix/sync to reduce memory use

10 months agoUse Extent.End method
Matt Joiner [Wed, 7 May 2025 03:59:49 +0000 (13:59 +1000)]
Use Extent.End method

10 months agoFix ReadAt after close on mmap span not returning
Matt Joiner [Wed, 7 May 2025 03:59:35 +0000 (13:59 +1000)]
Fix ReadAt after close on mmap span not returning

10 months agoRemove some recursive read locking
Matt Joiner [Wed, 7 May 2025 03:59:05 +0000 (13:59 +1000)]
Remove some recursive read locking

10 months agoRemove extra Torrent closed context goroutine for trackers
Matt Joiner [Wed, 7 May 2025 00:20:05 +0000 (10:20 +1000)]
Remove extra Torrent closed context goroutine for trackers

10 months agoHarden read/write part file ordering
Matt Joiner [Tue, 6 May 2025 23:37:25 +0000 (09:37 +1000)]
Harden read/write part file ordering

10 months agolint
Matt Joiner [Tue, 6 May 2025 23:36:47 +0000 (09:36 +1000)]
lint

10 months agoCreate webseed requester goroutines as required
Matt Joiner [Tue, 6 May 2025 23:36:33 +0000 (09:36 +1000)]
Create webseed requester goroutines as required

10 months agoAdd ClientConfig.Slogger
Matt Joiner [Tue, 6 May 2025 06:06:36 +0000 (16:06 +1000)]
Add ClientConfig.Slogger

10 months agoMerge branch 'master' into part-files
Matt Joiner [Tue, 6 May 2025 05:59:48 +0000 (15:59 +1000)]
Merge branch 'master' into part-files

10 months agoLower log level for peer upload read errors when Torrent is closed
Matt Joiner [Tue, 6 May 2025 02:17:36 +0000 (12:17 +1000)]
Lower log level for peer upload read errors when Torrent is closed

Fixes #980.

10 months agoRemove missing storage read test that no longer makes sense with part files
Matt Joiner [Tue, 29 Apr 2025 06:37:49 +0000 (16:37 +1000)]
Remove missing storage read test that no longer makes sense with part files

10 months agoRaise torrent source failure log level to Warning
Matt Joiner [Tue, 29 Apr 2025 06:22:15 +0000 (16:22 +1000)]
Raise torrent source failure log level to Warning

10 months agoAdd slog.Logger to trackerScraper
Matt Joiner [Tue, 29 Apr 2025 08:28:18 +0000 (18:28 +1000)]
Add slog.Logger to trackerScraper

10 months agoHandle downgrading part files
Matt Joiner [Tue, 29 Apr 2025 06:21:21 +0000 (16:21 +1000)]
Handle downgrading part files

10 months agoFix %T in log message that is no longer useful
Matt Joiner [Tue, 29 Apr 2025 03:17:48 +0000 (13:17 +1000)]
Fix %T in log message that is no longer useful

10 months agoFix overlapping torrent data in a test helper
Matt Joiner [Tue, 29 Apr 2025 03:17:25 +0000 (13:17 +1000)]
Fix overlapping torrent data in a test helper

10 months agoExtract file and dir perm constants
Matt Joiner [Tue, 29 Apr 2025 02:01:10 +0000 (12:01 +1000)]
Extract file and dir perm constants

10 months agocmd/torrent: Dump full Client stats after download
Matt Joiner [Tue, 29 Apr 2025 00:20:10 +0000 (10:20 +1000)]
cmd/torrent: Dump full Client stats after download

10 months agoStart implementing part file support for file storage
Matt Joiner [Fri, 25 Apr 2025 06:36:53 +0000 (16:36 +1000)]
Start implementing part file support for file storage

10 months agoRefactor Reader.readOnceAt
Matt Joiner [Mon, 28 Apr 2025 01:36:11 +0000 (11:36 +1000)]
Refactor Reader.readOnceAt

Looks like there was some errors that could be dropped.
We also handle a few corner cases and ReadAt returning 0 being handled non-canonically.

10 months agoUpdate requests when piece order changes if there's a storage cap
Matt Joiner [Mon, 28 Apr 2025 01:05:44 +0000 (11:05 +1000)]
Update requests when piece order changes if there's a storage cap

10 months agoStorage cap wasn't passed to piece resource implementation
Matt Joiner [Mon, 28 Apr 2025 00:42:00 +0000 (10:42 +1000)]
Storage cap wasn't passed to piece resource implementation

This breaks the tests, because it was actually masking bad behaviour.

10 months agoExpose PieceRequestOrder.Iter and PieceRequestOrderItem for debugging
Matt Joiner [Mon, 28 Apr 2025 00:33:59 +0000 (10:33 +1000)]
Expose PieceRequestOrder.Iter and PieceRequestOrderItem for debugging

10 months agoSwitch to github.com/anacrolix/fuse@v0.4.0
Matt Joiner [Mon, 28 Apr 2025 00:28:38 +0000 (10:28 +1000)]
Switch to github.com/anacrolix/fuse@v0.4.0

I'm sick of osxfuse asking about kext on macOS

10 months agoAdd Reader.SetContext to deprecated ReadContext
Matt Joiner [Mon, 28 Apr 2025 00:27:17 +0000 (10:27 +1000)]
Add Reader.SetContext to deprecated ReadContext

10 months agoComments and tidies
Matt Joiner [Mon, 28 Apr 2025 00:15:18 +0000 (10:15 +1000)]
Comments and tidies

10 months agoUse iters in a few places around segments and v2 file trees and ensure mmap storage...
Matt Joiner [Fri, 25 Apr 2025 05:04:47 +0000 (15:04 +1000)]
Use iters in a few places around segments and v2 file trees and ensure mmap storage has v2 compatible segment index

10 months agoReturn errors in mmap storage piece completion
Matt Joiner [Fri, 25 Apr 2025 01:46:07 +0000 (11:46 +1000)]
Return errors in mmap storage piece completion

11 months agogorond
Matt Joiner [Thu, 24 Apr 2025 13:08:59 +0000 (23:08 +1000)]
gorond

11 months agoAdd a few TODOs and fixes to trackerScraper
Matt Joiner [Thu, 24 Apr 2025 13:07:52 +0000 (23:07 +1000)]
Add a few TODOs and fixes to trackerScraper

11 months agoSet rate limiter bursts automatically if limit is not Inf
Matt Joiner [Thu, 24 Apr 2025 13:06:50 +0000 (23:06 +1000)]
Set rate limiter bursts automatically if limit is not Inf

11 months agoInclude torrent info hash as logger context text
Matt Joiner [Thu, 24 Apr 2025 13:06:15 +0000 (23:06 +1000)]
Include torrent info hash as logger context text

11 months agoAdd Request.String
Matt Joiner [Thu, 24 Apr 2025 13:05:42 +0000 (23:05 +1000)]
Add Request.String

11 months agoMake WebSeed max requests configurable
Matt Joiner [Thu, 24 Apr 2025 13:05:32 +0000 (23:05 +1000)]
Make WebSeed max requests configurable

11 months agoChange ClientConfig.MaxAllocPeerRequestDataPerConn to be an int
Matt Joiner [Thu, 24 Apr 2025 13:04:33 +0000 (23:04 +1000)]
Change ClientConfig.MaxAllocPeerRequestDataPerConn to be an int

11 months agoInclude incomplete torrent count in client status
Matt Joiner [Thu, 24 Apr 2025 13:03:50 +0000 (23:03 +1000)]
Include incomplete torrent count in client status

11 months agoFix dumpStats to reuse spew config
Matt Joiner [Thu, 24 Apr 2025 13:03:12 +0000 (23:03 +1000)]
Fix dumpStats to reuse spew config

11 months agoStrongly type client piece request order keys
Matt Joiner [Thu, 24 Apr 2025 13:08:38 +0000 (23:08 +1000)]
Strongly type client piece request order keys

11 months agoAdd new metrics and PeerStats
Matt Joiner [Thu, 17 Apr 2025 00:34:42 +0000 (10:34 +1000)]
Add new metrics and PeerStats

11 months agoAdd BytesHashed count and refactor for other Torrent-level counts
Matt Joiner [Wed, 9 Apr 2025 06:21:06 +0000 (16:21 +1000)]
Add BytesHashed count and refactor for other Torrent-level counts

11 months agocmd/torrent: Add verify and flag for large chunk uploads
Matt Joiner [Wed, 9 Apr 2025 09:45:53 +0000 (19:45 +1000)]
cmd/torrent: Add verify and flag for large chunk uploads

Fix nil deref if flag isn't provided

11 months agoAdd Torrent.VerifyDataContext
Matt Joiner [Wed, 9 Apr 2025 05:05:26 +0000 (15:05 +1000)]
Add Torrent.VerifyDataContext

11 months agoAdd infohash to torrent logger
Matt Joiner [Wed, 9 Apr 2025 05:03:36 +0000 (15:03 +1000)]
Add infohash to torrent logger

11 months agocmd/torrent: Switch to a status output more suited for lots of torrents
Matt Joiner [Wed, 9 Apr 2025 05:03:06 +0000 (15:03 +1000)]
cmd/torrent: Switch to a status output more suited for lots of torrents

11 months agoFix races in client tracker status event callback tests
Matt Joiner [Wed, 9 Apr 2025 02:40:53 +0000 (12:40 +1000)]
Fix races in client tracker status event callback tests

11 months agoAdd Piece.VerifyDataContext and improve piece VerifyData concurrency
Matt Joiner [Wed, 9 Apr 2025 02:27:19 +0000 (12:27 +1000)]
Add Piece.VerifyDataContext and improve piece VerifyData concurrency

11 months agogorond
Matt Joiner [Wed, 9 Apr 2025 02:25:34 +0000 (12:25 +1000)]
gorond

11 months agoSwitch client_test.go to go-quicktest/qt and add errTorrentClosed
Matt Joiner [Wed, 9 Apr 2025 02:24:45 +0000 (12:24 +1000)]
Switch client_test.go to go-quicktest/qt and add errTorrentClosed

11 months agocmd/torrent: Remove redundant signal notification
Matt Joiner [Wed, 9 Apr 2025 00:03:44 +0000 (10:03 +1000)]
cmd/torrent: Remove redundant signal notification

11 months agoPull possum fix for Go 1.24
Matt Joiner [Mon, 7 Apr 2025 03:02:09 +0000 (13:02 +1000)]
Pull possum fix for Go 1.24

11 months agocmd/torrent: Some log, ctx and error handling cleanup
Matt Joiner [Fri, 4 Apr 2025 05:21:23 +0000 (16:21 +1100)]
cmd/torrent: Some log, ctx and error handling cleanup

12 months agoExpose torrent Peer status updates (#987)
Marco Vidonis [Tue, 18 Mar 2025 23:29:32 +0000 (23:29 +0000)]
Expose torrent Peer status updates (#987)

* handle connection to torrent peer status update messages

* basic observer framework
* connects to a valid tracker
* added observer channel for announce status
* set up Peer Connection status Observers
* add PeerConn test: connection established
* added Observers factory method
* Added Event to AnnounceStatus, with embedded TrackerStatus
* state updates must be non-blocking
* add unit tests on PeerConn Observer status reading
* add test and debug log on dropped connection
* add PeerID check to test

---------

Co-authored-by: Parker Whittle <pwhittle@medicom.us>
* do not support webtorrent/transport_test on wasm

* make AnnounceStatus InfoHash into a HexString

* replace MakeMapIfNilAndSet

* add StatusUpdated to callbacks

* replace Observers on Peer Conn status with callbacks

* replace tracker status updates with callbacks

* replace tracker announce status updates with callbacks

* remove references to observers

* test callbacks in client-peerconn_test

* add check that all callbacks were called in peer connection test

* test callbacks in client-tracker_test

---------

Co-authored-by: Parker Whittle <pwhittle@medicom.us>
12 months agoupdates to actions/cache v3 (#1000)
Phil Cummins [Sun, 16 Mar 2025 11:34:53 +0000 (12:34 +0100)]
updates to actions/cache v3 (#1000)

Co-authored-by: Phil Cummins <philip.cummins@bsc.es>
13 months agoFix building go-libutp with C17 v1.58.1
Matt Joiner [Sun, 16 Feb 2025 01:22:40 +0000 (12:22 +1100)]
Fix building go-libutp with C17

Fixes #995

14 months agoWebSeed seems supported (#993)
Mitar [Sat, 28 Dec 2024 23:55:04 +0000 (00:55 +0100)]
WebSeed seems supported (#993)

17 months agoIgnore /.env v1.58.0
Matt Joiner [Thu, 17 Oct 2024 23:55:16 +0000 (10:55 +1100)]
Ignore /.env

I use this to set up CGO_LDFLAGS for possum

17 months agoAdd just check
Matt Joiner [Thu, 17 Oct 2024 23:54:02 +0000 (10:54 +1100)]
Add just check

17 months agoOnly apply WebRTC data channel write limit to webtorrent peer conns
Matt Joiner [Thu, 17 Oct 2024 23:57:59 +0000 (10:57 +1100)]
Only apply WebRTC data channel write limit to webtorrent peer conns

17 months agoupgrade pion/webrtc to v4 (#985)
Marco Vidonis [Mon, 14 Oct 2024 10:04:15 +0000 (11:04 +0100)]
upgrade pion/webrtc to v4 (#985)

17 months agoUpdate dep to remove govulncheck finding
Matt Joiner [Mon, 7 Oct 2024 00:30:33 +0000 (11:30 +1100)]
Update dep to remove govulncheck finding

17 months agoExpose WebRTC peerconn stats (#983)
Marco Vidonis [Thu, 3 Oct 2024 14:46:35 +0000 (15:46 +0100)]
Expose WebRTC peerconn stats (#983)

* add WebRTC peer connection transport stats

* save all peer connections in tracker-client and make stats available when seeding

* make offer ID keys into readable strings

* handle unsupported Peer Conn stats on WASM

17 months agoUsed aider and claude to refactor storage tests to go-quicktest/qt
Matt Joiner (aider) [Wed, 2 Oct 2024 01:25:32 +0000 (11:25 +1000)]
Used aider and claude to refactor storage tests to go-quicktest/qt

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

17 months agoSet ConnectionIdMismatchNul error default log level to debug
Matt Joiner [Mon, 30 Sep 2024 02:13:59 +0000 (12:13 +1000)]
Set ConnectionIdMismatchNul error default log level to debug

17 months agoUse stdlib replacements of golang.org/x/exp and newer multiless
Matt Joiner [Sun, 29 Sep 2024 03:54:25 +0000 (13:54 +1000)]
Use stdlib replacements of golang.org/x/exp and newer multiless

Fixes #957.

17 months agogorond v1.57.1
Matt Joiner [Sat, 28 Sep 2024 12:20:25 +0000 (22:20 +1000)]
gorond

17 months agoRework handshake parsing
Matt Joiner [Sat, 28 Sep 2024 12:19:29 +0000 (22:19 +1000)]
Rework handshake parsing

17 months agoRemove use of missinggo perf
Matt Joiner [Sat, 28 Sep 2024 12:02:16 +0000 (22:02 +1000)]
Remove use of missinggo perf

18 months agoFix panic using web RTC RemoteAddr directly from conn v1.57.0
Matt Joiner [Mon, 9 Sep 2024 10:53:29 +0000 (20:53 +1000)]
Fix panic using web RTC RemoteAddr directly from conn

Fixes #972.

18 months agotracker/udp: Reset connection ID on error response
Matt Joiner [Tue, 3 Sep 2024 05:18:54 +0000 (15:18 +1000)]
tracker/udp: Reset connection ID on error response

18 months agotracker/udp: Improve context handling
Matt Joiner [Tue, 3 Sep 2024 05:18:30 +0000 (15:18 +1000)]
tracker/udp: Improve context handling

18 months agoBasic support for responding to HashRequest
mivik [Thu, 29 Aug 2024 09:13:44 +0000 (17:13 +0800)]
Basic support for responding to HashRequest

Also Piece.hasPieceLayer seems to be faulty so I tried fixing it

18 months agoSupport encoding Hashes & HashReject messages
mivik [Thu, 29 Aug 2024 09:12:44 +0000 (17:12 +0800)]
Support encoding Hashes & HashReject messages

18 months agoAdd webseed name to webseed peer logger
Matt Joiner [Tue, 27 Aug 2024 02:03:09 +0000 (12:03 +1000)]
Add webseed name to webseed peer logger

18 months agoFix webseed stall on request errors
Matt Joiner [Tue, 27 Aug 2024 02:03:01 +0000 (12:03 +1000)]
Fix webseed stall on request errors

18 months agoFix errors in webseed causing very long stalls in requesting
Matt Joiner [Tue, 27 Aug 2024 01:32:38 +0000 (11:32 +1000)]
Fix errors in webseed causing very long stalls in requesting

Reuse the "too fast" error handling for all errors when requesting from webseeds. This prevents long stalls due to common errors.

18 months agoFix webseeds not requesting after priorities are already set
Matt Joiner [Tue, 27 Aug 2024 01:29:59 +0000 (11:29 +1000)]
Fix webseeds not requesting after priorities are already set

https://github.com/anacrolix/torrent/issues/964#issuecomment-2295308596