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

Create app.go for gov-enabled consumer chain #141

Closed
mpoke opened this issue Jun 8, 2022 · 5 comments · Fixed by #130
Closed

Create app.go for gov-enabled consumer chain #141

mpoke opened this issue Jun 8, 2022 · 5 comments · Fixed by #130
Assignees

Comments

@mpoke
Copy link
Contributor

mpoke commented Jun 8, 2022

This issue refers to the so called democracy package (see #66 for details).

app/gov-consumer/app.go, should contain the modules necessary for the minimum viable consumer chain (see app/consumer/app.go) and in addition the modules necessary for the gov-enabled consumer chain:

@mpoke mpoke added the gov-cc label Jun 8, 2022
@mpoke mpoke moved this to Todo in Replicated Security Jun 8, 2022
@mpoke mpoke added the product label Jun 8, 2022
This was referenced Jun 19, 2022
@okwme
Copy link
Contributor

okwme commented Jun 21, 2022

@hxrts and I created a voting matrix with a first pass about which chain should be in charge of which votes. The bulk of this sheet is param changes which could be debated.

https://docs.google.com/spreadsheets/d/1s7IGkxIjvebFu0guC5iFC4gWaEOJLBWx2QQHik9WmYo/edit?usp=sharing

The primary proposal type that imo should be performed by ATOM token holders is the upgrade proposal. Our messaging is that ATOM validators don't need to worry about gov on these consumer chains because they have their own gov tokens. This is true except for factors that impact the validator directly. Upgrades need to be prepared and performed by validators so I think it's important they happen on the hub where validators are still meant to be active.

This would be possible by leveraging the adminmodule inside of the composer repo: https://github.com/cosmos/composer/tree/master/x/adminmodule
If the Cosmos Hub gov module account were listed in the whitelist then the cosmos hub gov module could send out proposal + vote msgs using interchain accounts. That way it is voted on the hub and if it passes it is submitted to the consumer chain and immediately passed.

@mpoke mpoke moved this from Todo to In Progress in Replicated Security Jul 7, 2022
@mpoke mpoke assigned mpoke and okwme and unassigned mpoke Jul 7, 2022
@jtremback
Copy link
Contributor

jtremback commented Aug 15, 2022

The ultimate objective of this issue is to create a chain in the /app/gov-consumer folder which implements the "democracy suite". The "democracy suite" is collection of modifications to certain modules and app.go which allows several things to take place on a consumer chain:

  • The consumer chain has a native token much like the native staking token on a normal Cosmos chain.
  • This token can be delegated to "representatives". Representatives are just like validators on a normal Cosmos chain, but they do not have any responsibility to run chain binaries (obviously, these are run by the provider chain validators).
  • Not running chain binaries, the only responsibility of representatives is to vote on governance proposals. Their role is to allow governance token holders to delegate decisionmaking responsibilities to someone they trust.
  • The governance token will also inflate (just like a staking token on a normal Cosmos chain). This inflation will go to representatives and the people who have delegated to them. But also some percentage of the inflation is sent over IBC to the provider chain and is distributed to the delegators and the validators there.

There is already a lot of work that has been done:

Here are all the things that should be possible once this work has been completed and integrated:

  • Start gov-consumer and provider chains
  • Distribute gov-consumer's tokens to accounts
  • Check that delegators on gov-consumer chain can change representative powers
  • Have accounts vote on something on the gov-consumer chain
  • Check that the parameter is changed on gov-consumer chain
  • Check that gov-consumer's validator powers are updated by the provider chain (as is normal)
  • Check that delegating on gov-consumer does not change validator powers
  • Check that tokens are minted and distributed to representatives and their delegators
  • Check that tokens are minted and sent to provider chain and distributed to validators and their delegators on provider chain
  • Check that slashing on the gov-consumer chain does not result in slashing for the representatives or their delegators

Implement automated tests in the integration tests folder for these things.

@jtremback
Copy link
Contributor

@smarshall-spitzbart We need to talk about you helping @dusan-ethernal @stana-ethernal to test this stuff in the integration tests.

@mpoke mpoke assigned dusan-maksimovic and stana-miric and unassigned okwme Sep 2, 2022
@jtremback
Copy link
Contributor

@stana-ethernal @dusan-ethernal Can this issue be closed now?

@stana-miric
Copy link
Collaborator

@jtremback it can be closed after we finish integration tests and clean up some logs in PR. We will let you know once we finish it

Repository owner moved this from In Progress to Done in Replicated Security Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants