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

Omit extra byte from types like AssetId when serialized with postcard #658

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

Dentosal
Copy link
Member

For some reason unknown to me, types generated using the key! macro were including an extra length byte in front of them when serialized in serde binary formats. This PR removes the leading byte. (The reason was me, although I'm going to blame serde docs here).

@Dentosal Dentosal added tech-debt fuel-types Related to the `fuel-types` crate. labels Jan 17, 2024
@Dentosal Dentosal self-assigned this Jan 17, 2024
@Dentosal Dentosal requested a review from a team January 17, 2024 06:24
@Dentosal Dentosal marked this pull request as ready for review January 17, 2024 06:24
@Dentosal Dentosal changed the title Improve key type serialization by omitting leading length byte Omitting leading length byte from key! types like ContracId when serialized with postcard Jan 17, 2024
@Dentosal Dentosal changed the title Omitting leading length byte from key! types like ContracId when serialized with postcard Omitting leading byte from types like ContracId when serialized with postcard Jan 17, 2024
@Dentosal Dentosal changed the title Omitting leading byte from types like ContracId when serialized with postcard Omitting extra byte from types like AssetId when serialized with postcard Jan 17, 2024
@Dentosal Dentosal changed the title Omitting extra byte from types like AssetId when serialized with postcard Omit extra byte from types like AssetId when serialized with postcard Jan 17, 2024
@Dentosal Dentosal added this pull request to the merge queue Jan 17, 2024
Merged via the queue into master with commit f8f2c68 Jan 17, 2024
37 checks passed
@Dentosal Dentosal deleted the dento/improve-key-type-serialization branch January 17, 2024 15:42
@xgreenx xgreenx mentioned this pull request Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fuel-types Related to the `fuel-types` crate. tech-debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants