Covalent Protocol technical deep-dive Part 2: Covalent Virtual Machine

in covalent •  6 years ago 

Main_Image.png

In part 1 of my Covalent Protocol technical deep-dive series, I elaborated on the integration of a Trusted Execution Environment (TEE). In this second part, I will be discussing the Covalent Virtual Machine and in part 3, Covalent’s ecosystem and data marketplace will be discussed. However, before we dive deep into what the Covalent Virtual Machine is, let me briefly introduce the Covalent Protocol project.

Covalent, a brief introduction
Covalent is a privacy-protected, decentralized computing platform and protocol. Covalent’s aim is to provide a distributed network computing layer that is able to extract and analyse information from data without compromising privacy. Currently, a lot of data is available on the internet; however, only a small percentage of this data is actually being used. One reason why this is the case has everything to do with data privacy. In the current situation when you put data on the internet you risk losing control and ownership of this data. For instance, third-parties, such as Facebook and Google may end up owning your data instead of you. Another reason why only a small percentage of the data is being utilized is the lack of monetary compensation. Nowadays people are not being fairly compensated for the use of their data. For instance, companies can keep re-using or re-selling your data, without compensating you at every stage of the dissemination or usage process.

Covalent Protocol strives to solve these problems by improving upon the current internet through developing what they call a decentralized web 3.0. The Covalent Protocol allows for smarter use of data by extracting and analysing only specific information from data, without compromising on privacy. Since Covalent makes use of smart contracts (called smart policies), special requirements can be set before the data can be used. Also, the use of data within the Covalent network is traceable, ensuring that data owners will be compensated each time their data is being used by third parties. To accomplish this, Covalent will implement the following three main features: a Trusted Execution Environment (TEE), the Covalent Virtual Machine (CovaVM), and a Data Marketplace.

In part 1 of this technical deep-dive series I explained Covalent’s trusted execution environment and in this part I will try to provide a better understanding of the CovaVM and Centrifuge, the language associated with the CovaVM.

Covalent Virtual Machine
Covalent is developing the CovaVM to improve upon Ethereum’s virtual machine and will allow for large-scale computations. CovaVM is being developed based on the OpenJDK implementation of the Java Virtual Machine (JVM). To ensure a secure and strong platform, JVM will be utilized as the foundation of the CovaVM. The benefit of using JVM as a basis is two-fold. Firstly, by developing on top of an existing and mature platform, CovaVM benefits greatly from a body of proven security practices. Secondly, the Java platform is compatible with various prevalent programming languages (e.g. Python, JavaScript and Ruby).

Computations within the CovaVM are highly scalable because each computation is preformed off-chain by a single node through a smart policy (aka smart contract), with all the other nodes in the network only needing to verify a proof of the computation. Since the task of verifying a computation is inherently faster than repeatedly conducting the computation, the speed at which computations can be performed is largely increased.

Centrifuge
Centrifuge is the programming language that will be used by to write smart contracts. Centrifuge can be compared to Solidity, in the sense that Ethereum uses Solidity to write smart contracts, whereas Covalent utilizes Centrifuge to write Smart Policies. Centrifuge builds upon earlier endeavours to create policy-enhancement models (e.g. Naccio, PoET/Pslang and Polymer). Whereas these previous attempts were very general and broad in scope, the scope of the Centrifuge programming language is more narrow and specifically designed for defining data policies.

Interaction between Centrifuge and CovaVM
To explain the interaction between the Centrifuge programming language and the CovaVM, let’s follow the four steps illustrating how smart policies, written in Centrifuge, are enforced by the CovaVM.

CovaVM_architecture.png

Step 1: Users can write and compile a smart policy using Centrifuge. The compiler than translates the Centrifuge code to CovaVM bytecode instructions.

Step 2: The data owner must create a securely encrypted package that includes both the data and the smart policy. The Covalent Protocol helps the data owner by providing useful tools and interfaces to streamline this step.

Step 3: On the compute node the created smart policy will first be loaded to the CovaVM in order to configure its execution settings and upload the initial policy compliance state. The CovaVM inherently understands the meaning of the smart policy and automatically assigns the trusted execution environment to monitor the activity of the Smart Policy.

Step 4: If all the requirements of the smart policy are met, the protected data received from the smart policy are loaded and integrated into the consumer’s application.

Within the CovaVM the runtime monitor listens for events and actions defined in the Action Definition File and broadcasts the information to the Smart Policy, which than can interrupt the program if it detects a violation of the usage policy.

Concluding summary
To recap, Covalent is developing the CovaVM to improve upon Ethereum’s virtual machine. In addition, Covalent has developed Centrifuge, a language for writing smart policies that is designed to take advantage of the enhanced functionality of the CovaVM. Computations within the CovaVM are highly scalable because each computation is preformed off-chain by a single node via a smart policy, with all the other nodes in the network only needing to verify a proof of the computation.

I hope this article provided a clear understanding regarding the COVA virtual machine. In my next article we will be diving deeper into Covalent’s ecosystem and data marketplace. If you have questions about Covalent’s trusted execution environment or Covalent’s other technical features, you can always send me a message.

Sources for more information on Covalent:
Website: http://covalent.ai/index.html
Whitepaper: https://docsend.com/view/dvvb75n
Telegram: https://t.me/covalentofficial
Twitter: https://twitter.com/covatoken
Blog: https://medium.com/@covatoken
Github: https://github.com/covalent-hq

Full disclosure: This article is not intended as investment advice. It is just my personal opinion about the Covalent project. You should always do your own research #DYOR. I am part of “the article group” which rewards me for writing this article and encourages me to express my own opinions.

Subscribe to my channels Medium, Twitter and Steemit if you enjoy my articles and would like to be informed about blockchain, cryptocurrency projects and news. You can also read my articles on LinkedIn.

CryptoShowdown

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!