Open haerdib opened 3 years ago
Exchange websocket client with rustls client as soon as openfinex supports tls
Currently, there is a PR to solve https://github.com/integritee-network/worker/issues/352: https://github.com/integritee-network/worker/pull/362, providing some more information as well as diagrams. Definitely worht to take a look at.
According to this PR I think we can do the following:
The current client is implemented with the mio polling outside, that was implemented so due to the thread issue (see tls example: https://github.com/apache/incubator-teaclave-sgx-sdk/blob/master/samplecode/tls/tlsclient/enclave/src/lib.rs). However, for thread spawning we could also use and ocall, which enters via ecall again, which has already been preimplemented: https://dingelish.github.io/sgx_tstd/sgx_tstd/thread/index.html. So we can also use the mio inside the enclave, according to example: https://github.com/apache/incubator-teaclave-sgx-sdk/blob/master/samplecode/mio/client/enclave/src/lib.rs
In case mio is used inside the enclave, don't forget to add sgx_pipe.edl to the edl file: https://github.com/apache/incubator-teaclave-sgx-sdk/blob/master/samplecode/mio/client/enclave/Enclave.edl#L23
(check out for example implementation https://github.com/Polkadex-Substrate/polkadexTEE-worker/blob/5/openfinex-client-v3/enclave/src/openfinex/openfinex_client.rs)
@haerdib to provide more info
Exchange websocket client with rustls client as soon as openfinex supports tls
Currently, there is a PR to solve https://github.com/integritee-network/worker/issues/352: https://github.com/integritee-network/worker/pull/362, providing some more information as well as diagrams. Definitely worht to take a look at.
According to this PR I think we can do the following:
The current client is implemented with the mio polling outside, that was implemented so due to the thread issue (see tls example: https://github.com/apache/incubator-teaclave-sgx-sdk/blob/master/samplecode/tls/tlsclient/enclave/src/lib.rs). However, for thread spawning we could also use and ocall, which enters via ecall again, which has already been preimplemented: https://dingelish.github.io/sgx_tstd/sgx_tstd/thread/index.html. So we can also use the mio inside the enclave, according to example: https://github.com/apache/incubator-teaclave-sgx-sdk/blob/master/samplecode/mio/client/enclave/src/lib.rs
In case mio is used inside the enclave, don't forget to add sgx_pipe.edl to the edl file: https://github.com/apache/incubator-teaclave-sgx-sdk/blob/master/samplecode/mio/client/enclave/Enclave.edl#L23
(check out for example implementation https://github.com/Polkadex-Substrate/polkadexTEE-worker/blob/5/openfinex-client-v3/enclave/src/openfinex/openfinex_client.rs)