cybercongress / go-cyber

Your 🔵 Superintelligence
https://cyb.ai
Other
354 stars 87 forks source link

Governance parameterization of rank window #331

Closed cyborgshead closed 5 years ago

cyborgshead commented 5 years ago

Note

With PR https://github.com/cosmos/cosmos-sdk/pull/4206 now possible via governance change parameters values.

User Story:

Validators and users should adjust how faster rank recalculates, adapting the window for their needs and current hardware possibilities.

Task

Implement adjusting parameter CalculationPeriod via governance proposals, add validation for proposed values

Estimated workflow:

  1. Handler: NewChangeRankCalculationWindowProposalHandler (decrease/increase)
  2. Handler keeper: HandleChangeRankCalculationWindowProposal
  3. Add given route to gov module in app.go
  4. Add simple validation to the proposal (decrease/increase up to 2 times)
  5. Solve potential issues on changing rank window with proposal online with local testnet

Definition of Done:

The rank window should be changed after a successful proposal (if validation of the proposed parameter's value passes) and network should calculate rank on block mod new rank window value

Example of proposal for spending from the community pool via governance proposal

{
  "title": "Community Pool Spend",
  "description": "Pay me some CYBs!",
  "recipient": "cyber1lecnk6rqq6hnvjmk4cmaec0utawj0agq5wdu8f",
  "amount": [
    {
      "denom": "cyb",
      "amount": "10000"
    }
  ],
  "deposit": [
    {
      "denom": "cyb",
      "amount": "10000"
    }
  ]
}

Addition Info:

Please, provide your PR request with branch 331-rank-governance to branch 0.1.5 PR discussion will be started and processed in 2-3 days, payment will be released after merging.

Our docs:

https://github.com/cybercongress/cyberd/blob/master/docs/rpc.md https://github.com/cybercongress/cyberd/blob/master/docs/help/setup_dev_env.md

Cosmos-SDK dosc and architecture, gaia for reference:

https://github.com/cosmos/sdk-application-tutorial https://github.com/cosmos/gaia/tree/v2.0.1 https://cosmos.network/docs/intro/#sdk-application-architecture

Dependency

This issue blocked till upgrade to cosmos-sdk 0.37 not finished #377

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 125.0 DAI (125.0 USD @ $1.0/DAI) attached to it as part of the https://github.com/cybercongress/ fund.

gitcoinbot commented 5 years ago

Issue Status: 1. Open 2. Cancelled


The funding of 125.0 DAI (125.0 USD @ $1.0/DAI) attached to this issue has been cancelled by the bounty submitter

cyborgshead commented 5 years ago

closed with #377