Turn IPFS(File System) into new IPFS(Function as a Service) by adding some TEA.

Kevin Zhang — the Sweeping Monk
11 min readNov 16, 2020

Unlimited reading link for this article Teaproject.org

IPFS is awesome! It allows you to store your code or data in the middle of nowhere. When you need them, you can get it from somewhere you do not really care about. You can verify the hash to make sure this is exactly what you request. How cool is that!

However, it is just a File System so far. If you need to run your code, you probably have to load the code from IPFS to some centralized cloud services (Amazon, Google, etc.) first. If you could run your code directly in an IPFS node, you will need to get the result directly, so that you saved your code a side trip to computing servers. You do not really need the code; what you need is the result, right?

How do I know the result is correct?

If you were getting a piece of data from IPFS, you do not worry too much about the correctness of the result. You can easily verify the result by hashing it. The CID should match. But if you get a result of a computation of a piece of code and a piece of data, you do not know the result yet, not to mention the hash of the result. How do you verify?

A quick answer: You do not

Since you do not know the hash of the correct result, you cannot verify using the traditional way, and you do not need to. What you can verify is the Proof of Trust (we call it PoT, Tea-Pot). The PoT is simply a series of valid proof of how your code or data is processed in the T-rust network. The math and silicon physics protects the computation process so that as long as you can verify the PoT, you can trust the correctness of the result.

BTW, if you are new to my channel, T-rust is a d-App platform built by the TEA project team. To learn more about TEA and T-rust, go to HTTP://t-rust.com website and try the demo.

How does it work? Basically?

A typical IPFS network with four nodes works like this:

Sorry, I try to make the illustration as simple as possible. I know IPFS is more complicated than that, but my point is not there.