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

Implement Go Struct Wrappers Around Proto Types #1091

Closed
rauljordan opened this issue Dec 13, 2018 · 1 comment
Closed

Implement Go Struct Wrappers Around Proto Types #1091

rauljordan opened this issue Dec 13, 2018 · 1 comment
Labels
Enhancement New feature or request Help Wanted Extra attention is needed
Milestone

Comments

@rauljordan
Copy link
Contributor

Hi all,

This issue is related to #781, as we should have Go structs as type wrappers around some of our inner proto definitions. This would make our code cleaner and align with best practices and naming conventions. For example, right now we have lines of code that look like

slashing.GetData().GetAggregateSignature_Poc1_Data().GetHash32s()

where instead we could have cleaner wrappers similar to how we defined types.Block and types.BeaconState. This is a tracking issue for any PRs that implement this functionality for some outstanding proto definitions such as ProposerSlashing, or CasperSlashing, etc.

@rauljordan rauljordan added Enhancement New feature or request Help Wanted Extra attention is needed Refactor labels Dec 13, 2018
@rauljordan rauljordan added this to the Ruby - v0.1 milestone Dec 13, 2018
@rauljordan
Copy link
Contributor Author

Update: discussed offline, implementing this may not be optimal as there is no real purpose behind writing Go wrappers if we are using the Proto's as canonical types anyways. This offers no real benefit aside from better naming conventions. Additionally, this will make future refactors harder as we will need to update both the protos and the Go wrappers to have parity between the two. Closing this in favor of eventually just sticking to using protos as our types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request Help Wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant