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

Fix genesis supply handling #8930

Merged
merged 6 commits into from
Mar 22, 2021
Merged

Fix genesis supply handling #8930

merged 6 commits into from
Mar 22, 2021

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Mar 18, 2021

Description

closes: #8919


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@codecov
Copy link

codecov bot commented Mar 18, 2021

Codecov Report

Merging #8930 (cc8ec4c) into master (5bd93bf) will increase coverage by 0.05%.
The diff coverage is 89.74%.

❗ Current head cc8ec4c differs from pull request most recent head 8c7ca45. Consider uploading reports for the commit 8c7ca45 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8930      +/-   ##
==========================================
+ Coverage   59.27%   59.33%   +0.05%     
==========================================
  Files         571      572       +1     
  Lines       31827    31854      +27     
==========================================
+ Hits        18867    18902      +35     
+ Misses      10757    10744      -13     
- Partials     2203     2208       +5     
Impacted Files Coverage Δ
x/staking/simulation/operations.go 73.16% <60.00%> (-0.30%) ⬇️
x/bank/types/genesis.go 57.57% <77.77%> (+5.57%) ⬆️
x/bank/keeper/genesis.go 78.94% <100.00%> (+10.52%) ⬆️
x/genutil/client/cli/migrate.go 68.42% <100.00%> (ø)
x/gov/legacy/v043/json.go 100.00% <100.00%> (ø)
x/gov/legacy/v043/store.go 85.71% <100.00%> (+1.09%) ⬆️
x/staking/types/msg.go 55.55% <100.00%> (+0.62%) ⬆️
x/bank/keeper/send.go 83.62% <0.00%> (+8.62%) ⬆️

@orijbot
Copy link

orijbot commented Mar 19, 2021

@amaury1093 amaury1093 marked this pull request as ready for review March 19, 2021 10:30
@amaury1093
Copy link
Contributor

amaury1093 commented Mar 19, 2021

@aaronc I added a test to the supply calculation. afaict this PR is R4R, unless you had something else in mind?

@orijbot
Copy link

orijbot commented Mar 19, 2021

@aaronc
Copy link
Member Author

aaronc commented Mar 19, 2021

I think this should be backported right? It's not state breaking. It just would help new chains with their genesis.

@orijbot
Copy link

orijbot commented Mar 20, 2021

@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Mar 22, 2021
Copy link
Collaborator

@anilcse anilcse left a comment

Choose a reason for hiding this comment

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

lgtm

@mergify mergify bot merged commit e9e978d into master Mar 22, 2021
@mergify mergify bot deleted the aaronc/fix-genesis-supply branch March 22, 2021 18:15
@amaury1093
Copy link
Contributor

@Mergifyio backport release/v0.42.x

mergify bot pushed a commit that referenced this pull request May 3, 2021
* Fix genesis supply handling

* Add test

* Fix nit

Co-authored-by: Amaury M <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit e9e978d)

# Conflicts:
#	x/bank/keeper/genesis.go
#	x/bank/types/genesis.go
@mergify
Copy link
Contributor

mergify bot commented May 3, 2021

Command backport release/v0.42.x: success

Backports have been created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bank genesis allows the supply to be incorrectly set
6 participants