Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(proto)!: remove optional fields in protos #2940

Closed
wants to merge 1 commit into from

Commits on Aug 18, 2023

  1. feat(proto)!: remove optional fields in protos

    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.
    
    In order to preserve the representation of optionality, we use
    submessages in the proto types, so we can include or omit the named
    field. A notable exception is for encrypted memos: since the encrypted memo
    payload must be a specific length, we can check for whether it's empty,
    and map an empty encrypted memo to None.
    
    H/t to @plaidfinch for describing the submessage pattern to me,
    and implementing it on the governance changes.
    
    Closes #2933.
    conorsch committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    04888f1 View commit details
    Browse the repository at this point in the history