Open ranchalp opened 1 year ago
That's worth considering. A simpler approach achieving a similar result would be to simply use deterministic CBOR serialization of the generated types. Note that in certain cases, we'd still need custom serialization, when, for example, not all fields of a data structure are hashed or signed (e.g., the PBFT view number is, in some cases, excluded when hashing a preprepare message).
If the codegen generated serialization functions, we could remove boilerplate code such as: