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

CSUB-417 Migrating Authorities #926

Merged
merged 9 commits into from
Feb 17, 2023
Merged

CSUB-417 Migrating Authorities #926

merged 9 commits into from
Feb 17, 2023

Conversation

CAGS295
Copy link
Contributor

@CAGS295 CAGS295 commented Feb 4, 2023

Description of proposed changes:
Already registered Authorities won’t be migrated. This means that Authorities need to be set again. This is not ideal as it will halt Task scheduling until it is manually done.

The PR includes moving the Storage to the new pallet, a runtime test asserting on the new pallet prefix, and a benchmark for the migration.

Removing the Storage Item from Creditcoin and its GenesisConfig.

Practical tips for PR review & merge:

  • All GitHub Actions report PASS
  • Newly added code/functions have unit tests
    • Coverage tools report all newly added lines as covered
    • The positive scenario is exercised
    • Negative scenarios are exercised, e.g. assert on all possible errors
    • Assert on events triggered if applicable
    • Assert on changes made to storage if applicable
  • Modified behavior/functions - try to make sure above test items are covered
  • Integration tests are added if applicable/needed

@github-actions
Copy link

github-actions bot commented Feb 4, 2023

For full LLVM coverage report click here!

@codecov-commenter
Copy link

codecov-commenter commented Feb 4, 2023

Codecov Report

Merging #926 (721345a) into dev (49c2c21) will decrease coverage by 0.46%.
The diff coverage is 12.08%.

@@            Coverage Diff             @@
##              dev     #926      +/-   ##
==========================================
- Coverage   78.15%   77.69%   -0.46%     
==========================================
  Files          68       69       +1     
  Lines       10896    10959      +63     
==========================================
- Hits         8516     8515       -1     
- Misses       2380     2444      +64     
Impacted Files Coverage Δ
pallets/creditcoin/src/migrations/mod.rs 0.00% <0.00%> (ø)
pallets/creditcoin/src/migrations/v1.rs 93.97% <0.00%> (-0.68%) ⬇️
pallets/creditcoin/src/migrations/v2.rs 91.30% <0.00%> (-1.01%) ⬇️
pallets/creditcoin/src/migrations/v3.rs 95.83% <0.00%> (-0.81%) ⬇️
pallets/creditcoin/src/migrations/v4.rs 79.06% <0.00%> (-3.86%) ⬇️
pallets/creditcoin/src/migrations/v5.rs 90.47% <0.00%> (-1.76%) ⬇️
pallets/creditcoin/src/migrations/v6.rs 87.93% <0.00%> (-0.39%) ⬇️
pallets/creditcoin/src/migrations/v8.rs 0.00% <0.00%> (ø)
pallets/creditcoin/src/mock.rs 100.00% <ø> (ø)
pallets/creditcoin/src/migrations/v7.rs 83.33% <20.00%> (-3.21%) ⬇️
... and 3 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@atodorov atodorov left a comment

Choose a reason for hiding this comment

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

Minor change requested, otherwise looks good to me.

pallets/creditcoin/src/migrations/v8.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@atodorov atodorov left a comment

Choose a reason for hiding this comment

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

Added a few more questions.

pallets/creditcoin/src/migrations/v8.rs Show resolved Hide resolved
pallets/creditcoin/src/migrations/v8.rs Outdated Show resolved Hide resolved
atodorov
atodorov previously approved these changes Feb 13, 2023
atodorov
atodorov previously approved these changes Feb 13, 2023
Copy link
Contributor

@nathanwhit nathanwhit left a comment

Choose a reason for hiding this comment

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

A couple nits and a comment, but looks good to me

pallets/creditcoin/src/migrations/v8.rs Outdated Show resolved Hide resolved
pallets/creditcoin/src/migrations/v8.rs Outdated Show resolved Hide resolved
pallets/creditcoin/src/migrations/v8.rs Outdated Show resolved Hide resolved
pallets/creditcoin/src/migrations/v8.rs Show resolved Hide resolved
Copy link
Contributor

@nathanwhit nathanwhit left a comment

Choose a reason for hiding this comment

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

LGTM

@atodorov atodorov merged commit 60856d9 into dev Feb 17, 2023
@atodorov atodorov deleted the feature/CSUB-417 branch February 17, 2023 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants