# MVP for encrypted state idea

**URL:** <https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316>\
**Category:** Secret Contracts and Secret Apps\
**Created:** [February 21, 2020, 7:03pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316 "2020-02-21T19:03:38Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avret](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/avret/32/603_2.png) [@Avret](https://forum.scrt.network/u/Avret)\
**Post date:** [February 21, 2020, 7:03pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/1 "2020-02-21T19:03:39Z")

</div>

Was the option of storing encrypted state on IPFS (and once a contract starts running, require it keep getting run by the same node to obviate the reencryption problem) ever considered? obv eventually you need your own networking, but this kills the problem for minimum viable?

---

<div class="post-metadata">

**Author:** ![assafmo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/assafmo/32/440_2.png) [@assafmo](https://forum.scrt.network/u/assafmo)\
**Post date:** [February 21, 2020, 7:38pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/2 "2020-02-21T19:38:46Z")

</div>

Yes, but networking outside of a blockchain is very much a problem.  
Each node must run each computation and reach the same result (consensus). Do all of them write to IPFS? What if some of the nodes are having networking issues? This also affects consensus. Plus reading & writing to IPFS will be much slower than to local HD.

---

<div class="post-metadata">

**Author:** ![Avret](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/avret/32/603_2.png) [@Avret](https://forum.scrt.network/u/Avret)\
**Post date:** [February 21, 2020, 7:40pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/3 "2020-02-21T19:40:54Z")

</div>

Have all nodes that are verifying compare their results to IPFS, and have encrypted state associated with points in a computation (relative memory locations in wasm should work) to provide staging points for verification if you want to do it that way? Alternatively have defined points to save out to IPFS and have them be relatively infrequent.  
Is reading/writing to IPFS worse than HD + p2p pullin?

---

<div class="post-metadata">

**Author:** ![assafmo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/assafmo/32/440_2.png) [@assafmo](https://forum.scrt.network/u/assafmo)\
**Post date:** [February 21, 2020, 7:48pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/4 "2020-02-21T19:48:49Z")

</div>

This is probably doable but I’m afraid networking issues with IPFS will just complicate things. Why do you think we shouldn’t use the storage given to us for free by tendermint?  
Also we want to keep things as simple as possible. If nodes would also be required to run an IPFS node to improve performance and network errors than it’s more complex and surely still slower then using the blocks as storage

---

<div class="post-metadata">

**Author:** ![Avret](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/avret/32/603_2.png) [@Avret](https://forum.scrt.network/u/Avret)\
**Post date:** [February 21, 2020, 7:50pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/5 "2020-02-21T19:50:03Z")

</div>

If you’re using the tendermint storage than that should work too trivially, i’m just not sure why you needed to rewrite enigmap2p then given that every node is using the same key – why can’t state be stored as easily as inputs in some massive global state-struct mapping contracts to param-spaces?

---

<div class="post-metadata">

**Author:** ![assafmo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/assafmo/32/440_2.png) [@assafmo](https://forum.scrt.network/u/assafmo)\
**Post date:** [February 21, 2020, 7:57pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/6 "2020-02-21T19:57:46Z")

</div>

We are not rewriting enigma-p2p, we are using tendermint as dpos blockchain+p2p+consensus.  
Too trivial?  
The massive global state struct you are referring to is already there. Going off-chain with storage would very much complicate consensus and any other decentralized solution will also hurt performance

---

<div class="post-metadata">

**Author:** ![Avret](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/avret/32/603_2.png) [@Avret](https://forum.scrt.network/u/Avret)\
**Post date:** [February 21, 2020, 7:59pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/7 "2020-02-21T19:59:25Z")

</div>

i meant ‘that should work too, trivially’  
I assumed the state struct wasn’t there, because encrypted state is being nixed for the current mainnet? if the struct’s there and there’s no need for new work on it, why is encrypted state not planned for the next feature release?

---

<div class="post-metadata">

**Author:** ![Avret](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/avret/32/603_2.png) [@Avret](https://forum.scrt.network/u/Avret)\
**Post date:** [February 21, 2020, 8:03pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/8 "2020-02-21T20:03:43Z")

</div>

Because i agree, given the existence of a p2p system, encrypted state should be pretty easy to do – so i assumed the reason it wasn’t planned for the upcoming release was bc that p2p layer was broken

---

<div class="post-metadata">

**Author:** ![assafmo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/assafmo/32/440_2.png) [@assafmo](https://forum.scrt.network/u/assafmo)\
**Post date:** [February 21, 2020, 8:06pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/9 "2020-02-21T20:06:54Z")

</div>

We want to release smaller deliverables than we used to. We feel that this way we’ll be more connected with the community,be more open and welcoming and get better feedbacks.

This Means more communications from us to you (like the recent posts from Guy, Can, Tor and James), and faster but smaller release cycles. 😊

---

<div class="post-metadata">

**Author:** ![Avret](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/avret/32/603_2.png) [@Avret](https://forum.scrt.network/u/Avret)\
**Post date:** [February 21, 2020, 8:08pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/10 "2020-02-21T20:08:52Z")

</div>

Oh, alright, if that’s the reason I’m cool with it 🙂 something something agile  
but that _really_ wasn’t clear from the roadmap post, good to have it clarified! (I assume encrypted outputs are similar?)

---

<div class="post-metadata">

**Author:** ![assafmo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/assafmo/32/440_2.png) [@assafmo](https://forum.scrt.network/u/assafmo)\
**Post date:** [February 21, 2020, 8:20pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/11 "2020-02-21T20:20:53Z")

</div>

Not so much agile, but this is what we believe the best way forward - communication and feedback.

Encrypted state, encrypted outputs, randomness, IBC… We prefer hearing from the community what’s more important to them that we do next than guessing it ourselves or doing all at once, which will take longer.

---

<div class="post-metadata">

**Author:** ![Avret](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/avret/32/603_2.png) [@Avret](https://forum.scrt.network/u/Avret)\
**Post date:** [February 21, 2020, 8:21pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/12 "2020-02-21T20:21:52Z")

</div>

Makes sense. What’s the timeline for first release/testnet, btw?

---

<div class="post-metadata">

**Author:** ![assafmo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/assafmo/32/440_2.png) [@assafmo](https://forum.scrt.network/u/assafmo)\
**Post date:** [February 21, 2020, 8:23pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/13 "2020-02-21T20:23:55Z")

</div>

Nothing concrete yet, you’ll know when we know 🤗

---

<div class="post-metadata">

**Author:** ![Avret](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.scrt.network/avret/32/603_2.png) [@Avret](https://forum.scrt.network/u/Avret)\
**Post date:** [February 21, 2020, 8:25pm UTC](https://forum.scrt.network/t/mvp-for-encrypted-state-idea/1316/14 "2020-02-21T20:25:06Z")

</div>

Well, I’ll have to keep an eye out
