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: custom serialization #44

Merged
merged 1 commit into from
Jan 16, 2024
Merged

Conversation

AaronFeickert
Copy link
Collaborator

Serialization using serde is suboptimal. Depending on the encoding used, serialization may not be canonical, and is likely to be inefficient due to length encoding.

This PR adds custom serialization and deserialization that is efficient and canonical.

Because this is easy to mess up, it also adds a basic fuzzer. The fuzzer attempts to deserialize byte slices; deserialization should either fail or subsequently serialize canonically.

Note that serde-based serialization is still supported.

Closes #43.

@AaronFeickert AaronFeickert merged commit 1449883 into tari-project:main Jan 16, 2024
6 checks passed
@AaronFeickert AaronFeickert deleted the serde branch January 16, 2024 22:52
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.

Improve serialization
1 participant