Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Latex rendering #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions p2p/shred.md
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ When using Merkle authentication,
the interpretation of "data shred" used for erasure coding begins immediately after the signature field
and ends immediately before the Merkle proof section.

Let $x_{i,b}$ be the $b$-th byte of the $i$-th data shred of the FEC set (numbered $0, 1, \ldots, N-1$) interpreted as an element of the finite field $GF(2^8)$ (i.e. $\mathbb{F}_2[\gamma] / (\gamma^8 + \gamma^4 + \gamma^3 + \gamma^2 + 1)$).
Let $x_{i,b}$ be the $b$-th byte of the $i$-th data shred of the FEC set (numbered $0, 1, \ldots, N-1$) interpreted as an element of the finite field $GF(2^8)$ (i.e.
$\mathbb{F}_2[\gamma] / (\gamma^8 + \gamma^4 + \gamma^3 + \gamma^2 + 1)$

Taking one $b$ at a time, define the polynomial $P_b(x)$ of order less than $N$ such that $P_b(i) = x_i$ for all $0\le i < N$ (interpreting the byte value of $i$ as an element of $GF(2^8)$).
This polynomial is unique.
Expand All @@ -322,15 +323,20 @@ More precisely, let $y_{j,b}$ be the $b$-th byte of the $j$-th code shred for $0
Then $y_{j,b} = P_b(N+j)$, where $N+j$ is computed as an integer and then interpreted as an element of $GF(2^8)$.

Equivalently, this is a linear operation, so it can also be described as a matrix-vector product over $GF(2^8)$:
$$ M \left( \begin{array}{c}
$$
M \left( \begin{array}{c}
x_{0,b} \\
x_{1,b} \\
\vdots \\
x_{N-1,b} \end{array} \right) = \left( \begin{array}{c}
y_{0,b} \\
y_{1,b} \\
\vdots \\
y_{K-1,b} \end{array} \right).$$
y_{K-1,b} \end{array} \right)
$$
![image](https://github.com/solana-foundation/specs/assets/88841339/88db191a-8e0d-400e-88bc-f8b2ff2c3644)



The matrix $M$ depends only on $N$ and $K$.
There are various ways to compute $M$, but one description is
Expand Down