61 research outputs found

    An Empirical Study of Speculative Concurrency in Ethereum Smart Contracts

    Get PDF
    We use historical data to estimate the potential benefit of speculative techniques for executing Ethereum smart contracts in parallel. We replay transaction traces of sampled blocks from the Ethereum blockchain over time, using a simple speculative execution engine. In this engine, miners attempt to execute all transactions in a block in parallel, rolling back those that cause data conflicts. Aborted transactions are then executed sequentially. Validators execute the same schedule as miners. We find that our speculative technique yields estimated speed-ups starting at about 8-fold in 2016, declining to about 2-fold at the end of 2017, where speed-up is measured using either gas costs or instruction counts. We also observe that a small set of contracts are responsible for many data conflicts resulting from speculative concurrent execution

    DeFi and NFTs Hinder Blockchain Scalability

    Full text link
    Many classical blockchains are known to have an embarrassingly low transaction throughput, down to Bitcoin's notorious seven transactions per second limit.Various proposals and implementations for increasing throughput emerged in the first decade of blockchain research. But how much concurrency is possible? In their early days, blockchains were mostly used for simple transfers from user to user. More recently, however, decentralized finance (DeFi) and NFT marketplaces have completely changed what is happening on blockchains. Both are built using smart contracts and have gained significant popularity. Transactions on DeFi and NFT marketplaces often interact with the same smart contracts. We believe this development has transformed blockchain usage. In our work, we perform a historical analysis of Ethereum's transaction graph. We study how much interaction between transactions there was historically and how much there is now. We find that the rise of DeFi and NFT marketplaces has led to an increase in "centralization" in the transaction graph. More transactions are now interconnected: currently there are around 200 transactions per block with 4000 interdependencies between them. We further find that the parallelizability of Ethereum's current interconnected transaction workload is limited. A speedup exceeding a factor of five is currently unrealistic.Comment: 22 pages, 12 figures, to be published in Financial Cryptography and Data Security (FC), May 202

    A true concurrent model of smart contracts executions

    Full text link
    The development of blockchain technologies has enabled the trustless execution of so-called smart contracts, i.e. programs that regulate the exchange of assets (e.g., cryptocurrency) between users. In a decentralized blockchain, the state of smart contracts is collaboratively maintained by a peer-to-peer network of mutually untrusted nodes, which collect from users a set of transactions (representing the required actions on contracts), and execute them in some order. Once this sequence 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 propose a true concurrent model of smart contract execution. Based on this, we show how static analysis of smart contracts can be exploited to parallelize the execution of transactions.Comment: Full version of the paper presented at COORDINATION 202

    Efficient Concurrent Execution of Smart Contracts in Blockchains using Object-based Transactional Memory

    Full text link
    This paper proposes an efficient framework to execute Smart Contract Transactions (SCTs) concurrently based on object semantics, using optimistic Single-Version Object-based Software Transactional Memory Systems (SVOSTMs) and Multi-Version OSTMs (MVOSTMs). In our framework, a multi-threaded miner constructs a Block Graph (BG), capturing the object-conflicts relations between SCTs, and stores it in the block. Later, validators re-execute the same SCTs concurrently and deterministically relying on this BG. A malicious miner can modify the BG to harm the blockchain, e.g., to cause double-spending. To identify malicious miners, we propose Smart Multi-threaded Validator (SMV). Experimental analysis shows that the proposed multi-threaded miner and validator achieve significant performance gains over state-of-the-art SCT execution framework.Comment: 49 pages, 26 figures, 11 table

    A theory of transaction parallelism in blockchains

    Get PDF
    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.Comment: arXiv admin note: text overlap with arXiv:1905.0436

    SoK: Lending Pools in Decentralized Finance

    Get PDF
    Lending pools are decentralized applications which allow mutually untrusted users to lend and borrow crypto-assets. These applications feature complex, highly parametric incentive mechanisms to equilibrate the loan market. This complexity makes the behaviour of lending pools difficult to understand and to predict: indeed, ineffective incentives and attacks could potentially lead to emergent unwanted behaviours. Reasoning about lending pools is made even harder by the lack of executable models of their behaviour: to precisely understand how users interact with lending pools, eventually one has to inspect their implementations, where the incentive mechanisms are intertwined with low-level implementation details. Further, the variety of existing implementations makes it difficult to distill the common aspects of lending pools. We systematize the existing knowledge about lending pools, leveraging a new formal model of interactions with users, which reflects the archetypal features of mainstream implementations. This enables us to prove some general properties of lending pools, and to precisely describe vulnerabilities and attacks. We also discuss the role of lending pools in the broader context of decentralized finance and identify relevant research challenges

    Speculative Transaction Scheduling for Adding Concurrency to Ethereum

    Get PDF
    ํ•™์œ„๋…ผ๋ฌธ (์„์‚ฌ) -- ์„œ์šธ๋Œ€ํ•™๊ต ๋Œ€ํ•™์› : ๊ณต๊ณผ๋Œ€ํ•™ ์ „๊ธฐยท์ •๋ณด๊ณตํ•™๋ถ€, 2021. 2. ๋ฌธ์ˆ˜๋ฌต.์ด๋”๋ฆฌ์›€์€ ๋Œ€ํ‘œ์ ์ธ ๋ธ”๋ก์ฒด์ธ ํ”Œ๋žซํผ์œผ๋กœ, ์•”ํ˜ธํ™”ํ๋กœ๋ถ€ํ„ฐ ์‹œ์ž‘๋œ ๋ธ”๋ก์ฒด์ธ ๊ธฐ์ˆ ์— ๋Œ€ํ•œ ๊ด€์‹ฌ์„ ๋ฐ”ํƒ•์œผ๋กœ ์ตœ๊ทผ๊นŒ์ง€๋„ ์‚ฌ์šฉ๋Ÿ‰์„ ๊พธ์ค€ํžˆ ์œ ์ง€ํ•˜๊ณ  ์žˆ๋‹ค. ํŠนํžˆ ์œ ๋‹ˆ์Šค์™‘๊ณผ ๊ฐ™์€ ํƒˆ์ค‘์•™ํ™” ๊ธˆ์œต ์„œ๋น„์Šค๋“ค์ด ์ธ๊ธฐ๋ฅผ ๋Œ๋ฉฐ ์ผ์ผ ํ† ํฐ ์ „์†ก๋Ÿ‰์€ 2020๋…„๋“ค์–ด ๋‘ ๋ฐฐ ๊ฐ€๊นŒ์ด ์ฆ๊ฐ€ํ•˜๊ธฐ๋„ ํ–ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ ์  ๋Š˜์–ด๋‚˜๋Š” ํŠธ๋žœ์žญ์…˜ ์ˆ˜์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ , ํ˜„์žฌ ์ด๋”๋ฆฌ์›€์€ ๋ชจ๋“  ํŠธ๋žœ์žญ์…˜์„ ์ˆœ์ฐจ์ ์œผ๋กœ ์ˆ˜ํ–‰ํ•˜๊ณ  ์žˆ๊ธฐ์— ํŠธ๋žœ์žญ์…˜์˜ ์ฒ˜๋ฆฌ๋Ÿ‰์„ ๋†’์ด๋Š” ๋ฐ์— ํ•œ๊ณ„๊ฐ€ ์žˆ๋‹ค. ์‹ค์ œ๋กœ ์ด๋กœ ์ธํ•ด ์‚ฌ์šฉ์ž๊ฐ€ ๋งŽ์€ ์„œ๋น„์Šค๊ฐ€ ๋“ฑ์žฅํ•  ๋•Œ๋งˆ๋‹ค ํŠธ๋žœ์žญ์…˜ ์ฒ˜๋ฆฌ๋Ÿ‰์€ ๊ทธ๋Œ€๋กœ์ธ๋ฐ ํŠธ๋žœ์žญ์…˜์˜ ์ˆ˜๊ฐ€ ์ฆ๊ฐ€ํ•˜๋ฉด์„œ ์ˆ˜์ˆ˜๋ฃŒ๊ฐ€ ๋งค์šฐ ๋†’์•„์ง€๋Š” ํ˜„์ƒ์ด ๋ฐœ์ƒํ•˜๊ณ  ์žˆ๋‹ค. ์ด๋Ÿฌํ•œ ๋ฌธ์ œ์ ์„ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•œ ๋ฐฉ๋ฒ• ์ค‘ ํ•˜๋‚˜๋กœ ์ด๋”๋ฆฌ์›€ ์ƒ์˜ ํŠธ๋žœ์žญ์…˜๋“ค์„ ๋™์‹œ ์ˆ˜ํ–‰ํ•˜๊ธฐ ์œ„ํ•œ ์—ฐ๊ตฌ๋“ค์ด ์ œ์•ˆ๋˜์–ด์™”๋‹ค. ํ•˜์ง€๋งŒ ์ด๋Ÿฌํ•œ ๋™์‹œ ์ˆ˜ํ–‰์€ ํŠธ๋žœ์žญ์…˜๊ฐ„์˜ ์ถฉ๋Œ์„ ์œ ๋ฐœํ•  ์ˆ˜ ์žˆ์œผ๋ฉฐ, ์ถฉ๋Œ์ด ์ž์ฃผ ๋ฐœ์ƒํ•  ๊ฒฝ์šฐ ์˜คํžˆ๋ ค ์„ฑ๋Šฅ์ด ์ €ํ•˜๋  ์ˆ˜ ์žˆ๋‹ค. ๋”ฐ๋ผ์„œ ๋ณธ ๋…ผ๋ฌธ์—์„œ๋Š” ์ถฉ๋Œ์ด ์ตœ๋Œ€ํ•œ ์ ๊ฒŒ ๋ฐœ์ƒํ•˜๋„๋ก ์Šค์ผ€์ค„๋งํ•˜๋Š” ๊ฒƒ์— ์ดˆ์ ์„ ๋งž์ถ˜ ์‚ฌ์ „ ์Šค์ผ€์ค„๋ง์„ ํ†ตํ•œ ๋™์‹œ ์ˆ˜ํ–‰ ๊ธฐ๋ฒ•์„ ์ œ์•ˆํ•œ๋‹ค. ํŠธ๋žœ์žญ์…˜์— ๋ช…์‹œ๋œ ์ •๋ณด๋กœ ์‰ฝ๊ฒŒ ์˜ˆ์ธก ๊ฐ€๋Šฅํ•œ ๋ช…์‹œ์  ์ถฉ๋Œ(explicit conflict)๋ฟ ์•„๋‹ˆ๋ผ ์ง์ ‘ ์ˆ˜ํ–‰ํ•ด๋ณด์•„์•ผ ํ™•์ธ์ด ๊ฐ€๋Šฅํ•œ ๋‚ด์žฌ์  ์ถฉ๋Œ(implicit conflict)๊นŒ์ง€๋„ ๊ณผ๊ฑฐ ์ถฉ๋Œ ์ •๋ณด๋ฅผ ์ €์žฅํ•˜๋Š” ํ”„๋กœํŒŒ์ผ๋Ÿฌ๋ฅผ ํ†ตํ•ด ์˜ˆ์ธกํ•จ์œผ๋กœ์จ, 4-thread ์‹œ๋ฎฌ๋ ˆ์ด์…˜์—์„œ ์ˆœ์ฐจ ์ˆ˜ํ–‰ ๋Œ€๋น„ ์ „์ฒด ํŠธ๋žœ์žญ์…˜ ์ˆ˜ํ–‰ ์†๋„๋ฅผ ์•ฝ 3.1๋ฐฐ, ๊ธฐ์กด์˜ ๊ทธ๋ฆฌ๋”” ์Šค์ผ€์ค„๋ง ๋ฐฉ์‹์˜ ๋™์‹œ ์ˆ˜ํ–‰ ๋Œ€๋น„ ์•ฝ 28.2% ํ–ฅ์ƒ์‹œ์ผฐ๋‹ค.Ethereum is one of the most popular blockchain platform, and the amount of usage has been increasing for years based on interest in blockchain-based financial services. Despite the growing number of these complex transactions, Ethereum currently handles all transactions in a sequential execution method using a single thread, which limits throughput. To overcome this limitation, studies have been proposed to execute Ethereum transactions concurrently. However, if the transactions scheduled in a greedy manner, frequent collisions may lead to poor concurrency and high rollback costs. In this paper, we propose a speculative scheduling technique that focuses on minimizing collisions between Ethereum transactions. Not only collisions that can be easily predicted by explicit feature in the transaction, but also collisions that can only detected by implicit feature are considered based on past records through profiling. As a result, the speedup is increased by 28.2% compared to the concurrent execution of the greedy method in 4-thread simulation, and the overall transaction execution speedup was improved by 3.1 times compared to sequential execution.์ œ 1 ์žฅ ์„œ๋ก  1 ์ œ 2 ์žฅ ๋ฐฐ๊ฒฝ์ง€์‹ 3 ์ œ 1 ์ ˆ ์ด๋”๋ฆฌ์›€ ๊ธฐ๋ณธ ๊ฐœ๋… 3 ์ œ 2 ์ ˆ ์ด๋”๋ฆฌ์›€ ํŠธ๋žœ์žญ์…˜ ์ถฉ๋Œ 5 ์ œ 3 ์žฅ ์ด๋”๋ฆฌ์›€ ์›Œํฌ๋กœ๋“œ ๋ถ„์„ 7 ์ œ 1 ์ ˆ ๋ฐ์ดํ„ฐ ์ˆ˜์ง‘ 7 ์ œ 2 ์ ˆ ๋ถ„์„ ๊ฒฐ๊ณผ 8 ์ œ 4 ์žฅ ์‚ฌ์ „ ์Šค์ผ€์ค„๋ง์„ ํ†ตํ•œ ํŠธ๋žœ์žญ์…˜ ๋™์‹œ์ˆ˜ํ–‰ 11 ์ œ 1 ์ ˆ ๋ช…์‹œ์  ์ถฉ๋Œ ์˜ˆ์ธก 11 ์ œ 2 ์ ˆ ๋‚ด์žฌ์  ์ถฉ๋Œ ์˜ˆ์ธก 12 ์ œ 3 ์ ˆ ํ”„๋กœํŒŒ์ผ ๊ธฐ๋ฐ˜ ์‚ฌ์ „ ์Šค์ผ€์ค„๋ง 13 ์ œ 5 ์žฅ ์‹คํ—˜ ๋ฐ ๊ฒฐ๊ณผ 15 ์ œ 1 ์ ˆ ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ์„ค๊ณ„ 15 ์ œ 2 ์ ˆ ๊ฒฐ๊ณผ 15 ์ œ 6 ์žฅ ๊ด€๋ จ ์—ฐ๊ตฌ 20 ์ œ 7 ์žฅ ๊ฒฐ๋ก  ๋ฐ ํ–ฅํ›„ ์—ฐ๊ตฌ 21 ์ฐธ๊ณ  ๋ฌธํ—Œ 22 Abstract 23Maste
    • โ€ฆ
    corecore