Skip to content

Bep 6 fast extension 13397060133053203187#581

Open
gogobaba501-creator wants to merge 4 commits into
ikatson:mainfrom
gogobaba501-creator:bep-6-fast-extension-13397060133053203187
Open

Bep 6 fast extension 13397060133053203187#581
gogobaba501-creator wants to merge 4 commits into
ikatson:mainfrom
gogobaba501-creator:bep-6-fast-extension-13397060133053203187

Conversation

@gogobaba501-creator
Copy link
Copy Markdown

No description provided.

google-labs-jules Bot and others added 4 commits April 25, 2026 07:23
Implemented BEP-6 Fast Extension for BitTorrent protocol:
- Extended `PeerMessage` with Fast Extension IDs (13-17) and updated serialization logic.
- Managed `0x04` bit flag negotiation correctly in initial Handshake.
- Integrated lightweight memory optimizations inside `PeerHandler` to substitute zero-copy implementations for `Have All` and `Have None` signals natively.
- Rewrote the peer piece acquisition flow by incorporating O(1) Local `suggested_pieces` checking specifically over globally blocking `ChunkTracker` prioritization routines.
- Integrated robust support for checking `allowed_fast` limits dynamically around choked environments.
- Properly deregistered asynchronous state limits and cleared explicit chunk targets using `unmark_chunk_downloaded` upon connection receiving `RejectRequest` ensuring TCP drops immediately without forcing entire file blocks to re-hash or drop using the invalid legacy `mark_piece_hash_failed` sequence.

Co-authored-by: gogobaba501-creator <279168786+gogobaba501-creator@users.noreply.github.com>
Implemented BEP-48 (Tracker Scrape Protocol) inside `tracker_comms`:
- Refactored `http_scrape` implementation natively mutating existing `/announce` parameters natively utilizing Tokio/reqwest parsing securely parsing dictionary bencode output cleanly mapping to stack-allocated `[u8; 20]` tracking hashes avoiding allocations.
- Extended UDP protocol packing algorithms securely with `Action::Scrape` matching BEP-15 sequences safely extracting chunk segments iterating out 12-byte tracking `[seeders, completed, leechers]` tuples sequentially.
- Enabled aggregated batching bounds securely distributing hash limits out across independent query lists bounded efficiently by the standard `<74` hash array restriction maintaining safe UDP payload thresholds natively.
- Enforced strict Tokio integration replacing synchronous socket resolvers with safe `tokio::net::lookup_host` bindings resolving UDP sockets natively.

Co-authored-by: gogobaba501-creator <279168786+gogobaba501-creator@users.noreply.github.com>
Implemented a robust high-performance Tokio binary RPC router over raw `tokio::net::TcpStream` with TCP keep-alive enforcement.
- Integrated zero-copy framing extraction mapping binary structures explicitly into `[u8; 20]` info_hash mappings.
- Safely routed `tokio-util::codec::LengthDelimitedCodec` boundaries without unneeded heap allocations or copies.
- Connected runtime commands directly into `librqbit` execution contexts. Exposed `AssignTorrent`, `Pause`, and dynamically evaluated `RequestTelemetry` iterating globally through active `ChunkTracker` statistics and speed vectors tightly packing responses into deterministic frame constraints securely skipping HTTP overhead.

Co-authored-by: gogobaba501-creator <279168786+gogobaba501-creator@users.noreply.github.com>
Implemented a robust high-performance Tokio binary RPC router over raw `tokio::net::TcpStream` with TCP keep-alive enforcement.
- Integrated zero-copy framing extraction mapping binary structures explicitly into `[u8; 20]` info_hash mappings.
- Safely routed `tokio-util::codec::LengthDelimitedCodec` boundaries without unneeded heap allocations or copies.
- Connected runtime commands directly into `librqbit` execution contexts. Exposed `AssignTorrent`, `Pause`, and dynamically evaluated `RequestTelemetry` iterating globally through active `ChunkTracker` statistics and speed vectors tightly packing responses into deterministic frame constraints securely skipping HTTP overhead.

Co-authored-by: gogobaba501-creator <279168786+gogobaba501-creator@users.noreply.github.com>
Copy link
Copy Markdown
Author

@gogobaba501-creator gogobaba501-creator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant