ZeroDock
Github: Repository Link
The goal of ZeroDock is to offer developers a streamlined and abstracted way to run any off-chain code (think API Calls, Data Aggregation Tasks, Machine Learning etc) in their own Docker container in response to any smart contract event emitted on any blockchain, while having a verifiable way to prove (via SNARKS) that the code executed exactly how the developer intended.
Thus ZeroDock is essentially creating a Web3 to Web2 bridge for compute and ultimately scaling the possibilities of what applications can do within the Web3 ecosystem.
Heres how it works:
1) The developer builds & pushes a Docker container up to the ZeroDock platform (this can be as simple as return 1 + 1), this container can perform a task in whatever language and do whatever compute task the developer desires.
2) In the ZeroDock web app, the user inputs a Smart Contract address, Chain and the Name of the event that want to associate that container with. This can be any smart contract.
3) The ZeroDock platform subscribes (via websockets) to events coming from the above smart contract and listens out for targeted events, as soon as the smart contract has emitted the targeted event, the Docker container that is associated with it is immediately executed by the ZeroDock platform with the args from the event being passed to the function as context.
4) Since the ZeroDock platform is off-chain we need to verify that we executed the code correctly and with the arguments (from the event) as intended by the user. We do this by creating a SNARK of the Transaction Hash that the event belong to (which is public data) and the Docker Image Digest (SHA) that is private data only known to the Developer.
5) We compute the Transaction Hash + Docker SHA into Scalar types and run those through a circuit (we use Bellman in Rust) to create a proof. We then store the Proof on chain along with its public inputs. That way, anyone who wants to verify the execution of the code can do so either by using our verifying key along with the proof and public inputs, or they can verify the execution in the ZeroDock web app itself. None of the outputs or the private data is known to anyone else.
In conclusion, we have created a way that allows for the most common and well known developer tool (Docker) to be used in a way that extends the possibilities within the Web3 space. Any type of compute can now be bundled up into a container, pushed into the ZeroDock platform and can be immediately executed based on smart contract events. The best part is that every single execution creates a SNARK that is stored on chain (in calldata) and can be verified to prove that the execution of a specific Docker container against a specific transaction was exactly what the developer intended.