Hawkynt

LRC Pyramid Code

Hierarchical locally recoverable code with pyramid structure used in Microsoft Azure Storage. 12+2+2 configuration with local parity groups enabling fast single-failure recovery and global parity for multiple failures. Reduces I/O for repairs compared to Reed-Solomon while optimizing bandwidth versus reliability trade-off.

Properties

Property Value
Category Error Correction
Sub-category Locally Recoverable Code
Security status πŸŽ“ Educational Only
Complexity Advanced
Inventor Cheng Huang, Huseyin Simitci, Yikang Xu
Year 2012
Origin πŸ‡ΊπŸ‡Έ United States
Source algorithms/ecc/lrc-pyramid-code.js

Security

Status: πŸŽ“ Educational Only

Known vulnerabilities

Issue Description Mitigation
Limited Global Error Correction With only 2 global parities, can only correct up to 2 erasures beyond local group capacity. Multiple failures in different groups may exceed correction capability. β€”
Local Group Dependency If both symbols in a local parity group fail along with the local parity, local recovery is impossible and requires global reconstruction. β€”
Bandwidth Trade-off While reducing I/O for single failures, still requires significant bandwidth for multiple concurrent failures affecting multiple local groups. β€”

Documentation

References

Test vectors

6 vectors ship with this algorithm and run in the test suite. Byte values are hexadecimal.

Vector 1 β€” LRC Pyramid (12,2,2) all zeros

Field Value
input 000000000000000000000000
expected 00000000000000000000000000000000

Vector 2 β€” LRC Pyramid (12,2,2) single data block in first local group

Field Value
input 010000000000000000000000
expected 01000000000000000000000001000101

Vector 3 β€” LRC Pyramid (12,2,2) single data block in second local group

Field Value
input 000000000000010000000000
expected 00000000000001000000000000010107

Vector 4 β€” LRC Pyramid (12,2,2) alternating pattern

Field Value
input 010001000100010001000100
expected 01000100010001000100010001010002

Vector 5 β€” LRC Pyramid (12,2,2) full ones pattern

Field Value
input 010101010101010101010101
expected 0101010101010101010101010000000c

Vector 6 β€” LRC Pyramid (12,2,2) mixed values testing local and global parities

Field Value
input 0503070204060801090b0d0f
expected 0503070204060801090b0d0f01090806

← All algorithms