From ecfd22a4b3d20b7cf89282b172f178ab2ebf81a4 Mon Sep 17 00:00:00 2001 From: Artemii Gerasimovich Date: Thu, 5 Dec 2024 15:48:52 +0100 Subject: [PATCH] [WEEKLY RELEASE] Downgrade primitive-types (#3930) --- Cargo.lock | 28 +++++++------------------ Cargo.toml | 2 +- crates/hotshot-stake-table/src/utils.rs | 2 +- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3e3c638fc..a97145b4fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3666,18 +3666,18 @@ dependencies = [ [[package]] name = "impl-codec" -version = "0.7.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67aa010c1e3da95bf151bd8b4c059b2ed7e75387cdb969b4f8f2723a43f9941" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ "parity-scale-codec", ] [[package]] name = "impl-serde" -version = "0.5.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a143eada6a1ec4aefa5049037a26a6d597bfd64f8c026d07b77133e02b7dd0b" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" dependencies = [ "serde", ] @@ -4339,7 +4339,7 @@ dependencies = [ "smallvec", "thiserror 1.0.68", "tracing", - "uint 0.9.5", + "uint", "void", ] @@ -5530,14 +5530,14 @@ dependencies = [ [[package]] name = "primitive-types" -version = "0.13.1" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15600a7d856470b7d278b3fe0e311fe28c2526348549f8ef2ff7db3299c87f5" +checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", "impl-serde", - "uint 0.10.0", + "uint", ] [[package]] @@ -7963,18 +7963,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "uint" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909988d098b2f738727b161a106cfc7cab00c539c2687a8836f8e565976fb53e" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - [[package]] name = "unicase" version = "2.8.0" diff --git a/Cargo.toml b/Cargo.toml index 62b93b4d14..4ebda6b06d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,7 +52,7 @@ derive_more = { version = "1.0" } digest = "0.10" either = "1.13" espresso-systems-common = { git = "https://github.com/espressosystems/espresso-systems-common", tag = "0.4.1" } -primitive-types = { version = "0.13.1", default-features = false, features = [ +primitive-types = { version = "0.12.2", default-features = false, features = [ "serde", ] } futures = { version = "0.3", default-features = false } diff --git a/crates/hotshot-stake-table/src/utils.rs b/crates/hotshot-stake-table/src/utils.rs index b295cdeb28..07a3d261b3 100644 --- a/crates/hotshot-stake-table/src/utils.rs +++ b/crates/hotshot-stake-table/src/utils.rs @@ -21,6 +21,6 @@ pub trait ToFields { /// convert a U256 to a field element. pub(crate) fn u256_to_field(v: &U256) -> F { let mut bytes = vec![0u8; 32]; - v.write_as_little_endian(&mut bytes); + v.to_little_endian(&mut bytes); F::from_le_bytes_mod_order(&bytes) }