tendermint / go-amino

Protobuf3 with Interface support - Designed for blockchains (deterministic, upgradeable, fast, and compact)
Other
259 stars 78 forks source link

Disallow int de-/encoding #268

Open liamsi opened 5 years ago

liamsi commented 5 years ago

Amino allows to encode int for convenience and while the underlying varint encoding doesn't waste bytes on the wire it remains unclear how this translates to the existing proto3 types (int32, int64). Disallowing int would resolve this and probably is not a bad idea anyways (as int is platform dependant). The SDK and the tendermint team seem onboard with doing the necessary changes.

Alternatively, always assume (proto) int64 when int is used on the go side (and err on 32 b it platforms).