An Optimised Bitcoin Mining Strategy: Stale Block Determination Based on Real-Time Data Mining and XGboost

An Optimised Bitcoin Mining Strategy: Stale Block Determination Based on Real-Time Data Mining and XGboost

Yizhi Luo, Jianhui Zhang
DOI: 10.4018/IJITSA.318655
Article PDF Download
Open access articles are freely available for download

Abstract

Stale blocks are not avoidable in blockchain, such as the Bitcoin network, when proof-of-work is used as the consensus protocol. However, as the economic loss to the miners and the security risk to the network cannot be ignored, research is needed to identify and analyse stale blocks. By analysing the factors influencing the generation of stale blocks, the authors propose a new machine learning model based on XGBoost. They propose a new data collection method for bitcoin nodes to obtain real data for training prediction model. Then, based on the model, they generate optimal mining strategies and analyse the economic benefits. The experimental data and application cases show that the real-time data detection and machine learning model that they propose can accurately identify and predict the generation of stale blocks and generate an economically optimal mining strategy in the Bitcoin network with the presence of stale blocks.
Article Preview
Top

Introduction

The emergence of digital currencies has substantial financial markets. For example, the market value of Bitcoin (Nakamoto, 2008), the first digital cryptocurrency, has now reached trillions of dollars (Böhme et al., 2015). As the core technology of digital cryptocurrencies, blockchain has gained much attention, and there are now many attempted implementations in a wide area of applications (Long et al., 2021; Tang & Zeng, 2021). However, all decentralized blockchain systems face the problem of ownership of bookkeeping rights.

For example, the Bitcoin system uses the proof-of-work (POW) mechanism to encourage miners to perform numerous calculations to compete for bookkeeping rights. The consensus on witnessing the transactions is based on the time spent calculating the results. Thus, competing for bookkeeping rights essentially turns out to be a zero-sum game among miners. In such a game, unfortunately, in competition, honest miners will inevitably produce blocks that are the same height as the optimal blocks but slightly later. These blocks become stale blocks.

In the Bitcoin network, stale blocks are successfully mined by miners but ultimately fail to be retained on the mainchain because of forks in the blockchain caused by peer nodes competing for transaction bookkeeping rights. In other words, in the mining and competing process, a stale block has the same height as the mainchain block, and a miner produces it after performing hash operations of the same complexity but ultimately fails to be added to the mainchain. As a result, the miner that generates the stale block suffers a great financial loss. Furthermore, the transactions verified with packaged stale blocks must also be repeatedly verified by other nodes. This verification process results in a substantial waste of resources and affects the fairness of mining. When a miner receives a stale block, if it chooses the branch where the stale block is located as the basis for mining, it is likely to suffer a substantial loss in mining revenue because of the cropping of the branch.

Although the generation of stale blocks causes economic losses to miners and affects the network performance, it has been ignored by most researchers, possibly due to the small probability of stale block generation. To the best of our knowledge, there is a lack of research on the prediction of stale block generation.

In this paper, we study the impact of stale blocks on the Bitcoin network. To do this, this paper investigates the operation, data, and state changes of full Bitcoin nodes from real-time data and studies how to provide honest miners with strategies for reducing the impact of stale blocks on revenue. Our main contribution is to provide a machine learning model based on real-time data for stale block generation and prediction, analyze the effects of stale blocks, and generate an optimal mining strategy for honest miners to improve profits when a fork occurs.

Complete Article List

Search this Journal:
Reset
Volume 17: 1 Issue (2024)
Volume 16: 3 Issues (2023)
Volume 15: 3 Issues (2022)
Volume 14: 2 Issues (2021)
Volume 13: 2 Issues (2020)
Volume 12: 2 Issues (2019)
Volume 11: 2 Issues (2018)
Volume 10: 2 Issues (2017)
Volume 9: 2 Issues (2016)
Volume 8: 2 Issues (2015)
Volume 7: 2 Issues (2014)
Volume 6: 2 Issues (2013)
Volume 5: 2 Issues (2012)
Volume 4: 2 Issues (2011)
Volume 3: 2 Issues (2010)
Volume 2: 2 Issues (2009)
Volume 1: 2 Issues (2008)
View Complete Journal Contents Listing