-
Notifications
You must be signed in to change notification settings - Fork 31
Update the parachain template to stable2412 #26
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
Conversation
Hello, this is an automatic reminder that any code changes should be made to the source. |
4f4f8d3
to
13919b6
Compare
13919b6
to
9e2ebdf
Compare
# Description When building `polkadot-sdk-parachain-template` workspace (`cargo build --workspace --all-features`), based on `stable2412` dependencies (paritytech/polkadot-sdk-parachain-template#26), it fails with an error like below. <details> <summary><b>error message</b></summary> error[E0080]: evaluation of constant value failed --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sc-network-0.47.0/src/protocol/message.rs:79:40 | 79 | #[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)] | ^^^^^^ the evaluated program panicked at 'Found variants that have duplicate indexes. Both `Consensus` and `RemoteCallResponse` have the index `6`. Use different indexes for each variant.', /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sc-network-0.47.0/src/protocol/message.rs:79:43 | = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `::core::panic` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0080]: evaluation of constant value failed --> /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sc-network-0.47.0/src/protocol/message.rs:79:48 | 79 | #[derive(Debug, PartialEq, Eq, Clone, Encode, Decode)] | ^^^^^^ the evaluated program panicked at 'Found variants that have duplicate indexes. Both `Consensus` and `RemoteCallResponse` have the index `6`. Use different indexes for each variant.', /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sc-network-0.47.0/src/protocol/message.rs:79:51 | = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `::core::panic` (in Nightly builds, run with -Z macro-backtrace for more info) For more information about this error, try `rustc --explain E0080`. error: could not compile `sc-network` (lib) due to 2 previous errors </details> The root cause is `sc-network 0.47.0` (which builds fine when >=0.48.0), a dependency of `pallet-revive-eth-rpc 0.2.0`, which is a dependency of `polkadot-sdk 0.12.1`, used for various things in `polkadot-sdk-parachain-template` repo. While investigating how to fix the issue on `stable2412`, I discovered a few things: 1. `pallet-revive 0.3.1` can not build with `runtime-benchmarks` based on latest `stable2412`, and it is also a dependency of `pallet-revive-eth-rpc 0.2.0`, and pulled by `polkadot-sdk 0.12.1` for its `runtime-benchmarks` feature. 2. Based on some chats started here: #7844 (comment), we identified that `pallet-revive/pallet-revive-eth-rpc` were set with `publish = false` for a good reason and it shouldn't have changed here: 31b5923. We also identified as a potential fix what this PR does, meaning removing the `pallet-revive/pallet-revive-eth-rpc` dependency of `polkadot-sdk`. I removed the other dependencies as well since I feel it does not make sense to still keep them once `pallet-revive` is out. 3. Releasing correct crates for `pallet-revive*` and use them in `polkadot-sdk` isn't yet necessary IMO, since some things still need to be polished, and given their builds fail when building certain features, they are not usable by users fully, so maybe not worth keeping partial working functionality around just for the sake of having the crates in `polkadot-sdk` - please challenge this if you think differently. Ideally, we will make these pallets available for developers to use via `polkadot-sdk` when all builds correctly with all features. ## Integration Runtime/Node devs will not be able to reference `pallet-revive*` pallets anymore via `polkadot-sdk`, so this is a breaking change, but if their usage is close to zero by polkadot devs we can tune it down and consider it a minor change for `polkadot-sdk`. ## Review Notes 1. If we think this requires a major bump for `polkadot-sdk`.. then we can't look at the PR as a fix for `stable2412` and associated published `polkadot-sdk` version. If we consider `pallet-revive` logic not being necessarily used by polkadot devs so not very breaking from usage perspective, then we can go with a minor bump and finally have a working `polkadot-sdk` for `stable2412. 2. We also considered fixing `pallet-revive` & `pallet-revive-eth-rpc` on `stable2412`, and publish correct versions on `crates.io`, and then follow with a `polkadot-sdk` publish that depends on them, and in the end `polkadot-sdk-parachain-template` workspace would build successfully based on `stable2412` crates, but this is more work which could've been done by now if it was necessary - e.g. in a scenario where actual developers were using them (instead of setting the crates with `publish = false`), so I think it makes sense to remove them for now from `polkadot-sdk`. 3. ~IMO this PR should be backported to stable2503 too. Releasing `polkadot-sdk` with `pallet-revive*` dependencies can be done with the June release if things are more stable by then.~ We actually want to fix `pallet-revive*` crates for stable2503, so must be kept in master and 2503 branch. --------- Signed-off-by: Iulian Barbu <[email protected]> Co-authored-by: Alexander Theißen <[email protected]> Co-authored-by: Francisco Aguirre <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
14bf9ca
to
a3cb129
Compare
a3cb129
to
14bf9ca
Compare
Signed-off-by: Iulian Barbu <[email protected]>
57c48dc
to
9242d73
Compare
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
This reverts commit 5270438.
Signed-off-by: Iulian Barbu <[email protected]>
Ran the failing zn test on both macos and ubuntu. On macos it passes, while on ubuntu it fails. The difference is a log line on ubuntu:
I was not expecting the test to fail on |
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
Signed-off-by: Iulian Barbu <[email protected]>
The template has NOT been successfully built and needs to be inspected.