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

pallet-identity-migrator Becomes a Separate Crate #3914

Conversation

asiniscalchi
Copy link
Contributor

This PR separates pallet-identity-migrator into its own crate while keeping the refactor transparent to the code outside polkadot-runtime-common. By re-exporting the pallet in polkadot-runtime-common, external references remain unchanged, preserving backward compatibility and minimizing impact on the wider Polkadot codebase.

Changes Summary:

  • Crate Creation: Extracted pallet-identity-migrator to a standalone crate, including a dedicated Cargo.toml for dependencies and configurations.
  • Re-export in polkadot-runtime-common: To maintain existing code paths, pallet-identity-migrator is re-exported in polkadot-runtime-common, making the refactor invisible to external users.
  • Dependency Adjustments: Updated Cargo.toml in polkadot-runtime-common and top-level workspace to reflect the new crate path for pallet-identity-migrator.

This approach enhances modularity without requiring any changes from the rest of the Polkadot codebase.

@asiniscalchi asiniscalchi marked this pull request as ready for review March 31, 2024 06:53
@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: cargo-clippy
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5703514

@asiniscalchi
Copy link
Contributor Author

The CI pipeline was cancelled due to failure one of the required jobs. Job name: cargo-clippy Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5703514

Clippy is giving errors on this :

error: field `0` is never read
   --> polkadot/runtime/parachains/src/inclusion/mod.rs:389:28
    |
389 |     ProcessedDownwardMessages(dmp::ProcessedDownwardMessagesAcceptanceErr),
    |     ------------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |     |
    |     field in this variant
    |
    = note: `-D dead-code` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(dead_code)]`
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
389 |     ProcessedDownwardMessages(()),
    |                               ~~

error: field `0` is never read
   --> polkadot/runtime/parachains/src/inclusion/mod.rs:391:17
    |
391 |     UpwardMessages(UmpAcceptanceCheckErr),
    |     -------------- ^^^^^^^^^^^^^^^^^^^^^
    |     |
    |     field in this variant
    |
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
391 |     UpwardMessages(()),
    |                    ~~

error: field `0` is never read
   --> polkadot/runtime/parachains/src/inclusion/mod.rs:395:15
    |
395 |     OutboundHrmp(hrmp::OutboundHrmpAcceptanceErr),
    |     ------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |     |
    |     field in this variant
    |
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
395 |     OutboundHrmp(()),
    |                  ~~

enum AcceptanceCheckErr<BlockNumber> {
HeadDataTooLarge,
/// Code upgrades are not permitted at the current time.
PrematureCodeUpgrade,
/// The new runtime blob is too large.
NewCodeTooLarge,
/// The candidate violated this DMP acceptance criteria.
ProcessedDownwardMessages(dmp::ProcessedDownwardMessagesAcceptanceErr),
/// The candidate violated this UMP acceptance criteria.
UpwardMessages(UmpAcceptanceCheckErr),
/// The candidate violated this HRMP watermark acceptance criteria.
HrmpWatermark(hrmp::HrmpWatermarkAcceptanceErr<BlockNumber>),
/// The candidate violated this outbound HRMP acceptance criteria.
OutboundHrmp(hrmp::OutboundHrmpAcceptanceErr),
}

What's the ratio of those params not being used ?

Copy link
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

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

This is a one-off crate that will be deleted soon, any effort here is pretty much wasted...

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