You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding new fields to IBC packet data, we would like the ability to not emit (marshal) unpopulated fields. This would allow for new fields to be added without requiring a full network upgrade.
Problem Definition
Currently the ProtoMarshalJSON function sets EmitDefaults to true which will emit unpopulated fields and thus cause unmarshal errors on the packet's receiving side.
We anticipate the need for this again and would appreciate the flexibility of controlling the EmitDefaults value. I could see a number of possible solutions to this issue (potentially utilizing the proto codec to indicate the EmitDefaults value). It appears the current justification for setting EmitDefaults to true is for cli purposes, so maybe it should be clear when a proto codec is used for cli vs the state machine.
I don't see any security considerations with regards to setting EmitDefaults to false, as it should marshal less information, but it will be state machine breaking.
Since we have decided to make the change on our end, there is no immediate demand for this feature, but it would be greatly appreciated so we could remove our forked code 🙏
The text was updated successfully, but these errors were encountered:
Summary
When adding new fields to IBC packet data, we would like the ability to not emit (marshal) unpopulated fields. This would allow for new fields to be added without requiring a full network upgrade.
Problem Definition
Currently the
ProtoMarshalJSON
function setsEmitDefaults
totrue
which will emit unpopulated fields and thus cause unmarshal errors on the packet's receiving side.Proposal
We need this now, so we have decided to fork this function solely for marshaling ics20 packets.
We anticipate the need for this again and would appreciate the flexibility of controlling the
EmitDefaults
value. I could see a number of possible solutions to this issue (potentially utilizing the proto codec to indicate theEmitDefaults
value). It appears the current justification for settingEmitDefaults
totrue
is for cli purposes, so maybe it should be clear when a proto codec is used for cli vs the state machine.I don't see any security considerations with regards to setting
EmitDefaults
to false, as it should marshal less information, but it will be state machine breaking.Since we have decided to make the change on our end, there is no immediate demand for this feature, but it would be greatly appreciated so we could remove our forked code 🙏
The text was updated successfully, but these errors were encountered: