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
In Mina, unsigned 32- and 64-bit integers are widely used. Still, it looks like their binprot encoding is based on signed integers represented by the the same bits.
As our Rust types are based on binprot shapes, and that singned-ness is "erased" in the shapes, all integers in Rust are based on signed built-in variants (i32, i64). That causes some confusion when using these types/fields in Rust (see e.g. #38), and also JSON representation is incorrect.
It seems that we should use u32/u64 types as interface types for our unsigned Mina numbers, but keep binprot using i32/i64 respectively (question is, what type should be used for storing?).
The text was updated successfully, but these errors were encountered:
In Mina, unsigned 32- and 64-bit integers are widely used. Still, it looks like their binprot encoding is based on signed integers represented by the the same bits.
As our Rust types are based on binprot shapes, and that singned-ness is "erased" in the shapes, all integers in Rust are based on signed built-in variants (
i32
,i64
). That causes some confusion when using these types/fields in Rust (see e.g. #38), and also JSON representation is incorrect.It seems that we should use
u32
/u64
types as interface types for our unsigned Mina numbers, but keep binprot usingi32
/i64
respectively (question is, what type should be used for storing?).The text was updated successfully, but these errors were encountered: