Scripts & Virtual machines

COFFE Multichain will be the first and advanced platform for coordinating the delivery of authentic Actions to accounts. The details of the scripting language and the virtual machine relate to the implementation details which are mostly independent of the architecture of the COFFE Multichain technology. Any deterministic language or virtual machine that is properly assembled and has sufficient performance can be integrated with the COFFE Multichain software API.

Scheme-defined messages

All messages transmitted between accounts are determined by the scheme which is part of the blockchain consensus status. This scheme makes it easy to perform conversion between binary and JSON representation systems of Actions.

Scheme-defined database

The database status is also determined by a similar scheme. This ensures that all data stored by all applications is written in a format that can be interpreted into readable JSON, but is stored and processed with the efficiency of a binary language.

Separating authentication from the application

For maximum use of multisequencing capabilities and minimizing the computational debt associated with the regeneration of the application status from the transaction log, the COFFE Multichain software divides the verification logic into three sections:

  • Checking that the Action is internally consistent;
  • Verifying that all prerequisites are valid;
  • Changing the application status.

Checking the internal consistency of an Action has the Read Only status and does not require access to the blockchain status. This means that it can be performed with maximum parallelism. Checking prerequisites, such as the required balance, has the Read Only status and therefore can also benefit from parallelism. Only changing the application status requires the write access and must be processed sequentially for each application.

Authentication is a read-only process of verifying that an Action can be applied. In fact, the application does all the work on its own. Both calculations should be performed in real time, but as soon as the transaction is included in the blockchain, there is no need to perform authentication operations.

Independent virtual machine architecture

The idea of COFFE Multichain is that several virtual machines can be supported at the same time and new virtual machines are added as needed. For this reason, this paper will not provide details of any language or virtual machine. However, there are two virtual machines that are currently being considered for use in COFFE Multichain.

Web Assembly (WASM)

Web Assembly is a new web standard for building high-performance web applications. With a few small changes, the Web Assembly can be made deterministic and become a sandbox. The advantage of Web Assembly is the broad support from the industry and the fact that it allows the development of contracts in familiar languages such as C or C++.

Ethereum Virtual Machine (EVM)

This virtual machine has been used for most of the existing smart contracts and can be adapted to work with COFFE Multichain. It is quite possible that EVM contracts can be run within their own sandbox inside the blockchain on the COFFE Multichain software, and that with some adaptation, EVM contracts will be able to communicate with other applications on such a blockchain.

Still need help? Get in touch!
Last updated on 31st Dec 2021