so, anyone developing on secret contracts has doubtlessly run into the following issues
1: major memory limitations/compute limitations
2: having to write in rust with complicated type setups even for simple data manipulation, with more complex datasci looking tough at best and impossible at worst.
I would, today, like to formally propose the project i’ve been back-and-forth thinking about for the past few months, which solves both of these issues: the Secret Tunnel SDK!
a spec for the SDK is below:
at a high level, the project would be an SDK for ‘wrap arbitrary python computation in a separate enclave, and use SN to verify that enclave contains what it says it does, and to send data safely to and from that enclave’.
What does this enable?
‘using numpy/scipy/sklearn/tensorflow on data via SN’, for one. For 2, all those wonderful decentralized lending algos that need floating-point arithmetic can now run on this. For 3, if you write your python computation idempotently, it massively decreases gas costs for expensive computations, and decreases load on nodes to run them. For 4, now you can have nondeterministic computations on SN via the secondary enclave! (only when the computation is idempotent/caches results)
What’s the deliverable?
A fully open-sourced set of build tools and secret contracts+templates to convert an arbitrary python program (within some size limits) into a Secret Tunnel-linked program on SN. Users should at worst need to docker-compose some prewritten dockerfiles. Obviously, all OSS, in case you need to change contract logic. If I can get enough money and a devops engineer, I’ll set up bare-metal cloud instances to run some number of enclaves internally – but the rest y’all might have to find separate hosting for (I’ll ideally include cloudformation templates/helm charts for spinning up ST enabled nodes).
What do I need to build it?
Enough money to justify me+a team spending however long it’ll take to get graphene running nicely and SN to play nice with graphene + SGX verification. After that, another coupla weeks or months to get the UX to the point of ‘as a tolerable python dev you can use this library’. Also ideally enough to pull in the aforementioned devops engineer + hosting fees. In total? Not sure, depends what y’all want/what unknown unknowns I’m missing. There’s a reason this is an informal proposal and not a formal ask yet.
Who am I?
Leor Fishman, currently taking a leave from harvard to build the web backend /cloud infra of a cloud computing startup, I’ve pretty much touched everything backend under the sun. Also I’ve been close with the enigma/SN team for 3.5 years and worked with them before.
Questions/Thoughts?