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: Allow deserialization of StarkGenericConfigs #218

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

preston-evans98
Copy link
Contributor

This PR enables deserialization of the various StarkGenericConfig implementations. In the previous implementation, these types were serialized using the Serializer::serialize_none function, which was typically reserved for Option types. Now, these types are serialized as std::marker::PhantomData<Self> and deserialized by first deserializing a PhantomData instance and then dropping the Phantom and returning Self::new().

(Note: The Phantom deserialization is necessary for correctness, since serializers are allowed to serialize PhantomData into a non-empty byte sequence).

@jtguibas jtguibas merged commit a10a9ed into main Feb 14, 2024
6 checks passed
@jtguibas jtguibas deleted the preston/de-stark-config branch February 14, 2024 06:26
jtguibas pushed a commit that referenced this pull request Mar 29, 2024
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.

2 participants