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

ready-for-review: Un-hardcode in governance parameters #1688

Merged
merged 8 commits into from
Jul 27, 2018

Conversation

sunnya97
Copy link
Member

@sunnya97 sunnya97 commented Jul 16, 2018

moved governance parameters to globalparams store and can be set in genesis

  • Updated all relevant documentation (docs/)
  • Updated all relevant code comments
  • Wrote tests
  • Updated CHANGELOG.md
  • Updated cmd/gaia and examples/

For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

@codecov
Copy link

codecov bot commented Jul 16, 2018

Codecov Report

Merging #1688 into develop will increase coverage by 0.04%.
The diff coverage is 78.57%.

@@             Coverage Diff             @@
##           develop    #1688      +/-   ##
===========================================
+ Coverage    63.42%   63.47%   +0.04%     
===========================================
  Files          117      117              
  Lines         6940     6973      +33     
===========================================
+ Hits          4402     4426      +24     
- Misses        2283     2292       +9     
  Partials       255      255

@zmanian
Copy link
Member

zmanian commented Jul 16, 2018

Alternative to merging this for gaia 7000 would be to just change the voting period to a larger number

x/gov/keeper.go Outdated
}

func (keeper Keeper) setDepositProcedure(ctx sdk.Context, depositProcedure DepositProcedure) {
keeper.ps.Set(ctx, "gov/depositprocedure", &depositProcedure)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these strings should be well defined constants at top of file.

Also might be nicer as gov/procedure/deposit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed.

Threshold: sdk.NewRat(1, 2),
Veto: sdk.NewRat(1, 3),
GovernancePenalty: sdk.NewRat(1, 100),
},
Copy link
Contributor

@rigelrozanski rigelrozanski Jul 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any other point to splitting up the governance parameters into these Procedure structs besides organizational? If not I'd almost prefer to see all the parameters in one struct - seems a bit confusing to add another layer of abstraction where it's not a requirement of codes functionality

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Voting params, DepositParams, and TallyingParams are used at different times. No need to Unmarshal the voting params when I'm just worried about tallying. Also, in future, there will be different types of "tallying params" and stuff for different types of proposals

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting so in the future tallying params should actually be an interface as opposed to a struct to allow for different parameters - then functions such as CheckVeto could be functions on TallyingProceedure

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 seems fine to leave as is for now, thanks for the insight

@ebuchman ebuchman changed the base branch from master to develop July 16, 2018 15:35
@ValarDragon
Copy link
Contributor

ValarDragon commented Jul 16, 2018

Can you update your dep, and re-run make get_vendor_deps and see if that makes your gopkg.lock match?

@sunnya97
Copy link
Member Author

I did that. It still gave me this Gopkg.lock

@rigelrozanski
Copy link
Contributor

@sunnya97 you've been slashed! - for including the checkbox applied appropriate labels.. when really no labels have been applied!

@sunnya97
Copy link
Member Author

Ohhh, I thought that meant to the title of the PR lol

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PENDING.md & dep upgrade, plus file conflicts, otherwise LGTM.

CHANGELOG.md Outdated
@@ -13,6 +13,8 @@ BREAKING CHANGES

FEATURES
* [baseapp] NewBaseApp now takes option functions as parameters
* [x/gov] Governance parameters are now stored in globalparams store
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to PENDING.md

@@ -2,78 +2,59 @@

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update dep version & re-run make get_vendor_deps.

Copy link
Contributor

@cwgoes cwgoes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@cwgoes cwgoes merged commit 55ef898 into develop Jul 27, 2018
@cwgoes cwgoes deleted the sunny/gov_params branch July 27, 2018 01:24
chillyvee pushed a commit to chillyvee/cosmos-sdk that referenced this pull request Mar 1, 2024
…s#1688)

Bumps [github.com/cosmos/ibc-go/v5](https://github.com/cosmos/ibc-go) from 5.0.0-beta1 to 5.0.0-rc0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/cosmos/ibc-go/releases">github.com/cosmos/ibc-go/v5's releases</a>.</em></p>
<blockquote>
<h2>v5.0.0-rc0</h2>
<p>This release bumps the Cosmos SDK to v0.46 (for more information, see <a href="https://github.com/cosmos/cosmos-sdk/releases/tag/v0.46.0">Cosmos SDK v0.46 Release Notes</a>) and Tendermint to v0.34.20 (for more information, see <a href="https://github.com/tendermint/tendermint/blob/v0.34.20/CHANGELOG.md#v03414">Tendermint 0.34.20 changelog</a>). It also introduces several code style improvements flagged by linting tools. Please see the <a href="https://github.com/cosmos/ibc-go/blob/v5.0.0-rc0/CHANGELOG.md">v5.0.0 changelog</a> for the full set of changes included in this pre-release.</p>
<p>Special thanks to our external contributors on this release: <a href="https://github.com/faddat"><code>@​faddat</code></a></p>
<hr />
<p>To learn more about ibc-go versioning, please read our <a href="https://github.com/cosmos/ibc-go/blob/main/RELEASES.md">RELEASES.md</a>.</p>
<p><strong>IMPORTANT</strong>: Please read the migration guides for any versions of ibc-go that you might be going through when upgrading to this version. For example: if you upgrade from the IBC module contained in the Cosmos SDK 0.42.0 to SDK v0.46 and ibc-go v5.0.0-rc0, please follow:</p>
<ol>
<li>The <a href="https://github.com/cosmos/ibc-go/blob/v5.0.0-beta1/docs/migrations/sdk-to-v1.md">migration from SDK 0.41.x or 0.42.x to the IBC module in the ibc-go repository based on the SDK v0.44.x</a>.</li>
<li>The <a href="https://github.com/cosmos/ibc-go/blob/v5.0.0-beta1/docs/migrations/v1-to-v2.md">migration from ibc-go v1 to v2</a>.</li>
<li>The <a href="https://github.com/cosmos/ibc-go/blob/v5.0.0-beta1/docs/migrations/v2-to-v3.md">migration from ibc-go v2 to v3</a>.</li>
<li>The <a href="https://github.com/cosmos/ibc-go/blob/v5.0.0-beta1/docs/migrations/v3-to-v4.md">migration from ibc-go v3 to v4</a>.</li>
<li>The migration from ibc-go v4 to v5 (not available yet, but work is in progress <a href="https://github-redirect.dependabot.com/cosmos/ibc-go/pull/1826">here</a>).</li>
</ol>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/cosmos/ibc-go/commit/f106b747a0f3895e9b468d25057f2d949cfdb9a7"><code>f106b74</code></a> fix broken link (<a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/2059">#2059</a>) (<a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/2098">#2098</a>)</li>
<li><a href="https://github.com/cosmos/ibc-go/commit/e1f7e89dc1e28330474fcf4c5694c4f5c759bb92"><code>e1f7e89</code></a> chore: update fee middleware docs to be more explicit about reasoning for rem...</li>
<li><a href="https://github.com/cosmos/ibc-go/commit/2f3aa53070b5048b280eaecd3aa7e5309d6f3b06"><code>2f3aa53</code></a> fix: &quot;acknowledgement written&quot; logs unsupported type (backport <a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1919">#1919</a>) (<a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1962">#1962</a>)</li>
<li><a href="https://github.com/cosmos/ibc-go/commit/07d3f555b1bd27983e6f47fbe4be01925ffd45ca"><code>07d3f55</code></a> fix: adding check for blocked addresses before escrowing fees (backport <a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1890">#1890</a>...</li>
<li><a href="https://github.com/cosmos/ibc-go/commit/c9894c932f6c663c0e017f0e6f306a61d239b595"><code>c9894c9</code></a> add mock module acc balance and refactor test case (<a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1942">#1942</a>) (<a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1953">#1953</a>)</li>
<li><a href="https://github.com/cosmos/ibc-go/commit/f400db4699c1bd26a5bf1b9e81da946b297c4469"><code>f400db4</code></a> fix: prevent blocked addresses from sending ICS 20 transfers (backport <a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1907">#1907</a>)...</li>
<li><a href="https://github.com/cosmos/ibc-go/commit/b579e3b859b8abe79b1f3c773ab3c08627792114"><code>b579e3b</code></a> fix: ics27 check packet data length explicitly over nil check (<a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1882">#1882</a>) (<a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1899">#1899</a>)</li>
<li><a href="https://github.com/cosmos/ibc-go/commit/c57b77419fd8e4d131f1f81ea7bbfe5417a6344b"><code>c57b774</code></a> fix: make format and golangci-lint errors (<a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1894">#1894</a>) (<a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1903">#1903</a>)</li>
<li><a href="https://github.com/cosmos/ibc-go/commit/4d99267f0cd63ca04e8f61faab78b8829ab83739"><code>4d99267</code></a> remove changelog entries that will be released as part of v4</li>
<li><a href="https://github.com/cosmos/ibc-go/commit/cc1f70472f06ae9b09b9583aadb81e3486106530"><code>cc1f704</code></a> build(deps): bump cosmossdk.io/math from 1.0.0-beta.2 to 1.0.0-beta.3 (<a href="https://github-redirect.dependabot.com/cosmos/ibc-go/issues/1842">#1842</a>)...</li>
<li>See full diff in <a href="https://github.com/cosmos/ibc-go/compare/v5.0.0-beta1...v5.0.0-rc0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/cosmos/ibc-go/v5&package-manager=go_modules&previous-version=5.0.0-beta1&new-version=5.0.0-rc0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


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

Successfully merging this pull request may close these issues.

6 participants