tendermint/go-amino

Disallow `nil` in lists (repeated fields)

liamsi opened this issue · 2 comments

Different from protobuf we currently allow to encode nil in repeated fields. This causes ambiguity while decoding. For more details see:
#209 (comment)

This is a simple yet bigger change as it will err on many fuzzer rounds.

A bit more nuanced because Tendermint requires this feature, e.g. in Commit where []*Vote and vote may be nil to denote absence.

This PR solves it by letting you denote a field tag amino:"empty_elements" which then behaves in the way you specified, otherwise the behavior is the same (e.g. what Tendermint currently expects).

#206

Closing because I think it's fixed, but please re-open if needed.