Skip to content

v3.2.0

Compare
Choose a tag to compare
@ltfschoen ltfschoen released this 17 Mar 07:26
· 100 commits to main since this release
36e4233

v3.2.0

What's Changed

  • Updated version of datahighway-collator and datahighway-parachain-runtime packages to 3.2.0
  • Migrated all relevant pallets from DataHighway standalone chain PR DataHighway-DHX/node#215, which fixes the block delay by switching from Babe to Aura, and also updates to Substrate branch 'polkadot-v0.9.17' from the substrate-parachain-template dated 10th Feb 2022
    • Switched from using a commit rev = '...' to using latest branch for parachain branch = 'polkadot-v0.9.17'
  • Omited the following pallets from parachain since only relevant on standalone chain: pallet-grandpa, pallet-im-online, pallet-election-provider-multi-phase, pallet-offences, pallet-staking, pallet-staking-reward-curve, pallet-bags-list, pallet-authority-discovery, frame-election-provider-support, sp-npos-elections, sp-transaction-storage-proof, sp-staking, sp-keyring, sp-authority-discovery
  • Updated script ./scripts/init.sh to nightly-2021-12-15
  • Reset versions in Cargo.toml files and other parameters like spec_version and impl_version
  • Replaced pub type Address = MultiAddress<AccountId, ()>; with pub type Address = MultiAddress<AccountId, AccountIndex>; like on standalone chain. Received help here https://substrate.stackexchange.com/a/725/83
  • Modify parachain constants/parameters for each pallet and the runtime (for example, if we want democracy proposals to take 1 week instead of 1 month then change the parameter otherwise we will have to wait that long to make that change when the chain is live unless we use sudo)
  • Checked that it runs using polkadot-launch by following these steps https://github.com/DataHighway-DHX/documentation/blob/master/docs/tutorials/tutorials-node-polkadot-launch-datahighway-rococo-local.md
    • It was failing with error when it tries to export-genesis-state. The cause of this problem was because the EXISTENTIAL_DEPOSIT was currently 1000000000000000, (i.e. 100 * MILLICENTS), but some of the balances in the hardspoon accounts that we are trying to import from the standalone chain had less than the existential deposit. This was fixed in this PR DataHighway-DHX/open-polkadot-js-library#8, and copied the latest data/ that was generated into the genesis.json, and that fixed the issue.
    • Checked that all essential pallet functionality works using polkadot.js
      • Balances - transfers between accounts, checked hard spooned balances transferred from standalone to parachain
      • Democracy - created a preimage to transfer funds and use that preimage hash to create a proposal
      • Treasury - checked 30 million DHX balance hard spooned from standalone to parachain
      • Sudo - checked that sudo works for forceTransfer and setBalance. This is necessary since the endowed amount of 10 DHX is not sufficient to pay the runtime upgrade fee of approx 30 DHX.
      • Staking - checked that able to add additional collator nodes and they generate and finalize blocks
      • Runtime Upgrade - checked that able to perform a small runtime upgrade when running rococo-local with a collator after minimizing the runtime size to less than the Rococo maxCodeSize of 3.1 MB without the transaction exhausting the block limits. Kusama will need to be used for incremental runtime upgrades to restore the pallets that were temporarily removed since it has a maxCodeSize of 10 MB. See comments here
      • Metadata - checked that no errors in polkadot.js using custom_types.json
  • Check that 'block delay' issue is fixed since we are now using Aura instead of Babe. block time varies between 18-30 seconds for a block time of 12 seconds https://github.com/DataHighway-DHX/open-polkadot-js-library/blob/main/block-delay/backup/data-datahighway-rococo-local-aura/datahighway-rococo-local-testnet-2022-03-15-11:17-744000000.csv
  • Added scripts to codebase to simplify dumping chain specs, state and wasm for all relevant chains (use these ones https://github.com/integritee-network/parachain/blob/master/scripts/dump_wasm_and_state_for_all_chains.sh)
  • Fixed treasury-dao and mining-lodgements-hardware that are missing Cargo.toml files
  • Added benchmarking
  • Skipped running benchmarking. See reasons in conversation #17
  • Added try-runtime and essential hooks
  • Skipped running try-runtime to check amount of accounts remains the same after an on-chain upgrade. See reasons in conversation #17
  • Checked that unit and integration tests still pass
  • Skipped Memory Profiling. See reasons in conversation #17
  • Minimize Runtime Size by checking critical parachain constraints and temporarily removing some pallets that will be restored again later on Kusama as incremental runtime upgrades https://docs.substrate.io/how-to-guides/v3/parachains/pre-launch/#3-minimize-your-runtime-size

The following is the output of checking the configuration of Rococo relay chain

maxCodeSize: 3,145,728
maxHeadDataSize: 32,768
maxPovSize: 5,242,880

The runtime upgrade check where I just changed the existential deposit value generated a .compact.wasm file that was 6MB in size, so it was necessary to reduce it to less than 3.1MB. I have reduced the runtime size to 3.05MB so can perform small runtime upgrades in PR #24. The community has been asked why the Rococo maxCodeSize is smaller than Kusama's here https://substrate.stackexchange.com/questions/784/why-is-the-rococo-maxcodesize-too-small-to-do-adequate-incremental-runtime-upg

  • Generate the chain spec, "raw" chain definition, exported genesis state, exported genesis wasm using scripts in the /scripts folder from the first collator bootnode server. Copy them into a subfolder in the /res folder (i.e. /res/v3.2.0). Also copy the built DataHighway-Parachain/target/release/wbuild/datahighway-parachain-runtime.compact.wasm file into the /res folder, and then push them as a commit to Github. This process should also be performed for runtime upgrades so they are distributed to all collators and bootnodes so they have the latest changes.

Full Changelog: https://github.com/DataHighway-DHX/DataHighway-Parachain/commits/v3.2.0