Expand description
§Encode and Decode Predicates
§Encoding
§Predicate
| Field | Size (bytes) | Description |
|---|---|---|
| number_of_nodes | 2 | The number of nodes in the predicate. |
| nodes | 35 * number_of_nodes | The nodes in the predicate. |
| number_of_edges | 2 | The number of edges in the predicate. |
| edges | 2 * number_of_edges | The edges in the predicate. |
§Node
| Field | Size (bytes) | Description |
|---|---|---|
| edge_start | 2 | The index of the first edge in the edge list. |
| program_address | 32 | The address of the program. |
| reads | 1 | The type of state this program has access to. |
§Edge
| Field | Size (bytes) | Description |
|---|---|---|
| edge | 2 | The index of the node that this edge points to. |
Enums§
- Errors that can occur when decoding a predicate.
- Errors that can occur when encoding a predicate.
Functions§
- Decode a predicate from bytes.
- Encode a predicate into bytes.
- The size of the encoded predicate.