]>
Sergey Matveev's repositories - btrtrc.git/log
Sergey Matveev [Thu, 20 Apr 2023 07:42:38 +0000 (10:42 +0300)]
cmd/btrtrc client
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.
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.
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
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.
Matt Joiner [Mon, 28 Apr 2025 00:33:59 +0000 (10:33 +1000)]
Expose PieceRequestOrder.Iter and PieceRequestOrderItem for debugging
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
Matt Joiner [Mon, 28 Apr 2025 00:27:17 +0000 (10:27 +1000)]
Add Reader.SetContext to deprecated ReadContext
Matt Joiner [Mon, 28 Apr 2025 00:15:18 +0000 (10:15 +1000)]
Comments and tidies
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
Matt Joiner [Fri, 25 Apr 2025 01:46:07 +0000 (11:46 +1000)]
Return errors in mmap storage piece completion
Matt Joiner [Thu, 24 Apr 2025 13:08:59 +0000 (23:08 +1000)]
gorond
Matt Joiner [Thu, 24 Apr 2025 13:07:52 +0000 (23:07 +1000)]
Add a few TODOs and fixes to trackerScraper
Matt Joiner [Thu, 24 Apr 2025 13:06:50 +0000 (23:06 +1000)]
Set rate limiter bursts automatically if limit is not Inf
Matt Joiner [Thu, 24 Apr 2025 13:06:15 +0000 (23:06 +1000)]
Include torrent info hash as logger context text
Matt Joiner [Thu, 24 Apr 2025 13:05:42 +0000 (23:05 +1000)]
Add Request.String
Matt Joiner [Thu, 24 Apr 2025 13:05:32 +0000 (23:05 +1000)]
Make WebSeed max requests configurable
Matt Joiner [Thu, 24 Apr 2025 13:04:33 +0000 (23:04 +1000)]
Change ClientConfig.MaxAllocPeerRequestDataPerConn to be an int
Matt Joiner [Thu, 24 Apr 2025 13:03:50 +0000 (23:03 +1000)]
Include incomplete torrent count in client status
Matt Joiner [Thu, 24 Apr 2025 13:03:12 +0000 (23:03 +1000)]
Fix dumpStats to reuse spew config
Matt Joiner [Thu, 24 Apr 2025 13:08:38 +0000 (23:08 +1000)]
Strongly type client piece request order keys
Matt Joiner [Thu, 17 Apr 2025 00:34:42 +0000 (10:34 +1000)]
Add new metrics and PeerStats
Matt Joiner [Wed, 9 Apr 2025 06:21:06 +0000 (16:21 +1000)]
Add BytesHashed count and refactor for other Torrent-level counts
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
Matt Joiner [Wed, 9 Apr 2025 05:05:26 +0000 (15:05 +1000)]
Add Torrent.VerifyDataContext
Matt Joiner [Wed, 9 Apr 2025 05:03:36 +0000 (15:03 +1000)]
Add infohash to torrent logger
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
Matt Joiner [Wed, 9 Apr 2025 02:40:53 +0000 (12:40 +1000)]
Fix races in client tracker status event callback tests
Matt Joiner [Wed, 9 Apr 2025 02:27:19 +0000 (12:27 +1000)]
Add Piece.VerifyDataContext and improve piece VerifyData concurrency
Matt Joiner [Wed, 9 Apr 2025 02:25:34 +0000 (12:25 +1000)]
gorond
Matt Joiner [Wed, 9 Apr 2025 02:24:45 +0000 (12:24 +1000)]
Switch client_test.go to go-quicktest/qt and add errTorrentClosed
Matt Joiner [Wed, 9 Apr 2025 00:03:44 +0000 (10:03 +1000)]
cmd/torrent: Remove redundant signal notification
Matt Joiner [Mon, 7 Apr 2025 03:02:09 +0000 (13:02 +1000)]
Pull possum fix for Go 1.24
Matt Joiner [Fri, 4 Apr 2025 05:21:23 +0000 (16:21 +1100)]
cmd/torrent: Some log, ctx and error handling cleanup
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>
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>
Matt Joiner [Sun, 16 Feb 2025 01:22:40 +0000 (12:22 +1100)]
Fix building go-libutp with C17
Fixes #995
Mitar [Sat, 28 Dec 2024 23:55:04 +0000 (00:55 +0100)]
WebSeed seems supported (#993)
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
Matt Joiner [Thu, 17 Oct 2024 23:54:02 +0000 (10:54 +1100)]
Add just check
Matt Joiner [Thu, 17 Oct 2024 23:57:59 +0000 (10:57 +1100)]
Only apply WebRTC data channel write limit to webtorrent peer conns
Marco Vidonis [Mon, 14 Oct 2024 10:04:15 +0000 (11:04 +0100)]
upgrade pion/webrtc to v4 (#985)
Matt Joiner [Mon, 7 Oct 2024 00:30:33 +0000 (11:30 +1100)]
Update dep to remove govulncheck finding
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
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
Matt Joiner [Mon, 30 Sep 2024 02:13:59 +0000 (12:13 +1000)]
Set ConnectionIdMismatchNul error default log level to debug
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.
Matt Joiner [Sat, 28 Sep 2024 12:20:25 +0000 (22:20 +1000)]
gorond
Matt Joiner [Sat, 28 Sep 2024 12:19:29 +0000 (22:19 +1000)]
Rework handshake parsing
Matt Joiner [Sat, 28 Sep 2024 12:02:16 +0000 (22:02 +1000)]
Remove use of missinggo perf
Matt Joiner [Mon, 9 Sep 2024 10:53:29 +0000 (20:53 +1000)]
Fix panic using web RTC RemoteAddr directly from conn
Fixes #972.
Matt Joiner [Tue, 3 Sep 2024 05:18:54 +0000 (15:18 +1000)]
tracker/udp: Reset connection ID on error response
Matt Joiner [Tue, 3 Sep 2024 05:18:30 +0000 (15:18 +1000)]
tracker/udp: Improve context handling
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
mivik [Thu, 29 Aug 2024 09:12:44 +0000 (17:12 +0800)]
Support encoding Hashes & HashReject messages
Matt Joiner [Tue, 27 Aug 2024 02:03:09 +0000 (12:03 +1000)]
Add webseed name to webseed peer logger
Matt Joiner [Tue, 27 Aug 2024 02:03:01 +0000 (12:03 +1000)]
Fix webseed stall on request errors
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.
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
Matt Joiner [Tue, 27 Aug 2024 01:29:18 +0000 (11:29 +1000)]
Add test showing add webseed doesn't request after priorities are already set
Matt Joiner [Tue, 27 Aug 2024 00:03:22 +0000 (10:03 +1000)]
Fix empty Info marshalling test
Mivik [Mon, 26 Aug 2024 09:44:45 +0000 (17:44 +0800)]
Basic support for serializing v2 torrent file (#968)
* Support marshalling FileTree
* Omit Pieces in torrent info if empty
Otherwise some BitTorrent client (e.g. libttorrent) will not be able to
parse v2 torrent file.
Matt Joiner [Tue, 13 Aug 2024 01:09:34 +0000 (11:09 +1000)]
Tidy up cmd/torrent cleanup and websocket trackers logging
Matt Joiner [Sat, 10 Aug 2024 11:51:45 +0000 (21:51 +1000)]
Add contexted ReadWriter to handshakes
Matt Joiner [Sat, 10 Aug 2024 04:41:02 +0000 (14:41 +1000)]
Add context to mse handshakes
Matt Joiner [Wed, 24 Jul 2024 05:21:02 +0000 (15:21 +1000)]
Fix spello
Matt Joiner [Tue, 23 Jul 2024 08:58:59 +0000 (18:58 +1000)]
Change some metainfo.MetaInfo methods to take pointer receivers
It's kind of unnecessary to take them by value here, and, slower. Use Rust instead!!
Matt Joiner [Tue, 23 Jul 2024 08:58:04 +0000 (18:58 +1000)]
Be more pedantic about trailing data in metainfo.Load and bencode.Unmarshal
Fixes https://github.com/anacrolix/torrent/issues/963.
Matt Joiner [Tue, 23 Jul 2024 08:53:10 +0000 (18:53 +1000)]
Tidy up use of quicktest
Matt Joiner [Sat, 13 Jul 2024 11:37:57 +0000 (21:37 +1000)]
Remove confusing symlink
Related to issue #961
Matt Joiner [Fri, 12 Jul 2024 05:21:37 +0000 (15:21 +1000)]
Fix bad recursive reads in piece resource chunks ReadAt
It would always read from the first chunk, and scan across io.EOF until it hit the right chunk.
Matt Joiner [Sun, 30 Jun 2024 09:52:53 +0000 (19:52 +1000)]
Fix shadowed error in webseed response handling
Matt Joiner [Thu, 27 Jun 2024 05:49:13 +0000 (15:49 +1000)]
Use mmap storage in test for performance
Matt Joiner [Thu, 27 Jun 2024 04:52:59 +0000 (14:52 +1000)]
Resolve log and chansync from workspace
Matt Joiner [Thu, 27 Jun 2024 04:35:46 +0000 (14:35 +1000)]
gorond
Matt Joiner [Thu, 27 Jun 2024 04:33:18 +0000 (14:33 +1000)]
Add peer bootstrapping integration test
Matt Joiner [Thu, 27 Jun 2024 04:32:32 +0000 (14:32 +1000)]
Make Torrent.Complete a method and make it return a read-only interface
Matt Joiner [Thu, 27 Jun 2024 04:31:31 +0000 (14:31 +1000)]
Fix sqlite piece completion error when dirs are missing
Matt Joiner [Thu, 27 Jun 2024 04:34:54 +0000 (14:34 +1000)]
Add a Context param to ClientImpl.OpenTorrent for logging
This is very likely going to be a breaking change, but the alternative is a nightmare of backwards compatibility.
Matt Joiner [Wed, 26 Jun 2024 13:30:08 +0000 (23:30 +1000)]
bencode: Support unmarshalling into maps with non-string key types
Fixes #952
Matt Joiner [Wed, 26 Jun 2024 13:37:24 +0000 (23:37 +1000)]
Rearrange the workspaces in tests
Matt Joiner [Wed, 26 Jun 2024 10:43:46 +0000 (20:43 +1000)]
Improve some pointer stuff around worseConnInput
Matt Joiner [Tue, 11 Jun 2024 06:21:04 +0000 (16:21 +1000)]
Correctly hash hybrid torrents with trailing v1 padding file
Fixes #949.
Matt Joiner [Mon, 3 Jun 2024 03:43:31 +0000 (13:43 +1000)]
Update possum dep
Matt Joiner [Sat, 9 Mar 2024 06:36:22 +0000 (17:36 +1100)]
possum: Use MovePrefix for completed chunks
ucwong [Thu, 30 May 2024 23:16:37 +0000 (00:16 +0100)]
clone func used since go 1.21 (#947)
ucwong [Sun, 26 May 2024 11:47:04 +0000 (12:47 +0100)]
add Torrent.ModifyTrackers() func (#945)
* add ClearTrackers() func
* add stop channel for each announcer
* add stop once avoid multi close
* use waitgroup to stop ann
Levi [Sun, 26 May 2024 11:38:54 +0000 (19:38 +0800)]
fix: upnp clear loop trap (#946)
dependabot[bot] [Fri, 24 May 2024 03:30:20 +0000 (13:30 +1000)]
--- (#941)
updated-dependencies:
- dependency-name: golang.org/x/net
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Levi [Fri, 24 May 2024 03:29:40 +0000 (11:29 +0800)]
fix: clear UPNP port mappings when client close (#942)
* fix: clear UPNP port mappings when client close
* fix: go mod sum
Matt Joiner [Fri, 3 May 2024 03:46:35 +0000 (13:46 +1000)]
Add type updateRequestReason and comments
Mark Holt [Mon, 29 Apr 2024 21:05:49 +0000 (22:05 +0100)]
Added comments and variables instead of raw reason strings
Matt Joiner [Fri, 3 May 2024 03:30:37 +0000 (13:30 +1000)]
Add Toru to downstream projects
Mark Holt [Sat, 20 Apr 2024 07:17:09 +0000 (08:17 +0100)]
steal stability
Alex Sharov [Fri, 26 Apr 2024 06:51:39 +0000 (13:51 +0700)]
file.Flush() (#937)
Alex Sharov [Thu, 25 Apr 2024 07:23:58 +0000 (14:23 +0700)]
Merge pull request #936 from anacrolix/ci_up
CI: upgrade `actions/checkout`
Alex Sharov [Thu, 25 Apr 2024 06:03:20 +0000 (13:03 +0700)]
Merge pull request #935 from anacrolix/dependabot/go_modules/tests/issue-930/golang.org/x/net-0.23.0
Bump golang.org/x/net from 0.10.0 to 0.23.0 in /tests/issue-930
alex.sharov [Thu, 25 Apr 2024 05:56:29 +0000 (12:56 +0700)]
save
Luo Zhengjie [Thu, 25 Apr 2024 05:19:54 +0000 (13:19 +0800)]
Optimize memory usage by avoiding intermediate buffer in message serialization (#928)
* Optimize memory usage by avoiding intermediate buffer in message serialization
This commit replaces the use of an intermediate buffer in the message serialization process with a direct write-to-buffer approach. The original implementation used MustMarshalBinary() which involved an extra memory copy to an intermediate buffer before writing to the final writeBuffer, leading to high memory consumption for large messages. The new WriteTo function writes message data directly to the writeBuffer, significantly reducing memory overhead and CPU time spent on garbage collection.
* add benchmark for write
* benchmark for 1M/4M/8M
* Tidy up new benchmarks
* Maintain older payload write implementation
---------
Co-authored-by: luozhengjie.lzj <luozhengjie.lzj@alibaba-inc.com>
Co-authored-by: Matt Joiner <anacrolix@gmail.com>
Matt Joiner [Thu, 25 Apr 2024 03:54:37 +0000 (13:54 +1000)]
Pull zig cross compile fixes for go-llsqlite/crawshaw