Unlocking Blockchain UTXO Transactional Patterns and Their Effect on Storage and Throughput Trade-Offs
Abstract
:1. Introduction
- 1.
- Analysis and abstraction of transactional models.
- 2.
- Formal comparison of models to highlight their cost on storage.
- 3.
- Run experiments with data from the Bitcoin and the Ethereum blockchains.
2. Fundamental Background of Transactional Models
2.1. UTXO Model
- 1.
- All outputs are not the same.
- 2.
- An unspent output refers to a specific output when spending.
- 3.
- Unspent outputs are consumed, creating new outputs.
- 4.
- An output can only be spent once.
2.2. Account Model
- The process of contract deployment essentially involves the creation of a smart contract. This can be equated to an executable program that is assigned a unique address within the blockchain. The smart contract contains a set of predefined functions or instructions that are written in a programming language compatible with the Ethereum blockchain, such as Solidity [26].
- On the other hand, contract invocation refers to the process of executing or “calling” the functions embedded within the smart contract. These functions can be invoked by other addresses within the blockchain network, allowing them to interact with the smart contract and initiate specific operations. These operations can range from simple value transfers to more complex interactions involving multiple smart contracts [27].
3. Related Work
3.1. Approaches to Enhance Throughput
3.1.1. Block Size
3.1.2. Off-Chain
- (a)
- Payment channels increase transactional throughput by creating private paths between entities. For example, the Lightning Network [9,10] is capable of handling up to one million TPS off the main blockchain, recording transactions on the blockchain only when the channels are closed. This method shifts the storage overhead from the main chain to external systems to increase transaction throughput, altering the balance between these two parameters. In addition, managing the states of the channels off the main chain requires additional resources to ensure the integrity of the transactions.
- (b)
- Sidechains [11,12] operate as independent blockchains with their own storage and consensus mechanisms, linked to the main chain by two-way pegs. This setup allows them to process transactions that do not burden the main chain, enhancing overall system performance. However, the need for additional infrastructure to maintain the security and operability of sidechains increases off-chain storage and management overhead.
3.1.3. Sharding
3.2. Approaches to Reduce Storage
3.2.1. Centralized Data
3.2.2. Decentralized Data
3.3. Summary
4. Understanding the Execution of Transaction Models and Their Relation to Blockchain Storage
4.1. UTXO Model Storage Growth Analysis
- (a)
- In the first case, as shown in Figure 5a, Alice has a single output in her wallet with a value of BTC 0.2. To pay for the coffee, she creates a transaction that splits the BTC 0.2 unspent output into two new outputs: one with BTC 0.1 that she sends to Bob and another with BTC 0.1 that she sends back to herself.
- (b)
- In the second case, as shown in Figure 5b, Alice has multiple outputs in her wallet with a value less than the input value. To pay for the coffee, Alice merges the unspent outputs with a lesser value up to BTC 0.1, and creates a transaction that she pays to Bob.
- (c)
- In the third case, as shown in Figure 5c, Alice has multiple outputs in her wallet with a value equal to the input value. To pay for the coffee, Alice transfers the unspent output with the same value as the coffee and creates a new transaction that is sent to Bob.
4.2. Account Model Storage Growth Analysis
4.3. Transaction Sizes in Bitcoin and Ethereum
4.4. Summary
5. Unlocking Transactional Patterns Based on Spent-By Relation
5.1. Defining the UTXO Model as a DAG
- The set of vertices represents the outputs of the UTXO model and is divided into two subsets . Here, is the set of spent outputs, and is the set of unspent outputs.
- The set of edges R is determined by the spent-by relation, which specifies how the and are related.
5.2. Spent-By Relation “←”
- . This represents all pairs , where x and y are elements of the sets and , respectively.
- . This means that the number of edges in is one less than the number of vertices in .
5.3. Unlocking Transactional Patterns
5.3.1. Splitting Pattern
5.3.2. Merging Pattern
5.3.3. Transferring Pattern
5.4. Relationship between Throughput and Storage
- Outputs across transactional patterns This parameter, denoted as , represents the total number of outputs generated by all transactional patterns (splitting, merging, and transferring). It is the sum of the outputs from each pattern, expressed as follows:
- Number of outputs of all transactional patterns in a time interval: This parameter, denoted as , represents the total number of outputs generated by all transactional patterns per time interval. It is calculated by dividing the total number of outputs by the time interval t, expressed as follows:
- Average number of outputs per transaction: This parameter, denoted as , represents the average number of outputs generated per transaction. It is calculated by dividing the total number of outputs by the total number of transactions , expressed as follows:
5.5. Summary
6. Experimental Comparison of Storage Costs in UTXO Transactional Patterns
6.1. Storage Cost in Splitting Pattern
6.2. Storage Cost in Transferring Pattern
6.3. Storage Costs in the Merging Pattern
6.4. Analysis of Transaction Pattern in Storage/Throughput Flexibility
6.5. Summary
7. Discussion
7.1. Practical Implications of Transactional Patterns
7.2. Discussion of Experimental Results
7.3. Future Research
8. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
DApps | decentralized applications |
DAG | directed acyclic graph |
P2P | peer-to-peer |
UTXO | unspent transaction output |
TPS | transactions per second |
CUB | consensus unit-based |
EVM | Ethereum virtual machine |
SE-Chain | secure and efficient chain |
SASLedger | secure, accelerated scalable ledger |
Jidar | jigsaw-like data reduction |
SegWit | segregated witness |
Appendix A. Formal Comparison of the Transactional Models of Bitcoin and Ethereum
Appendix A.1. Formalization of Transaction Execution in Ethereum
Appendix A.1.1. Defining the Fundamental Sets
- (a)
- T: This set represents all possible transactions in the system. A transaction is a simple token transfer or the invocation of a smart contract.
- (b)
- B: This set represents the blocks in the blockchain. In Ethereum, each block contains an ordered set of transactions that have been validated and confirmed by the network.
- (c)
- S: This is the global state of the system, which includes information such as the balance of each account, the code of smart contracts, and other relevant global data.
- (d)
- C: This set represents all smart contracts deployed in the system. A smart contract is an autonomous program that runs on the blockchain.
Appendix A.1.2. Defining Functions
- (a)
- State transition function: This function takes an initial state (S) and a transaction (t) and returns a new state (). If the transaction is invalid, is equal to S.
- (b)
- Validation function: This function checks if a transaction (t) is valid given a state (S). This involves checking if the sender has enough funds to complete the transaction or whether the transaction complies with certain smart contract rules.
- (c)
- Sequentiality function: This function extracts the serialized order of transactions in a block, B.
- (d)
- State update function: = It shows how the global state (S) is updated by sequentially applying each transaction in B, taking into account validation.
Appendix A.2. Simple Transaction in Ethereum
Appendix A.3. Smart Contract Execution in Ethereum: Success and Failure Scenarios
Appendix A.3.1. Success Scenario
Appendix A.3.2. Failure Scenario
Appendix A.4. Sequentiality Function in Ethereum Transactions
Appendix A.5. Formalization of Transaction Execution in Bitcoin
Appendix A.5.1. Definition of Fundamental Sets
- (a)
- T: Encapsulates all transactions within the system. A transaction is defined as a simple token transfer operation.
- (b)
- B: This set comprises all blocks in the blockchain. In the context of Bitcoin, each block contains a set of transactions that are validated and confirmed by the network nodes.
- (c)
- USet: Refers to a set of all available unspent transaction outputs (UTXOs) at any given time. USet is an abstraction of the set of microstates in Bitcoin.
Appendix A.6. Simple Transaction in Bitcoin
Appendix A.7. Comparative Complexity Analysis in Transactional Models
References
- Belotti, M.; Božić, N.; Pujolle, G.; Secci, S. A Vademecum on Blockchain Technologies: When, Which, and How. IEEE Commun. Surv. Tutor. 2019, 21, 3796–3838. [Google Scholar] [CrossRef]
- Neudecker, T.; Hartenstein, H. Network Layer Aspects of Permissionless Blockchains. IEEE Commun. Surv. Tutor. 2019, 21, 838–857. [Google Scholar] [CrossRef]
- Androulaki, E.; Barger, A.; Bortnikov, V.; Cachin, C.; Christidis, K.; Caro, A.D.; Enyeart, D.; Ferris, C.; Laventman, G.; Manevich, Y.; et al. Hyperledger Fabric: A Distributed Operating System for Permissioned Blockchains. arXiv 2018, arXiv:1801.10228. [Google Scholar]
- Johnston, D.; Yilmaz, S.O.; Kandah, J.; Bentenitis, N.; Hashemi, F.; Gross, R.; Wilkinson, S.; Mason, S. DApps. 2014. Available online: https://github.com/DavidJohnstonCEO/DecentralizedApplications (accessed on 3 June 2024).
- Blockchair. Blockchain Size. 2023. Available online: https://blockchair.com/bitcoin (accessed on 3 June 2024).
- Etherscan. Blockchain Size. 2023. Available online: https://etherscan.io/ (accessed on 3 June 2024).
- Wikipedia. SegWit. 2024. Available online: https://es.wikipedia.org/wiki/SegWit (accessed on 3 June 2024).
- Wackerow, P. BLOCKS. 2024. Available online: https://ethereum.org/en/developers/docs/blocks/ (accessed on 3 June 2024).
- Poon, J.; Dryja, T. The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments. Technical Report, Lightning Labs. 2016. Available online: https://lightning.network/lightning-network-paper.pdf (accessed on 3 June 2024).
- Kappos, G.; Yousaf, H.; Piotrowska, A.M.; Kanjalkar, S.; Delgado-Segura, S.; Miller, A.; Meiklejohn, S. An Empirical Analysis of Privacy in the Lightning Network. In Proceedings of the Financial Cryptography and Data Security—25th International Conference, FC 2021, Virtual Event, 1–5 March 2021; Revised Selected Papers, Part I; Borisov, N., Díaz, C., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germnay, 2021; Volume 12674, pp. 167–186. [Google Scholar] [CrossRef]
- Karaarslan, E.; Konacakli, E. Data Storage in the Decentralized World: Blockchain and Derivatives. arXiv 2020, arXiv:2012.10253. [Google Scholar]
- Worley, C.; Skjellum, A. Blockchain Tradeoffs and Challenges for Current and Emerging Applications: Generalization, Fragmentation, Sidechains, and Scalability. In Proceedings of the 2018 IEEE International Conference on Internet of Things (iThings) and IEEE Green Computing and Communications (GreenCom) and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE Smart Data (SmartData), Halifax, NS, Canada, 30 July–3 August 2018; pp. 1582–1587. [Google Scholar] [CrossRef]
- Luu, L.; Narayanan, V.; Zheng, C.; Baweja, K.; Gilbert, S.; Saxena, P. A Secure Sharding Protocol For Open Blockchains. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security, CCS’16, Vienna, Austria, 24–28 October 2016; pp. 17–30. [Google Scholar] [CrossRef]
- Kokoris-Kogias, E.; Jovanovic, P.; Gasser, L.; Gailly, N.; Syta, E.; Ford, B. OmniLedger: A Secure, Scale-Out, Decentralized Ledger via Sharding. In Proceedings of the 2018 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA, 20–24 May 2018; pp. 583–598. [Google Scholar] [CrossRef]
- Zamani, M.; Movahedi, M.; Raykova, M. RapidChain: Scaling Blockchain via Full Sharding. In Proceedings of the 2018 ACM SIGSAC Conference on Computer and Communications Security, CCS’18, Toronto, ON, Canada, 15–19 October 2018; pp. 931–948. [Google Scholar] [CrossRef]
- Xu, Z.; Han, S.; Chen, L. CUB, a Consensus Unit-Based Storage Scheme for Blockchain System. In Proceedings of the 2018 IEEE 34th International Conference on Data Engineering (ICDE), Paris, France, 16–19 April 2018; pp. 173–184. [Google Scholar] [CrossRef]
- Dai, X.; Xiao, J.; Yang, W.; Wang, C.; Jin, H. Jidar: A Jigsaw-like Data Reduction Approach without Trust Assumptions for Bitcoin System. In Proceedings of the 2019 IEEE 39th International Conference on Distributed Computing Systems (ICDCS), Dallas, TX, USA, 7–10 July 2019; pp. 1317–1326. [Google Scholar] [CrossRef]
- Sun, H.; Pi, B.; Sun, J.; Miyamae, T.; Morinaga, M. SASLedger: A Secured, Accelerated Scalable Storage Solution for Distributed Ledger Systems. Future Internet 2021, 13, 310. [Google Scholar] [CrossRef]
- Jia, D.Y.; Xin, J.C.; Wang, Z.Q.; Lei, H.; Wang, G.R. SE-Chain: A Scalable Storage and Efficient Retrieval Model for Blockchain. J. Comput. Sci. Technol. 2021, 36, 693–706. [Google Scholar] [CrossRef]
- Li, C.; Zhang, J.; Yang, X.; Youlong, L. Lightweight blockchain consensus mechanism and storage optimization for resource-constrained IoT devices. Inf. Process. Manag. 2021, 58, 102602. [Google Scholar] [CrossRef]
- Zahnentferner, J. An Abstract Model of UTxO-Based Cryptocurrencies with Scripts. 2018. Available online: https://eprint.iacr.org/2018/469 (accessed on 3 June 2024).
- Buterin, V. Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform. 2014. Available online: https://ethereum.org/en/whitepaper/ (accessed on 3 June 2024).
- Jeyakumar, S.; Hou, Z.; Yugarajah, A.; Palaniswami, M.; Muthukkumarasamy, V. Visualizing Blockchain Transaction Behavioural Pattern: A Graph-based Approach. TechRxiv 2023. [Google Scholar] [CrossRef]
- Narula, N.; Dryja, T. Cryptocurrency Engineering and Design. MIT OpenCourseWare. 2018. Available online: https://ocw.mit.edu/courses/media-arts-and-sciences/mas-s62-cryptocurrency-engineering-and-design-spring-2018/ (accessed on 3 June 2024).
- Antonopoulos, A.M.; Wood, G. Smart Contracts and Solidity. In Mastering Ethereum: Building Smart Contracts and DApps, 1st ed.; O’Reilly Media: Sebastopol, CA, USA, 2018; Chapter 6; pp. 100–120. [Google Scholar]
- Zheng, G.; Gao, L.; Huang, L.; Guan, J. Ethereum Smart Contract Development in Solidity; Springer: Singapore, 2021; Chapter 6. [Google Scholar] [CrossRef]
- Etherscan. web3.eth—Call. 2023. Available online: https://etherscan.io/ (accessed on 3 June 2024).
- Chakravarty, M.M.T.; Chapman, J.; MacKenzie, K.; Melkonian, O.; Jones, M.P.; Wadler, P. The Extended UTXO Model. In Proceedings of the Financial Cryptography and Data Security—FC 2020 International Workshops, AsiaUSEC, CoDeFi, VOTING, and WTSC, Kota Kinabalu, Malaysia, 14 February 2020; Revised Selected Papers; Bernhard, M., Bracciali, A., Camp, L.J., Matsuo, S., Maurushat, A., Rønne, P.B., Sala, M., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2020; Volume 12063, pp. 525–539. [Google Scholar] [CrossRef]
- Dai, P.; Mahi, N.; Norta, A. Smart-Contract Value-Transfer Protocols on a Distributed Mobile Application Platform. 2017. Available online: https://api.semanticscholar.org/CorpusID:36981890 (accessed on 3 June 2024).
- Lombrozo, E.; Lau, J.; Wuille, P. Segregated Witness (Consensus Layer). Bitcoin Improvement Proposal. 2015. Available online: https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki (accessed on 3 June 2024).
- Benet, J. IPFS—Content Addressed, Versioned, P2P File System. arXiv 2014, arXiv:1407.3561. [Google Scholar]
- Swarm Team. Swarm—Storage and Communication Infrastructure for a Self-Sovereign Digital Society. White Paper. 2023. Available online: https://www.ethswarm.org/swarm-whitepaper.pdf (accessed on 3 June 2024).
- Balaji, S.B.; Krishnan, M.N.; Vajha, M.; Ramkumar, V.; Sasidharan, B.; Kumar, P.V. Erasure coding for distributed storage: An overview. Sci. China Inf. Sci. 2018, 61, 100301. [Google Scholar] [CrossRef]
- Kalodner, H.; Möser, M.; Lee, K.; Goldfeder, S.; Plattner, M.; Chator, A.; Narayanan, A. BlockSci: Design and applications of a blockchain analysis platform. In Proceedings of the 29th USENIX Security Symposium (USENIX Security 20), Boston, MA, USA, 12–14 August 2020; USENIX Association: Berkeley, CA, USA, 2020; pp. 2721–2738. [Google Scholar]
- Wilcke, J. go-ethereum. 2013. Available online: https://github.com/ethereum/go-ethereum (accessed on 3 June 2024).
- Nakamoto, S. Bitcoin: A Peer-to-Peer Electronic Cash System. 2008. Available online: https://bitcoin.org/bitcoin.pdf (accessed on 3 June 2024).
- contributors, W. Bitcoin Core—Wikipedia, The Free Encyclopedia. 2024. Available online: https://en.wikipedia.org/wiki/Bitcoin_Core (accessed on 3 June 2024).
- Melo, D.; Rodríguez-Henríquez, L.M.X.; Hernández, S.P.; Pérez-Sansalvador, J.C. Replication Data for: Unlocking Blockchain UTXO Transactional Patterns. 2024. Harvard Dataverse V7. Available online: https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/6V8HRL (accessed on 3 June 2024).
- Bitcoin Forum—Index. 2024. Available online: https://bitcointalk.org/ (accessed on 3 June 2024).
- Perez-Sola, C.; Delgado-Segura, S.; Herrera-Joancomarti, J.; Navarro-Arribas, G. Analysis of the SegWit adoption in Bitcoin. In Proceedings of the XV Reunión Española Sobre Criptología y Seguridad de la Información, Granada, Spain, 3–5 October 2018; Garcia Teodoro, P., Barragán Gil, N.M., Fuentes Garcia, R., Eds.; Universidad de Granada: Granada, Spain, 2018; pp. 230–233. [Google Scholar]
- Kedziora, M.; Pieprzka, D.; Jozwiak, I.; Liu, Y.; Song, H. Analysis of segregated witness implementation for increasing efficiency and security of the Bitcoin cryptocurrency. J. Inf. Telecommun. 2023, 7, 44–55. [Google Scholar] [CrossRef]
- Stütz, R.; Stockinger, J.; Moreno-Sanchez, P.; Haslhofer, B.; Maffei, M. Adoption and Actual Privacy of Decentralized CoinJoin Implementations in Bitcoin. In Proceedings of the 4th ACM Conference on Advances in Financial Technologies, Cambridge, MA, USA, 19–21 September 2022. [Google Scholar] [CrossRef]
- Swambo, J.; Hommel, S.; McElrath, B.; Bishop, B. Custody Protocols Using Bitcoin Vaults. arXiv 2020, arXiv:2005.11776. [Google Scholar]
- Melo, D.; Hernandez, S.; Rodriguez, L.; Perez-Sansalvador, J. Bitcoin Transactions Types and Their Impact on Storage Scalability. In Proceedings of the 2023 IEEE International Conference on Enabling Technologies: Infrastructure for Collaborative Enterprises (WETICE), Paris, France, 14–16 December 2023; pp. 1–6. [Google Scholar] [CrossRef]
Issue | Enhancing Throughput | Proposal | Blockchain System | Throughput | Advantages | Disadvantages |
---|---|---|---|---|---|---|
Throughput | Block size | SegWit 2015 | Permissionless | 20 TPS | Enhances storage efficiency and latency | Increases capacity, not scalable solution. |
Block size | London 2021 | Permissionless | 85 TPS | Increase throughput reduce fees | Increased gas and block size | |
Off-chain | Polygon 2018 | Permissionless | 65,000 TPS | Ethereum compatibility low fees | Inconsistency and security risks | |
Off-chain | Lightning 2015 | Permissionless | 1 Million TPS | Instant transactions low fees | Funds blocked in payment channels | |
Sharding | Elastico 2016 | Permissionless | 40 TPS | Parallelizes transactional processing | Increase storage 1 GB per day | |
Sharding | OmniLedger 2018 | Permissionless | 4000 TPS | Ensures that nodes redistributed | Increase storage 28 GB per day | |
Sharding | RapidChain 2018 | Permissionless | 7380 TPS | Efficiency in network configuration | Increase storage 159.6GB per day | |
Issue | Reducing Storage | Proposal | Blockchain System | Saving Storage | Advantages | Disadvantages |
Storage | Centralized | CUB 2018 | Permissioned | 90% Saving | Block Allocation Optimization | Assume all nodes are honest |
Centralized | Jidar 2019 | Permissionless | 98% Saving | Only stores transaction relevant | Extra storage for transaction | |
Centralized | SASLedger 2021 | Permissioned | 93% Saving | Guarantee integrity of the database | Requires remote database server | |
Decentralized | SE-Chain 2021 | Permissionless | 70% Saving | The consistent blocks stored fewer replicas | High Latency Low availability | |
Decentralized | Lightweight 2021 | Permissioned | 46% Saving | Optimization scheme based on Reed-Solomon | Limited full-scale Compatibility |
Attribute | Description | Size |
---|---|---|
PrevTxid | Hashed ID of the to-be-used transaction | 32 bytes |
Output Index | Number of the output in the transaction | 4 bytes |
SigScript | Signature data to unlock spent output | Variable |
Sequence | Transaction sequence number | 4 bytes |
Attribute | Description | Size |
---|---|---|
PkScript | Script that sets the conditions to unlock funds | Variable |
Value | Satoshi Amount | 8 bytes |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Melo, D.; Pomares-Hernández, S.E.; Rodríguez-Henríquez, L.M.X.; Pérez-Sansalvador, J.C. Unlocking Blockchain UTXO Transactional Patterns and Their Effect on Storage and Throughput Trade-Offs. Computers 2024, 13, 146. https://doi.org/10.3390/computers13060146
Melo D, Pomares-Hernández SE, Rodríguez-Henríquez LMX, Pérez-Sansalvador JC. Unlocking Blockchain UTXO Transactional Patterns and Their Effect on Storage and Throughput Trade-Offs. Computers. 2024; 13(6):146. https://doi.org/10.3390/computers13060146
Chicago/Turabian StyleMelo, David, Saúl Eduardo Pomares-Hernández, Lil María Xibai Rodríguez-Henríquez, and Julio César Pérez-Sansalvador. 2024. "Unlocking Blockchain UTXO Transactional Patterns and Their Effect on Storage and Throughput Trade-Offs" Computers 13, no. 6: 146. https://doi.org/10.3390/computers13060146
APA StyleMelo, D., Pomares-Hernández, S. E., Rodríguez-Henríquez, L. M. X., & Pérez-Sansalvador, J. C. (2024). Unlocking Blockchain UTXO Transactional Patterns and Their Effect on Storage and Throughput Trade-Offs. Computers, 13(6), 146. https://doi.org/10.3390/computers13060146