Skip to main content
QUICK REVIEW

[Paper Review] Coded Merkle Tree: Solving Data Availability Attacks in Blockchains

Mingchao Yu, Saeid Sahraei|arXiv (Cornell University)|Oct 2, 2019
Caching and Content DeliveryComputer Science24 references9 citations
TL;DR

This paper proposes Coded Merkle Tree (CMT), a novel hash accumulator that enables constant-cost data availability verification in blockchains using sparse LDPC codes across Merkle tree layers. By applying iterative peeling decoding on coded layers and batching hashes, CMT allows light nodes to verify block availability with only O(1) header downloads and O(log b) sampling, while enabling efficient fraud proofs with minimal overhead, outperforming prior 2D-RS schemes in decoding speed and communication costs.

ABSTRACT

In this paper, we propose coded Merkle tree (CMT), a novel hash accumulator that offers a constant-cost protection against data availability attacks in blockchains, even if the majority of the network nodes are malicious. A CMT is constructed using a family of sparse erasure codes on each layer, and is recovered by iteratively applying a peeling-decoding technique that enables a compact proof for data availability attack on any layer. Our algorithm enables any node to verify the full availability of any data block generated by the system by just downloading a $Θ(1)$ byte block hash commitment and randomly sampling $Θ(\log b)$ bytes, where $b$ is the size of the data block. With the help of only one connected honest node in the system, our method also allows any node to verify any tampering of the coded Merkle tree by just downloading $Θ(\log b)$ bytes. We provide a modular library for CMT in Rust and Python and demonstrate its efficacy inside the Parity Bitcoin client.

Motivation & Objective

  • To address data availability attacks in blockchains where malicious block producers withhold parts of blocks despite publishing valid headers.
  • To enable light nodes to verify data availability with minimal download costs, even when most full nodes are dishonest.
  • To design a system that allows efficient, compact proofs of incorrect coding or data unavailability, ensuring trust without requiring full block downloads.
  • To achieve constant-cost verification and faster decoding than existing erasure code-based approaches like 2D-RS.
  • To integrate the solution into real blockchain systems with minimal changes and backward compatibility.

Proposed method

  • Constructing a Merkle tree where each layer is encoded using a sparse LDPC code with (6,8) sparsity and a stopping ratio β=0.124 to resist partial data withholding.
  • Batching the hashes of each coded layer into data symbols for the next layer, reducing the number of root hashes to a fixed size t=256.
  • Using iterative peeling decoding on the coded layers to recover data and detect missing or corrupted symbols with high probability.
  • Enabling light nodes to verify data availability by sampling O(log b) coded symbols and validating their Merkle proofs against the CMT root.
  • Generating incorrect-coding proofs using only d−1=7 coded symbols and their Merkle proofs, significantly reducing proof size compared to prior work.
  • Implementing a modular CMT library in Rust and Python that replaces standard Merkle tree APIs, ensuring backward compatibility and low integration overhead.

Experimental results

Research questions

  • RQ1Can a blockchain system enable light nodes to verify data availability with constant communication cost, regardless of block size?
  • RQ2How can a system detect and prove data availability attacks with minimal proof size, even when the majority of nodes are malicious?
  • RQ3Can sparse LDPC codes be used to construct a hash accumulator that supports efficient, compact fraud proofs and sampling-based verification?
  • RQ4What is the trade-off between sampling efficiency, proof size, and decoding speed in coded Merkle trees compared to 2D-RS-based systems?
  • RQ5How can CMT be integrated into existing blockchain clients with minimal changes and no additional bandwidth cost?

Key findings

  • For a 64MB block, SPAR’s header cost is only 0.01% of block size, compared to 0.1% for 2D-RS, demonstrating significant header size reduction.
  • The incorrect-coding proof size in SPAR is 0.051% of block size, which is 10× smaller than 2D-RS’s 0.48% for the same block size.
  • Under a weak adversary, SPAR requires only 8 samples for 99% confidence, while 2D-RS requires 17, due to higher tolerance for missing symbols (47% average vs. 25%).
  • SPAR’s decoding speed is over 10× faster than 2D-RS across all tested block sizes, due to sparse and binary encoding.
  • The sampling cost of SPAR is 2.5–4× higher than 2D-RS under weak adversaries, but can be reduced by increasing the root size t to shrink Merkle proof sizes.
  • The CMT library is backward compatible with standard Merkle trees and can be integrated into existing clients like Parity Bitcoin with minimal changes.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.