Blockchain platforms such as Ethereum and several others execute complex transactions in blocks through userdefined scripts known as smart contracts. Normally, a block of the chain consists of multiple transactions of smart contracts which are added by a miner. To append a correct block into the blockchain, miners execute these transactions of smart contracts sequentially. Later the validators serially re-execute the smart contract transactions of the block. If the validators agree with the final state of the block as recorded by the miner, then the block is said to be validated. It is then added to the blockchain using a consensus protocol. In Ethereum and other blockchains that support cryptocurrencies, a miner gets an incentive every time such a valid block successfully added to the blockchain. In the current era of multi-core processors, by employing the serial execution of the transactions, the miners and validators fail to utilize the cores properly and as a result, have poor throughput. By adding concurrency to smart contracts execution, we can achieve better efficiency and higher throughput. In this paper, we develop an efficient framework to execute the smart contract transactions concurrently by miner using optimistic Software Transactional Memory systems (STMs). The miner proposes a block which consist of set of transactions, block graph, hash of previous block and final state of each shared data-objects. Block graph captures the conflicting relations among the transactions. Later, the validators re-execute the same smart contract transactions concurrently and deterministically with the help of block graph given by miner to verify the final state. If the validation is successful then proposed block appended into the blockchain and miner gets incentive otherwise discard the proposed block. We execute the smart contract transactions concurrently using Basic Time stamp Ordering (BTO) and Multi-Version Time stamp Ordering (MVTO) protocols as optimistic STMs. BTO and MVTO miner achieves 3.6x and 3.7x average speedups over serial miner respectively. Along with, BTO and MVTO validator outperform average 40.8x and 47.1x than serial validator respectively.
Subsequently, REF introduced the first framework for optimistic concurrent execution of smart contracts which leverages basic/multiversion timestamp ordering.
An Efficient Framework for Optimistic Concurrent Execution of Smart Contracts
arXiv: Distributed, Parallel, and Cluster Computing
Computer Science