From 2c16cebc30918560246af47f052bdcf6c24d7685 Mon Sep 17 00:00:00 2001 From: Jan Ferdinand Sauer Date: Tue, 17 Oct 2023 10:53:16 +0200 Subject: [PATCH] upgrade dependencies --- Cargo.lock | 113 +++++++++--------- Cargo.toml | 2 +- src/tasm_code_generator.rs | 4 +- .../test_helpers/shared_test.rs | 11 +- 4 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index dab0fae7..d9875c67 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -15,9 +15,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea5d730647d4fadd988536d06fecce94b7b4f2a7efdae548f1cf4b63205518ab" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -63,9 +63,9 @@ checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "arbitrary" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" +checksum = "a2e1373abdaa212b704512ec2bd8b26bd0b7d5c3f70117411a5d9a451383c859" dependencies = [ "derive_arbitrary", ] @@ -91,7 +91,7 @@ dependencies = [ "attribute-derive-macro", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -107,7 +107,7 @@ dependencies = [ "proc-macro2", "quote", "quote-use", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -137,9 +137,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "blake3" @@ -195,9 +195,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cargo-husky" @@ -416,7 +416,7 @@ checksum = "146398d62142a0f35248a608f17edf0dde57338354966d6e41d0eb2d16980ccb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -427,16 +427,16 @@ checksum = "53e0efad4403bfc52dc201159c4b842a246a14b98c64b55dfd0f2d89729dfeb8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] name = "derive_tasm_object" version = "0.1.0" -source = "git+https://github.com/TritonVM/tasm-lib.git#e9bfe5a2f90d399d2827a0ab17034708b5807b3d" +source = "git+https://github.com/TritonVM/tasm-lib.git#24736170fa751188dcb6d7bf1bb6e08d24bdc3c7" dependencies = [ "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -476,11 +476,10 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add4f07d43996f76ef320709726a556a9d4f965d9410d8d0271132d2f8293480" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys", ] @@ -556,7 +555,7 @@ checksum = "13a1bcfb855c1f340d5913ab542e36f25a1c56f57de79022928297632435dec2" dependencies = [ "attribute-derive", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -706,21 +705,21 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.148" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libm" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "linux-raw-sys" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3852614a3bd9ca9804678ba6be5e3b8ce76dfc902cae004e3e0c44051b6e88db" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "log" @@ -853,9 +852,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", "libm", @@ -909,7 +908,7 @@ dependencies = [ "phf_shared", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -992,9 +991,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.67" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -1016,7 +1015,7 @@ checksum = "a7b5abe3fe82fdeeb93f44d66a7b444dedf2e4827defb0a8e69c437b2de2ef94" dependencies = [ "quote", "quote-use-macros", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1028,7 +1027,7 @@ dependencies = [ "derive-where", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1099,9 +1098,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.6" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebee201405406dbf528b8b672104ae6d6d63e6d118cb10e4d51abbc7b58044ff" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", @@ -1111,9 +1110,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.9" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b23e92ee4318893fa3fe3e6fb365258efbfe6ac6ab30f090cdcbb7aa37efa9" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", @@ -1122,18 +1121,18 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.7.5" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "rustix" -version = "0.38.17" +version = "0.38.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25469e9ae0f3d0047ca8b93fc56843f38e6774f0914a107ff8b41be8be8e0b7" +checksum = "745ecfa778e66b2b63c88a61cb36e0eea109e803b0b86bf9879fbc77c70e86ed" dependencies = [ "bitflags", - "errno 0.3.4", + "errno 0.3.5", "libc", "linux-raw-sys", "windows-sys", @@ -1182,9 +1181,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] @@ -1200,13 +1199,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.188" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1255,18 +1254,21 @@ name = "strum" version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" +dependencies = [ + "strum_macros", +] [[package]] name = "strum_macros" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059" +checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.37", + "syn 2.0.38", ] [[package]] @@ -1282,9 +1284,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.37" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", @@ -1315,7 +1317,7 @@ dependencies = [ [[package]] name = "tasm-lib" version = "0.2.1" -source = "git+https://github.com/TritonVM/tasm-lib.git#e9bfe5a2f90d399d2827a0ab17034708b5807b3d" +source = "git+https://github.com/TritonVM/tasm-lib.git#24736170fa751188dcb6d7bf1bb6e08d24bdc3c7" dependencies = [ "anyhow", "derive_tasm_object", @@ -1343,9 +1345,9 @@ dependencies = [ [[package]] name = "triton-vm" -version = "0.34.0" +version = "0.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34e4ee8cb9dbb1adde31b546dd86c243800519cad51d3705a1fd71cef5090500" +checksum = "142e5ffedc02f6bb47fed61179956f6653927ce357bf1e2c84cd8e5c1025248b" dependencies = [ "anyhow", "arbitrary", @@ -1366,7 +1368,6 @@ dependencies = [ "serde", "serde_derive", "strum", - "strum_macros", "twenty-first", "unicode-width", ] @@ -1462,7 +1463,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -1484,7 +1485,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.37", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/Cargo.toml b/Cargo.toml index 8511a3f0..e08e292f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ num = "0.4" rand = "0" syn = { version = "1.0", features = ["full", "extra-traits"] } tasm-lib = { git = "https://github.com/TritonVM/tasm-lib.git" } -triton-vm = "0.34" +triton-vm = "0.35" twenty-first = "0.34" [dev-dependencies] diff --git a/src/tasm_code_generator.rs b/src/tasm_code_generator.rs index 867a7f94..cdbaf3b7 100644 --- a/src/tasm_code_generator.rs +++ b/src/tasm_code_generator.rs @@ -1828,7 +1828,7 @@ fn compile_expr( {&lhs_expr_code} {&rhs_expr_code} swap 1 - div + div_mod pop ) } @@ -1936,7 +1936,7 @@ fn compile_expr( {&lhs_expr_code} {&rhs_expr_code} swap 1 - div + div_mod swap 1 pop ) diff --git a/src/tests_and_benchmarks/test_helpers/shared_test.rs b/src/tests_and_benchmarks/test_helpers/shared_test.rs index 0c494561..1fd6d0a0 100644 --- a/src/tests_and_benchmarks/test_helpers/shared_test.rs +++ b/src/tests_and_benchmarks/test_helpers/shared_test.rs @@ -6,8 +6,7 @@ use itertools::Itertools; use std::collections::HashMap; use tasm_lib::memory::dyn_malloc::{self, DYN_MALLOC_ADDRESS}; use tasm_lib::{ - get_init_tvm_stack, program_with_state_preparation, rust_shadowing_helper_functions, - DIGEST_LENGTH, + empty_stack, program_with_state_preparation, rust_shadowing_helper_functions, DIGEST_LENGTH, }; use triton_vm::instruction::LabelledInstruction; use triton_vm::{Digest, NonDeterminism, PublicInput}; @@ -98,7 +97,7 @@ pub fn execute_compiled_with_stack_memory_and_ins_for_bench( non_determinism: NonDeterminism, expected_stack_diff: isize, ) -> anyhow::Result { - let mut stack = get_init_tvm_stack(); + let mut stack = empty_stack(); for input_arg in input_args { let input_arg_seq = input_arg.encode(); stack.append(&mut input_arg_seq.into_iter().rev().collect()); @@ -125,7 +124,7 @@ pub fn execute_compiled_with_stack_memory_and_ins_for_test( mut non_determinism: NonDeterminism, _expected_stack_diff: isize, ) -> anyhow::Result { - let mut init_stack = get_init_tvm_stack(); + let mut init_stack = empty_stack(); for input_arg in input_args { let input_arg_seq = input_arg.encode(); init_stack.append(&mut input_arg_seq.into_iter().rev().collect()); @@ -256,13 +255,13 @@ pub fn compare_compiled_prop_with_stack_and_memory_and_ins( std_in: Vec, non_determinism: NonDeterminism, ) { - let mut expected_final_stack = get_init_tvm_stack(); + let mut expected_final_stack = empty_stack(); for output in expected_outputs { let output_seq = output.encode(); expected_final_stack.append(&mut output_seq.into_iter().rev().collect()); } - let init_stack_length: usize = get_init_tvm_stack().len() + let init_stack_length: usize = empty_stack().len() + input_args .iter() .map(|arg| arg.get_type().stack_size())