SecretNetwork icon indicating copy to clipboard operation
SecretNetwork copied to clipboard

Upgrade rust?

Open faddat opened this issue 2 years ago • 1 comments

Ok, so first rust for me.

I have a build of all of the go components for v1 working, but I cheated.

Some thing that has always concerned me about CW is that we use old versions of rust but for the wrong reasons (gas pricing consistency eg: don't do that, it would then go too fast) if I understand correctly, there's a pretty significant reimplementation of CW living in this repository.

And we build it with a 2020 vintage compiler, because of SGX. I'm wondering if we can get a fresher compiler going-- maybe 2022 era?

If it is just a matter of a applying an SGX patch, I'd love to give it a go, but I kinda figure that there are big performance gains to be had by modernizing the rust build toolchain in scrt.

update

I installed the nightly rust toolchain, and I removed the rust-toolchain file in the repo root.

Stuff started working like magic.

faddat avatar Jul 23 '22 16:07 faddat

It's actually a bit more complicated than that. Because a lot of the code depends on teaclave-sgx-sdk we have to use a very specific version of Rust for most of the code. The annoying part is that this applies not only for the sgx-sdk itself, but inside the enclave a lot of the packages are forks that were specifically modified to work with a specific sgx-sdk version.

I'd like nothing more than to use a version of Rust that is newer, but to do it right now would probably require forking and updating like 20/30 different repos. That's why we're looking at either using version 2.0 of teaclave-sgx-sdk or porting our code over to Gramine - both of which will be far, far easier to maintain

Cashmaney avatar Jul 24 '22 08:07 Cashmaney