TY - GEN
T1 - Adding concurrency to smart contracts
AU - Dickerson, Thomas
AU - Gazzillo, Paul
AU - Herlihy, Maurice
AU - Koskinen, Eric
N1 - Publisher Copyright:
© 2017 Association for Computing Machinery.
PY - 2017/7/26
Y1 - 2017/7/26
N2 - Modern cryptocurrency systems, such as Ethereum, 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. Smart contract benchmarks run on a JVM with ScalaSTM show that a speedup of 1.33x can be obtained for miners and 1.69x for validators with just three concurrent threads.
AB - Modern cryptocurrency systems, such as Ethereum, 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. Smart contract benchmarks run on a JVM with ScalaSTM show that a speedup of 1.33x can be obtained for miners and 1.69x for validators with just three concurrent threads.
UR - http://www.scopus.com/inward/record.url?scp=85027842381&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85027842381&partnerID=8YFLogxK
U2 - 10.1145/3087801.3087835
DO - 10.1145/3087801.3087835
M3 - Conference contribution
AN - SCOPUS:85027842381
T3 - Proceedings of the Annual ACM Symposium on Principles of Distributed Computing
SP - 303
EP - 312
BT - PODC 2017 - Proceedings of the ACM Symposium on Principles of Distributed Computing
T2 - 36th ACM Symposium on Principles of Distributed Computing, PODC 2017
Y2 - 25 July 2017 through 27 July 2017
ER -