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

feat: Restore Substrate pallets for on-chain upgrade that were temporarily removed to minimise genesis runtime size for Rococo launch #33

Merged
merged 15 commits into from
Mar 25, 2022

Conversation

ltfschoen
Copy link
Contributor

@ltfschoen ltfschoen commented Mar 21, 2022

  • Restore Substrate pallets that were removed to minimize runtime size for Rococo genesis launch. As part of launching on the Rococo parachain production testnet in this previous PR that was merged feat: Migrate pallets from standalone chain that was updated to common branch 'polkadot-v0.9.17' progressively #17, a recommendation was to minimise the runtime size and then perform incremental runtime upgrades to reintroduce the funcitonality.
    Previously in that PR we removed the following Substrate pallets in the following commits: e6edf89, 7a0810d, 676e96b
    These pallets have been restored in this PR using git revert.

  • Update versions in Cargo.toml files for and other parameters like spec_version and impl_version

  • check that all essential pallet functionality works using polkadot.js

    • balances - make transfers between accounts, hard spooned balances transferred from standalone to parachain
    • democracy - create a preimage to transfer funds and use that preimage hash to create a proposal
    • treasury - check 30 million DHX balance hard spooned from standalone to parachain
    • sudo - check that sudo works for forceTransfer and setBalance
    • staking - check that able to add additional collator nodes and they generate and finalize blocks
    • runtime upgrade - check that able to perform a runtime upgrade by changing the existential deposit constant and using .compact.compressed.wasm file that is generated
    • metadata - check that no errors in polkadot.js using custom_types.json
  • Linting to fix indentation issues

  • - check that unit and integration tests still pass

  • SKIPPED - Memory Profiling. See notes in feat: Migrate pallets from standalone chain that was updated to common branch 'polkadot-v0.9.17' progressively #17

  • SKIPPED - Try-runtime. See notes in feat: Migrate pallets from standalone chain that was updated to common branch 'polkadot-v0.9.17' progressively #17

  • SKIPPED - Benchmarking. See notes in feat: Migrate pallets from standalone chain that was updated to common branch 'polkadot-v0.9.17' progressively #17

  • Updates to incorporate changes from Substrate branch 'polkadot-v0.9.17' to 'polkadot-v0.9.18' that affected those pallets

  • Fix benchmarking script

  • Increment spec_version to 3

  • Increment version of runtime and node from 3.4.0 to 3.5.0

  • Performed the following on the Rococo server (not local machine)

    • Generated "raw" chain spec, wasm, and state files using ./scripts/dump_wasm_and_state_for_all_chains.sh and copied into both ./res folder and ./upgrades/3.5.0. Important note: we need this changes to be deployed at genesis because it includes the Sudo pallet, which we need for on-chain runtime upgrades (we likely won't use the files in ./upgrades/3.0.4 and ./upgrades/3.5.0)
    • Build release and copy ./target/release/wbuild/datahighway-parachain-runtime.compact.wasm and .compact.compressed.wasm and store in /res folder for the latest changes in this PR for the parachains
  • Generate new Github release (use contents of this checklist to mention what was done) and perform runtime upgrade on Rococo. Add DRAFT RELEASE MESSAGE below

v3.5.0

## What's Changed

* Restore pallets to the parachain again that were pruned from initial genesis Rococo deployment as recommmended by the Cumulus tutorial to minimize runtime size
* Updates to incorporate changes from Substrate branch 'polkadot-v0.9.17' to 'polkadot-v0.9.18' that affected those pallets
* Fixed logic in benchmarking script
* Check that all essential pallet functionality works using polkadot.js
  * Balances pallet - make transfers between accounts, hard spooned balances transferred from standalone to parachain
  * Democracy - create a preimage to transfer funds and use that preimage hash to create a proposal
  * Treasury - check 30 million DHX balance hard spooned from standalone to parachain
  * Sudo - check that sudo works for forceTransfer and setBalance
  * Collators - check that able to add additional collator nodes and they generate and finalize blocks
  * Runtime upgrade - check that able to perform a runtime upgrade by for example changing the existential deposit constant and using .compact.compressed.wasm file that is generated
  * Metadata - check that no browser errors in polkadot.js using custom_types.json
* Increment `spec_version` to `3` for use with on-chain runtime upgrade
* Increment version of runtime and node from 3.4.0 to 3.5.0
* check that unit and integration tests still pass
* Release build performed with the latest changes on the Rococo server and generated the plain and raw chain specification, wasm, and state files using ./scripts/dump_wasm_and_state_for_all_chains.sh and copied those files into the ./res folder. Copied the following files into the ./res folder after release build:
  * ./target/release/wbuild/datahighway-parachain-runtime/datahighway_parachain_runtime.compact.wasm
  * ./target/release/wbuild/datahighway-parachain-runtime/datahighway_parachain_runtime.compact.compressed.wasm
* Generate new Github release

@ltfschoen ltfschoen marked this pull request as ready for review March 24, 2022 14:15
cgroeschel
cgroeschel previously approved these changes Mar 24, 2022
Copy link
Contributor

@ayushmishra2005 ayushmishra2005 left a comment

Choose a reason for hiding this comment

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

@ltfschoen Where did you generate res/rococo-parachain-raw.json file? On server or on local?

@ltfschoen
Copy link
Contributor Author

@ltfschoen Where did you generate res/rococo-parachain-raw.json file? On server or on local?

good point, yes we should generate that on the server and put a copy of it here

@ayushmishra2005
Copy link
Contributor

@ltfschoen Where did you generate res/rococo-parachain-raw.json file? On server or on local?

good point, yes we should generate that on the server and put a copy of it here

Yes, Please generate fresh files on Spreehafen

@ltfschoen
Copy link
Contributor Author

@ltfschoen Where did you generate res/rococo-parachain-raw.json file? On server or on local?

good point, yes we should generate that on the server and put a copy of it here

Yes, Please generate fresh files on Spreehafen

i've made a commit that now includes the files that were generated on Spreehafen

@ltfschoen ltfschoen merged commit e871b78 into main Mar 25, 2022
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.

3 participants