| Since Nakamoto proposed the concepts of bitcoin and blockchain,the blockchain has attracted extensive attention.It has many advantages such as tamper-proof,data traceability and complete decentralization which makes it further applied to more fields,including finance,medical treatment,supply chain,government supervision,asset management,etc.However,from the view of transaction processing,the defect of low transaction throughput hinders a wild application prospect of the blockchain technology.Compared with traditional database systems,nodes in the blockchain system lack concurrency control over the execution of transactions,also there are massive redundant execution of transactions between nodes and a lack of parallel execution of transactions on the framework layer.In addition,the data storage on the blockchain increases day by day,resulting in a rapid increase in the expansion cost of the blockchain nodes.In order to solve these problems,in the thesis,we systematically analyze the transactionprocessing technology in blockchains,summarize transaction-processing frameworks and concurrency control protocols in blockchains that have proposed in recent years,and design an innovative blockchain transaction-processing framework,i.e.,Execute-Order-Re-execute&Validate(EOR)framework combining off-chain and on-chain technology.EOR reduces the cost of the storage and execution in on-chain nodes through off-chain storage and parallel execution between multiple groups.On-chain nodes only need sorting and fast verification of transactions,greatly reduces the expansion cost of nodes,and improves the scalability of blockchain system.The off-chain parallel execution between multiple groups makes the transaction-processing speed of the system increase linearly with the increase of the number of off-chain service providers,also reduces the number of redundant transaction executions.In order to speed up the transaction execution of nodes,in this thesis,we analyze the execution of nested contracts in blockchain,and puts forward the concept of concurrent execution of nested contracts.In the off-chain execution stage,A nested contracts execution protocol based on two-phase locking(NCEP-2PL)protocol is proposed to execute transactions and nested contracts within transactions concurrently.A data structure like the linked list called Lockchain is designed to record the information that transactions and contracts lock data.The protocol divides the calling relation between nested contracts into parent-child contracts and brother contracts.When concurrent conflicts occur between contracts with different relation,the contracts obtain locks by different rules.The parallel execution of transactions in groups results in concurrency conflicts between groups.In order to solve the problem,a ordering algorithm called MLC(Merge Lockchains)is proposed.MLC merges all Lockchains of the same conflicting data to find a serial sequence for transactions which have conflicts.In addition,in the verification phase,based on Lockchain,a conflict-free deterministic concurrency protocol,a nested contracts validation protocol based on lockchain(NCVP-LC)is proposed to quickly verify whether the off-chain execution of transactions is correct.NCVP-LC protocol uses Lockchain to find the correct version of data needed by each transaction,to avoid concurrent conflict caused by read and write operations of transactions.The experimental results show that the NCEP-2PL protocol proposed in the thesis has higher execution efficiency than the other concurrency control protocols when there are conflicts between transactions,and the NCVP-LC protocol greatly improves the speed of transaction verification.MLC sorting algorithm can quickly sort transactions with a very low abort rate of transactions when the conflict rate between groups is low. |