A theory of transaction parallelism in blockchains

Decentralized blockchain platforms have enabled the secure exchange of crypto-assets without the intermediation of trusted authorities. To this purpose, these platforms rely on a peer-to-peer network of byzantine nodes, which collaboratively maintain an append-only ledger of transactions, called blockchain. Transactions represent the actions required by users, e.g. the transfer of some units of crypto-currency to another user, or the execution of a smart contract which distributes crypto-assets according to its internal logic. Part of the nodes of the peer-to-peer network compete to append transactions to the blockchain. To do so, they group the transactions sent by users into blocks, and update their view of the blockchain state by executing these transactions in the chosen order. Once a block of transactions is appended to the blockchain, the other nodes validate it, re-executing the transactions in the same order. The serial execution of transactions does not take advantage of the multi-core architecture of modern processors, so contributing to limit the throughput. In this paper we develop a theory of transaction parallelism for blockchains, which is based on static analysis of transactions and smart contracts. We illustrate how blockchain nodes can use our theory to parallelize the execution of transactions. Initial experiments on Ethereum show that our technique can improve the performance of nodes.

[1]  Somesh Jha,et al.  Smart Contracts and Opportunities for Formal Methods , 2018, ISoLA.

[2]  Vitalik Buterin A NEXT GENERATION SMART CONTRACT & DECENTRALIZED APPLICATION PLATFORM , 2015 .

[3]  Massimo Bartoletti,et al.  A formal model of Bitcoin transactions , 2018, IACR Cryptol. ePrint Arch..

[4]  Arthur Gervais,et al.  Quantifying Blockchain Extractable Value: How dark is the forest? , 2021, 2022 IEEE Symposium on Security and Privacy (SP).

[5]  Maurice Herlihy,et al.  Adding Concurrency to Smart Contracts , 2017, PODC.

[6]  Ilya Sergey,et al.  Safer smart contract programming with Scilla , 2019, Proc. ACM Program. Lang..

[7]  Massimo Bartoletti,et al.  SoK: unraveling Bitcoin smart contracts , 2018, IACR Cryptol. ePrint Arch..

[8]  Massimo Bartoletti,et al.  A True Concurrent Model of Smart Contracts Executions , 2019, COORDINATION.

[9]  Daniel Davis Wood,et al.  ETHEREUM: A SECURE DECENTRALISED GENERALISED TRANSACTION LEDGER , 2014 .

[10]  Sumit Gulwani,et al.  Inferring locks for atomic sections , 2008, PLDI '08.

[11]  Ilya Sergey,et al.  Practical smart contract sharding with ownership and commutativity analysis , 2021, PLDI.

[12]  Maurice Herlihy,et al.  An Empirical Study of Speculative Concurrency in Ethereum Smart Contracts , 2019, Tokenomics.

[13]  Ari Juels,et al.  Flash Boys 2.0: Frontrunning in Decentralized Exchanges, Miner Extractable Value, and Consensus Instability , 2020, 2020 IEEE Symposium on Security and Privacy (SP).

[14]  Sweta Kumari,et al.  An Efficient Framework for Optimistic Concurrent Execution of Smart Contracts , 2018, 2019 27th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP).

[15]  João Lourenço,et al.  Efficient and Correct Transactional Memory Programs Combining Snapshot Isolation and Static Analysis , 2011 .

[16]  S. Nakamoto,et al.  Bitcoin: A Peer-to-Peer Electronic Cash System , 2008 .

[17]  Rainer Böhme,et al.  Detecting Token Systems on Ethereum , 2018, Financial Cryptography.

[18]  Antoni W. Mazurkiewicz,et al.  Basic notions of trace theory , 1988, REX Workshop.

[19]  Massimo Bartoletti,et al.  BitML: A Calculus for Bitcoin Smart Contracts , 2018, IACR Cryptol. ePrint Arch..

[20]  Raymond R. Devillers,et al.  Sequential and Concurrent Behaviour in Petri Net Theory , 1987, Theor. Comput. Sci..

[21]  Ahmed E. Hassan,et al.  An exploratory study of smart contracts in the Ethereum blockchain platform , 2020, Empirical Software Engineering.

[22]  Wolfgang Reisig,et al.  Petri Nets , 1985, EATCS Monographs on Theoretical Computer Science.

[23]  Massimo Bartoletti,et al.  A minimal core calculus for Solidity contracts , 2019, DPM/CBT@ESORICS.

[24]  Jun Sun,et al.  Semantic Understanding of Smart Contracts: Executable Operational Semantics of Solidity , 2020, 2020 IEEE Symposium on Security and Privacy (SP).

[25]  Silvia Crafa,et al.  Is Solidity Solid Enough? , 2019, Financial Cryptography Workshops.

[26]  Arthur J. Bernstein,et al.  Analysis of Programs for Parallel Processing , 1966, IEEE Trans. Electron. Comput..

[27]  Prateek Saxena,et al.  A Secure Sharding Protocol For Open Blockchains , 2016, CCS.