61 research outputs found
An Empirical Study of Speculative Concurrency in Ethereum Smart Contracts
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
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
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
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
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
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
ํ์๋
ผ๋ฌธ (์์ฌ) -- ์์ธ๋ํ๊ต ๋ํ์ : ๊ณต๊ณผ๋ํ ์ ๊ธฐยท์ ๋ณด๊ณตํ๋ถ, 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
- โฆ