Skip to content

Commit

Permalink
chore(deps)!: Upgrade dependencies
Browse files Browse the repository at this point in the history
- Upgrade `twenty-first`.
- Use `get-size2` over unmaintained `get-size`.
  • Loading branch information
jan-ferdinand committed Dec 9, 2024
1 parent a6cc98a commit ed1e8d6
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ clap = { version = "4", features = ["derive", "cargo", "wrap_help", "unicode", "
criterion = { version = "0.5", features = ["html_reports"] }
directories = "5"
fs-err = "3.0"
get-size = "0.1.4"
get-size2 = { version = "0.1.2", features = ["derive"] }
indexmap = { version = "2.5.0", features = ["rayon"] }
insta = "1.41.0"
itertools = "0.13"
Expand All @@ -87,7 +87,7 @@ strum = { version = "0.26", features = ["derive"] }
syn = "2.0"
test-strategy = "0.4.0"
thiserror = "2.0"
twenty-first = "0.43.0"
twenty-first = "0.44.0"
unicode-width = "0.2"
divan = "0.1.14"

Expand Down
2 changes: 1 addition & 1 deletion triton-isa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repository.workspace = true

[dependencies]
arbitrary.workspace = true
get-size.workspace = true
get-size2.workspace = true
itertools.workspace = true
lazy_static.workspace = true
nom.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion triton-isa/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::result;

use arbitrary::Arbitrary;
use arbitrary::Unstructured;
use get_size::GetSize;
use get_size2::GetSize;
use itertools::Itertools;
use lazy_static::lazy_static;
use num_traits::ConstZero;
Expand Down
2 changes: 1 addition & 1 deletion triton-isa/src/op_stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::ops::Index;
use std::ops::IndexMut;

use arbitrary::Arbitrary;
use get_size::GetSize;
use get_size2::GetSize;
use itertools::Itertools;
use serde::Deserialize;
use serde::Serialize;
Expand Down
2 changes: 1 addition & 1 deletion triton-isa/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::hash::Hash;
use std::io::Cursor;

use arbitrary::Arbitrary;
use get_size::GetSize;
use get_size2::GetSize;
use itertools::Itertools;
use serde::Deserialize;
use serde::Serialize;
Expand Down
2 changes: 1 addition & 1 deletion triton-vm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ arbitrary.workspace = true
colored.workspace = true
constraint-builder.workspace = true
criterion.workspace = true
get-size.workspace = true
get-size2.workspace = true
indexmap.workspace = true
isa.workspace = true
itertools.workspace = true
Expand Down
1 change: 0 additions & 1 deletion triton-vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ mod tests {
use proptest_arbitrary_interop::arb;
use test_strategy::proptest;
use twenty_first::prelude::*;
use twenty_first::util_types::algebraic_hasher::AlgebraicHasher;

use crate::prelude::*;

Expand Down
2 changes: 1 addition & 1 deletion triton-vm/src/proof.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use arbitrary::Arbitrary;
use get_size::GetSize;
use get_size2::GetSize;
use isa::program::Program;
use serde::Deserialize;
use serde::Serialize;
Expand Down
2 changes: 1 addition & 1 deletion triton-vm/src/proof_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl ProofStream {
.collect()
}

/// A thin wrapper around [`H::sample_scalars`](AlgebraicHasher::sample_scalars).
/// A thin wrapper around [`Tip5::sample_scalars`].
pub fn sample_scalars(&mut self, num_scalars: usize) -> Vec<XFieldElement> {
self.sponge.sample_scalars(num_scalars)
}
Expand Down
4 changes: 2 additions & 2 deletions triton-vm/src/table/master_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ use strum::EnumCount;
use twenty_first::math::tip5::RATE;
use twenty_first::math::traits::FiniteField;
use twenty_first::prelude::*;
use twenty_first::util_types::algebraic_hasher;
use twenty_first::util_types::sponge;

use crate::aet::AlgebraicExecutionTrace;
use crate::arithmetic_domain::ArithmeticDomain;
Expand Down Expand Up @@ -602,7 +602,7 @@ struct SpongeWithPendingAbsorb {
impl SpongeWithPendingAbsorb {
pub fn new() -> Self {
Self {
sponge: Tip5::new(algebraic_hasher::Domain::VariableLength),
sponge: Tip5::new(sponge::Domain::VariableLength),
pending_input: bfe_array![0; RATE],
num_symbols_pending: 0,
}
Expand Down
6 changes: 3 additions & 3 deletions triton-vm/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use serde::Serialize;
use strum::EnumCount;
use twenty_first::math::x_field_element::EXTENSION_DEGREE;
use twenty_first::prelude::*;
use twenty_first::util_types::algebraic_hasher::Domain;
use twenty_first::util_types::sponge;

use crate::aet::AlgebraicExecutionTrace;
use crate::error::VMError;
Expand Down Expand Up @@ -650,7 +650,7 @@ impl VMState {
fn hash(&mut self) -> InstructionResult<Vec<CoProcessorCall>> {
let to_hash = self.op_stack.pop_multiple::<{ tip5::RATE }>()?;

let mut hash_input = Tip5::new(Domain::FixedLength);
let mut hash_input = Tip5::new(sponge::Domain::FixedLength);
hash_input.state[..tip5::RATE].copy_from_slice(&to_hash);
let tip5_trace = hash_input.trace();
let hash_output = &tip5_trace[tip5_trace.len() - 1][0..Digest::LEN];
Expand Down Expand Up @@ -1032,7 +1032,7 @@ impl VMState {
_ => unreachable!(),
};

let mut tip5 = Tip5::new(Domain::FixedLength);
let mut tip5 = Tip5::new(sponge::Domain::FixedLength);
tip5.state[..Digest::LEN].copy_from_slice(&left_sibling);
tip5.state[Digest::LEN..2 * Digest::LEN].copy_from_slice(&right_sibling);
let tip5_trace = tip5.trace();
Expand Down

0 comments on commit ed1e8d6

Please sign in to comment.