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

Move x/staking's ValidatorI interface to types package #14491

Closed
atheeshp opened this issue Jan 5, 2023 · 2 comments
Closed

Move x/staking's ValidatorI interface to types package #14491

atheeshp opened this issue Jan 5, 2023 · 2 comments
Assignees

Comments

@atheeshp
Copy link
Contributor

atheeshp commented Jan 5, 2023

ref: #13025, #13937

  • move ValidatorI interface to types package from x/staking

https://github.com/cosmos/cosmos-sdk/blob/main/x/staking/types/exported.go

@atheeshp atheeshp self-assigned this Jan 5, 2023
@amaury1093
Copy link
Contributor

IMO moving ValidatorI to types is a hack. It's a staking-specific interface, so it should stay in x/staking. Or else we'll end up with a huge types/core again.

One question I believe we didn't answer in #13012 is if modules are truly standalone, or if they can depend on each other in an acyclic way. If we choose the latter, then maybe we only need to verify the acyclicity of ValidatorI.

@kocubinski
Copy link
Member

kocubinski commented Jan 11, 2023

If we wanted to move this type then .GetStatus() BondStatus could probably be removed from the global type definition, it's only used in x/staking. A deeper investigation could even reveal that maybe only 1 or 2 methods of this wide interface are used outside of staking. Could we produce a different shared abstraction which satisfies current usage in other modules?

IMO acyclic dependencies are OK. If we can identify and commit to creating a sane acyclic dependency graph it would help answer questions like this one too. Given that we don't have that yet it might be a little early to undertake this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants