Font Size: a A A

Two-phase Concurrent Execution For Smart Contracts

Posted on:2021-04-08Degree:MasterType:Thesis
Country:ChinaCandidate:S F PangFull Text:PDF
GTID:2428330620968179Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Although the emergence of the programmable smart contract makes blockchain systems easily embrace a wide range of industrial services,executing smart contracts serially with single thread becomes the new bottleneck gradually.How to enable concurrent smart contract execution poses a big challenge nowadays.Due to the existence of Byzantine nodes,the mechanism of executing smart contracts is quite different from which in database systems.Therefore,existing mature concurrency control protocols in database systems cannot be employed directly.For general blockchain systems,smart contract execution follows a two-phase style,i.e.,the primary node executes a batch of smart contracts in the first phase and the validators replay them in the second phase.Existing parallel solutions merely focus on the optimization for the first execution phase,rather than including the second execution phase.In this thesis,we propose a novel efficient concurrency control scheme,2PX(Two-Phase Execution),which is the first one to make optimization for both phases.Specifically,when integrated with three-phases consensus protocols like PBFT,we further optimize 2PX in terms of validator replay and implement the optimized protocol in an open-source Byzantine fault tolerance system.Our contributions are listed below:1.We propose a two-phase concurrency control protocol that gives consideration to both the primary and validators.In the first phase,we give a variant of OCC protocol utilizing transaction reordering to improve the concurrent execution efficiency for the primary and produce a transaction dependency graph with high parallelism for validators.2.A graph partition algorithm is devised to divide the original transaction dependency graph into small pieces.This kind of medium-granular schedule information preserves parallelism close to the maximum and further reduce the communication cost.In the second phase,our presented deterministic OCC protocol(De OCC)is benefiting from the partitioned transaction dependency graph to replay all smart contracts efficiently on multi-core validators.3.We implement a multi-threaded prototype for 2PX and conduct thorough evaluations in the terms of thread number,transaction count and subgraph number.The features of PBFT,including three rounds of communications and one-third fault tolerance rate,are considered to make further optimization for 2PX.We implement the optimized 2PX in open-source BFT-SMa Rt and evaluate it in a distributed setting.The 2PX protocol and its optimization introduce parallelism to blockchain smart contracts,juggle both execution phase and boost the utilization of multi-core CPU to improve overall throughput.
Keywords/Search Tags:Blockchain, Smart contract, Concurrency control
PDF Full Text Request
Related items