Cardano Virtual Machines On KVM and IELE Testnets
Cardano proposes a flexible platform with an enhanced balance within its ecosystem. It allows other systems integration and meets users' expectations. In spite of other similar projects, Cardano does not propose a single whitepaper. It rather presents a set of articles on particular subjects. Such an approach helps Cardano cover various topics of interest.
These topics include separate layers for calculation and accounting, a modular structure, an academic cross-disciplinary approach, low time delays between proposals and implementation, a convenient upgrade model, stakeholders involvement, multiple accounts per ledger, extended versions compatibility, etc. One of significant results is the double virtual machine environment. As of November 2018, it can be used on the testnet.
Any project that seeks to avoid software-based errors, requires prompt verification and testing. Common testnets exist for all major projects like Bitcoin, Ethereum, EOS, and others. Cardano has its own testnet portal as well. It was firstly launched on May 2018. Any developer willing to try Cardano, can join the testnet. There is a lot of useful information and instructions for the portal participants. Since there are two virtual machines proposed by Carnado, the corresponding testnet is divided into two parts.
The first testnet is intended to be used by the KEVM. This is the implementation of K-frame modeling for the Ethereum Virtual Machine (EVM). Just like the original EVM, its allows running smart contracts. The second testnet is designed for the IELE. The IELE is a platform similar to LLVM, a universal system of software analysis, transformation and optimization. It has formal semantics, enhanced performance and strengthened security. Cardano developers promise to launch more testnets if this will be necessary. To improve the proposed solutions and their components, the project team is open to feedback from community members.
Both testnets are fully functional in order to provide maximum opportunities to check the functionality of desired smart contracts. Participants are to know Solidity smart contracts writing concept. Predesigned smart contracts are desired to be properly tested. Technical requirements also exist. Both testnets run via Java Virtual Machine installed on a client. Some memory and performance restrictions can be found as well.
K-Framework For Ethereum Virtual Machine
As it was mentioned above, the KEVM applies a K frame solution to the EVM. “K” is framework intended to create executable semantics to define programming languages, type systems and formal analysis tools. This helps improve readability of a software code and adds program formal verification. It uses notation similar to Backus-Naur form, or Backus normal form (BNF). Basically, this approach allows defining a language on a formal basis with all positive consequences.
By definition, any language implementation with the K frame is correct-by-construction. Thus, all programs written for the EVM implementation may be probed for errors before execution. In all other ways, the KEVM is similar to the EVM, including smart contracts structure, functionality and distributed applications implementation. Instruction processing is based on stack rather than on registers. All necessary resources for testnet operation can be received after a correspondent faucet request.
A standard Ethereum Classic client called Mantis is used to interact with the KEVM.
IELE Virtual Machine
The IELE is a virtual machine developed by Cardano for its blockchain protocol. It is capable of smart contracts execution. It has a formal verification approach in its basis that improves security and automatically checks for correctness. Smart contracts here are also written in the Solidity language.
Contrary to the KEVM, the IELE uses a register-based approach. This allows more optimization tools to be used with a greater gas cost prediction accuracy. Contracts understanding and implementation simplicity are increased thanks to the LLVM likeliness. Formal contracts specifications might be written, verified and implemented due to such approach. The same is true for debugging processes.
The Cardano team has made a great job to develop the presented framework with all its properties. Two virtual machines with some similarities and differences allow creating multifunctional smart contracts. Of course, is doesn’t mean that developers should be unaware of common programing methods. Since Solidity is still under development there might be significant changes in its operations.