feat(proto)!: remove optional fields in protos #2951
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The cosmos fork of gogoproto, used to generate golang code from BSR, doesn't support "optional" fields in proto3 syntax. Rather than sort that out, we're removing use of optional to unblock integration work on interchaintest.
For the most part, we can still represent optionality by special-casing zero (for blockheights) and empty (for encrypted memos). The exception is governance protos, which require use of a submessage type to represent the optional "withdrawn" state on proposal outcomes. H/t to @plaidfinch for describing the submessage pattern to me, and implementing it on the governance changes.
Closes #2933.
This PR re-implements and therefore supersedes #2940; only one of the two should be merged.