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

Bug in backport branch release-polkadot-v1.1.0 causes compilation error when metadata-hash feature is enabled #5989

Closed
2 tasks done
PanGan21 opened this issue Oct 9, 2024 · 2 comments
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.

Comments

@PanGan21
Copy link

PanGan21 commented Oct 9, 2024

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

When compiling our node using the release-polkadot-v1.1.0 branch of the Polkadot SDK, with Rust 1.70 and the metadata-hash feature enabled, the compilation fails with the following error related to the visibility of the MetadataExtraInfo struct in the substrate-wasm-builder crate:

error[E0446]: crate-private type `MetadataExtraInfo` in public interface
  --> /Users/username/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/e51a91f/substrate/utils/wasm-builder/src/metadata_hash.rs:48:1
   |
48 | pub fn generate_metadata_hash(wasm: &Path, extra_info: MetadataExtraInfo) -> [u8; 32] {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can’t leak crate-private type
   |
  ::: /Users/username/.cargo/git/checkouts/polkadot-sdk-cff69157b985ed76/e51a91f/substrate/utils/wasm-builder/src/builder.rs:26:1
   |
26 | pub(crate) struct MetadataExtraInfo {
   | ----------------------------------- `MetadataExtraInfo` declared as crate-private

The same issue occurs when trying to compile the Polkadot SDK on the release-polkadot-v1.1.0 branch with the metadata-hash feature for the westend-runtime package.
This bug impacts the Energy Web X parachain, as we are unable to compile the SDK with the necessary features for ledger support.

Related to: #4585 #4274

Follow up questions:

  • Can this be fixed so that the Energy Web X Parachain can support ledger integration?
  • Which other backport branches, if any, are affected by this issue so we don't have to come back to this issue once we upgrade?

Steps to reproduce

  1. Checkout to the release-polkadot-v1.1.0 branch of the Polkadot SDK.
  2. Ensure that Rust 1.70 is used.
  3. Try to compile the westend-runtime with the metadata-hash feature:
    cargo build --locked -p westend-runtime --features metadata-hash
@PanGan21 PanGan21 added I10-unconfirmed Issue might be valid, but it's not yet known. I2-bug The node fails to follow expected behavior. labels Oct 9, 2024
@bkchr
Copy link
Member

bkchr commented Oct 9, 2024

You need to update your rustc and then the issue should be fixed.

@bkchr bkchr closed this as completed Oct 9, 2024
@PanGan21
Copy link
Author

PanGan21 commented Oct 9, 2024

After pulling your latest commit and using rustc: 1.80 I can confirm that the issue is fixed.
I hope that next release-polkadot-v1.x.x branches do not contain the same issue.

Thank you for the quick fix @bkchr .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I2-bug The node fails to follow expected behavior. I10-unconfirmed Issue might be valid, but it's not yet known.
Projects
None yet
Development

No branches or pull requests

2 participants