Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
158 tokens/sec
GPT-4o
7 tokens/sec
Gemini 2.5 Pro Pro
45 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Adding Concurrency to Smart Contracts (1702.04467v1)

Published 15 Feb 2017 in cs.DC

Abstract: 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 of 1.33x can be obtained for miners and 1.69x for validators with just three concurrent threads.

Citations (193)

Summary

  • The paper presents a novel concurrency framework that uses speculative STM techniques to execute smart contracts in parallel.
  • The approach achieves measurable performance gains with miners speeding up by 1.33x and validators by 1.69x using three concurrent threads.
  • The method produces deterministic fork-join execution schedules, optimizing blockchain throughput and aligning with modern multi-core architectures.

Adding Concurrency to Smart Contracts

The paper "Adding Concurrency to Smart Contracts" addresses a significant limitation in modern cryptocurrency systems, such as Ethereum, by proposing a method to enhance the execution efficiency of smart contracts. These contract scripts, which facilitate complex transactions, traditionally function in a serial manner. This limitation necessitates sequential execution by both miners, during block creation, and validators, during block verification, thereby underutilizing contemporary multicore and cluster architectures. The proposed method to overcome this challenge incorporates techniques derived from Software Transactional Memory (STM), enabling parallel execution of smart contracts.

Summary of Results

The authors present a framework allowing miners to execute smart contracts concurrently by employing speculative execution strategies akin to transactional memory systems. This system permits non-conflicting contracts to execute in parallel, thereby producing a serializable concurrent schedule for blockchain transactions. Experimental benchmarks utilizing a Java Virtual Machine (JVM) and ScalaSTM demonstrate notable performance gains, achieving a speedup factor of 1.33x for miners and 1.69x for validators with just three concurrent threads.

Methodology and Implementation

The crux of the technique lies in redefining the execution model of smart contracts as speculative atomic actions. Miners are enabled to run smart contracts speculatively; conflicts are resolved dynamically at runtime, with the ability to delay or rollback conflicting transactions to maintain consistency of shared states. This speculative approach addresses the inherent difficulty in statically determining potential conflicts due to the Turing-complete nature of smart contract languages.

In parallel with speculative execution, miners are tasked with generating a concurrent execution schedule captured as a deterministic fork-join program. The schedule is efficiently encoded, allowing validators to reproduce the miner's parallel execution deterministically, avoiding the overhead associated with traditional speculative systems.

Implications and Future Developments

The paper delineates a path forward for elevating the throughput of smart contracts by harnessing concurrency, effectively aligning blockchain systems with the capabilities of modern computing architectures. This improvement has dual benefits: accelerating the block mining process for miners, who are incentivized through increased throughput, and optimizing block validation, which remains highly consequential given its repetitive nature across the network.

Future development could benefit from integrating these concurrency mechanisms directly into Ethereum's virtual machine or similar blockchain technologies to natively support multi-threaded execution environments. Moreover, extending this concurrency approach to support diverse types of blockchain applications could further minimize latency and improve system scalability. Notably, the incentivization mechanism to encourage miners to publish their parallel schedules offers an intriguing area for further exploration and refinement.

In conclusion, through robust experimentation and a methodical approach to concurrency, this work sets an important precedent for enhancing the performance and scalability of blockchain systems, significantly impacting both theoretical and practical applications in the field of distributed ledger technologies.