@@ -21,9 +21,9 @@ pub type OrionResult<T> = std::result::Result<T, OrionPCSError>;
21
21
* IMPLEMENTATIONS FOR ORION EXPANDER GRAPH *
22
22
********************************************/
23
23
24
- type Edge = usize ;
24
+ type DiredtedEdge = usize ;
25
25
26
- type Neighboring = Vec < Edge > ;
26
+ type DirectedNeighboring = Vec < DiredtedEdge > ;
27
27
28
28
#[ derive( Clone ) ]
29
29
pub struct OrionExpanderGraph {
@@ -37,7 +37,7 @@ pub struct OrionExpanderGraph {
37
37
// of vertices in R set of the bipariate graph, which explains why it has
38
38
// size of l_vertices_size, while each neighboring reserved r_vertices_size
39
39
// capacity.
40
- pub neighborings : Vec < Neighboring > ,
40
+ pub neighborings : Vec < DirectedNeighboring > ,
41
41
}
42
42
43
43
impl OrionExpanderGraph {
@@ -47,7 +47,7 @@ impl OrionExpanderGraph {
47
47
expanding_degree : usize ,
48
48
mut rng : impl rand:: RngCore ,
49
49
) -> Self {
50
- let mut neighborings: Vec < Neighboring > =
50
+ let mut neighborings: Vec < DirectedNeighboring > =
51
51
vec ! [ Vec :: with_capacity( l_vertices_size) ; r_vertices_size] ;
52
52
53
53
( 0 ..l_vertices_size) . for_each ( |l_index| {
@@ -90,7 +90,7 @@ impl OrionExpanderGraph {
90
90
* IMPLEMENTATIONS FOR ORION CODE FROM EXPANDER GRAPH *
91
91
******************************************************/
92
92
93
- #[ derive( Debug , Clone , Copy ) ]
93
+ #[ derive( Debug , Clone , Copy , PartialEq ) ]
94
94
pub struct OrionCodeParameter {
95
95
// empirical parameters for the expander code on input/output size
96
96
// NOTE: the derived code rate and invert code rate should preserve
@@ -206,8 +206,8 @@ impl OrionCode {
206
206
207
207
recursive_code_msg_code_starts. push ( ( g0_input_starts, g0_output_starts) ) ;
208
208
209
- g0_input_starts = g0_output_starts;
210
- g0_output_starts += g0_output_len;
209
+ ( g0_input_starts, g0_output_starts) =
210
+ ( g0_output_starts, g0_output_starts + g0_output_len) ;
211
211
}
212
212
213
213
let mut g1_output_starts = g0_output_starts;
@@ -259,3 +259,13 @@ impl OrionCode {
259
259
Ok ( codeword)
260
260
}
261
261
}
262
+
263
+ /**********************************************************
264
+ * IMPLEMENTATIONS FOR ORION POLYNOMIAL COMMITMENT SCHEME *
265
+ **********************************************************/
266
+
267
+ // TODO multilinear polynomial
268
+ // TODO write to matrix, encode each row (k x k matrix)
269
+ // TODO need a merkle tree to commit each column (k x n matrix)
270
+ // - TODO need a cache friendly transpose
271
+ // TODO need a merkle tree to commit against all merkle tree roots
0 commit comments