Consider a Walrus instance with N=7=3f+1 shards. This means the number of primary source symbols is N−2f=3, and secondary N−f=5. A blob of size S=15⋅s can therefore be divided into 15 symbols of size s, and arranged in the matrix as follows.
Then, the primary encoding acts on the columns of the matrix, expanding them such that each column is composed of 4 source symbols and 6 recovery symbols (si,j indicates source symbols, while ri,j indicates recovery symbols).
Each of the columns of this row expansion is a secondary sliver. For example, [r0,6,r1,6,r2,6].
The ith sliver pair is composed of the ith primary and ith secondary slivers. For simplicity, consider that the ith sliver pair is stored on shard i. The sliver-pair-to-shard mapping section discusses the full mapping.
Thanks to the linearity of RaptorQ, the expansion of:
the recovery secondary slivers (columns 5 and 6) with the primary encoding, and
the recovery primary slivers (rows 3, 4, 5, and 6) with the secondary encoding,
results in the same set of symbols, which is essential for recovery. These symbols can be represented as the lower-right quadrant of what is called the fully expanded message matrix.
These symbols do not need to be stored on any node because they can always be recomputed by expanding either a primary or secondary symbol. For example, r4,5 can be obtained by:
the secondary-encoding expansion of the 4th primary sliver: [r4,0,r4,1,r4,2,r4,3,r4,4,r4,5,r4,6], or
the primary-encoding expansion of the 5th secondary sliver: [r0,5,r1,5,r2,5,r3,5,r4,5,r5,5,r6,5].
Consider that shard 3 fails, losing its slivers, and needs to recover them. In the following, the symbols of the lost slivers are highlighted in red (the lower quadrant is never stored).
To recover the primary sliver, the node contacts 5 other shards and requests the recovery symbols for the 3rd primary slivers. Because the symbols of the sliver are recovery symbols, the shards need to encode their secondary slivers (highlighted as columns) to obtain them. For example, shards 0, 1, 2, 4, and 6 provide the symbols:
To recover the secondary sliver, the node contacts at least 3 other shards to obtain recovery symbols. In this case, the recovery symbols are already part of the primary slivers (highlighted as rows) stored by the other shards, so no re-encoding is necessary. For example, shards 0, 1, and 5 provide the recovery symbols:
In this case, the symbols s0,3, s1,3, and s2,3 are already stored in the primary slivers of shards 0, 1, and 2 directly. Therefore, by requesting these from those shards, shard 3 does not need to decode the symbols to recover its secondary sliver.
For properties, Walrus-specific parameters, blob size limits, and sliver authentication details, see RedStuff properties and parameters.