A Xuperchain SDK by rust, especially for TEE(Intel SGX/ARM TZ) application.
-
Xuperchain 3.7
Clone xuperchain source code and follow the instruction to build a single-node or multi-node network.
If you would like to enable mesatee functionality, continue with step 2 and step 3.
-
SGX 2.9.1 Follow the instruction to set up a sgx2.9.1 development environment.
-
Mesatee-core-standalone
Follow the instruction to set up mesatee service.
- load account
- Transfer
- Contract Invoke/Query
- balance
- mesatee trust functions
In protos/xchain.rs and protos/xendorser.rs:
- Serialize enum as number: https://serde.rs/enum-number.html
- #[serde(default)]
- crate::wallet::*
-
Xuperchain configuraton
You may need to modify the xuperchain configuration in file "xchain-client-sdk/conf/sdk.yaml" according to your xuperchain network.
-
Mesatee configuraton
You can choose to test mesatee trust functions by adding "mesatee-sdk" to the default feature in "sdk-sgx-test/enclave/Cargo.toml". Remove it if you choose not to enable mesatee functionality.
You may need to modify the value of global parameters at the beginning of test file "sdk-sgx-test/enclave/src/lib.rs". "PUBKEY_PATH", "SIG_PATH" and "ENCLAVE_PATH" refer to mesacore-core-standalone/release/services directory.
You may need to modify the value of n_worker and TCSnum to achieve higher concurrency.
-
make and run tests
cd sdk-sgx-test
make
cd bin
export IAS_SPID=xxxx (only when "mesatee-sdk" is enabled)
export IAS_KEY=xxx (only when "mesatee-sdk" is enabled)
./run-tests
We port trusted-mesatee-sdk into enclave. In order to improve the performance, we do server verification by checking the signer's signature of function enclave, instend of dual verification when connecting to function in enclave. So make sure the caller enclave had been verified before calling the function.