-
Notifications
You must be signed in to change notification settings - Fork 0
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
Wrap rust-cli with python #40
Comments
With the current state of the worker, we need a patch, which is nasty, but it should work. If we want to streamline this by introducing a feature flag as discussed in integritee-network#1167 (comment), this needs some work, which would be invoiced by integritee. |
I tried the patch, but get an error (using linux): Compiling sgx_crypto_helper v1.1.6 (/home/xxx/incubator-teaclave-sgx-sdk/sgx_crypto_helper)
warning: unused import: `sgx_types::sgx_status_t`
--> /home/xxx/incubator-teaclave-sgx-sdk/sgx_crypto_helper/src/rsa3072.rs:6:5
|
6 | use sgx_types::sgx_status_t;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Compiling itp-sgx-externalities v0.9.0 (/home/xxx/worker/core-primitives/substrate-sgx/externalities)
error[E0599]: no method named `to_pubkey` found for struct `Rsa3072PubKey` in the current scope
--> /home/xxx/incubator-teaclave-sgx-sdk/sgx_crypto_helper/src/rsa3072.rs:298:27
|
253 | pub struct Rsa3072PubKey {
| ------------------------ method `to_pubkey` not found for this struct
...
298 | let pubkey = self.to_pubkey()?;
| ^^^^^^^^^ method not found in `Rsa3072PubKey`
warning: unused import: `crate::RsaKeyPair`
--> /home/xxx/incubator-teaclave-sgx-sdk/sgx_crypto_helper/src/rsa3072.rs:17:5
|
17 | use crate::RsaKeyPair;
| ^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0599`.
warning: `sgx_crypto_helper` (lib) generated 2 warnings
error: could not compile `sgx_crypto_helper` due to previous error; 2 warnings emitted
warning: build failed, waiting for other jobs to finish... Which is weird as the patch-code at the stated My tree is
|
It does, but it is behind a feature. You need at least |
Thank you for the hint however, when adding it to the my Cargo.toml I still get the same error for some reason. |
@n-prat before the error appears, I get warnings of skipped duplicate packages of teaclave-sgx-sdk despite the patch. Maybe this is messing up the dependencies, did I use the incubator-teaclave repo correctly as patch for the teaclave dependency? Even if I remove the duplicate manually, cargo build loads teaclave from another source also. I currently use the integritee worker at ea00ebe with the updated client lib. Is there another worker client branch that I could/should test it with? |
Error and duplicate-package-warning persist also when patch is added to https://github.com/olisystems/BEST-Energy/blob/ea00ebea9f2df900fcb389d51eb00c710e3e0fc9/cli/Cargo.toml |
Ah we seem to have a different use cases:
The relevant part of my workspace
and then in the Android lib crate:
Can you push your WIP to a public branch? And give the commands you're trying to use to compile your project? What is the result of
|
Thank you, I tried both, I am also using integritee-cli as dependency. So as it seems I am not having one set of teaclave dependency, but do not know how to resolve it, if necessary. That is why I just tried, if specifying the patch in the dependency itself rather than the projects Cargo.toml only.
I uploaded some minimal code here, which should just showcase that the the integritee-cli can be wrapped in a python library: [email protected]:BESTenergytrade/integritee-cli-py.git I currently cloned I run the commands as described in the README, with |
Ah I think the issue is with the This is why I have added a "fake dependency" in my Android lib:
|
Thank you @n-prat, it solved my issue! I also had the wasmtime issue, maybe similar to what you mentioned here:
I did not fully understand what source you rebased to remove the issue, but for me rust |
Great! The |
After integritee-network#1183 has been merged, we can now wrap the rust-cli lib with python. however, there are still some issues left, as the lib needs some sgx-crypto c-libraires:
For this, we'd actually need to remove the sgx-crypto entirely. We have discussed this in integritee-network#1167. I will follow up over there.
Blocked by
The text was updated successfully, but these errors were encountered: