Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
149 tokens/sec
GPT-4o
9 tokens/sec
Gemini 2.5 Pro Pro
47 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

Groundhog: Linearly-Scalable Smart Contracting via Commutative Transaction Semantics (2404.03201v1)

Published 4 Apr 2024 in cs.DC

Abstract: Groundhog is a novel design for a smart contract execution engine based around concurrent execution of blocks of transactions. Unlike prior work, transactions within a block in Groundhog are not ordered relative to one another. Instead, our key design insights are first, to design a set of commutative semantics that lets the Groundhog runtime deterministically resolve concurrent accesses to shared data. Second, some storage accesses (such as withdrawing money from an account) conflict irresolvably; Groundhog therefore enforces validity constraints on persistent storage accesses via a reserve-commit process. These two ideas give Groundhog a set of semantics that, while not as powerful as traditional sequential semantics, are flexible enough to implement a wide variety of important applications, and are strictly more powerful than the semantics used in some production blockchains today. Unlike prior smart contract systems, transactions throughput never suffers from contention between transactions. Using 96 CPU cores, Groundhog can process more than half a million payment transactions per second, whether between 10M accounts or just 2.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (77)
  1. Cow protocol overview: The batch auction optimization problem. https://web.archive.org/web/20220614183101/https://docs.cow.fi/off-chain-services/in-depth-solver-specification/the-batch-auction-optimization-problem. Accessed 10/19/2022.
  2. The maker protocol: Makerdao’s multi-collateral dai (mcd) system. https://makerdao.com/en/whitepaper/. Accessed 12/14/2021.
  3. The penumbra protocol: Sealed-bid batch swaps. https://web.archive.org/web/20220614034906/https://protocol.penumbra.zone/main/zswap/swap.html. Accessed 10/19/2022.
  4. Solana documentation: Rent. https://web.archive.org/web/20220903121658/https://docs.solana.com/implemented-proposals/rent.
  5. A technical introduction to the serum dex. https://web.archive.org/web/20221112173940/https://docs.google.com/document/d/1isGJES4jzQutI0GtQGuqtrBUqeHxl_xJNXdtOv4SdII/edit. Accessed 12/11/22.
  6. wasm3: The fastest webassembly interpreter, and the most universal runtime. https://github.com/wasm3/wasm3.
  7. Loopring 3 design doc. https://web.archive.org/web/20220411224154/https://github.com/Loopring/protocols/blob/master/packages/loopring_v3/DESIGN.md#results, 2021.
  8. Compound iii docs. https://docs.compound.finance/, 2022.
  9. Cosmwasm documentation: Actor model for contract calls. https://web.archive.org/web/20220811195538/https://docs.cosmwasm.com/docs/1.0/architecture/actor/, 2022.
  10. Near documentation: Cross-contract calls. https://web.archive.org/web/20221021051657/https://docs.near.org/develop/contracts/crosscontract, 2022.
  11. Wasm-instrument: Instrument and transform wasm modules. https://github.com/paritytech/wasm-instrument, 2022.
  12. Compound finance. https://web.archive.org/web/20230414212550/https://compound.finance/, 2023. Accessed 04/14/2023.
  13. Uniswap v2 core. 2020.
  14. Improved price oracles: Constant function market makers. In Proceedings of the 2nd ACM Conference on Advances in Financial Technologies, pages 80–91, 2020.
  15. Efficient concurrent execution of smart contracts in blockchains using object-based transactional memory. In International Conference on Networked Systems, pages 77–93. Springer, 2020.
  16. An efficient framework for optimistic concurrent execution of smart contracts. In 2019 27th Euromicro International Conference on Parallel, Distributed and Network-Based Processing (PDP), pages 83–92. IEEE, 2019.
  17. Prism: Deconstructing the blockchain to approach physical limits. In Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communications Security, pages 585–602, 2019.
  18. A true concurrent model of smart contracts executions. In International Conference on Coordination Languages and Models, pages 243–260. Springer, 2020.
  19. Vitalik Buterin. A state expiry and statelessness roadmap. https://web.archive.org/web/20220916204724/https://notes.ethereum.org/@vbuterin/verkle_and_state_expiry_proposal, 2021.
  20. Practical byzantine fault tolerance. In 3rd Symposium on Operating Systems Design and Implementation, pages 173–186, New Orleans, LA, February 1999.
  21. Forerunner: Constraint-based speculative transaction execution for ethereum (full version). 2021.
  22. The scalable commutativity rule: Designing scalable software for multicore processors. ACM Transactions on Computer Systems (TOCS), 32(4):1–47, 2015.
  23. Clockwork: An exchange protocol for proofs of non front-running.
  24. CoinGecko. Cryptocurrency prices by market cap. https://web.archive.org/web/20221210015628/https://www.coingecko.com/.
  25. Flash boys 2.0: Frontrunning, transaction reordering, and consensus instability in decentralized exchanges. arXiv preprint arXiv:1904.05234, 2019.
  26. Narwhal and tusk: a dag-based mempool and efficient bft consensus. In Proceedings of the Seventeenth European Conference on Computer Systems, pages 34–50, 2022.
  27. Efficient cross-shard transaction execution in sharded blockchains. arXiv preprint arXiv:2007.14521, 2020.
  28. Understanding and effectively preventing the aba problem in descriptor-based lock-free designs. In 2010 13th IEEE international symposium on object/component/service-oriented real-time distributed computing, pages 185–192. IEEE, 2010.
  29. Adding concurrency to smart contracts. Distributed Computing, pages 1–17, 2019.
  30. OpenZeppelin Documentation. Erc20. https://docs.openzeppelin.com/contracts/2.x/api/token/erc20. Accessed 12/10/22.
  31. Rethinking serializable multiversion concurrency control. arXiv preprint arXiv:1412.2324, 2014.
  32. Utilizing parallelism in smart contracts on decentralized blockchains by taming application-inherent conflicts. arXiv preprint arXiv:2201.03749, 2022.
  33. Block-stm: Scaling blockchain execution by turning ordering curse to a performance blessing. In Proceedings of the 28th ACM SIGPLAN Annual Symposium on Principles and Practice of Parallel Programming, pages 232–244, 2023.
  34. Algorand: Scaling byzantine agreements for cryptocurrencies. In Proceedings of the 26th Symposium on Operating Systems Principles, SOSP ’17, page 51–68, New York, NY, USA, 2017. Association for Computing Machinery.
  35. On the optionality and fairness of atomic swaps. In Proceedings of the 1st ACM Conference on Advances in Financial Technologies, pages 62–75, 2019.
  36. A universal modular actor formalism for artificial intelligence. In Advance Papers of the Conference, volume 3, page 235. Stanford Research Institute Menlo Park, CA, 1973.
  37. Graydon Hoare. Core advancement protocol 46-05: Smart contract data. https://web.archive.org/web/20221212214501/https://github.com/stellar/stellar-protocol/blob/master/core/cap-0046-05.md, May 2022.
  38. An event driven framework for smart contract execution. In Proceedings of the 15th ACM International Conference on Distributed and Event-based Systems, pages 78–89, 2021.
  39. Arbitrum: Scalable, private smart contracts. In 27th {normal-{\{{USENIX}normal-}\}} Security Symposium ({normal-{\{{USENIX}normal-}\}} Security 18), pages 1353–1370, 2018.
  40. All about eve: Execute-verify replication for multi-core servers. In Presented as part of the 10th {normal-{\{{USENIX}normal-}\}} Symposium on Operating Systems Design and Implementation ({normal-{\{{OSDI}normal-}\}} 12), pages 237–250, 2012.
  41. All you need is dag. In Proceedings of the 2021 ACM Symposium on Principles of Distributed Computing, pages 165–175, 2021.
  42. Order-fairness for byzantine consensus. In Annual International Cryptology Conference, pages 451–480. Springer, 2020.
  43. Compound: The money market protocol. White Paper, 2019.
  44. Automating the choice of consistency levels in replicated systems. In 2014 USENIX Annual Technical Conference (USENIX ATC 14), pages 281–292, 2014.
  45. Making {{\{{Geo-Replicated}}\}} systems fast as possible, consistent when necessary. In 10th USENIX Symposium on Operating Systems Design and Implementation (OSDI 12), pages 265–278, 2012.
  46. Fine-grained consistency for geo-replicated systems. In 2018 USENIX Annual Technical Conference (USENIX ATC 18), pages 359–372, 2018.
  47. Operation-level concurrent transaction execution for blockchains. arXiv preprint arXiv:2211.07911, 2022.
  48. Don’t settle for eventual: Scalable causal consistency for wide-area storage with cops. In Proceedings of the Twenty-Third ACM Symposium on Operating Systems Principles, pages 401–416, 2011.
  49. Fast and secure global payments with stellar. In Proceedings of the 27th ACM Symposium on Operating Systems Principles, SOSP ’19, page 80–96, New York, NY, USA, 2019. Association for Computing Machinery.
  50. Hamilton: A High-Performance transaction processor for central bank digital currencies. In 20th USENIX Symposium on Networked Systems Design and Implementation (NSDI 23), pages 901–915, Boston, MA, April 2023. USENIX Association.
  51. Satoshi Nakamoto. Bitcoin: A peer-to-peer electronic cash system, 2008. http://bitcoin.org/bitcoin.pdf.
  52. Plasma: Scalable autonomous smart contracts. White paper, pages 1–47, 2017.
  53. The bitcoin lightning network: Scalable off-chain instant payments, 2016.
  54. Handling highly contended oltp workloads using fast dynamic partitioning. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data, pages 527–542, 2020.
  55. Bidl: A high-throughput, low-latency permissioned blockchain framework for datacenter networks. In Proceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles, SOSP ’21, page 18–34, New York, NY, USA, 2021. Association for Computing Machinery.
  56. Quantifying blockchain extractable value: How dark is the forest? In 2022 IEEE Symposium on Security and Privacy (SP), pages 198–214. IEEE, 2022.
  57. Fair ordering via streaming social choice theory. arXiv preprint arXiv:2304.02730, 2023.
  58. SPEEDEX: A scalable, parallelizable, and economically efficient decentralized EXchange. In 20th USENIX Symposium on Networked Systems Design and Implementation (NSDI 23), pages 849–875, Boston, MA, April 2023. USENIX Association.
  59. A transactional perspective on execute-order-validate blockchains. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data, pages 543–557, 2020.
  60. An empirical study of speculative concurrency in ethereum smart contracts. arXiv preprint arXiv:1901.01376, 2019.
  61. Leopold Schabel. Reflections on solana’s sept 14 outage. https://web.archive.org/web/20211104012332/https://jumpcrypto.com/reflections-on-the-sept-14-solana-outage/, Oct 2021. Accessed 12/7/2021.
  62. Secure causal atomic broadcast, 2021.
  63. Conflict-free replicated data types. In Symposium on Self-Stabilizing Systems, pages 386–400. Springer, 2011.
  64. Basil: Breaking up bft with acid (transactions). In Proceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles, pages 1–17, 2021.
  65. NEAR Team. Near launches nightshade sharding, paving the way for mass adoption. https://web.archive.org/web/20221007081239/https://near.org/blog/near-launches-nightshade-sharding-paving-the-way-for-mass-adoption/, November 2021. Accessed 10/18/2022.
  66. SundaeSwap Team. Sundaeswap scalability. https://web.archive.org/web/20220523234648/https://sundaeswap.finance/posts/sundaeswap-scalability, November 2021.
  67. Erc20 api: An attack vector on the approve/transferfrom methods. https://web.archive.org/web/20221108114451/https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/edit.
  68. Eip 20: Erc-20 token standard. Ethereum Improvement Proposals, 20, 2015.
  69. Tom Walther. An optimization model for multi-asset batch auctions with uniform clearing prices. In Operations Research Proceedings 2018: Selected Papers of the Annual International Conference of the German Operations Research Society (GOR), Brussels, Belgium, September 12-14, 2018, pages 225–231. Springer, 2019.
  70. 0x: An open protocol for decentralized exchange on the ethereum blockchain. 2017.
  71. Gavin Wood. Polkadot: Vision for a heterogeneous multi-chain framework. White Paper, 21, 2016.
  72. Litm: a lightweight deterministic software transactional memory system. In Proceedings of the 10th International Workshop on Programming Models and Applications for Multicores and Manycores, pages 1–10, 2019.
  73. Hotstuff: Bft consensus with linearity and responsiveness. In Proceedings of the 2019 ACM Symposium on Principles of Distributed Computing, PODC ’19, page 347–356, New York, NY, USA, 2019. Association for Computing Machinery.
  74. A parallel smart contract model. In Proceedings of the 2018 International Conference on Machine Learning and Machine Intelligence, pages 72–77, 2018.
  75. Flash freezing flash boys: Countering blockchain front-running. In The Workshop on Decentralized Internet, Networks, Protocols, and Systems (DINPS), 2022.
  76. Skychain: A deep reinforcement learning-empowered dynamic blockchain sharding system. In 49th International Conference on Parallel Processing-ICPP, pages 1–11, 2020.
  77. Byzantine ordered consensus without byzantine oligarchy. In 14th {normal-{\{{USENIX}normal-}\}} Symposium on Operating Systems Design and Implementation ({normal-{\{{OSDI}normal-}\}} 20), pages 633–649, 2020.
Citations (1)

Summary

  • The paper's main contribution is the novel use of commutative semantics to execute concurrent transactions without strict ordering, enhancing scalability.
  • It employs a reserve-commit process to ensure deterministic conflict resolution in persistent storage for high-throughput smart contracting.
  • Groundhog consistently achieves over half a million transactions per second on a 96-core system, marking a major performance leap in blockchain scalability.

Groundhog: Linearly-Scalable Smart Contracting via Commutative Transaction Semantics

The paper presents Groundhog, a smart contract execution engine, introducing a novel approach to handle large-scale blockchain transactions via unordered concurrent execution, contrasting with conventional sequential methods. Groundhog leverages commutative semantics to facilitate deterministic conflict resolution of concurrent transaction writes, enhancing the scalability of blockchain systems.

Overview of Groundhog's Design

Groundhog's core innovation lies in its treatment of transactions. Unlike traditional models, Groundhog operates without ordering transactions within a block. Instead, it utilizes a framework that resolves concurrent interactions with shared ledger states with novel commutative semantics. This approach circumvents typical inefficiencies occurring from transaction contention, offering impassivity to contention levels.

  1. Commutative Semantics: By enabling commutative operations, conflicting transaction sequences can be executed without determining a strict order. This is vital for scalability as it allows asynchronous transaction processing without the need for a global operation order.
  2. Reserve-Commit Process: Groundhog employs a reserve-commit process to manage persistent storage states. In this approach, transactions only become finalized upon meeting set constraints, ensuring no conflicting updates breach predefined ledger rules.

Groundhog offers flexibility similar to that of existing blockchains while enabling applications to manage transaction concurrency internally. This flexibility is achieved through operations on specialized data types that handle common blockchain activities, such as account balances, through nonnegative integers and ordered sets.

Performance and Scalability

The engine's capacity to process over a half-million transactions per second on a 96-core system demonstrates a significant scalability advantage. This performance remains robust across varying contention levels, marking a substantial improvement over systems reliant on conventional deterministic replicated state machine models or sharded architecture, which often struggle with high contention.

Groundhog's performance holds steady, even at maximum contention levels (where all transactions act upon the same data), showcasing both the robustness and scalability of eliminating transaction order dependencies.

Implications and Future Directions

Groundhog's unique capabilities have noteworthy theoretical and practical implications for blockchain technology and distributed ledger systems:

  • Elimination of Transaction Ordering Inflexibility: By removing ordering dependencies, Groundhog allows a more flexible integration of smart contracts, potentially broadening application scope and reducing transactional inefficiencies seen in sequential systems.
  • Innovative Contract Models: It pushes the boundaries of existing contract design by encouraging integration of dynamic, fine-grained concurrency, aligning closer with asynchronous, distributed computational processes seen in off-chain systems.
  • Leader-based Design Challenges: While Groundhog effectively sidesteps many issues related to traditional block leader protocols, the leader-based design introduces challenges such as potential censorship or delayed transaction inclusion by a malicious leader. Regulatory frameworks and further technological safeguards could counteract these potential drawbacks.

Conclusion

Groundhog represents a compelling advancement in blockchain execution models, particularly in environments requiring high transaction throughput and low latency. It raises the stakes for scalable blockchain deployment, demonstrating how strategic shifts in execution semantics can lead to vast performance improvements. Moreover, Groundhog establishes a foundation for future exploration into more distributed and fault-tolerant consensus mechanisms, presenting an exciting direction for blockchain scalability and resilience. As digital currency systems become more prevalent, Groundhog's approach could prove a pivotal component in designing future-proof, scalable systems that accommodate the growing demands of global financial infrastructures.