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

Request of updating the rust toolchain version #1000

Closed
Kailai-Wang opened this issue Sep 14, 2022 · 6 comments · Fixed by #1076
Closed

Request of updating the rust toolchain version #1000

Kailai-Wang opened this issue Sep 14, 2022 · 6 comments · Fixed by #1076

Comments

@Kailai-Wang
Copy link
Contributor

Kailai-Wang commented Sep 14, 2022

Problem:

the current toolchain (nightly-2022-03-10) seems a bit old to compile polkadot-v0.9.28 cumulus dependencies. It complains about "unstable library feature" when compiling the worker with my-node-runtime pointing to litentry-parachain-runtime, which is sitting at polkadot-v0.9.28:

error[E0658]: use of unstable library feature 'vec_retain_mut'
   --> /home/kai/.cargo/git/checkouts/substrate-7e08433d4c370a21/34a0621/client/transaction-pool/src/graph/validated_pool.rs:207:12
    |
207 |                     sinks.retain_mut(|sink| match sink.try_send(*hash) {
    |                           ^^^^^^^^^^
    |
    = note: see issue #90829 <https://github.com/rust-lang/rust/issues/90829> for more information
    = help: add `#![feature(vec_retain_mut)]` to the crate attributes to enable

   Compiling pallet-transaction-payment-rpc v4.0.0-dev (https://github.com/paritytech/substrate?branch=polkadot-v0.9.28#34a06217)
For more information about this error, try `rustc --explain E0658`.
error: could not compile `sc-transaction-pool` due to previous error

I double-checked the crate sc-transaction-pool: it comes from our parachain only (from cumulus-relay-chain-interface), not in integritee-node, so you probably won't have such a problem.

For now I can work around this by forking substrate and patching it in worker TOML, but still as polkadot evolves it could grow to some point where patching is too much and we'd need a newer toolchain.

However, this might not be so easy though: it would require newer toolchain support from sgx-* crates. As far as I tested, simply changing the TC to a newer version wouldn't work out of the box.

If you have better ideas, please let me know!

Edit: oops I accidentally took away the 1000th issue, sorry 😂

@Kailai-Wang
Copy link
Contributor Author

Btw, I'm not saying 0.9.28 parachain-node + 0.9.26 worker will work, in fact, I still get some crate version conflict in between, but that's another story

@haerdib
Copy link
Contributor

haerdib commented Sep 15, 2022

Yeyy. Issue number 1000 🥳

The rust version is currently blocked by apache/incubator-teaclave-sgx-sdk#386 (comment), but usually they keep to their promise. So we can expect an update there soon.

Regarding your issue: I believe we've seen that before. Is it not fixable by manually downgrading the retain_mut library to version 0.1.4? Ofc, that's no long term fix, but since we're currently blocked by (maybe) substrate ( #992 (comment)) and teaclave, I don't think there's an easy fix.

@clangenb
Copy link
Contributor

I deleted the above comments; v0.9.28 is no_std compatible, it was another error.

@Kailai-Wang
Copy link
Contributor Author

Kailai-Wang commented Sep 15, 2022

Thanks both 👍

Is it not fixable by manually downgrading the retain_mut library to version 0.1.4?

I don't think it will help, as it's not about the crate version (in fact, we don't have such crate in parachain or substrate), it's about the compiler features, and I just noticed you did similar stuff here, and I had to patch sc-transaction-pool and sc-consensus-babe in substrate myself.

Anyways 0.9.28 parachain-node + 0.9.26 worker doesn't seem to compile together due to conflict crate versions, something like:

note: perhaps two different versions of crate `sc_consensus_epochs` are being used?

so I think the best bet for us is to go back to v0.9.26 temporarily

Never mind I saw the 0.9.28 PR is round the corner, we'll go v0.9.28

@haerdib
Copy link
Contributor

haerdib commented Oct 12, 2022

They have not yet updated... I did a follow-up comment. apache/incubator-teaclave-sgx-sdk#386 (comment)

Let's hope for the best.

@murerfel murerfel changed the title Request of updating the rust toolchain verison Request of updating the rust toolchain version Oct 12, 2022
@clangenb
Copy link
Contributor

Finally teaclave has published an update, see #1074.

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 a pull request may close this issue.

3 participants