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

Simulation Decoder Refactor #5664

Closed
4 tasks
alexanderbez opened this issue Feb 18, 2020 · 1 comment · Fixed by #6037
Closed
4 tasks

Simulation Decoder Refactor #5664

alexanderbez opened this issue Feb 18, 2020 · 1 comment · Fixed by #6037
Labels
T: Dev UX UX for SDK developers (i.e. how to call our code) Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.

Comments

@alexanderbez
Copy link
Contributor

Summary

Each module defines a DecodeStore function that is used when import/export simulation errors. However, the DecodeStore signature accepts a reference to a concrete Amino codec. Since the state is now serialized via Protobuf, we need to use a codec.Marshaler.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@alexanderbez alexanderbez added Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. T: Dev UX UX for SDK developers (i.e. how to call our code) labels Feb 18, 2020
@alexanderbez alexanderbez mentioned this issue Feb 18, 2020
28 tasks
@alexanderbez
Copy link
Contributor Author

require.Equal(t, len(failedKVAs), 0, GetSimulationLog(skp.A.Name(), app.SimulationManager().StoreDecoders, app.Codec(), failedKVAs, failedKVBs))

This is the line that calls the actual decoder. Instead of passing app.Codec (which is an amino codec reference), we pass the app's Protobuf codec. Then, each DecodeStore function requires its own codec interface, typically codec.Marshaler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Dev UX UX for SDK developers (i.e. how to call our code) Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant