Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into plafer-merge-trace-…
Browse files Browse the repository at this point in the history
…info-layout
  • Loading branch information
plafer committed Feb 21, 2024
2 parents e7d2511 + 23eb713 commit 2071fc4
Show file tree
Hide file tree
Showing 106 changed files with 150 additions and 171 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 0.8.1 (2024-02-21)
* Refactored util module re-exports to comply with latest clippy updates (#250).

## 0.8.0 (2024-02-06)
* Added variable-length serialization and deserialization for `usize` type (#238).
* [BREAKING] Removed `Serializable` and `Deserializable` implementations from slices and vectors (#239).
Expand Down
4 changes: 2 additions & 2 deletions air/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "winter-air"
version = "0.8.0"
version = "0.8.1"
description = "AIR components for the Winterfell STARK prover/verifier"
authors = ["winterfell contributors"]
readme = "README.md"
license = "MIT"
repository = "https://github.com/novifinancial/winterfell"
documentation = "https://docs.rs/winter-air/0.8.0"
documentation = "https://docs.rs/winter-air/0.8.1"
categories = ["cryptography", "no-std"]
keywords = ["crypto", "arithmetization", "air"]
edition = "2021"
Expand Down
4 changes: 2 additions & 2 deletions air/src/air/assertions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

use crate::errors::AssertionError;
use core::{
cmp::{Ord, Ordering, PartialOrd},
cmp::Ordering,
fmt::{Display, Formatter},
};
use math::FieldElement;
use utils::collections::Vec;
use utils::collections::*;

#[cfg(test)]
mod tests;
Expand Down
2 changes: 1 addition & 1 deletion air/src/air/assertions/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use super::{Assertion, AssertionError};
use math::{fields::f128::BaseElement, FieldElement};
use rand_utils::{rand_value, rand_vector};
use utils::collections::Vec;
use utils::collections::*;

// SINGLE ASSERTIONS
// ================================================================================================
Expand Down
3 changes: 2 additions & 1 deletion air/src/air/boundary/constraint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

use super::{Assertion, BTreeMap, ExtensionOf, FieldElement, Vec};
use super::{Assertion, ExtensionOf, FieldElement};
use math::{fft, polynom};
use utils::collections::*;

// BOUNDARY CONSTRAINT
// ================================================================================================
Expand Down
5 changes: 2 additions & 3 deletions air/src/air/boundary/constraint_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

use super::{
Assertion, BTreeMap, BoundaryConstraint, ConstraintDivisor, ExtensionOf, FieldElement, Vec,
};
use super::{Assertion, BoundaryConstraint, ConstraintDivisor, ExtensionOf, FieldElement};
use utils::collections::*;

// BOUNDARY CONSTRAINT GROUP
// ================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion air/src/air/boundary/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use super::{AirContext, Assertion, ConstraintDivisor};
use math::{ExtensionOf, FieldElement};
use utils::collections::{BTreeMap, BTreeSet, Vec};
use utils::collections::*;

mod constraint;
pub use constraint::BoundaryConstraint;
Expand Down
2 changes: 1 addition & 1 deletion air/src/air/boundary/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use super::{
use crypto::{hashers::Blake3_256, DefaultRandomCoin, RandomCoin};
use math::{fields::f64::BaseElement, polynom, FieldElement, StarkField};
use rand_utils::{rand_value, rand_vector, shuffle};
use utils::collections::{BTreeMap, Vec};
use utils::collections::*;

// BOUNDARY CONSTRAINT TESTS
// ================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion air/src/air/coefficients.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// LICENSE file in the root directory of this source tree.

use math::FieldElement;
use utils::collections::Vec;
use utils::collections::*;

// AUXILIARY TRACE SEGMENT RANDOMNESS
// ================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion air/src/air/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use crate::{air::TransitionConstraintDegree, ProofOptions, TraceInfo};
use core::cmp;
use math::StarkField;
use utils::collections::Vec;
use utils::collections::*;

// AIR CONTEXT
// ================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion air/src/air/divisor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use crate::air::Assertion;
use core::fmt::{Display, Formatter};
use math::{FieldElement, StarkField};
use utils::collections::Vec;
use utils::collections::*;

// CONSTRAINT DIVISOR
// ================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion air/src/air/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use crate::ProofOptions;
use crypto::{RandomCoin, RandomCoinError};
use math::{fft, ExtensibleField, ExtensionOf, FieldElement, StarkField, ToElements};
use utils::collections::{BTreeMap, Vec};
use utils::collections::*;

mod trace_info;
pub use trace_info::TraceInfo;
Expand Down
2 changes: 1 addition & 1 deletion air/src/air/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use super::{
use crate::{AuxTraceRandElements, FieldExtension};
use crypto::{hashers::Blake3_256, DefaultRandomCoin, RandomCoin};
use math::{fields::f64::BaseElement, get_power_series, polynom, FieldElement, StarkField};
use utils::collections::{BTreeMap, Vec};
use utils::collections::*;

// PERIODIC COLUMNS
// ================================================================================================
Expand Down
4 changes: 2 additions & 2 deletions air/src/air/trace_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

use math::{StarkField, ToElements};
use utils::{
collections::Vec, string::ToString, ByteReader, ByteWriter, Deserializable,
DeserializationError, Serializable,
collections::*, string::*, ByteReader, ByteWriter, Deserializable, DeserializationError,
Serializable,
};

// CONSTANTS
Expand Down
3 changes: 2 additions & 1 deletion air/src/air/transition/degree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

use super::{super::super::ProofOptions, Vec, MIN_CYCLE_LENGTH};
use super::{super::super::ProofOptions, MIN_CYCLE_LENGTH};
use core::cmp;
use utils::collections::*;

// TRANSITION CONSTRAINT DEGREE
// ================================================================================================
Expand Down
3 changes: 2 additions & 1 deletion air/src/air/transition/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

use super::{FieldElement, Vec};
use super::FieldElement;
use utils::collections::*;

// EVALUATION FRAME
// ================================================================================================
Expand Down
3 changes: 2 additions & 1 deletion air/src/air/transition/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

use super::{AirContext, ConstraintDivisor, ExtensionOf, FieldElement, Vec};
use super::{AirContext, ConstraintDivisor, ExtensionOf, FieldElement};
use utils::collections::*;

mod frame;
pub use frame::EvaluationFrame;
Expand Down
2 changes: 1 addition & 1 deletion air/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use fri::FriOptions;
use math::{StarkField, ToElements};
use utils::{
collections::Vec, ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable,
collections::*, ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable,
};

// CONSTANTS
Expand Down
2 changes: 1 addition & 1 deletion air/src/proof/commitments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use crypto::Hasher;
use utils::{
collections::Vec, ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable,
collections::*, ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable,
SliceReader,
};

Expand Down
4 changes: 2 additions & 2 deletions air/src/proof/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
use crate::{ProofOptions, TraceInfo};
use math::{StarkField, ToElements};
use utils::{
collections::Vec, string::ToString, ByteReader, ByteWriter, Deserializable,
DeserializationError, Serializable,
collections::*, string::*, ByteReader, ByteWriter, Deserializable, DeserializationError,
Serializable,
};

// PROOF CONTEXT
Expand Down
2 changes: 1 addition & 1 deletion air/src/proof/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crypto::Hasher;
use fri::FriProof;
use math::FieldElement;
use utils::{
collections::Vec, ByteReader, Deserializable, DeserializationError, Serializable, SliceReader,
collections::*, ByteReader, Deserializable, DeserializationError, Serializable, SliceReader,
};

mod context;
Expand Down
2 changes: 1 addition & 1 deletion air/src/proof/ood_frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use math::FieldElement;
use utils::{
collections::Vec, ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable,
collections::*, ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable,
SliceReader,
};

Expand Down
2 changes: 1 addition & 1 deletion air/src/proof/queries.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use super::Table;
use crypto::{BatchMerkleProof, ElementHasher, Hasher};
use math::FieldElement;
use utils::{
collections::Vec, ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable,
collections::*, ByteReader, ByteWriter, Deserializable, DeserializationError, Serializable,
SliceReader,
};

Expand Down
3 changes: 2 additions & 1 deletion air/src/proof/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

use super::{DeserializationError, SliceReader, Vec};
use super::{DeserializationError, SliceReader};
use core::iter::FusedIterator;
use math::FieldElement;
use utils::collections::*;
use utils::ByteReader;

// CONSTANTS
Expand Down
4 changes: 2 additions & 2 deletions crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "winter-crypto"
version = "0.8.0"
version = "0.8.1"
description = "Cryptographic library for the Winterfell STARK prover/verifier"
authors = ["winterfell contributors"]
readme = "README.md"
license = "MIT"
repository = "https://github.com/novifinancial/winterfell"
documentation = "https://docs.rs/winter-crypto/0.8.0"
documentation = "https://docs.rs/winter-crypto/0.8.1"
categories = ["cryptography", "no-std"]
keywords = ["crypto", "merkle-tree", "hash"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion crypto/src/hash/blake/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// LICENSE file in the root directory of this source tree.

use super::{ByteDigest, ElementHasher, Hasher};
use core::{convert::TryInto, fmt::Debug, marker::PhantomData};
use core::{fmt::Debug, marker::PhantomData};
use math::{FieldElement, StarkField};
use utils::ByteWriter;

Expand Down
1 change: 0 additions & 1 deletion crypto/src/hash/griffin/griffin64_256_jive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

use super::super::mds::mds_f64_8x8::mds_multiply;
use super::{Digest, ElementHasher, Hasher};
use core::convert::TryInto;
use core::ops::Range;
use math::{fields::f64::BaseElement, FieldElement, StarkField};

Expand Down
1 change: 0 additions & 1 deletion crypto/src/hash/griffin/griffin64_256_jive/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use super::{
BaseElement, ElementDigest, ElementHasher, FieldElement, GriffinJive64_256, Hasher, StarkField,
INV_MDS, MDS, STATE_WIDTH,
};
use core::convert::TryInto;
use proptest::prelude::*;

use rand_utils::{rand_array, rand_value};
Expand Down
1 change: 0 additions & 1 deletion crypto/src/hash/rescue/rp62_248/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
// LICENSE file in the root directory of this source tree.

use super::{exp_acc, Digest, ElementHasher, Hasher};
use core::convert::TryInto;
use math::{fields::f62::BaseElement, FieldElement, StarkField};

mod digest;
Expand Down
1 change: 0 additions & 1 deletion crypto/src/hash/rescue/rp62_248/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use super::{
BaseElement, ElementDigest, ElementHasher, FieldElement, Hasher, Rp62_248, ALPHA, INV_ALPHA,
STATE_WIDTH,
};
use core::convert::TryInto;
use math::StarkField;
use rand_utils::{rand_array, rand_value};

Expand Down
1 change: 0 additions & 1 deletion crypto/src/hash/rescue/rp64_256/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

use super::super::mds::mds_f64_12x12::mds_multiply;
use super::{exp_acc, Digest, ElementHasher, Hasher};
use core::convert::TryInto;
use core::ops::Range;
use math::{fields::f64::BaseElement, FieldElement, StarkField};

Expand Down
1 change: 0 additions & 1 deletion crypto/src/hash/rescue/rp64_256/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use super::{
BaseElement, ElementDigest, ElementHasher, FieldElement, Hasher, Rp64_256, StarkField, ALPHA,
INV_ALPHA, INV_MDS, MDS, STATE_WIDTH,
};
use core::convert::TryInto;
use proptest::prelude::*;

use rand_utils::{rand_array, rand_value};
Expand Down
1 change: 0 additions & 1 deletion crypto/src/hash/rescue/rp64_256_jive/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

use super::super::mds::mds_f64_8x8::mds_multiply;
use super::{exp_acc, Digest, ElementHasher, Hasher};
use core::convert::TryInto;
use core::ops::Range;
use math::{fields::f64::BaseElement, FieldElement, StarkField};

Expand Down
1 change: 0 additions & 1 deletion crypto/src/hash/rescue/rp64_256_jive/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ use super::{
BaseElement, ElementDigest, ElementHasher, FieldElement, Hasher, RpJive64_256, StarkField,
ALPHA, INV_ALPHA, INV_MDS, MDS, STATE_WIDTH,
};
use core::convert::TryInto;
use proptest::prelude::*;

use rand_utils::{rand_array, rand_value};
Expand Down
2 changes: 1 addition & 1 deletion crypto/src/merkle/concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use crate::Hasher;
use core::slice;
use utils::{collections::Vec, iterators::*, rayon};
use utils::{collections::*, iterators::*, rayon};

// CONSTANTS
// ================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion crypto/src/merkle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use crate::{errors::MerkleTreeError, hash::Hasher};
use core::slice;
use utils::collections::{BTreeMap, BTreeSet, Vec};
use utils::collections::*;

mod proofs;
pub use proofs::BatchMerkleProof;
Expand Down
6 changes: 1 addition & 5 deletions crypto/src/merkle/proofs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
// LICENSE file in the root directory of this source tree.

use crate::{errors::MerkleTreeError, Hasher};
use utils::{
collections::{BTreeMap, Vec},
string::ToString,
ByteReader, DeserializationError, Serializable,
};
use utils::{collections::*, string::*, ByteReader, DeserializationError, Serializable};

// CONSTANTS
// ================================================================================================
Expand Down
3 changes: 1 addition & 2 deletions crypto/src/random/default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
// LICENSE file in the root directory of this source tree.

use crate::{errors::RandomCoinError, Digest, ElementHasher, RandomCoin};
use core::convert::TryInto;
use math::{FieldElement, StarkField};
use utils::collections::Vec;
use utils::collections::*;

// DEFAULT RANDOM COIN IMPLEMENTATION
// ================================================================================================
Expand Down
2 changes: 1 addition & 1 deletion crypto/src/random/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use crate::{errors::RandomCoinError, ElementHasher, Hasher};
use math::{FieldElement, StarkField};
use utils::collections::Vec;
use utils::collections::*;

mod default;
pub use default::DefaultRandomCoin;
Expand Down
2 changes: 1 addition & 1 deletion examples/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "examples"
version = "0.8.0"
version = "0.8.1"
description = "Examples of using Winterfell STARK prover/verifier"
authors = ["winterfell contributors"]
readme = "README.md"
Expand Down
2 changes: 1 addition & 1 deletion examples/src/lamport/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use super::rescue::Rescue128;
use rand_utils::prng_vector;
use std::{cmp::Ordering, convert::TryInto};
use std::cmp::Ordering;
use winterfell::{
math::{fields::f128::BaseElement, FieldElement, StarkField},
Serializable,
Expand Down
Loading

0 comments on commit 2071fc4

Please sign in to comment.