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: Polkadot v1.2. to v1.4 upgrade #437

Open
wants to merge 25 commits into
base: new-staging
Choose a base branch
from

Conversation

Aideepakchaudhary
Copy link

@Aideepakchaudhary Aideepakchaudhary commented Oct 2, 2024

Description

This PR is upgrading Runtime's and Node's dependencies from Polkadot-SDK release v1.2.0 to 1.4.0

Notes

Relevant upgrade's notes and comments.

Process

  • Bump workspace dependencies
  • Fix issues
  • Bump spec_ver for both testnet and mainnet Runtime.
  • Bump node version if there were changes in the node. TBD

Codebase Upgrade Acceptance Criteria

  • cargo check passes
  • cargo test passes
  • cargo build on -- release profile correctly builds
  • try-runtime and runtime-benchmarks features compile
  • Single node spinned up from binary works and generates blocks
  • Zombienet network with 2 peers spawned with block-production config file generates blocks.

Runtime & Node Upgrade Acceptance Criteria

  • Runtime upgrade works on Zombienet

  • Node upgrade works on Zombienet

  • Runtime upgrade works on Chopsticks

    • Testnet
    • Mainnet
  • Try-runtime passes with no pending migrations

    • Testnet
    • Mainnet

<!--- PR TEMPLATE CONTENT STARTS HERE -->

Types of Changes

Please select the branch type you are merging and fill in the relevant template.

<!--- Check the following box with an x if the following applies: -->

  • Hotfix
  • Release
  • Fix or Feature

Fix or Feature

<!--- Check the following box with an x if the following applies: -->

Types of Changes

<!--- What types of changes does your code introduce? -->

  • Tech Debt (Code improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Dependency upgrade (A change in substrate or any 3rd party crate version)

Migrations and Hooks

<!--- Check the following box with an x if the following applies: -->

  • This change requires a runtime migration.
  • Modifies on_initialize
  • Modifies on_finalize

Checklist for Fix or Feature

<!--- All boxes need to be checked. Follow this checklist before requiring PR review -->

  • Change has been tested locally.
  • Change adds / updates tests if applicable.
  • Changelog doc updated.
  • spec_version has been incremented.
  • network-relayer's events have been updated according to the blockchain events if applicable.
  • All CI checks have been passed successfully

Checklist for Hotfix

<!--- All boxes need to be checked. Follow this checklist before requiring PR review -->

  • Change has been deployed to Testnet.
  • Change has been tested in Testnet.
  • Changelog has been updated.
  • Crate version has been updated.
  • spec_version has been incremented.
  • Transaction version has been updated if required.
  • Pull Request to dev has been created.
  • Pull Request to staging has been created.
  • network-relayer's events have been updated according to the blockchain events if applicable.
  • All CI checks have been passed successfully

Checklist for Release

<!--- All boxes need to be checked. Follow this checklist before requiring PR review -->

  • Change has been deployed to Devnet.
  • Change has been tested in Devnet.
  • Change has been deployed to Qanet.
  • Change has been tested in Qanet.
  • Change has been deployed to Testnet.
  • Change has been tested in Testnet.
  • Changelog has been updated.
  • Crate version has been updated.
  • Spec version has been updated.
  • Transaction version has been updated if required.
  • All CI checks have been passed successfully

runtime/cere/src/lib.rs Outdated Show resolved Hide resolved
@@ -1006,6 +1022,8 @@ impl pallet_grandpa::Config for Runtime {

parameter_types! {
pub const BasicDeposit: Balance = 10 * DOLLARS; // 258 bytes on-chain
//TODO: Validate
pub const ByteDeposit: Balance = deposit(0, 1);

Choose a reason for hiding this comment

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

Please provide input on which value would you like to use here.

type BeneficiaryLookup = IdentityLookup<Self::Beneficiary>;
type Paymaster = PayFromAccount<Balances, TreasuryAccount>;
type BalanceConverter = UnityAssetBalanceConversion;
type PayoutPeriod = ConstU32<10>;

Choose a reason for hiding this comment

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

Please review selected value and suggest modification if needed.

@@ -533,6 +538,7 @@ parameter_types! {
pub const BondingDuration: sp_staking::EraIndex = 3;
pub const SlashDeferDuration: sp_staking::EraIndex = 2;
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
pub const MaxExposurePageSize: u32 = 64;

Choose a reason for hiding this comment

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

Please review selected value and suggest modification if needed.

runtime/cere-dev/src/lib.rs Outdated Show resolved Hide resolved
@@ -538,6 +543,7 @@ parameter_types! {
pub const BondingDuration: sp_staking::EraIndex = 3;
pub const SlashDeferDuration: sp_staking::EraIndex = 2;
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
pub const MaxExposurePageSize: u32 = 64;

Choose a reason for hiding this comment

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

Please review selected value and suggest modification if needed.

@@ -1003,6 +1019,8 @@ impl pallet_grandpa::Config for Runtime {

parameter_types! {
pub const BasicDeposit: Balance = 10 * DOLLARS; // 258 bytes on-chain
//TODO: Validate
pub const ByteDeposit: Balance = deposit(0, 1);

Choose a reason for hiding this comment

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

Please provide input on which value would you like to use here.

node/service/src/chain_spec.rs Outdated Show resolved Hide resolved
node/service/src/chain_spec.rs Outdated Show resolved Hide resolved
node/service/src/chain_spec.rs Outdated Show resolved Hide resolved
Base automatically changed from feat/polkadot-v1.2.0-upgrade to new-staging October 10, 2024 07:25
@@ -1015,10 +1033,10 @@ impl pallet_identity::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type BasicDeposit = BasicDeposit;
type FieldDeposit = FieldDeposit;
Copy link
Contributor

Choose a reason for hiding this comment

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

@Aideepakchaudhary Please remove unused variableFieldDeposit. Do the same change in cere_dev.

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