Adding concurrency to smart contracts

Modern cryptocurrency systems, such as the Ethereum project, permit complex financial transactions through scripts called smart contracts . These smart contracts are executed many, many times, always without real concurrency. First, all smart contracts are serially executed by miners before appendin...

Full description

Saved in:
Bibliographic Details
Published in:Distributed computing Vol. 33; no. 3-4; pp. 209 - 225
Main Authors: Dickerson, Thomas, Gazzillo, Paul, Herlihy, Maurice, Koskinen, Eric
Format: Journal Article
Language:English
Published: Berlin/Heidelberg Springer Berlin Heidelberg 01-06-2020
Springer Nature B.V
Subjects:
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:Modern cryptocurrency systems, such as the Ethereum project, permit complex financial transactions through scripts called smart contracts . These smart contracts are executed many, many times, always without real concurrency. First, all smart contracts are serially executed by miners before appending them to the blockchain. Later, those contracts are serially re-executed by validators to verify that the smart contracts were executed correctly by miners. Serial execution limits system throughput and fails to exploit today’s concurrent multicore and cluster architectures. Nevertheless, serial execution appears to be required: contracts share state, and contract programming languages have a serial semantics. This paper presents a novel way to permit miners and validators to execute smart contracts in parallel, based on techniques adapted from software transactional memory. Miners execute smart contracts speculatively in parallel, allowing non-conflicting contracts to proceed concurrently, and “discovering” a serializable concurrent schedule for a block’s transactions, This schedule is captured and encoded as a deterministic fork-join program used by validators to re-execute the miner’s parallel schedule deterministically but concurrently. We have proved that the validator’s execution is equivalent to miner’s execution. Smart contract benchmarks run on a JVM with ScalaSTM show that a speedup of 1.39 × can be obtained for miners and 1.59 × for validators with just three concurrent threads.
ISSN:0178-2770
1432-0452
DOI:10.1007/s00446-019-00357-z