You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.
Mina uses its own unsigned numeric data type Nat.UInt32 for a number of internal types including AccountNonce and GlobalSlotNumber.
This has slightly different serialization to a bin_prot integer from what I can tell. For the most part they are compatible but in some edge cases they are not.
Our codebase uses i32 and coverts to u32 in order to maintain compatibility. This is a hack solution and can fail in certain cases (which are not covered properly by tests)
Tasks for this issue
Explicitly support Nat.UInt32 as a serialization type. Currently we use ExtendedU32 wrapper around i32
Add conversions from this to rust types (e.g. u32)
Replace this in our other serialization-types where required
Add test coverage for edge cases for ExtendedU32 (e.g. minvalue, maxvalue etc)
Task summary
Mina uses its own unsigned numeric data type
Nat.UInt32
for a number of internal types includingAccountNonce
andGlobalSlotNumber
.This has slightly different serialization to a bin_prot integer from what I can tell. For the most part they are compatible but in some edge cases they are not.
Our codebase uses i32 and coverts to u32 in order to maintain compatibility. This is a hack solution and can fail in certain cases (which are not covered properly by tests)
Tasks for this issue
Nat.UInt32
as a serialization type. Currently we useExtendedU32
wrapper around i32Specification reference
Other information and links
The text was updated successfully, but these errors were encountered: