shentu icon indicating copy to clipboard operation
shentu copied to clipboard

BUG: add shield crisis invariant fix for the upgrade

Open yoongbok-lee opened this issue 2 years ago • 3 comments

Closes: # Related: #XXX

Description

To test the invariant being broken,

first start with a v2.2.0 binary.

  1. Deposit collateral to shield
  2. Create a pool
  3. update the pool, with some additional native fees
  4. upgrade to v2.3.0 and v2.4.0, and finally latest master
  5. There will be 3 consecutive upgrades
  6. The chain will halt at the last upgrade since the crisis invariant is broken due to the bug that happened in the original v2.2.0 binary.

For contributor use:

  • [ ] 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

For admin use:

  • [ ] Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • [ ] Reviewers assigned
  • [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]"

yoongbok-lee avatar Aug 18 '22 07:08 yoongbok-lee

This is currently blocked due to the shield mixedcoins removal missing a upgrade store migration.

yoongbok-lee avatar Aug 18 '22 13:08 yoongbok-lee

Since shield will have its own migration I think it's better to do this there.

yoongbok-lee avatar Aug 23 '22 05:08 yoongbok-lee

Codecov Report

Merging #471 (346d607) into master (7b4fa10) will decrease coverage by 0.19%. The diff coverage is 2.56%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #471      +/-   ##
==========================================
- Coverage   41.52%   41.33%   -0.20%     
==========================================
  Files         124      124              
  Lines       11421    11476      +55     
==========================================
+ Hits         4743     4744       +1     
- Misses       6219     6273      +54     
  Partials      459      459              
Impacted Files Coverage Δ
app/upgrade_handler.go 3.14% <0.00%> (-2.33%) :arrow_down:
app/app.go 86.92% <100.00%> (+0.02%) :arrow_up:

codecov[bot] avatar Sep 30 '22 02:09 codecov[bot]