Ethereum is still working on a complementary plan for parallel EVM, but Bitcoin could soon expect its own layer 2 of parallel VM.
Let's first understand why Ethereum cannot achieve parallel EVM.
To maintain network consistency and security, EVM has a crucial feature in its design: transactions are executed sequentially. Sequential execution ensures that transactions and smart contracts can be executed in a deterministic order, making it easier to manage and predict the state of the blockchain. This design choice prioritizes security, thereby reducing the potential complexities and vulnerabilities associated with parallel execution. However, under high transaction request loads, this sequential execution can cause network congestion and delays, similar to a single-lane highway.
Is it possible to simply add channels? Referencing existing so-called parallel VM solutions, including partitioning chains like Near. These chains proposed to evolve the blockchain by introducing more virtual machines to evolve smart contracts. Essentially, the workload of a smart contract always resides in a certain VM. If all smart contracts in this chain consume an equal amount of TPS, then the problem is solved. However, if only a few contracts, such as the Aave and Uniswap protocols, consume more than 90% of the block space, having contracts running on a single shard only means scaling at the chain level without benefiting from the improvements brought by the sharding. Adding lanes without the ability to change lanes represents the current dilemma of virtual machine parallelization.
Parallel EVM involves cutting or caching data at the data layer. However, limited by the programming model of EVM, Solidity, as the most popular smart contract programming language, cannot maximize the potential of parallel blockchain architecture. This is like not programming with SQL on the NVIDIA GPU. Solidity lacks expressions for parallel architectures like Relay Execution and has no final atomicity defined for parallel transactions.
True parallelism in blockchain architecture requires achieving the result that transactions in a smart contract can execute simultaneously across multiple virtual machines. A programming model such as CUDA is necessary to take full advantage of a parallel model in blockchain architecture.
BitReXe mentions that Bitcoin introduces Turing-complete parallel VM layer 2 to provide infrastructure support underlying real-world applications in the Bitcoin ecosystem and a proprietary programming model for parallel VMs, PREDA.
How BitReXe achieves parallel Vms on Bitcoin
Parallel virtual machines
The following illustration highlights the distinctions between BitReXe and other initiatives promoting parallel virtual machines. As shown in the leftmost segment of the figure, Ethereum adheres to a single-machine state model, in which all code (smart contracts) and state (data) are replicated and managed by each blockchain node through its Ethereum virtual machine (EVM). Existing projects use parallel EVMs, as shown in the middle section of the figure, where a single smart contract is deployed on a dedicated VM (or VMs within a designated partition to maintain consensus). All transactions relating to the smart contract are processed by the VM (or VMs in the shard in a fully duplicated manner).
In BitReXe's unified parallelization model, as shown in the rightmost segment of the figure, all smart contracts are deployed to all virtual machines in the network. The states of a smart contract are partitioned and distributed across distinct VM instances, ensuring non-overlapping allocation. As a result, smart contract transactions are segmented and distributed for independent and parallel processing on virtual machines. In the ideal case, this approach facilitates linear scaling of overall transaction throughput and state capacity with an increasing number of virtual machines.
The main challenge lies in efficiently managing dependencies between execution logic (code) and contract state (data) while allowing independent execution of VMs and avoiding synchronization, since the overall execution logic d A transaction may involve access to multiple contract state segments, each residing in separate virtual machines after state partitioning.
PREDA
We present the distributed architecture with parallel relay execution (PREDA), a revolutionary programming model designed to extend smart contracts on sharding blockchains, parachain systems and layer 2 blockchains. PREDA supports parallel architecture: if Solidity for Ethereum is likened to programming on a processor single-core, the parallel architecture of PREDA for BitReXe is similar to CUDA for the NVIDIA GPU.
The PREDA model introduces two key components: (1) “Programmable contract scopes”, allowing programmers to define the partitioning of contract state based on the application's data access pattern, reducing the range of access to data and minimizing data dependency; and (2) “Asynchronous Functional Relay,” allowing programmers to articulate transaction logic with implicit data dependencies for flexible execution across multiple execution engines (VMs). Implemented as an extended Solidity language, PREDA includes additional syntax for programmable contract scopes and instructions for asynchronous functional relaying.
The figure illustrates the PREDA version of a simplified ERC20 contract. The “@address” keyword defines the scope of user balances, equivalent to Solidity's map definition but specifies fine-grained, separable states for address partitioning. At runtime, address-partitioned states are managed by a set of virtual machines in the BitReXe chain. Different states are not managed by different sets of virtual machines. The transfer function in the “@address” scope, invoked by payers (i.e. the addresses of users initiating transfer transactions), initiates a “relay” for deposit to the payee. This relay, executed by a VM hosting the beneficiary's address states, adds funds to the beneficiary's balance.
In PREDA, a smart contract can have multiple scopes with defined variables and functions. Multiple functions and variables of arbitrary types, including containers, can be defined within a scope. Multiple relays, conditionally or unconditionally, can be initiated in a single function call, enabling recursive initiation and allowing the flow of transaction execution to be moved over multiple hops between different VM instances. This relay execution approach decomposes a transaction into multiple micro-transactions, ensuring limited access to state in a single virtual machine and avoiding race conditions. In the PREDA smart transfer contract, breaking down the transaction into a “withdrawal” micro-transaction and a “deposit” micro-transaction allows these two types of micro-transactions to be executed in parallel, as long as their targets (the addresses in occurrence) are mapped to different virtual machines.
BitReXe organizes virtual machines into multiple consensus groups, each independently running a consensus protocol (based on PoW in the implementation) to achieve consensus on executed transactions. Consensus within the group is implemented to maintain the correctness and consistency of asynchronous functional relays, implemented as relay transactions in BitReXe.
Bitcoin Layer 2
The paradigm of issuing assets on the Bitcoin layer like listing constantly exploits a vulnerability in Bitcoin, Luke explains. While money never sleeps, just like registrations can never die. Bitcoin desperately needs a truly scalable Layer 2 that can relieve such pressure and prevent the size of the ledger from growing too quickly, which would weaken decentralization. It is very unlikely that such a goal could be achieved by an EVM+Bridge solution.
BitReXe offers parallel VMs and PREDA to scale bitcoin. In the meantime, it adapts to the security of Bitcoin. It uses BTC as a gas fee, shares the security of Bitcoin, and provides trustless asset settlement between the two chains.
BitReXe reuses the Bitcoin network's hash computing power that is carried by on-chain blocks, orphan blocks, and premature blocks as proof of work to create valid blocks in the Layer 2 network without modifying the Bitcoin protocol. Fusion miners receive rxBTC as a reward, a bitcoin indexed 1:1 on the BitReXe network. Users pay gas fees with rxBTC for transactions, interaction with smart contracts, and other on-chain activities. Fullnodes Lab, the development team of PREDA and BitReXe, is set to introduce a trustless asset settlement bridge solution between Bitcoin and BitReXe, where the rxbtc peg is at the same time someone's BTC peg 'A. Official home addresses are no longer necessary, so the trust assumption is eliminated.
Our high expectations for the Bitcoin ecosystem come from its ability to solve problems that Ethereum – as Bitcoin's testnet – has not solved.
@Bit_ReXe believes that this problem stems from the lack of parallel EVM mechanisms leading to the blockchain trilemma and aims to solve it directly on Bitcoin Layer 2.
If this problem can be solved on Bitcoin, then benchmarking TVL or even surpassing Ethereum by more than three times on Bitcoin Layer 2 would present a fundamental breakthrough.
This is a guest post from BitPnova. The opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or Bitcoin Magazine.