Skip to content

Commit

Permalink
chore(deps): Upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-ferdinand committed Sep 10, 2024
1 parent 0c8aad0 commit 2a540f1
Show file tree
Hide file tree
Showing 32 changed files with 507 additions and 227 deletions.
424 changes: 345 additions & 79 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ anyhow = "1"
chrono = "^0.4.38"
clap = "4.5"
inflections = "1.1"
itertools = "0.12"
itertools = "0.13"
num = "0.4"
quote = "1.0"
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 = "4f58791ecab112971e38c3ad5042b21ec88a85af" }
tasm-lib = { git = "https://github.com/TritonVM/tasm-lib.git", rev = "fc7a22d7" }

[dev-dependencies]
anyhow = "1"
Expand All @@ -24,11 +24,11 @@ field_count = "0.1.1"
pretty_assertions = "1.4"
proptest = "1.5"
proptest-arbitrary-interop = "0.1"
reqwest = { version = "0.11", features = ["blocking"] }
reqwest = { version = "0.12", features = ["blocking"] }
serde = { version = "1", features = ["derive"] }
serde_derive = "1"
serde_json = "1"
test-strategy = "0.3"
test-strategy = "0.4"

[dev-dependencies.cargo-husky]
version = "1"
Expand Down
14 changes: 8 additions & 6 deletions src/ast_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ use std::str::FromStr;
use anyhow::bail;
use itertools::Itertools;
use regex::Regex;
use tasm_lib::triton_vm::table::{NUM_BASE_COLUMNS, NUM_EXT_COLUMNS, NUM_QUOTIENT_SEGMENTS};

use crate::ast::FnSignature;
use tasm_lib::triton_vm::table::master_table::MasterMainTable;
use tasm_lib::triton_vm::table::NUM_QUOTIENT_SEGMENTS;

pub(crate) use self::abstract_argument::*;
pub(crate) use self::array_type::ArrayType;
Expand All @@ -17,6 +16,9 @@ pub(crate) use self::field_id::FieldId;
pub(crate) use self::function_type::FunctionType;
pub(crate) use self::struct_type::*;
pub(crate) use self::tuple::Tuple;
use crate::ast::FnSignature;
use crate::triton_vm::table::master_table::MasterAuxTable;
use crate::triton_vm::table::master_table::MasterTable;

pub(crate) mod abstract_argument;
pub(crate) mod array_type;
Expand Down Expand Up @@ -116,15 +118,15 @@ impl DataType {
"FriResponse" => Ok(DataType::Unresolved(type_str.to_owned())),
"BaseRow<XFieldElement>" => Ok(DataType::Array(ArrayType {
element_type: Box::new(DataType::Xfe),
length: NUM_BASE_COLUMNS,
length: MasterMainTable::NUM_COLUMNS,
})),
"BaseRow<BFieldElement>" => Ok(DataType::Array(ArrayType {
element_type: Box::new(DataType::Bfe),
length: NUM_BASE_COLUMNS,
length: MasterMainTable::NUM_COLUMNS,
})),
"ExtensionRow" => Ok(DataType::Array(ArrayType {
element_type: Box::new(DataType::Xfe),
length: NUM_EXT_COLUMNS,
length: MasterAuxTable::NUM_COLUMNS,
})),
"QuotientSegments" => Ok(DataType::Array(ArrayType {
element_type: Box::new(DataType::Xfe),
Expand Down
2 changes: 1 addition & 1 deletion src/ast_types/tuple.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use itertools::Itertools;
use tasm_lib::triton_vm::triton_asm;
use tasm_lib::triton_vm::prelude::triton_asm;

use crate::ast::FnSignature;
use crate::libraries::LibraryFunction;
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/core/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use crate::composite_types::CompositeTypes;
use crate::libraries::core::result_type;
use crate::subroutine::SubRoutine;
use crate::tasm_code_generator::CompilerState;
use crate::triton_vm::prelude::triton_asm;
use crate::triton_vm::prelude::LabelledInstruction;
use crate::triton_vm::triton_asm;

pub(crate) fn len_method_signature(array_type: &ArrayType) -> FnSignature {
let value_args = vec![("self", array_type.into())];
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/core/option_type.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use num::One;
use syn::PathArguments;
use tasm_lib::triton_vm::triton_asm;
use tasm_lib::triton_vm::prelude::triton_asm;

use crate::ast;
use crate::ast::FnSignature;
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/core/result_type.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use syn::PathArguments;
use tasm_lib::triton_vm::triton_asm;
use tasm_lib::triton_vm::prelude::triton_asm;

use crate::ast;
use crate::ast::FnSignature;
Expand Down
14 changes: 7 additions & 7 deletions src/libraries/recufy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ mod vm_proof_iter;

use syn::parse_quote;
use syn::PathArguments;
use tasm_lib::triton_vm::table::NUM_BASE_COLUMNS;
use tasm_lib::triton_vm::table::NUM_EXT_COLUMNS;
use tasm_lib::triton_vm::table::master_table::MasterAuxTable;
use tasm_lib::triton_vm::table::NUM_QUOTIENT_SEGMENTS;

use self::vm_proof_iter::graft_vm_proof_iter;
use self::vm_proof_iter::VM_PROOF_ITER_TYPE_NAME;
use crate::ast;
use crate::ast_types;
use crate::ast_types::CustomTypeOil;
Expand All @@ -14,9 +15,8 @@ use crate::ast_types::StructType;
use crate::composite_types::CompositeTypes;
use crate::composite_types::TypeContext;
use crate::graft::Graft;

use self::vm_proof_iter::graft_vm_proof_iter;
use self::vm_proof_iter::VM_PROOF_ITER_TYPE_NAME;
use crate::triton_vm::table::master_table::MasterMainTable;
use crate::triton_vm::table::master_table::MasterTable;

use super::Library;

Expand Down Expand Up @@ -139,7 +139,7 @@ impl RecufyLib {
assert!(matches!(arguments, PathArguments::None));
ast_types::DataType::Array(ast_types::ArrayType {
element_type: Box::new(ast_types::DataType::Xfe),
length: NUM_EXT_COLUMNS,
length: MasterAuxTable::NUM_COLUMNS,
})
}

Expand All @@ -164,7 +164,7 @@ impl RecufyLib {
);
ast_types::DataType::Array(ast_types::ArrayType {
element_type: Box::new(inner),
length: NUM_BASE_COLUMNS,
length: MasterMainTable::NUM_COLUMNS,
})
}
other => panic!("Unsupported type {other:#?}"),
Expand Down
13 changes: 6 additions & 7 deletions src/libraries/recufy/vm_proof_iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ use syn::parse_quote;
use tasm_lib::traits::basic_snippet::BasicSnippet;
use tasm_lib::triton_vm::proof_item::ProofItemVariant;

use crate::ast;
use crate::ast::RoutineBody;
use crate::ast_types::DataType;
use crate::ast_types::StructType;
use crate::composite_types::TypeContext;
use crate::graft::Graft;
use crate::libraries::polynomial::PolynomialLib;
use crate::triton_vm::prelude::*;
use crate::{
ast::{self, RoutineBody},
ast_types::DataType,
composite_types::TypeContext,
graft::Graft,
type_checker::Typing,
};
use crate::type_checker::Typing;

use super::RecufyLib;

Expand Down
2 changes: 1 addition & 1 deletion src/libraries/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use num::One;
use tasm_lib::memory::memcpy::MemCpy;
use tasm_lib::traits::basic_snippet::BasicSnippet;
use tasm_lib::triton_vm::prelude::LabelledInstruction;
use tasm_lib::triton_vm::triton_asm;
use tasm_lib::triton_vm::prelude::triton_asm;

use crate::ast;
use crate::ast::FnSignature;
Expand Down
2 changes: 1 addition & 1 deletion src/tasm_code_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ impl<'a> CompilerState<'a> {
}
}

pub(crate) const SIZE_OF_ACCESSIBLE_STACK: usize = triton_vm::op_stack::NUM_OP_STACK_REGISTERS;
pub(crate) const SIZE_OF_ACCESSIBLE_STACK: usize = triton_vm::isa::op_stack::NUM_OP_STACK_REGISTERS;

#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub(crate) struct ValueIdentifier {
Expand Down
2 changes: 1 addition & 1 deletion src/tasm_code_generator/data_type.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use tasm_lib::list::LIST_METADATA_SIZE;
use tasm_lib::memory::memcpy::MemCpy;
use tasm_lib::triton_vm::op_stack::OpStackElement;
use tasm_lib::triton_vm::isa::op_stack::OpStackElement;
use tasm_lib::triton_vm::prelude::*;

use crate::ast_types;
Expand Down
2 changes: 1 addition & 1 deletion src/tasm_code_generator/data_type/tuple_type.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use tasm_lib::triton_vm::prelude::LabelledInstruction;
use tasm_lib::triton_vm::triton_asm;
use tasm_lib::triton_vm::prelude::triton_asm;

use crate::ast_types::Tuple;
use crate::tasm_code_generator::move_top_stack_value_to_memory;
Expand Down
2 changes: 1 addition & 1 deletion src/tasm_code_generator/inner_function_tasm_code.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use tasm_lib::triton_vm::triton_asm;
use tasm_lib::triton_vm::prelude::triton_asm;

use crate::subroutine::SubRoutine;

Expand Down
2 changes: 1 addition & 1 deletion src/tasm_code_generator/match_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::collections::HashSet;
use itertools::Itertools;
use num::One;
use tasm_lib::triton_vm::prelude::LabelledInstruction;
use tasm_lib::triton_vm::triton_asm;
use tasm_lib::triton_vm::prelude::triton_asm;

use crate::ast;
use crate::ast::MatchCondition;
Expand Down
6 changes: 3 additions & 3 deletions src/tasm_code_generator/outer_function_tasm_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use std::str::FromStr;
use chrono::Local;
use itertools::Itertools;
use tasm_lib::library::Library as SnippetState;
use tasm_lib::triton_vm::instruction;
use tasm_lib::triton_vm::op_stack::NumberOfWords;
use tasm_lib::triton_vm::isa::instruction;
use tasm_lib::triton_vm::isa::op_stack::NumberOfWords;
use tasm_lib::triton_vm::prelude::*;

use crate::ast;
Expand Down Expand Up @@ -304,7 +304,7 @@ impl OuterFunctionTasmCode {
"use crate::snippet::BasicSnippet;
use crate::snippet::DataType;
use crate::Library;
use crate::triton_vm::triton_asm;
use crate::triton_vm::prelude::triton_asm;
pub(crate) struct {snippet_struct_name};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mod tests {
use itertools::Itertools;
use rand::thread_rng;
use rand::Rng;
use tasm_lib::triton_vm::program::NonDeterminism;
use tasm_lib::triton_vm::prelude::NonDeterminism;
use tasm_lib::twenty_first::math::other::random_elements;

use crate::tests_and_benchmarks::ozk::ozk_parsing::EntrypointLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ fn main() {

#[cfg(test)]
mod test {
use super::*;
use tasm_lib::triton_vm::prelude::*;

use crate::tests_and_benchmarks::ozk::ozk_parsing;
use crate::tests_and_benchmarks::ozk::ozk_parsing::EntrypointLocation;
use crate::tests_and_benchmarks::ozk::{ozk_parsing, rust_shadows};
use crate::tests_and_benchmarks::ozk::rust_shadows;
use crate::tests_and_benchmarks::test_helpers::shared_test::*;
use tasm_lib::triton_vm::prelude::*;

use super::*;

#[test]
fn methods_on_nested_structs_simple_test() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn main() {

#[cfg(test)]
mod test {
use tasm_lib::triton_vm::program::NonDeterminism;
use tasm_lib::triton_vm::prelude::NonDeterminism;

use super::*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ impl Foo {

#[cfg(test)]
mod tests {
use tasm_lib::triton_vm::program::NonDeterminism;
use tasm_lib::triton_vm::prelude::NonDeterminism;

use super::*;
use crate::tests_and_benchmarks::ozk::ozk_parsing::EntrypointLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl Foo {

#[cfg(test)]
mod tests {
use tasm_lib::triton_vm::program::NonDeterminism;
use tasm_lib::triton_vm::prelude::NonDeterminism;

use super::*;
use crate::tests_and_benchmarks::ozk::ozk_parsing::EntrypointLocation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ pub(crate) struct FriResponse {
#[derive(BFieldCodec)]
pub(crate) enum ProofItem {
AuthenticationStructure(Vec<Digest>),
MasterBaseTableRows(Vec<Vec<BFieldElement>>),
MasterExtTableRows(Vec<Vec<XFieldElement>>),
OutOfDomainBaseRow(Vec<XFieldElement>),
OutOfDomainExtRow(Vec<XFieldElement>),
MasterMainTableRows(Vec<Vec<BFieldElement>>),
MasterAuxTableRows(Vec<Vec<XFieldElement>>),
OutOfDomainMainRow(Vec<XFieldElement>),
OutOfDomainAuxRow(Vec<XFieldElement>),
OutOfDomainQuotientSegments([XFieldElement; 4]),
MerkleRoot(Digest),
Log2PaddedHeight(u32),
Expand All @@ -35,16 +35,16 @@ impl ProofItem {
ProofItem::AuthenticationStructure(_) => {
discriminant = BFieldElement::new(0);
}
ProofItem::MasterBaseTableRows(_) => {
ProofItem::MasterMainTableRows(_) => {
discriminant = BFieldElement::new(1);
}
ProofItem::MasterExtTableRows(_) => {
ProofItem::MasterAuxTableRows(_) => {
discriminant = BFieldElement::new(2);
}
ProofItem::OutOfDomainBaseRow(_) => {
ProofItem::OutOfDomainMainRow(_) => {
discriminant = BFieldElement::new(3);
}
ProofItem::OutOfDomainExtRow(_) => {
ProofItem::OutOfDomainAuxRow(_) => {
discriminant = BFieldElement::new(4);
}
ProofItem::OutOfDomainQuotientSegments(_) => {
Expand Down Expand Up @@ -97,16 +97,16 @@ fn main() {
ProofItem::AuthenticationStructure(_) => {
panic!();
}
ProofItem::MasterBaseTableRows(_) => {
ProofItem::MasterMainTableRows(_) => {
panic!();
}
ProofItem::MasterExtTableRows(_) => {
ProofItem::MasterAuxTableRows(_) => {
panic!();
}
ProofItem::OutOfDomainBaseRow(_) => {
ProofItem::OutOfDomainMainRow(_) => {
panic!();
}
ProofItem::OutOfDomainExtRow(_) => {
ProofItem::OutOfDomainAuxRow(_) => {
panic!();
}
ProofItem::OutOfDomainQuotientSegments(_) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ mod tests {
use std::collections::HashMap;

use rand::random;
use tasm_lib::triton_vm::program::NonDeterminism;
use tasm_lib::triton_vm::prelude::NonDeterminism;
use tasm_lib::twenty_first::bfe;
use tasm_lib::twenty_first::math::other::random_elements;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mod tests {
#[test]
fn local_challenges_count_agrees_with_tvm() {
assert_eq!(
triton_vm::table::challenges::Challenges::COUNT,
triton_vm::challenges::Challenges::COUNT,
Challenges::count()
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use crate::tests_and_benchmarks::ozk::rust_shadows as tasm;
use crate::{tests_and_benchmarks::ozk::rust_shadows::VmProofIter, triton_vm::prelude::*};
use serde_derive::Serialize;
use tasm_lib::twenty_first::math::traits::PrimitiveRootOfUnity;

use crate::tests_and_benchmarks::ozk::rust_shadows as tasm;
use crate::tests_and_benchmarks::ozk::rust_shadows::VmProofIter;
use crate::triton_vm::prelude::*;

/// See [StarkParameters][params].
///
/// [params]: crate::triton_vm::stark::Stark
Expand Down
Loading

0 comments on commit 2a540f1

Please sign in to comment.