Article Preview
TopIntroduction
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.