feat(vortex): add persistent piece TLVs and packet handling #68
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 adds support for two new packet types—
DownloadPersistentPieceandPersistentPieceContent—to the Vortex protocol, updating both the core implementation and documentation. It also introduces comprehensive benchmarking and tests for these new types, ensuring they are handled consistently throughout the codebase.Protocol and Documentation Updates:
DownloadPersistentPiece(Tag=0x02) andPersistentPieceContent(Tag=0x03) to the protocol, and updated the documentation (docs/README.md) to reflect the new tag assignments and descriptions. Existing tags have been shifted accordingly to maintain consistency. [1] [2]Core Implementation:
Vortexenum forDownloadPersistentPieceandPersistentPieceContent, and updated all relevant methods (such asid,tag,length,header, serialization, and deserialization) to handle these new types. [1] [2] [3] [4] [5] [6] [7]new_download_persistent_pieceandnew_persistent_piece_contentfor generating appropriate headers for the new packet types. [1] [2]Benchmarking Enhancements:
DownloadPersistentPieceandPersistentPieceContentpackets inbenches/vortex.rsto ensure performance is tracked for the new types. [1] [2] [3] [4]Testing:
DownloadPersistentPiecepacket to bytes, ensuring correct serialization.Versioning:
0.1.4to0.1.5inCargo.tomlto reflect the protocol and API changes.Related Issue
Motivation and Context
Screenshots (if appropriate)