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

Streaming data, and making http requests #40

Open
levackt opened this issue Nov 20, 2019 · 2 comments
Open

Streaming data, and making http requests #40

levackt opened this issue Nov 20, 2019 · 2 comments
Assignees
Labels

Comments

@levackt
Copy link

levackt commented Nov 20, 2019

This one's from discord, from user Moskalyk, one of the waterloo hackers.

Curious, if I was wanting to perform stream processing with rust, is there any reason why enigma secret contracts wouldn't be able to support this abstraction?
Similarly, performing HTTP GET requests (or any other typical rust function) within a secret contract should be okay?

On the 1st question, I've referred to the discussion on Large scale data architecture, the entire state is fully encrypted.

The 2nd I don't believe to be possible in the enclave, and referred to the FAQ about Oracles;

How do I get oracle data into a computation?
We currently do not support TLS or HTTP requests within a computation. We suggest that developers utilize a relayer model where applicable to obtain and submit this type of data.

I also believe if the library, any http in this case, uses any features not supported by the SGX environment it will fail to run.

Not sure if this is 100% correct and covers it, or maybe we can have further clarity in the FAQ or a blog on which features are supported and what's restricted by SGX.

@levackt levackt self-assigned this Nov 20, 2019
@levackt levackt added the rust label Nov 20, 2019
@ainsleys
Copy link
Contributor

Including user's additional clarification here:

Are there any examples of a rust program calling a secret contract, vs. using enigma-js?

Interested in using something like the https://docs.rs/futures/0.2.0/futures/stream/trait.Stream.html abstraction in rust, and would like to 'poll' continuously on a secret contract method.

I think your response @levackt is correct. I believe that we will have solutions to access chain state inside the enclave in the future but not right now. I suggest a relayer model for submitting any kind of external data stream i.e. oracle. Everything needs to be framed as a task, so data stream should be considered in this constraint.

@ainsleys
Copy link
Contributor

More info from the use-case...

The type is an array of integers, being produced over a udp socket

re: batching data stream and submitting it as a task...

Would be great to do that, which is generally how the Stream works (still learning) via the rust executor looping and polling for value (in this case a task to compute)

Not sure exactly what @moskalyk is attempting, but it sounds like it may also touch the issue of kicking off a task-- the secret contract itself can't do that. So we need a user or a service that observes the data and kicks off the task when conditions are met.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants