-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor(simulations): marshal OperationMsg.Msg as protoBytes #16155
Conversation
types/simulation/types.go
Outdated
@@ -89,21 +90,18 @@ func NewOperationMsgBasic(moduleName, msgType, comment string, ok bool, msg []by | |||
} | |||
|
|||
// NewOperationMsg - create a new operation message from sdk.Msg | |||
func NewOperationMsg(msg sdk.Msg, ok bool, comment string, cdc *codec.ProtoCodec) OperationMsg { | |||
func NewOperationMsg(msg sdk.Msg, ok bool, comment string, _ *codec.ProtoCodec) OperationMsg { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add a changelog entry for chains using this.
…-sdk into kocubinski/sims-protobytes
types/simulation/types.go
Outdated
@@ -89,21 +90,18 @@ func NewOperationMsgBasic(moduleName, msgType, comment string, ok bool, msg []by | |||
} | |||
|
|||
// NewOperationMsg - create a new operation message from sdk.Msg | |||
func NewOperationMsg(msg sdk.Msg, ok bool, comment string, cdc *codec.ProtoCodec) OperationMsg { | |||
func NewOperationMsg(msg sdk.Msg, ok bool, comment string, _ *codec.ProtoCodec) OperationMsg { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this is anyway a behavior change, why not making it API breaking and remove this argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, one nit
Description
A straightforward refactor to marshal OperationMsg.Msg as proto bytes instead of AminoJSON.
A change was made to this codepath in #16048 migrating to x/tx/aminojson, but working on #16062 I discovered many tests need unmarshal support and unmarshaling is not a planned feature for x/tx/aminjson.
Proto bytes are probably preferable and more performant, I don't really know why we were using AminoJSON in the first place.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change