Remix.run Logo
tantalor 11 hours ago

Since the example was given in proto, I'll suggest a solution in proto: add a message option.

  extend google.protobuf.MessageOptions {
    optional uint64 domain_separator = 1234;
  }

  message TreeRoot {
    option (domain_separator) = 4567;
    ...
  }
hrmtst93837 2 hours ago | parent [-]

Proto options work until you hit generated code that omits them or a reflection layer that ignores them, then each caller needs fallback logic.