Skip to content

CSUB-423: Upgrade substrate#934

Merged
atodorov merged 6 commits intodevfrom
CSUB-423-Upgrade-Substrate
Mar 16, 2023
Merged

CSUB-423: Upgrade substrate#934
atodorov merged 6 commits intodevfrom
CSUB-423-Upgrade-Substrate

Conversation

@AdaJane
Copy link
Copy Markdown
Contributor

@AdaJane AdaJane commented Feb 21, 2023

Description of proposed changes:
Updates Substrate from version on the polkadot-v0.9.32 branch to the latest polkadot-v0.9.38 branch allowing, introducing a few fixes and laying the groundwork to migrate to ParityDB.

From polkadot-v0.9.32 to polkadot-v0.9.38

Polkadot-v0.9.33

No changes

Polkadot-v0.9.34

Change WEIGHT_PER_SECOND to WEIGHT_REF_TIME_PER_SECOND
Added a call to from_ref_time

Polkadot-v0.9.35

Update jsonrpsee version to 0.16.2 to match Susbtrate

Polkadot-v0.9.36

No Changes

Polkadot-v0.9.37

No Changes

Polkadot-v0.9.38

Add implementations for query_weight_to_fee and query_length_to_fee to impl pallet_transaction_ayment_rpc_runtime_api::TransactionPaymentApi for Runtime

Add explicit call indexes for pallet runtime APIs using script provided by Parity/Substrate:
More info here

Updated Staking Pallet impls to new API signatures

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

@AdaJane AdaJane force-pushed the CSUB-423-Upgrade-Substrate branch from 70bf108 to bfab711 Compare February 22, 2023 21:13
@AdaJane AdaJane force-pushed the CSUB-423-Upgrade-Substrate branch 2 times, most recently from a4e1a86 to 75f5a0e Compare February 22, 2023 21:23
@AdaJane AdaJane marked this pull request as ready for review February 22, 2023 21:25
Copy link
Copy Markdown
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.

There are failures from Clippy and cargo test, see jobs for
75f5a0e

@AdaJane AdaJane marked this pull request as draft February 23, 2023 18:22
Copy link
Copy Markdown
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.

Couple of small things, but aside from the remaining todos in the staking pallet LGTM

@github-actions
Copy link
Copy Markdown

For full LLVM coverage report click here!

@atodorov atodorov changed the title Csub 423 upgrade substrate CSUB-423: Upgrade substrate Feb 24, 2023
@AdaJane AdaJane force-pushed the CSUB-423-Upgrade-Substrate branch from c205215 to 335dbbf Compare March 8, 2023 19:28
@AdaJane AdaJane force-pushed the CSUB-423-Upgrade-Substrate branch 2 times, most recently from dd04f64 to ec53bc8 Compare March 13, 2023 17:15
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 14, 2023

Codecov Report

Merging #934 (1e2fc93) into dev (2d95af1) will increase coverage by 0.45%.
The diff coverage is 62.06%.

@@            Coverage Diff             @@
##              dev     #934      +/-   ##
==========================================
+ Coverage   77.16%   77.62%   +0.45%     
==========================================
  Files          74       75       +1     
  Lines       11427    11383      -44     
==========================================
+ Hits         8818     8836      +18     
+ Misses       2609     2547      -62     
Impacted Files Coverage Δ
node/src/benchmarking.rs 0.00% <0.00%> (ø)
node/src/command.rs 0.00% <ø> (ø)
pallets/creditcoin/src/lib.rs 81.87% <ø> (ø)
pallets/difficulty/src/lib.rs 93.05% <ø> (ø)
runtime/src/lib.rs 23.88% <0.00%> (-0.03%) ⬇️
runtime/src/mock/runtime.rs 13.04% <ø> (ø)
runtime/src/version.rs 0.00% <ø> (ø)
pallets/staking/src/lib.rs 35.04% <100.00%> (+2.58%) ⬆️
runtime/src/tests/staking.rs 100.00% <100.00%> (ø)
runtime/src/tests/task_scheduling.rs 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

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

@AdaJane AdaJane marked this pull request as ready for review March 14, 2023 19:24
atodorov
atodorov previously approved these changes Mar 15, 2023
@atodorov atodorov force-pushed the CSUB-423-Upgrade-Substrate branch from 1e2fc93 to b54a36e Compare March 16, 2023 11:14
@atodorov atodorov merged commit f1d3463 into dev Mar 16, 2023
@atodorov atodorov deleted the CSUB-423-Upgrade-Substrate branch March 16, 2023 12:08
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.

5 participants