#walrus
Walrus Protocol's Red Stuff is a two-dimensional (2D) erasure coding algorithm designed for efficient, resilient decentralized storage on Sui. It fragments large data blobs into slivers distributed across nodes, achieving high fault tolerance (up to 1/3 Byzantine faults) with a low 4-5x replication factor.
Data starts as a rectangular message matrix of symbols (rows nR, columns nC). Primary encoding applies RaptorQ to each column, expanding to N symbols per column to form primary slivers from the final matrix rows.
Secondary encoding simultaneously processes rows into secondary slivers from final matrix columns, using simple XOR and linear operations for speed.
Distribution and RecoveryEach storage node receives a unique primary-secondary sliver pair, ensuring every node holds data spanning all original rows and columns.Writes require 2/3 node quorum acknowledgments; reads need only 1/3 honest nodes for reconstruction via self-healing, leveraging dimension-specific thresholds.
Commitments over slivers create verifiable blob IDs on Sui for proofs.This 2D structure enables asynchronous proofs, rapid recovery with minimal bandwidth, and scalability over hundreds of nodes, outperforming 1D Reed-Solomon by reducing trade-offs in security, cost and speed.