Skip to content

Commit

Permalink
feat: Add snippet for barycentric evaluation
Browse files Browse the repository at this point in the history
This closes #96.
  • Loading branch information
Sword-Smith committed Apr 23, 2024
1 parent ed49c83 commit 8f90779
Show file tree
Hide file tree
Showing 4 changed files with 386 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[
{
"name": "tasmlib_verifier_fri_barycentric_evaluation",
"benchmark_result": {
"clock_cycle_count": 11723,
"hash_table_height": 276,
"u32_table_height": 33,
"op_stack_table_height": 9405,
"ram_table_height": 769
},
"case": "CommonCase"
},
{
"name": "tasmlib_verifier_fri_barycentric_evaluation",
"benchmark_result": {
"clock_cycle_count": 23243,
"hash_table_height": 276,
"u32_table_height": 32,
"op_stack_table_height": 18621,
"ram_table_height": 1537
},
"case": "WorstCase"
}
]
6 changes: 3 additions & 3 deletions tasm-lib/src/rust_shadowing_helper_functions/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,17 @@ pub fn list_insert<T: BFieldCodec>(
}

pub fn insert_random_list(
data_type: &DataType,
element_type: &DataType,
list_pointer: BFieldElement,
list_length: usize,
memory: &mut HashMap<BFieldElement, BFieldElement>,
) {
list_new(list_pointer, memory);

let random_values = data_type.random_elements(list_length);
let random_values = element_type.random_elements(list_length);

for element in random_values {
list_push(list_pointer, element, memory, data_type.stack_size());
list_push(list_pointer, element, memory, element_type.stack_size());
}
}

Expand Down
1 change: 1 addition & 0 deletions tasm-lib/src/verifier/fri.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub mod barycentric_evaluation;
pub mod collinear_y;
pub mod collinearity_check_x;
pub mod derive_from_stark_params;
Expand Down
Loading

0 comments on commit 8f90779

Please sign in to comment.