Micro Analysis of Natural Forking in Blockchain Based on Large Deviation Theory

Hongwei Shi, Shengling Wang, Qin Hu, Xiuzhen ChengarXiv 2021 · OpenReview

TL;DR

This paper dives deep into the microscopic causes of "natural forking" in blockchains, a phenomenon where multiple valid blocks exist at the same height, threatening network security and efficiency. By applying large deviation theory to model block generation and dissemination as a queuing system, the authors provide a theoretical framework to predict and mitigate these forks.

What Problem Does This Paper Address?

Blockchains rely on consensus mechanisms to ensure all nodes agree on a single, valid chain of transactions. "Natural forking" occurs when network latency or other factors cause different nodes to see different "longest chains" simultaneously. This can lead to wasted computational resources as nodes mine on invalid chains, and can be exploited for malicious attacks like double-spending. Previous research has largely analyzed this problem from a high-level, "macro" perspective. This paper aims to bridge this gap by offering a "microscopic" analysis, focusing on the instantaneous differences between when blocks are created and when they are successfully transmitted across the network.

Methods

The core of this paper's methodology involves:

  • Queuing Theory: The blockchain network is modeled as a service system where block generation is the "demand" and block dissemination is the "supply." The "queue backlog" represents the mismatch between these two.
  • Large Deviation Theory: This powerful mathematical tool is used to analyze the probability of rare events, specifically the probability of natural forking occurring when the mismatch exceeds a certain threshold.
  • Three-Step Modeling Approach: The analysis progresses from simpler to more complex scenarios:
  • Single-Source i.i.d. Scheme: Assumes all nodes act as a single source, generating blocks independently and identically distributed (i.i.d.).
  • Single-Source Non-i.i.d. Scheme: Treats nodes as a single source but allows for correlated block generation rates over time, reflecting more realistic network dynamics.
  • Many-Source Non-i.i.d. Scheme: Models each node as an individual source with correlated block generation, providing the most granular and realistic analysis.
  • Inconsistency-Resistance Degree: A novel concept introduced to define the maximum number of un-disseminated blocks a system can tolerate before a fork is likely.

Datasets

Not discussed in the paper. The analysis relies on theoretical modeling and simulations rather than specific datasets.

Key Insights and Ideas

  • Microscopic View is Crucial: The paper strongly argues that understanding the instantaneous mismatch between block creation and dissemination is key to truly grasping natural forking, moving beyond macro-level observations.
  • Inconsistency-Resistance Degree: This concept provides a quantifiable measure of a blockchain's resilience to forks, acting as a threshold for when a fork becomes probable.
  • Exponential Decay of Forking Probability: The probability of a fork decreases exponentially as certain parameters increase, offering a clear path for mitigation.
  • Parameter Tuning for Robustness: The research highlights specific parameters that can be adjusted to significantly reduce forking probability.

Key Results

The paper presents several key findings derived from theoretical analysis and simulations:

  • Parameter Influence: The probability of a block generation/dissemination mismatch exceeding a given threshold decreases exponentially with:
  • An increase in the "natural forking robustness related parameter" (denoted as q or Ω).
  • An increase in the difference between the block dissemination rate and the block creation rate.
  • Dominant Parameter: In some cases, the "natural forking robustness related parameter" has a more pronounced effect on accelerating the resolution of natural forks.
  • Self-Correlated Block Generation: When block generation rates are self-correlated (modeled as a stationary autoregressive process), setting a lower scaling parameter can speed up the failure (resolution) of natural forking.
  • Effective Countermeasures: The paper introduces concepts like "effective inconsistency-resistance degree" and "effective network transmission rate," which provide theoretical underpinnings for designing optimal defenses against natural forking.

Limitations and Future Work

  • Delay Attack Exclusion: The current analysis does not explicitly consider deliberate delay attacks by malicious adversaries, though the authors suggest their framework could be adapted.
  • Computational Complexity: Deriving analytical solutions for the rate function in more complex scenarios (like the many-source non-i.i.d. scheme) is computationally intensive, leading to reliance on numerical simulations.
  • Future Work: The authors suggest further investigation into the optimal value of the inconsistency-resistance degree (Ω) and exploring how different network topologies might influence these findings. The paper also hints at applying this framework to analyze other types of blockchain attacks.

Summary updated

Abstract

Natural forking in blockchain refers to a phenomenon that there are a set of blocks at one block height at the same time, implying that various nodes have different perspectives of the main chain. Natural forking might give rise to multiple adverse impacts on blockchain, jeopardizing the performance and security of the system consequently. However, the ongoing literature in analyzing natural forking is mainly from the macro point of view, which is not sufficient to incisively understand this phenomenon. In this paper, we fill this gap through leveraging the large deviation theory to conduct a microscopic study of natural forking, which resorts to investigating the instantaneous difference between block generation and dissemination in blockchain. Our work is derived comprehensively and complementarily via a three-step process, where both the natural forking probability and its decay rate are presented. Through solid theoretical derivation and extensive numerical simulations, we find 1) the probability of the mismatch between block generation and dissemination exceeding a given threshold dwindles exponentially with the increase of natural forking robustness related parameter or the difference between the block dissemination rate and block creation rate; 2) the natural forking robustness related parameter may emphasize a more dominant effect on accelerating the abortion of natural forking in some cases; 3) when the self-correlated block generation rate is depicted as the stationary autoregressive process with a scaling parameter, it is found that setting a lower scaling parameter may speed up the failure of natural forking. These findings are valuable since they offer a fresh theoretical basis to engineer optimal countermeasures for thwarting natural forking and thereby enlivening the blockchain network.
BibTeX
@misc{shi2021micro,
  author = {Hongwei Shi and Shengling Wang and Qin Hu and Xiuzhen Cheng},
  title = {{Micro Analysis of Natural Forking in Blockchain Based on Large Deviation Theory}},
  year = {2021},
  eprint = {2105.09535},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2105.09535},
}
Figure