Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: init vortex #6

Merged
merged 1 commit into from
Jan 14, 2025
Merged

feat: init vortex #6

merged 1 commit into from
Jan 14, 2025

Conversation

gaius-qi
Copy link
Member

@gaius-qi gaius-qi commented Jan 13, 2025

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:

  • Added thiserror, rand, and bytes dependencies in Cargo.toml to support error handling, random number generation, and byte manipulation.

Protocol Documentation:

  • Updated docs/README.md to reflect changes in the protocol fields, including increasing the Tag field to 8 bits and the Length field to 32 bits, allowing for up to 4GiB of data.

Error Handling:

  • Introduced a new Error enum and Result type in src/error/mod.rs for better error management within the Vortex protocol.

Vortex Packet Implementation:

  • Implemented the Vortex enum and related methods in src/lib.rs to represent different types of Vortex packets, including DownloadPiece, PieceContent, Reserved, and Error. Added methods for creating, parsing, and converting Vortex packets to and from byte slices.

DownloadPiece Implementation:

  • Added DownloadPiece struct and its associated methods in src/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)

@gaius-qi gaius-qi added the enhancement New feature or request label Jan 13, 2025
@gaius-qi gaius-qi self-assigned this Jan 13, 2025
@gaius-qi gaius-qi requested a review from a team as a code owner January 13, 2025 14:19
Signed-off-by: Gaius <[email protected]>
docs/README.md Show resolved Hide resolved
docs/README.md Show resolved Hide resolved
Copy link
Contributor

@CormickKneey CormickKneey left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit 6c30c39 into main Jan 14, 2025
5 checks passed
@gaius-qi gaius-qi deleted the feature/vortex branch January 14, 2025 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants