Skip to content

Commit

Permalink
chore(deps): Upgrade dependency tasm-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Sep 16, 2024
1 parent e23450d commit 4619c6c
Show file tree
Hide file tree
Showing 7 changed files with 175 additions and 177 deletions.
26 changes: 12 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rand = "0"
regex = "1.10"
strum = { version = "0.26", features = ["derive"] }
syn = { version = "1.0", features = ["full", "extra-traits"] }
tasm-lib = { git = "https://github.com/TritonVM/tasm-lib.git", rev = "d71f76a2faf09b7c9e277a29bf9f16470dffd4d3" }
tasm-lib = { git = "https://github.com/TritonVM/tasm-lib.git", rev = "9c05dfdc" }

[dev-dependencies]
anyhow = "1"
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions src/tests_and_benchmarks/ozk/programs/recufier/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Recufier {

let extension_tree_merkle_root: Box<Digest> = proof_iter.next_as_merkleroot();

let quot_codeword_weights: [XFieldElement; 592] = <[XFieldElement; 592]>::try_from(
let quot_codeword_weights: [XFieldElement; 596] = <[XFieldElement; 596]>::try_from(
Tip5WithState::sample_scalars(Recufier::num_quotients()),
)
.unwrap();
Expand All @@ -72,24 +72,24 @@ impl Recufier {
let out_of_domain_curr_row_quot_segments: Box<[XFieldElement; 4]> =
proof_iter.next_as_outofdomainquotientsegments();

let air_evaluation_result: [XFieldElement; 592] =
tasm::tasmlib_verifier_master_aux_table_air_constraint_evaluation(
let air_evaluation_result: [XFieldElement; 596] =
tasm::tasmlib_verifier_master_table_air_constraint_evaluation(
&out_of_domain_curr_main_row,
&out_of_domain_curr_aux_row,
&out_of_domain_next_main_row,
&out_of_domain_next_aux_row,
);

let quotient_summands: [XFieldElement; 592] =
tasm::tasmlib_verifier_master_aux_table_divide_out_zerofiers(
let quotient_summands: [XFieldElement; 596] =
tasm::tasmlib_verifier_master_table_divide_out_zerofiers(
air_evaluation_result,
out_of_domain_point_curr_row,
padded_height,
trace_domain_generator,
);

let out_of_domain_quotient_value: XFieldElement =
tasm::tasmlib_array_inner_product_of_592_xfes(quot_codeword_weights, quotient_summands);
tasm::tasmlib_array_inner_product_of_596_xfes(quot_codeword_weights, quotient_summands);

let sum_of_evaluated_out_of_domain_quotient_segments: XFieldElement =
tasm::tasmlib_array_horner_evaluation_with_4_coefficients(
Expand Down Expand Up @@ -152,7 +152,7 @@ impl Recufier {

// hash base rows to get leafs
let merkle_tree_height: u32 = fri.domain_length.ilog2();
tasm::tasmlib_verifier_master_aux_table_verify_Main_table_rows(
tasm::tasmlib_verifier_master_table_verify_Main_table_rows(
num_combination_codeword_checks,
merkle_tree_height,
&main_merkle_tree_root,
Expand All @@ -167,7 +167,7 @@ impl Recufier {
let _dummy: Box<Vec<Digest>> = proof_iter.next_as_authenticationstructure();
}

tasm::tasmlib_verifier_master_aux_table_verify_Aux_table_rows(
tasm::tasmlib_verifier_master_table_verify_Aux_table_rows(
num_combination_codeword_checks,
merkle_tree_height,
&extension_tree_merkle_root,
Expand All @@ -184,7 +184,7 @@ impl Recufier {
let _dummy: Box<Vec<Digest>> = proof_iter.next_as_authenticationstructure();
}

tasm::tasmlib_verifier_master_aux_table_verify_Quotient_table_rows(
tasm::tasmlib_verifier_master_table_verify_Quotient_table_rows(
num_combination_codeword_checks,
merkle_tree_height,
&quotient_tree_merkle_root,
Expand All @@ -200,8 +200,8 @@ impl Recufier {
assert!(num_combination_codeword_checks == quotient_segment_elements.len());

// Main loop
let trace_weights: [XFieldElement; 463] =
<[XFieldElement; 463]>::try_from(main_and_aux_codeword_weights).unwrap();
let trace_weights: [XFieldElement; 467] =
<[XFieldElement; 467]>::try_from(main_and_aux_codeword_weights).unwrap();
{
let mut i: usize = 0;
while i < num_combination_codeword_checks {
Expand Down Expand Up @@ -257,19 +257,19 @@ impl Recufier {
}

const fn num_quotients() -> usize {
return 592;
return 596;
}

const fn num_main_aux_quotient_deep_weights() -> usize {
return 470;
return 474;
}

fn num_columns_plus_quotient_segments() -> usize {
return 467;
return 471;
}

fn num_columns() -> usize {
return 463;
return 467;
}

#[allow(clippy::boxed_local)]
Expand Down Expand Up @@ -445,7 +445,7 @@ mod test {
fn num_columns_agrees_with_tvm() {
assert_eq!(
Recufier::num_columns(),
MasterMainTable::NUM_COLUMNS + MasterAuxTable::NUM_COLUMNS
MasterMainTable::NUM_COLUMNS + MasterAuxTable::NUM_COLUMNS,
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ mod test {
let a_merkle_root: Box<Digest> = vm_proof_iter.next_as_merkleroot();
tasm::tasmlib_io_write_to_stdout___digest(*a_merkle_root);

let out_of_domain_main_row: Box<Box<[XFieldElement; 375]>> =
let out_of_domain_main_row: Box<Box<[XFieldElement; 379]>> =
vm_proof_iter.next_as_outofdomainmainrow();
tasm::tasmlib_io_write_to_stdout___xfe(out_of_domain_main_row[0]);
tasm::tasmlib_io_write_to_stdout___xfe(out_of_domain_main_row[1]);
Expand All @@ -57,7 +57,7 @@ mod test {
tasm::tasmlib_io_write_to_stdout___digest(authentication_structure[1]);
tasm::tasmlib_io_write_to_stdout___digest(authentication_structure[2]);

let mbtw: Box<Vec<[BFieldElement; 375]>> = vm_proof_iter.next_as_mastermaintablerows();
let mbtw: Box<Vec<[BFieldElement; 379]>> = vm_proof_iter.next_as_mastermaintablerows();
{
let mut j: usize = 0;
while j < mbtw.len() {
Expand Down
22 changes: 11 additions & 11 deletions src/tests_and_benchmarks/ozk/rust_shadows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ use tasm_lib::twenty_first::math::x_field_element::EXTENSION_DEGREE;
use tasm_lib::twenty_first::util_types::algebraic_hasher::AlgebraicHasher;
use tasm_lib::twenty_first::util_types::algebraic_hasher::Sponge;
use tasm_lib::twenty_first::util_types::merkle_tree::MerkleTreeInclusionProof;
use tasm_lib::verifier::master_aux_table::air_constraint_evaluation;
use tasm_lib::verifier::master_aux_table::air_constraint_evaluation::AirConstraintEvaluation;
use tasm_lib::verifier::master_aux_table::air_constraint_evaluation::AirConstraintSnippetInputs;
use tasm_lib::verifier::master_table::air_constraint_evaluation;
use tasm_lib::verifier::master_table::air_constraint_evaluation::AirConstraintEvaluation;
use tasm_lib::verifier::master_table::air_constraint_evaluation::AirConstraintSnippetInputs;

use crate::tests_and_benchmarks::ozk::programs::recufier::challenges::Challenges as TasmLangChallenges;
use crate::tests_and_benchmarks::ozk::programs::recufier::stark_parameters::FriVerify;
Expand Down Expand Up @@ -358,9 +358,9 @@ pub(super) fn tasmlib_array_inner_product_of_4_xfes(
inner_product(&a, &b)
}

pub(super) fn tasmlib_array_inner_product_of_592_xfes(
a: [XFieldElement; 592],
b: [XFieldElement; 592],
pub(super) fn tasmlib_array_inner_product_of_596_xfes(
a: [XFieldElement; 596],
b: [XFieldElement; 596],
) -> XFieldElement {
inner_product(&a, &b)
}
Expand All @@ -379,7 +379,7 @@ pub(super) fn tasmlib_array_horner_evaluation_with_4_coefficients(
running_evaluation
}

pub(super) fn tasmlib_verifier_master_aux_table_air_constraint_evaluation(
pub(super) fn tasmlib_verifier_master_table_air_constraint_evaluation(
curr_main: &MainRow<XFieldElement>,
curr_aux: &AuxiliaryRow,
next_main: &MainRow<XFieldElement>,
Expand Down Expand Up @@ -411,7 +411,7 @@ pub(super) fn tasmlib_verifier_master_aux_table_air_constraint_evaluation(
.unwrap()
}

pub(super) fn tasmlib_verifier_master_aux_table_divide_out_zerofiers(
pub(super) fn tasmlib_verifier_master_table_divide_out_zerofiers(
mut air_evaluation_result: [XFieldElement; MasterAuxTable::NUM_CONSTRAINTS],
out_of_domain_point_curr_row: XFieldElement,
padded_height: u32,
Expand Down Expand Up @@ -456,7 +456,7 @@ pub(super) fn tasmlib_verifier_master_aux_table_divide_out_zerofiers(
}

#[allow(non_snake_case)] // Name must agree with `tasm-lib`
pub(super) fn tasmlib_verifier_master_aux_table_verify_Main_table_rows(
pub(super) fn tasmlib_verifier_master_table_verify_Main_table_rows(
num_combination_codeword_checks: usize,
merkle_tree_height: u32,
merkle_tree_root: &Digest,
Expand All @@ -479,7 +479,7 @@ pub(super) fn tasmlib_verifier_master_aux_table_verify_Main_table_rows(
}

#[allow(non_snake_case)] // Name must agree with `tasm-lib`
pub(super) fn tasmlib_verifier_master_aux_table_verify_Aux_table_rows(
pub(super) fn tasmlib_verifier_master_table_verify_Aux_table_rows(
num_combination_codeword_checks: usize,
merkle_tree_height: u32,
merkle_tree_root: &Digest,
Expand All @@ -505,7 +505,7 @@ pub(super) fn tasmlib_verifier_master_aux_table_verify_Aux_table_rows(
}

#[allow(non_snake_case)] // Name must agree with `tasm-lib`
pub(super) fn tasmlib_verifier_master_aux_table_verify_Quotient_table_rows(
pub(super) fn tasmlib_verifier_master_table_verify_Quotient_table_rows(
num_combination_codeword_checks: usize,
merkle_tree_height: u32,
merkle_tree_root: &Digest,
Expand Down

0 comments on commit 4619c6c

Please sign in to comment.