1.8 KiB
| title | name | status | tags | editor | contributors |
|---|---|---|---|---|---|
| CODEX-ERASUE-CODING | Codex Erasue Coding | raw | codex |
Abstract
This specification describes the erasue coding technique used in the Codex protocol. Erasue coding is used by the Codex client to encode datasets being presented to the marketplace.
Background
Codex uses storage proofs to determine whether a storage provider is storing a certain dataset. Storage providers agree to store dataset for a period of time and store an encoded dataset provded by the requester. Using erasure coding, client nodes will be able to restore datasets thatare abandoned by storage providers. Also validator nodes are able to detect whether data is missing within a slot.
Semantics
The keywords “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in 2119.
The Codex client performerasure coding locally before provding dataset to the marketplace.
Flow
Before data is provided to storage providers on the marketplace, clients must do the following:
- Create data chunks from the data
- Encode each chunk with Reed Solomon erasue coding, more explained below
- Derive an CID from encoded chunks share on the marketplace
- Error correction by validator nodes once storage contract begins
Create Data chunks
After the user has choosen the prefered data for storage through the marketplace, the Codex client will divide this data into chunks , e.g. Including the manifest, the data chucks will be encoded based on the following parameters:
struct encodingParms {
ecK: int
ecM: int
rounded: int
steps: int
blocksCount: int
strategy:
}