Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request introduces several significant changes to the Vortex protocol, including updates to dependencies, protocol documentation, error handling, and the implementation of the Vortex packet structure. Below is a summary of the most important changes:
Dependency Updates:
thiserror
,rand
, andbytes
dependencies inCargo.toml
to support error handling, random number generation, and byte manipulation.Protocol Documentation:
docs/README.md
to reflect changes in the protocol fields, including increasing theTag
field to 8 bits and theLength
field to 32 bits, allowing for up to 4GiB of data.Error Handling:
Error
enum andResult
type insrc/error/mod.rs
for better error management within the Vortex protocol.Vortex Packet Implementation:
Vortex
enum and related methods insrc/lib.rs
to represent different types of Vortex packets, includingDownloadPiece
,PieceContent
,Reserved
, andError
. Added methods for creating, parsing, and converting Vortex packets to and from byte slices.DownloadPiece Implementation:
DownloadPiece
struct and its associated methods insrc/tlv/download_piece.rs
to handle download piece requests, including methods for converting to and from byte slices.Related Issue
dragonflyoss/dragonfly#3753
Motivation and Context
Screenshots (if appropriate)