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

Closed
wants to merge 1 commit into from

Conversation

Aideepakchaudhary
Copy link
Contributor

@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
runtime/cere/src/lib.rs Show resolved Hide resolved
runtime/cere/src/lib.rs Show resolved Hide resolved
runtime/cere/src/lib.rs Outdated Show resolved Hide resolved
runtime/cere-dev/src/lib.rs Outdated Show resolved Hide resolved
runtime/cere-dev/src/lib.rs Outdated Show resolved Hide resolved
runtime/cere-dev/src/lib.rs 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
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
@Aideepakchaudhary Aideepakchaudhary marked this pull request as ready for review October 10, 2024 12:36
Cargo.toml Outdated Show resolved Hide resolved
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.

@metricaez @Aideepakchaudhary Please fix the conflicts.

runtime/cere/src/lib.rs Outdated Show resolved Hide resolved
@@ -566,6 +571,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 = 512;
Copy link
Contributor

Choose a reason for hiding this comment

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

@ayushmishra2005 take a look at this 512 value

Copy link
Contributor

Choose a reason for hiding this comment

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

@aie0 Please see my comment here #437 (comment). MaxNominatorRewardedPerValidator was renamed to MaxExposurePageSize as a part of paritytech/polkadot-sdk#1189. Since MaxNominatorRewardedPerValidator was set to 512, so MaxExposurePageSize should be set to 512. There was no recommendation to lower down its value.

I made this change

Copy link

gitguardian bot commented Oct 23, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9100662 Triggered Generic High Entropy Secret b78a37e node/service/chain-specs/example.json View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@ayushmishra2005
Copy link
Contributor

ayushmishra2005 commented Oct 23, 2024

I tried squashing in this PR to convert into single commit. That went wrong unfortunately.

Since I had created backup before performing squash, so I just raised new PR #457 from new branch.

Closing the PR.

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.

4 participants