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 3 source symbols and 4 repair symbols (si,j indicates source symbols, while ri,j indicates repair symbols).
Each of the columns of this row expansion is a secondary sliver. For example, [r0,6,r1,6,r2,6].
For simplicity, this example and the recovery example pair primary sliver i with secondary sliver i (as in the Walrus paper), and store sliver pair i on shard i. In the implementation, sliver pair i holds primary sliver i and secondary sliver N−1−i, and the sliver-pair-to-shard mapping assigns sliver pairs to shards. Neither difference changes how encoding and recovery work.
Thanks to the linearity of Reed-Solomon codes, the expansion of:
the repair secondary slivers (columns 5 and 6) with the primary encoding, and
the repair 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 sliver. For example, r4,5 can be obtained by:
the secondary-encoding expansion of primary sliver 4: [r4,0,r4,1,r4,2,r4,3,r4,4,r4,5,r4,6], or
the primary-encoding expansion of secondary sliver 5: [r0,5,r1,5,r2,5,r3,5,r4,5,r5,5,r6,5].