Analysis of the core technology of QNG network: MeerEVM

Qitmeer Network
6 min readOct 7, 2023

--

🚀👨‍💻Qitmeer Network is a PoW public blockchain network, whose underlying design integrates the BlockDAG (MeerDAG) consensus protocol with the UTXO data model. Since the launch of the testnet phase, it has been running stably for four years.

What is a QNG network ?

The QNG network represents the latest generation evolution network of the Qitmeer Network, built on its unique underlying design, integrating the MeerDAG consensus protocol with the MeerEVM container layer, aiming to provide a new generation of implementable networks with higher performance, stronger security, and wider scalability.

🫀MeerEVM is the core component of the QNG network, as a pluggable smart contract execution engine, it is driven by the MeerDAG consensus protocol and perfectly integrated into the underlying Meer network in a container manner, providing developers with an efficient smart contract execution environment and promoting the development of scalability and cross-chain interoperability.

Structure diagram of QNG network

Why introduce MeerEVM ?

To understand why MeerEVM was introduced, we need to focus on a complex challenge in the blockchain field, which is the “impossible triangle” between scalability, security, and network performance. In this challenge, it is difficult to achieve the best state of all three aspects at the same time. Especially when the underlying BlockDAG structure is adopted, although it helps to achieve state-based smart contracts, it may also introduce more complexity and sacrifice the security and performance of the network.

🗼In order to solve this problem, we adopted the design decision of “cross-chain container layer”. The core idea of this design decision is to pursue compatibility with Ethereum smart contracts while maintaining the security and performance of the underlying network, thereby expanding the application scenarios and ecosystem of Qitmeer Network. The cross-chain container layer design can be seen as a solution to solve the complex trade-off between scalability, security, and network performance.

Smart Contract + Cross-Chain Container Layer

It is worth noting that we have also reserved the possibility of developing our own QVM (Qitmeer Virtual Machine) system in the future to further meet the needs and development of the network. This initiative aims to ensure that Qitmeer Network continues to adapt to the constantly changing blockchain ecosystem.

The core advantages of MeerEVM

MeerEVM, as a key component of the Qitmeer ecosystem, expands its Application Area and ecological value, achieving interoperability with the Ethereum ecosystem. It adopts a common EVM standard to achieve seamless interoperability between multiple chains. Its core advantages include.🚘

Cross-Chain interoperability

🚀Cross-chain interoperability plays an important role in the QNG network. The QNG network adopts an innovative container system, including a unique central cross-chain protocol (Meerlink Protocol). This protocol allows for seamless transfer of assets between different network layers. This means that Meer Coin can exist in two different states: one as a UTXO on the main chain, and the other as an Account Balance in MeerEVM. These two states are equivalent and can be exchanged 1:1 at any time. We call this channel MUB Channel.

Meerlink Protocol

This design significantly improves the compatibility and scalability of the network. It not only supports running EVM-compatible virtual machines on the blockchain network, but also accommodates more other containers, bringing more potential and possibilities for the future development of the network. This cross-chain interoperability provides a strong foundation for asset flow and interaction between different blockchain levels, helping to promote the prosperity of the entire ecosystem.

Transaction synchronization consensus mechanism

🚁In addition, the QNG network has introduced a transaction synchronization consensus mechanism. Through MeerContract, each contract transaction is synchronized consensus on the Meer network to ensure state synchronization between different networks. This mechanism can be regarded as a transaction connection mechanism, similar to a dispatcher in a transportation system. Its task is to guide transaction data from EVM to the transaction flow of the MeerDAG consensus algorithm, thereby achieving cross-chain data flow processing and coordination.

Cross-chain consensus process of EVM transaction data flow

MeerEVM Module

🚧MeerEVM fully inherits the general standards of EVM and is mainly divided into three modules: compile contract module, Ledger module, and MeerEVM execution module.

Compile contract module

This module mainly encapsulates the underlying Solc compiler and provides an RPC interface that can be used by external services. Its main function is to compile smart contracts written in Solidity language. After compiling, it will return binary code and the corresponding contract ABI (ABI can be understood as the contract manual).

To better illustrate, we can use a contract that has been created and deployed in the Qitmeer browser as an example to show how to query the compiled and deployed contract information. The following is detailed information about the contract: https://evm.meerscan.io/address/0x6D367Fbd6d6a7Bae9f2802B2187e5aFa9f3F52dc/contracts#address-tabs

The above picture is a token contract address page, where you can see the types of tokens held, token transfer records, total gas usage, etc. Below is a Code title, as shown in the figure below, where you can see the version of the compiler, token name, EVM version, and so on.

Then slide down the browser page to see the source code and ABI contract of the contract, as shown in the following figure.

Ledger Module

The Ledger module mainly modifies and updates the blockchain account system. There are two types of accounts, namely ordinary account (EOA) and smart contract account. If the caller knows the contract account address, they can call the contract. Each modification of the account will be recorded on blockchain.🎠

There are two misunderstandings here:

Contract address and ordinary address

The biggest difference between a contract address and a regular address is that the contract address does not have a private key. The contract address is managed by the created address through contract calls.

Native currencies do not have contract addresses, such as ETH and MEER. They are mainly used to pay transaction fees on the blockchain network to encourage miners to package and confirm transactions, thereby ensuring the security of the network. Transaction fees, as an economic incentive, help maintain the normal operation and development of the network. Only tokens created on the blockchain network have the concept of contract addresses, such as UNI tokens on Ethereum or WMEER tokens encapsulated on Qitmeer.

MeerEVM Execution Module

The MeerEVM execution module, as the core module, mainly functions to parse and execute smart contract code in transactions. It is generally divided into two parts: creating contracts and calling contracts.

Core components of MeerEVM module

Instructions set

MeerEVM has a complete Instruction Set Architecture, including instructions for various operations, process control, memory access, etc., for executing smart contracts.

Instructions set

Memory

MeerEVM has a virtual memory space for storing and processing data in smart contracts.

memory

Stack

MeerEVM uses a stack to manage data, it can push and retrieve data at the top of the stack and execute various instructions.

Stack

Scripting language interpreter

MeerEVM includes a scripting language interpreter that can read the bytecode of smart contracts and execute their instructions.

State management

MeerEVM is also responsible for managing the state of smart contracts, including storing and reading data in contracts, as well as modifying the state of contracts.

State management

Transaction processing

MeerEVM can read and process transactions, parse transaction data into bytecode, and execute corresponding instructions in smart contracts.

Transaction Processing

--

--

Qitmeer Network
Qitmeer Network

Written by Qitmeer Network

Qitmeer Network is the next generation payment network infrastructure based on BlockDAG technology.

No responses yet