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

Upgrade/polkadot v1.0 #218

Merged
merged 10 commits into from
Sep 9, 2023
Merged

Upgrade/polkadot v1.0 #218

merged 10 commits into from
Sep 9, 2023

Conversation

Leouarz
Copy link
Contributor

@Leouarz Leouarz commented Sep 8, 2023

No description provided.

pub fn on_runtime_upgrade() -> Weight {
let storage_version = NominationPools::on_chain_storage_version();
if storage_version < 3 {
StorageVersion::new(3).put::<NominationPools>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Essentially, for the Kate testnet, do we only need to increase the version to 3 without performing any actual data migration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, the data is already in the correct format, it's just a storage version mismatch after all. THe v3 to v5 will be done after storage version update

use super::*;

#[allow(dead_code)]
pub mod v0_to_v1 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this? I think once both our networks are in sync, we can just clear the upstream pallet migrations from our code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's good practice to keep it as parity is doing it i guess, but it's not used indeed

Copy link
Contributor

Choose a reason for hiding this comment

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

What I'm trying to convey is that for pallets that are part of the upstream, we can remove them once there are no more migrations required on any chain. However, for our own pallets, we can choose to keep them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, i was just wondering if there was any reason to keep it ? (did not really touch it since it's not my code)
Any thought @MiguelDD1

@Leouarz Leouarz merged commit a1c246f into toufeeq/polkadot-v1.0 Sep 9, 2023
Leouarz added a commit that referenced this pull request Sep 13, 2023
* Updated rust toolchain

* Incorporated upstream changes into frame-system

* Updated packages to use latest support versions

* Removed uncles & deprecated GenesisConfig

* wip: weights v2 & fixed system pallet tests

* Updated mocks with new frame-system configs

* wip: Added ExtendedBlock with frame & da headers

* Updated weights to v2

* Updated da control mocks to fix tests

* Updated nomad-updater-manager mocks to fix tests

* Updated nomad-home mocks

* Fixed system benchmarkings

* fmt & refactor

* Added frame-executive as local dep to patch

* fmt fix

* Updated pallet configs

* Added code comment for rust bug

* commented nomad-da-bridge tests

* Removed unintended std feature gate on imports

* Updated runtime configs

* pallets: implement  for  in

* pallets: implement `Default` for `GenesisConfig` in `no_std`

* Added missing configs & functions to runtime

* Temp: removed da-bridge from runtime

* Fixed runtime tests

* Fixed kate-rpc's

* Fixed compile errors of node service

* Updated kate-rpc to use default HeaderExtension

* Added header_builder hosted function back

* clippy fixes

* Temporarily removed frame-executive tests

* Fixed frame-system try-runtime feature

* Fixed various features of the workspace

* add bug report template, PR template, feature request template, chang… (#201)

* add bug report template, PR template, feature request template, changelog, code of conduct, contributing guide

* add missing point in checklist

* Update CODE_OF_CONDUCT.md

* Ghali/remove warnings (#205)

* remove warnings

* remove useless comment

* Add tx index from block mapping to data index. (#198)

* Add tx index from block mapping to data index.

* Simplify code.

* Fix data transactions mapping, make code more readable.

* Clean unused imports.

* Update docs.

* Use safe conversion.

* Use safe conversion.

* Add unit test for testing data proof generation.

* tidy.

* Add leaf index check.

* Update examples to match rpc endpoint.

* add --unsafe-da-sync flag to quickly sync the chain

* refactoring

* Moved (de)serialization of BlockLength to no_std

* Updated beefy-merkle-tree name

* Changed Runtime from enum to struct everywhere

* Re-introduced da-bridge to runtime: welcome back:)

* Fixed da-bridge pallet benchmarks

* Ghali/benchmark data root (#204)

* add data root benchmark in case of max block

* add new weights for data_root

* nit

* Updated RPC port

* Added troubleshooting to readme

* Commented block_length_proposal from CI e2e

* fmt: weights to v2

* code cleaning & clippy fixes

* Updated multiplier to check for empty block

* Updated api_dev of avail-subxt

* Enabled submit_block_length_proposal test

* camel_casing fields of BlockLength

* updated api_dev in avail-subxt

* bumped spec_version to 12

* Added FRAME pallet migrations

* apply review suggestions

* feat: Added identity pallet to our module list

* feat: Added mandate pallet

* Updated avail-core branch reference to main

* Upgrade/polkadot v1.0 (#218)

* camel_casing fields of BlockLength

* updated api_dev in avail-subxt

* feat: Added identity pallet to our module list

* feat: Added mandate pallet

* Updated avail-core branch reference to main

* fix migrations

---------

Co-authored-by: Toufeeq Pasha <toufeeq@sovereignwallet.network>
Co-authored-by: Marko Petrlic <petrlic.marko@gmail.com>

* merge upstream, generate subxt metadata, add block to scheduler migration

* remove extra sneaky lines

* format

* Switch commitment gen to new api

* Try updating deps in cargo lock

* Move avail-subxt to workspace to fix dep desync

* Pin deps to fix example build issues

* Something broke in the build...

It seems like now avail-core is including a v21 of sp-core, but I can't
figure out where it's getting it!

* rebase fix

* Added OnceLock TODO

* Moved from nightly version to latest stable

* fmt

* Reverted formatting

* Changed the CI toolchain

* update to weightv2, remove warning, use weights folder in runtime like polkadot-sdk

---------

Co-authored-by: Toufeeq Pasha <toufeeq@sovereignwallet.network>
Co-authored-by: Saša Pršić <93726535+0xSasaPrsic@users.noreply.github.com>
Co-authored-by: Marko Petrlic <petrlic.marko@gmail.com>
Co-authored-by: William Arnold <will748@gmail.com>
@Leouarz Leouarz deleted the upgrade/polkadot-v1.0 branch September 13, 2023 13:34
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