cybercongress / go-cyber

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

Governance parameterization of bandwidth parameters #332

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 can adjust grow of the network, adapting the whole bandwidth of network for their need and current hardware possibilities

Task

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

Estimated workflow:

  1. Handler: NewChangeDesirableNetworkBandwidthProposalHandler (decrease/increase)
  2. Handler keeper: HandleChangeDesirableNetworkBandwidthProposal
  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 with meeter and bandwidth calculation

Definition of Done:

The bandwidth should be changed after a successful proposal (if validation of the proposed parameter's value passes) and network should allow cast more/less txs than it was before.

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 332-bandwidth-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 in #377