From b84521016c6ae96a50ba8a339f53c704c0c0f201 Mon Sep 17 00:00:00 2001 From: Skalman Date: Wed, 15 Mar 2023 18:38:49 -0400 Subject: [PATCH 01/35] Cherry pick all crypto related changes from pull-request #13311 applied to master's head --- Cargo.lock | 172 ++++++ primitives/application-crypto/src/bls.rs | 62 ++ primitives/application-crypto/src/lib.rs | 1 + primitives/core/Cargo.toml | 6 + primitives/core/src/bls.rs | 730 +++++++++++++++++++++++ primitives/core/src/hash.rs | 2 +- primitives/core/src/lib.rs | 1 + primitives/core/src/testing.rs | 2 + primitives/io/src/lib.rs | 52 ++ primitives/keystore/src/lib.rs | 49 +- primitives/keystore/src/testing.rs | 69 +++ 11 files changed, 1144 insertions(+), 2 deletions(-) create mode 100644 primitives/application-crypto/src/bls.rs create mode 100644 primitives/core/src/bls.rs diff --git a/Cargo.lock b/Cargo.lock index d0aea7729bd2d..b2ba823a26c61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -230,6 +230,135 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bddcadddf5e9015d310179a59bb28c4d4b9920ad0f11e8e14dbadf654890c9a6" +[[package]] +name = "ark-bls12-377" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb00293ba84f51ce3bd026bd0de55899c4e68f0a39a5728cebae3a73ffdc0a4f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-bls12-381" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c775f0d12169cba7aae4caeb547bb6a50781c7449a8aa53793827c9ec4abf488" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c60370a92f8e1a5f053cad73a862e1b99bc642333cd676fa11c0c39f80f4ac2" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c2d42532524bee1da5a4f6f733eb4907301baa480829557adcff5dfaeee1d9a" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.6", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6873aaba7959593d89babed381d33e2329453368f1bf3c67e07686a1c1056f" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3c2e7d0f2d67cc7fc925355c74d36e7eda19073639be4a0a233d4611b8c959d" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ark-poly" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f6ec811462cabe265cfe1b102fcfe3df79d7d2929c2425673648ee9abfd0272" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e735959bc173ea4baf13327b19c22d452b8e9e8e8f7b7fc34e6bf0e316c33e" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.6", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd34f0920d995d2c932f38861c416f70de89a6de9875876b012557079603e6cc" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + [[package]] name = "array-bytes" version = "4.2.0" @@ -684,6 +813,28 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" +[[package]] +name = "bls-like" +version = "0.1.0" +source = "git+https://github.com/w3f/bls?branch=skalman-hash-to-curve-wb#79ca386894d61837cd0e76710718a658c65904b0" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "digest 0.10.6", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.6", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "bounded-collections" version = "0.1.5" @@ -1617,6 +1768,17 @@ dependencies = [ "rusticata-macros", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "derive-syn-parse" version = "0.1.5" @@ -2942,6 +3104,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + [[package]] name = "hkdf" version = "0.12.3" @@ -10198,6 +10366,7 @@ dependencies = [ "base58", "bitflags", "blake2", + "bls-like", "bounded-collections", "criterion", "dyn-clonable", @@ -10205,6 +10374,8 @@ dependencies = [ "futures", "hash-db", "hash256-std-hasher", + "hex", + "hex-literal", "impl-serde", "lazy_static", "libsecp256k1", @@ -10221,6 +10392,7 @@ dependencies = [ "secrecy", "serde", "serde_json", + "sha2 0.10.6", "sp-core-hashing", "sp-core-hashing-proc-macro", "sp-debug-derive", diff --git a/primitives/application-crypto/src/bls.rs b/primitives/application-crypto/src/bls.rs new file mode 100644 index 0000000000000..6c5db04f7c0a4 --- /dev/null +++ b/primitives/application-crypto/src/bls.rs @@ -0,0 +1,62 @@ +// This file is part of Substrate. + +// Copyright (C) 2019-2021 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! bls crypto types. + +use crate::{KeyTypeId, RuntimePublic}; + +use sp_std::vec::Vec; + +pub use sp_core::bls::*; + +mod app { + use sp_core::testing::BLS; + + crate::app_crypto!(super, BLS); + + impl crate::traits::BoundToRuntimeAppPublic for Public { + type Public = Self; + } +} + +#[cfg(feature = "full_crypto")] +pub use app::Pair as AppPair; +pub use app::{Public as AppPublic, Signature as AppSignature}; + +impl RuntimePublic for Public { + type Signature = Signature; + + fn all(key_type: KeyTypeId) -> crate::Vec { + sp_io::crypto::bls_public_keys(key_type) + } + + fn generate_pair(key_type: KeyTypeId, seed: Option>) -> Self { + sp_io::crypto::bls_generate(key_type, seed) + } + + fn sign>(&self, key_type: KeyTypeId, msg: &M) -> Option { + sp_io::crypto::bls_sign(key_type, self, msg.as_ref()) + } + + fn verify>(&self, msg: &M, signature: &Self::Signature) -> bool { + sp_io::crypto::bls_verify(&signature, msg.as_ref(), self) + } + + fn to_raw_vec(&self) -> Vec { + sp_core::crypto::ByteArray::to_raw_vec(self) + } +} diff --git a/primitives/application-crypto/src/lib.rs b/primitives/application-crypto/src/lib.rs index 992ecd1d05621..9a6559b4d36b3 100644 --- a/primitives/application-crypto/src/lib.rs +++ b/primitives/application-crypto/src/lib.rs @@ -44,6 +44,7 @@ pub use serde; #[doc(hidden)] pub use sp_std::{ops::Deref, vec::Vec}; +pub mod bls; pub mod ecdsa; pub mod ed25519; pub mod sr25519; diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 092baeeda95f8..f1a1ebf3798c8 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -51,6 +51,10 @@ schnorrkel = { version = "0.9.1", features = [ "preaudit_deprecated", "u64_backend", ], default-features = false, optional = true } +bls-like = {git = "https://github.com/w3f/bls", branch = "skalman-hash-to-curve-wb", default-features = false} +#bls-like = {version="*", default-features = false } +sha2 = { version = "0.10.0", default-features = false, optional = true } +hex = { version = "0.4", default-features = false, optional = true} libsecp256k1 = { version = "0.7", default-features = false, features = ["static-context"], optional = true } merlin = { version = "2.0", default-features = false, optional = true } secp256k1 = { version = "0.24.0", default-features = false, features = ["recovery", "alloc"], optional = true } @@ -64,6 +68,7 @@ rand = "0.8.5" criterion = "0.4.0" serde_json = "1.0" sp-core-hashing-proc-macro = { version = "5.0.0", path = "./hashing/proc-macro" } +hex-literal = "0.3.4" [[bench]] name = "bench" @@ -116,6 +121,7 @@ std = [ "futures/thread-pool", "libsecp256k1/std", "dyn-clonable", + "hex", ] # This feature enables all crypto primitives for `no_std` builds like microcontrollers diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs new file mode 100644 index 0000000000000..0710fb3e2bc2e --- /dev/null +++ b/primitives/core/src/bls.rs @@ -0,0 +1,730 @@ +// This file is part of Substrate. + +// Copyright (C) 2017-2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// tag::description[] +//! Simple BLS (Boneh–Lynn–Shacham) Signature API. +// end::description[] + +#[cfg(feature = "full_crypto")] +use sp_std::vec::Vec; + +use crate::{ + crypto::ByteArray, + hash::{H384, H768}, +}; +use codec::{Decode, Encode, MaxEncodedLen}; +use scale_info::TypeInfo; + +#[cfg(feature = "std")] +use crate::crypto::Ss58Codec; +use crate::crypto::{ + CryptoType, CryptoTypeId, CryptoTypePublicPair, Derive, Public as TraitPublic, UncheckedFrom, +}; +#[cfg(feature = "full_crypto")] +use crate::crypto::{DeriveJunction, Pair as TraitPair, SecretStringError}; +#[cfg(feature = "std")] +use bip39::{Language, Mnemonic, MnemonicType}; +use bls_like::{EngineBLS, Keypair, Message, SerializableToBytes, BLS377}; +#[cfg(feature = "full_crypto")] +use core::convert::TryFrom; +#[cfg(feature = "std")] +use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; +use sp_runtime_interface::pass_by::PassByInner; +use sp_std::ops::Deref; +#[cfg(feature = "std")] +use substrate_bip39::seed_from_entropy; + +#[cfg(feature = "std")] +use hex; + +/// An identifier used to match public keys against bls377 keys +pub const CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"bls7"); + +/// A secret seed. It's not called a "secret key" because ring doesn't expose the secret keys +/// of the key pair (yeah, dumb); as such we're forced to remember the seed manually if we +/// will need it later (such as for HDKD). +#[cfg(feature = "full_crypto")] +type Seed = [u8; BLS377::SECRET_KEY_SIZE]; + +/// A public key. +#[cfg_attr(feature = "full_crypto", derive(Hash))] +#[derive( + PartialEq, + Eq, + PartialOrd, + Ord, + Clone, + Copy, + Encode, + Decode, + PassByInner, + MaxEncodedLen, + TypeInfo, +)] +pub struct Public(pub [u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]); + +/// A key pair. +#[cfg(feature = "full_crypto")] +pub struct Pair(Keypair); + +#[cfg(feature = "full_crypto")] +impl Clone for Pair { + fn clone(&self) -> Self { + Pair(self.0.clone()) + } +} + +impl AsRef<[u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]> for Public { + fn as_ref(&self) -> &[u8; BLS377::PUBLICKEY_SERIALIZED_SIZE] { + &self.0 + } +} + +impl AsRef<[u8]> for Public { + fn as_ref(&self) -> &[u8] { + &self.0[..] + } +} + +impl AsMut<[u8]> for Public { + fn as_mut(&mut self) -> &mut [u8] { + &mut self.0[..] + } +} + +impl Deref for Public { + type Target = [u8]; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + +impl sp_std::convert::TryFrom<&[u8]> for Public { + type Error = (); + + fn try_from(data: &[u8]) -> Result { + if data.len() != Self::LEN { + return Err(()) + } + let mut r = [0u8; Self::LEN]; + r.copy_from_slice(data); + Ok(Self::unchecked_from(r)) + } +} + +impl From for [u8; BLS377::PUBLICKEY_SERIALIZED_SIZE] { + fn from(x: Public) -> Self { + x.0 + } +} + +#[cfg(feature = "full_crypto")] +impl From for Public { + fn from(x: Pair) -> Self { + x.public() + } +} + +impl From for H384 { + fn from(x: Public) -> Self { + x.0.into() + } +} + +#[cfg(feature = "std")] +impl std::str::FromStr for Public { + type Err = crate::crypto::PublicError; + + fn from_str(s: &str) -> Result { + Self::from_ss58check(s) + } +} + +impl UncheckedFrom<[u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]> for Public { + fn unchecked_from(x: [u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]) -> Self { + Public::from_raw(x) + } +} + +impl UncheckedFrom for Public { + fn unchecked_from(x: H384) -> Self { + Public::from_h384(x) + } +} + +#[cfg(feature = "std")] +impl std::fmt::Display for Public { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + write!(f, "{}", self.to_ss58check()) + } +} + +impl sp_std::fmt::Debug for Public { + #[cfg(feature = "std")] + fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + let s = self.to_ss58check(); + write!(f, "{} ({}...)", crate::hexdisplay::HexDisplay::from(&self.0), &s[0..8]) + } + + #[cfg(not(feature = "std"))] + fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + Ok(()) + } +} + +#[cfg(feature = "std")] +impl Serialize for Public { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + serializer.serialize_str(&self.to_ss58check()) + } +} + +#[cfg(feature = "std")] +impl<'de> Deserialize<'de> for Public { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + Public::from_ss58check(&String::deserialize(deserializer)?) + .map_err(|e| de::Error::custom(format!("{:?}", e))) + } +} + +/// A signature (a 512-bit value). +#[cfg_attr(feature = "full_crypto", derive(Hash))] +#[derive(Encode, Decode, MaxEncodedLen, PassByInner, TypeInfo, PartialEq, Eq)] +pub struct Signature(pub [u8; BLS377::SIGNATURE_SERIALIZED_SIZE]); + +impl sp_std::convert::TryFrom<&[u8]> for Signature { + type Error = (); + + fn try_from(data: &[u8]) -> Result { + if data.len() == BLS377::SIGNATURE_SERIALIZED_SIZE { + let mut inner = [0u8; BLS377::SIGNATURE_SERIALIZED_SIZE]; + inner.copy_from_slice(data); + Ok(Signature(inner)) + } else { + Err(()) + } + } +} + +#[cfg(feature = "std")] +impl Serialize for Signature { + fn serialize(&self, serializer: S) -> Result + where + S: Serializer, + { + serializer.serialize_str(&hex::encode(self)) + } +} + +#[cfg(feature = "std")] +impl<'de> Deserialize<'de> for Signature { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + let signature_hex = hex::decode(&String::deserialize(deserializer)?) + .map_err(|e| de::Error::custom(format!("{:?}", e)))?; + Signature::try_from(signature_hex.as_ref()) + .map_err(|e| de::Error::custom(format!("{:?}", e))) + } +} + +impl Clone for Signature { + fn clone(&self) -> Self { + let mut r = [0u8; BLS377::SIGNATURE_SERIALIZED_SIZE]; + r.copy_from_slice(&self.0[..]); + Signature(r) + } +} + +impl From for H768 { + fn from(v: Signature) -> H768 { + H768::from(v.0) + } +} + +impl From for [u8; BLS377::SIGNATURE_SERIALIZED_SIZE] { + fn from(v: Signature) -> [u8; BLS377::SIGNATURE_SERIALIZED_SIZE] { + v.0 + } +} + +impl AsRef<[u8; BLS377::SIGNATURE_SERIALIZED_SIZE]> for Signature { + fn as_ref(&self) -> &[u8; BLS377::SIGNATURE_SERIALIZED_SIZE] { + &self.0 + } +} + +impl AsRef<[u8]> for Signature { + fn as_ref(&self) -> &[u8] { + &self.0[..] + } +} + +impl AsMut<[u8]> for Signature { + fn as_mut(&mut self) -> &mut [u8] { + &mut self.0[..] + } +} + +impl sp_std::fmt::Debug for Signature { + #[cfg(feature = "std")] + fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + write!(f, "{}", crate::hexdisplay::HexDisplay::from(&self.0)) + } + + #[cfg(not(feature = "std"))] + fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { + Ok(()) + } +} + +impl UncheckedFrom<[u8; BLS377::SIGNATURE_SERIALIZED_SIZE]> for Signature { + fn unchecked_from(data: [u8; BLS377::SIGNATURE_SERIALIZED_SIZE]) -> Signature { + Signature(data) + } +} + +impl Signature { + /// A new instance from the given BLS377::SIGNATURE_SERIALIZED_SIZE-byte `data`. + /// + /// NOTE: No checking goes on to ensure this is a real signature. Only use it if + /// you are certain that the array actually is a signature. GIGO! + pub fn from_raw(data: [u8; BLS377::SIGNATURE_SERIALIZED_SIZE]) -> Signature { + Signature(data) + } + + /// A new instance from the given slice that should be 64 bytes long. + /// + /// NOTE: No checking goes on to ensure this is a real signature. Only use it if + /// you are certain that the array actually is a signature. GIGO! + pub fn from_slice(data: &[u8]) -> Option { + let mut r = [0u8; BLS377::SIGNATURE_SERIALIZED_SIZE]; + r.copy_from_slice(data); + Some(Signature(r)) + } + + /// A new instance from an H512. + /// + /// NOTE: No checking goes on to ensure this is a real signature. Only use it if + /// you are certain that the array actually is a signature. GIGO! + pub fn from_h512(v: H768) -> Signature { + Signature(v.into()) + } +} + +/// A localized signature also contains sender information. +#[cfg(feature = "std")] +#[derive(PartialEq, Eq, Clone, Debug, Encode, Decode)] +pub struct LocalizedSignature { + /// The signer of the signature. + pub signer: Public, + /// The signature itself. + pub signature: Signature, +} + +impl Public { + /// A new instance from the given BLS377::PUBLICKEY_SERIALIZED_SIZE-byte `data`. + /// + /// NOTE: No checking goes on to ensure this is a real public key. Only use it if + /// you are certain that the array actually is a pubkey. GIGO! + pub fn from_raw(data: [u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]) -> Self { + Public(data) + } + + /// A new instance from an H384. + /// + /// NOTE: No checking goes on to ensure this is a real public key. Only use it if + /// you are certain that the array actually is a pubkey. GIGO! + pub fn from_h384(x: H384) -> Self { + Public(x.into()) + } + + /// Return a slice filled with raw data. + pub fn as_array_ref(&self) -> &[u8; BLS377::PUBLICKEY_SERIALIZED_SIZE] { + self.as_ref() + } +} + +impl ByteArray for Public { + const LEN: usize = BLS377::PUBLICKEY_SERIALIZED_SIZE; +} + +impl TraitPublic for Public { + fn to_public_crypto_pair(&self) -> CryptoTypePublicPair { + CryptoTypePublicPair(CRYPTO_ID, self.to_raw_vec()) + } +} + +impl Derive for Public {} + +impl From for CryptoTypePublicPair { + fn from(key: Public) -> Self { + (&key).into() + } +} + +impl From<&Public> for CryptoTypePublicPair { + fn from(key: &Public) -> Self { + CryptoTypePublicPair(CRYPTO_ID, key.to_raw_vec()) + } +} + +///??? +///What is HDKD? What is hard junction? should seed be 48bytes +/// Derive a single hard junction. +#[cfg(feature = "full_crypto")] +fn derive_hard_junction(secret_seed: &Seed, cc: &[u8; 32]) -> Seed { + ("BLS12377HDKD", secret_seed, cc).using_encoded(sp_core_hashing::blake2_256) + // using_encoded(|data| { + // let mut res = [0u8; BLS377::SECRET_KEY_SIZE]; + // res.copy_from_slice(blake2::Blake2b::blake2b(BLS377::SECRET_KEY_SIZE, &[], data).as_bytes()); + // res + // }) +} + +/// An error when deriving a key. +#[cfg(feature = "full_crypto")] +pub enum DeriveError { + /// A soft key was found in the path (and is unsupported). + SoftKeyInPath, +} + +#[cfg(feature = "full_crypto")] +impl TraitPair for Pair { + type Public = Public; + type Seed = Seed; + type Signature = Signature; + type DeriveError = DeriveError; + + /// Generate new secure (random) key pair and provide the recovery phrase. + /// + /// You can recover the same key later with `from_phrase`. + #[cfg(feature = "std")] + fn generate_with_phrase(password: Option<&str>) -> (Pair, String, Seed) { + let mnemonic = Mnemonic::new(MnemonicType::Words12, Language::English); + let phrase = mnemonic.phrase(); + let (pair, seed) = Self::from_phrase(phrase, password) + .expect("All phrases generated by Mnemonic are valid; qed"); + (pair, phrase.to_owned(), seed) + } + + /// Generate key pair from given recovery phrase and password. + #[cfg(feature = "std")] + fn from_phrase( + phrase: &str, + password: Option<&str>, + ) -> Result<(Pair, Seed), SecretStringError> { + let big_seed = seed_from_entropy( + Mnemonic::from_phrase(phrase, Language::English) + .map_err(|_| SecretStringError::InvalidPhrase)? + .entropy(), + password.unwrap_or(""), + ) + .map_err(|_| SecretStringError::InvalidSeed)?; + let mut seed = Seed::default(); + seed.copy_from_slice(&big_seed[0..32]); + Self::from_seed_slice(&big_seed[0..32]).map(|x| (x, seed)) + } + + /// Make a new key pair from secret seed material. + /// + /// You should never need to use this; generate(), generate_with_phrase + fn from_seed(seed: &Seed) -> Pair { + Self::from_seed_slice(&seed[..]).expect("seed has valid length; qed") + } + + /// Make a new key pair from secret seed material. The slice must be 32 bytes long or it + /// will return `None`. + /// + /// You should never need to use this; generate(), generate_with_phrase + fn from_seed_slice(seed_slice: &[u8]) -> Result { + if seed_slice.len() != BLS377::SECRET_KEY_SIZE { + return Err(SecretStringError::InvalidSeedLength) + } + let secret = bls_like::SecretKey::from_seed(seed_slice); + let public = secret.into_public(); + Ok(Pair(bls_like::Keypair { secret, public })) + } + + /// Derive a child key from a series of given junctions. + fn derive>( + &self, + path: Iter, + _seed: Option, + ) -> Result<(Pair, Option), DeriveError> { + let mut acc = self.0.secret.to_bytes(); + for j in path { + match j { + DeriveJunction::Soft(_cc) => return Err(DeriveError::SoftKeyInPath), + DeriveJunction::Hard(cc) => acc = derive_hard_junction(&acc, &cc), + } + } + Ok((Self::from_seed(&acc), Some(acc))) + } + + /// Get the public key. + fn public(&self) -> Public { + let mut r = [0u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]; + let pk = self.0.public.to_bytes(); + r.copy_from_slice(pk.as_slice()); + Public(r) + } + + /// Sign a message. + fn sign(&self, message: &[u8]) -> Signature { + let mut mutable_self = self.clone(); + let r = mutable_self.0.sign(Message::new(b"", message)).to_bytes(); + Signature::from_raw(r) + } + + /// Verify a signature on a message. Returns true if the signature is good. + fn verify>(sig: &Self::Signature, message: M, pubkey: &Self::Public) -> bool { + Self::verify_weak(&sig.0[..], message.as_ref(), pubkey) + } + + /// Verify a signature on a message. Returns true if the signature is good. + /// + /// This doesn't use the type system to ensure that `sig` and `pubkey` are the correct + /// size. Use it only if you're coming from byte buffers and need the speed. + fn verify_weak, M: AsRef<[u8]>>(sig: &[u8], message: M, pubkey: P) -> bool { + let pubkey_array: [u8; BLS377::PUBLICKEY_SERIALIZED_SIZE] = match pubkey.as_ref().try_into() + { + Ok(pk) => pk, + Err(_) => return false, + }; + let public_key = match bls_like::PublicKey::::from_bytes(&pubkey_array) { + Ok(pk) => pk, + Err(_) => return false, + }; + + let sig_array = match sig.try_into() { + Ok(s) => s, + Err(_) => return false, + }; + let sig = match bls_like::Signature::from_bytes(sig_array) { + Ok(s) => s, + Err(_) => return false, + }; + + sig.verify(Message::new(b"", message.as_ref()), &public_key) + } + + /// Return a vec filled with raw data. + fn to_raw_vec(&self) -> Vec { + self.seed().to_vec() + } +} + +#[cfg(feature = "full_crypto")] +impl Pair { + /// Get the seed for this key. + pub fn seed(&self) -> Seed { + self.0.secret.to_bytes() + } + + /// Exactly as `from_string` except that if no matches are found then, the the first 32 + /// characters are taken (padded with spaces as necessary) and used as the MiniSecretKey. + #[cfg(feature = "std")] + pub fn from_legacy_string(s: &str, password_override: Option<&str>) -> Pair { + Self::from_string(s, password_override).unwrap_or_else(|_| { + let mut padded_seed: Seed = [b' '; 32]; + let len = s.len().min(32); + padded_seed[..len].copy_from_slice(&s.as_bytes()[..len]); + Self::from_seed(&padded_seed) + }) + } +} +impl CryptoType for Public { + #[cfg(feature = "full_crypto")] + type Pair = Pair; +} + +impl CryptoType for Signature { + #[cfg(feature = "full_crypto")] + type Pair = Pair; +} + +#[cfg(feature = "full_crypto")] +impl CryptoType for Pair { + type Pair = Pair; +} + +#[cfg(test)] +mod test { + use super::*; + use crate::crypto::DEV_PHRASE; + use hex_literal::hex; + use serde_json; + + #[test] + fn default_phrase_should_be_used() { + assert_eq!( + Pair::from_string("//Alice///password", None).unwrap().public(), + Pair::from_string(&format!("{}//Alice", DEV_PHRASE), Some("password")) + .unwrap() + .public(), + ); + } + + //only passes if the seed = seed (mod ScalarField) + #[test] + fn seed_and_derive_should_work() { + let seed = hex!("9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f00"); + let pair = Pair::from_seed(&seed); + // we are using hash to field so this is not going to work + // assert_eq!(pair.seed(), seed); + let path = vec![DeriveJunction::Hard([0u8; 32])]; + let derived = pair.derive(path.into_iter(), None).ok().unwrap().0; + assert_eq!( + derived.seed(), + hex!("a4f2269333b3e87c577aa00c4a2cd650b3b30b2e8c286a47c251279ff3a26e0d") + ); + } + + #[test] + fn test_vector_should_work() { + let pair = Pair::from_seed(&hex!( + "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60" + )); + let public = pair.public(); + assert_eq!( + public, + Public::from_raw(hex!( + "7a84ca8ce4c37c93c95ecee6a3c0c9a7b9c225093cf2f12dc4f69cbfb847ef9424a18f5755d5a742247d386ff2aabb80" + )) + ); + let message = b""; + let signature = hex!("0e5854002b249175764e463165aec0e38a46ddd44c2db29d6fec3022a3993b3390b001b53a04d155a4d216dd361df90087281be27c58ae22c7f1333820259ff5ae1b321126d1a001bf91ee088fb56ca9d4aa484d129ede7e701ced08df631581"); + let signature = Signature::from_raw(signature); + assert!(pair.sign(&message[..]) == signature); + assert!(Pair::verify(&signature, &message[..], &public)); + } + + #[test] + fn test_vector_by_string_should_work() { + let pair = Pair::from_string( + "0x9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60", + None, + ) + .unwrap(); + let public = pair.public(); + assert_eq!( + public, + Public::from_raw(hex!( + "6dc6be608fab3c6bd894a606be86db346cc170db85c733853a371f3db54ae1b12052c0888d472760c81b537572a26f00" + )) + ); + let message = b""; + let signature = hex!("9f7d07e0fdd6aa342f6defaade946b59bfeba8af45c243f86b208cd339b2c713421844e3007e0acafd0a529542ee050047b739fe5bfd311d884451542204e173d784e648eb55f4bd32da747f006120fadf4801c2b1c88f9745c50c2141b1d380"); + let signature = Signature::from_raw(signature); + assert!(pair.sign(&message[..]) == signature); + assert!(Pair::verify(&signature, &message[..], &public)); + } + + #[test] + fn generated_pair_should_work() { + let (pair, _) = Pair::generate(); + let public = pair.public(); + let message = b"Something important"; + let signature = pair.sign(&message[..]); + assert!(Pair::verify(&signature, &message[..], &public)); + assert!(!Pair::verify(&signature, b"Something else", &public)); + } + + #[test] + fn seeded_pair_should_work() { + let pair = Pair::from_seed(b"12345678901234567890123456789012"); + let public = pair.public(); + assert_eq!( + public, + Public::from_raw( + hex!( + "754d2f2bbfa67df54d7e0e951979a18a1e0f45948857752cc2bac6bbb0b1d05e8e48bcc453920bf0c4bbd59932124801") + ) + ); + let message = hex!("2f8c6129d816cf51c374bc7f08c3e63ed156cf78aefb4a6550d97b87997977ee00000000000000000200d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a4500000000000000"); + let signature = pair.sign(&message[..]); + println!("Correct signature: {:?}", signature); + assert!(Pair::verify(&signature, &message[..], &public)); + assert!(!Pair::verify(&signature, "Other message", &public)); + } + + #[test] + fn generate_with_phrase_recovery_possible() { + let (pair1, phrase, _) = Pair::generate_with_phrase(None); + let (pair2, _) = Pair::from_phrase(&phrase, None).unwrap(); + + assert_eq!(pair1.public(), pair2.public()); + } + + #[test] + fn generate_with_password_phrase_recovery_possible() { + let (pair1, phrase, _) = Pair::generate_with_phrase(Some("password")); + let (pair2, _) = Pair::from_phrase(&phrase, Some("password")).unwrap(); + + assert_eq!(pair1.public(), pair2.public()); + } + + #[test] + fn password_does_something() { + let (pair1, phrase, _) = Pair::generate_with_phrase(Some("password")); + let (pair2, _) = Pair::from_phrase(&phrase, None).unwrap(); + + assert_ne!(pair1.public(), pair2.public()); + } + + #[test] + fn ss58check_roundtrip_works() { + let pair = Pair::from_seed(b"12345678901234567890123456789012"); + let public = pair.public(); + let s = public.to_ss58check(); + println!("Correct: {}", s); + let cmp = Public::from_ss58check(&s).unwrap(); + assert_eq!(cmp, public); + } + + #[test] + fn signature_serialization_works() { + let pair = Pair::from_seed(b"12345678901234567890123456789012"); + let message = b"Something important"; + let signature = pair.sign(&message[..]); + let serialized_signature = serde_json::to_string(&signature).unwrap(); + // Signature is 96 bytes, so 192 chars + 2 quote chars + assert_eq!(serialized_signature.len(), 194); + let signature = serde_json::from_str(&serialized_signature).unwrap(); + assert!(Pair::verify(&signature, &message[..], &pair.public())); + } + + #[test] + fn signature_serialization_doesnt_panic() { + fn deserialize_signature(text: &str) -> Result { + serde_json::from_str(text) + } + assert!(deserialize_signature("Not valid json.").is_err()); + assert!(deserialize_signature("\"Not an actual signature.\"").is_err()); + // Poorly-sized + assert!(deserialize_signature("\"abc123\"").is_err()); + } +} diff --git a/primitives/core/src/hash.rs b/primitives/core/src/hash.rs index ec7da98296bf3..37d87a819323a 100644 --- a/primitives/core/src/hash.rs +++ b/primitives/core/src/hash.rs @@ -17,7 +17,7 @@ //! A fixed hash type. -pub use primitive_types::{H160, H256, H512}; +pub use primitive_types::{H160, H256, H384, H512, H768}; /// Hash conversion. Used to convert between unbound associated hash types in traits, /// implemented by the same hash type. diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs index efccd0378e95a..6f562a5f6a1ca 100644 --- a/primitives/core/src/lib.rs +++ b/primitives/core/src/lib.rs @@ -54,6 +54,7 @@ pub use hashing::{blake2_128, blake2_256, keccak_256, twox_128, twox_256, twox_6 pub mod crypto; pub mod hexdisplay; +pub mod bls; pub mod defer; pub mod ecdsa; pub mod ed25519; diff --git a/primitives/core/src/testing.rs b/primitives/core/src/testing.rs index 756275aed6f41..ed6c571f7e24e 100644 --- a/primitives/core/src/testing.rs +++ b/primitives/core/src/testing.rs @@ -25,6 +25,8 @@ pub const ED25519: KeyTypeId = KeyTypeId(*b"ed25"); pub const SR25519: KeyTypeId = KeyTypeId(*b"sr25"); /// Key type for generic ECDSA key. pub const ECDSA: KeyTypeId = KeyTypeId(*b"ecds"); +/// Key type for generic BLS12-377 key. +pub const BLS: KeyTypeId = KeyTypeId(*b"bls7"); /// Macro for exporting functions from wasm in with the expected signature for using it with the /// wasm executor. This is useful for tests where you need to call a function in wasm. diff --git a/primitives/io/src/lib.rs b/primitives/io/src/lib.rs index 8c3cdc668cba3..000e8d09b0d58 100644 --- a/primitives/io/src/lib.rs +++ b/primitives/io/src/lib.rs @@ -56,6 +56,8 @@ use sp_core::{ LogLevel, LogLevelFilter, OpaquePeerId, H256, }; +use sp_core::bls; + #[cfg(feature = "std")] use sp_trie::{LayoutV0, LayoutV1, TrieConfiguration}; @@ -1120,6 +1122,56 @@ pub trait Crypto { .map_err(|_| EcdsaVerifyError::BadSignature)?; Ok(pubkey.serialize()) } + + /// Returns all `bls` public keys for the given key id from the keystore. + /// This is needed for beefy keystore. + fn bls_public_keys(&mut self, id: KeyTypeId) -> Vec { + let keystore = &***self + .extension::() + .expect("No `keystore` associated for the current context!"); + SyncCryptoStore::bls_public_keys(keystore, id) + } + + /// Generate an `bls12-377` key for the given key type using an optional seed and + /// store it in the keystore. + /// + /// The `seed` needs to be a valid utf8. + /// + /// Returns the public key. + fn bls_generate(&mut self, id: KeyTypeId, seed: Option>) -> bls::Public { + let seed = seed.as_ref().map(|s| std::str::from_utf8(s).expect("Seed is valid utf8!")); + let keystore = &***self + .extension::() + .expect("No `keystore` associated for the current context!"); + SyncCryptoStore::bls_generate_new(keystore, id, seed).expect("`bls_generate` failed") + } + + /// Sign the given `msg` with the `bls12-377` key that corresponds to the given public key and + /// key type in the keystore. + /// + /// Returns the signature. + fn bls_sign( + &mut self, + id: KeyTypeId, + pub_key: &bls::Public, + msg: &[u8], + ) -> Option { + let keystore = &***self + .extension::() + .expect("No `keystore` associated for the current context!"); + SyncCryptoStore::sign_with(keystore, id, &pub_key.into(), msg) + .ok() + .flatten() + .and_then(|sig| bls::Signature::from_slice(&sig)) + } + + /// Verify an `bls12-377` signature. + /// + /// Returns `true` when the verification in successful regardless of + /// signature version. + fn bls_verify(sig: &bls::Signature, msg: &[u8], pubkey: &bls::Public) -> bool { + bls::Pair::verify(sig, msg, pubkey) + } } /// Interface that provides functions for hashing with different algorithms. diff --git a/primitives/keystore/src/lib.rs b/primitives/keystore/src/lib.rs index 17c435483bae5..567e4090b4d4e 100644 --- a/primitives/keystore/src/lib.rs +++ b/primitives/keystore/src/lib.rs @@ -26,6 +26,8 @@ use sp_core::{ crypto::{CryptoTypePublicPair, KeyTypeId}, ecdsa, ed25519, sr25519, }; +use sp_core::bls; + use std::sync::Arc; /// CryptoStore error @@ -85,6 +87,22 @@ pub trait CryptoStore: Send + Sync { seed: Option<&str>, ) -> Result; + /// Returns all bls public keys for the given key type. + async fn bls_public_keys(&self, id: KeyTypeId) -> Vec; + + /// Generate a new bls key pair for the given key type and an optional seed. + /// + /// If the given seed is `Some(_)`, the key pair will only be stored in memory. + /// + /// Returns the public key of the generated key pair. + async fn bls_generate_new( + &self, + id: KeyTypeId, + seed: Option<&str>, + ) -> Result; + + /// Returns all ed25519 public keys for the given key type. + /// Insert a new key. This doesn't require any known of the crypto; but a public key must be /// manually provided. /// @@ -257,7 +275,17 @@ pub trait SyncCryptoStore: CryptoStore + Send + Sync { fn ecdsa_generate_new(&self, id: KeyTypeId, seed: Option<&str>) -> Result; - /// Insert a new key. This doesn't require any known of the crypto; but a public key must be + /// Returns all bls public keys for the given key type. + fn bls_public_keys(&self, id: KeyTypeId) -> Vec; + + /// Generate a new bls key pair for the given key type and an optional seed. + /// + /// If the given seed is `Some(_)`, the key pair will only be stored in memory. + /// + /// Returns the public key of the generated key pair. + fn bls_generate_new(&self, id: KeyTypeId, seed: Option<&str>) -> Result; + + /// Insert a new key. This doesn't require any known of the crypto; but a public key must be /// manually provided. /// /// Places it into the file system store. @@ -382,6 +410,25 @@ pub trait SyncCryptoStore: CryptoStore + Send + Sync { public: &ecdsa::Public, msg: &[u8; 32], ) -> Result, Error>; + + /// Generate an BLS signature for a given message. + /// + /// Receives [`KeyTypeId`] and an [`bls::Public`] key to be able to map + /// them to a private key that exists in the keystore. This private key is, + /// in turn, used for signing the provided message. + /// + /// The `msg` argument provided should be a message for which an + /// BLS12-377 signature should be generated. + /// + /// Returns an [`bls::Signature`] or `None` in case the given `id` and + /// `public` combination doesn't exist in the keystore. An `Err` will be + /// returned if generating the signature itself failed. + fn bls_sign( + &self, + id: KeyTypeId, + public: &bls::Public, + msg: &[u8], + ) -> Result, Error>; } /// A pointer to a keystore. diff --git a/primitives/keystore/src/testing.rs b/primitives/keystore/src/testing.rs index 5058a06508eac..4ce5f80a76e03 100644 --- a/primitives/keystore/src/testing.rs +++ b/primitives/keystore/src/testing.rs @@ -22,6 +22,8 @@ use sp_core::{ ecdsa, ed25519, sr25519, }; +use sp_core::bls; + use crate::{ vrf::{make_transcript, VRFSignature, VRFTranscriptData}, CryptoStore, Error, SyncCryptoStore, SyncCryptoStorePtr, @@ -69,6 +71,14 @@ impl KeyStore { .map(|s| ecdsa::Pair::from_string(s, None).expect("`ecdsa` seed slice is valid")) }) } + + fn bls_key_pair(&self, id: KeyTypeId, pub_key: &bls::Public) -> Option { + self.keys.read().get(&id).and_then(|inner| { + inner + .get(pub_key.as_slice()) + .map(|s| bls::Pair::from_string(s, None).expect("`bls` seed slice is valid")) + }) + } } #[async_trait] @@ -105,6 +115,18 @@ impl CryptoStore for KeyStore { SyncCryptoStore::ecdsa_public_keys(self, id) } + async fn bls_public_keys(&self, id: KeyTypeId) -> Vec { + SyncCryptoStore::bls_public_keys(self, id) + } + + async fn bls_generate_new( + &self, + id: KeyTypeId, + seed: Option<&str>, + ) -> Result { + SyncCryptoStore::bls_generate_new(self, id, seed) + } + async fn ecdsa_generate_new( &self, id: KeyTypeId, @@ -304,6 +326,43 @@ impl SyncCryptoStore for KeyStore { } } + fn bls_public_keys(&self, id: KeyTypeId) -> Vec { + self.keys + .read() + .get(&id) + .map(|keys| { + keys.values() + .map(|s| bls::Pair::from_string(s, None).expect("`bls` seed slice is valid")) + .map(|p| p.public()) + .collect() + }) + .unwrap_or_default() + } + + fn bls_generate_new(&self, id: KeyTypeId, seed: Option<&str>) -> Result { + match seed { + Some(seed) => { + let pair = bls::Pair::from_string(seed, None) + .map_err(|_| Error::ValidationError("Generates an `bls` pair.".to_owned()))?; + self.keys + .write() + .entry(id) + .or_default() + .insert(pair.public().to_raw_vec(), seed.into()); + Ok(pair.public()) + }, + None => { + let (pair, phrase, _) = bls::Pair::generate_with_phrase(None); + self.keys + .write() + .entry(id) + .or_default() + .insert(pair.public().to_raw_vec(), phrase); + Ok(pair.public()) + }, + } + } + fn insert_unknown(&self, id: KeyTypeId, suri: &str, public: &[u8]) -> Result<(), ()> { self.keys .write() @@ -384,6 +443,16 @@ impl SyncCryptoStore for KeyStore { let pair = self.ecdsa_key_pair(id, public); pair.map(|k| k.sign_prehashed(msg)).map(Ok).transpose() } + + fn bls_sign( + &self, + id: KeyTypeId, + public: &bls::Public, + msg: &[u8], + ) -> Result, Error> { + let pair = self.bls_key_pair(id, public); + pair.map(|k| k.sign(msg)).map(Ok).transpose() + } } impl Into for KeyStore { From ee61ddbd9e3544a825077882d40c29c3a872937c Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Tue, 21 Mar 2023 15:52:49 +0100 Subject: [PATCH 02/35] Import some stuff just if 'full_crypto' is on --- primitives/core/src/bls.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 0710fb3e2bc2e..2a069376ce467 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -38,7 +38,9 @@ use crate::crypto::{ use crate::crypto::{DeriveJunction, Pair as TraitPair, SecretStringError}; #[cfg(feature = "std")] use bip39::{Language, Mnemonic, MnemonicType}; -use bls_like::{EngineBLS, Keypair, Message, SerializableToBytes, BLS377}; +use bls_like::{EngineBLS, BLS377}; +#[cfg(feature = "full_crypto")] +use bls_like::{Keypair, Message, SerializableToBytes}; #[cfg(feature = "full_crypto")] use core::convert::TryFrom; #[cfg(feature = "std")] From a1e0f13eae869ea95af2dd47360b19d0af8022f6 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Tue, 21 Mar 2023 16:00:09 +0100 Subject: [PATCH 03/35] Remove copyright year --- primitives/application-crypto/src/bls.rs | 2 +- primitives/core/src/bls.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/primitives/application-crypto/src/bls.rs b/primitives/application-crypto/src/bls.rs index 6c5db04f7c0a4..9e101ff64f7d7 100644 --- a/primitives/application-crypto/src/bls.rs +++ b/primitives/application-crypto/src/bls.rs @@ -1,6 +1,6 @@ // This file is part of Substrate. -// Copyright (C) 2019-2021 Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies (UK) Ltd. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 2a069376ce467..77d03fac44ff8 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -1,6 +1,6 @@ // This file is part of Substrate. -// Copyright (C) 2017-2022 Parity Technologies (UK) Ltd. +// Copyright (C) Parity Technologies (UK) Ltd. // SPDX-License-Identifier: Apache-2.0 // Licensed under the Apache License, Version 2.0 (the "License"); From 7023c14d6557ef48e457a2cb60ab2af55d8da3bb Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Tue, 21 Mar 2023 17:11:46 +0100 Subject: [PATCH 04/35] Cleanup --- primitives/core/src/bls.rs | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 77d03fac44ff8..21945108c60cf 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -327,24 +327,25 @@ impl Signature { Some(Signature(r)) } - /// A new instance from an H512. + /// A new instance from an H768. /// /// NOTE: No checking goes on to ensure this is a real signature. Only use it if /// you are certain that the array actually is a signature. GIGO! - pub fn from_h512(v: H768) -> Signature { + pub fn from_h768(v: H768) -> Signature { Signature(v.into()) } } -/// A localized signature also contains sender information. -#[cfg(feature = "std")] -#[derive(PartialEq, Eq, Clone, Debug, Encode, Decode)] -pub struct LocalizedSignature { - /// The signer of the signature. - pub signer: Public, - /// The signature itself. - pub signature: Signature, -} +// TODO: ADD just if and WHEN is required (if ever) +// /// A localized signature also contains sender information. +// #[cfg(feature = "std")] +// #[derive(PartialEq, Eq, Clone, Debug, Encode, Decode)] +// pub struct LocalizedSignature { +// /// The signer of the signature. +// pub signer: Public, +// /// The signature itself. +// pub signature: Signature, +// } impl Public { /// A new instance from the given BLS377::PUBLICKEY_SERIALIZED_SIZE-byte `data`. @@ -393,17 +394,10 @@ impl From<&Public> for CryptoTypePublicPair { } } -///??? -///What is HDKD? What is hard junction? should seed be 48bytes /// Derive a single hard junction. #[cfg(feature = "full_crypto")] fn derive_hard_junction(secret_seed: &Seed, cc: &[u8; 32]) -> Seed { ("BLS12377HDKD", secret_seed, cc).using_encoded(sp_core_hashing::blake2_256) - // using_encoded(|data| { - // let mut res = [0u8; BLS377::SECRET_KEY_SIZE]; - // res.copy_from_slice(blake2::Blake2b::blake2b(BLS377::SECRET_KEY_SIZE, &[], data).as_bytes()); - // res - // }) } /// An error when deriving a key. From d92186de96bed0dc8a163ff372f288586ba5af8e Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Tue, 21 Mar 2023 20:21:24 +0100 Subject: [PATCH 05/35] First generic BLS draft --- primitives/core/src/bls.rs | 737 ++++++++++++++++++++----------------- 1 file changed, 399 insertions(+), 338 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 21945108c60cf..707d60c25c3e5 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -38,15 +38,14 @@ use crate::crypto::{ use crate::crypto::{DeriveJunction, Pair as TraitPair, SecretStringError}; #[cfg(feature = "std")] use bip39::{Language, Mnemonic, MnemonicType}; -use bls_like::{EngineBLS, BLS377}; +use bls_like::{EngineBLS, BLS377, ZBLS}; #[cfg(feature = "full_crypto")] use bls_like::{Keypair, Message, SerializableToBytes}; -#[cfg(feature = "full_crypto")] use core::convert::TryFrom; #[cfg(feature = "std")] use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use sp_runtime_interface::pass_by::PassByInner; -use sp_std::ops::Deref; +use sp_std::{marker::PhantomData, ops::Deref}; #[cfg(feature = "std")] use substrate_bip39::seed_from_entropy; @@ -56,141 +55,210 @@ use hex; /// An identifier used to match public keys against bls377 keys pub const CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"bls7"); -/// A secret seed. It's not called a "secret key" because ring doesn't expose the secret keys +trait StdMarker: EngineBLS + Send + Sync + 'static {} + +/// This is valid for both of of supported curves +const PUBLIC_KEY_SERIALIZED_SIZE: usize = 48; + +const SECRET_KEY_SERIALIZED_SIZE: usize = 32; + +const SIGNATURE_SERIALIZED_SIZE: usize = 96; + +/// TODO BLS12-377 +#[cfg(feature = "full_crypto")] +pub type Bls377Pair = Pair; +/// TODO BLS12-377 +pub type Bls377Public = Public; +/// TODO BLS12-377 +pub type Bls377Signature = Signature; + +/// TODO BLS12-381 +#[cfg(feature = "full_crypto")] +pub type Bls381Pair = Pair; +/// TODO BLS12-381 +pub type Bls381Public = Public; +/// TODO +pub type Bls381Signature = Signature; + +/// A secret seed. +/// +/// It's not called a "secret key" because ring doesn't expose the secret keys /// of the key pair (yeah, dumb); as such we're forced to remember the seed manually if we /// will need it later (such as for HDKD). #[cfg(feature = "full_crypto")] -type Seed = [u8; BLS377::SECRET_KEY_SIZE]; +type Seed = [u8; SECRET_KEY_SERIALIZED_SIZE]; /// A public key. -#[cfg_attr(feature = "full_crypto", derive(Hash))] -#[derive( - PartialEq, - Eq, - PartialOrd, - Ord, - Clone, - Copy, - Encode, - Decode, - PassByInner, - MaxEncodedLen, - TypeInfo, -)] -pub struct Public(pub [u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]); +// #[cfg_attr(feature = "full_crypto", derive(Hash))] +#[derive(PartialOrd, Ord, Copy, Encode, Decode, MaxEncodedLen, TypeInfo)] +pub struct Public { + inner: [u8; PUBLIC_KEY_SERIALIZED_SIZE], + _phantom: PhantomData, +} -/// A key pair. -#[cfg(feature = "full_crypto")] -pub struct Pair(Keypair); +impl std::hash::Hash for Public { + fn hash(&self, state: &mut H) + where + H: std::hash::Hasher, + { + } +} -#[cfg(feature = "full_crypto")] -impl Clone for Pair { +impl Clone for Public { fn clone(&self) -> Self { - Pair(self.0.clone()) + Self { inner: self.inner.clone(), _phantom: PhantomData } } } -impl AsRef<[u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]> for Public { - fn as_ref(&self) -> &[u8; BLS377::PUBLICKEY_SERIALIZED_SIZE] { - &self.0 +impl PartialEq for Public { + fn eq(&self, other: &Self) -> bool { + self.inner == other.inner } } -impl AsRef<[u8]> for Public { +impl Eq for Public {} + +impl Public { + /// A new instance from the given PUBLIC_KEY_SERIALIZED_SIZE-byte `data`. + /// + /// NOTE: No checking goes on to ensure this is a real public key. Only use it if + /// you are certain that the array actually is a pubkey. GIGO! + pub fn from_raw(data: [u8; PUBLIC_KEY_SERIALIZED_SIZE]) -> Self { + Public { inner: data, _phantom: PhantomData } + } + + /// A new instance from an H384. + /// + /// NOTE: No checking goes on to ensure this is a real public key. Only use it if + /// you are certain that the array actually is a pubkey. GIGO! + pub fn from_h384(x: H384) -> Self { + Self::from_raw(x.into()) + } +} + +impl ByteArray for Public { + const LEN: usize = PUBLIC_KEY_SERIALIZED_SIZE; +} + +impl PassByInner for Public { + type Inner = [u8; PUBLIC_KEY_SERIALIZED_SIZE]; + + fn into_inner(self) -> Self::Inner { + self.inner + } + + fn inner(&self) -> &Self::Inner { + &self.inner + } + + fn from_inner(inner: Self::Inner) -> Self { + Self { inner, _phantom: PhantomData } + } +} + +impl AsRef<[u8; PUBLIC_KEY_SERIALIZED_SIZE]> for Public { + fn as_ref(&self) -> &[u8; PUBLIC_KEY_SERIALIZED_SIZE] { + &self.inner + } +} + +impl AsRef<[u8]> for Public { fn as_ref(&self) -> &[u8] { - &self.0[..] + &self.inner[..] } } -impl AsMut<[u8]> for Public { +impl AsMut<[u8]> for Public { fn as_mut(&mut self) -> &mut [u8] { - &mut self.0[..] + &mut self.inner[..] } } -impl Deref for Public { +impl Deref for Public { type Target = [u8]; fn deref(&self) -> &Self::Target { - &self.0 + &self.inner } } -impl sp_std::convert::TryFrom<&[u8]> for Public { +impl TryFrom<&[u8]> for Public { type Error = (); fn try_from(data: &[u8]) -> Result { - if data.len() != Self::LEN { + if data.len() != PUBLIC_KEY_SERIALIZED_SIZE { return Err(()) } - let mut r = [0u8; Self::LEN]; + let mut r = [0u8; PUBLIC_KEY_SERIALIZED_SIZE]; r.copy_from_slice(data); Ok(Self::unchecked_from(r)) } } -impl From for [u8; BLS377::PUBLICKEY_SERIALIZED_SIZE] { - fn from(x: Public) -> Self { - x.0 +impl From> for [u8; PUBLIC_KEY_SERIALIZED_SIZE] { + fn from(x: Public) -> Self { + x.inner } } #[cfg(feature = "full_crypto")] -impl From for Public { - fn from(x: Pair) -> Self { +impl From> for Public { + fn from(x: Pair) -> Self { x.public() } } -impl From for H384 { - fn from(x: Public) -> Self { - x.0.into() - } -} - -#[cfg(feature = "std")] -impl std::str::FromStr for Public { - type Err = crate::crypto::PublicError; - - fn from_str(s: &str) -> Result { - Self::from_ss58check(s) +impl From> for H384 { + fn from(x: Public) -> Self { + x.inner.into() } } -impl UncheckedFrom<[u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]> for Public { - fn unchecked_from(x: [u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]) -> Self { +impl UncheckedFrom<[u8; PUBLIC_KEY_SERIALIZED_SIZE]> for Public { + fn unchecked_from(x: [u8; PUBLIC_KEY_SERIALIZED_SIZE]) -> Self { Public::from_raw(x) } } -impl UncheckedFrom for Public { +impl UncheckedFrom for Public { fn unchecked_from(x: H384) -> Self { Public::from_h384(x) } } #[cfg(feature = "std")] -impl std::fmt::Display for Public { +impl std::str::FromStr for Public { + type Err = crate::crypto::PublicError; + + fn from_str(s: &str) -> Result { + Self::from_ss58check(s) + } +} + +#[cfg(feature = "std")] +impl std::fmt::Display for Public { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { write!(f, "{}", self.to_ss58check()) } } -impl sp_std::fmt::Debug for Public { - #[cfg(feature = "std")] +#[cfg(feature = "std")] +impl sp_std::fmt::Debug for Public { fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { let s = self.to_ss58check(); - write!(f, "{} ({}...)", crate::hexdisplay::HexDisplay::from(&self.0), &s[0..8]) + write!(f, "{} ({}...)", crate::hexdisplay::HexDisplay::from(&self.inner), &s[0..8]) } +} - #[cfg(not(feature = "std"))] +#[cfg(not(feature = "std"))] +impl sp_std::fmt::Debug for Public { fn fmt(&self, _: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { Ok(()) } } #[cfg(feature = "std")] -impl Serialize for Public { +impl Serialize for Public { fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -200,7 +268,7 @@ impl Serialize for Public { } #[cfg(feature = "std")] -impl<'de> Deserialize<'de> for Public { +impl<'de, T: StdMarker> Deserialize<'de> for Public { fn deserialize(deserializer: D) -> Result where D: Deserializer<'de>, @@ -210,19 +278,87 @@ impl<'de> Deserialize<'de> for Public { } } -/// A signature (a 512-bit value). -#[cfg_attr(feature = "full_crypto", derive(Hash))] -#[derive(Encode, Decode, MaxEncodedLen, PassByInner, TypeInfo, PartialEq, Eq)] -pub struct Signature(pub [u8; BLS377::SIGNATURE_SERIALIZED_SIZE]); +impl TraitPublic for Public { + fn to_public_crypto_pair(&self) -> CryptoTypePublicPair { + CryptoTypePublicPair(CRYPTO_ID, self.to_raw_vec()) + } +} + +impl Derive for Public {} + +impl From> for CryptoTypePublicPair { + fn from(key: Public) -> Self { + (&key).into() + } +} + +impl From<&Public> for CryptoTypePublicPair { + fn from(key: &Public) -> Self { + CryptoTypePublicPair(CRYPTO_ID, key.to_raw_vec()) + } +} + +impl CryptoType for Public { + #[cfg(feature = "full_crypto")] + type Pair = Pair; +} + +/// A generic BLS signature. +/// TODO: PassByInner is required? If yes implement manually +//#[cfg_attr(feature = "full_crypto", derive(Hash))] +#[derive(Clone, Encode, Decode, MaxEncodedLen, /* PassByInner, */ TypeInfo)] +pub struct Signature { + inner: [u8; SIGNATURE_SERIALIZED_SIZE], + _phantom: PhantomData, +} + +impl PartialEq for Signature { + fn eq(&self, other: &Self) -> bool { + self.inner == other.inner + } +} + +impl Eq for Signature {} + +impl Signature { + /// A new instance from the given SIGNATURE_SERIALIZED_SIZE-byte `data`. + /// + /// NOTE: No checking goes on to ensure this is a real signature. Only use it if + /// you are certain that the array actually is a signature. GIGO! + pub fn from_raw(data: [u8; SIGNATURE_SERIALIZED_SIZE]) -> Self { + Signature { inner: data, _phantom: PhantomData } + } + + /// A new instance from the given slice that should be 64 bytes long. + /// + /// NOTE: No checking goes on to ensure this is a real signature. Only use it if + /// you are certain that the array actually is a signature. GIGO! + pub fn from_slice(data: &[u8]) -> Option { + if data.len() != SIGNATURE_SERIALIZED_SIZE { + return None + } + let mut r = [0u8; SIGNATURE_SERIALIZED_SIZE]; + r.copy_from_slice(data); + Some(Signature::from_raw(r)) + } + + /// A new instance from an H768. + /// + /// NOTE: No checking goes on to ensure this is a real signature. Only use it if + /// you are certain that the array actually is a signature. GIGO! + pub fn from_h768(hash: H768) -> Self { + Signature::from_raw(hash.into()) + } +} -impl sp_std::convert::TryFrom<&[u8]> for Signature { +impl TryFrom<&[u8]> for Signature { type Error = (); fn try_from(data: &[u8]) -> Result { - if data.len() == BLS377::SIGNATURE_SERIALIZED_SIZE { - let mut inner = [0u8; BLS377::SIGNATURE_SERIALIZED_SIZE]; + if data.len() == SIGNATURE_SERIALIZED_SIZE { + let mut inner = [0u8; SIGNATURE_SERIALIZED_SIZE]; inner.copy_from_slice(data); - Ok(Signature(inner)) + Ok(Signature::from_raw(inner)) } else { Err(()) } @@ -230,17 +366,17 @@ impl sp_std::convert::TryFrom<&[u8]> for Signature { } #[cfg(feature = "std")] -impl Serialize for Signature { +impl Serialize for Signature { fn serialize(&self, serializer: S) -> Result where S: Serializer, { - serializer.serialize_str(&hex::encode(self)) + serializer.serialize_str(&hex::encode(self.inner)) } } #[cfg(feature = "std")] -impl<'de> Deserialize<'de> for Signature { +impl<'de, T> Deserialize<'de> for Signature { fn deserialize(deserializer: D) -> Result where D: Deserializer<'de>, @@ -252,48 +388,40 @@ impl<'de> Deserialize<'de> for Signature { } } -impl Clone for Signature { - fn clone(&self) -> Self { - let mut r = [0u8; BLS377::SIGNATURE_SERIALIZED_SIZE]; - r.copy_from_slice(&self.0[..]); - Signature(r) +impl From> for H768 { + fn from(signature: Signature) -> H768 { + H768::from(signature.inner) } } -impl From for H768 { - fn from(v: Signature) -> H768 { - H768::from(v.0) +impl From> for [u8; SIGNATURE_SERIALIZED_SIZE] { + fn from(signature: Signature) -> [u8; SIGNATURE_SERIALIZED_SIZE] { + signature.inner } } -impl From for [u8; BLS377::SIGNATURE_SERIALIZED_SIZE] { - fn from(v: Signature) -> [u8; BLS377::SIGNATURE_SERIALIZED_SIZE] { - v.0 +impl AsRef<[u8; SIGNATURE_SERIALIZED_SIZE]> for Signature { + fn as_ref(&self) -> &[u8; SIGNATURE_SERIALIZED_SIZE] { + &self.inner } } -impl AsRef<[u8; BLS377::SIGNATURE_SERIALIZED_SIZE]> for Signature { - fn as_ref(&self) -> &[u8; BLS377::SIGNATURE_SERIALIZED_SIZE] { - &self.0 - } -} - -impl AsRef<[u8]> for Signature { +impl AsRef<[u8]> for Signature { fn as_ref(&self) -> &[u8] { - &self.0[..] + &self.inner[..] } } -impl AsMut<[u8]> for Signature { +impl AsMut<[u8]> for Signature { fn as_mut(&mut self) -> &mut [u8] { - &mut self.0[..] + &mut self.inner[..] } } -impl sp_std::fmt::Debug for Signature { +impl sp_std::fmt::Debug for Signature { #[cfg(feature = "std")] fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { - write!(f, "{}", crate::hexdisplay::HexDisplay::from(&self.0)) + write!(f, "{}", crate::hexdisplay::HexDisplay::from(&self.inner)) } #[cfg(not(feature = "std"))] @@ -302,95 +430,25 @@ impl sp_std::fmt::Debug for Signature { } } -impl UncheckedFrom<[u8; BLS377::SIGNATURE_SERIALIZED_SIZE]> for Signature { - fn unchecked_from(data: [u8; BLS377::SIGNATURE_SERIALIZED_SIZE]) -> Signature { - Signature(data) +impl UncheckedFrom<[u8; SIGNATURE_SERIALIZED_SIZE]> for Signature { + fn unchecked_from(data: [u8; SIGNATURE_SERIALIZED_SIZE]) -> Self { + Signature::from_raw(data) } } -impl Signature { - /// A new instance from the given BLS377::SIGNATURE_SERIALIZED_SIZE-byte `data`. - /// - /// NOTE: No checking goes on to ensure this is a real signature. Only use it if - /// you are certain that the array actually is a signature. GIGO! - pub fn from_raw(data: [u8; BLS377::SIGNATURE_SERIALIZED_SIZE]) -> Signature { - Signature(data) - } - - /// A new instance from the given slice that should be 64 bytes long. - /// - /// NOTE: No checking goes on to ensure this is a real signature. Only use it if - /// you are certain that the array actually is a signature. GIGO! - pub fn from_slice(data: &[u8]) -> Option { - let mut r = [0u8; BLS377::SIGNATURE_SERIALIZED_SIZE]; - r.copy_from_slice(data); - Some(Signature(r)) - } - - /// A new instance from an H768. - /// - /// NOTE: No checking goes on to ensure this is a real signature. Only use it if - /// you are certain that the array actually is a signature. GIGO! - pub fn from_h768(v: H768) -> Signature { - Signature(v.into()) - } -} - -// TODO: ADD just if and WHEN is required (if ever) -// /// A localized signature also contains sender information. -// #[cfg(feature = "std")] -// #[derive(PartialEq, Eq, Clone, Debug, Encode, Decode)] -// pub struct LocalizedSignature { -// /// The signer of the signature. -// pub signer: Public, -// /// The signature itself. -// pub signature: Signature, -// } - -impl Public { - /// A new instance from the given BLS377::PUBLICKEY_SERIALIZED_SIZE-byte `data`. - /// - /// NOTE: No checking goes on to ensure this is a real public key. Only use it if - /// you are certain that the array actually is a pubkey. GIGO! - pub fn from_raw(data: [u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]) -> Self { - Public(data) - } - - /// A new instance from an H384. - /// - /// NOTE: No checking goes on to ensure this is a real public key. Only use it if - /// you are certain that the array actually is a pubkey. GIGO! - pub fn from_h384(x: H384) -> Self { - Public(x.into()) - } - - /// Return a slice filled with raw data. - pub fn as_array_ref(&self) -> &[u8; BLS377::PUBLICKEY_SERIALIZED_SIZE] { - self.as_ref() - } -} - -impl ByteArray for Public { - const LEN: usize = BLS377::PUBLICKEY_SERIALIZED_SIZE; -} - -impl TraitPublic for Public { - fn to_public_crypto_pair(&self) -> CryptoTypePublicPair { - CryptoTypePublicPair(CRYPTO_ID, self.to_raw_vec()) - } +impl CryptoType for Signature { + #[cfg(feature = "full_crypto")] + type Pair = Pair; } -impl Derive for Public {} - -impl From for CryptoTypePublicPair { - fn from(key: Public) -> Self { - (&key).into() - } -} +/// A key pair. +#[cfg(feature = "full_crypto")] +pub struct Pair(Keypair); -impl From<&Public> for CryptoTypePublicPair { - fn from(key: &Public) -> Self { - CryptoTypePublicPair(CRYPTO_ID, key.to_raw_vec()) +#[cfg(feature = "full_crypto")] +impl Clone for Pair { + fn clone(&self) -> Self { + Pair(self.0.clone()) } } @@ -408,17 +466,39 @@ pub enum DeriveError { } #[cfg(feature = "full_crypto")] -impl TraitPair for Pair { - type Public = Public; +impl Pair { + /// Get the seed for this key. + pub fn seed(&self) -> Seed { + self.0.secret.to_bytes() + } + + // TODO DAVXY: is this required??? If yes add when it will be 😃 + // /// Exactly as `from_string` except that if no matches are found then, the the first 32 + // /// characters are taken (padded with spaces as necessary) and used as the MiniSecretKey. + // #[cfg(feature = "std")] + // pub fn from_legacy_string(s: &str, password_override: Option<&str>) -> Self { + // Self::from_string(s, password_override).unwrap_or_else(|_| { + // let mut padded_seed: Seed = [b' '; 32]; + // let len = s.len().min(32); + // padded_seed[..len].copy_from_slice(&s.as_bytes()[..len]); + // Self::from_seed(&padded_seed) + // }) + // } +} + +#[cfg(feature = "full_crypto")] +impl TraitPair for Pair { type Seed = Seed; - type Signature = Signature; + type Public = Public; + type Signature = Signature; + // TODO DAVXY: this is not required to be an associated type... type DeriveError = DeriveError; /// Generate new secure (random) key pair and provide the recovery phrase. /// /// You can recover the same key later with `from_phrase`. #[cfg(feature = "std")] - fn generate_with_phrase(password: Option<&str>) -> (Pair, String, Seed) { + fn generate_with_phrase(password: Option<&str>) -> (Self, String, Seed) { let mnemonic = Mnemonic::new(MnemonicType::Words12, Language::English); let phrase = mnemonic.phrase(); let (pair, seed) = Self::from_phrase(phrase, password) @@ -431,7 +511,7 @@ impl TraitPair for Pair { fn from_phrase( phrase: &str, password: Option<&str>, - ) -> Result<(Pair, Seed), SecretStringError> { + ) -> Result<(Self, Seed), SecretStringError> { let big_seed = seed_from_entropy( Mnemonic::from_phrase(phrase, Language::English) .map_err(|_| SecretStringError::InvalidPhrase)? @@ -447,7 +527,7 @@ impl TraitPair for Pair { /// Make a new key pair from secret seed material. /// /// You should never need to use this; generate(), generate_with_phrase - fn from_seed(seed: &Seed) -> Pair { + fn from_seed(seed: &Seed) -> Self { Self::from_seed_slice(&seed[..]).expect("seed has valid length; qed") } @@ -455,8 +535,8 @@ impl TraitPair for Pair { /// will return `None`. /// /// You should never need to use this; generate(), generate_with_phrase - fn from_seed_slice(seed_slice: &[u8]) -> Result { - if seed_slice.len() != BLS377::SECRET_KEY_SIZE { + fn from_seed_slice(seed_slice: &[u8]) -> Result { + if seed_slice.len() != SECRET_KEY_SERIALIZED_SIZE { return Err(SecretStringError::InvalidSeedLength) } let secret = bls_like::SecretKey::from_seed(seed_slice); @@ -469,7 +549,7 @@ impl TraitPair for Pair { &self, path: Iter, _seed: Option, - ) -> Result<(Pair, Option), DeriveError> { + ) -> Result<(Self, Option), DeriveError> { let mut acc = self.0.secret.to_bytes(); for j in path { match j { @@ -481,23 +561,23 @@ impl TraitPair for Pair { } /// Get the public key. - fn public(&self) -> Public { - let mut r = [0u8; BLS377::PUBLICKEY_SERIALIZED_SIZE]; + fn public(&self) -> Self::Public { + let mut raw = [0u8; PUBLIC_KEY_SERIALIZED_SIZE]; let pk = self.0.public.to_bytes(); - r.copy_from_slice(pk.as_slice()); - Public(r) + raw.copy_from_slice(pk.as_slice()); + Self::Public::from_raw(raw) } /// Sign a message. - fn sign(&self, message: &[u8]) -> Signature { + fn sign(&self, message: &[u8]) -> Self::Signature { let mut mutable_self = self.clone(); let r = mutable_self.0.sign(Message::new(b"", message)).to_bytes(); - Signature::from_raw(r) + Self::Signature::from_raw(r) } /// Verify a signature on a message. Returns true if the signature is good. fn verify>(sig: &Self::Signature, message: M, pubkey: &Self::Public) -> bool { - Self::verify_weak(&sig.0[..], message.as_ref(), pubkey) + Self::verify_weak(&sig.inner[..], message.as_ref(), pubkey) } /// Verify a signature on a message. Returns true if the signature is good. @@ -505,8 +585,7 @@ impl TraitPair for Pair { /// This doesn't use the type system to ensure that `sig` and `pubkey` are the correct /// size. Use it only if you're coming from byte buffers and need the speed. fn verify_weak, M: AsRef<[u8]>>(sig: &[u8], message: M, pubkey: P) -> bool { - let pubkey_array: [u8; BLS377::PUBLICKEY_SERIALIZED_SIZE] = match pubkey.as_ref().try_into() - { + let pubkey_array: [u8; PUBLIC_KEY_SERIALIZED_SIZE] = match pubkey.as_ref().try_into() { Ok(pk) => pk, Err(_) => return false, }; @@ -534,38 +613,11 @@ impl TraitPair for Pair { } #[cfg(feature = "full_crypto")] -impl Pair { - /// Get the seed for this key. - pub fn seed(&self) -> Seed { - self.0.secret.to_bytes() - } - - /// Exactly as `from_string` except that if no matches are found then, the the first 32 - /// characters are taken (padded with spaces as necessary) and used as the MiniSecretKey. - #[cfg(feature = "std")] - pub fn from_legacy_string(s: &str, password_override: Option<&str>) -> Pair { - Self::from_string(s, password_override).unwrap_or_else(|_| { - let mut padded_seed: Seed = [b' '; 32]; - let len = s.len().min(32); - padded_seed[..len].copy_from_slice(&s.as_bytes()[..len]); - Self::from_seed(&padded_seed) - }) - } -} -impl CryptoType for Public { - #[cfg(feature = "full_crypto")] - type Pair = Pair; -} - -impl CryptoType for Signature { - #[cfg(feature = "full_crypto")] - type Pair = Pair; +impl CryptoType for Pair { + type Pair = Pair; } -#[cfg(feature = "full_crypto")] -impl CryptoType for Pair { - type Pair = Pair; -} +impl StdMarker for BLS377 {} #[cfg(test)] mod test { @@ -577,8 +629,8 @@ mod test { #[test] fn default_phrase_should_be_used() { assert_eq!( - Pair::from_string("//Alice///password", None).unwrap().public(), - Pair::from_string(&format!("{}//Alice", DEV_PHRASE), Some("password")) + Bls377Pair::from_string("//Alice///password", None).unwrap().public(), + Bls377Pair::from_string(&format!("{}//Alice", DEV_PHRASE), Some("password")) .unwrap() .public(), ); @@ -588,7 +640,7 @@ mod test { #[test] fn seed_and_derive_should_work() { let seed = hex!("9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f00"); - let pair = Pair::from_seed(&seed); + let pair = Bls377Pair::from_seed(&seed); // we are using hash to field so this is not going to work // assert_eq!(pair.seed(), seed); let path = vec![DeriveJunction::Hard([0u8; 32])]; @@ -599,128 +651,137 @@ mod test { ); } - #[test] - fn test_vector_should_work() { - let pair = Pair::from_seed(&hex!( - "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60" - )); - let public = pair.public(); - assert_eq!( - public, - Public::from_raw(hex!( - "7a84ca8ce4c37c93c95ecee6a3c0c9a7b9c225093cf2f12dc4f69cbfb847ef9424a18f5755d5a742247d386ff2aabb80" - )) - ); - let message = b""; - let signature = hex!("0e5854002b249175764e463165aec0e38a46ddd44c2db29d6fec3022a3993b3390b001b53a04d155a4d216dd361df90087281be27c58ae22c7f1333820259ff5ae1b321126d1a001bf91ee088fb56ca9d4aa484d129ede7e701ced08df631581"); - let signature = Signature::from_raw(signature); - assert!(pair.sign(&message[..]) == signature); - assert!(Pair::verify(&signature, &message[..], &public)); - } - - #[test] - fn test_vector_by_string_should_work() { - let pair = Pair::from_string( - "0x9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60", - None, - ) - .unwrap(); - let public = pair.public(); - assert_eq!( - public, - Public::from_raw(hex!( - "6dc6be608fab3c6bd894a606be86db346cc170db85c733853a371f3db54ae1b12052c0888d472760c81b537572a26f00" - )) - ); - let message = b""; - let signature = hex!("9f7d07e0fdd6aa342f6defaade946b59bfeba8af45c243f86b208cd339b2c713421844e3007e0acafd0a529542ee050047b739fe5bfd311d884451542204e173d784e648eb55f4bd32da747f006120fadf4801c2b1c88f9745c50c2141b1d380"); - let signature = Signature::from_raw(signature); - assert!(pair.sign(&message[..]) == signature); - assert!(Pair::verify(&signature, &message[..], &public)); - } + // // Is this supposed to be successful? + // // Where is the test vector defined? + // #[test] + // fn test_vector_should_work() { + // let pair = Bls377Pair::from_seed(&hex!( + // "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60" + // )); + // let public = pair.public(); + // assert_eq!( + // public, + // Bls377Public::from_raw(hex!( + // "7a84ca8ce4c37c93c95ecee6a3c0c9a7b9c225093cf2f12dc4f69cbfb847ef9424a18f5755d5a742247d386ff2aabb80" + // )) + // ); + // let message = b""; + // let signature = + // hex!("0e5854002b249175764e463165aec0e38a46ddd44c2db29d6fec3022a3993b3390b001b53a04d155a4d216dd361df90087281be27c58ae22c7f1333820259ff5ae1b321126d1a001bf91ee088fb56ca9d4aa484d129ede7e701ced08df631581" + // ); + // let signature = Bls377Signature::from_raw(signature); + // assert!(pair.sign(&message[..]) == signature); + // assert!(Bls377Pair::verify(&signature, &message[..], &public)); + // } + + // // Is this expected to be pass? + // // Where is the test vector defined? + // #[test] + // fn test_vector_by_string_should_work() { + // let pair = Pair::from_string( + // "0x9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60", + // None, + // ) + // .unwrap(); + // let public = pair.public(); + // assert_eq!( + // public, + // Public::from_raw(hex!( + // "6dc6be608fab3c6bd894a606be86db346cc170db85c733853a371f3db54ae1b12052c0888d472760c81b537572a26f00" + // )) + // ); + // let message = b""; + // let signature = + // hex!("9f7d07e0fdd6aa342f6defaade946b59bfeba8af45c243f86b208cd339b2c713421844e3007e0acafd0a529542ee050047b739fe5bfd311d884451542204e173d784e648eb55f4bd32da747f006120fadf4801c2b1c88f9745c50c2141b1d380" + // ); let signature = Signature::from_raw(signature); + // assert!(pair.sign(&message[..]) == signature); + // assert!(Pair::verify(&signature, &message[..], &public)); + // } #[test] fn generated_pair_should_work() { - let (pair, _) = Pair::generate(); + let (pair, _) = Bls377Pair::generate(); let public = pair.public(); let message = b"Something important"; let signature = pair.sign(&message[..]); - assert!(Pair::verify(&signature, &message[..], &public)); - assert!(!Pair::verify(&signature, b"Something else", &public)); + assert!(Bls377Pair::verify(&signature, &message[..], &public)); + assert!(!Bls377Pair::verify(&signature, b"Something else", &public)); } #[test] fn seeded_pair_should_work() { - let pair = Pair::from_seed(b"12345678901234567890123456789012"); + let pair = Bls377Pair::from_seed(b"12345678901234567890123456789012"); let public = pair.public(); assert_eq!( public, - Public::from_raw( + Bls377Public::from_raw( hex!( "754d2f2bbfa67df54d7e0e951979a18a1e0f45948857752cc2bac6bbb0b1d05e8e48bcc453920bf0c4bbd59932124801") ) ); - let message = hex!("2f8c6129d816cf51c374bc7f08c3e63ed156cf78aefb4a6550d97b87997977ee00000000000000000200d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a4500000000000000"); + let message = + hex!("2f8c6129d816cf51c374bc7f08c3e63ed156cf78aefb4a6550d97b87997977ee00000000000000000200d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a4500000000000000" + ); let signature = pair.sign(&message[..]); println!("Correct signature: {:?}", signature); - assert!(Pair::verify(&signature, &message[..], &public)); - assert!(!Pair::verify(&signature, "Other message", &public)); - } - - #[test] - fn generate_with_phrase_recovery_possible() { - let (pair1, phrase, _) = Pair::generate_with_phrase(None); - let (pair2, _) = Pair::from_phrase(&phrase, None).unwrap(); - - assert_eq!(pair1.public(), pair2.public()); - } - - #[test] - fn generate_with_password_phrase_recovery_possible() { - let (pair1, phrase, _) = Pair::generate_with_phrase(Some("password")); - let (pair2, _) = Pair::from_phrase(&phrase, Some("password")).unwrap(); - - assert_eq!(pair1.public(), pair2.public()); - } - - #[test] - fn password_does_something() { - let (pair1, phrase, _) = Pair::generate_with_phrase(Some("password")); - let (pair2, _) = Pair::from_phrase(&phrase, None).unwrap(); - - assert_ne!(pair1.public(), pair2.public()); - } - - #[test] - fn ss58check_roundtrip_works() { - let pair = Pair::from_seed(b"12345678901234567890123456789012"); - let public = pair.public(); - let s = public.to_ss58check(); - println!("Correct: {}", s); - let cmp = Public::from_ss58check(&s).unwrap(); - assert_eq!(cmp, public); - } - - #[test] - fn signature_serialization_works() { - let pair = Pair::from_seed(b"12345678901234567890123456789012"); - let message = b"Something important"; - let signature = pair.sign(&message[..]); - let serialized_signature = serde_json::to_string(&signature).unwrap(); - // Signature is 96 bytes, so 192 chars + 2 quote chars - assert_eq!(serialized_signature.len(), 194); - let signature = serde_json::from_str(&serialized_signature).unwrap(); - assert!(Pair::verify(&signature, &message[..], &pair.public())); - } - - #[test] - fn signature_serialization_doesnt_panic() { - fn deserialize_signature(text: &str) -> Result { - serde_json::from_str(text) - } - assert!(deserialize_signature("Not valid json.").is_err()); - assert!(deserialize_signature("\"Not an actual signature.\"").is_err()); - // Poorly-sized - assert!(deserialize_signature("\"abc123\"").is_err()); - } + assert!(Bls377Pair::verify(&signature, &message[..], &public)); + assert!(!Bls377Pair::verify(&signature, "Other message", &public)); + } + + // #[test] + // fn generate_with_phrase_recovery_possible() { + // let (pair1, phrase, _) = Pair::generate_with_phrase(None); + // let (pair2, _) = Pair::from_phrase(&phrase, None).unwrap(); + + // assert_eq!(pair1.public(), pair2.public()); + // } + + // #[test] + // fn generate_with_password_phrase_recovery_possible() { + // let (pair1, phrase, _) = Pair::generate_with_phrase(Some("password")); + // let (pair2, _) = Pair::from_phrase(&phrase, Some("password")).unwrap(); + + // assert_eq!(pair1.public(), pair2.public()); + // } + + // #[test] + // fn password_does_something() { + // let (pair1, phrase, _) = Pair::generate_with_phrase(Some("password")); + // let (pair2, _) = Pair::from_phrase(&phrase, None).unwrap(); + + // assert_ne!(pair1.public(), pair2.public()); + // } + + // #[test] + // fn ss58check_roundtrip_works() { + // let pair = Pair::from_seed(b"12345678901234567890123456789012"); + // let public = pair.public(); + // let s = public.to_ss58check(); + // println!("Correct: {}", s); + // let cmp = Public::from_ss58check(&s).unwrap(); + // assert_eq!(cmp, public); + // } + + // #[test] + // fn signature_serialization_works() { + // let pair = Pair::from_seed(b"12345678901234567890123456789012"); + // let message = b"Something important"; + // let signature = pair.sign(&message[..]); + // let serialized_signature = serde_json::to_string(&signature).unwrap(); + // // Signature is 96 bytes, so 192 chars + 2 quote chars + // assert_eq!(serialized_signature.len(), 194); + // let signature = serde_json::from_str(&serialized_signature).unwrap(); + // assert!(Pair::verify(&signature, &message[..], &pair.public())); + // } + + // #[test] + // fn signature_serialization_doesnt_panic() { + // fn deserialize_signature(text: &str) -> Result { + // serde_json::from_str(text) + // } + // assert!(deserialize_signature("Not valid json.").is_err()); + // assert!(deserialize_signature("\"Not an actual signature.\"").is_err()); + // // Poorly-sized + // assert!(deserialize_signature("\"abc123\"").is_err()); + // } } From 409b2f426b9f99d3a53e7a9d98370eb81b2380dc Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 23 Mar 2023 12:12:00 +0100 Subject: [PATCH 06/35] Finalize generic implementation --- client/keystore/src/local.rs | 19 +- .../src/{bls.rs => bls377.rs} | 24 +-- primitives/application-crypto/src/lib.rs | 2 +- primitives/core/src/bls.rs | 174 +++++++++++------- primitives/core/src/lib.rs | 2 + primitives/core/src/testing.rs | 4 +- primitives/io/src/lib.rs | 50 ----- primitives/keystore/src/lib.rs | 16 +- primitives/keystore/src/testing.rs | 28 +-- 9 files changed, 162 insertions(+), 157 deletions(-) rename primitives/application-crypto/src/{bls.rs => bls377.rs} (62%) diff --git a/client/keystore/src/local.rs b/client/keystore/src/local.rs index 7c906fe26f14f..b3c759d962d6e 100644 --- a/client/keystore/src/local.rs +++ b/client/keystore/src/local.rs @@ -18,12 +18,11 @@ //! Local keystore implementation use parking_lot::RwLock; -use sp_application_crypto::{bls, ecdsa, ed25519, sr25519, AppKey, AppPair, IsWrappedBy}; +use sp_application_crypto::{bls377, ecdsa, ed25519, sr25519, AppKey, AppPair, IsWrappedBy}; use sp_core::{ crypto::{ ByteArray, CryptoTypePublicPair, ExposeSecret, KeyTypeId, Pair as PairT, SecretString, }, - sr25519::{Pair as Sr25519Pair, Public as Sr25519Public}, Encode, }; use sp_keystore::{ @@ -231,11 +230,11 @@ impl Keystore for LocalKeystore { fn sr25519_vrf_sign( &self, key_type: KeyTypeId, - public: &Sr25519Public, + public: &sr25519::Public, transcript_data: VRFTranscriptData, ) -> std::result::Result, TraitError> { let transcript = make_transcript(transcript_data); - let pair = self.0.read().key_pair_by_type::(public, key_type)?; + let pair = self.0.read().key_pair_by_type::(public, key_type)?; if let Some(pair) = pair { let (inout, proof, _) = pair.as_ref().vrf_sign(transcript); @@ -257,7 +256,7 @@ impl Keystore for LocalKeystore { } /// Returns all bls public keys for the given key type. - fn bls_public_keys(&self, _id: KeyTypeId) -> Vec { + fn bls377_public_keys(&self, _id: KeyTypeId) -> Vec { unimplemented!() } @@ -266,11 +265,11 @@ impl Keystore for LocalKeystore { /// If the given seed is `Some(_)`, the key pair will only be stored in memory. /// /// Returns the public key of the generated key pair. - fn bls_generate_new( + fn bls377_generate_new( &self, _id: KeyTypeId, _seed: Option<&str>, - ) -> std::result::Result { + ) -> std::result::Result { unimplemented!() } @@ -286,12 +285,12 @@ impl Keystore for LocalKeystore { /// Returns an [`bls::Signature`] or `None` in case the given `id` and /// `public` combination doesn't exist in the keystore. An `Err` will be /// returned if generating the signature itself failed. - fn bls_sign( + fn bls377_sign( &self, _id: KeyTypeId, - _public: &bls::Public, + _public: &bls377::Public, _msg: &[u8], - ) -> std::result::Result, TraitError> { + ) -> std::result::Result, TraitError> { unimplemented!() } } diff --git a/primitives/application-crypto/src/bls.rs b/primitives/application-crypto/src/bls377.rs similarity index 62% rename from primitives/application-crypto/src/bls.rs rename to primitives/application-crypto/src/bls377.rs index 9e101ff64f7d7..2983eefd163d7 100644 --- a/primitives/application-crypto/src/bls.rs +++ b/primitives/application-crypto/src/bls377.rs @@ -15,18 +15,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! bls crypto types. +//! BLS12-377 crypto applications. use crate::{KeyTypeId, RuntimePublic}; use sp_std::vec::Vec; -pub use sp_core::bls::*; +pub use sp_core::bls::bls377::*; mod app { - use sp_core::testing::BLS; + use sp_core::testing::BLS377; - crate::app_crypto!(super, BLS); + crate::app_crypto!(super, BLS377); impl crate::traits::BoundToRuntimeAppPublic for Public { type Public = Self; @@ -40,20 +40,20 @@ pub use app::{Public as AppPublic, Signature as AppSignature}; impl RuntimePublic for Public { type Signature = Signature; - fn all(key_type: KeyTypeId) -> crate::Vec { - sp_io::crypto::bls_public_keys(key_type) + fn all(_key_type: KeyTypeId) -> crate::Vec { + unreachable!("no access to the host keystore from runtime") } - fn generate_pair(key_type: KeyTypeId, seed: Option>) -> Self { - sp_io::crypto::bls_generate(key_type, seed) + fn generate_pair(_key_type: KeyTypeId, _seed: Option>) -> Self { + unreachable!("no access to the host keystore from runtime") } - fn sign>(&self, key_type: KeyTypeId, msg: &M) -> Option { - sp_io::crypto::bls_sign(key_type, self, msg.as_ref()) + fn sign>(&self, _key_type: KeyTypeId, _msg: &M) -> Option { + unreachable!("no access to the host keystore from runtime") } - fn verify>(&self, msg: &M, signature: &Self::Signature) -> bool { - sp_io::crypto::bls_verify(&signature, msg.as_ref(), self) + fn verify>(&self, _msg: &M, _signature: &Self::Signature) -> bool { + unreachable!("no access to the host keystore from runtime") } fn to_raw_vec(&self) -> Vec { diff --git a/primitives/application-crypto/src/lib.rs b/primitives/application-crypto/src/lib.rs index 9a6559b4d36b3..b14a5b0a979d1 100644 --- a/primitives/application-crypto/src/lib.rs +++ b/primitives/application-crypto/src/lib.rs @@ -44,7 +44,7 @@ pub use serde; #[doc(hidden)] pub use sp_std::{ops::Deref, vec::Vec}; -pub mod bls; +pub mod bls377; pub mod ecdsa; pub mod ed25519; pub mod sr25519; diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 707d60c25c3e5..175a9f1c47eea 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -15,9 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// tag::description[] //! Simple BLS (Boneh–Lynn–Shacham) Signature API. -// end::description[] #[cfg(feature = "full_crypto")] use sp_std::vec::Vec; @@ -38,7 +36,7 @@ use crate::crypto::{ use crate::crypto::{DeriveJunction, Pair as TraitPair, SecretStringError}; #[cfg(feature = "std")] use bip39::{Language, Mnemonic, MnemonicType}; -use bls_like::{EngineBLS, BLS377, ZBLS}; +use bls_like::EngineBLS; #[cfg(feature = "full_crypto")] use bls_like::{Keypair, Message, SerializableToBytes}; use core::convert::TryFrom; @@ -52,33 +50,57 @@ use substrate_bip39::seed_from_entropy; #[cfg(feature = "std")] use hex; -/// An identifier used to match public keys against bls377 keys -pub const CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"bls7"); +/// BLS-377 specialized types +pub mod bls377 { + use crate::crypto::CryptoTypeId; + use bls_like::BLS377; -trait StdMarker: EngineBLS + Send + Sync + 'static {} + /// An identifier used to match public keys against BLS12-377 keys + pub const CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"bls7"); -/// This is valid for both of of supported curves -const PUBLIC_KEY_SERIALIZED_SIZE: usize = 48; + /// BLS12-377 key pair. + #[cfg(feature = "full_crypto")] + pub type Pair = super::Pair; + /// BLS12-377 public key. + pub type Public = super::Public; + /// BLS12-377 signature. + pub type Signature = super::Signature; +} -const SECRET_KEY_SERIALIZED_SIZE: usize = 32; +/// BLS-381 specialized types +pub mod bls381 { + use crate::crypto::CryptoTypeId; + use bls_like::ZBLS; -const SIGNATURE_SERIALIZED_SIZE: usize = 96; + /// An identifier used to match public keys against BLS12-381 keys + pub const CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"bls8"); -/// TODO BLS12-377 -#[cfg(feature = "full_crypto")] -pub type Bls377Pair = Pair; -/// TODO BLS12-377 -pub type Bls377Public = Public; -/// TODO BLS12-377 -pub type Bls377Signature = Signature; + /// BLS12-381 key pair. + #[cfg(feature = "full_crypto")] + pub type Pair = super::Pair; + /// BLS12-381 public key. + pub type Public = super::Public; + /// BLS12-381 signature. + pub type Signature = super::Signature; +} + +trait BlsBound: EngineBLS + Send + Sync + 'static {} -/// TODO BLS12-381 +impl BlsBound for T {} + +// Secret key serialized side #[cfg(feature = "full_crypto")] -pub type Bls381Pair = Pair; -/// TODO BLS12-381 -pub type Bls381Public = Public; -/// TODO -pub type Bls381Signature = Signature; +const SECRET_KEY_SERIALIZED_SIZE: usize = 32; + +// Public key serialized side +const PUBLIC_KEY_SERIALIZED_SIZE: usize = 48; + +// Signature serialized size +const SIGNATURE_SERIALIZED_SIZE: usize = 96; + +// TODO DAVXY REMOVE-ME (REMOVED FROM UPSTREAM) +/// Temporary crypto id +pub const TEMPORARY_CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"TEMP"); /// A secret seed. /// @@ -89,19 +111,11 @@ pub type Bls381Signature = Signature; type Seed = [u8; SECRET_KEY_SERIALIZED_SIZE]; /// A public key. -// #[cfg_attr(feature = "full_crypto", derive(Hash))] -#[derive(PartialOrd, Ord, Copy, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[derive(Copy, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[scale_info(skip_type_params(T))] pub struct Public { inner: [u8; PUBLIC_KEY_SERIALIZED_SIZE], - _phantom: PhantomData, -} - -impl std::hash::Hash for Public { - fn hash(&self, state: &mut H) - where - H: std::hash::Hasher, - { - } + _phantom: PhantomData T>, } impl Clone for Public { @@ -118,6 +132,25 @@ impl PartialEq for Public { impl Eq for Public {} +impl PartialOrd for Public { + fn partial_cmp(&self, other: &Self) -> Option { + self.inner.partial_cmp(&other.inner) + } +} + +impl Ord for Public { + fn cmp(&self, other: &Self) -> sp_std::cmp::Ordering { + self.inner.cmp(&other.inner) + } +} + +#[cfg(feature = "full_crypto")] +impl sp_std::hash::Hash for Public { + fn hash(&self, state: &mut H) { + self.inner.hash(state) + } +} + impl Public { /// A new instance from the given PUBLIC_KEY_SERIALIZED_SIZE-byte `data`. /// @@ -202,7 +235,7 @@ impl From> for [u8; PUBLIC_KEY_SERIALIZED_SIZE] { } #[cfg(feature = "full_crypto")] -impl From> for Public { +impl From> for Public { fn from(x: Pair) -> Self { x.public() } @@ -227,7 +260,7 @@ impl UncheckedFrom for Public { } #[cfg(feature = "std")] -impl std::str::FromStr for Public { +impl std::str::FromStr for Public { type Err = crate::crypto::PublicError; fn from_str(s: &str) -> Result { @@ -236,14 +269,14 @@ impl std::str::FromStr for Public { } #[cfg(feature = "std")] -impl std::fmt::Display for Public { +impl std::fmt::Display for Public { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { write!(f, "{}", self.to_ss58check()) } } #[cfg(feature = "std")] -impl sp_std::fmt::Debug for Public { +impl sp_std::fmt::Debug for Public { fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { let s = self.to_ss58check(); write!(f, "{} ({}...)", crate::hexdisplay::HexDisplay::from(&self.inner), &s[0..8]) @@ -258,7 +291,7 @@ impl sp_std::fmt::Debug for Public { } #[cfg(feature = "std")] -impl Serialize for Public { +impl Serialize for Public { fn serialize(&self, serializer: S) -> Result where S: Serializer, @@ -268,7 +301,7 @@ impl Serialize for Public { } #[cfg(feature = "std")] -impl<'de, T: StdMarker> Deserialize<'de> for Public { +impl<'de, T: BlsBound> Deserialize<'de> for Public { fn deserialize(deserializer: D) -> Result where D: Deserializer<'de>, @@ -278,9 +311,9 @@ impl<'de, T: StdMarker> Deserialize<'de> for Public { } } -impl TraitPublic for Public { +impl TraitPublic for Public { fn to_public_crypto_pair(&self) -> CryptoTypePublicPair { - CryptoTypePublicPair(CRYPTO_ID, self.to_raw_vec()) + CryptoTypePublicPair(TEMPORARY_CRYPTO_ID, self.to_raw_vec()) } } @@ -294,22 +327,27 @@ impl From> for CryptoTypePublicPair { impl From<&Public> for CryptoTypePublicPair { fn from(key: &Public) -> Self { - CryptoTypePublicPair(CRYPTO_ID, key.to_raw_vec()) + CryptoTypePublicPair(TEMPORARY_CRYPTO_ID, key.to_raw_vec()) } } -impl CryptoType for Public { +impl CryptoType for Public { #[cfg(feature = "full_crypto")] type Pair = Pair; } /// A generic BLS signature. -/// TODO: PassByInner is required? If yes implement manually -//#[cfg_attr(feature = "full_crypto", derive(Hash))] -#[derive(Clone, Encode, Decode, MaxEncodedLen, /* PassByInner, */ TypeInfo)] +#[derive(Copy, Encode, Decode, MaxEncodedLen, TypeInfo)] +#[scale_info(skip_type_params(T))] pub struct Signature { inner: [u8; SIGNATURE_SERIALIZED_SIZE], - _phantom: PhantomData, + _phantom: PhantomData T>, +} + +impl Clone for Signature { + fn clone(&self) -> Self { + Self { inner: self.inner.clone(), _phantom: PhantomData } + } } impl PartialEq for Signature { @@ -320,6 +358,13 @@ impl PartialEq for Signature { impl Eq for Signature {} +#[cfg(feature = "full_crypto")] +impl sp_std::hash::Hash for Signature { + fn hash(&self, state: &mut H) { + self.inner.hash(state) + } +} + impl Signature { /// A new instance from the given SIGNATURE_SERIALIZED_SIZE-byte `data`. /// @@ -436,7 +481,7 @@ impl UncheckedFrom<[u8; SIGNATURE_SERIALIZED_SIZE]> for Signature { } } -impl CryptoType for Signature { +impl CryptoType for Signature { #[cfg(feature = "full_crypto")] type Pair = Pair; } @@ -487,7 +532,7 @@ impl Pair { } #[cfg(feature = "full_crypto")] -impl TraitPair for Pair { +impl TraitPair for Pair { type Seed = Seed; type Public = Public; type Signature = Signature; @@ -589,7 +634,7 @@ impl TraitPair for Pair { Ok(pk) => pk, Err(_) => return false, }; - let public_key = match bls_like::PublicKey::::from_bytes(&pubkey_array) { + let public_key = match bls_like::PublicKey::::from_bytes(&pubkey_array) { Ok(pk) => pk, Err(_) => return false, }; @@ -613,24 +658,23 @@ impl TraitPair for Pair { } #[cfg(feature = "full_crypto")] -impl CryptoType for Pair { +impl CryptoType for Pair { type Pair = Pair; } -impl StdMarker for BLS377 {} - #[cfg(test)] mod test { use super::*; use crate::crypto::DEV_PHRASE; + use bls377::{Pair, Public, Signature}; use hex_literal::hex; - use serde_json; + // use serde_json; #[test] fn default_phrase_should_be_used() { assert_eq!( - Bls377Pair::from_string("//Alice///password", None).unwrap().public(), - Bls377Pair::from_string(&format!("{}//Alice", DEV_PHRASE), Some("password")) + Pair::from_string("//Alice///password", None).unwrap().public(), + Pair::from_string(&format!("{}//Alice", DEV_PHRASE), Some("password")) .unwrap() .public(), ); @@ -640,7 +684,7 @@ mod test { #[test] fn seed_and_derive_should_work() { let seed = hex!("9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f00"); - let pair = Bls377Pair::from_seed(&seed); + let pair = Pair::from_seed(&seed); // we are using hash to field so this is not going to work // assert_eq!(pair.seed(), seed); let path = vec![DeriveJunction::Hard([0u8; 32])]; @@ -700,21 +744,21 @@ mod test { #[test] fn generated_pair_should_work() { - let (pair, _) = Bls377Pair::generate(); + let (pair, _) = Pair::generate(); let public = pair.public(); let message = b"Something important"; let signature = pair.sign(&message[..]); - assert!(Bls377Pair::verify(&signature, &message[..], &public)); - assert!(!Bls377Pair::verify(&signature, b"Something else", &public)); + assert!(Pair::verify(&signature, &message[..], &public)); + assert!(!Pair::verify(&signature, b"Something else", &public)); } #[test] fn seeded_pair_should_work() { - let pair = Bls377Pair::from_seed(b"12345678901234567890123456789012"); + let pair = Pair::from_seed(b"12345678901234567890123456789012"); let public = pair.public(); assert_eq!( public, - Bls377Public::from_raw( + Public::from_raw( hex!( "754d2f2bbfa67df54d7e0e951979a18a1e0f45948857752cc2bac6bbb0b1d05e8e48bcc453920bf0c4bbd59932124801") ) @@ -724,8 +768,8 @@ mod test { ); let signature = pair.sign(&message[..]); println!("Correct signature: {:?}", signature); - assert!(Bls377Pair::verify(&signature, &message[..], &public)); - assert!(!Bls377Pair::verify(&signature, "Other message", &public)); + assert!(Pair::verify(&signature, &message[..], &public)); + assert!(!Pair::verify(&signature, "Other message", &public)); } // #[test] diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs index 6f562a5f6a1ca..468cf32a6384c 100644 --- a/primitives/core/src/lib.rs +++ b/primitives/core/src/lib.rs @@ -68,6 +68,8 @@ pub mod testing; pub mod traits; pub mod uint; +pub use bls::{bls377, bls381}; + pub use self::{ hash::{convert_hash, H160, H256, H512}, uint::{U256, U512}, diff --git a/primitives/core/src/testing.rs b/primitives/core/src/testing.rs index ed6c571f7e24e..6faf4ffa3042a 100644 --- a/primitives/core/src/testing.rs +++ b/primitives/core/src/testing.rs @@ -26,7 +26,9 @@ pub const SR25519: KeyTypeId = KeyTypeId(*b"sr25"); /// Key type for generic ECDSA key. pub const ECDSA: KeyTypeId = KeyTypeId(*b"ecds"); /// Key type for generic BLS12-377 key. -pub const BLS: KeyTypeId = KeyTypeId(*b"bls7"); +pub const BLS377: KeyTypeId = KeyTypeId(*b"bls7"); +/// Key type for generic BLS12-381 key. +pub const BLS381: KeyTypeId = KeyTypeId(*b"bls8"); /// Macro for exporting functions from wasm in with the expected signature for using it with the /// wasm executor. This is useful for tests where you need to call a function in wasm. diff --git a/primitives/io/src/lib.rs b/primitives/io/src/lib.rs index 96762026fc6f3..709e1fa642f80 100644 --- a/primitives/io/src/lib.rs +++ b/primitives/io/src/lib.rs @@ -56,8 +56,6 @@ use sp_core::{ LogLevel, LogLevelFilter, OpaquePeerId, H256, }; -use sp_core::bls; - #[cfg(feature = "std")] use sp_trie::{LayoutV0, LayoutV1, TrieConfiguration}; @@ -1115,54 +1113,6 @@ pub trait Crypto { .map_err(|_| EcdsaVerifyError::BadSignature)?; Ok(pubkey.serialize()) } - - /// Returns all `bls` public keys for the given key id from the keystore. - /// This is needed for beefy keystore. - fn bls_public_keys(&mut self, id: KeyTypeId) -> Vec { - self.extension::() - .expect("No `keystore` associated for the current context!") - .bls_public_keys(id) - } - - /// Generate an `bls12-377` key for the given key type using an optional seed and - /// store it in the keystore. - /// - /// The `seed` needs to be a valid utf8. - /// - /// Returns the public key. - fn bls_generate(&mut self, id: KeyTypeId, seed: Option>) -> bls::Public { - let seed = seed.as_ref().map(|s| std::str::from_utf8(s).expect("Seed is valid utf8!")); - self.extension::() - .expect("No `keystore` associated for the current context!") - .bls_generate_new(id, seed) - .expect("`bls_generate` failed") - } - - /// Sign the given `msg` with the `bls12-377` key that corresponds to the given public key and - /// key type in the keystore. - /// - /// Returns the signature. - fn bls_sign( - &mut self, - id: KeyTypeId, - pub_key: &bls::Public, - msg: &[u8], - ) -> Option { - self.extension::() - .expect("No `keystore` associated for the current context!") - .sign_with(id, &pub_key.into(), msg) - .ok() - .flatten() - .and_then(|sig| bls::Signature::from_slice(&sig)) - } - - /// Verify an `bls12-377` signature. - /// - /// Returns `true` when the verification in successful regardless of - /// signature version. - fn bls_verify(sig: &bls::Signature, msg: &[u8], pubkey: &bls::Public) -> bool { - bls::Pair::verify(sig, msg, pubkey) - } } /// Interface that provides functions for hashing with different algorithms. diff --git a/primitives/keystore/src/lib.rs b/primitives/keystore/src/lib.rs index 1a5ff60e978e0..405a9ac010f9f 100644 --- a/primitives/keystore/src/lib.rs +++ b/primitives/keystore/src/lib.rs @@ -21,7 +21,7 @@ pub mod vrf; use crate::vrf::{VRFSignature, VRFTranscriptData}; use sp_core::{ - bls, + bls377, crypto::{CryptoTypePublicPair, KeyTypeId}, ecdsa, ed25519, sr25519, }; @@ -152,14 +152,18 @@ pub trait Keystore: Send + Sync { ) -> Result, Error>; /// Returns all bls public keys for the given key type. - fn bls_public_keys(&self, id: KeyTypeId) -> Vec; + fn bls377_public_keys(&self, id: KeyTypeId) -> Vec; /// Generate a new bls key pair for the given key type and an optional seed. /// /// If the given seed is `Some(_)`, the key pair will only be stored in memory. /// /// Returns the public key of the generated key pair. - fn bls_generate_new(&self, id: KeyTypeId, seed: Option<&str>) -> Result; + fn bls377_generate_new( + &self, + id: KeyTypeId, + seed: Option<&str>, + ) -> Result; /// Generate an BLS signature for a given message. /// @@ -173,12 +177,12 @@ pub trait Keystore: Send + Sync { /// Returns an [`bls::Signature`] or `None` in case the given `id` and /// `public` combination doesn't exist in the keystore. An `Err` will be /// returned if generating the signature itself failed. - fn bls_sign( + fn bls377_sign( &self, id: KeyTypeId, - public: &bls::Public, + public: &bls377::Public, msg: &[u8], - ) -> Result, Error>; + ) -> Result, Error>; } /// A shared pointer to a keystore implementation. diff --git a/primitives/keystore/src/testing.rs b/primitives/keystore/src/testing.rs index c302625127f2b..87848cc545e00 100644 --- a/primitives/keystore/src/testing.rs +++ b/primitives/keystore/src/testing.rs @@ -18,7 +18,7 @@ //! Types that should only be used for testing! use sp_core::{ - bls, + bls377, crypto::{ByteArray, CryptoTypePublicPair, KeyTypeId, Pair}, ecdsa, ed25519, sr25519, }; @@ -68,11 +68,11 @@ impl MemoryKeystore { }) } - fn bls_key_pair(&self, id: KeyTypeId, pub_key: &bls::Public) -> Option { + fn bls377_key_pair(&self, id: KeyTypeId, pub_key: &bls377::Public) -> Option { self.keys.read().get(&id).and_then(|inner| { inner .get(pub_key.as_slice()) - .map(|s| bls::Pair::from_string(s, None).expect("`bls` seed slice is valid")) + .map(|s| bls377::Pair::from_string(s, None).expect("`bls` seed slice is valid")) }) } } @@ -294,23 +294,27 @@ impl Keystore for MemoryKeystore { pair.map(|k| k.sign_prehashed(msg)).map(Ok).transpose() } - fn bls_public_keys(&self, id: KeyTypeId) -> Vec { + fn bls377_public_keys(&self, id: KeyTypeId) -> Vec { self.keys .read() .get(&id) .map(|keys| { keys.values() - .map(|s| bls::Pair::from_string(s, None).expect("`bls` seed slice is valid")) + .map(|s| bls377::Pair::from_string(s, None).expect("`bls` seed slice is valid")) .map(|p| p.public()) .collect() }) .unwrap_or_default() } - fn bls_generate_new(&self, id: KeyTypeId, seed: Option<&str>) -> Result { + fn bls377_generate_new( + &self, + id: KeyTypeId, + seed: Option<&str>, + ) -> Result { match seed { Some(seed) => { - let pair = bls::Pair::from_string(seed, None) + let pair = bls377::Pair::from_string(seed, None) .map_err(|_| Error::ValidationError("Generates an `bls` pair.".to_owned()))?; self.keys .write() @@ -320,7 +324,7 @@ impl Keystore for MemoryKeystore { Ok(pair.public()) }, None => { - let (pair, phrase, _) = bls::Pair::generate_with_phrase(None); + let (pair, phrase, _) = bls377::Pair::generate_with_phrase(None); self.keys .write() .entry(id) @@ -331,13 +335,13 @@ impl Keystore for MemoryKeystore { } } - fn bls_sign( + fn bls377_sign( &self, id: KeyTypeId, - public: &bls::Public, + public: &bls377::Public, msg: &[u8], - ) -> Result, Error> { - let pair = self.bls_key_pair(id, public); + ) -> Result, Error> { + let pair = self.bls377_key_pair(id, public); pair.map(|k| k.sign(msg)).map(Ok).transpose() } } From 7177bb1b15b588c4685f8fb6b8d7875bf26a2a38 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 23 Mar 2023 12:17:59 +0100 Subject: [PATCH 07/35] Restore tests --- primitives/core/src/bls.rs | 189 +++++++++++++++++++------------------ 1 file changed, 95 insertions(+), 94 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 175a9f1c47eea..8c025ad427e7d 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -662,13 +662,13 @@ impl CryptoType for Pair { type Pair = Pair; } +// Test set excercising the BLS12-377 implementation #[cfg(test)] mod test { use super::*; use crate::crypto::DEV_PHRASE; use bls377::{Pair, Public, Signature}; use hex_literal::hex; - // use serde_json; #[test] fn default_phrase_should_be_used() { @@ -695,52 +695,53 @@ mod test { ); } - // // Is this supposed to be successful? - // // Where is the test vector defined? - // #[test] - // fn test_vector_should_work() { - // let pair = Bls377Pair::from_seed(&hex!( - // "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60" - // )); - // let public = pair.public(); - // assert_eq!( - // public, - // Bls377Public::from_raw(hex!( - // "7a84ca8ce4c37c93c95ecee6a3c0c9a7b9c225093cf2f12dc4f69cbfb847ef9424a18f5755d5a742247d386ff2aabb80" - // )) - // ); - // let message = b""; - // let signature = - // hex!("0e5854002b249175764e463165aec0e38a46ddd44c2db29d6fec3022a3993b3390b001b53a04d155a4d216dd361df90087281be27c58ae22c7f1333820259ff5ae1b321126d1a001bf91ee088fb56ca9d4aa484d129ede7e701ced08df631581" - // ); - // let signature = Bls377Signature::from_raw(signature); - // assert!(pair.sign(&message[..]) == signature); - // assert!(Bls377Pair::verify(&signature, &message[..], &public)); - // } + // TODO FIXME Is this supposed to be successful? + // Where is the test vector defined? + #[test] + fn test_vector_should_work() { + let pair = Pair::from_seed(&hex!( + "9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60" + )); + let public = pair.public(); + assert_eq!( + public, + Public::from_raw(hex!( + "7a84ca8ce4c37c93c95ecee6a3c0c9a7b9c225093cf2f12dc4f69cbfb847ef9424a18f5755d5a742247d386ff2aabb80" + )) + ); + let message = b""; + let signature = + hex!("0e5854002b249175764e463165aec0e38a46ddd44c2db29d6fec3022a3993b3390b001b53a04d155a4d216dd361df90087281be27c58ae22c7f1333820259ff5ae1b321126d1a001bf91ee088fb56ca9d4aa484d129ede7e701ced08df631581" + ); + let signature = Signature::from_raw(signature); + assert!(pair.sign(&message[..]) == signature); + assert!(Pair::verify(&signature, &message[..], &public)); + } - // // Is this expected to be pass? - // // Where is the test vector defined? - // #[test] - // fn test_vector_by_string_should_work() { - // let pair = Pair::from_string( - // "0x9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60", - // None, - // ) - // .unwrap(); - // let public = pair.public(); - // assert_eq!( - // public, - // Public::from_raw(hex!( - // "6dc6be608fab3c6bd894a606be86db346cc170db85c733853a371f3db54ae1b12052c0888d472760c81b537572a26f00" - // )) - // ); - // let message = b""; - // let signature = - // hex!("9f7d07e0fdd6aa342f6defaade946b59bfeba8af45c243f86b208cd339b2c713421844e3007e0acafd0a529542ee050047b739fe5bfd311d884451542204e173d784e648eb55f4bd32da747f006120fadf4801c2b1c88f9745c50c2141b1d380" - // ); let signature = Signature::from_raw(signature); - // assert!(pair.sign(&message[..]) == signature); - // assert!(Pair::verify(&signature, &message[..], &public)); - // } + // TODO FIXME Is this expected to be pass? + // Where the test vectors were taken? + #[test] + fn test_vector_by_string_should_work() { + let pair = Pair::from_string( + "0x9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60", + None, + ) + .unwrap(); + let public = pair.public(); + assert_eq!( + public, + Public::from_raw(hex!( + "6dc6be608fab3c6bd894a606be86db346cc170db85c733853a371f3db54ae1b12052c0888d472760c81b537572a26f00" + )) + ); + let message = b""; + let signature = + hex!("9f7d07e0fdd6aa342f6defaade946b59bfeba8af45c243f86b208cd339b2c713421844e3007e0acafd0a529542ee050047b739fe5bfd311d884451542204e173d784e648eb55f4bd32da747f006120fadf4801c2b1c88f9745c50c2141b1d380" + ); + let signature = Signature::from_raw(signature); + assert!(pair.sign(&message[..]) == signature); + assert!(Pair::verify(&signature, &message[..], &public)); + } #[test] fn generated_pair_should_work() { @@ -772,60 +773,60 @@ mod test { assert!(!Pair::verify(&signature, "Other message", &public)); } - // #[test] - // fn generate_with_phrase_recovery_possible() { - // let (pair1, phrase, _) = Pair::generate_with_phrase(None); - // let (pair2, _) = Pair::from_phrase(&phrase, None).unwrap(); + #[test] + fn generate_with_phrase_recovery_possible() { + let (pair1, phrase, _) = Pair::generate_with_phrase(None); + let (pair2, _) = Pair::from_phrase(&phrase, None).unwrap(); - // assert_eq!(pair1.public(), pair2.public()); - // } + assert_eq!(pair1.public(), pair2.public()); + } - // #[test] - // fn generate_with_password_phrase_recovery_possible() { - // let (pair1, phrase, _) = Pair::generate_with_phrase(Some("password")); - // let (pair2, _) = Pair::from_phrase(&phrase, Some("password")).unwrap(); + #[test] + fn generate_with_password_phrase_recovery_possible() { + let (pair1, phrase, _) = Pair::generate_with_phrase(Some("password")); + let (pair2, _) = Pair::from_phrase(&phrase, Some("password")).unwrap(); - // assert_eq!(pair1.public(), pair2.public()); - // } + assert_eq!(pair1.public(), pair2.public()); + } - // #[test] - // fn password_does_something() { - // let (pair1, phrase, _) = Pair::generate_with_phrase(Some("password")); - // let (pair2, _) = Pair::from_phrase(&phrase, None).unwrap(); + #[test] + fn password_does_something() { + let (pair1, phrase, _) = Pair::generate_with_phrase(Some("password")); + let (pair2, _) = Pair::from_phrase(&phrase, None).unwrap(); - // assert_ne!(pair1.public(), pair2.public()); - // } + assert_ne!(pair1.public(), pair2.public()); + } - // #[test] - // fn ss58check_roundtrip_works() { - // let pair = Pair::from_seed(b"12345678901234567890123456789012"); - // let public = pair.public(); - // let s = public.to_ss58check(); - // println!("Correct: {}", s); - // let cmp = Public::from_ss58check(&s).unwrap(); - // assert_eq!(cmp, public); - // } + #[test] + fn ss58check_roundtrip_works() { + let pair = Pair::from_seed(b"12345678901234567890123456789012"); + let public = pair.public(); + let s = public.to_ss58check(); + println!("Correct: {}", s); + let cmp = Public::from_ss58check(&s).unwrap(); + assert_eq!(cmp, public); + } - // #[test] - // fn signature_serialization_works() { - // let pair = Pair::from_seed(b"12345678901234567890123456789012"); - // let message = b"Something important"; - // let signature = pair.sign(&message[..]); - // let serialized_signature = serde_json::to_string(&signature).unwrap(); - // // Signature is 96 bytes, so 192 chars + 2 quote chars - // assert_eq!(serialized_signature.len(), 194); - // let signature = serde_json::from_str(&serialized_signature).unwrap(); - // assert!(Pair::verify(&signature, &message[..], &pair.public())); - // } + #[test] + fn signature_serialization_works() { + let pair = Pair::from_seed(b"12345678901234567890123456789012"); + let message = b"Something important"; + let signature = pair.sign(&message[..]); + let serialized_signature = serde_json::to_string(&signature).unwrap(); + // Signature is 96 bytes, so 192 chars + 2 quote chars + assert_eq!(serialized_signature.len(), 194); + let signature = serde_json::from_str(&serialized_signature).unwrap(); + assert!(Pair::verify(&signature, &message[..], &pair.public())); + } - // #[test] - // fn signature_serialization_doesnt_panic() { - // fn deserialize_signature(text: &str) -> Result { - // serde_json::from_str(text) - // } - // assert!(deserialize_signature("Not valid json.").is_err()); - // assert!(deserialize_signature("\"Not an actual signature.\"").is_err()); - // // Poorly-sized - // assert!(deserialize_signature("\"abc123\"").is_err()); - // } + #[test] + fn signature_serialization_doesnt_panic() { + fn deserialize_signature(text: &str) -> Result { + serde_json::from_str(text) + } + assert!(deserialize_signature("Not valid json.").is_err()); + assert!(deserialize_signature("\"Not an actual signature.\"").is_err()); + // Poorly-sized + assert!(deserialize_signature("\"abc123\"").is_err()); + } } From 58d412253caeb486833f3139dccc8c2e485ea61a Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 23 Mar 2023 12:32:15 +0100 Subject: [PATCH 08/35] Fix rust docs --- primitives/keystore/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/primitives/keystore/src/lib.rs b/primitives/keystore/src/lib.rs index 405a9ac010f9f..637c676f8f035 100644 --- a/primitives/keystore/src/lib.rs +++ b/primitives/keystore/src/lib.rs @@ -167,14 +167,14 @@ pub trait Keystore: Send + Sync { /// Generate an BLS signature for a given message. /// - /// Receives [`KeyTypeId`] and an [`bls::Public`] key to be able to map + /// Receives [`KeyTypeId`] and an [`bls377::Public`] key to be able to map /// them to a private key that exists in the keystore. This private key is, /// in turn, used for signing the provided message. /// /// The `msg` argument provided should be a message for which an /// BLS12-377 signature should be generated. /// - /// Returns an [`bls::Signature`] or `None` in case the given `id` and + /// Returns an [`bls377::Signature`] or `None` in case the given `id` and /// `public` combination doesn't exist in the keystore. An `Err` will be /// returned if generating the signature itself failed. fn bls377_sign( From a630ead460efb935c82ce4ae847d44edba4b1bbe Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 23 Mar 2023 12:53:11 +0100 Subject: [PATCH 09/35] Fix after master merge --- client/keystore/src/local.rs | 4 +- primitives/core/src/bls.rs | 85 ++++++++---------------------------- 2 files changed, 19 insertions(+), 70 deletions(-) diff --git a/client/keystore/src/local.rs b/client/keystore/src/local.rs index b3c759d962d6e..e63d8a795b83e 100644 --- a/client/keystore/src/local.rs +++ b/client/keystore/src/local.rs @@ -275,14 +275,14 @@ impl Keystore for LocalKeystore { /// Generate an BLS signature for a given message. /// - /// Receives [`KeyTypeId`] and an [`bls::Public`] key to be able to map + /// Receives [`KeyTypeId`] and an [`bls377::Public`] key to be able to map /// them to a private key that exists in the keystore. This private key is, /// in turn, used for signing the provided message. /// /// The `msg` argument provided should be a message for which an /// BLS12-377 signature should be generated. /// - /// Returns an [`bls::Signature`] or `None` in case the given `id` and + /// Returns an [`bls377::Signature`] or `None` in case the given `id` and /// `public` combination doesn't exist in the keystore. An `Err` will be /// returned if generating the signature itself failed. fn bls377_sign( diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 8c025ad427e7d..38ed2f7a76037 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -17,38 +17,33 @@ //! Simple BLS (Boneh–Lynn–Shacham) Signature API. +#[cfg(feature = "std")] +use crate::crypto::Ss58Codec; #[cfg(feature = "full_crypto")] -use sp_std::vec::Vec; - +use crate::crypto::{DeriveError, DeriveJunction, Pair as TraitPair, SecretStringError}; use crate::{ - crypto::ByteArray, + crypto::{ + ByteArray, CryptoType, CryptoTypeId, CryptoTypePublicPair, Derive, Public as TraitPublic, + UncheckedFrom, + }, hash::{H384, H768}, }; -use codec::{Decode, Encode, MaxEncodedLen}; -use scale_info::TypeInfo; -#[cfg(feature = "std")] -use crate::crypto::Ss58Codec; -use crate::crypto::{ - CryptoType, CryptoTypeId, CryptoTypePublicPair, Derive, Public as TraitPublic, UncheckedFrom, -}; #[cfg(feature = "full_crypto")] -use crate::crypto::{DeriveJunction, Pair as TraitPair, SecretStringError}; -#[cfg(feature = "std")] -use bip39::{Language, Mnemonic, MnemonicType}; +use sp_std::vec::Vec; + use bls_like::EngineBLS; #[cfg(feature = "full_crypto")] use bls_like::{Keypair, Message, SerializableToBytes}; -use core::convert::TryFrom; +use codec::{Decode, Encode, MaxEncodedLen}; #[cfg(feature = "std")] -use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; -use sp_runtime_interface::pass_by::PassByInner; -use sp_std::{marker::PhantomData, ops::Deref}; +use hex; +use scale_info::TypeInfo; #[cfg(feature = "std")] -use substrate_bip39::seed_from_entropy; +use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; -#[cfg(feature = "std")] -use hex; +use sp_runtime_interface::pass_by::PassByInner; +use sp_std::{convert::TryFrom, marker::PhantomData, ops::Deref}; /// BLS-377 specialized types pub mod bls377 { @@ -120,7 +115,7 @@ pub struct Public { impl Clone for Public { fn clone(&self) -> Self { - Self { inner: self.inner.clone(), _phantom: PhantomData } + Self { inner: self.inner, _phantom: PhantomData } } } @@ -346,7 +341,7 @@ pub struct Signature { impl Clone for Signature { fn clone(&self) -> Self { - Self { inner: self.inner.clone(), _phantom: PhantomData } + Self { inner: self.inner, _phantom: PhantomData } } } @@ -503,13 +498,6 @@ fn derive_hard_junction(secret_seed: &Seed, cc: &[u8; 32]) -> Seed { ("BLS12377HDKD", secret_seed, cc).using_encoded(sp_core_hashing::blake2_256) } -/// An error when deriving a key. -#[cfg(feature = "full_crypto")] -pub enum DeriveError { - /// A soft key was found in the path (and is unsupported). - SoftKeyInPath, -} - #[cfg(feature = "full_crypto")] impl Pair { /// Get the seed for this key. @@ -536,45 +524,6 @@ impl TraitPair for Pair { type Seed = Seed; type Public = Public; type Signature = Signature; - // TODO DAVXY: this is not required to be an associated type... - type DeriveError = DeriveError; - - /// Generate new secure (random) key pair and provide the recovery phrase. - /// - /// You can recover the same key later with `from_phrase`. - #[cfg(feature = "std")] - fn generate_with_phrase(password: Option<&str>) -> (Self, String, Seed) { - let mnemonic = Mnemonic::new(MnemonicType::Words12, Language::English); - let phrase = mnemonic.phrase(); - let (pair, seed) = Self::from_phrase(phrase, password) - .expect("All phrases generated by Mnemonic are valid; qed"); - (pair, phrase.to_owned(), seed) - } - - /// Generate key pair from given recovery phrase and password. - #[cfg(feature = "std")] - fn from_phrase( - phrase: &str, - password: Option<&str>, - ) -> Result<(Self, Seed), SecretStringError> { - let big_seed = seed_from_entropy( - Mnemonic::from_phrase(phrase, Language::English) - .map_err(|_| SecretStringError::InvalidPhrase)? - .entropy(), - password.unwrap_or(""), - ) - .map_err(|_| SecretStringError::InvalidSeed)?; - let mut seed = Seed::default(); - seed.copy_from_slice(&big_seed[0..32]); - Self::from_seed_slice(&big_seed[0..32]).map(|x| (x, seed)) - } - - /// Make a new key pair from secret seed material. - /// - /// You should never need to use this; generate(), generate_with_phrase - fn from_seed(seed: &Seed) -> Self { - Self::from_seed_slice(&seed[..]).expect("seed has valid length; qed") - } /// Make a new key pair from secret seed material. The slice must be 32 bytes long or it /// will return `None`. From 5c47d333c83aa9bbfcf120516923f41ed186c872 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Fri, 24 Mar 2023 15:07:01 +0100 Subject: [PATCH 10/35] Fix after master merge --- primitives/core/src/bls.rs | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 38ed2f7a76037..5959e263f8b06 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -22,10 +22,7 @@ use crate::crypto::Ss58Codec; #[cfg(feature = "full_crypto")] use crate::crypto::{DeriveError, DeriveJunction, Pair as TraitPair, SecretStringError}; use crate::{ - crypto::{ - ByteArray, CryptoType, CryptoTypeId, CryptoTypePublicPair, Derive, Public as TraitPublic, - UncheckedFrom, - }, + crypto::{ByteArray, CryptoType, Derive, Public as TraitPublic, UncheckedFrom}, hash::{H384, H768}, }; @@ -93,10 +90,6 @@ const PUBLIC_KEY_SERIALIZED_SIZE: usize = 48; // Signature serialized size const SIGNATURE_SERIALIZED_SIZE: usize = 96; -// TODO DAVXY REMOVE-ME (REMOVED FROM UPSTREAM) -/// Temporary crypto id -pub const TEMPORARY_CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"TEMP"); - /// A secret seed. /// /// It's not called a "secret key" because ring doesn't expose the secret keys @@ -306,26 +299,10 @@ impl<'de, T: BlsBound> Deserialize<'de> for Public { } } -impl TraitPublic for Public { - fn to_public_crypto_pair(&self) -> CryptoTypePublicPair { - CryptoTypePublicPair(TEMPORARY_CRYPTO_ID, self.to_raw_vec()) - } -} +impl TraitPublic for Public {} impl Derive for Public {} -impl From> for CryptoTypePublicPair { - fn from(key: Public) -> Self { - (&key).into() - } -} - -impl From<&Public> for CryptoTypePublicPair { - fn from(key: &Public) -> Self { - CryptoTypePublicPair(TEMPORARY_CRYPTO_ID, key.to_raw_vec()) - } -} - impl CryptoType for Public { #[cfg(feature = "full_crypto")] type Pair = Pair; From fe65fce3ed18f0a0f8d72202ee2a86dd383c2f80 Mon Sep 17 00:00:00 2001 From: Skalman Date: Tue, 28 Mar 2023 11:23:06 -0400 Subject: [PATCH 11/35] Use double bls with G1 as signature group and verify individual signatures using DLEQ proof. --- Cargo.lock | 991 ++++++++++++++++-------------- Cargo.toml | 3 + primitives/core/Cargo.toml | 3 +- primitives/core/src/bls.rs | 106 ++-- primitives/core/src/hash.rs | 2 +- primitives/core/src/hexdisplay.rs | 2 +- 6 files changed, 606 insertions(+), 501 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index acf3222f95352..5f32cc97dc270 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -51,7 +51,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", ] @@ -62,7 +62,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" dependencies = [ "crypto-common", - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -95,7 +95,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" dependencies = [ "cfg-if", - "cipher 0.4.3", + "cipher 0.4.4", "cpufeatures", ] @@ -121,7 +121,7 @@ checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" dependencies = [ "aead 0.5.1", "aes 0.8.2", - "cipher 0.4.3", + "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", "subtle", @@ -203,11 +203,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstyle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" + [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "approx" @@ -220,9 +226,9 @@ dependencies = [ [[package]] name = "arbitrary" -version = "1.2.3" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e90af4de65aa7b293ef2d09daff88501eb254f58edde2e1ac02c82d873eadad" +checksum = "e2d098ff73c1ca148721f37baad5ea6a465a13f9573aba8641fbbbae8164a54e" [[package]] name = "arc-swap" @@ -255,9 +261,9 @@ dependencies = [ [[package]] name = "ark-ec" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c60370a92f8e1a5f053cad73a862e1b99bc642333cd676fa11c0c39f80f4ac2" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" dependencies = [ "ark-ff", "ark-poly", @@ -272,9 +278,9 @@ dependencies = [ [[package]] name = "ark-ff" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2d42532524bee1da5a4f6f733eb4907301baa480829557adcff5dfaeee1d9a" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ "ark-ff-asm", "ark-ff-macros", @@ -292,32 +298,32 @@ dependencies = [ [[package]] name = "ark-ff-asm" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6873aaba7959593d89babed381d33e2329453368f1bf3c67e07686a1c1056f" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "ark-ff-macros" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c2e7d0f2d67cc7fc925355c74d36e7eda19073639be4a0a233d4611b8c959d" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ "num-bigint", "num-traits", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "ark-poly" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6ec811462cabe265cfe1b102fcfe3df79d7d2929c2425673648ee9abfd0272" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ "ark-ff", "ark-serialize", @@ -328,9 +334,9 @@ dependencies = [ [[package]] name = "ark-serialize" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e735959bc173ea4baf13327b19c22d452b8e9e8e8f7b7fc34e6bf0e316c33e" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", "ark-std", @@ -340,13 +346,13 @@ dependencies = [ [[package]] name = "ark-serialize-derive" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd34f0920d995d2c932f38861c416f70de89a6de9875876b012557079603e6cc" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -367,9 +373,9 @@ checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" @@ -401,9 +407,9 @@ dependencies = [ [[package]] name = "asn1-rs" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6690c370453db30743b373a60ba498fc0d6d83b11f4abfd87a84a075db5dd4" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ "asn1-rs-derive 0.4.0", "asn1-rs-impl", @@ -423,7 +429,7 @@ checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] @@ -435,7 +441,7 @@ checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] @@ -447,7 +453,7 @@ checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -458,13 +464,14 @@ checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" [[package]] name = "assert_cmd" -version = "2.0.8" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9834fcc22e0874394a010230586367d4a3e9f11b560f469262678547e1d2575e" +checksum = "ec0b2340f55d9661d76793b2bfc2eb0e62689bd79d067a95707ea762afd5e9dd" dependencies = [ + "anstyle", "bstr", "doc-comment", - "predicates", + "predicates 3.0.2", "predicates-core", "predicates-tree", "wait-timeout", @@ -489,32 +496,31 @@ dependencies = [ [[package]] name = "async-io" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock", "autocfg", + "cfg-if", "concurrent-queue", "futures-lite", - "libc", "log", "parking", "polling", + "rustix 0.37.4", "slab", "socket2", "waker-fn", - "windows-sys 0.42.0", ] [[package]] name = "async-lock" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" +checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" dependencies = [ "event-listener", - "futures-lite", ] [[package]] @@ -536,18 +542,18 @@ checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] @@ -645,9 +651,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "basic-toml" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e819b667739967cd44d308b8c7b71305d8bb0729ac44a248aa08f33d01950b4" +checksum = "5c0de75129aa8d0cceaf750b89013f0e08804d6ec61416da787b35ad0d7cddf1" dependencies = [ "serde", ] @@ -699,7 +705,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn", + "syn 1.0.109", ] [[package]] @@ -782,7 +788,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -791,7 +797,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -822,7 +828,7 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bls-like" version = "0.1.0" -source = "git+https://github.com/w3f/bls?branch=skalman-hash-to-curve-wb#79ca386894d61837cd0e76710718a658c65904b0" +source = "git+https://github.com/w3f/bls#c8b9d473e5de142aebcb1b079b0b3a678de3135f" dependencies = [ "ark-bls12-377", "ark-bls12-381", @@ -861,9 +867,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" +checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" dependencies = [ "memchr", "once_cell", @@ -900,9 +906,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" [[package]] name = "byteorder" @@ -929,9 +935,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6031a462f977dd38968b6f23378356512feeace69cef817e1a4475108093cec3" +checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" dependencies = [ "serde", ] @@ -953,7 +959,7 @@ checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07" dependencies = [ "camino", "cargo-platform", - "semver 1.0.16", + "semver 1.0.17", "serde", "serde_json", "thiserror", @@ -1045,7 +1051,7 @@ name = "chain-spec-builder" version = "2.0.0" dependencies = [ "ansi_term", - "clap 4.1.8", + "clap 4.1.14", "node-cli", "rand 0.8.5", "sc-chain-spec", @@ -1056,9 +1062,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "js-sys", @@ -1115,7 +1121,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -1124,14 +1130,14 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] name = "cipher" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", @@ -1171,39 +1177,47 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.8" +version = "4.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" +checksum = "906f7fe1da4185b7a282b2bc90172a496f9def1aca4545fe7526810741591e14" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", - "clap_lex 0.3.2", - "is-terminal", "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "351f9ad9688141ed83dfd8f5fb998a06225ef444b48ff4dc43de6d409b7fd10b" +dependencies = [ + "bitflags", + "clap_lex 0.4.0", + "is-terminal", "strsim", "termcolor", ] [[package]] name = "clap_complete" -version = "4.1.4" +version = "4.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501ff0a401473ea1d4c3b125ff95506b62c5bc5768d818634195fbb7c4ad5ff4" +checksum = "40d3120a421cd111c43f1a6c7d0dd83bb6aaa0659c164468a1654014632a5ec6" dependencies = [ - "clap 4.1.8", + "clap 4.1.14", ] [[package]] name = "clap_derive" -version = "4.1.8" +version = "4.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" +checksum = "81d7dc0031c3a59a04fc2ba395c8e2dd463cba1859275f065d225f6122221b45" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] @@ -1217,12 +1231,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" -dependencies = [ - "os_str_bytes", -] +checksum = "4f0807fb6f644c83f3e4ec014fec9858c1c8b26a7db8eb5f0bde5817df9c1df7" [[package]] name = "codespan-reporting" @@ -1262,9 +1273,9 @@ checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" [[package]] name = "constant_time_eq" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" +checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" [[package]] name = "core-foundation" @@ -1302,9 +1313,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" dependencies = [ "libc", ] @@ -1525,7 +1536,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -1537,7 +1548,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -1549,7 +1560,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "typenum", ] @@ -1560,7 +1571,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -1570,7 +1581,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -1581,7 +1592,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1599,7 +1610,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.4.3", + "cipher 0.4.4", ] [[package]] @@ -1630,9 +1641,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-rc.0" +version = "4.0.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da00a7a9a4eb92a0a0f8e75660926d48f0d0f3c537e455c457bcdaa1e16b1ac" +checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" dependencies = [ "cfg-if", "fiat-crypto", @@ -1644,9 +1655,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -1656,9 +1667,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -1666,31 +1677,31 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 2.0.11", ] [[package]] name = "cxxbridge-flags" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] name = "darling" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ "darling_core", "darling_macro", @@ -1698,27 +1709,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn", + "syn 1.0.109", ] [[package]] name = "darling_macro" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1744,7 +1755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn", + "syn 1.0.109", ] [[package]] @@ -1784,11 +1795,11 @@ dependencies = [ [[package]] name = "der-parser" -version = "8.1.0" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs 0.5.1", + "asn1-rs 0.5.2", "displaydoc", "nom", "num-bigint", @@ -1804,7 +1815,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1815,7 +1826,7 @@ checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1836,7 +1847,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1846,7 +1857,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" dependencies = [ "derive_builder_core", - "syn", + "syn 1.0.109", ] [[package]] @@ -1857,7 +1868,7 @@ checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1887,7 +1898,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -1950,7 +1961,7 @@ checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1979,9 +1990,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00704156a7de8df8da0911424e30c2049957b0a714542a44e05fe693dd85313" +checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" [[package]] name = "dyn-clonable" @@ -2001,7 +2012,7 @@ checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2088,7 +2099,7 @@ dependencies = [ "der 0.6.1", "digest 0.10.6", "ff 0.12.1", - "generic-array 0.14.6", + "generic-array 0.14.7", "group 0.12.1", "hkdf", "pem-rfc7468", @@ -2109,7 +2120,7 @@ dependencies = [ "crypto-bigint 0.5.1", "digest 0.10.6", "ff 0.13.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "group 0.13.0", "pkcs8 0.10.1", "rand_core 0.6.4", @@ -2127,7 +2138,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2147,7 +2158,7 @@ checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2193,6 +2204,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -2228,7 +2250,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2283,9 +2305,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a214f5bb88731d436478f3ae1f8a277b62124089ba9fb67f4f93fb100ef73c90" +checksum = "93ace6ec7cc19c8ed33a32eaa9ea692d7faea05006b5356b9e2b668ec4bc3955" [[package]] name = "file-per-thread-logger" @@ -2329,8 +2351,7 @@ dependencies = [ [[package]] name = "fixed-hash" version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" +source = "git+https://github.com/drskalman/parity-common/#ef4729367fc1d07e83a73885af7745f19439a356" dependencies = [ "byteorder", "rand 0.8.5", @@ -2426,7 +2447,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.1.8", + "clap 4.1.14", "comfy-table", "frame-benchmarking", "frame-support", @@ -2491,7 +2512,7 @@ dependencies = [ "quote", "scale-info", "sp-arithmetic", - "syn", + "syn 1.0.109", "trybuild", ] @@ -2517,7 +2538,7 @@ dependencies = [ name = "frame-election-solution-type-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.1.8", + "clap 4.1.14", "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", @@ -2628,7 +2649,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2639,7 +2660,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2648,7 +2669,7 @@ version = "3.0.0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2792,9 +2813,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" dependencies = [ "futures-channel", "futures-core", @@ -2807,9 +2828,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" dependencies = [ "futures-core", "futures-sink", @@ -2817,15 +2838,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" dependencies = [ "futures-core", "futures-task", @@ -2835,9 +2856,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" [[package]] name = "futures-lite" @@ -2856,13 +2877,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2878,15 +2899,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" [[package]] name = "futures-timer" @@ -2896,9 +2917,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" dependencies = [ "futures-channel", "futures-core", @@ -2945,9 +2966,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -3236,7 +3257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "hmac 0.8.1", ] @@ -3311,9 +3332,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes", "futures-channel", @@ -3350,16 +3371,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows 0.46.0", ] [[package]] @@ -3425,14 +3446,13 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows", + "windows 0.34.0", ] [[package]] name = "impl-codec" version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" +source = "git+https://github.com/drskalman/parity-common/#ef4729367fc1d07e83a73885af7745f19439a356" dependencies = [ "parity-scale-codec", ] @@ -3446,6 +3466,14 @@ dependencies = [ "serde", ] +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "git+https://github.com/drskalman/parity-common/#ef4729367fc1d07e83a73885af7745f19439a356" +dependencies = [ + "serde", +] + [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -3454,14 +3482,14 @@ checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -3480,7 +3508,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -3528,10 +3556,11 @@ checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "io-lifetimes" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" dependencies = [ + "hermit-abi 0.3.1", "libc", "windows-sys 0.45.0", ] @@ -3556,19 +3585,19 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" dependencies = [ "hermit-abi 0.3.1", - "io-lifetimes 1.0.5", - "rustix 0.36.8", + "io-lifetimes 1.0.9", + "rustix 0.36.11", "windows-sys 0.45.0", ] @@ -3583,9 +3612,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jobserver" @@ -3678,7 +3707,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3957,9 +3986,9 @@ checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "libp2p" -version = "0.50.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e0a0d2f693675f49ded13c5d510c48b78069e23cbd9108d7ccd59f6dc568819" +checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" dependencies = [ "bytes", "futures", @@ -3973,7 +4002,7 @@ dependencies = [ "libp2p-mdns", "libp2p-metrics", "libp2p-mplex", - "libp2p-noise 0.41.0", + "libp2p-noise", "libp2p-ping", "libp2p-quic", "libp2p-request-response", @@ -4025,36 +4054,30 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.39.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881d9a54e97d97cdaa4125d48269d97ca8c40e5fefec6b85b30440dc60cc551f" +checksum = "9b7f8b7d65c070a5a1b5f8f0510648189da08f787b8963f8e21219e0710733af" dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", "either", "fnv", "futures", "futures-timer", "instant", + "libp2p-identity", "log", - "multiaddr 0.17.0", + "multiaddr 0.17.1", "multihash 0.17.0", "multistream-select", "once_cell", "parking_lot 0.12.1", "pin-project", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", "rw-stream-sink", - "sec1 0.3.0", - "sha2 0.10.6", "smallvec", "thiserror", "unsigned-varint", "void", - "zeroize", ] [[package]] @@ -4092,6 +4115,24 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-identity" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a8ea433ae0cea7e3315354305237b9897afe45278b2118a7a57ca744e70fd27" +dependencies = [ + "bs58", + "ed25519-dalek", + "log", + "multiaddr 0.17.1", + "multihash 0.17.0", + "prost", + "quick-protobuf", + "rand 0.8.5", + "thiserror", + "zeroize", +] + [[package]] name = "libp2p-kad" version = "0.42.1" @@ -4115,7 +4156,7 @@ dependencies = [ "sha2 0.10.6", "smallvec", "thiserror", - "uint", + "uint 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", "unsigned-varint", "void", ] @@ -4195,29 +4236,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "libp2p-noise" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1216f9ec823ac7a2289b954674c54cbce81c9e45920b4fcf173018ede4295246" -dependencies = [ - "bytes", - "curve25519-dalek 3.2.0", - "futures", - "libp2p-core 0.39.0", - "log", - "once_cell", - "prost", - "prost-build", - "rand 0.8.5", - "sha2 0.10.6", - "snow", - "static_assertions", - "thiserror", - "x25519-dalek 1.1.1", - "zeroize", -] - [[package]] name = "libp2p-ping" version = "0.41.0" @@ -4236,15 +4254,15 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.7.0-alpha.2" +version = "0.7.0-alpha" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971f629ff7519f4d4889a7c981f0dc09c6ad493423cd8a13ee442de241bc8c8" +checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.39.0", + "libp2p-core 0.38.0", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -4303,7 +4321,7 @@ checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" dependencies = [ "heck", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -4324,13 +4342,14 @@ dependencies = [ [[package]] name = "libp2p-tls" -version = "0.1.0-alpha.2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9baf6f6292149e124ee737d9a79dbee783f29473fc368c7faad9d157841078a" +checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.0", + "libp2p-core 0.39.1", + "libp2p-identity", "rcgen 0.10.0", "ring", "rustls 0.20.8", @@ -4356,9 +4375,9 @@ dependencies = [ [[package]] name = "libp2p-webrtc" -version = "0.4.0-alpha.2" +version = "0.4.0-alpha" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4401ec550d36f413310ba5d4bf564bb21f89fb1601cadb32b2300f8bc1eb5b" +checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" dependencies = [ "async-trait", "asynchronous-codec", @@ -4367,10 +4386,10 @@ dependencies = [ "futures-timer", "hex", "if-watch", - "libp2p-core 0.39.0", - "libp2p-noise 0.42.0", + "libp2p-core 0.38.0", + "libp2p-noise", "log", - "multihash 0.17.0", + "multihash 0.16.3", "prost", "prost-build", "prost-codec", @@ -4538,6 +4557,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd550e73688e6d578f0ac2119e32b797a327631a42f9433e59d02e139c8df60d" + [[package]] name = "lite-json" version = "0.2.0" @@ -4682,7 +4707,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" dependencies = [ - "rustix 0.36.8", + "rustix 0.36.11", ] [[package]] @@ -4816,29 +4841,29 @@ dependencies = [ [[package]] name = "mockall" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4a1c770583dac7ab5e2f6c139153b783a53a1bbee9729613f193e59828326" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ "cfg-if", "downcast", "fragile", "lazy_static", "mockall_derive", - "predicates", + "predicates 2.1.5", "predicates-tree", ] [[package]] name = "mockall_derive" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832663583d5fa284ca8810bf7015e46c9fff9622d3cf34bd1eea5003fec06dd0" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -4861,13 +4886,14 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b53e0cc5907a5c216ba6584bf74be8ab47d6d6289f72793b2dddbf15dc3bf8c" +checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" dependencies = [ "arrayref", "byteorder", "data-encoding", + "log", "multibase", "multihash 0.17.0", "percent-encoding", @@ -4928,7 +4954,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] @@ -4954,9 +4980,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6515c882ebfddccaa73ead7320ca28036c4bc84c9bcca3cc0cbba8efe89223a" +checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511" dependencies = [ "approx", "matrixmultiply", @@ -4976,7 +5002,7 @@ checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -5043,9 +5069,9 @@ dependencies = [ [[package]] name = "netlink-sys" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "260e21fbb6f3d253a14df90eb0000a6066780a15dd901a7519ce02d77a94985b" +checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ "bytes", "futures", @@ -5085,7 +5111,7 @@ name = "node-bench" version = "0.9.0-dev" dependencies = [ "array-bytes", - "clap 4.1.8", + "clap 4.1.14", "derive_more", "fs_extra", "futures", @@ -5122,7 +5148,7 @@ version = "3.0.0-dev" dependencies = [ "array-bytes", "assert_cmd", - "clap 4.1.8", + "clap 4.1.14", "clap_complete", "criterion", "frame-benchmarking-cli", @@ -5243,7 +5269,7 @@ dependencies = [ name = "node-inspect" version = "0.9.0-dev" dependencies = [ - "clap 4.1.8", + "clap 4.1.14", "parity-scale-codec", "sc-cli", "sc-client-api", @@ -5302,7 +5328,7 @@ dependencies = [ name = "node-runtime-generate-bags" version = "3.0.0" dependencies = [ - "clap 4.1.8", + "clap 4.1.14", "generate-bags", "kitchensink-runtime", ] @@ -5311,7 +5337,7 @@ dependencies = [ name = "node-template" version = "4.0.0-dev" dependencies = [ - "clap 4.1.8", + "clap 4.1.14", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", @@ -5562,7 +5588,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs 0.5.1", + "asn1-rs 0.5.2", ] [[package]] @@ -5597,9 +5623,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "os_str_bytes" -version = "6.4.1" +version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" [[package]] name = "output_vt100" @@ -6024,7 +6050,7 @@ version = "4.0.0-dev" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -6907,7 +6933,7 @@ dependencies = [ "proc-macro2", "quote", "sp-runtime", - "syn", + "syn 1.0.109", ] [[package]] @@ -7215,7 +7241,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -7286,9 +7312,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "pbkdf2" @@ -7340,9 +7366,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.5" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028accff104c4e513bad663bbcd2ad7cfd5304144404c31ed0a77ac103d00660" +checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7" dependencies = [ "thiserror", "ucd-trie", @@ -7350,9 +7376,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.5" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ac3922aac69a40733080f53c1ce7f91dcf57e1a5f6c52f421fadec7fbdc4b69" +checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7" dependencies = [ "pest", "pest_generator", @@ -7360,22 +7386,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.5" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06646e185566b5961b4058dd107e0a7f56e77c3f484549fb119867773c0f202" +checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "pest_meta" -version = "2.5.5" +version = "2.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f60b2ba541577e2a0c307c8f39d1439108120eb7903adeb6497fa880c59616" +checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" dependencies = [ "once_cell", "pest", @@ -7409,7 +7435,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -7498,16 +7524,18 @@ dependencies = [ [[package]] name = "polling" -version = "2.5.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa" dependencies = [ "autocfg", + "bitflags", "cfg-if", + "concurrent-queue", "libc", "log", - "wepoll-ffi", - "windows-sys 0.42.0", + "pin-project-lite 0.2.9", + "windows-sys 0.45.0", ] [[package]] @@ -7565,17 +7593,29 @@ dependencies = [ "regex", ] +[[package]] +name = "predicates" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c575290b64d24745b6c57a12a31465f0a66f3a4799686a6921526a33b0797965" +dependencies = [ + "anstyle", + "difflib", + "itertools", + "predicates-core", +] + [[package]] name = "predicates-core" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" [[package]] name = "predicates-tree" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ "predicates-core", "termtree", @@ -7595,25 +7635,24 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.1.23" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ "proc-macro2", - "syn", + "syn 1.0.109", ] [[package]] name = "primitive-types" version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" +source = "git+https://github.com/drskalman/parity-common/#ef4729367fc1d07e83a73885af7745f19439a356" dependencies = [ "fixed-hash", "impl-codec", - "impl-serde", + "impl-serde 0.4.0 (git+https://github.com/drskalman/parity-common/)", "scale-info", - "uint", + "uint 0.9.5 (git+https://github.com/drskalman/parity-common/)", ] [[package]] @@ -7635,7 +7674,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -7652,9 +7691,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "e472a104799c74b514a57226160104aa483546de37e839ec50e3c2e41dd87534" dependencies = [ "unicode-ident", ] @@ -7693,7 +7732,7 @@ checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -7723,7 +7762,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn", + "syn 1.0.109", "tempfile", "which", ] @@ -7751,7 +7790,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -7778,6 +7817,15 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + [[package]] name = "quickcheck" version = "1.0.3" @@ -7800,9 +7848,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4ced82a24bb281af338b9e8f94429b6eca01b4e66d899f40031f074e74c9" +checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" dependencies = [ "bytes", "rand 0.8.5", @@ -7818,9 +7866,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -7929,9 +7977,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -7939,9 +7987,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -7996,22 +8044,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed" +checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" +checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] @@ -8028,9 +8076,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -8048,9 +8096,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "region" @@ -8183,9 +8231,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" [[package]] name = "rustc-hash" @@ -8214,7 +8262,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.16", + "semver 1.0.17", ] [[package]] @@ -8233,7 +8281,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" dependencies = [ "bitflags", - "errno", + "errno 0.2.8", "io-lifetimes 0.7.5", "libc", "linux-raw-sys 0.0.46", @@ -8242,18 +8290,32 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.8" +version = "0.36.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" dependencies = [ "bitflags", - "errno", - "io-lifetimes 1.0.5", + "errno 0.2.8", + "io-lifetimes 1.0.9", "libc", "linux-raw-sys 0.1.4", "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.37.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c348b5dc624ecee40108aa2922fed8bad89d7fcc2b9f8cb18f632898ac4a37f9" +dependencies = [ + "bitflags", + "errno 0.3.0", + "io-lifetimes 1.0.9", + "libc", + "linux-raw-sys 0.3.0", + "windows-sys 0.45.0", +] + [[package]] name = "rustls" version = "0.19.1" @@ -8302,9 +8364,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "rusty-fork" @@ -8330,9 +8392,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safe-mix" @@ -8467,7 +8529,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -8476,7 +8538,7 @@ version = "0.10.0-dev" dependencies = [ "array-bytes", "chrono", - "clap 4.1.8", + "clap 4.1.14", "fdlimit", "futures", "futures-timer", @@ -9016,7 +9078,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "paste", - "rustix 0.36.8", + "rustix 0.36.11", "sc-allocator", "sc-executor-common", "sc-runtime-test", @@ -9590,7 +9652,7 @@ dependencies = [ name = "sc-storage-monitor" version = "0.1.0" dependencies = [ - "clap 4.1.8", + "clap 4.1.14", "fs4", "futures", "log", @@ -9694,7 +9756,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -9762,9 +9824,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001cf62ece89779fd16105b5f515ad0e5cedcd5440d3dd806bb067978e7c3608" +checksum = "61471dff9096de1d8b2319efed7162081e96793f5ebb147e50db10d50d648a4d" dependencies = [ "bitvec", "cfg-if", @@ -9776,14 +9838,14 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303959cf613a6f6efd19ed4b4ad5bf79966a13352716299ad532cfb115f4205c" +checksum = "219580e803a66b3f05761fd06f1f879a872444e49ce23f73694d26e5a954c7e6" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -9832,9 +9894,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "sct" @@ -9876,7 +9938,7 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct 0.1.1", "der 0.6.1", - "generic-array 0.14.6", + "generic-array 0.14.7", "pkcs8 0.9.0", "subtle", "zeroize", @@ -9890,7 +9952,7 @@ checksum = "48518a2b5775ba8ca5b46596aae011caa431e6ce7e4a67ead66d92f08884220e" dependencies = [ "base16ct 0.2.0", "der 0.7.1", - "generic-array 0.14.6", + "generic-array 0.14.7", "pkcs8 0.10.1", "subtle", "zeroize", @@ -9966,9 +10028,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" dependencies = [ "serde", ] @@ -9981,29 +10043,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" dependencies = [ "itoa", "ryu", @@ -10172,14 +10234,14 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ba5f4d4ff12bdb6a169ed51b7c48c0e0ac4b0b4b31012b2571e97d78d3201d" +checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733" dependencies = [ "aes-gcm 0.9.4", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-rc.0", + "curve25519-dalek 4.0.0-rc.1", "rand_core 0.6.4", "ring", "rustc_version 0.4.0", @@ -10189,9 +10251,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -10242,7 +10304,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -10500,7 +10562,7 @@ dependencies = [ "hash256-std-hasher", "hex", "hex-literal", - "impl-serde", + "impl-serde 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static", "libsecp256k1", "log", @@ -10552,7 +10614,7 @@ dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn", + "syn 1.0.109", ] [[package]] @@ -10569,7 +10631,7 @@ version = "5.0.0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -10693,7 +10755,7 @@ dependencies = [ name = "sp-npos-elections-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.1.8", + "clap 4.1.14", "honggfuzz", "parity-scale-codec", "rand 0.8.5", @@ -10788,7 +10850,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -10894,7 +10956,7 @@ version = "5.0.0" name = "sp-storage" version = "7.0.0" dependencies = [ - "impl-serde", + "impl-serde 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec", "ref-cast", "serde", @@ -10992,7 +11054,7 @@ dependencies = [ name = "sp-version" version = "5.0.0" dependencies = [ - "impl-serde", + "impl-serde 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "parity-scale-codec", "parity-wasm", "scale-info", @@ -11012,7 +11074,7 @@ dependencies = [ "proc-macro2", "quote", "sp-version", - "syn", + "syn 1.0.109", ] [[package]] @@ -11050,9 +11112,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.5" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dccf47db1b41fa1573ed27ccf5e08e3ca771cb994f776668c5ebda893b248fc" +checksum = "c0959fd6f767df20b231736396e4f602171e00d95205676286e79d4a4eb67bef" [[package]] name = "spki" @@ -11126,7 +11188,7 @@ dependencies = [ "memchr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -11154,7 +11216,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn", + "syn 1.0.109", ] [[package]] @@ -11180,7 +11242,7 @@ dependencies = [ name = "subkey" version = "3.0.0" dependencies = [ - "clap 4.1.8", + "clap 4.1.14", "sc-cli", ] @@ -11208,7 +11270,7 @@ dependencies = [ name = "substrate-frame-cli" version = "4.0.0-dev" dependencies = [ - "clap 4.1.8", + "clap 4.1.14", "frame-support", "frame-system", "sc-cli", @@ -11424,7 +11486,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -11478,6 +11540,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e3787bb71465627110e7d87ed4faaa36c1f61042ee67badb9e2ef173accc40" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -11486,7 +11559,7 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "unicode-xid", ] @@ -11532,7 +11605,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall", - "rustix 0.36.8", + "rustix 0.36.11", "windows-sys 0.42.0", ] @@ -11547,9 +11620,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "textwrap" @@ -11559,22 +11632,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] @@ -11705,14 +11778,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot 0.12.1", @@ -11720,18 +11792,18 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.11", ] [[package]] @@ -11856,7 +11928,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -12046,7 +12118,7 @@ name = "try-runtime-cli" version = "0.10.0-dev" dependencies = [ "async-trait", - "clap 4.1.8", + "clap 4.1.14", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -12080,9 +12152,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.77" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44da5a6f2164c8e14d3bbc0657d69c5966af9f5f6930d4f600b1f5c4a673413" +checksum = "501dbdbb99861e4ab6b60eb6a7493956a9defb644fd034bc4a5ef27c693c8a3a" dependencies = [ "basic-toml", "dissimilar", @@ -12155,17 +12227,28 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "uint" +version = "0.9.5" +source = "git+https://github.com/drskalman/parity-common/#ef4729367fc1d07e83a73885af7745f19439a356" +dependencies = [ + "byteorder", + "crunchy", + "hex", + "static_assertions", +] + [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -12194,7 +12277,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -12296,12 +12379,11 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -12354,7 +12436,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -12388,7 +12470,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -12401,9 +12483,9 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-encoder" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f7d56227d910901ce12dfd19acc40c12687994dfb3f57c90690f80be946ec5" +checksum = "4eff853c4f09eec94d76af527eddad4e9de13b11d6286a1ef7134bc30135a2b7" dependencies = [ "leb128", ] @@ -12499,7 +12581,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e61a7006b0fdf24f6bbe8dcfdad5ca1b350de80061fb2827f31c82fbbb9565a" dependencies = [ - "spin 0.9.5", + "spin 0.9.7", "wasmi_arena", "wasmi_core 0.12.0", "wasmparser-nostd", @@ -12614,7 +12696,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.8", + "rustix 0.36.11", "serde", "sha2 0.10.6", "toml", @@ -12694,7 +12776,7 @@ checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.36.8", + "rustix 0.36.11", ] [[package]] @@ -12725,7 +12807,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.36.8", + "rustix 0.36.11", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -12746,9 +12828,9 @@ dependencies = [ [[package]] name = "wast" -version = "54.0.1" +version = "55.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d48d9d731d835f4f8dacbb8de7d47be068812cb9877f5c60d408858778d8d2a" +checksum = "4984d3e1406571f4930ba5cf79bd70f75f41d0e87e17506e0bd19b0e5d085f05" dependencies = [ "leb128", "memchr", @@ -12758,9 +12840,9 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1db2e3ed05ea31243761439194bec3af6efbbaf87c4c8667fb879e4f23791a0" +checksum = "af2b53f4da14db05d32e70e9c617abdf6620c575bd5dd972b7400037b4df2091" dependencies = [ "wast", ] @@ -12874,7 +12956,7 @@ dependencies = [ "byteorder", "ccm", "curve25519-dalek 3.2.0", - "der-parser 8.1.0", + "der-parser 8.2.0", "elliptic-curve 0.12.3", "hkdf", "hmac 0.12.1", @@ -13016,15 +13098,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - [[package]] name = "which" version = "4.4.0" @@ -13096,6 +13169,15 @@ dependencies = [ "windows_x86_64_msvc 0.34.0", ] +[[package]] +name = "windows" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-sys" version = "0.42.0" @@ -13103,12 +13185,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -13122,24 +13204,24 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_x86_64_msvc 0.42.2", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_msvc" @@ -13149,9 +13231,9 @@ checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_i686_gnu" @@ -13161,9 +13243,9 @@ checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_msvc" @@ -13173,9 +13255,9 @@ checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_x86_64_gnu" @@ -13185,15 +13267,15 @@ checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_msvc" @@ -13203,9 +13285,9 @@ checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "winreg" @@ -13272,10 +13354,10 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.1", + "asn1-rs 0.5.2", "base64 0.13.1", "data-encoding", - "der-parser 8.1.0", + "der-parser 8.2.0", "lazy_static", "nom", "oid-registry 0.6.1", @@ -13315,23 +13397,22 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "25588073e5216b50bca71d61cb8595cdb9745e87032a58c199730def2862c934" dependencies = [ "proc-macro2", "quote", - "syn", - "synstructure", + "syn 2.0.11", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index de562ad79e47e..16552874ade68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -326,3 +326,6 @@ inherits = "release" lto = "fat" # https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units codegen-units = 1 + +[patch.crates-io] +primitive-types = { git = "https://github.com/drskalman/parity-common/"} \ No newline at end of file diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index f1a1ebf3798c8..c37484f636abb 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -51,8 +51,7 @@ schnorrkel = { version = "0.9.1", features = [ "preaudit_deprecated", "u64_backend", ], default-features = false, optional = true } -bls-like = {git = "https://github.com/w3f/bls", branch = "skalman-hash-to-curve-wb", default-features = false} -#bls-like = {version="*", default-features = false } +bls-like = {git = "https://github.com/w3f/bls", default-features = false} sha2 = { version = "0.10.0", default-features = false, optional = true } hex = { version = "0.4", default-features = false, optional = true} libsecp256k1 = { version = "0.7", default-features = false, features = ["static-context"], optional = true } diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 5959e263f8b06..7346dcfc36605 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -23,15 +23,18 @@ use crate::crypto::Ss58Codec; use crate::crypto::{DeriveError, DeriveJunction, Pair as TraitPair, SecretStringError}; use crate::{ crypto::{ByteArray, CryptoType, Derive, Public as TraitPublic, UncheckedFrom}, - hash::{H384, H768}, + hash::{H1152, H896}, }; #[cfg(feature = "full_crypto")] use sp_std::vec::Vec; -use bls_like::EngineBLS; #[cfg(feature = "full_crypto")] -use bls_like::{Keypair, Message, SerializableToBytes}; +use bls_like::{ + double::{DoublePublicKey, DoublePublicKeyScheme, DoubleSignature}, + Keypair, Message, SecretKey, SerializableToBytes, +}; +use bls_like::{EngineBLS, TinyBLS381}; use codec::{Decode, Encode, MaxEncodedLen}; #[cfg(feature = "std")] use hex; @@ -45,35 +48,35 @@ use sp_std::{convert::TryFrom, marker::PhantomData, ops::Deref}; /// BLS-377 specialized types pub mod bls377 { use crate::crypto::CryptoTypeId; - use bls_like::BLS377; + use bls_like::TinyBLS377; /// An identifier used to match public keys against BLS12-377 keys pub const CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"bls7"); /// BLS12-377 key pair. #[cfg(feature = "full_crypto")] - pub type Pair = super::Pair; + pub type Pair = super::Pair; /// BLS12-377 public key. - pub type Public = super::Public; + pub type Public = super::DoublePublicKey; /// BLS12-377 signature. - pub type Signature = super::Signature; + pub type Signature = super::DoubleSignature; } /// BLS-381 specialized types pub mod bls381 { use crate::crypto::CryptoTypeId; - use bls_like::ZBLS; + use bls_like::TinyBLS381; /// An identifier used to match public keys against BLS12-381 keys pub const CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"bls8"); /// BLS12-381 key pair. #[cfg(feature = "full_crypto")] - pub type Pair = super::Pair; + pub type Pair = super::Pair; /// BLS12-381 public key. - pub type Public = super::Public; + pub type Public = super::DoublePublicKey; /// BLS12-381 signature. - pub type Signature = super::Signature; + pub type Signature = super::DoubleSignature; } trait BlsBound: EngineBLS + Send + Sync + 'static {} @@ -82,13 +85,16 @@ impl BlsBound for T {} // Secret key serialized side #[cfg(feature = "full_crypto")] -const SECRET_KEY_SERIALIZED_SIZE: usize = 32; +const SECRET_KEY_SERIALIZED_SIZE: usize = + as SerializableToBytes>::SERIALIZED_BYTES_SIZE; // Public key serialized side -const PUBLIC_KEY_SERIALIZED_SIZE: usize = 48; +const PUBLIC_KEY_SERIALIZED_SIZE: usize = + as SerializableToBytes>::SERIALIZED_BYTES_SIZE; // Signature serialized size -const SIGNATURE_SERIALIZED_SIZE: usize = 96; +const SIGNATURE_SERIALIZED_SIZE: usize = + as SerializableToBytes>::SERIALIZED_BYTES_SIZE; /// A secret seed. /// @@ -148,11 +154,11 @@ impl Public { Public { inner: data, _phantom: PhantomData } } - /// A new instance from an H384. + /// A new instance from an H1152. /// /// NOTE: No checking goes on to ensure this is a real public key. Only use it if /// you are certain that the array actually is a pubkey. GIGO! - pub fn from_h384(x: H384) -> Self { + pub fn from_h1152(x: H1152) -> Self { Self::from_raw(x.into()) } } @@ -229,7 +235,7 @@ impl From> for Public { } } -impl From> for H384 { +impl From> for H1152 { fn from(x: Public) -> Self { x.inner.into() } @@ -241,9 +247,9 @@ impl UncheckedFrom<[u8; PUBLIC_KEY_SERIALIZED_SIZE]> for Public { } } -impl UncheckedFrom for Public { - fn unchecked_from(x: H384) -> Self { - Public::from_h384(x) +impl UncheckedFrom for Public { + fn unchecked_from(x: H1152) -> Self { + Public::from_h1152(x) } } @@ -359,11 +365,11 @@ impl Signature { Some(Signature::from_raw(r)) } - /// A new instance from an H768. + /// A new instance from an H896. /// /// NOTE: No checking goes on to ensure this is a real signature. Only use it if /// you are certain that the array actually is a signature. GIGO! - pub fn from_h768(hash: H768) -> Self { + pub fn from_h896(hash: H896) -> Self { Signature::from_raw(hash.into()) } } @@ -405,9 +411,9 @@ impl<'de, T> Deserialize<'de> for Signature { } } -impl From> for H768 { - fn from(signature: Signature) -> H768 { - H768::from(signature.inner) +impl From> for H896 { + fn from(signature: Signature) -> H896 { + H896::from(signature.inner) } } @@ -479,7 +485,11 @@ fn derive_hard_junction(secret_seed: &Seed, cc: &[u8; 32]) -> Seed { impl Pair { /// Get the seed for this key. pub fn seed(&self) -> Seed { - self.0.secret.to_bytes() + self.0 + .secret + .to_bytes() + .try_into() + .expect("Secret key serializer returns a vector of SECRET_KEY_SERIALIZED_SIZE size") } // TODO DAVXY: is this required??? If yes add when it will be 😃 @@ -521,7 +531,10 @@ impl TraitPair for Pair { path: Iter, _seed: Option, ) -> Result<(Self, Option), DeriveError> { - let mut acc = self.0.secret.to_bytes(); + let mut acc: [u8; SECRET_KEY_SERIALIZED_SIZE] = + self.0.secret.to_bytes().try_into().expect( + "Secret key serializer returns a vector of SECRET_KEY_SERIALIZED_SIZE size", + ); for j in path { match j { DeriveJunction::Soft(_cc) => return Err(DeriveError::SoftKeyInPath), @@ -534,7 +547,7 @@ impl TraitPair for Pair { /// Get the public key. fn public(&self) -> Self::Public { let mut raw = [0u8; PUBLIC_KEY_SERIALIZED_SIZE]; - let pk = self.0.public.to_bytes(); + let pk = DoublePublicKeyScheme::into_double_public_key(&self.0).to_bytes(); raw.copy_from_slice(pk.as_slice()); Self::Public::from_raw(raw) } @@ -542,7 +555,11 @@ impl TraitPair for Pair { /// Sign a message. fn sign(&self, message: &[u8]) -> Self::Signature { let mut mutable_self = self.clone(); - let r = mutable_self.0.sign(Message::new(b"", message)).to_bytes(); + let r: [u8; SIGNATURE_SERIALIZED_SIZE] = + DoublePublicKeyScheme::sign(&mut mutable_self.0, Message::new(b"", message)) + .to_bytes() + .try_into() + .expect("Signature serializer returns vectors of SIGNATURE_SERIALIZED_SIZE size"); Self::Signature::from_raw(r) } @@ -560,7 +577,7 @@ impl TraitPair for Pair { Ok(pk) => pk, Err(_) => return false, }; - let public_key = match bls_like::PublicKey::::from_bytes(&pubkey_array) { + let public_key = match bls_like::double::DoublePublicKey::::from_bytes(&pubkey_array) { Ok(pk) => pk, Err(_) => return false, }; @@ -569,7 +586,7 @@ impl TraitPair for Pair { Ok(s) => s, Err(_) => return false, }; - let sig = match bls_like::Signature::from_bytes(sig_array) { + let sig = match bls_like::double::DoubleSignature::from_bytes(sig_array) { Ok(s) => s, Err(_) => return false, }; @@ -593,7 +610,8 @@ impl CryptoType for Pair { mod test { use super::*; use crate::crypto::DEV_PHRASE; - use bls377::{Pair, Public, Signature}; + use bls377::Pair; + use bls_like::TinyBLS377; use hex_literal::hex; #[test] @@ -632,12 +650,12 @@ mod test { assert_eq!( public, Public::from_raw(hex!( - "7a84ca8ce4c37c93c95ecee6a3c0c9a7b9c225093cf2f12dc4f69cbfb847ef9424a18f5755d5a742247d386ff2aabb80" + "7a84ca8ce4c37c93c95ecee6a3c0c9a7b9c225093cf2f12dc4f69cbfb847ef9424a18f5755d5a742247d386ff2aabb806bcf160eff31293ea9616976628f77266c8a8cc1d8753be04197bd6cdd8c5c87a148f782c4c1568d599b48833fd539001e580cff64bbc71850605433fcd051f3afc3b74819786f815ffb5272030a8d03e5df61e6183f8fd8ea85f26defa83400" )) ); let message = b""; let signature = - hex!("0e5854002b249175764e463165aec0e38a46ddd44c2db29d6fec3022a3993b3390b001b53a04d155a4d216dd361df90087281be27c58ae22c7f1333820259ff5ae1b321126d1a001bf91ee088fb56ca9d4aa484d129ede7e701ced08df631581" + hex!("1a2cf9ed2f3dc798c218fe80948560487a984eb8f7e8a86af6113759603bea9bdca53c260b69662efe64df80b5b953803145af24b37f1d292c3cfd605ecc4fbeaa3b370c92cb3fe14f5044bbe3d89a01dbac4cd5cdb741c9e6f4fad16eca76c14e5cd3b11db21c03317d5d5998c4c105" ); let signature = Signature::from_raw(signature); assert!(pair.sign(&message[..]) == signature); @@ -657,15 +675,17 @@ mod test { assert_eq!( public, Public::from_raw(hex!( - "6dc6be608fab3c6bd894a606be86db346cc170db85c733853a371f3db54ae1b12052c0888d472760c81b537572a26f00" + "6dc6be608fab3c6bd894a606be86db346cc170db85c733853a371f3db54ae1b12052c0888d472760c81b537572a26f00db865e5963aef8634f9917571c51b538b564b2a9ceda938c8b930969ee3b832448e08e33a79e9ddd28af419a3ce45300f5dbc768b067781f44f3fe05a19e6b07b1c4196151ec3f8ea37e4f89a8963030d2101e931276bb9ebe1f20102239d780" )) ); let message = b""; let signature = - hex!("9f7d07e0fdd6aa342f6defaade946b59bfeba8af45c243f86b208cd339b2c713421844e3007e0acafd0a529542ee050047b739fe5bfd311d884451542204e173d784e648eb55f4bd32da747f006120fadf4801c2b1c88f9745c50c2141b1d380" + hex!("618ae186f07ead4fb973c7ae86deeee9d33cbdcbea3fe32753e5cdba8df2ae67a28c2465118756bccfd60076fdbeb2009d2eeb174584b448bee01cf4eefd65fd839c722464e6ccc7b2639b4e7db6ec0de57eff3ee22c7eb19a8f06839530bc64ae323e263341b03363da5d75e2e59002" ); - let signature = Signature::from_raw(signature); - assert!(pair.sign(&message[..]) == signature); + let expected_signature = Signature::from_raw(signature); + println!("signature is {:?}", pair.sign(&message[..])); + let signature = pair.sign(&message[..]); + assert!(signature == expected_signature); assert!(Pair::verify(&signature, &message[..], &public)); } @@ -687,7 +707,7 @@ mod test { public, Public::from_raw( hex!( - "754d2f2bbfa67df54d7e0e951979a18a1e0f45948857752cc2bac6bbb0b1d05e8e48bcc453920bf0c4bbd59932124801") + "754d2f2bbfa67df54d7e0e951979a18a1e0f45948857752cc2bac6bbb0b1d05e8e48bcc453920bf0c4bbd5993212480112a1fb433f04d74af0a8b700d93dc957ab3207f8d071e948f5aca1a7632c00bdf6d06be05b43e2e6216dccc8a5d55a0071cb2313cfd60b7e9114619cd17c06843b352f0b607a99122f6651df8f02e1ad3697bd208e62af047ddd7b942ba80080") ) ); let message = @@ -739,15 +759,17 @@ mod test { let message = b"Something important"; let signature = pair.sign(&message[..]); let serialized_signature = serde_json::to_string(&signature).unwrap(); - // Signature is 96 bytes, so 192 chars + 2 quote chars - assert_eq!(serialized_signature.len(), 194); + // Signature is 112 bytes, hexify * 2, so 224 chars + 2 quote chars + assert_eq!(serialized_signature.len(), 226); let signature = serde_json::from_str(&serialized_signature).unwrap(); assert!(Pair::verify(&signature, &message[..], &pair.public())); } #[test] fn signature_serialization_doesnt_panic() { - fn deserialize_signature(text: &str) -> Result { + fn deserialize_signature( + text: &str, + ) -> Result, serde_json::error::Error> { serde_json::from_str(text) } assert!(deserialize_signature("Not valid json.").is_err()); diff --git a/primitives/core/src/hash.rs b/primitives/core/src/hash.rs index 37d87a819323a..3510e3f802a5d 100644 --- a/primitives/core/src/hash.rs +++ b/primitives/core/src/hash.rs @@ -17,7 +17,7 @@ //! A fixed hash type. -pub use primitive_types::{H160, H256, H384, H512, H768}; +pub use primitive_types::{H1152, H160, H256, H512, H896}; /// Hash conversion. Used to convert between unbound associated hash types in traits, /// implemented by the same hash type. diff --git a/primitives/core/src/hexdisplay.rs b/primitives/core/src/hexdisplay.rs index 9f35e5ec7725f..30e045dfc52ac 100644 --- a/primitives/core/src/hexdisplay.rs +++ b/primitives/core/src/hexdisplay.rs @@ -96,7 +96,7 @@ macro_rules! impl_non_endians { impl_non_endians!( [u8; 1], [u8; 2], [u8; 3], [u8; 4], [u8; 5], [u8; 6], [u8; 7], [u8; 8], [u8; 10], [u8; 12], [u8; 14], [u8; 16], [u8; 20], [u8; 24], [u8; 28], [u8; 32], [u8; 40], [u8; 48], [u8; 56], - [u8; 64], [u8; 65], [u8; 80], [u8; 96], [u8; 112], [u8; 128] + [u8; 64], [u8; 65], [u8; 80], [u8; 96], [u8; 112], [u8; 128], [u8; 144] ); /// Format into ASCII + # + hex, suitable for storage key preimages. From b278ba73136f4d65b52e02f1d57438916f4f4424 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Wed, 29 Mar 2023 09:22:32 +0200 Subject: [PATCH 12/35] Fix inclusions and types used within substrate --- primitives/core/src/bls.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 7346dcfc36605..88aaa8c376c39 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -30,11 +30,11 @@ use crate::{ use sp_std::vec::Vec; #[cfg(feature = "full_crypto")] +use bls_like::{double::DoublePublicKeyScheme, Keypair, Message, SecretKey}; use bls_like::{ - double::{DoublePublicKey, DoublePublicKeyScheme, DoubleSignature}, - Keypair, Message, SecretKey, SerializableToBytes, + double::{DoublePublicKey, DoubleSignature}, + EngineBLS, SerializableToBytes, TinyBLS381, }; -use bls_like::{EngineBLS, TinyBLS381}; use codec::{Decode, Encode, MaxEncodedLen}; #[cfg(feature = "std")] use hex; @@ -57,9 +57,9 @@ pub mod bls377 { #[cfg(feature = "full_crypto")] pub type Pair = super::Pair; /// BLS12-377 public key. - pub type Public = super::DoublePublicKey; + pub type Public = super::Public; /// BLS12-377 signature. - pub type Signature = super::DoubleSignature; + pub type Signature = super::Signature; } /// BLS-381 specialized types @@ -74,9 +74,9 @@ pub mod bls381 { #[cfg(feature = "full_crypto")] pub type Pair = super::Pair; /// BLS12-381 public key. - pub type Public = super::DoublePublicKey; + pub type Public = super::Public; /// BLS12-381 signature. - pub type Signature = super::DoubleSignature; + pub type Signature = super::Signature; } trait BlsBound: EngineBLS + Send + Sync + 'static {} From 3d50a72309510bfa7a1a162aa25d559594bfe460 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Wed, 29 Mar 2023 09:47:33 +0200 Subject: [PATCH 13/35] Remove unused cruft --- primitives/core/src/bls.rs | 147 ++++++------------------------------- 1 file changed, 23 insertions(+), 124 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 88aaa8c376c39..16130c516d00a 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -19,12 +19,9 @@ #[cfg(feature = "std")] use crate::crypto::Ss58Codec; +use crate::crypto::{ByteArray, CryptoType, Derive, Public as TraitPublic, UncheckedFrom}; #[cfg(feature = "full_crypto")] use crate::crypto::{DeriveError, DeriveJunction, Pair as TraitPair, SecretStringError}; -use crate::{ - crypto::{ByteArray, CryptoType, Derive, Public as TraitPublic, UncheckedFrom}, - hash::{H1152, H896}, -}; #[cfg(feature = "full_crypto")] use sp_std::vec::Vec; @@ -145,24 +142,6 @@ impl sp_std::hash::Hash for Public { } } -impl Public { - /// A new instance from the given PUBLIC_KEY_SERIALIZED_SIZE-byte `data`. - /// - /// NOTE: No checking goes on to ensure this is a real public key. Only use it if - /// you are certain that the array actually is a pubkey. GIGO! - pub fn from_raw(data: [u8; PUBLIC_KEY_SERIALIZED_SIZE]) -> Self { - Public { inner: data, _phantom: PhantomData } - } - - /// A new instance from an H1152. - /// - /// NOTE: No checking goes on to ensure this is a real public key. Only use it if - /// you are certain that the array actually is a pubkey. GIGO! - pub fn from_h1152(x: H1152) -> Self { - Self::from_raw(x.into()) - } -} - impl ByteArray for Public { const LEN: usize = PUBLIC_KEY_SERIALIZED_SIZE; } @@ -235,21 +214,9 @@ impl From> for Public { } } -impl From> for H1152 { - fn from(x: Public) -> Self { - x.inner.into() - } -} - impl UncheckedFrom<[u8; PUBLIC_KEY_SERIALIZED_SIZE]> for Public { - fn unchecked_from(x: [u8; PUBLIC_KEY_SERIALIZED_SIZE]) -> Self { - Public::from_raw(x) - } -} - -impl UncheckedFrom for Public { - fn unchecked_from(x: H1152) -> Self { - Public::from_h1152(x) + fn unchecked_from(data: [u8; PUBLIC_KEY_SERIALIZED_SIZE]) -> Self { + Public { inner: data, _phantom: PhantomData } } } @@ -343,48 +310,16 @@ impl sp_std::hash::Hash for Signature { } } -impl Signature { - /// A new instance from the given SIGNATURE_SERIALIZED_SIZE-byte `data`. - /// - /// NOTE: No checking goes on to ensure this is a real signature. Only use it if - /// you are certain that the array actually is a signature. GIGO! - pub fn from_raw(data: [u8; SIGNATURE_SERIALIZED_SIZE]) -> Self { - Signature { inner: data, _phantom: PhantomData } - } - - /// A new instance from the given slice that should be 64 bytes long. - /// - /// NOTE: No checking goes on to ensure this is a real signature. Only use it if - /// you are certain that the array actually is a signature. GIGO! - pub fn from_slice(data: &[u8]) -> Option { - if data.len() != SIGNATURE_SERIALIZED_SIZE { - return None - } - let mut r = [0u8; SIGNATURE_SERIALIZED_SIZE]; - r.copy_from_slice(data); - Some(Signature::from_raw(r)) - } - - /// A new instance from an H896. - /// - /// NOTE: No checking goes on to ensure this is a real signature. Only use it if - /// you are certain that the array actually is a signature. GIGO! - pub fn from_h896(hash: H896) -> Self { - Signature::from_raw(hash.into()) - } -} - impl TryFrom<&[u8]> for Signature { type Error = (); fn try_from(data: &[u8]) -> Result { - if data.len() == SIGNATURE_SERIALIZED_SIZE { - let mut inner = [0u8; SIGNATURE_SERIALIZED_SIZE]; - inner.copy_from_slice(data); - Ok(Signature::from_raw(inner)) - } else { - Err(()) + if data.len() != SIGNATURE_SERIALIZED_SIZE { + return Err(()) } + let mut inner = [0u8; SIGNATURE_SERIALIZED_SIZE]; + inner.copy_from_slice(data); + Ok(Signature::unchecked_from(inner)) } } @@ -411,12 +346,6 @@ impl<'de, T> Deserialize<'de> for Signature { } } -impl From> for H896 { - fn from(signature: Signature) -> H896 { - H896::from(signature.inner) - } -} - impl From> for [u8; SIGNATURE_SERIALIZED_SIZE] { fn from(signature: Signature) -> [u8; SIGNATURE_SERIALIZED_SIZE] { signature.inner @@ -455,7 +384,7 @@ impl sp_std::fmt::Debug for Signature { impl UncheckedFrom<[u8; SIGNATURE_SERIALIZED_SIZE]> for Signature { fn unchecked_from(data: [u8; SIGNATURE_SERIALIZED_SIZE]) -> Self { - Signature::from_raw(data) + Signature { inner: data, _phantom: PhantomData } } } @@ -482,29 +411,7 @@ fn derive_hard_junction(secret_seed: &Seed, cc: &[u8; 32]) -> Seed { } #[cfg(feature = "full_crypto")] -impl Pair { - /// Get the seed for this key. - pub fn seed(&self) -> Seed { - self.0 - .secret - .to_bytes() - .try_into() - .expect("Secret key serializer returns a vector of SECRET_KEY_SERIALIZED_SIZE size") - } - - // TODO DAVXY: is this required??? If yes add when it will be 😃 - // /// Exactly as `from_string` except that if no matches are found then, the the first 32 - // /// characters are taken (padded with spaces as necessary) and used as the MiniSecretKey. - // #[cfg(feature = "std")] - // pub fn from_legacy_string(s: &str, password_override: Option<&str>) -> Self { - // Self::from_string(s, password_override).unwrap_or_else(|_| { - // let mut padded_seed: Seed = [b' '; 32]; - // let len = s.len().min(32); - // padded_seed[..len].copy_from_slice(&s.as_bytes()[..len]); - // Self::from_seed(&padded_seed) - // }) - // } -} +impl Pair {} #[cfg(feature = "full_crypto")] impl TraitPair for Pair { @@ -512,10 +419,6 @@ impl TraitPair for Pair { type Public = Public; type Signature = Signature; - /// Make a new key pair from secret seed material. The slice must be 32 bytes long or it - /// will return `None`. - /// - /// You should never need to use this; generate(), generate_with_phrase fn from_seed_slice(seed_slice: &[u8]) -> Result { if seed_slice.len() != SECRET_KEY_SERIALIZED_SIZE { return Err(SecretStringError::InvalidSeedLength) @@ -525,7 +428,6 @@ impl TraitPair for Pair { Ok(Pair(bls_like::Keypair { secret, public })) } - /// Derive a child key from a series of given junctions. fn derive>( &self, path: Iter, @@ -544,15 +446,13 @@ impl TraitPair for Pair { Ok((Self::from_seed(&acc), Some(acc))) } - /// Get the public key. fn public(&self) -> Self::Public { let mut raw = [0u8; PUBLIC_KEY_SERIALIZED_SIZE]; let pk = DoublePublicKeyScheme::into_double_public_key(&self.0).to_bytes(); raw.copy_from_slice(pk.as_slice()); - Self::Public::from_raw(raw) + Self::Public::unchecked_from(raw) } - /// Sign a message. fn sign(&self, message: &[u8]) -> Self::Signature { let mut mutable_self = self.clone(); let r: [u8; SIGNATURE_SERIALIZED_SIZE] = @@ -560,18 +460,13 @@ impl TraitPair for Pair { .to_bytes() .try_into() .expect("Signature serializer returns vectors of SIGNATURE_SERIALIZED_SIZE size"); - Self::Signature::from_raw(r) + Self::Signature::unchecked_from(r) } - /// Verify a signature on a message. Returns true if the signature is good. fn verify>(sig: &Self::Signature, message: M, pubkey: &Self::Public) -> bool { Self::verify_weak(&sig.inner[..], message.as_ref(), pubkey) } - /// Verify a signature on a message. Returns true if the signature is good. - /// - /// This doesn't use the type system to ensure that `sig` and `pubkey` are the correct - /// size. Use it only if you're coming from byte buffers and need the speed. fn verify_weak, M: AsRef<[u8]>>(sig: &[u8], message: M, pubkey: P) -> bool { let pubkey_array: [u8; PUBLIC_KEY_SERIALIZED_SIZE] = match pubkey.as_ref().try_into() { Ok(pk) => pk, @@ -594,9 +489,13 @@ impl TraitPair for Pair { sig.verify(Message::new(b"", message.as_ref()), &public_key) } - /// Return a vec filled with raw data. + /// Get the seed for this key. fn to_raw_vec(&self) -> Vec { - self.seed().to_vec() + self.0 + .secret + .to_bytes() + .try_into() + .expect("Secret key serializer returns a vector of SECRET_KEY_SERIALIZED_SIZE size") } } @@ -649,7 +548,7 @@ mod test { let public = pair.public(); assert_eq!( public, - Public::from_raw(hex!( + Public::unchecked_from(hex!( "7a84ca8ce4c37c93c95ecee6a3c0c9a7b9c225093cf2f12dc4f69cbfb847ef9424a18f5755d5a742247d386ff2aabb806bcf160eff31293ea9616976628f77266c8a8cc1d8753be04197bd6cdd8c5c87a148f782c4c1568d599b48833fd539001e580cff64bbc71850605433fcd051f3afc3b74819786f815ffb5272030a8d03e5df61e6183f8fd8ea85f26defa83400" )) ); @@ -657,7 +556,7 @@ mod test { let signature = hex!("1a2cf9ed2f3dc798c218fe80948560487a984eb8f7e8a86af6113759603bea9bdca53c260b69662efe64df80b5b953803145af24b37f1d292c3cfd605ecc4fbeaa3b370c92cb3fe14f5044bbe3d89a01dbac4cd5cdb741c9e6f4fad16eca76c14e5cd3b11db21c03317d5d5998c4c105" ); - let signature = Signature::from_raw(signature); + let signature = Signature::unchecked_from(signature); assert!(pair.sign(&message[..]) == signature); assert!(Pair::verify(&signature, &message[..], &public)); } @@ -674,7 +573,7 @@ mod test { let public = pair.public(); assert_eq!( public, - Public::from_raw(hex!( + Public::unchecked_from(hex!( "6dc6be608fab3c6bd894a606be86db346cc170db85c733853a371f3db54ae1b12052c0888d472760c81b537572a26f00db865e5963aef8634f9917571c51b538b564b2a9ceda938c8b930969ee3b832448e08e33a79e9ddd28af419a3ce45300f5dbc768b067781f44f3fe05a19e6b07b1c4196151ec3f8ea37e4f89a8963030d2101e931276bb9ebe1f20102239d780" )) ); @@ -682,7 +581,7 @@ mod test { let signature = hex!("618ae186f07ead4fb973c7ae86deeee9d33cbdcbea3fe32753e5cdba8df2ae67a28c2465118756bccfd60076fdbeb2009d2eeb174584b448bee01cf4eefd65fd839c722464e6ccc7b2639b4e7db6ec0de57eff3ee22c7eb19a8f06839530bc64ae323e263341b03363da5d75e2e59002" ); - let expected_signature = Signature::from_raw(signature); + let expected_signature = Signature::unchecked_from(signature); println!("signature is {:?}", pair.sign(&message[..])); let signature = pair.sign(&message[..]); assert!(signature == expected_signature); @@ -705,7 +604,7 @@ mod test { let public = pair.public(); assert_eq!( public, - Public::from_raw( + Public::unchecked_from( hex!( "754d2f2bbfa67df54d7e0e951979a18a1e0f45948857752cc2bac6bbb0b1d05e8e48bcc453920bf0c4bbd5993212480112a1fb433f04d74af0a8b700d93dc957ab3207f8d071e948f5aca1a7632c00bdf6d06be05b43e2e6216dccc8a5d55a0071cb2313cfd60b7e9114619cd17c06843b352f0b607a99122f6651df8f02e1ad3697bd208e62af047ddd7b942ba80080") ) From 994a805eda87db283d07872fef78f860afbd52fa Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Wed, 29 Mar 2023 09:53:39 +0200 Subject: [PATCH 14/35] Restore usage of upstream crates --- Cargo.lock | 40 +++++++++++-------------------------- Cargo.toml | 3 --- primitives/core/src/hash.rs | 2 +- 3 files changed, 13 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5f32cc97dc270..e738c6a0199f4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2351,7 +2351,8 @@ dependencies = [ [[package]] name = "fixed-hash" version = "0.8.0" -source = "git+https://github.com/drskalman/parity-common/#ef4729367fc1d07e83a73885af7745f19439a356" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", "rand 0.8.5", @@ -3452,7 +3453,8 @@ dependencies = [ [[package]] name = "impl-codec" version = "0.6.0" -source = "git+https://github.com/drskalman/parity-common/#ef4729367fc1d07e83a73885af7745f19439a356" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" dependencies = [ "parity-scale-codec", ] @@ -3466,14 +3468,6 @@ dependencies = [ "serde", ] -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "git+https://github.com/drskalman/parity-common/#ef4729367fc1d07e83a73885af7745f19439a356" -dependencies = [ - "serde", -] - [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -4156,7 +4150,7 @@ dependencies = [ "sha2 0.10.6", "smallvec", "thiserror", - "uint 0.9.5 (registry+https://github.com/rust-lang/crates.io-index)", + "uint", "unsigned-varint", "void", ] @@ -7646,13 +7640,14 @@ dependencies = [ [[package]] name = "primitive-types" version = "0.12.1" -source = "git+https://github.com/drskalman/parity-common/#ef4729367fc1d07e83a73885af7745f19439a356" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f3486ccba82358b11a77516035647c34ba167dfa53312630de83b12bd4f3d66" dependencies = [ "fixed-hash", "impl-codec", - "impl-serde 0.4.0 (git+https://github.com/drskalman/parity-common/)", + "impl-serde", "scale-info", - "uint 0.9.5 (git+https://github.com/drskalman/parity-common/)", + "uint", ] [[package]] @@ -10562,7 +10557,7 @@ dependencies = [ "hash256-std-hasher", "hex", "hex-literal", - "impl-serde 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-serde", "lazy_static", "libsecp256k1", "log", @@ -10956,7 +10951,7 @@ version = "5.0.0" name = "sp-storage" version = "7.0.0" dependencies = [ - "impl-serde 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-serde", "parity-scale-codec", "ref-cast", "serde", @@ -11054,7 +11049,7 @@ dependencies = [ name = "sp-version" version = "5.0.0" dependencies = [ - "impl-serde 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "impl-serde", "parity-scale-codec", "parity-wasm", "scale-info", @@ -12227,17 +12222,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "uint" -version = "0.9.5" -source = "git+https://github.com/drskalman/parity-common/#ef4729367fc1d07e83a73885af7745f19439a356" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - [[package]] name = "unicode-bidi" version = "0.3.13" diff --git a/Cargo.toml b/Cargo.toml index 16552874ade68..de562ad79e47e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -326,6 +326,3 @@ inherits = "release" lto = "fat" # https://doc.rust-lang.org/rustc/codegen-options/index.html#codegen-units codegen-units = 1 - -[patch.crates-io] -primitive-types = { git = "https://github.com/drskalman/parity-common/"} \ No newline at end of file diff --git a/primitives/core/src/hash.rs b/primitives/core/src/hash.rs index 3510e3f802a5d..ec7da98296bf3 100644 --- a/primitives/core/src/hash.rs +++ b/primitives/core/src/hash.rs @@ -17,7 +17,7 @@ //! A fixed hash type. -pub use primitive_types::{H1152, H160, H256, H512, H896}; +pub use primitive_types::{H160, H256, H512}; /// Hash conversion. Used to convert between unbound associated hash types in traits, /// implemented by the same hash type. From d728537ffb2b2adc74642c929960e22aae018256 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Wed, 29 Mar 2023 10:02:16 +0200 Subject: [PATCH 15/35] Fix test --- primitives/core/src/bls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 16130c516d00a..0dc9a656eb577 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -533,7 +533,7 @@ mod test { let path = vec![DeriveJunction::Hard([0u8; 32])]; let derived = pair.derive(path.into_iter(), None).ok().unwrap().0; assert_eq!( - derived.seed(), + derived.to_raw_vec(), hex!("a4f2269333b3e87c577aa00c4a2cd650b3b30b2e8c286a47c251279ff3a26e0d") ); } From fbb2f4736576239c99cedb19765fd006e3294fcc Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Wed, 29 Mar 2023 10:02:38 +0200 Subject: [PATCH 16/35] Reduce the diff by aligning Cargo.lock to master --- Cargo.lock | 917 +++++++++++++++++++++++++---------------------------- 1 file changed, 426 insertions(+), 491 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e738c6a0199f4..4c295967d1365 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", ] [[package]] @@ -51,7 +51,7 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", "rand_core 0.6.4", ] @@ -62,7 +62,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" dependencies = [ "crypto-common", - "generic-array 0.14.7", + "generic-array 0.14.6", ] [[package]] @@ -95,7 +95,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" dependencies = [ "cfg-if", - "cipher 0.4.4", + "cipher 0.4.3", "cpufeatures", ] @@ -121,7 +121,7 @@ checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" dependencies = [ "aead 0.5.1", "aes 0.8.2", - "cipher 0.4.4", + "cipher 0.4.3", "ctr 0.9.2", "ghash 0.5.0", "subtle", @@ -203,17 +203,11 @@ dependencies = [ "winapi", ] -[[package]] -name = "anstyle" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" - [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" [[package]] name = "approx" @@ -303,7 +297,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -316,7 +310,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -352,7 +346,7 @@ checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -373,9 +367,9 @@ checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" [[package]] name = "arrayvec" @@ -407,9 +401,9 @@ dependencies = [ [[package]] name = "asn1-rs" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +checksum = "cf6690c370453db30743b373a60ba498fc0d6d83b11f4abfd87a84a075db5dd4" dependencies = [ "asn1-rs-derive 0.4.0", "asn1-rs-impl", @@ -429,7 +423,7 @@ checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", "synstructure", ] @@ -441,7 +435,7 @@ checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", "synstructure", ] @@ -453,7 +447,7 @@ checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -464,14 +458,13 @@ checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" [[package]] name = "assert_cmd" -version = "2.0.10" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0b2340f55d9661d76793b2bfc2eb0e62689bd79d067a95707ea762afd5e9dd" +checksum = "9834fcc22e0874394a010230586367d4a3e9f11b560f469262678547e1d2575e" dependencies = [ - "anstyle", "bstr", "doc-comment", - "predicates 3.0.2", + "predicates", "predicates-core", "predicates-tree", "wait-timeout", @@ -496,31 +489,32 @@ dependencies = [ [[package]] name = "async-io" -version = "1.13.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" dependencies = [ "async-lock", "autocfg", - "cfg-if", "concurrent-queue", "futures-lite", + "libc", "log", "parking", "polling", - "rustix 0.37.4", "slab", "socket2", "waker-fn", + "windows-sys 0.42.0", ] [[package]] name = "async-lock" -version = "2.7.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" +checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" dependencies = [ "event-listener", + "futures-lite", ] [[package]] @@ -542,18 +536,18 @@ checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.11", + "syn", ] [[package]] @@ -651,9 +645,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "basic-toml" -version = "0.1.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c0de75129aa8d0cceaf750b89013f0e08804d6ec61416da787b35ad0d7cddf1" +checksum = "2e819b667739967cd44d308b8c7b71305d8bb0729ac44a248aa08f33d01950b4" dependencies = [ "serde", ] @@ -705,7 +699,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 1.0.109", + "syn", ] [[package]] @@ -788,7 +782,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", ] [[package]] @@ -797,7 +791,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", ] [[package]] @@ -867,9 +861,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" +checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" dependencies = [ "memchr", "once_cell", @@ -906,9 +900,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" [[package]] name = "byteorder" @@ -935,9 +929,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.4" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" +checksum = "6031a462f977dd38968b6f23378356512feeace69cef817e1a4475108093cec3" dependencies = [ "serde", ] @@ -959,7 +953,7 @@ checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07" dependencies = [ "camino", "cargo-platform", - "semver 1.0.17", + "semver 1.0.16", "serde", "serde_json", "thiserror", @@ -1051,7 +1045,7 @@ name = "chain-spec-builder" version = "2.0.0" dependencies = [ "ansi_term", - "clap 4.1.14", + "clap 4.1.8", "node-cli", "rand 0.8.5", "sc-chain-spec", @@ -1062,9 +1056,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.24" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ "iana-time-zone", "js-sys", @@ -1121,7 +1115,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", ] [[package]] @@ -1130,14 +1124,14 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", ] [[package]] name = "cipher" -version = "0.4.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" dependencies = [ "crypto-common", "inout", @@ -1177,47 +1171,39 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "906f7fe1da4185b7a282b2bc90172a496f9def1aca4545fe7526810741591e14" -dependencies = [ - "clap_builder", - "clap_derive", - "once_cell", -] - -[[package]] -name = "clap_builder" -version = "4.1.14" +version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351f9ad9688141ed83dfd8f5fb998a06225ef444b48ff4dc43de6d409b7fd10b" +checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" dependencies = [ "bitflags", - "clap_lex 0.4.0", + "clap_derive", + "clap_lex 0.3.2", "is-terminal", + "once_cell", "strsim", "termcolor", ] [[package]] name = "clap_complete" -version = "4.1.6" +version = "4.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40d3120a421cd111c43f1a6c7d0dd83bb6aaa0659c164468a1654014632a5ec6" +checksum = "501ff0a401473ea1d4c3b125ff95506b62c5bc5768d818634195fbb7c4ad5ff4" dependencies = [ - "clap 4.1.14", + "clap 4.1.8", ] [[package]] name = "clap_derive" -version = "4.1.14" +version = "4.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d7dc0031c3a59a04fc2ba395c8e2dd463cba1859275f065d225f6122221b45" +checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" dependencies = [ "heck", + "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.11", + "syn", ] [[package]] @@ -1231,9 +1217,12 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.4.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f0807fb6f644c83f3e4ec014fec9858c1c8b26a7db8eb5f0bde5817df9c1df7" +checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" +dependencies = [ + "os_str_bytes", +] [[package]] name = "codespan-reporting" @@ -1273,9 +1262,9 @@ checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" [[package]] name = "core-foundation" @@ -1313,9 +1302,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.6" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" dependencies = [ "libc", ] @@ -1536,7 +1525,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", "rand_core 0.6.4", "subtle", "zeroize", @@ -1548,7 +1537,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", "rand_core 0.6.4", "subtle", "zeroize", @@ -1560,7 +1549,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", "rand_core 0.6.4", "typenum", ] @@ -1571,7 +1560,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", "subtle", ] @@ -1581,7 +1570,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", "subtle", ] @@ -1592,7 +1581,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -1610,7 +1599,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.4.4", + "cipher 0.4.3", ] [[package]] @@ -1641,9 +1630,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-rc.1" +version = "4.0.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16" +checksum = "8da00a7a9a4eb92a0a0f8e75660926d48f0d0f3c537e455c457bcdaa1e16b1ac" dependencies = [ "cfg-if", "fiat-crypto", @@ -1655,9 +1644,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.94" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" +checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" dependencies = [ "cc", "cxxbridge-flags", @@ -1667,9 +1656,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.94" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" +checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" dependencies = [ "cc", "codespan-reporting", @@ -1677,31 +1666,31 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.11", + "syn", ] [[package]] name = "cxxbridge-flags" -version = "1.0.94" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" +checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" [[package]] name = "cxxbridge-macro" -version = "1.0.94" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" +checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" dependencies = [ "proc-macro2", "quote", - "syn 2.0.11", + "syn", ] [[package]] name = "darling" -version = "0.14.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8" dependencies = [ "darling_core", "darling_macro", @@ -1709,27 +1698,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 1.0.109", + "syn", ] [[package]] name = "darling_macro" -version = "0.14.4" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -1755,7 +1744,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn 1.0.109", + "syn", ] [[package]] @@ -1795,11 +1784,11 @@ dependencies = [ [[package]] name = "der-parser" -version = "8.2.0" +version = "8.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs 0.5.1", "displaydoc", "nom", "num-bigint", @@ -1815,7 +1804,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -1826,7 +1815,7 @@ checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -1847,7 +1836,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -1857,7 +1846,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" dependencies = [ "derive_builder_core", - "syn 1.0.109", + "syn", ] [[package]] @@ -1868,7 +1857,7 @@ checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -1898,7 +1887,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", ] [[package]] @@ -1961,7 +1950,7 @@ checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -1990,9 +1979,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.6" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" +checksum = "c00704156a7de8df8da0911424e30c2049957b0a714542a44e05fe693dd85313" [[package]] name = "dyn-clonable" @@ -2012,7 +2001,7 @@ checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -2099,7 +2088,7 @@ dependencies = [ "der 0.6.1", "digest 0.10.6", "ff 0.12.1", - "generic-array 0.14.7", + "generic-array 0.14.6", "group 0.12.1", "hkdf", "pem-rfc7468", @@ -2120,7 +2109,7 @@ dependencies = [ "crypto-bigint 0.5.1", "digest 0.10.6", "ff 0.13.0", - "generic-array 0.14.7", + "generic-array 0.14.6", "group 0.13.0", "pkcs8 0.10.1", "rand_core 0.6.4", @@ -2138,7 +2127,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -2158,7 +2147,7 @@ checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -2204,17 +2193,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "errno" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.45.0", -] - [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -2250,7 +2228,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -2305,9 +2283,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.19" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ace6ec7cc19c8ed33a32eaa9ea692d7faea05006b5356b9e2b668ec4bc3955" +checksum = "a214f5bb88731d436478f3ae1f8a277b62124089ba9fb67f4f93fb100ef73c90" [[package]] name = "file-per-thread-logger" @@ -2448,7 +2426,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.1.14", + "clap 4.1.8", "comfy-table", "frame-benchmarking", "frame-support", @@ -2513,7 +2491,7 @@ dependencies = [ "quote", "scale-info", "sp-arithmetic", - "syn 1.0.109", + "syn", "trybuild", ] @@ -2539,7 +2517,7 @@ dependencies = [ name = "frame-election-solution-type-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.1.14", + "clap 4.1.8", "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", @@ -2650,7 +2628,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -2661,7 +2639,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -2670,7 +2648,7 @@ version = "3.0.0" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -2814,9 +2792,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.27" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" dependencies = [ "futures-channel", "futures-core", @@ -2829,9 +2807,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" dependencies = [ "futures-core", "futures-sink", @@ -2839,15 +2817,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" [[package]] name = "futures-executor" -version = "0.3.27" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" +checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" dependencies = [ "futures-core", "futures-task", @@ -2857,9 +2835,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" [[package]] name = "futures-lite" @@ -2878,13 +2856,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -2900,15 +2878,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" [[package]] name = "futures-timer" @@ -2918,9 +2896,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" dependencies = [ "futures-channel", "futures-core", @@ -2967,9 +2945,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.7" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ "typenum", "version_check", @@ -3258,7 +3236,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.7", + "generic-array 0.14.6", "hmac 0.8.1", ] @@ -3333,9 +3311,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.25" +version = "0.14.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" +checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" dependencies = [ "bytes", "futures-channel", @@ -3372,16 +3350,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.54" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.46.0", + "winapi", ] [[package]] @@ -3447,7 +3425,7 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows 0.34.0", + "windows", ] [[package]] @@ -3476,14 +3454,14 @@ checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] name = "indexmap" -version = "1.9.3" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -3502,7 +3480,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", ] [[package]] @@ -3550,11 +3528,10 @@ checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "io-lifetimes" -version = "1.0.9" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" dependencies = [ - "hermit-abi 0.3.1", "libc", "windows-sys 0.45.0", ] @@ -3579,19 +3556,19 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.2" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "is-terminal" -version = "0.4.5" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" +checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" dependencies = [ "hermit-abi 0.3.1", - "io-lifetimes 1.0.9", - "rustix 0.36.11", + "io-lifetimes 1.0.5", + "rustix 0.36.8", "windows-sys 0.45.0", ] @@ -3606,9 +3583,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "jobserver" @@ -3701,7 +3678,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -3980,9 +3957,9 @@ checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "libp2p" -version = "0.50.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" +checksum = "2e0a0d2f693675f49ded13c5d510c48b78069e23cbd9108d7ccd59f6dc568819" dependencies = [ "bytes", "futures", @@ -3996,7 +3973,7 @@ dependencies = [ "libp2p-mdns", "libp2p-metrics", "libp2p-mplex", - "libp2p-noise", + "libp2p-noise 0.41.0", "libp2p-ping", "libp2p-quic", "libp2p-request-response", @@ -4048,30 +4025,36 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.39.1" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7f8b7d65c070a5a1b5f8f0510648189da08f787b8963f8e21219e0710733af" +checksum = "881d9a54e97d97cdaa4125d48269d97ca8c40e5fefec6b85b30440dc60cc551f" dependencies = [ + "asn1_der", + "bs58", + "ed25519-dalek", "either", "fnv", "futures", "futures-timer", "instant", - "libp2p-identity", "log", - "multiaddr 0.17.1", + "multiaddr 0.17.0", "multihash 0.17.0", "multistream-select", "once_cell", "parking_lot 0.12.1", "pin-project", - "quick-protobuf", + "prost", + "prost-build", "rand 0.8.5", "rw-stream-sink", + "sec1 0.3.0", + "sha2 0.10.6", "smallvec", "thiserror", "unsigned-varint", "void", + "zeroize", ] [[package]] @@ -4109,24 +4092,6 @@ dependencies = [ "void", ] -[[package]] -name = "libp2p-identity" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a8ea433ae0cea7e3315354305237b9897afe45278b2118a7a57ca744e70fd27" -dependencies = [ - "bs58", - "ed25519-dalek", - "log", - "multiaddr 0.17.1", - "multihash 0.17.0", - "prost", - "quick-protobuf", - "rand 0.8.5", - "thiserror", - "zeroize", -] - [[package]] name = "libp2p-kad" version = "0.42.1" @@ -4230,6 +4195,29 @@ dependencies = [ "zeroize", ] +[[package]] +name = "libp2p-noise" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1216f9ec823ac7a2289b954674c54cbce81c9e45920b4fcf173018ede4295246" +dependencies = [ + "bytes", + "curve25519-dalek 3.2.0", + "futures", + "libp2p-core 0.39.0", + "log", + "once_cell", + "prost", + "prost-build", + "rand 0.8.5", + "sha2 0.10.6", + "snow", + "static_assertions", + "thiserror", + "x25519-dalek 1.1.1", + "zeroize", +] + [[package]] name = "libp2p-ping" version = "0.41.0" @@ -4248,15 +4236,15 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.7.0-alpha" +version = "0.7.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" +checksum = "5971f629ff7519f4d4889a7c981f0dc09c6ad493423cd8a13ee442de241bc8c8" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.38.0", + "libp2p-core 0.39.0", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -4315,7 +4303,7 @@ checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" dependencies = [ "heck", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -4336,14 +4324,13 @@ dependencies = [ [[package]] name = "libp2p-tls" -version = "0.1.0" +version = "0.1.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" +checksum = "e9baf6f6292149e124ee737d9a79dbee783f29473fc368c7faad9d157841078a" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.1", - "libp2p-identity", + "libp2p-core 0.39.0", "rcgen 0.10.0", "ring", "rustls 0.20.8", @@ -4369,9 +4356,9 @@ dependencies = [ [[package]] name = "libp2p-webrtc" -version = "0.4.0-alpha" +version = "0.4.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" +checksum = "db4401ec550d36f413310ba5d4bf564bb21f89fb1601cadb32b2300f8bc1eb5b" dependencies = [ "async-trait", "asynchronous-codec", @@ -4380,10 +4367,10 @@ dependencies = [ "futures-timer", "hex", "if-watch", - "libp2p-core 0.38.0", - "libp2p-noise", + "libp2p-core 0.39.0", + "libp2p-noise 0.42.0", "log", - "multihash 0.16.3", + "multihash 0.17.0", "prost", "prost-build", "prost-codec", @@ -4551,12 +4538,6 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" -[[package]] -name = "linux-raw-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd550e73688e6d578f0ac2119e32b797a327631a42f9433e59d02e139c8df60d" - [[package]] name = "lite-json" version = "0.2.0" @@ -4701,7 +4682,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" dependencies = [ - "rustix 0.36.11", + "rustix 0.36.8", ] [[package]] @@ -4835,29 +4816,29 @@ dependencies = [ [[package]] name = "mockall" -version = "0.11.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +checksum = "50e4a1c770583dac7ab5e2f6c139153b783a53a1bbee9729613f193e59828326" dependencies = [ "cfg-if", "downcast", "fragile", "lazy_static", "mockall_derive", - "predicates 2.1.5", + "predicates", "predicates-tree", ] [[package]] name = "mockall_derive" -version = "0.11.4" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +checksum = "832663583d5fa284ca8810bf7015e46c9fff9622d3cf34bd1eea5003fec06dd0" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -4880,14 +4861,13 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.17.1" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" +checksum = "3b53e0cc5907a5c216ba6584bf74be8ab47d6d6289f72793b2dddbf15dc3bf8c" dependencies = [ "arrayref", "byteorder", "data-encoding", - "log", "multibase", "multihash 0.17.0", "percent-encoding", @@ -4948,7 +4928,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn", "synstructure", ] @@ -4974,9 +4954,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.2" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511" +checksum = "f6515c882ebfddccaa73ead7320ca28036c4bc84c9bcca3cc0cbba8efe89223a" dependencies = [ "approx", "matrixmultiply", @@ -4996,7 +4976,7 @@ checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -5063,9 +5043,9 @@ dependencies = [ [[package]] name = "netlink-sys" -version = "0.8.5" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" +checksum = "260e21fbb6f3d253a14df90eb0000a6066780a15dd901a7519ce02d77a94985b" dependencies = [ "bytes", "futures", @@ -5105,7 +5085,7 @@ name = "node-bench" version = "0.9.0-dev" dependencies = [ "array-bytes", - "clap 4.1.14", + "clap 4.1.8", "derive_more", "fs_extra", "futures", @@ -5142,7 +5122,7 @@ version = "3.0.0-dev" dependencies = [ "array-bytes", "assert_cmd", - "clap 4.1.14", + "clap 4.1.8", "clap_complete", "criterion", "frame-benchmarking-cli", @@ -5263,7 +5243,7 @@ dependencies = [ name = "node-inspect" version = "0.9.0-dev" dependencies = [ - "clap 4.1.14", + "clap 4.1.8", "parity-scale-codec", "sc-cli", "sc-client-api", @@ -5322,7 +5302,7 @@ dependencies = [ name = "node-runtime-generate-bags" version = "3.0.0" dependencies = [ - "clap 4.1.14", + "clap 4.1.8", "generate-bags", "kitchensink-runtime", ] @@ -5331,7 +5311,7 @@ dependencies = [ name = "node-template" version = "4.0.0-dev" dependencies = [ - "clap 4.1.14", + "clap 4.1.8", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", @@ -5582,7 +5562,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs 0.5.1", ] [[package]] @@ -5617,9 +5597,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "os_str_bytes" -version = "6.5.0" +version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" +checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] name = "output_vt100" @@ -6044,7 +6024,7 @@ version = "4.0.0-dev" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -6927,7 +6907,7 @@ dependencies = [ "proc-macro2", "quote", "sp-runtime", - "syn 1.0.109", + "syn", ] [[package]] @@ -7235,7 +7215,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -7306,9 +7286,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.12" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" [[package]] name = "pbkdf2" @@ -7360,9 +7340,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.6" +version = "2.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7" +checksum = "028accff104c4e513bad663bbcd2ad7cfd5304144404c31ed0a77ac103d00660" dependencies = [ "thiserror", "ucd-trie", @@ -7370,9 +7350,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.6" +version = "2.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7" +checksum = "2ac3922aac69a40733080f53c1ce7f91dcf57e1a5f6c52f421fadec7fbdc4b69" dependencies = [ "pest", "pest_generator", @@ -7380,22 +7360,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.6" +version = "2.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b" +checksum = "d06646e185566b5961b4058dd107e0a7f56e77c3f484549fb119867773c0f202" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] name = "pest_meta" -version = "2.5.6" +version = "2.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80" +checksum = "e6f60b2ba541577e2a0c307c8f39d1439108120eb7903adeb6497fa880c59616" dependencies = [ "once_cell", "pest", @@ -7429,7 +7409,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -7518,18 +7498,16 @@ dependencies = [ [[package]] name = "polling" -version = "2.6.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa" +checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" dependencies = [ "autocfg", - "bitflags", "cfg-if", - "concurrent-queue", "libc", "log", - "pin-project-lite 0.2.9", - "windows-sys 0.45.0", + "wepoll-ffi", + "windows-sys 0.42.0", ] [[package]] @@ -7587,29 +7565,17 @@ dependencies = [ "regex", ] -[[package]] -name = "predicates" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c575290b64d24745b6c57a12a31465f0a66f3a4799686a6921526a33b0797965" -dependencies = [ - "anstyle", - "difflib", - "itertools", - "predicates-core", -] - [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" dependencies = [ "predicates-core", "termtree", @@ -7629,12 +7595,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.1.25" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" +checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78" dependencies = [ "proc-macro2", - "syn 1.0.109", + "syn", ] [[package]] @@ -7669,7 +7635,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", + "syn", "version_check", ] @@ -7686,9 +7652,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.54" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e472a104799c74b514a57226160104aa483546de37e839ec50e3c2e41dd87534" +checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" dependencies = [ "unicode-ident", ] @@ -7727,7 +7693,7 @@ checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -7757,7 +7723,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 1.0.109", + "syn", "tempfile", "which", ] @@ -7785,7 +7751,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -7812,15 +7778,6 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-protobuf" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" -dependencies = [ - "byteorder", -] - [[package]] name = "quickcheck" version = "1.0.3" @@ -7843,9 +7800,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.3" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" +checksum = "72ef4ced82a24bb281af338b9e8f94429b6eca01b4e66d899f40031f074e74c9" dependencies = [ "bytes", "rand 0.8.5", @@ -7861,9 +7818,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] @@ -7972,9 +7929,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.7.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ "either", "rayon-core", @@ -7982,9 +7939,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.11.0" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" +checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -8039,22 +7996,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.16" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" +checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.16" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" +checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.11", + "syn", ] [[package]] @@ -8071,9 +8028,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.3" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ "aho-corasick", "memchr", @@ -8091,9 +8048,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "region" @@ -8226,9 +8183,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.22" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" +checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "rustc-hash" @@ -8257,7 +8214,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.17", + "semver 1.0.16", ] [[package]] @@ -8276,7 +8233,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" dependencies = [ "bitflags", - "errno 0.2.8", + "errno", "io-lifetimes 0.7.5", "libc", "linux-raw-sys 0.0.46", @@ -8285,32 +8242,18 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.11" +version = "0.36.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" +checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" dependencies = [ "bitflags", - "errno 0.2.8", - "io-lifetimes 1.0.9", + "errno", + "io-lifetimes 1.0.5", "libc", "linux-raw-sys 0.1.4", "windows-sys 0.45.0", ] -[[package]] -name = "rustix" -version = "0.37.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c348b5dc624ecee40108aa2922fed8bad89d7fcc2b9f8cb18f632898ac4a37f9" -dependencies = [ - "bitflags", - "errno 0.3.0", - "io-lifetimes 1.0.9", - "libc", - "linux-raw-sys 0.3.0", - "windows-sys 0.45.0", -] - [[package]] name = "rustls" version = "0.19.1" @@ -8359,9 +8302,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" [[package]] name = "rusty-fork" @@ -8387,9 +8330,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] name = "safe-mix" @@ -8524,7 +8467,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -8533,7 +8476,7 @@ version = "0.10.0-dev" dependencies = [ "array-bytes", "chrono", - "clap 4.1.14", + "clap 4.1.8", "fdlimit", "futures", "futures-timer", @@ -9073,7 +9016,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "paste", - "rustix 0.36.11", + "rustix 0.36.8", "sc-allocator", "sc-executor-common", "sc-runtime-test", @@ -9647,7 +9590,7 @@ dependencies = [ name = "sc-storage-monitor" version = "0.1.0" dependencies = [ - "clap 4.1.14", + "clap 4.1.8", "fs4", "futures", "log", @@ -9751,7 +9694,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -9819,9 +9762,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.4.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61471dff9096de1d8b2319efed7162081e96793f5ebb147e50db10d50d648a4d" +checksum = "001cf62ece89779fd16105b5f515ad0e5cedcd5440d3dd806bb067978e7c3608" dependencies = [ "bitvec", "cfg-if", @@ -9833,14 +9776,14 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.4.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219580e803a66b3f05761fd06f1f879a872444e49ce23f73694d26e5a954c7e6" +checksum = "303959cf613a6f6efd19ed4b4ad5bf79966a13352716299ad532cfb115f4205c" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -9889,9 +9832,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.5" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" [[package]] name = "sct" @@ -9933,7 +9876,7 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct 0.1.1", "der 0.6.1", - "generic-array 0.14.7", + "generic-array 0.14.6", "pkcs8 0.9.0", "subtle", "zeroize", @@ -9947,7 +9890,7 @@ checksum = "48518a2b5775ba8ca5b46596aae011caa431e6ce7e4a67ead66d92f08884220e" dependencies = [ "base16ct 0.2.0", "der 0.7.1", - "generic-array 0.14.7", + "generic-array 0.14.6", "pkcs8 0.10.1", "subtle", "zeroize", @@ -10023,9 +9966,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.17" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" dependencies = [ "serde", ] @@ -10038,29 +9981,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.159" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.159" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.11", + "syn", ] [[package]] name = "serde_json" -version = "1.0.95" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" +checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" dependencies = [ "itoa", "ryu", @@ -10229,14 +10172,14 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733" +checksum = "12ba5f4d4ff12bdb6a169ed51b7c48c0e0ac4b0b4b31012b2571e97d78d3201d" dependencies = [ "aes-gcm 0.9.4", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-rc.1", + "curve25519-dalek 4.0.0-rc.0", "rand_core 0.6.4", "ring", "rustc_version 0.4.0", @@ -10246,9 +10189,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.9" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", "winapi", @@ -10299,7 +10242,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -10609,7 +10552,7 @@ dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn 1.0.109", + "syn", ] [[package]] @@ -10626,7 +10569,7 @@ version = "5.0.0" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -10750,7 +10693,7 @@ dependencies = [ name = "sp-npos-elections-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.1.14", + "clap 4.1.8", "honggfuzz", "parity-scale-codec", "rand 0.8.5", @@ -10845,7 +10788,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -11069,7 +11012,7 @@ dependencies = [ "proc-macro2", "quote", "sp-version", - "syn 1.0.109", + "syn", ] [[package]] @@ -11107,9 +11050,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.7" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0959fd6f767df20b231736396e4f602171e00d95205676286e79d4a4eb67bef" +checksum = "7dccf47db1b41fa1573ed27ccf5e08e3ca771cb994f776668c5ebda893b248fc" [[package]] name = "spki" @@ -11183,7 +11126,7 @@ dependencies = [ "memchr", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -11211,7 +11154,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 1.0.109", + "syn", ] [[package]] @@ -11237,7 +11180,7 @@ dependencies = [ name = "subkey" version = "3.0.0" dependencies = [ - "clap 4.1.14", + "clap 4.1.8", "sc-cli", ] @@ -11265,7 +11208,7 @@ dependencies = [ name = "substrate-frame-cli" version = "4.0.0-dev" dependencies = [ - "clap 4.1.14", + "clap 4.1.8", "frame-support", "frame-system", "sc-cli", @@ -11481,7 +11424,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -11535,17 +11478,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "syn" -version = "2.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e3787bb71465627110e7d87ed4faaa36c1f61042ee67badb9e2ef173accc40" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "synstructure" version = "0.12.6" @@ -11554,7 +11486,7 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", "unicode-xid", ] @@ -11600,7 +11532,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall", - "rustix 0.36.11", + "rustix 0.36.8", "windows-sys 0.42.0", ] @@ -11615,9 +11547,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" +checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" [[package]] name = "textwrap" @@ -11627,22 +11559,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.40" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.40" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.11", + "syn", ] [[package]] @@ -11773,13 +11705,14 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.27.0" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" +checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" dependencies = [ "autocfg", "bytes", "libc", + "memchr", "mio", "num_cpus", "parking_lot 0.12.1", @@ -11787,18 +11720,18 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.42.0", ] [[package]] name = "tokio-macros" -version = "2.0.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" +checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.11", + "syn", ] [[package]] @@ -11923,7 +11856,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", ] [[package]] @@ -12113,7 +12046,7 @@ name = "try-runtime-cli" version = "0.10.0-dev" dependencies = [ "async-trait", - "clap 4.1.14", + "clap 4.1.8", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -12147,9 +12080,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.80" +version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501dbdbb99861e4ab6b60eb6a7493956a9defb644fd034bc4a5ef27c693c8a3a" +checksum = "a44da5a6f2164c8e14d3bbc0657d69c5966af9f5f6930d4f600b1f5c4a673413" dependencies = [ "basic-toml", "dissimilar", @@ -12224,15 +12157,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "unicode-normalization" @@ -12261,7 +12194,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.7", + "generic-array 0.14.6", "subtle", ] @@ -12363,11 +12296,12 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", + "winapi", "winapi-util", ] @@ -12420,7 +12354,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn", "wasm-bindgen-shared", ] @@ -12454,7 +12388,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -12467,9 +12401,9 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-encoder" -version = "0.25.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eff853c4f09eec94d76af527eddad4e9de13b11d6286a1ef7134bc30135a2b7" +checksum = "68f7d56227d910901ce12dfd19acc40c12687994dfb3f57c90690f80be946ec5" dependencies = [ "leb128", ] @@ -12565,7 +12499,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e61a7006b0fdf24f6bbe8dcfdad5ca1b350de80061fb2827f31c82fbbb9565a" dependencies = [ - "spin 0.9.7", + "spin 0.9.5", "wasmi_arena", "wasmi_core 0.12.0", "wasmparser-nostd", @@ -12680,7 +12614,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.11", + "rustix 0.36.8", "serde", "sha2 0.10.6", "toml", @@ -12760,7 +12694,7 @@ checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.36.11", + "rustix 0.36.8", ] [[package]] @@ -12791,7 +12725,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.36.11", + "rustix 0.36.8", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -12812,9 +12746,9 @@ dependencies = [ [[package]] name = "wast" -version = "55.0.0" +version = "54.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4984d3e1406571f4930ba5cf79bd70f75f41d0e87e17506e0bd19b0e5d085f05" +checksum = "3d48d9d731d835f4f8dacbb8de7d47be068812cb9877f5c60d408858778d8d2a" dependencies = [ "leb128", "memchr", @@ -12824,9 +12758,9 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.61" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2b53f4da14db05d32e70e9c617abdf6620c575bd5dd972b7400037b4df2091" +checksum = "d1db2e3ed05ea31243761439194bec3af6efbbaf87c4c8667fb879e4f23791a0" dependencies = [ "wast", ] @@ -12940,7 +12874,7 @@ dependencies = [ "byteorder", "ccm", "curve25519-dalek 3.2.0", - "der-parser 8.2.0", + "der-parser 8.1.0", "elliptic-curve 0.12.3", "hkdf", "hmac 0.12.1", @@ -13082,6 +13016,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "wepoll-ffi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" +dependencies = [ + "cc", +] + [[package]] name = "which" version = "4.4.0" @@ -13153,15 +13096,6 @@ dependencies = [ "windows_x86_64_msvc 0.34.0", ] -[[package]] -name = "windows" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" -dependencies = [ - "windows-targets", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -13169,12 +13103,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.2", + "windows_x86_64_msvc 0.42.1", ] [[package]] @@ -13188,24 +13122,24 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.42.2" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", + "windows_aarch64_msvc 0.42.1", + "windows_i686_gnu 0.42.1", + "windows_i686_msvc 0.42.1", + "windows_x86_64_gnu 0.42.1", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.2", + "windows_x86_64_msvc 0.42.1", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.2" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" [[package]] name = "windows_aarch64_msvc" @@ -13215,9 +13149,9 @@ checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" [[package]] name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" [[package]] name = "windows_i686_gnu" @@ -13227,9 +13161,9 @@ checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" [[package]] name = "windows_i686_gnu" -version = "0.42.2" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" [[package]] name = "windows_i686_msvc" @@ -13239,9 +13173,9 @@ checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" [[package]] name = "windows_i686_msvc" -version = "0.42.2" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" [[package]] name = "windows_x86_64_gnu" @@ -13251,15 +13185,15 @@ checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" [[package]] name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" [[package]] name = "windows_x86_64_msvc" @@ -13269,9 +13203,9 @@ checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" [[package]] name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "winreg" @@ -13338,10 +13272,10 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.2", + "asn1-rs 0.5.1", "base64 0.13.1", "data-encoding", - "der-parser 8.2.0", + "der-parser 8.1.0", "lazy_static", "nom", "oid-registry 0.6.1", @@ -13381,22 +13315,23 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.6.0" +version = "1.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.4.1" +version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25588073e5216b50bca71d61cb8595cdb9745e87032a58c199730def2862c934" +checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.11", + "syn", + "synstructure", ] [[package]] From bc5214332d1b03597bd1d0b5610faf7b0fae74e1 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Wed, 29 Mar 2023 10:08:39 +0200 Subject: [PATCH 17/35] Application-crypto provides bls381 --- client/keystore/src/local.rs | 16 +++++----- .../src/{bls377.rs => bls381.rs} | 4 +-- primitives/application-crypto/src/lib.rs | 2 +- primitives/keystore/src/lib.rs | 30 +++++++++---------- primitives/keystore/src/testing.rs | 26 ++++++++-------- 5 files changed, 39 insertions(+), 39 deletions(-) rename primitives/application-crypto/src/{bls377.rs => bls381.rs} (96%) diff --git a/client/keystore/src/local.rs b/client/keystore/src/local.rs index 28fe7099e3e95..3da4c4b6c8779 100644 --- a/client/keystore/src/local.rs +++ b/client/keystore/src/local.rs @@ -20,7 +20,7 @@ use parking_lot::RwLock; use sp_application_crypto::{AppCrypto, AppPair, IsWrappedBy}; use sp_core::{ - bls377, + bls381, crypto::{ByteArray, ExposeSecret, KeyTypeId, Pair as CorePair, SecretString}, ecdsa, ed25519, sr25519, }; @@ -231,27 +231,27 @@ impl Keystore for LocalKeystore { Ok(res) } - fn bls377_public_keys(&self, _key_type: KeyTypeId) -> Vec { + fn bls381_public_keys(&self, _key_type: KeyTypeId) -> Vec { unimplemented!() } - /// Generate a new pair compatible with the 'bls377' signature scheme. + /// Generate a new pair compatible with the 'bls381' signature scheme. /// /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. - fn bls377_generate_new( + fn bls381_generate_new( &self, _key_type: KeyTypeId, _seed: Option<&str>, - ) -> std::result::Result { + ) -> std::result::Result { unimplemented!() } - fn bls377_sign( + fn bls381_sign( &self, _key_type: KeyTypeId, - _public: &bls377::Public, + _public: &bls381::Public, _msg: &[u8], - ) -> std::result::Result, TraitError> { + ) -> std::result::Result, TraitError> { unimplemented!() } diff --git a/primitives/application-crypto/src/bls377.rs b/primitives/application-crypto/src/bls381.rs similarity index 96% rename from primitives/application-crypto/src/bls377.rs rename to primitives/application-crypto/src/bls381.rs index 2983eefd163d7..e9de68f7ce4ce 100644 --- a/primitives/application-crypto/src/bls377.rs +++ b/primitives/application-crypto/src/bls381.rs @@ -15,13 +15,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! BLS12-377 crypto applications. +//! BLS12-381 crypto applications. use crate::{KeyTypeId, RuntimePublic}; use sp_std::vec::Vec; -pub use sp_core::bls::bls377::*; +pub use sp_core::bls::bls381::*; mod app { use sp_core::testing::BLS377; diff --git a/primitives/application-crypto/src/lib.rs b/primitives/application-crypto/src/lib.rs index dd9a7446766b8..be71daaf31dfc 100644 --- a/primitives/application-crypto/src/lib.rs +++ b/primitives/application-crypto/src/lib.rs @@ -41,7 +41,7 @@ pub use serde; #[doc(hidden)] pub use sp_std::{ops::Deref, vec::Vec}; -pub mod bls377; +pub mod bls381; pub mod ecdsa; pub mod ed25519; pub mod sr25519; diff --git a/primitives/keystore/src/lib.rs b/primitives/keystore/src/lib.rs index 23459644d0f7f..1973c779030a7 100644 --- a/primitives/keystore/src/lib.rs +++ b/primitives/keystore/src/lib.rs @@ -21,7 +21,7 @@ pub mod vrf; use crate::vrf::{VRFSignature, VRFTranscriptData}; use sp_core::{ - bls377, + bls381, crypto::{ByteArray, CryptoTypeId, KeyTypeId}, ecdsa, ed25519, sr25519, }; @@ -164,32 +164,32 @@ pub trait Keystore: Send + Sync { ) -> Result, Error>; /// Returns all bls public keys for the given key type. - fn bls377_public_keys(&self, id: KeyTypeId) -> Vec; + fn bls381_public_keys(&self, id: KeyTypeId) -> Vec; - /// Generate a new bls377 key pair for the given key type and an optional seed. + /// Generate a new bls381 key pair for the given key type and an optional seed. /// - /// Returns an `bls377::Public` key of the generated key pair or an `Err` if + /// Returns an `bls381::Public` key of the generated key pair or an `Err` if /// something failed during key generation. - fn bls377_generate_new( + fn bls381_generate_new( &self, key_type: KeyTypeId, seed: Option<&str>, - ) -> Result; + ) -> Result; - /// Generate a bls377 signature for a given message. + /// Generate a bls381 signature for a given message. /// - /// Receives [`KeyTypeId`] and a [`bls377::Public`] key to be able to map + /// Receives [`KeyTypeId`] and a [`bls381::Public`] key to be able to map /// them to a private key that exists in the keystore. /// - /// Returns an [`bls377::Signature`] or `None` in case the given `key_type` + /// Returns an [`bls381::Signature`] or `None` in case the given `key_type` /// and `public` combination doesn't exist in the keystore. /// An `Err` will be returned if generating the signature itself failed. - fn bls377_sign( + fn bls381_sign( &self, key_type: KeyTypeId, - public: &bls377::Public, + public: &bls381::Public, msg: &[u8], - ) -> Result, Error>; + ) -> Result, Error>; /// Insert a new secret key. fn insert(&self, key_type: KeyTypeId, suri: &str, public: &[u8]) -> Result<(), ()>; @@ -239,10 +239,10 @@ pub trait Keystore: Send + Sync { .map_err(|_| Error::ValidationError("Invalid public key format".into()))?; self.ecdsa_sign(id, &public, msg)?.map(|s| s.encode()) }, - bls377::CRYPTO_ID => { - let public = bls377::Public::from_slice(public) + bls381::CRYPTO_ID => { + let public = bls381::Public::from_slice(public) .map_err(|_| Error::ValidationError("Invalid public key format".into()))?; - self.bls377_sign(id, &public, msg)?.map(|s| s.encode()) + self.bls381_sign(id, &public, msg)?.map(|s| s.encode()) }, _ => return Err(Error::KeyNotSupported(id)), }; diff --git a/primitives/keystore/src/testing.rs b/primitives/keystore/src/testing.rs index 521103f92e276..b418790c8ba43 100644 --- a/primitives/keystore/src/testing.rs +++ b/primitives/keystore/src/testing.rs @@ -18,7 +18,7 @@ //! Types that should only be used for testing! use sp_core::{ - bls377, + bls381, crypto::{ByteArray, KeyTypeId, Pair}, ecdsa, ed25519, sr25519, }; @@ -76,11 +76,11 @@ impl MemoryKeystore { }) } - fn bls377_key_pair(&self, id: KeyTypeId, pub_key: &bls377::Public) -> Option { + fn bls381_key_pair(&self, id: KeyTypeId, pub_key: &bls381::Public) -> Option { self.keys.read().get(&id).and_then(|inner| { inner .get(pub_key.as_slice()) - .map(|s| bls377::Pair::from_string(s, None).expect("`bls` seed slice is valid")) + .map(|s| bls381::Pair::from_string(s, None).expect("`bls` seed slice is valid")) }) } } @@ -268,27 +268,27 @@ impl Keystore for MemoryKeystore { pair.map(|pair| pair.sign_prehashed(msg)).map(Ok).transpose() } - fn bls377_public_keys(&self, key_type: KeyTypeId) -> Vec { + fn bls381_public_keys(&self, key_type: KeyTypeId) -> Vec { self.keys .read() .get(&key_type) .map(|keys| { keys.values() - .map(|s| bls377::Pair::from_string(s, None).expect("`bls` seed slice is valid")) + .map(|s| bls381::Pair::from_string(s, None).expect("`bls` seed slice is valid")) .map(|p| p.public()) .collect() }) .unwrap_or_default() } - fn bls377_generate_new( + fn bls381_generate_new( &self, key_type: KeyTypeId, seed: Option<&str>, - ) -> Result { + ) -> Result { match seed { Some(seed) => { - let pair = bls377::Pair::from_string(seed, None) + let pair = bls381::Pair::from_string(seed, None) .map_err(|_| Error::ValidationError("Generates an `bls` pair.".to_owned()))?; self.keys .write() @@ -298,7 +298,7 @@ impl Keystore for MemoryKeystore { Ok(pair.public()) }, None => { - let (pair, phrase, _) = bls377::Pair::generate_with_phrase(None); + let (pair, phrase, _) = bls381::Pair::generate_with_phrase(None); self.keys .write() .entry(key_type) @@ -309,13 +309,13 @@ impl Keystore for MemoryKeystore { } } - fn bls377_sign( + fn bls381_sign( &self, key_type: KeyTypeId, - public: &bls377::Public, + public: &bls381::Public, msg: &[u8], - ) -> Result, Error> { - Ok(self.bls377_key_pair(key_type, public).map(|pair| pair.sign(msg))) + ) -> Result, Error> { + Ok(self.bls381_key_pair(key_type, public).map(|pair| pair.sign(msg))) } fn insert(&self, key_type: KeyTypeId, suri: &str, public: &[u8]) -> Result<(), ()> { From 0acdf5c98cfe457f38e5ddf744f00e22e37e3bc1 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Wed, 29 Mar 2023 16:04:37 +0200 Subject: [PATCH 18/35] Implement bls381 for local keystore --- Cargo.lock | 1 - client/keystore/Cargo.toml | 1 - client/keystore/src/local.rs | 40 ++++++++++++++++++++++++++++-------- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3b8ae2e78b732..890da0a33f121 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9077,7 +9077,6 @@ name = "sc-keystore" version = "4.0.0-dev" dependencies = [ "array-bytes", - "async-trait", "parking_lot 0.12.1", "serde_json", "sp-application-crypto", diff --git a/client/keystore/Cargo.toml b/client/keystore/Cargo.toml index 8766ee80157e9..f98528cc74589 100644 --- a/client/keystore/Cargo.toml +++ b/client/keystore/Cargo.toml @@ -15,7 +15,6 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] array-bytes = "4.1" -async-trait = "0.1.57" parking_lot = "0.12.1" serde_json = "1.0.85" thiserror = "1.0" diff --git a/client/keystore/src/local.rs b/client/keystore/src/local.rs index 3da4c4b6c8779..4d1eea6d02ca9 100644 --- a/client/keystore/src/local.rs +++ b/client/keystore/src/local.rs @@ -231,8 +231,16 @@ impl Keystore for LocalKeystore { Ok(res) } - fn bls381_public_keys(&self, _key_type: KeyTypeId) -> Vec { - unimplemented!() + fn bls381_public_keys(&self, key_type: KeyTypeId) -> Vec { + self.0 + .read() + .raw_public_keys(key_type) + .map(|v| { + v.into_iter() + .filter_map(|k| bls381::Public::from_slice(k.as_slice()).ok()) + .collect() + }) + .unwrap_or_default() } /// Generate a new pair compatible with the 'bls381' signature scheme. @@ -240,19 +248,33 @@ impl Keystore for LocalKeystore { /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. fn bls381_generate_new( &self, - _key_type: KeyTypeId, - _seed: Option<&str>, + key_type: KeyTypeId, + seed: Option<&str>, ) -> std::result::Result { - unimplemented!() + let pair = match seed { + Some(seed) => self + .0 + .write() + .insert_ephemeral_from_seed_by_type::(seed, key_type), + None => self.0.write().generate_by_type::(key_type), + } + .map_err(|e| -> TraitError { e.into() })?; + + Ok(pair.public()) } fn bls381_sign( &self, - _key_type: KeyTypeId, - _public: &bls381::Public, - _msg: &[u8], + key_type: KeyTypeId, + public: &bls381::Public, + msg: &[u8], ) -> std::result::Result, TraitError> { - unimplemented!() + let res = self + .0 + .read() + .key_pair_by_type::(public, key_type)? + .map(|pair| pair.sign(msg)); + Ok(res) } fn insert( From 9de1515c1116aeb2d0826f7f2390a34faf6d8886 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 30 Mar 2023 10:44:28 +0200 Subject: [PATCH 19/35] Use new generic keystore features --- client/keystore/src/local.rs | 28 ++-------------- primitives/application-crypto/src/bls381.rs | 36 +-------------------- primitives/keystore/src/lib.rs | 7 +++- primitives/keystore/src/testing.rs | 33 ++----------------- 4 files changed, 12 insertions(+), 92 deletions(-) diff --git a/client/keystore/src/local.rs b/client/keystore/src/local.rs index aab154a036158..48dd84934e2d2 100644 --- a/client/keystore/src/local.rs +++ b/client/keystore/src/local.rs @@ -205,15 +205,7 @@ impl Keystore for LocalKeystore { } fn bls381_public_keys(&self, key_type: KeyTypeId) -> Vec { - self.0 - .read() - .raw_public_keys(key_type) - .map(|v| { - v.into_iter() - .filter_map(|k| bls381::Public::from_slice(k.as_slice()).ok()) - .collect() - }) - .unwrap_or_default() + self.public_keys::(key_type) } /// Generate a new pair compatible with the 'bls381' signature scheme. @@ -224,16 +216,7 @@ impl Keystore for LocalKeystore { key_type: KeyTypeId, seed: Option<&str>, ) -> std::result::Result { - let pair = match seed { - Some(seed) => self - .0 - .write() - .insert_ephemeral_from_seed_by_type::(seed, key_type), - None => self.0.write().generate_by_type::(key_type), - } - .map_err(|e| -> TraitError { e.into() })?; - - Ok(pair.public()) + self.generate_new::(key_type, seed) } fn bls381_sign( @@ -242,12 +225,7 @@ impl Keystore for LocalKeystore { public: &bls381::Public, msg: &[u8], ) -> std::result::Result, TraitError> { - let res = self - .0 - .read() - .key_pair_by_type::(public, key_type)? - .map(|pair| pair.sign(msg)); - Ok(res) + self.sign::(key_type, public, msg) } fn insert( diff --git a/primitives/application-crypto/src/bls381.rs b/primitives/application-crypto/src/bls381.rs index 9c0bd87fdcdb6..d990f2e14c8e6 100644 --- a/primitives/application-crypto/src/bls381.rs +++ b/primitives/application-crypto/src/bls381.rs @@ -17,46 +17,12 @@ //! BLS12-381 crypto applications. -use crate::{KeyTypeId, RuntimePublic}; - -use sp_std::vec::Vec; - pub use sp_core::bls::bls381::*; mod app { - use sp_core::testing::BLS381; - - crate::app_crypto!(super, BLS381); - - impl crate::traits::BoundToRuntimeAppPublic for Public { - type Public = Self; - } + crate::app_crypto!(super, sp_core::testing::BLS381); } #[cfg(feature = "full_crypto")] pub use app::Pair as AppPair; pub use app::{Public as AppPublic, Signature as AppSignature}; - -impl RuntimePublic for Public { - type Signature = Signature; - - fn all(_key_type: KeyTypeId) -> crate::Vec { - unreachable!("no access to the host keystore from runtime") - } - - fn generate_pair(_key_type: KeyTypeId, _seed: Option>) -> Self { - unreachable!("no access to the host keystore from runtime") - } - - fn sign>(&self, _key_type: KeyTypeId, _msg: &M) -> Option { - unreachable!("no access to the host keystore from runtime") - } - - fn verify>(&self, _msg: &M, _signature: &Self::Signature) -> bool { - unreachable!("no access to the host keystore from runtime") - } - - fn to_raw_vec(&self) -> Vec { - sp_core::crypto::ByteArray::to_raw_vec(self) - } -} diff --git a/primitives/keystore/src/lib.rs b/primitives/keystore/src/lib.rs index 1973c779030a7..2b670ddf14782 100644 --- a/primitives/keystore/src/lib.rs +++ b/primitives/keystore/src/lib.rs @@ -209,7 +209,12 @@ pub trait Keystore: Send + Sync { /// /// The message is signed using the cryptographic primitive specified by `crypto_id`. /// - /// Schemes supported by the default trait implementation: sr25519, ed25519 and ecdsa. + /// Schemes supported by the default trait implementation: + /// - sr25519 + /// - ed25519 + /// - ecdsa + /// - bls381. + /// /// To support more schemes you can overwrite this method. /// /// Returns the SCALE encoded signature if key is found and supported, `None` if the key doesn't diff --git a/primitives/keystore/src/testing.rs b/primitives/keystore/src/testing.rs index ad63f411ce998..9ec32cc69e6d0 100644 --- a/primitives/keystore/src/testing.rs +++ b/primitives/keystore/src/testing.rs @@ -193,16 +193,7 @@ impl Keystore for MemoryKeystore { } fn bls381_public_keys(&self, key_type: KeyTypeId) -> Vec { - self.keys - .read() - .get(&key_type) - .map(|keys| { - keys.values() - .map(|s| bls381::Pair::from_string(s, None).expect("`bls` seed slice is valid")) - .map(|p| p.public()) - .collect() - }) - .unwrap_or_default() + self.public_keys::(key_type) } fn bls381_generate_new( @@ -210,27 +201,7 @@ impl Keystore for MemoryKeystore { key_type: KeyTypeId, seed: Option<&str>, ) -> Result { - match seed { - Some(seed) => { - let pair = bls381::Pair::from_string(seed, None) - .map_err(|_| Error::ValidationError("Generates an `bls` pair.".to_owned()))?; - self.keys - .write() - .entry(key_type) - .or_default() - .insert(pair.public().to_raw_vec(), seed.into()); - Ok(pair.public()) - }, - None => { - let (pair, phrase, _) = bls381::Pair::generate_with_phrase(None); - self.keys - .write() - .entry(key_type) - .or_default() - .insert(pair.public().to_raw_vec(), phrase); - Ok(pair.public()) - }, - } + self.generate_new::(key_type, seed) } fn bls381_sign( From 267538fdc4de127adbd1a0c1f11e86f5aca6fc41 Mon Sep 17 00:00:00 2001 From: Skalman Date: Tue, 4 Apr 2023 02:13:32 -0400 Subject: [PATCH 20/35] import DoublePublickey[Scheme] from the bls-like root to be less confusing. --- Cargo.lock | 1117 +++++++++++++++++++++--------------- primitives/core/src/bls.rs | 7 +- 2 files changed, 654 insertions(+), 470 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 890da0a33f121..6cc005c50ce4c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -51,18 +51,18 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", ] [[package]] name = "aead" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common", - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -95,7 +95,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" dependencies = [ "cfg-if", - "cipher 0.4.3", + "cipher 0.4.4", "cpufeatures", ] @@ -119,9 +119,9 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" dependencies = [ - "aead 0.5.1", + "aead 0.5.2", "aes 0.8.2", - "cipher 0.4.3", + "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", "subtle", @@ -203,11 +203,51 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-wincon", + "concolor-override", + "concolor-query", + "is-terminal", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" + +[[package]] +name = "anstyle-parse" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-wincon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa" +dependencies = [ + "anstyle", + "windows-sys 0.45.0", +] + [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "approx" @@ -297,7 +337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -310,7 +350,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -346,7 +386,7 @@ checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -367,9 +407,9 @@ checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" @@ -401,9 +441,9 @@ dependencies = [ [[package]] name = "asn1-rs" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6690c370453db30743b373a60ba498fc0d6d83b11f4abfd87a84a075db5dd4" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ "asn1-rs-derive 0.4.0", "asn1-rs-impl", @@ -423,7 +463,7 @@ checksum = "db8b7511298d5b7784b40b092d9e9dcd3a627a5707e4b5e507931ab0d44eeebf" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] @@ -435,7 +475,7 @@ checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] @@ -447,7 +487,7 @@ checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -458,13 +498,14 @@ checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" [[package]] name = "assert_cmd" -version = "2.0.8" +version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9834fcc22e0874394a010230586367d4a3e9f11b560f469262678547e1d2575e" +checksum = "ec0b2340f55d9661d76793b2bfc2eb0e62689bd79d067a95707ea762afd5e9dd" dependencies = [ + "anstyle", "bstr", "doc-comment", - "predicates", + "predicates 3.0.2", "predicates-core", "predicates-tree", "wait-timeout", @@ -489,32 +530,31 @@ dependencies = [ [[package]] name = "async-io" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock", "autocfg", + "cfg-if", "concurrent-queue", "futures-lite", - "libc", "log", "parking", "polling", + "rustix 0.37.7", "slab", "socket2", "waker-fn", - "windows-sys 0.42.0", ] [[package]] name = "async-lock" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" +checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" dependencies = [ "event-listener", - "futures-lite", ] [[package]] @@ -536,18 +576,18 @@ checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -639,9 +679,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "basic-toml" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e819b667739967cd44d308b8c7b71305d8bb0729ac44a248aa08f33d01950b4" +checksum = "5c0de75129aa8d0cceaf750b89013f0e08804d6ec61416da787b35ad0d7cddf1" dependencies = [ "serde", ] @@ -693,7 +733,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn", + "syn 1.0.109", ] [[package]] @@ -776,7 +816,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -785,7 +825,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -816,7 +856,7 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bls-like" version = "0.1.0" -source = "git+https://github.com/w3f/bls#c8b9d473e5de142aebcb1b079b0b3a678de3135f" +source = "git+https://github.com/w3f/bls#574f617b92e9ae3f204cb5282bcc30af401e77c4" dependencies = [ "ark-bls12-377", "ark-bls12-381", @@ -855,9 +895,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" +checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" dependencies = [ "memchr", "once_cell", @@ -894,9 +934,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" [[package]] name = "byteorder" @@ -923,9 +963,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6031a462f977dd38968b6f23378356512feeace69cef817e1a4475108093cec3" +checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" dependencies = [ "serde", ] @@ -947,7 +987,7 @@ checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07" dependencies = [ "camino", "cargo-platform", - "semver 1.0.16", + "semver 1.0.17", "serde", "serde_json", "thiserror", @@ -1039,7 +1079,7 @@ name = "chain-spec-builder" version = "2.0.0" dependencies = [ "ansi_term", - "clap 4.1.8", + "clap 4.2.1", "node-cli", "rand 0.8.5", "sc-chain-spec", @@ -1050,9 +1090,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "js-sys", @@ -1109,7 +1149,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -1118,14 +1158,14 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] name = "cipher" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", @@ -1142,9 +1182,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ed9a53e5d4d9c573ae844bfac6872b159cb1d1585a83b29e7a64b7eef7332a" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", @@ -1165,39 +1205,47 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.8" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" +checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", - "clap_lex 0.3.2", - "is-terminal", "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" +dependencies = [ + "anstream", + "anstyle", + "bitflags", + "clap_lex 0.4.1", "strsim", - "termcolor", ] [[package]] name = "clap_complete" -version = "4.1.4" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501ff0a401473ea1d4c3b125ff95506b62c5bc5768d818634195fbb7c4ad5ff4" +checksum = "01c22dcfb410883764b29953103d9ef7bb8fe21b3fa1158bc99986c2067294bd" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", ] [[package]] name = "clap_derive" -version = "4.1.8" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" +checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -1211,12 +1259,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" -dependencies = [ - "os_str_bytes", -] +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" [[package]] name = "codespan-reporting" @@ -1239,6 +1284,21 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "concolor-override" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f" + +[[package]] +name = "concolor-query" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" +dependencies = [ + "windows-sys 0.45.0", +] + [[package]] name = "concurrent-queue" version = "2.1.0" @@ -1256,9 +1316,9 @@ checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" [[package]] name = "constant_time_eq" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" +checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" [[package]] name = "core-foundation" @@ -1272,9 +1332,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core2" @@ -1296,9 +1356,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" dependencies = [ "libc", ] @@ -1519,7 +1579,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -1531,7 +1591,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -1543,7 +1603,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "typenum", ] @@ -1554,7 +1614,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -1564,7 +1624,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -1575,7 +1635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" dependencies = [ "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1593,7 +1653,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.4.3", + "cipher 0.4.4", ] [[package]] @@ -1624,9 +1684,9 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.0.0-rc.0" +version = "4.0.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da00a7a9a4eb92a0a0f8e75660926d48f0d0f3c537e455c457bcdaa1e16b1ac" +checksum = "03d928d978dbec61a1167414f5ec534f24bea0d7a0d24dd9b6233d3d8223e585" dependencies = [ "cfg-if", "fiat-crypto", @@ -1638,9 +1698,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -1650,9 +1710,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -1660,31 +1720,31 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 2.0.13", ] [[package]] name = "cxxbridge-flags" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "darling" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ "darling_core", "darling_macro", @@ -1692,27 +1752,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn", + "syn 1.0.109", ] [[package]] name = "darling_macro" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1738,7 +1798,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5bbed42daaa95e780b60a50546aa345b8413a1e46f9a40a12907d3598f038db" dependencies = [ "data-encoding", - "syn", + "syn 1.0.109", ] [[package]] @@ -1778,11 +1838,11 @@ dependencies = [ [[package]] name = "der-parser" -version = "8.1.0" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs 0.5.1", + "asn1-rs 0.5.2", "displaydoc", "nom", "num-bigint", @@ -1798,7 +1858,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1809,7 +1869,7 @@ checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1830,7 +1890,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1840,7 +1900,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f0314b72bed045f3a68671b3c86328386762c93f82d98c65c3cb5e5f573dd68" dependencies = [ "derive_builder_core", - "syn", + "syn 1.0.109", ] [[package]] @@ -1851,7 +1911,7 @@ checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1881,7 +1941,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -1944,7 +2004,7 @@ checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1973,9 +2033,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00704156a7de8df8da0911424e30c2049957b0a714542a44e05fe693dd85313" +checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" [[package]] name = "dyn-clonable" @@ -1995,7 +2055,7 @@ checksum = "558e40ea573c374cf53507fd240b7ee2f5477df7cfebdb97323ec61c719399c5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2018,9 +2078,9 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1b0a1222f8072619e8a6b667a854020a03d363738303203c09468b3424a420a" +checksum = "644d3b8674a5fc5b929ae435bca85c2323d85ccb013a5509c2ac9ee11a6284ba" dependencies = [ "der 0.7.1", "elliptic-curve 0.13.2", @@ -2082,7 +2142,7 @@ dependencies = [ "der 0.6.1", "digest 0.10.6", "ff 0.12.1", - "generic-array 0.14.6", + "generic-array 0.14.7", "group 0.12.1", "hkdf", "pem-rfc7468", @@ -2103,7 +2163,7 @@ dependencies = [ "crypto-bigint 0.5.1", "digest 0.10.6", "ff 0.13.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "group 0.13.0", "pkcs8 0.10.1", "rand_core 0.6.4", @@ -2121,27 +2181,27 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "enumflags2" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75d4cd21b95383444831539909fbb14b9dc3fdceb2a6f5d36577329a1f55ccb" +checksum = "0044ebdf7fbb2a772e0c0233a9d3173c5cd8af8ae7078d4c5188af44ffffaa4b" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" +checksum = "9d2c772ccdbdfd1967b4f5d79d17c98ebf92009fdcc838db7aa434462f600c26" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -2187,6 +2247,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.45.0", +] + [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -2222,7 +2293,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2277,9 +2348,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.17" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a214f5bb88731d436478f3ae1f8a277b62124089ba9fb67f4f93fb100ef73c90" +checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" [[package]] name = "file-per-thread-logger" @@ -2299,7 +2370,7 @@ checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "windows-sys 0.45.0", ] @@ -2430,7 +2501,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.1.8", + "clap 4.2.1", "comfy-table", "frame-benchmarking", "frame-support", @@ -2495,7 +2566,7 @@ dependencies = [ "quote", "scale-info", "sp-arithmetic", - "syn", + "syn 1.0.109", "trybuild", ] @@ -2521,7 +2592,7 @@ dependencies = [ name = "frame-election-solution-type-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", @@ -2557,9 +2628,9 @@ dependencies = [ [[package]] name = "frame-metadata" -version = "15.0.0" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df6bb8542ef006ef0de09a5c4420787d79823c0ed7924225822362fd2bf2ff2d" +checksum = "878babb0b136e731cc77ec2fd883ff02745ff21e6fb662729953d44923df009c" dependencies = [ "cfg-if", "parity-scale-codec", @@ -2632,7 +2703,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2643,7 +2714,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2652,7 +2723,7 @@ version = "3.0.0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -2796,9 +2867,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -2811,9 +2882,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -2821,15 +2892,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -2839,9 +2910,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" @@ -2860,13 +2931,13 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -2882,15 +2953,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-timer" @@ -2900,9 +2971,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" [[package]] name = "futures-util" -version = "0.3.26" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -2949,9 +3020,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -3240,7 +3311,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "hmac 0.8.1", ] @@ -3315,9 +3386,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes", "futures-channel", @@ -3354,16 +3425,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows 0.48.0", ] [[package]] @@ -3415,9 +3486,9 @@ dependencies = [ [[package]] name = "if-watch" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba7abdbb86e485125dad06c2691e1e393bf3b08c7b743b43aa162a00fd39062e" +checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" dependencies = [ "async-io", "core-foundation", @@ -3429,7 +3500,7 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows", + "windows 0.34.0", ] [[package]] @@ -3458,14 +3529,14 @@ checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -3484,7 +3555,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -3532,10 +3603,11 @@ checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "io-lifetimes" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" dependencies = [ + "hermit-abi 0.3.1", "libc", "windows-sys 0.45.0", ] @@ -3560,19 +3632,19 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "256017f749ab3117e93acb91063009e1f1bb56d03965b14c2c8df4eb02c524d8" dependencies = [ "hermit-abi 0.3.1", - "io-lifetimes 1.0.5", - "rustix 0.36.8", + "io-lifetimes 1.0.9", + "rustix 0.37.7", "windows-sys 0.45.0", ] @@ -3587,9 +3659,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jobserver" @@ -3682,7 +3754,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -3740,7 +3812,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "955890845095ccf31ef83ad41a05aabb4d8cc23dc3cac5a9f5c89cf26dd0da75" dependencies = [ "cfg-if", - "ecdsa 0.16.1", + "ecdsa 0.16.2", "elliptic-curve 0.13.2", "once_cell", "sha2 0.10.6", @@ -3961,9 +4033,9 @@ checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "libp2p" -version = "0.50.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e0a0d2f693675f49ded13c5d510c48b78069e23cbd9108d7ccd59f6dc568819" +checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" dependencies = [ "bytes", "futures", @@ -3977,7 +4049,7 @@ dependencies = [ "libp2p-mdns", "libp2p-metrics", "libp2p-mplex", - "libp2p-noise 0.41.0", + "libp2p-noise", "libp2p-ping", "libp2p-quic", "libp2p-request-response", @@ -4029,36 +4101,30 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.39.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881d9a54e97d97cdaa4125d48269d97ca8c40e5fefec6b85b30440dc60cc551f" +checksum = "9b7f8b7d65c070a5a1b5f8f0510648189da08f787b8963f8e21219e0710733af" dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", "either", "fnv", "futures", "futures-timer", "instant", + "libp2p-identity", "log", - "multiaddr 0.17.0", + "multiaddr 0.17.1", "multihash 0.17.0", "multistream-select", "once_cell", "parking_lot 0.12.1", "pin-project", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", "rw-stream-sink", - "sec1 0.3.0", - "sha2 0.10.6", "smallvec", "thiserror", "unsigned-varint", "void", - "zeroize", ] [[package]] @@ -4096,6 +4162,24 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-identity" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a8ea433ae0cea7e3315354305237b9897afe45278b2118a7a57ca744e70fd27" +dependencies = [ + "bs58", + "ed25519-dalek", + "log", + "multiaddr 0.17.1", + "multihash 0.17.0", + "prost", + "quick-protobuf", + "rand 0.8.5", + "thiserror", + "zeroize", +] + [[package]] name = "libp2p-kad" version = "0.42.1" @@ -4199,29 +4283,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "libp2p-noise" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1216f9ec823ac7a2289b954674c54cbce81c9e45920b4fcf173018ede4295246" -dependencies = [ - "bytes", - "curve25519-dalek 3.2.0", - "futures", - "libp2p-core 0.39.0", - "log", - "once_cell", - "prost", - "prost-build", - "rand 0.8.5", - "sha2 0.10.6", - "snow", - "static_assertions", - "thiserror", - "x25519-dalek 1.1.1", - "zeroize", -] - [[package]] name = "libp2p-ping" version = "0.41.0" @@ -4240,15 +4301,15 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.7.0-alpha.2" +version = "0.7.0-alpha" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971f629ff7519f4d4889a7c981f0dc09c6ad493423cd8a13ee442de241bc8c8" +checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.39.0", + "libp2p-core 0.38.0", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -4307,7 +4368,7 @@ checksum = "9d527d5827582abd44a6d80c07ff8b50b4ee238a8979e05998474179e79dc400" dependencies = [ "heck", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -4328,13 +4389,14 @@ dependencies = [ [[package]] name = "libp2p-tls" -version = "0.1.0-alpha.2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9baf6f6292149e124ee737d9a79dbee783f29473fc368c7faad9d157841078a" +checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.0", + "libp2p-core 0.39.1", + "libp2p-identity", "rcgen 0.10.0", "ring", "rustls 0.20.8", @@ -4360,9 +4422,9 @@ dependencies = [ [[package]] name = "libp2p-webrtc" -version = "0.4.0-alpha.2" +version = "0.4.0-alpha" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4401ec550d36f413310ba5d4bf564bb21f89fb1601cadb32b2300f8bc1eb5b" +checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" dependencies = [ "async-trait", "asynchronous-codec", @@ -4371,10 +4433,10 @@ dependencies = [ "futures-timer", "hex", "if-watch", - "libp2p-core 0.39.0", - "libp2p-noise 0.42.0", + "libp2p-core 0.38.0", + "libp2p-noise", "log", - "multihash 0.17.0", + "multihash 0.16.3", "prost", "prost-build", "prost-codec", @@ -4542,6 +4604,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" + [[package]] name = "lite-json" version = "0.2.0" @@ -4682,11 +4750,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" +checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.36.8", + "rustix 0.37.7", ] [[package]] @@ -4820,29 +4888,29 @@ dependencies = [ [[package]] name = "mockall" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4a1c770583dac7ab5e2f6c139153b783a53a1bbee9729613f193e59828326" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ "cfg-if", "downcast", "fragile", "lazy_static", "mockall_derive", - "predicates", + "predicates 2.1.5", "predicates-tree", ] [[package]] name = "mockall_derive" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832663583d5fa284ca8810bf7015e46c9fff9622d3cf34bd1eea5003fec06dd0" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -4865,13 +4933,14 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b53e0cc5907a5c216ba6584bf74be8ab47d6d6289f72793b2dddbf15dc3bf8c" +checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" dependencies = [ "arrayref", "byteorder", "data-encoding", + "log", "multibase", "multihash 0.17.0", "percent-encoding", @@ -4932,7 +5001,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "synstructure", ] @@ -4958,9 +5027,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6515c882ebfddccaa73ead7320ca28036c4bc84c9bcca3cc0cbba8efe89223a" +checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511" dependencies = [ "approx", "matrixmultiply", @@ -4980,7 +5049,7 @@ checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -5047,9 +5116,9 @@ dependencies = [ [[package]] name = "netlink-sys" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "260e21fbb6f3d253a14df90eb0000a6066780a15dd901a7519ce02d77a94985b" +checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ "bytes", "futures", @@ -5089,7 +5158,7 @@ name = "node-bench" version = "0.9.0-dev" dependencies = [ "array-bytes", - "clap 4.1.8", + "clap 4.2.1", "derive_more", "fs_extra", "futures", @@ -5126,7 +5195,7 @@ version = "3.0.0-dev" dependencies = [ "array-bytes", "assert_cmd", - "clap 4.1.8", + "clap 4.2.1", "clap_complete", "criterion", "frame-benchmarking-cli", @@ -5247,7 +5316,7 @@ dependencies = [ name = "node-inspect" version = "0.9.0-dev" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "parity-scale-codec", "sc-cli", "sc-client-api", @@ -5306,7 +5375,7 @@ dependencies = [ name = "node-runtime-generate-bags" version = "3.0.0" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "generate-bags", "kitchensink-runtime", ] @@ -5315,7 +5384,7 @@ dependencies = [ name = "node-template" version = "4.0.0-dev" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", @@ -5591,7 +5660,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs 0.5.1", + "asn1-rs 0.5.2", ] [[package]] @@ -5626,9 +5695,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "os_str_bytes" -version = "6.4.1" +version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" [[package]] name = "output_vt100" @@ -6053,7 +6122,7 @@ version = "4.0.0-dev" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -6936,7 +7005,7 @@ dependencies = [ "proc-macro2", "quote", "sp-runtime", - "syn", + "syn 1.0.109", ] [[package]] @@ -7244,7 +7313,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -7295,7 +7364,7 @@ dependencies = [ "cfg-if", "instant", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "winapi", ] @@ -7308,16 +7377,16 @@ checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "windows-sys 0.45.0", ] [[package]] name = "paste" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "pbkdf2" @@ -7369,9 +7438,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.5" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028accff104c4e513bad663bbcd2ad7cfd5304144404c31ed0a77ac103d00660" +checksum = "7b1403e8401ad5dedea73c626b99758535b342502f8d1e361f4a2dd952749122" dependencies = [ "thiserror", "ucd-trie", @@ -7379,9 +7448,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.5" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ac3922aac69a40733080f53c1ce7f91dcf57e1a5f6c52f421fadec7fbdc4b69" +checksum = "be99c4c1d2fc2769b1d00239431d711d08f6efedcecb8b6e30707160aee99c15" dependencies = [ "pest", "pest_generator", @@ -7389,22 +7458,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.5" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06646e185566b5961b4058dd107e0a7f56e77c3f484549fb119867773c0f202" +checksum = "e56094789873daa36164de2e822b3888c6ae4b4f9da555a1103587658c805b1e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "pest_meta" -version = "2.5.5" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f60b2ba541577e2a0c307c8f39d1439108120eb7903adeb6497fa880c59616" +checksum = "6733073c7cff3d8459fda0e42f13a047870242aed8b509fe98000928975f359e" dependencies = [ "once_cell", "pest", @@ -7438,7 +7507,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -7527,16 +7596,18 @@ dependencies = [ [[package]] name = "polling" -version = "2.5.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa" dependencies = [ "autocfg", + "bitflags", "cfg-if", + "concurrent-queue", "libc", "log", - "wepoll-ffi", - "windows-sys 0.42.0", + "pin-project-lite 0.2.9", + "windows-sys 0.45.0", ] [[package]] @@ -7594,17 +7665,29 @@ dependencies = [ "regex", ] +[[package]] +name = "predicates" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c575290b64d24745b6c57a12a31465f0a66f3a4799686a6921526a33b0797965" +dependencies = [ + "anstyle", + "difflib", + "itertools", + "predicates-core", +] + [[package]] name = "predicates-core" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" +checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" [[package]] name = "predicates-tree" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ "predicates-core", "termtree", @@ -7624,12 +7707,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.1.23" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ "proc-macro2", - "syn", + "syn 1.0.109", ] [[package]] @@ -7664,7 +7747,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -7681,9 +7764,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.51" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -7722,7 +7805,7 @@ checksum = "66a455fbcb954c1a7decf3c586e860fd7889cddf4b8e164be736dbac95a953cd" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -7752,7 +7835,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn", + "syn 1.0.109", "tempfile", "which", ] @@ -7780,7 +7863,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -7807,6 +7890,15 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + [[package]] name = "quickcheck" version = "1.0.3" @@ -7829,9 +7921,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4ced82a24bb281af338b9e8f94429b6eca01b4e66d899f40031f074e74c9" +checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" dependencies = [ "bytes", "rand 0.8.5", @@ -7847,9 +7939,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.23" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" +checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" dependencies = [ "proc-macro2", ] @@ -7958,9 +8050,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -7968,9 +8060,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -8012,6 +8104,15 @@ dependencies = [ "bitflags", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -8019,28 +8120,28 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom 0.2.8", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed" +checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" +checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -8057,9 +8158,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" dependencies = [ "aho-corasick", "memchr", @@ -8077,9 +8178,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "region" @@ -8212,9 +8313,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" [[package]] name = "rustc-hash" @@ -8243,7 +8344,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.16", + "semver 1.0.17", ] [[package]] @@ -8262,7 +8363,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" dependencies = [ "bitflags", - "errno", + "errno 0.2.8", "io-lifetimes 0.7.5", "libc", "linux-raw-sys 0.0.46", @@ -8271,18 +8372,32 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.8" +version = "0.36.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +checksum = "e0af200a3324fa5bcd922e84e9b55a298ea9f431a489f01961acdebc6e908f25" dependencies = [ "bitflags", - "errno", - "io-lifetimes 1.0.5", + "errno 0.3.0", + "io-lifetimes 1.0.9", "libc", "linux-raw-sys 0.1.4", "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.37.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2aae838e49b3d63e9274e1c01833cc8139d3fec468c3b84688c628f44b1ae11d" +dependencies = [ + "bitflags", + "errno 0.3.0", + "io-lifetimes 1.0.9", + "libc", + "linux-raw-sys 0.3.1", + "windows-sys 0.45.0", +] + [[package]] name = "rustls" version = "0.19.1" @@ -8331,9 +8446,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "rusty-fork" @@ -8359,9 +8474,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safe-mix" @@ -8496,7 +8611,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -8505,7 +8620,7 @@ version = "0.10.0-dev" dependencies = [ "array-bytes", "chrono", - "clap 4.1.8", + "clap 4.2.1", "fdlimit", "futures", "futures-timer", @@ -9045,7 +9160,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "paste", - "rustix 0.36.8", + "rustix 0.36.12", "sc-allocator", "sc-executor-common", "sc-runtime-test", @@ -9618,7 +9733,7 @@ dependencies = [ name = "sc-storage-monitor" version = "0.1.0" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "fs4", "futures", "log", @@ -9722,7 +9837,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -9790,9 +9905,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001cf62ece89779fd16105b5f515ad0e5cedcd5440d3dd806bb067978e7c3608" +checksum = "0cfdffd972d76b22f3d7f81c8be34b2296afd3a25e0a547bd9abe340a4dbbe97" dependencies = [ "bitvec", "cfg-if", @@ -9804,14 +9919,14 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.3.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303959cf613a6f6efd19ed4b4ad5bf79966a13352716299ad532cfb115f4205c" +checksum = "61fa974aea2d63dd18a4ec3a49d59af9f34178c73a4f56d2f18205628d00681e" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -9860,9 +9975,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "sct" @@ -9904,7 +10019,7 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct 0.1.1", "der 0.6.1", - "generic-array 0.14.6", + "generic-array 0.14.7", "pkcs8 0.9.0", "subtle", "zeroize", @@ -9918,7 +10033,7 @@ checksum = "48518a2b5775ba8ca5b46596aae011caa431e6ce7e4a67ead66d92f08884220e" dependencies = [ "base16ct 0.2.0", "der 0.7.1", - "generic-array 0.14.6", + "generic-array 0.14.7", "pkcs8 0.10.1", "subtle", "zeroize", @@ -9994,9 +10109,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" dependencies = [ "serde", ] @@ -10009,29 +10124,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744" dependencies = [ "itoa", "ryu", @@ -10200,14 +10315,14 @@ checksum = "5e9f0ab6ef7eb7353d9119c170a436d1bf248eea575ac42d19d12f4e34130831" [[package]] name = "snow" -version = "0.9.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ba5f4d4ff12bdb6a169ed51b7c48c0e0ac4b0b4b31012b2571e97d78d3201d" +checksum = "774d05a3edae07ce6d68ea6984f3c05e9bba8927e3dd591e3b479e5b03213d0d" dependencies = [ "aes-gcm 0.9.4", "blake2", "chacha20poly1305", - "curve25519-dalek 4.0.0-rc.0", + "curve25519-dalek 4.0.0-rc.2", "rand_core 0.6.4", "ring", "rustc_version 0.4.0", @@ -10217,9 +10332,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" +checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", "winapi", @@ -10270,7 +10385,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -10582,7 +10697,7 @@ dependencies = [ "proc-macro2", "quote", "sp-core-hashing", - "syn", + "syn 1.0.109", ] [[package]] @@ -10599,7 +10714,7 @@ version = "5.0.0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -10724,7 +10839,7 @@ dependencies = [ name = "sp-npos-elections-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "honggfuzz", "parity-scale-codec", "rand 0.8.5", @@ -10819,7 +10934,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -11043,7 +11158,7 @@ dependencies = [ "proc-macro2", "quote", "sp-version", - "syn", + "syn 1.0.109", ] [[package]] @@ -11081,9 +11196,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.5" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dccf47db1b41fa1573ed27ccf5e08e3ca771cb994f776668c5ebda893b248fc" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spki" @@ -11157,7 +11272,7 @@ dependencies = [ "memchr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -11185,7 +11300,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn", + "syn 1.0.109", ] [[package]] @@ -11211,7 +11326,7 @@ dependencies = [ name = "subkey" version = "3.0.0" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "sc-cli", ] @@ -11239,7 +11354,7 @@ dependencies = [ name = "substrate-frame-cli" version = "4.0.0-dev" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "frame-support", "frame-system", "sc-cli", @@ -11455,7 +11570,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -11509,6 +11624,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -11517,7 +11643,7 @@ checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "unicode-xid", ] @@ -11556,15 +11682,15 @@ checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" [[package]] name = "tempfile" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", - "rustix 0.36.8", - "windows-sys 0.42.0", + "redox_syscall 0.3.5", + "rustix 0.37.7", + "windows-sys 0.45.0", ] [[package]] @@ -11578,9 +11704,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "textwrap" @@ -11590,22 +11716,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -11736,14 +11862,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.25.0" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "parking_lot 0.12.1", @@ -11751,18 +11876,18 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "tokio-macros" -version = "1.8.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266c00fde287f55d3f1c3e96c500c362a2b8c695076ec180f27918820bc6df8" +checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.13", ] [[package]] @@ -11887,7 +12012,7 @@ checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -12077,7 +12202,7 @@ name = "try-runtime-cli" version = "0.10.0-dev" dependencies = [ "async-trait", - "clap 4.1.8", + "clap 4.2.1", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -12111,9 +12236,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.77" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44da5a6f2164c8e14d3bbc0657d69c5966af9f5f6930d4f600b1f5c4a673413" +checksum = "501dbdbb99861e4ab6b60eb6a7493956a9defb644fd034bc4a5ef27c693c8a3a" dependencies = [ "basic-toml", "dissimilar", @@ -12188,15 +12313,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -12225,7 +12350,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -12268,6 +12393,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" version = "1.3.0" @@ -12327,12 +12458,11 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -12385,7 +12515,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -12419,7 +12549,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -12432,9 +12562,9 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-encoder" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f7d56227d910901ce12dfd19acc40c12687994dfb3f57c90690f80be946ec5" +checksum = "4eff853c4f09eec94d76af527eddad4e9de13b11d6286a1ef7134bc30135a2b7" dependencies = [ "leb128", ] @@ -12530,7 +12660,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e61a7006b0fdf24f6bbe8dcfdad5ca1b350de80061fb2827f31c82fbbb9565a" dependencies = [ - "spin 0.9.5", + "spin 0.9.8", "wasmi_arena", "wasmi_core 0.12.0", "wasmparser-nostd", @@ -12645,7 +12775,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.8", + "rustix 0.36.12", "serde", "sha2 0.10.6", "toml", @@ -12725,7 +12855,7 @@ checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.36.8", + "rustix 0.36.12", ] [[package]] @@ -12756,7 +12886,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.36.8", + "rustix 0.36.12", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -12777,9 +12907,9 @@ dependencies = [ [[package]] name = "wast" -version = "54.0.1" +version = "55.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d48d9d731d835f4f8dacbb8de7d47be068812cb9877f5c60d408858778d8d2a" +checksum = "4984d3e1406571f4930ba5cf79bd70f75f41d0e87e17506e0bd19b0e5d085f05" dependencies = [ "leb128", "memchr", @@ -12789,9 +12919,9 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1db2e3ed05ea31243761439194bec3af6efbbaf87c4c8667fb879e4f23791a0" +checksum = "af2b53f4da14db05d32e70e9c617abdf6620c575bd5dd972b7400037b4df2091" dependencies = [ "wast", ] @@ -12905,7 +13035,7 @@ dependencies = [ "byteorder", "ccm", "curve25519-dalek 3.2.0", - "der-parser 8.1.0", + "der-parser 8.2.0", "elliptic-curve 0.12.3", "hkdf", "hmac 0.12.1", @@ -12928,7 +13058,7 @@ dependencies = [ "tokio", "webpki 0.21.4", "webrtc-util", - "x25519-dalek 2.0.0-pre.1", + "x25519-dalek 2.0.0-rc.2", "x509-parser 0.13.2", ] @@ -13047,15 +13177,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - [[package]] name = "which" version = "4.4.0" @@ -13127,19 +13248,28 @@ dependencies = [ "windows_x86_64_msvc 0.34.0", ] +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-sys" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -13148,29 +13278,50 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" @@ -13180,9 +13331,15 @@ checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" @@ -13192,9 +13349,15 @@ checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" @@ -13204,9 +13367,15 @@ checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" @@ -13216,15 +13385,27 @@ checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" @@ -13234,9 +13415,15 @@ checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winreg" @@ -13269,12 +13456,13 @@ dependencies = [ [[package]] name = "x25519-dalek" -version = "2.0.0-pre.1" +version = "2.0.0-rc.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5da623d8af10a62342bcbbb230e33e58a63255a58012f8653c578e54bab48df" +checksum = "fabd6e16dd08033932fc3265ad4510cc2eab24656058a6dcb107ffe274abcc95" dependencies = [ - "curve25519-dalek 3.2.0", + "curve25519-dalek 4.0.0-rc.2", "rand_core 0.6.4", + "serde", "zeroize", ] @@ -13303,10 +13491,10 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.1", + "asn1-rs 0.5.2", "base64 0.13.1", "data-encoding", - "der-parser 8.1.0", + "der-parser 8.2.0", "lazy_static", "nom", "oid-registry 0.6.1", @@ -13346,23 +13534,22 @@ dependencies = [ [[package]] name = "zeroize" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn", - "synstructure", + "syn 2.0.13", ] [[package]] diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 7fe756470c18c..a7ad9b847aecd 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -27,11 +27,8 @@ use crate::crypto::{DeriveError, DeriveJunction, Pair as TraitPair, SecretString use sp_std::vec::Vec; #[cfg(feature = "full_crypto")] -use bls_like::{double::DoublePublicKeyScheme, Keypair, Message, SecretKey}; -use bls_like::{ - double::{DoublePublicKey, DoubleSignature}, - EngineBLS, SerializableToBytes, TinyBLS381, -}; +use bls_like::{SecretKey, Keypair, Message, DoublePublicKeyScheme, DoublePublicKey, DoubleSignature, SerializableToBytes}; +use bls_like::{EngineBLS, TinyBLS381}; use codec::{Decode, Encode, MaxEncodedLen}; #[cfg(feature = "std")] use hex; From 2a0a0cad999b11bc4479b06c304c479b4921760d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Wed, 12 Apr 2023 15:28:46 +0100 Subject: [PATCH 21/35] fix compilation --- primitives/core/src/bls.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index a7ad9b847aecd..c8ca7c170db5a 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -26,9 +26,9 @@ use crate::crypto::{DeriveError, DeriveJunction, Pair as TraitPair, SecretString #[cfg(feature = "full_crypto")] use sp_std::vec::Vec; +use bls_like::{DoublePublicKey, DoubleSignature, EngineBLS, SerializableToBytes, TinyBLS381}; #[cfg(feature = "full_crypto")] -use bls_like::{SecretKey, Keypair, Message, DoublePublicKeyScheme, DoublePublicKey, DoubleSignature, SerializableToBytes}; -use bls_like::{EngineBLS, TinyBLS381}; +use bls_like::{DoublePublicKeyScheme, Keypair, Message, SecretKey}; use codec::{Decode, Encode, MaxEncodedLen}; #[cfg(feature = "std")] use hex; From de482622e8d1d1a40242eb19e145f4480abb3b8b Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 13 Apr 2023 15:25:42 +0200 Subject: [PATCH 22/35] Apply suggestions from code review Co-authored-by: Robert Hambrock --- primitives/core/src/bls.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index c8ca7c170db5a..c4441db92474d 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -77,12 +77,12 @@ trait BlsBound: EngineBLS + Send + Sync + 'static {} impl BlsBound for T {} -// Secret key serialized side +// Secret key serialized size #[cfg(feature = "full_crypto")] const SECRET_KEY_SERIALIZED_SIZE: usize = as SerializableToBytes>::SERIALIZED_BYTES_SIZE; -// Public key serialized side +// Public key serialized size const PUBLIC_KEY_SERIALIZED_SIZE: usize = as SerializableToBytes>::SERIALIZED_BYTES_SIZE; @@ -501,7 +501,7 @@ impl CryptoType for Pair { type Pair = Pair; } -// Test set excercising the BLS12-377 implementation +// Test set exercising the BLS12-377 implementation #[cfg(test)] mod test { use super::*; From 7d709dab9b8695a5138ceafdb554e45690b33295 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 13 Apr 2023 15:45:12 +0200 Subject: [PATCH 23/35] Clean leftovers --- Cargo.lock | 1 - primitives/core/Cargo.toml | 2 -- primitives/core/src/bls.rs | 12 +++--------- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cd84018844427..e72a4b6b43190 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -10607,7 +10607,6 @@ dependencies = [ "futures", "hash-db", "hash256-std-hasher", - "hex", "hex-literal", "impl-serde", "lazy_static", diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 72f9a361fdff6..6522e391c0e48 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -46,7 +46,6 @@ ed25519-zebra = { version = "3.1.0", default-features = false, optional = true } blake2 = { version = "0.10.4", default-features = false, optional = true } schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false, optional = true } bls-like = {git = "https://github.com/w3f/bls", default-features = false} -hex = { version = "0.4", default-features = false, optional = true} libsecp256k1 = { version = "0.7", default-features = false, features = ["static-context"], optional = true } merlin = { version = "2.0", default-features = false, optional = true } secp256k1 = { version = "0.24.0", default-features = false, features = ["recovery", "alloc"], optional = true } @@ -113,7 +112,6 @@ std = [ "futures/thread-pool", "libsecp256k1/std", "dyn-clonable", - "hex", ] # This feature enables all crypto primitives for `no_std` builds like microcontrollers diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index c4441db92474d..0ed7a7ab856b4 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -30,8 +30,6 @@ use bls_like::{DoublePublicKey, DoubleSignature, EngineBLS, SerializableToBytes, #[cfg(feature = "full_crypto")] use bls_like::{DoublePublicKeyScheme, Keypair, Message, SecretKey}; use codec::{Decode, Encode, MaxEncodedLen}; -#[cfg(feature = "std")] -use hex; use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; @@ -326,7 +324,7 @@ impl Serialize for Signature { where S: Serializer, { - serializer.serialize_str(&hex::encode(self.inner)) + serializer.serialize_str(&array_bytes::bytes2hex("", self.as_ref())) } } @@ -336,7 +334,7 @@ impl<'de, T> Deserialize<'de> for Signature { where D: Deserializer<'de>, { - let signature_hex = hex::decode(&String::deserialize(deserializer)?) + let signature_hex = array_bytes::hex2bytes(&String::deserialize(deserializer)?) .map_err(|e| de::Error::custom(format!("{:?}", e)))?; Signature::try_from(signature_hex.as_ref()) .map_err(|e| de::Error::custom(format!("{:?}", e))) @@ -519,7 +517,7 @@ mod test { ); } - //only passes if the seed = seed (mod ScalarField) + // Only passes if the seed = (seed mod ScalarField) #[test] fn seed_and_derive_should_work() { let seed = hex!("9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f00"); @@ -534,8 +532,6 @@ mod test { ); } - // TODO FIXME Is this supposed to be successful? - // Where is the test vector defined? #[test] fn test_vector_should_work() { let pair = Pair::from_seed(&hex!( @@ -557,8 +553,6 @@ mod test { assert!(Pair::verify(&signature, &message[..], &public)); } - // TODO FIXME Is this expected to be pass? - // Where the test vectors were taken? #[test] fn test_vector_by_string_should_work() { let pair = Pair::from_string( From a2b730899a4238570cd7c50c97419c2d44de37a6 Mon Sep 17 00:00:00 2001 From: Skalman Date: Thu, 13 Apr 2023 10:12:52 -0400 Subject: [PATCH 24/35] - update bls test vector after applying spec change recommendation. - send message as ref. --- primitives/core/src/bls.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index c8ca7c170db5a..594fc1c404df2 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -453,7 +453,7 @@ impl TraitPair for Pair { fn sign(&self, message: &[u8]) -> Self::Signature { let mut mutable_self = self.clone(); let r: [u8; SIGNATURE_SERIALIZED_SIZE] = - DoublePublicKeyScheme::sign(&mut mutable_self.0, Message::new(b"", message)) + DoublePublicKeyScheme::sign(&mut mutable_self.0, &Message::new(b"", message)) .to_bytes() .try_into() .expect("Signature serializer returns vectors of SIGNATURE_SERIALIZED_SIZE size"); @@ -483,7 +483,7 @@ impl TraitPair for Pair { Err(_) => return false, }; - sig.verify(Message::new(b"", message.as_ref()), &public_key) + sig.verify(&Message::new(b"", message.as_ref()), &public_key) } /// Get the seed for this key. @@ -550,7 +550,7 @@ mod test { ); let message = b""; let signature = - hex!("1a2cf9ed2f3dc798c218fe80948560487a984eb8f7e8a86af6113759603bea9bdca53c260b69662efe64df80b5b953803145af24b37f1d292c3cfd605ecc4fbeaa3b370c92cb3fe14f5044bbe3d89a01dbac4cd5cdb741c9e6f4fad16eca76c14e5cd3b11db21c03317d5d5998c4c105" + hex!("d1e3013161991e142d8751017d4996209c2ff8a9ee160f373733eda3b4b785ba6edce9f45f87104bbe07aa6aa6eb278063a6dd84e71b6f9ff7da6cf9a0cf175395312bd947d71efff5732bbfd206530695a84b78aba871705f494933e68f1a23c03e4cf57870a2ac0181dbba503ac503" ); let signature = Signature::unchecked_from(signature); assert!(pair.sign(&message[..]) == signature); @@ -575,7 +575,7 @@ mod test { ); let message = b""; let signature = - hex!("618ae186f07ead4fb973c7ae86deeee9d33cbdcbea3fe32753e5cdba8df2ae67a28c2465118756bccfd60076fdbeb2009d2eeb174584b448bee01cf4eefd65fd839c722464e6ccc7b2639b4e7db6ec0de57eff3ee22c7eb19a8f06839530bc64ae323e263341b03363da5d75e2e59002" + hex!("bbb395bbdee1a35930912034f5fde3b36df2835a0536c865501b0675776a1d5931a3bea2e66eff73b2546c6af2061a80c793682f8f4efe26350d5c754d690d76c4768a0387edec797164be22cda8541003ea83652abe05454470bbdc4de35f7903b03bba7839aceb897a13b128f38e0b" ); let expected_signature = Signature::unchecked_from(signature); println!("signature is {:?}", pair.sign(&message[..])); From 426c5ae6d94a40deae866fc037506bef64d49fd0 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Thu, 13 Apr 2023 16:25:18 +0200 Subject: [PATCH 25/35] Different hard junction ids for different bls12 types --- primitives/core/src/bls.rs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 0ed7a7ab856b4..f89b3926bb466 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -52,6 +52,10 @@ pub mod bls377 { pub type Public = super::Public; /// BLS12-377 signature. pub type Signature = super::Signature; + + impl super::HardJunctionId for TinyBLS377 { + const ID: &'static str = "BLS12377HDKD"; + } } /// BLS-381 specialized types @@ -69,11 +73,15 @@ pub mod bls381 { pub type Public = super::Public; /// BLS12-381 signature. pub type Signature = super::Signature; + + impl super::HardJunctionId for TinyBLS381 { + const ID: &'static str = "BLS12381HDKD"; + } } -trait BlsBound: EngineBLS + Send + Sync + 'static {} +trait BlsBound: EngineBLS + HardJunctionId + Send + Sync + 'static {} -impl BlsBound for T {} +impl BlsBound for T {} // Secret key serialized size #[cfg(feature = "full_crypto")] @@ -399,10 +407,14 @@ impl Clone for Pair { } } +trait HardJunctionId { + const ID: &'static str; +} + /// Derive a single hard junction. #[cfg(feature = "full_crypto")] -fn derive_hard_junction(secret_seed: &Seed, cc: &[u8; 32]) -> Seed { - ("BLS12377HDKD", secret_seed, cc).using_encoded(sp_core_hashing::blake2_256) +fn derive_hard_junction(secret_seed: &Seed, cc: &[u8; 32]) -> Seed { + (T::ID, secret_seed, cc).using_encoded(sp_core_hashing::blake2_256) } #[cfg(feature = "full_crypto")] @@ -435,7 +447,7 @@ impl TraitPair for Pair { for j in path { match j { DeriveJunction::Soft(_cc) => return Err(DeriveError::SoftKeyInPath), - DeriveJunction::Hard(cc) => acc = derive_hard_junction(&acc, &cc), + DeriveJunction::Hard(cc) => acc = derive_hard_junction::(&acc, &cc), } } Ok((Self::from_seed(&acc), Some(acc))) From da36af4cd4ae6f3f5bddf7cddf55358a261faf17 Mon Sep 17 00:00:00 2001 From: Skalman Date: Thu, 13 Apr 2023 10:25:46 -0400 Subject: [PATCH 26/35] update to new bls-like --- Cargo.lock | 994 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 561 insertions(+), 433 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e72a4b6b43190..e6b652698d6ce 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -51,18 +51,18 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", ] [[package]] name = "aead" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ "crypto-common", - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -95,7 +95,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241" dependencies = [ "cfg-if", - "cipher 0.4.3", + "cipher 0.4.4", "cpufeatures", ] @@ -119,9 +119,9 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c" dependencies = [ - "aead 0.5.1", + "aead 0.5.2", "aes 0.8.2", - "cipher 0.4.3", + "cipher 0.4.4", "ctr 0.9.2", "ghash 0.5.0", "subtle", @@ -153,7 +153,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", "once_cell", "version_check", ] @@ -165,7 +165,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.8", + "getrandom 0.2.9", "once_cell", "version_check", ] @@ -203,17 +203,51 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-wincon", + "concolor-override", + "concolor-query", + "is-terminal", + "utf8parse", +] + [[package]] name = "anstyle" version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" +[[package]] +name = "anstyle-parse" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-wincon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa" +dependencies = [ + "anstyle", + "windows-sys 0.45.0", +] + [[package]] name = "anyhow" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" +checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "approx" @@ -373,9 +407,9 @@ checksum = "f52f63c5c1316a16a4b35eaac8b76a98248961a533f061684cb2a7cb0eafb6c6" [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" @@ -407,9 +441,9 @@ dependencies = [ [[package]] name = "asn1-rs" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6690c370453db30743b373a60ba498fc0d6d83b11f4abfd87a84a075db5dd4" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" dependencies = [ "asn1-rs-derive 0.4.0", "asn1-rs-impl", @@ -458,9 +492,9 @@ dependencies = [ [[package]] name = "asn1_der" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22d1f4b888c298a027c99dc9048015fac177587de20fc30232a057dfbe24a21" +checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" [[package]] name = "assert_cmd" @@ -496,39 +530,38 @@ dependencies = [ [[package]] name = "async-io" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock", "autocfg", + "cfg-if", "concurrent-queue", "futures-lite", - "libc", "log", "parking", "polling", + "rustix 0.37.11", "slab", "socket2", "waker-fn", - "windows-sys 0.42.0", ] [[package]] name = "async-lock" -version = "2.6.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685" +checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7" dependencies = [ "event-listener", - "futures-lite", ] [[package]] name = "async-stream" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad445822218ce64be7a341abfb0b1ea43b5c23aa83902542a4542e78309d8e5e" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", @@ -537,24 +570,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4655ae1a7b0cdf149156f780c5bf3f1352bc53cbd9e0a361a7ef7b22947e965" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] name = "async-trait" -version = "0.1.64" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] @@ -572,9 +605,9 @@ dependencies = [ [[package]] name = "atomic-waker" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" [[package]] name = "atty" @@ -646,9 +679,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "basic-toml" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e819b667739967cd44d308b8c7b71305d8bb0729ac44a248aa08f33d01950b4" +checksum = "5c0de75129aa8d0cceaf750b89013f0e08804d6ec61416da787b35ad0d7cddf1" dependencies = [ "serde", ] @@ -783,7 +816,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -792,7 +825,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -823,7 +856,7 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bls-like" version = "0.1.0" -source = "git+https://github.com/w3f/bls#574f617b92e9ae3f204cb5282bcc30af401e77c4" +source = "git+https://github.com/w3f/bls#ef5fa78daa9d31a3df49296ba73d70c9bf5c0cfd" dependencies = [ "ark-bls12-377", "ark-bls12-381", @@ -862,9 +895,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" +checksum = "c3d4260bcc2e8fc9df1eac4919a720effeb63a3f0952f5bf4944adfa18897f09" dependencies = [ "memchr", "once_cell", @@ -901,9 +934,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytemuck" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" +checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" [[package]] name = "byteorder" @@ -930,9 +963,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6031a462f977dd38968b6f23378356512feeace69cef817e1a4475108093cec3" +checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2" dependencies = [ "serde", ] @@ -948,13 +981,13 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.15.3" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07" +checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" dependencies = [ "camino", "cargo-platform", - "semver 1.0.16", + "semver 1.0.17", "serde", "serde_json", "thiserror", @@ -1046,7 +1079,7 @@ name = "chain-spec-builder" version = "2.0.0" dependencies = [ "ansi_term", - "clap 4.1.8", + "clap 4.2.1", "node-cli", "rand 0.8.5", "sc-chain-spec", @@ -1057,9 +1090,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "4e3c5919066adf22df73762e50cffcde3a758f2a848b113b586d1f86728b673b" dependencies = [ "iana-time-zone", "js-sys", @@ -1116,7 +1149,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -1125,14 +1158,14 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] name = "cipher" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ "crypto-common", "inout", @@ -1149,9 +1182,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ed9a53e5d4d9c573ae844bfac6872b159cb1d1585a83b29e7a64b7eef7332a" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", @@ -1172,39 +1205,47 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.8" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5" +checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3" dependencies = [ - "bitflags", + "clap_builder", "clap_derive", - "clap_lex 0.3.2", - "is-terminal", "once_cell", +] + +[[package]] +name = "clap_builder" +version = "4.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" +dependencies = [ + "anstream", + "anstyle", + "bitflags", + "clap_lex 0.4.1", "strsim", - "termcolor", ] [[package]] name = "clap_complete" -version = "4.1.4" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501ff0a401473ea1d4c3b125ff95506b62c5bc5768d818634195fbb7c4ad5ff4" +checksum = "01c22dcfb410883764b29953103d9ef7bb8fe21b3fa1158bc99986c2067294bd" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", ] [[package]] name = "clap_derive" -version = "4.1.8" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0" +checksum = "3f9644cd56d6b87dbe899ef8b053e331c0637664e9e21a33dfcdc36093f5c5c4" dependencies = [ "heck", - "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] @@ -1218,12 +1259,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09" -dependencies = [ - "os_str_bytes", -] +checksum = "8a2dd5a6fe8c6e3502f568a6353e5273bbb15193ad9a89e457b9970798efbea1" [[package]] name = "codespan-reporting" @@ -1246,11 +1284,26 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "concolor-override" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f" + +[[package]] +name = "concolor-query" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" +dependencies = [ + "windows-sys 0.45.0", +] + [[package]] name = "concurrent-queue" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" dependencies = [ "crossbeam-utils", ] @@ -1263,9 +1316,9 @@ checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913" [[package]] name = "constant_time_eq" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3ad85c1f65dc7b37604eb0e89748faf0b9653065f2a8ef69f96a687ec1e9279" +checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" [[package]] name = "core-foundation" @@ -1279,9 +1332,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "core2" @@ -1303,9 +1356,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" dependencies = [ "libc", ] @@ -1473,9 +1526,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if", "crossbeam-utils", @@ -1526,7 +1579,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -1538,7 +1591,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -1550,7 +1603,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "rand_core 0.6.4", "typenum", ] @@ -1561,7 +1614,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -1571,7 +1624,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -1600,7 +1653,7 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" dependencies = [ - "cipher 0.4.3", + "cipher 0.4.4", ] [[package]] @@ -1645,9 +1698,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d3488e7665a7a483b57e25bdd90d0aeb2bc7608c8d0346acf2ad3f1caf1d62" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -1657,9 +1710,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48fcaf066a053a41a81dfb14d57d99738b767febb8b735c3016e469fac5da690" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -1667,31 +1720,31 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] name = "cxxbridge-flags" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef98b8b717a829ca5603af80e1f9e2e48013ab227b68ef37872ef84ee479bf" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.91" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086c685979a698443656e5cf7856c95c642295a38599f12fb1ff76fb28d19892" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] name = "darling" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8" +checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" dependencies = [ "darling_core", "darling_macro", @@ -1699,9 +1752,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb" +checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", @@ -1713,9 +1766,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.14.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685" +checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" dependencies = [ "darling_core", "quote", @@ -1761,9 +1814,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc906908ea6458456e5eaa160a9c08543ec3d1e6f71e2235cedd660cb65f9df0" +checksum = "82b10af9f9f9f2134a42d3f8aa74658660f2e0234b0eb81bd171df8aa32779ed" dependencies = [ "const-oid", "zeroize", @@ -1785,11 +1838,11 @@ dependencies = [ [[package]] name = "der-parser" -version = "8.1.0" +version = "8.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" dependencies = [ - "asn1-rs 0.5.1", + "asn1-rs 0.5.2", "displaydoc", "nom", "num-bigint", @@ -1888,7 +1941,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -1898,6 +1951,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer 0.10.4", + "const-oid", "crypto-common", "subtle", ] @@ -1980,9 +2034,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "dtoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00704156a7de8df8da0911424e30c2049957b0a714542a44e05fe693dd85313" +checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169" [[package]] name = "dyn-clonable" @@ -2025,14 +2079,15 @@ dependencies = [ [[package]] name = "ecdsa" -version = "0.16.1" +version = "0.16.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1b0a1222f8072619e8a6b667a854020a03d363738303203c09468b3424a420a" +checksum = "a48e5d537b8a30c0b023116d981b16334be1485af7ca68db3a2b7024cbc957fd" dependencies = [ - "der 0.7.1", - "elliptic-curve 0.13.2", + "der 0.7.3", + "digest 0.10.6", + "elliptic-curve 0.13.4", "rfc6979 0.4.0", - "signature 2.0.0", + "signature 2.1.0", ] [[package]] @@ -2089,7 +2144,7 @@ dependencies = [ "der 0.6.1", "digest 0.10.6", "ff 0.12.1", - "generic-array 0.14.6", + "generic-array 0.14.7", "group 0.12.1", "hkdf", "pem-rfc7468", @@ -2102,19 +2157,19 @@ dependencies = [ [[package]] name = "elliptic-curve" -version = "0.13.2" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea5a92946e8614bb585254898bb7dd1ddad241ace60c52149e3765e34cc039d" +checksum = "75c71eaa367f2e5d556414a8eea812bc62985c879748d6403edabd9cb03f16e7" dependencies = [ "base16ct 0.2.0", "crypto-bigint 0.5.1", "digest 0.10.6", "ff 0.13.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "group 0.13.0", - "pkcs8 0.10.1", + "pkcs8 0.10.2", "rand_core 0.6.4", - "sec1 0.7.1", + "sec1 0.7.2", "subtle", "zeroize", ] @@ -2133,22 +2188,22 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e75d4cd21b95383444831539909fbb14b9dc3fdceb2a6f5d36577329a1f55ccb" +checksum = "0044ebdf7fbb2a772e0c0233a9d3173c5cd8af8ae7078d4c5188af44ffffaa4b" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" +checksum = "9d2c772ccdbdfd1967b4f5d79d17c98ebf92009fdcc838db7aa434462f600c26" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] @@ -2196,13 +2251,13 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d6a0976c999d473fe89ad888d5a284e55366d9dc9038b1ba2aa15128c4afa0" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" dependencies = [ "errno-dragonfly", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2295,9 +2350,9 @@ dependencies = [ [[package]] name = "fiat-crypto" -version = "0.1.17" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a214f5bb88731d436478f3ae1f8a277b62124089ba9fb67f4f93fb100ef73c90" +checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77" [[package]] name = "file-per-thread-logger" @@ -2311,14 +2366,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" dependencies = [ "cfg-if", "libc", "redox_syscall 0.2.16", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2448,7 +2503,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.1.8", + "clap 4.2.1", "comfy-table", "frame-benchmarking", "frame-support", @@ -2539,7 +2594,7 @@ dependencies = [ name = "frame-election-solution-type-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", @@ -2865,9 +2920,9 @@ checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ "fastrand", "futures-core", @@ -2886,7 +2941,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.14", ] [[package]] @@ -2969,9 +3024,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -3001,9 +3056,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", "libc", @@ -3260,7 +3315,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "hmac 0.8.1", ] @@ -3335,9 +3390,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" dependencies = [ "bytes", "futures-channel", @@ -3374,16 +3429,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows 0.48.0", ] [[package]] @@ -3435,9 +3490,9 @@ dependencies = [ [[package]] name = "if-watch" -version = "3.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba7abdbb86e485125dad06c2691e1e393bf3b08c7b743b43aa162a00fd39062e" +checksum = "a9465340214b296cd17a0009acdb890d6160010b8adf8f78a00d0d7ab270f79f" dependencies = [ "async-io", "core-foundation", @@ -3449,7 +3504,7 @@ dependencies = [ "rtnetlink", "system-configuration", "tokio", - "windows", + "windows 0.34.0", ] [[package]] @@ -3483,9 +3538,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -3504,7 +3559,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -3552,12 +3607,13 @@ checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "io-lifetimes" -version = "1.0.5" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" dependencies = [ + "hermit-abi 0.3.1", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -3580,20 +3636,20 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", - "io-lifetimes 1.0.5", - "rustix 0.36.8", - "windows-sys 0.45.0", + "io-lifetimes 1.0.10", + "rustix 0.37.11", + "windows-sys 0.48.0", ] [[package]] @@ -3607,9 +3663,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" [[package]] name = "jobserver" @@ -3755,13 +3811,13 @@ dependencies = [ [[package]] name = "k256" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955890845095ccf31ef83ad41a05aabb4d8cc23dc3cac5a9f5c89cf26dd0da75" +checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" dependencies = [ "cfg-if", - "ecdsa 0.16.1", - "elliptic-curve 0.13.2", + "ecdsa 0.16.6", + "elliptic-curve 0.13.4", "once_cell", "sha2 0.10.6", ] @@ -3941,9 +3997,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.140" +version = "0.2.141" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" [[package]] name = "libgit2-sys" @@ -3981,14 +4037,14 @@ checksum = "348108ab3fba42ec82ff6e9564fc4ca0247bdccdc68dd8af9764bbc79c3c8ffb" [[package]] name = "libp2p" -version = "0.50.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e0a0d2f693675f49ded13c5d510c48b78069e23cbd9108d7ccd59f6dc568819" +checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8" dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.8", + "getrandom 0.2.9", "instant", "libp2p-core 0.38.0", "libp2p-dns", @@ -3997,7 +4053,7 @@ dependencies = [ "libp2p-mdns", "libp2p-metrics", "libp2p-mplex", - "libp2p-noise 0.41.0", + "libp2p-noise", "libp2p-ping", "libp2p-quic", "libp2p-request-response", @@ -4049,36 +4105,30 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.39.0" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881d9a54e97d97cdaa4125d48269d97ca8c40e5fefec6b85b30440dc60cc551f" +checksum = "9b7f8b7d65c070a5a1b5f8f0510648189da08f787b8963f8e21219e0710733af" dependencies = [ - "asn1_der", - "bs58", - "ed25519-dalek", "either", "fnv", "futures", "futures-timer", "instant", + "libp2p-identity", "log", - "multiaddr 0.17.0", + "multiaddr 0.17.1", "multihash 0.17.0", "multistream-select", "once_cell", "parking_lot 0.12.1", "pin-project", - "prost", - "prost-build", + "quick-protobuf", "rand 0.8.5", "rw-stream-sink", - "sec1 0.3.0", - "sha2 0.10.6", "smallvec", "thiserror", "unsigned-varint", "void", - "zeroize", ] [[package]] @@ -4116,6 +4166,24 @@ dependencies = [ "void", ] +[[package]] +name = "libp2p-identity" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a8ea433ae0cea7e3315354305237b9897afe45278b2118a7a57ca744e70fd27" +dependencies = [ + "bs58", + "ed25519-dalek", + "log", + "multiaddr 0.17.1", + "multihash 0.17.0", + "prost", + "quick-protobuf", + "rand 0.8.5", + "thiserror", + "zeroize", +] + [[package]] name = "libp2p-kad" version = "0.42.1" @@ -4219,29 +4287,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "libp2p-noise" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1216f9ec823ac7a2289b954674c54cbce81c9e45920b4fcf173018ede4295246" -dependencies = [ - "bytes", - "curve25519-dalek 3.2.0", - "futures", - "libp2p-core 0.39.0", - "log", - "once_cell", - "prost", - "prost-build", - "rand 0.8.5", - "sha2 0.10.6", - "snow", - "static_assertions", - "thiserror", - "x25519-dalek 1.1.1", - "zeroize", -] - [[package]] name = "libp2p-ping" version = "0.41.0" @@ -4260,15 +4305,15 @@ dependencies = [ [[package]] name = "libp2p-quic" -version = "0.7.0-alpha.2" +version = "0.7.0-alpha" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5971f629ff7519f4d4889a7c981f0dc09c6ad493423cd8a13ee442de241bc8c8" +checksum = "01e7c867e95c8130667b24409d236d37598270e6da69b3baf54213ba31ffca59" dependencies = [ "bytes", "futures", "futures-timer", "if-watch", - "libp2p-core 0.39.0", + "libp2p-core 0.38.0", "libp2p-tls", "log", "parking_lot 0.12.1", @@ -4348,13 +4393,14 @@ dependencies = [ [[package]] name = "libp2p-tls" -version = "0.1.0-alpha.2" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9baf6f6292149e124ee737d9a79dbee783f29473fc368c7faad9d157841078a" +checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.0", + "libp2p-core 0.39.1", + "libp2p-identity", "rcgen 0.10.0", "ring", "rustls 0.20.8", @@ -4380,9 +4426,9 @@ dependencies = [ [[package]] name = "libp2p-webrtc" -version = "0.4.0-alpha.2" +version = "0.4.0-alpha" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4401ec550d36f413310ba5d4bf564bb21f89fb1601cadb32b2300f8bc1eb5b" +checksum = "cdb6cd86dd68cba72308ea05de1cebf3ba0ae6e187c40548167955d4e3970f6a" dependencies = [ "async-trait", "asynchronous-codec", @@ -4391,10 +4437,10 @@ dependencies = [ "futures-timer", "hex", "if-watch", - "libp2p-core 0.39.0", - "libp2p-noise 0.42.0", + "libp2p-core 0.38.0", + "libp2p-noise", "log", - "multihash 0.17.0", + "multihash 0.16.3", "prost", "prost-build", "prost-codec", @@ -4708,11 +4754,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" +checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.36.8", + "rustix 0.37.11", ] [[package]] @@ -4846,9 +4892,9 @@ dependencies = [ [[package]] name = "mockall" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4a1c770583dac7ab5e2f6c139153b783a53a1bbee9729613f193e59828326" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ "cfg-if", "downcast", @@ -4861,9 +4907,9 @@ dependencies = [ [[package]] name = "mockall_derive" -version = "0.11.3" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "832663583d5fa284ca8810bf7015e46c9fff9622d3cf34bd1eea5003fec06dd0" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ "cfg-if", "proc-macro2", @@ -4891,13 +4937,14 @@ dependencies = [ [[package]] name = "multiaddr" -version = "0.17.0" +version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b53e0cc5907a5c216ba6584bf74be8ab47d6d6289f72793b2dddbf15dc3bf8c" +checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" dependencies = [ "arrayref", "byteorder", "data-encoding", + "log", "multibase", "multihash 0.17.0", "percent-encoding", @@ -4984,9 +5031,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.1" +version = "0.32.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6515c882ebfddccaa73ead7320ca28036c4bc84c9bcca3cc0cbba8efe89223a" +checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511" dependencies = [ "approx", "matrixmultiply", @@ -5073,9 +5120,9 @@ dependencies = [ [[package]] name = "netlink-sys" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "260e21fbb6f3d253a14df90eb0000a6066780a15dd901a7519ce02d77a94985b" +checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" dependencies = [ "bytes", "futures", @@ -5115,7 +5162,7 @@ name = "node-bench" version = "0.9.0-dev" dependencies = [ "array-bytes", - "clap 4.1.8", + "clap 4.2.1", "derive_more", "fs_extra", "futures", @@ -5152,7 +5199,7 @@ version = "3.0.0-dev" dependencies = [ "array-bytes", "assert_cmd", - "clap 4.1.8", + "clap 4.2.1", "clap_complete", "criterion", "frame-benchmarking-cli", @@ -5274,7 +5321,7 @@ dependencies = [ name = "node-inspect" version = "0.9.0-dev" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "parity-scale-codec", "sc-cli", "sc-client-api", @@ -5333,7 +5380,7 @@ dependencies = [ name = "node-runtime-generate-bags" version = "3.0.0" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "generate-bags", "kitchensink-runtime", ] @@ -5342,7 +5389,7 @@ dependencies = [ name = "node-template" version = "4.0.0-dev" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", @@ -5618,7 +5665,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" dependencies = [ - "asn1-rs 0.5.1", + "asn1-rs 0.5.2", ] [[package]] @@ -5653,9 +5700,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "os_str_bytes" -version = "6.4.1" +version = "6.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" +checksum = "ceedf44fb00f2d1984b0bc98102627ce622e083e49a5bacdb3e514fa4238e267" [[package]] name = "output_vt100" @@ -7288,9 +7335,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" [[package]] name = "parking_lot" @@ -7342,9 +7389,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" +checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" [[package]] name = "pbkdf2" @@ -7396,9 +7443,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.5" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "028accff104c4e513bad663bbcd2ad7cfd5304144404c31ed0a77ac103d00660" +checksum = "7b1403e8401ad5dedea73c626b99758535b342502f8d1e361f4a2dd952749122" dependencies = [ "thiserror", "ucd-trie", @@ -7406,9 +7453,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.5" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ac3922aac69a40733080f53c1ce7f91dcf57e1a5f6c52f421fadec7fbdc4b69" +checksum = "be99c4c1d2fc2769b1d00239431d711d08f6efedcecb8b6e30707160aee99c15" dependencies = [ "pest", "pest_generator", @@ -7416,22 +7463,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.5" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06646e185566b5961b4058dd107e0a7f56e77c3f484549fb119867773c0f202" +checksum = "e56094789873daa36164de2e822b3888c6ae4b4f9da555a1103587658c805b1e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] name = "pest_meta" -version = "2.5.5" +version = "2.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f60b2ba541577e2a0c307c8f39d1439108120eb7903adeb6497fa880c59616" +checksum = "6733073c7cff3d8459fda0e42f13a047870242aed8b509fe98000928975f359e" dependencies = [ "once_cell", "pest", @@ -7498,12 +7545,12 @@ dependencies = [ [[package]] name = "pkcs8" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d2820d87d2b008616e5c27212dd9e0e694fb4c6b522de06094106813328cb49" +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.1", - "spki 0.7.0", + "der 0.7.3", + "spki 0.7.1", ] [[package]] @@ -7554,16 +7601,18 @@ dependencies = [ [[package]] name = "polling" -version = "2.5.2" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6" +checksum = "4be1c66a6add46bff50935c313dae30a5030cf8385c5206e8a95e9e9def974aa" dependencies = [ "autocfg", + "bitflags", "cfg-if", + "concurrent-queue", "libc", "log", - "wepoll-ffi", - "windows-sys 0.42.0", + "pin-project-lite 0.2.9", + "windows-sys 0.48.0", ] [[package]] @@ -7641,9 +7690,9 @@ checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" [[package]] name = "predicates-tree" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ "predicates-core", "termtree", @@ -7663,9 +7712,9 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.1.23" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78" +checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ "proc-macro2", "syn 1.0.109", @@ -7777,9 +7826,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48e50df39172a3e7eb17e14642445da64996989bc212b583015435d39a58537" +checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" dependencies = [ "bytes", "prost-derive", @@ -7787,9 +7836,9 @@ dependencies = [ [[package]] name = "prost-build" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c828f93f5ca4826f97fedcbd3f9a536c16b12cff3dbbb4a007f932bbad95b12" +checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270" dependencies = [ "bytes", "heck", @@ -7822,9 +7871,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea9b0f8cbe5e15a8a042d030bd96668db28ecb567ec37d691971ff5731d2b1b" +checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools", @@ -7835,9 +7884,9 @@ dependencies = [ [[package]] name = "prost-types" -version = "0.11.8" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379119666929a1afd7a043aa6cf96fa67a6dce9af60c88095a4686dbce4c9c88" +checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13" dependencies = [ "prost", ] @@ -7857,6 +7906,15 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +[[package]] +name = "quick-protobuf" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6da84cc204722a989e01ba2f6e1e276e190f22263d0cb6ce8526fcdb0d2e1f" +dependencies = [ + "byteorder", +] + [[package]] name = "quickcheck" version = "1.0.3" @@ -7879,9 +7937,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4ced82a24bb281af338b9e8f94429b6eca01b4e66d899f40031f074e74c9" +checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c" dependencies = [ "bytes", "rand 0.8.5", @@ -7969,7 +8027,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -8008,9 +8066,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b" dependencies = [ "either", "rayon-core", @@ -8018,9 +8076,9 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.2" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d" dependencies = [ "crossbeam-channel", "crossbeam-deque", @@ -8077,29 +8135,29 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", "redox_syscall 0.2.16", "thiserror", ] [[package]] name = "ref-cast" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed" +checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f" +checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] @@ -8271,9 +8329,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" [[package]] name = "rustc-hash" @@ -8302,7 +8360,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.16", + "semver 1.0.17", ] [[package]] @@ -8330,13 +8388,13 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.8" +version = "0.36.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" +checksum = "e0af200a3324fa5bcd922e84e9b55a298ea9f431a489f01961acdebc6e908f25" dependencies = [ "bitflags", - "errno 0.2.8", - "io-lifetimes 1.0.5", + "errno 0.3.1", + "io-lifetimes 1.0.10", "libc", "linux-raw-sys 0.1.4", "windows-sys 0.45.0", @@ -8344,16 +8402,16 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.7" +version = "0.37.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aae838e49b3d63e9274e1c01833cc8139d3fec468c3b84688c628f44b1ae11d" +checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" dependencies = [ "bitflags", - "errno 0.3.0", - "io-lifetimes 1.0.5", + "errno 0.3.1", + "io-lifetimes 1.0.10", "libc", "linux-raw-sys 0.3.1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -8404,9 +8462,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" +checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" [[package]] name = "rusty-fork" @@ -8432,9 +8490,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" [[package]] name = "safe-mix" @@ -8578,7 +8636,7 @@ version = "0.10.0-dev" dependencies = [ "array-bytes", "chrono", - "clap 4.1.8", + "clap 4.2.1", "fdlimit", "futures", "futures-timer", @@ -9118,7 +9176,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "paste", - "rustix 0.36.8", + "rustix 0.36.12", "sc-allocator", "sc-executor-common", "sc-runtime-test", @@ -9693,7 +9751,7 @@ dependencies = [ name = "sc-storage-monitor" version = "0.1.0" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "fs4", "futures", "log", @@ -9935,9 +9993,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" +checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "sct" @@ -9979,7 +10037,7 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct 0.1.1", "der 0.6.1", - "generic-array 0.14.6", + "generic-array 0.14.7", "pkcs8 0.9.0", "subtle", "zeroize", @@ -9987,14 +10045,14 @@ dependencies = [ [[package]] name = "sec1" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48518a2b5775ba8ca5b46596aae011caa431e6ce7e4a67ead66d92f08884220e" +checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" dependencies = [ "base16ct 0.2.0", - "der 0.7.1", - "generic-array 0.14.6", - "pkcs8 0.10.1", + "der 0.7.3", + "generic-array 0.14.7", + "pkcs8 0.10.2", "subtle", "zeroize", ] @@ -10069,9 +10127,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "bebd363326d05ec3e2f532ab7660680f3b02130d780c299bca73469d521bc0ed" dependencies = [ "serde", ] @@ -10084,29 +10142,29 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.152" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.152" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] name = "serde_json" -version = "1.0.93" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -10175,9 +10233,9 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "54c2bb1a323307527314a36bfb73f24febb08ce2b8a554bf4ffd6f51ad15198c" dependencies = [ "digest 0.10.6", "keccak", @@ -10219,9 +10277,9 @@ dependencies = [ [[package]] name = "signature" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fe458c98333f9c8152221191a77e2a44e8325d0193484af2e9421a53019e57d" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ "digest 0.10.6", "rand_core 0.6.4", @@ -10229,9 +10287,9 @@ dependencies = [ [[package]] name = "simba" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50582927ed6f77e4ac020c057f37a268fc6aebc29225050365aacbb9deeeddc4" +checksum = "061507c94fc6ab4ba1c9a0305018408e312e17c041eb63bef8aa726fa33aceae" dependencies = [ "approx", "num-complex", @@ -10811,7 +10869,7 @@ dependencies = [ name = "sp-npos-elections-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "honggfuzz", "parity-scale-codec", "rand 0.8.5", @@ -11169,9 +11227,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "spin" -version = "0.9.5" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dccf47db1b41fa1573ed27ccf5e08e3ca771cb994f776668c5ebda893b248fc" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spki" @@ -11185,12 +11243,12 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0445c905640145c7ea8c1993555957f65e7c46d0535b91ba501bc9bfc85522f" +checksum = "37a5be806ab6f127c3da44b7378837ebf01dadca8510a0e572460216b228bd0e" dependencies = [ "base64ct", - "der 0.7.1", + "der 0.7.3", ] [[package]] @@ -11299,7 +11357,7 @@ dependencies = [ name = "subkey" version = "3.0.0" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "sc-cli", ] @@ -11341,7 +11399,7 @@ dependencies = [ name = "substrate-frame-cli" version = "4.0.0-dev" dependencies = [ - "clap 4.1.8", + "clap 4.2.1", "frame-support", "frame-system", "sc-cli", @@ -11613,9 +11671,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.13" +version = "2.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec" +checksum = "fcf316d5356ed6847742d036f8a39c3b8435cac10bd528a4bd461928a6ab34d5" dependencies = [ "proc-macro2", "quote", @@ -11676,7 +11734,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall 0.3.5", - "rustix 0.37.7", + "rustix 0.37.11", "windows-sys 0.45.0", ] @@ -11691,9 +11749,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "textwrap" @@ -11703,22 +11761,22 @@ checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d" [[package]] name = "thiserror" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.38" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.14", ] [[package]] @@ -11874,7 +11932,7 @@ checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.14", ] [[package]] @@ -12190,7 +12248,7 @@ version = "0.10.0-dev" dependencies = [ "assert_cmd", "async-trait", - "clap 4.1.8", + "clap 4.2.1", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -12226,9 +12284,9 @@ dependencies = [ [[package]] name = "trybuild" -version = "1.0.77" +version = "1.0.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44da5a6f2164c8e14d3bbc0657d69c5966af9f5f6930d4f600b1f5c4a673413" +checksum = "501dbdbb99861e4ab6b60eb6a7493956a9defb644fd034bc4a5ef27c693c8a3a" dependencies = [ "basic-toml", "dissimilar", @@ -12303,15 +12361,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.10" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" [[package]] name = "unicode-normalization" @@ -12340,7 +12398,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -12383,13 +12441,19 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "utf8parse" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" + [[package]] name = "uuid" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" +checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.9", ] [[package]] @@ -12442,12 +12506,11 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.2" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" dependencies = [ "same-file", - "winapi", "winapi-util", ] @@ -12547,9 +12610,9 @@ checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasm-encoder" -version = "0.24.1" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f7d56227d910901ce12dfd19acc40c12687994dfb3f57c90690f80be946ec5" +checksum = "4eff853c4f09eec94d76af527eddad4e9de13b11d6286a1ef7134bc30135a2b7" dependencies = [ "leb128", ] @@ -12645,7 +12708,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e61a7006b0fdf24f6bbe8dcfdad5ca1b350de80061fb2827f31c82fbbb9565a" dependencies = [ - "spin 0.9.5", + "spin 0.9.8", "wasmi_arena", "wasmi_core 0.12.0", "wasmparser-nostd", @@ -12760,7 +12823,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.8", + "rustix 0.36.12", "serde", "sha2 0.10.6", "toml", @@ -12840,7 +12903,7 @@ checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.36.8", + "rustix 0.36.12", ] [[package]] @@ -12871,7 +12934,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.36.8", + "rustix 0.36.12", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -12892,9 +12955,9 @@ dependencies = [ [[package]] name = "wast" -version = "54.0.1" +version = "55.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d48d9d731d835f4f8dacbb8de7d47be068812cb9877f5c60d408858778d8d2a" +checksum = "4984d3e1406571f4930ba5cf79bd70f75f41d0e87e17506e0bd19b0e5d085f05" dependencies = [ "leb128", "memchr", @@ -12904,9 +12967,9 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.60" +version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1db2e3ed05ea31243761439194bec3af6efbbaf87c4c8667fb879e4f23791a0" +checksum = "af2b53f4da14db05d32e70e9c617abdf6620c575bd5dd972b7400037b4df2091" dependencies = [ "wast", ] @@ -13020,7 +13083,7 @@ dependencies = [ "byteorder", "ccm", "curve25519-dalek 3.2.0", - "der-parser 8.1.0", + "der-parser 8.2.0", "elliptic-curve 0.12.3", "hkdf", "hmac 0.12.1", @@ -13162,15 +13225,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "wepoll-ffi" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" -dependencies = [ - "cc", -] - [[package]] name = "which" version = "4.4.0" @@ -13242,19 +13296,28 @@ dependencies = [ "windows_x86_64_msvc 0.34.0", ] +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-sys" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -13263,29 +13326,59 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", ] [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" @@ -13295,9 +13388,15 @@ checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" @@ -13307,9 +13406,15 @@ checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" @@ -13319,9 +13424,15 @@ checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" @@ -13331,15 +13442,27 @@ checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" @@ -13349,9 +13472,15 @@ checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winreg" @@ -13418,10 +13547,10 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" dependencies = [ - "asn1-rs 0.5.1", + "asn1-rs 0.5.2", "base64 0.13.1", "data-encoding", - "der-parser 8.1.0", + "der-parser 8.2.0", "lazy_static", "nom", "oid-registry 0.6.1", @@ -13452,32 +13581,31 @@ checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" [[package]] name = "yasna" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aed2e7a52e3744ab4d0c05c20aa065258e84c49fd4226f5191b2ed29712710b4" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ "time 0.3.20", ] [[package]] name = "zeroize" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure", + "syn 2.0.14", ] [[package]] @@ -13501,9 +13629,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.7+zstd.1.5.4" +version = "2.0.8+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" dependencies = [ "cc", "libc", From 0c7a5f72900ed5eb619833197d61f7f1e39c036c Mon Sep 17 00:00:00 2001 From: Skalman Date: Sun, 16 Apr 2023 07:19:15 -0400 Subject: [PATCH 27/35] =?UTF-8?q?bls-like=20=E2=86=92=20w3f-bls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 47 +++++++++++++++++++------------------- primitives/core/Cargo.toml | 2 +- primitives/core/src/bls.rs | 16 ++++++------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e6b652698d6ce..7be067fcf4a19 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -853,28 +853,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" -[[package]] -name = "bls-like" -version = "0.1.0" -source = "git+https://github.com/w3f/bls#ef5fa78daa9d31a3df49296ba73d70c9bf5c0cfd" -dependencies = [ - "ark-bls12-377", - "ark-bls12-381", - "ark-ec", - "ark-ff", - "ark-serialize", - "ark-serialize-derive", - "arrayref", - "digest 0.10.6", - "rand 0.8.5", - "rand_chacha 0.3.1", - "rand_core 0.6.4", - "sha2 0.10.6", - "sha3", - "thiserror", - "zeroize", -] - [[package]] name = "bounded-collections" version = "0.1.5" @@ -10656,7 +10634,6 @@ dependencies = [ "array-bytes", "bitflags", "blake2", - "bls-like", "bounded-collections", "bs58", "criterion", @@ -10694,6 +10671,7 @@ dependencies = [ "substrate-bip39", "thiserror", "tiny-bip39", + "w3f-bls", "zeroize", ] @@ -12480,6 +12458,29 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "w3f-bls" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "218be9ac605377528b7d61801877857f790bc5522774fcca19ebf496049740b2" +dependencies = [ + "ark-bls12-377", + "ark-bls12-381", + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-serialize-derive", + "arrayref", + "digest 0.10.6", + "rand 0.8.5", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "sha2 0.10.6", + "sha3", + "thiserror", + "zeroize", +] + [[package]] name = "wait-timeout" version = "0.2.0" diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 6522e391c0e48..59d7ccdba1402 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -45,7 +45,7 @@ array-bytes = { version = "4.1", optional = true } ed25519-zebra = { version = "3.1.0", default-features = false, optional = true } blake2 = { version = "0.10.4", default-features = false, optional = true } schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false, optional = true } -bls-like = {git = "https://github.com/w3f/bls", default-features = false} +w3f-bls = { version = "0.1.0", default-features = false} libsecp256k1 = { version = "0.7", default-features = false, features = ["static-context"], optional = true } merlin = { version = "2.0", default-features = false, optional = true } secp256k1 = { version = "0.24.0", default-features = false, features = ["recovery", "alloc"], optional = true } diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 0494239196c55..6e5d099eeed8c 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -26,9 +26,9 @@ use crate::crypto::{DeriveError, DeriveJunction, Pair as TraitPair, SecretString #[cfg(feature = "full_crypto")] use sp_std::vec::Vec; -use bls_like::{DoublePublicKey, DoubleSignature, EngineBLS, SerializableToBytes, TinyBLS381}; +use w3f_bls::{DoublePublicKey, DoubleSignature, EngineBLS, SerializableToBytes, TinyBLS381}; #[cfg(feature = "full_crypto")] -use bls_like::{DoublePublicKeyScheme, Keypair, Message, SecretKey}; +use w3f_bls::{DoublePublicKeyScheme, Keypair, Message, SecretKey}; use codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; #[cfg(feature = "std")] @@ -40,7 +40,7 @@ use sp_std::{convert::TryFrom, marker::PhantomData, ops::Deref}; /// BLS-377 specialized types pub mod bls377 { use crate::crypto::CryptoTypeId; - use bls_like::TinyBLS377; + use w3f_bls::TinyBLS377; /// An identifier used to match public keys against BLS12-377 keys pub const CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"bls7"); @@ -61,7 +61,7 @@ pub mod bls377 { /// BLS-381 specialized types pub mod bls381 { use crate::crypto::CryptoTypeId; - use bls_like::TinyBLS381; + use w3f_bls::TinyBLS381; /// An identifier used to match public keys against BLS12-381 keys pub const CRYPTO_ID: CryptoTypeId = CryptoTypeId(*b"bls8"); @@ -430,9 +430,9 @@ impl TraitPair for Pair { if seed_slice.len() != SECRET_KEY_SERIALIZED_SIZE { return Err(SecretStringError::InvalidSeedLength) } - let secret = bls_like::SecretKey::from_seed(seed_slice); + let secret = w3f_bls::SecretKey::from_seed(seed_slice); let public = secret.into_public(); - Ok(Pair(bls_like::Keypair { secret, public })) + Ok(Pair(w3f_bls::Keypair { secret, public })) } fn derive>( @@ -479,7 +479,7 @@ impl TraitPair for Pair { Ok(pk) => pk, Err(_) => return false, }; - let public_key = match bls_like::double::DoublePublicKey::::from_bytes(&pubkey_array) { + let public_key = match w3f_bls::double::DoublePublicKey::::from_bytes(&pubkey_array) { Ok(pk) => pk, Err(_) => return false, }; @@ -488,7 +488,7 @@ impl TraitPair for Pair { Ok(s) => s, Err(_) => return false, }; - let sig = match bls_like::double::DoubleSignature::from_bytes(sig_array) { + let sig = match w3f_bls::double::DoubleSignature::from_bytes(sig_array) { Ok(s) => s, Err(_) => return false, }; From 9218d9ced85ea6e1b9318a965a93a8e47c9cade6 Mon Sep 17 00:00:00 2001 From: Davide Galassi Date: Sun, 16 Apr 2023 18:24:56 +0200 Subject: [PATCH 28/35] Make clippy happy --- primitives/core/src/bls.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 6e5d099eeed8c..81c8ee779d03a 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -26,13 +26,13 @@ use crate::crypto::{DeriveError, DeriveJunction, Pair as TraitPair, SecretString #[cfg(feature = "full_crypto")] use sp_std::vec::Vec; -use w3f_bls::{DoublePublicKey, DoubleSignature, EngineBLS, SerializableToBytes, TinyBLS381}; -#[cfg(feature = "full_crypto")] -use w3f_bls::{DoublePublicKeyScheme, Keypair, Message, SecretKey}; use codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; #[cfg(feature = "std")] use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; +use w3f_bls::{DoublePublicKey, DoubleSignature, EngineBLS, SerializableToBytes, TinyBLS381}; +#[cfg(feature = "full_crypto")] +use w3f_bls::{DoublePublicKeyScheme, Keypair, Message, SecretKey}; use sp_runtime_interface::pass_by::PassByInner; use sp_std::{convert::TryFrom, marker::PhantomData, ops::Deref}; From 58c2d9432f124d0465d6c09480bd2ecef909985d Mon Sep 17 00:00:00 2001 From: Skalman Date: Wed, 19 Apr 2023 14:06:37 -0400 Subject: [PATCH 29/35] update test vector after replacing hash and crop with hash to field. --- Cargo.lock | 180 ++++++++++++++++++------------------- primitives/core/Cargo.toml | 2 +- primitives/core/src/bls.rs | 8 +- 3 files changed, 95 insertions(+), 95 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7be067fcf4a19..d30d2b0f0e135 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -205,42 +205,51 @@ dependencies = [ [[package]] name = "anstream" -version = "0.2.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f" +checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371" dependencies = [ "anstyle", "anstyle-parse", + "anstyle-query", "anstyle-wincon", - "concolor-override", - "concolor-query", + "colorchoice", "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "0.3.5" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2" +checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" [[package]] name = "anstyle-parse" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116" +checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" dependencies = [ "utf8parse", ] +[[package]] +name = "anstyle-query" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +dependencies = [ + "windows-sys 0.48.0", +] + [[package]] name = "anstyle-wincon" -version = "0.2.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa" +checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd" dependencies = [ "anstyle", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -498,14 +507,14 @@ checksum = "155a5a185e42c6b77ac7b88a15143d930a9e9727a5b7b77eed417404ab15c247" [[package]] name = "assert_cmd" -version = "2.0.10" +version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0b2340f55d9661d76793b2bfc2eb0e62689bd79d067a95707ea762afd5e9dd" +checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151" dependencies = [ "anstyle", "bstr", "doc-comment", - "predicates 3.0.2", + "predicates 3.0.3", "predicates-core", "predicates-tree", "wait-timeout", @@ -542,7 +551,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.11", + "rustix 0.37.12", "slab", "socket2", "waker-fn", @@ -576,7 +585,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -587,7 +596,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -1057,7 +1066,7 @@ name = "chain-spec-builder" version = "2.0.0" dependencies = [ "ansi_term", - "clap 4.2.1", + "clap 4.2.4", "node-cli", "rand 0.8.5", "sc-chain-spec", @@ -1183,9 +1192,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.2.1" +version = "4.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3" +checksum = "956ac1f6381d8d82ab4684768f89c0ea3afe66925ceadb4eeb3fc452ffc55d62" dependencies = [ "clap_builder", "clap_derive", @@ -1194,9 +1203,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.2.1" +version = "4.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f" +checksum = "84080e799e54cff944f4b4a4b0e71630b0e0443b25b985175c7dddc1a859b749" dependencies = [ "anstream", "anstyle", @@ -1211,7 +1220,7 @@ version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01c22dcfb410883764b29953103d9ef7bb8fe21b3fa1158bc99986c2067294bd" dependencies = [ - "clap 4.2.1", + "clap 4.2.4", ] [[package]] @@ -1223,7 +1232,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -1251,6 +1260,12 @@ dependencies = [ "unicode-width", ] +[[package]] +name = "colorchoice" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" + [[package]] name = "comfy-table" version = "6.1.4" @@ -1262,21 +1277,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "concolor-override" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f" - -[[package]] -name = "concolor-query" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf" -dependencies = [ - "windows-sys 0.45.0", -] - [[package]] name = "concurrent-queue" version = "2.2.0" @@ -1698,7 +1698,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -1715,7 +1715,7 @@ checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -2166,22 +2166,22 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0044ebdf7fbb2a772e0c0233a9d3173c5cd8af8ae7078d4c5188af44ffffaa4b" +checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d2c772ccdbdfd1967b4f5d79d17c98ebf92009fdcc838db7aa434462f600c26" +checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -2481,7 +2481,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.2.1", + "clap 4.2.4", "comfy-table", "frame-benchmarking", "frame-support", @@ -2572,7 +2572,7 @@ dependencies = [ name = "frame-election-solution-type-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.2.1", + "clap 4.2.4", "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", @@ -2919,7 +2919,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -3136,9 +3136,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.16" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" +checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" dependencies = [ "bytes", "fnv", @@ -3368,9 +3368,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.25" +version = "0.14.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" dependencies = [ "bytes", "futures-channel", @@ -3626,7 +3626,7 @@ checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes 1.0.10", - "rustix 0.37.11", + "rustix 0.37.12", "windows-sys 0.48.0", ] @@ -4588,9 +4588,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59d8c75012853d2e872fb56bc8a2e53718e2cafe1a4c823143141c6d90c322f" +checksum = "3f508063cc7bb32987c71511216bd5a32be15bccb6a80b52df8b9d7f01fc3aa2" [[package]] name = "lite-json" @@ -4736,7 +4736,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.37.11", + "rustix 0.37.12", ] [[package]] @@ -5140,7 +5140,7 @@ name = "node-bench" version = "0.9.0-dev" dependencies = [ "array-bytes", - "clap 4.2.1", + "clap 4.2.4", "derive_more", "fs_extra", "futures", @@ -5177,7 +5177,7 @@ version = "3.0.0-dev" dependencies = [ "array-bytes", "assert_cmd", - "clap 4.2.1", + "clap 4.2.4", "clap_complete", "criterion", "frame-benchmarking-cli", @@ -5299,7 +5299,7 @@ dependencies = [ name = "node-inspect" version = "0.9.0-dev" dependencies = [ - "clap 4.2.1", + "clap 4.2.4", "parity-scale-codec", "sc-cli", "sc-client-api", @@ -5358,7 +5358,7 @@ dependencies = [ name = "node-runtime-generate-bags" version = "3.0.0" dependencies = [ - "clap 4.2.1", + "clap 4.2.4", "generate-bags", "kitchensink-runtime", ] @@ -5367,7 +5367,7 @@ dependencies = [ name = "node-template" version = "4.0.0-dev" dependencies = [ - "clap 4.2.1", + "clap 4.2.4", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", @@ -7449,7 +7449,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -7650,9 +7650,9 @@ dependencies = [ [[package]] name = "predicates" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c575290b64d24745b6c57a12a31465f0a66f3a4799686a6921526a33b0797965" +checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" dependencies = [ "anstyle", "difflib", @@ -8135,7 +8135,7 @@ checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -8307,9 +8307,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4a36c42d1873f9a77c53bde094f9664d9891bc604a45b4798fd2c389ed12e5b" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -8380,15 +8380,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.11" +version = "0.37.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77" +checksum = "722529a737f5a942fdbac3a46cee213053196737c5eaa3386d52e85b786f2659" dependencies = [ "bitflags", "errno 0.3.1", "io-lifetimes 1.0.10", "libc", - "linux-raw-sys 0.3.1", + "linux-raw-sys 0.3.2", "windows-sys 0.48.0", ] @@ -8614,7 +8614,7 @@ version = "0.10.0-dev" dependencies = [ "array-bytes", "chrono", - "clap 4.2.1", + "clap 4.2.4", "fdlimit", "futures", "futures-timer", @@ -9729,7 +9729,7 @@ dependencies = [ name = "sc-storage-monitor" version = "0.1.0" dependencies = [ - "clap 4.2.1", + "clap 4.2.4", "fs4", "futures", "log", @@ -10135,7 +10135,7 @@ checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -10847,7 +10847,7 @@ dependencies = [ name = "sp-npos-elections-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.2.1", + "clap 4.2.4", "honggfuzz", "parity-scale-codec", "rand 0.8.5", @@ -11335,7 +11335,7 @@ dependencies = [ name = "subkey" version = "3.0.0" dependencies = [ - "clap 4.2.1", + "clap 4.2.4", "sc-cli", ] @@ -11377,7 +11377,7 @@ dependencies = [ name = "substrate-frame-cli" version = "4.0.0-dev" dependencies = [ - "clap 4.2.1", + "clap 4.2.4", "frame-support", "frame-system", "sc-cli", @@ -11649,9 +11649,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.14" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf316d5356ed6847742d036f8a39c3b8435cac10bd528a4bd461928a6ab34d5" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" dependencies = [ "proc-macro2", "quote", @@ -11712,7 +11712,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall 0.3.5", - "rustix 0.37.11", + "rustix 0.37.12", "windows-sys 0.45.0", ] @@ -11754,7 +11754,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -11910,7 +11910,7 @@ checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -12226,7 +12226,7 @@ version = "0.10.0-dev" dependencies = [ "assert_cmd", "async-trait", - "clap 4.2.1", + "clap 4.2.4", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -12460,9 +12460,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "w3f-bls" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "218be9ac605377528b7d61801877857f790bc5522774fcca19ebf496049740b2" +checksum = "6b3d08454e3583f0e45ace3b48068d2d5efd4803c7e16f769ca314cce1a6eccf" dependencies = [ "ark-bls12-377", "ark-bls12-381", @@ -12956,9 +12956,9 @@ dependencies = [ [[package]] name = "wast" -version = "55.0.0" +version = "56.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4984d3e1406571f4930ba5cf79bd70f75f41d0e87e17506e0bd19b0e5d085f05" +checksum = "6b54185c051d7bbe23757d50fe575880a2426a2f06d2e9f6a10fd9a4a42920c0" dependencies = [ "leb128", "memchr", @@ -12968,9 +12968,9 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2b53f4da14db05d32e70e9c617abdf6620c575bd5dd972b7400037b4df2091" +checksum = "56681922808216ab86d96bb750f70d500b5a7800e41564290fd46bb773581299" dependencies = [ "wast", ] @@ -13606,7 +13606,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 59d7ccdba1402..d95f9c26cbf8a 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -45,7 +45,7 @@ array-bytes = { version = "4.1", optional = true } ed25519-zebra = { version = "3.1.0", default-features = false, optional = true } blake2 = { version = "0.10.4", default-features = false, optional = true } schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false, optional = true } -w3f-bls = { version = "0.1.0", default-features = false} +w3f-bls = { version = "0.1.2", default-features = false} libsecp256k1 = { version = "0.7", default-features = false, features = ["static-context"], optional = true } merlin = { version = "2.0", default-features = false, optional = true } secp256k1 = { version = "0.24.0", default-features = false, features = ["recovery", "alloc"], optional = true } diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 81c8ee779d03a..497c56b0ca091 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -558,7 +558,7 @@ mod test { ); let message = b""; let signature = - hex!("d1e3013161991e142d8751017d4996209c2ff8a9ee160f373733eda3b4b785ba6edce9f45f87104bbe07aa6aa6eb278063a6dd84e71b6f9ff7da6cf9a0cf175395312bd947d71efff5732bbfd206530695a84b78aba871705f494933e68f1a23c03e4cf57870a2ac0181dbba503ac503" + hex!("d1e3013161991e142d8751017d4996209c2ff8a9ee160f373733eda3b4b785ba6edce9f45f87104bbe07aa6aa6eb2780aa705efb2c13d3b317d6409d159d23bdc7cdd5c2a832d1551cf49d811d49c901495e527dbd532e3a462335ce2686009104aba7bc11c5b22be78f3198d2727a0b" ); let signature = Signature::unchecked_from(signature); assert!(pair.sign(&message[..]) == signature); @@ -581,15 +581,15 @@ mod test { ); let message = b""; let signature = - hex!("bbb395bbdee1a35930912034f5fde3b36df2835a0536c865501b0675776a1d5931a3bea2e66eff73b2546c6af2061a80c793682f8f4efe26350d5c754d690d76c4768a0387edec797164be22cda8541003ea83652abe05454470bbdc4de35f7903b03bba7839aceb897a13b128f38e0b" + hex!("bbb395bbdee1a35930912034f5fde3b36df2835a0536c865501b0675776a1d5931a3bea2e66eff73b2546c6af2061a8019223e4ebbbed661b2538e0f5823f2c708eb89c406beca8fcb53a5c13dbc7c0c42e4cf2be2942bba96ea29297915a06bd2b1b979c0e2ac8fd4ec684a6b5d110c" ); let expected_signature = Signature::unchecked_from(signature); println!("signature is {:?}", pair.sign(&message[..])); let signature = pair.sign(&message[..]); assert!(signature == expected_signature); assert!(Pair::verify(&signature, &message[..], &public)); - } - + +} #[test] fn generated_pair_should_work() { let (pair, _) = Pair::generate(); From 6041fec252f2ff0b2006340cda7982bef3d1e8d4 Mon Sep 17 00:00:00 2001 From: Skalman Date: Wed, 19 Apr 2023 14:27:34 -0400 Subject: [PATCH 30/35] cargo fmt --- primitives/core/src/bls.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index 497c56b0ca091..c772ff7649a78 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -588,8 +588,7 @@ mod test { let signature = pair.sign(&message[..]); assert!(signature == expected_signature); assert!(Pair::verify(&signature, &message[..], &public)); - -} + } #[test] fn generated_pair_should_work() { let (pair, _) = Pair::generate(); From b11659d9efbf81e5afa260314c8a4fca4eebcfc2 Mon Sep 17 00:00:00 2001 From: Robert Hambrock Date: Tue, 25 Apr 2023 14:13:26 +0200 Subject: [PATCH 31/35] account for #13972 --- primitives/core/src/bls.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/primitives/core/src/bls.rs b/primitives/core/src/bls.rs index c772ff7649a78..86db4525fb8ae 100644 --- a/primitives/core/src/bls.rs +++ b/primitives/core/src/bls.rs @@ -471,20 +471,17 @@ impl TraitPair for Pair { } fn verify>(sig: &Self::Signature, message: M, pubkey: &Self::Public) -> bool { - Self::verify_weak(&sig.inner[..], message.as_ref(), pubkey) - } - - fn verify_weak, M: AsRef<[u8]>>(sig: &[u8], message: M, pubkey: P) -> bool { - let pubkey_array: [u8; PUBLIC_KEY_SERIALIZED_SIZE] = match pubkey.as_ref().try_into() { - Ok(pk) => pk, - Err(_) => return false, - }; + let pubkey_array: [u8; PUBLIC_KEY_SERIALIZED_SIZE] = + match <[u8; PUBLIC_KEY_SERIALIZED_SIZE]>::try_from(pubkey.as_ref()) { + Ok(pk) => pk, + Err(_) => return false, + }; let public_key = match w3f_bls::double::DoublePublicKey::::from_bytes(&pubkey_array) { Ok(pk) => pk, Err(_) => return false, }; - let sig_array = match sig.try_into() { + let sig_array = match sig.inner[..].try_into() { Ok(s) => s, Err(_) => return false, }; From 3a9c5edbee46f9543b72a82a3fa6e78a77ec3e9d Mon Sep 17 00:00:00 2001 From: Robert Hambrock Date: Tue, 25 Apr 2023 12:35:22 +0200 Subject: [PATCH 32/35] hide BLS behind "bls_non_production" feature flag --- client/keystore/src/local.rs | 6 +++++- primitives/application-crypto/src/lib.rs | 1 + primitives/core/Cargo.toml | 7 ++++++- primitives/core/src/lib.rs | 2 ++ primitives/keystore/src/lib.rs | 7 ++++++- primitives/keystore/src/testing.rs | 6 +++++- 6 files changed, 25 insertions(+), 4 deletions(-) diff --git a/client/keystore/src/local.rs b/client/keystore/src/local.rs index e7ca02d0c5f19..9bbd58f881394 100644 --- a/client/keystore/src/local.rs +++ b/client/keystore/src/local.rs @@ -19,8 +19,9 @@ use parking_lot::RwLock; use sp_application_crypto::{AppCrypto, AppPair, IsWrappedBy}; +#[cfg(feature = "bls_non_production")] +use sp_core::bls381; use sp_core::{ - bls381, crypto::{ByteArray, ExposeSecret, KeyTypeId, Pair as CorePair, SecretString, VrfSigner}, ecdsa, ed25519, sr25519, }; @@ -210,10 +211,12 @@ impl Keystore for LocalKeystore { Ok(sig) } + #[cfg(feature = "bls_non_production")] fn bls381_public_keys(&self, key_type: KeyTypeId) -> Vec { self.public_keys::(key_type) } + #[cfg(feature = "bls_non_production")] /// Generate a new pair compatible with the 'bls381' signature scheme. /// /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. @@ -225,6 +228,7 @@ impl Keystore for LocalKeystore { self.generate_new::(key_type, seed) } + #[cfg(feature = "bls_non_production")] fn bls381_sign( &self, key_type: KeyTypeId, diff --git a/primitives/application-crypto/src/lib.rs b/primitives/application-crypto/src/lib.rs index 681a6ae9844df..55c51d978ec17 100644 --- a/primitives/application-crypto/src/lib.rs +++ b/primitives/application-crypto/src/lib.rs @@ -41,6 +41,7 @@ pub use serde; #[doc(hidden)] pub use sp_std::{ops::Deref, vec::Vec}; +#[cfg(feature = "bls_non_production")] pub mod bls381; pub mod ecdsa; pub mod ed25519; diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index d6115b55e0d24..b7b435c156344 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -49,10 +49,11 @@ libsecp256k1 = { version = "0.7", default-features = false, features = ["static- schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false } merlin = { version = "2.0", default-features = false } secp256k1 = { version = "0.24.0", default-features = false, features = ["recovery", "alloc"], optional = true } -w3f-bls = { version = "0.1.2", default-features = false} ss58-registry = { version = "1.34.0", default-features = false } sp-core-hashing = { version = "5.0.0", path = "./hashing", default-features = false, optional = true } sp-runtime-interface = { version = "7.0.0", default-features = false, path = "../runtime-interface" } +# bls crypto +w3f-bls = { version = "0.1.2", default-features = false, optional = true} [dev-dependencies] sp-serializer = { version = "4.0.0-dev", path = "../serializer" } @@ -127,3 +128,7 @@ full_crypto = [ "sp-core-hashing", "sp-runtime-interface/disable_target_static_assertions", ] + +# This feature adds BLS crypto primitives. It should not be used in production since +# the BLS implementation and interface may still be subject to significant change. +bls_non_production = ["w3f-bls"] diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs index 2b75728ac9e46..0592dcbe3a154 100644 --- a/primitives/core/src/lib.rs +++ b/primitives/core/src/lib.rs @@ -55,6 +55,7 @@ pub mod crypto; pub mod hexdisplay; pub use paste; +#[cfg(feature = "bls_non_production")] pub mod bls; pub mod defer; pub mod ecdsa; @@ -69,6 +70,7 @@ pub mod testing; pub mod traits; pub mod uint; +#[cfg(feature = "bls_non_production")] pub use bls::{bls377, bls381}; pub use self::{ diff --git a/primitives/keystore/src/lib.rs b/primitives/keystore/src/lib.rs index 08b85cb577c83..fb5f25d197901 100644 --- a/primitives/keystore/src/lib.rs +++ b/primitives/keystore/src/lib.rs @@ -19,8 +19,9 @@ pub mod testing; +#[cfg(feature = "bls_non_production")] +use sp_core::bls381; use sp_core::{ - bls381, crypto::{ByteArray, CryptoTypeId, KeyTypeId}, ecdsa, ed25519, sr25519, }; @@ -162,9 +163,11 @@ pub trait Keystore: Send + Sync { msg: &[u8; 32], ) -> Result, Error>; + #[cfg(feature = "bls_non_production")] /// Returns all bls public keys for the given key type. fn bls381_public_keys(&self, id: KeyTypeId) -> Vec; + #[cfg(feature = "bls_non_production")] /// Generate a new bls381 key pair for the given key type and an optional seed. /// /// Returns an `bls381::Public` key of the generated key pair or an `Err` if @@ -175,6 +178,7 @@ pub trait Keystore: Send + Sync { seed: Option<&str>, ) -> Result; + #[cfg(feature = "bls_non_production")] /// Generate a bls381 signature for a given message. /// /// Receives [`KeyTypeId`] and a [`bls381::Public`] key to be able to map @@ -243,6 +247,7 @@ pub trait Keystore: Send + Sync { .map_err(|_| Error::ValidationError("Invalid public key format".into()))?; self.ecdsa_sign(id, &public, msg)?.map(|s| s.encode()) }, + #[cfg(feature = "bls_non_production")] bls381::CRYPTO_ID => { let public = bls381::Public::from_slice(public) .map_err(|_| Error::ValidationError("Invalid public key format".into()))?; diff --git a/primitives/keystore/src/testing.rs b/primitives/keystore/src/testing.rs index 448561a5e2a35..9dcd4eba3c33d 100644 --- a/primitives/keystore/src/testing.rs +++ b/primitives/keystore/src/testing.rs @@ -19,8 +19,9 @@ use crate::{Error, Keystore, KeystorePtr}; +#[cfg(feature = "bls_non_production")] +use sp_core::bls12_381; use sp_core::{ - bls381, crypto::{ByteArray, KeyTypeId, Pair, VrfSigner}, ecdsa, ed25519, sr25519, }; @@ -194,10 +195,12 @@ impl Keystore for MemoryKeystore { Ok(sig) } + #[cfg(feature = "bls_non_production")] fn bls381_public_keys(&self, key_type: KeyTypeId) -> Vec { self.public_keys::(key_type) } + #[cfg(feature = "bls_non_production")] fn bls381_generate_new( &self, key_type: KeyTypeId, @@ -206,6 +209,7 @@ impl Keystore for MemoryKeystore { self.generate_new::(key_type, seed) } + #[cfg(feature = "bls_non_production")] fn bls381_sign( &self, key_type: KeyTypeId, From 5a1a9cc687e44b4ec6a12e8535a0a9d8988b1a23 Mon Sep 17 00:00:00 2001 From: Robert Hambrock Date: Thu, 4 May 2023 12:29:09 +0200 Subject: [PATCH 33/35] Remove Cargo.lock entries duplicated in merge --- Cargo.lock | 137 ++++++++--------------------------------------------- 1 file changed, 20 insertions(+), 117 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f0cdcfa411a9c..200567b4d34b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -208,21 +208,6 @@ name = "anstream" version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" -dependencies = [ - "anstyle 1.0.0", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "is-terminal", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371" dependencies = [ "anstyle", "anstyle-parse", @@ -257,47 +242,13 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "anstyle-wincon" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd" -dependencies = [ - "anstyle", - "windows-sys 0.48.0", -] - -[[package]] -name = "anstyle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" - -[[package]] -name = "anstyle-parse" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" -dependencies = [ - "windows-sys 0.48.0", -] - [[package]] name = "anstyle-wincon" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" dependencies = [ - "anstyle 1.0.0", + "anstyle", "windows-sys 0.48.0", ] @@ -560,7 +511,7 @@ version = "2.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86d6b683edf8d1119fe420a94f8a7e389239666aa72e65495d91c00462510151" dependencies = [ - "anstyle 0.3.5", + "anstyle", "bstr", "doc-comment", "predicates 3.0.3", @@ -1268,7 +1219,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fdc5d93c358224b4d6867ef1356d740de2303e9892edc06c5340daeccd96bab" dependencies = [ "anstream", - "anstyle 1.0.0", + "anstyle", "bitflags", "clap_lex 0.4.1", "strsim", @@ -1292,7 +1243,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.14", + "syn 2.0.15", ] [[package]] @@ -7794,7 +7745,7 @@ version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09963355b9f467184c04017ced4a2ba2d75cbcb4e7462690d388233253d4b1a9" dependencies = [ - "anstyle 0.3.5", + "anstyle", "difflib", "itertools", "predicates-core", @@ -12593,12 +12544,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - [[package]] name = "uuid" version = "1.3.1" @@ -13486,13 +13431,13 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -13501,7 +13446,7 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets 0.42.1", + "windows-targets 0.42.2", ] [[package]] @@ -13519,13 +13464,13 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -13555,12 +13500,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - [[package]] name = "windows_aarch64_msvc" version = "0.34.0" @@ -13579,12 +13518,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - [[package]] name = "windows_i686_gnu" version = "0.34.0" @@ -13603,12 +13536,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" -[[package]] -name = "windows_i686_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - [[package]] name = "windows_i686_msvc" version = "0.34.0" @@ -13627,12 +13554,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" -[[package]] -name = "windows_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - [[package]] name = "windows_x86_64_gnu" version = "0.34.0" @@ -13651,12 +13572,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -13669,12 +13584,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" - [[package]] name = "windows_x86_64_msvc" version = "0.34.0" @@ -13693,12 +13602,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - [[package]] name = "winnow" version = "0.4.1" From 2e48a9908581bc807c3b55d50d8b86b93719b8e3 Mon Sep 17 00:00:00 2001 From: Skalman Date: Tue, 9 May 2023 10:55:25 -0400 Subject: [PATCH 34/35] add bls377 to primitives/keystore and client/keystore add bls377 to primitives/application-crypto/ add bls_non_production to primitives/keystore and client/keystore bump up w3f-bls version --- Cargo.lock | 467 ++++++++++---------- client/keystore/Cargo.toml | 8 + client/keystore/src/local.rs | 29 +- primitives/application-crypto/src/bls377.rs | 28 ++ primitives/application-crypto/src/lib.rs | 2 + primitives/core/Cargo.toml | 2 +- primitives/keystore/Cargo.toml | 4 + primitives/keystore/src/lib.rs | 44 +- primitives/keystore/src/testing.rs | 26 +- 9 files changed, 365 insertions(+), 245 deletions(-) create mode 100644 primitives/application-crypto/src/bls377.rs diff --git a/Cargo.lock b/Cargo.lock index 200567b4d34b1..fa65599815ff9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -179,6 +179,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "aho-corasick" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +dependencies = [ + "memchr", +] + [[package]] name = "android_system_properties" version = "0.1.5" @@ -254,9 +263,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.70" +version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" +checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" [[package]] name = "approx" @@ -445,7 +454,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.20", + "time 0.3.21", ] [[package]] @@ -461,7 +470,7 @@ dependencies = [ "num-traits", "rusticata-macros", "thiserror", - "time 0.3.20", + "time 0.3.21", ] [[package]] @@ -551,7 +560,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.12", + "rustix 0.37.19", "slab", "socket2", "waker-fn", @@ -656,7 +665,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.6.2", "object 0.30.3", "rustc-demangle", ] @@ -875,9 +884,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bounded-collections" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a071c348a5ef6da1d3a87166b408170b46002382b1dda83992b5c2208cefb370" +checksum = "e3888522b497857eb606bf51695988dba7096941822c1bcf676e3a929a9ae7a0" dependencies = [ "log", "parity-scale-codec", @@ -914,9 +923,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" [[package]] name = "byte-slice-cast" @@ -1077,7 +1086,7 @@ name = "chain-spec-builder" version = "2.0.0" dependencies = [ "ansi_term", - "clap 4.2.5", + "clap 4.2.7", "node-cli", "rand 0.8.5", "sc-chain-spec", @@ -1103,9 +1112,9 @@ dependencies = [ [[package]] name = "ciborium" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c137568cc60b904a7724001b35ce2630fd00d5d84805fbb608ab89509d788f" +checksum = "effd91f6c78e5a4ace8a5d3c0b6bfaec9e2baaef55f3efc00e45fb2e477ee926" dependencies = [ "ciborium-io", "ciborium-ll", @@ -1114,15 +1123,15 @@ dependencies = [ [[package]] name = "ciborium-io" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "346de753af073cc87b52b2083a506b38ac176a44cfb05497b622e27be899b369" +checksum = "cdf919175532b369853f5d5e20b26b43112613fd6fe7aee757e35f7a44642656" [[package]] name = "ciborium-ll" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213030a2b5a4e0c0892b6652260cf6ccac84827b83a85a534e178e3906c4cf1b" +checksum = "defaa24ecc093c77630e6c15e17c51f5e187bf35ee514f4e2d67baaa96dae22b" dependencies = [ "ciborium-io", "half", @@ -1191,9 +1200,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.2.23" +version = "3.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71655c45cb9845d3270c9d6df84ebe72b4dad3c2ba3f7023ad47c144e4e473a5" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" dependencies = [ "bitflags", "clap_lex 0.2.4", @@ -1203,9 +1212,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.2.5" +version = "4.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a1f23fa97e1d1641371b51f35535cb26959b8e27ab50d167a8b996b5bada819" +checksum = "34d21f9bf1b425d2968943631ec91202fe5e837264063503708b83013f8fc938" dependencies = [ "clap_builder", "clap_derive", @@ -1214,9 +1223,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.2.5" +version = "4.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdc5d93c358224b4d6867ef1356d740de2303e9892edc06c5340daeccd96bab" +checksum = "914c8c79fb560f238ef6429439a30023c862f7a28e688c58f7203f12b29970bd" dependencies = [ "anstream", "anstyle", @@ -1227,11 +1236,11 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c22dcfb410883764b29953103d9ef7bb8fe21b3fa1158bc99986c2067294bd" +checksum = "1a19591b2ab0e3c04b588a0e04ddde7b9eaa423646d1b4a8092879216bf47473" dependencies = [ - "clap 4.2.5", + "clap 4.2.7", ] [[package]] @@ -1309,6 +1318,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +[[package]] +name = "constcat" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f272d0c4cf831b4fa80ee529c7707f76585986e910e1fbce1d7921970bc1a241" + [[package]] name = "core-foundation" version = "0.9.3" @@ -1345,9 +1360,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "280a9f2d8b3a38871a3c8a46fb80db65e5e5ed97da80c4d08bf27fb63e35e181" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] @@ -1485,7 +1500,7 @@ dependencies = [ "atty", "cast", "ciborium", - "clap 3.2.23", + "clap 3.2.25", "criterion-plot", "futures", "itertools", @@ -1576,9 +1591,9 @@ dependencies = [ [[package]] name = "crypto-bigint" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c2538c4e68e52548bacb3e83ac549f903d44f011ac9d5abb5e132e67d0808f7" +checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" dependencies = [ "generic-array 0.14.7", "rand_core 0.6.4", @@ -1803,9 +1818,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.3" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b10af9f9f9f2134a42d3f8aa74658660f2e0234b0eb81bd171df8aa32779ed" +checksum = "05e58dffcdcc8ee7b22f0c1f71a69243d7c2d9ad87b5a14361f2424a1565c219" dependencies = [ "const-oid", "zeroize", @@ -1988,13 +2003,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bf95dc3f046b9da4f2d51833c0d3547d8564ef6910f5c1ed130306a75b92886" +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -2072,7 +2087,7 @@ version = "0.16.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a48e5d537b8a30c0b023116d981b16334be1485af7ca68db3a2b7024cbc957fd" dependencies = [ - "der 0.7.3", + "der 0.7.5", "digest 0.10.6", "elliptic-curve 0.13.4", "rfc6979 0.4.0", @@ -2151,7 +2166,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75c71eaa367f2e5d556414a8eea812bc62985c879748d6403edabd9cb03f16e7" dependencies = [ "base16ct 0.2.0", - "crypto-bigint 0.5.1", + "crypto-bigint 0.5.2", "digest 0.10.6", "ff 0.13.0", "generic-array 0.14.7", @@ -2227,17 +2242,6 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - [[package]] name = "errno" version = "0.3.1" @@ -2402,13 +2406,13 @@ checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" [[package]] name = "flate2" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" +checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" dependencies = [ "crc32fast", "libz-sys", - "miniz_oxide", + "miniz_oxide 0.7.1", ] [[package]] @@ -2492,7 +2496,7 @@ dependencies = [ "Inflector", "array-bytes", "chrono", - "clap 4.2.5", + "clap 4.2.7", "comfy-table", "frame-benchmarking", "frame-support", @@ -2583,7 +2587,7 @@ dependencies = [ name = "frame-election-solution-type-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.2.5", + "clap 4.2.7", "frame-election-provider-solution-type", "frame-election-provider-support", "frame-support", @@ -2646,7 +2650,7 @@ dependencies = [ "sp-runtime", "substrate-rpc-client", "tokio", - "tracing-subscriber 0.3.16", + "tracing-subscriber 0.3.17", ] [[package]] @@ -2839,13 +2843,12 @@ dependencies = [ [[package]] name = "fs4" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea55201cc351fdb478217c0fb641b59813da9b4efe4c414a9d8f989a657d149" +checksum = "a7f5b6908aecca5812a4569056285e58c666588c9573ee59765bf1d3692699e2" dependencies = [ - "libc", - "rustix 0.35.13", - "winapi", + "rustix 0.37.19", + "windows-sys 0.48.0", ] [[package]] @@ -3118,7 +3121,7 @@ version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" dependencies = [ - "aho-corasick", + "aho-corasick 0.7.20", "bstr", "fnv", "log", @@ -3591,12 +3594,6 @@ dependencies = [ "webrtc-util", ] -[[package]] -name = "io-lifetimes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" - [[package]] name = "io-lifetimes" version = "1.0.10" @@ -3639,8 +3636,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", - "io-lifetimes 1.0.10", - "rustix 0.37.12", + "io-lifetimes", + "rustix 0.37.19", "windows-sys 0.48.0", ] @@ -3670,9 +3667,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "68c16e1bfd491478ab155fd8b4896b86f9ede344949b641e61501e07c2b8b4d5" dependencies = [ "wasm-bindgen", ] @@ -3836,9 +3833,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ "cpufeatures", ] @@ -4010,9 +4007,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.141" +version = "0.2.144" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "2b00cc1c228a6782d0f076e7b232802e0c5689d41bb5df366f2a6b6621cfdfe1" [[package]] name = "libgit2-sys" @@ -4118,9 +4115,9 @@ dependencies = [ [[package]] name = "libp2p-core" -version = "0.39.1" +version = "0.39.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7f8b7d65c070a5a1b5f8f0510648189da08f787b8963f8e21219e0710733af" +checksum = "3c1df63c0b582aa434fb09b2d86897fa2b419ffeccf934b36f87fcedc8e835c2" dependencies = [ "either", "fnv", @@ -4181,18 +4178,18 @@ dependencies = [ [[package]] name = "libp2p-identity" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a8ea433ae0cea7e3315354305237b9897afe45278b2118a7a57ca744e70fd27" +checksum = "9e2d584751cecb2aabaa56106be6be91338a60a0f4e420cf2af639204f596fc1" dependencies = [ "bs58", "ed25519-dalek", "log", "multiaddr 0.17.1", "multihash 0.17.0", - "prost", "quick-protobuf", "rand 0.8.5", + "sha2 0.10.6", "thiserror", "zeroize", ] @@ -4412,7 +4409,7 @@ checksum = "ff08d13d0dc66e5e9ba6279c1de417b84fa0d0adc3b03e5732928c180ec02781" dependencies = [ "futures", "futures-rustls", - "libp2p-core 0.39.1", + "libp2p-core 0.39.2", "libp2p-identity", "rcgen 0.10.0", "ring", @@ -4566,9 +4563,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" +checksum = "56ee889ecc9568871456d42f603d6a0ce59ff328d291063a45cbdf0036baf6db" dependencies = [ "cc", "libc", @@ -4609,12 +4606,6 @@ dependencies = [ "nalgebra", ] -[[package]] -name = "linux-raw-sys" -version = "0.0.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" - [[package]] name = "linux-raw-sys" version = "0.1.4" @@ -4623,9 +4614,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "linux-raw-sys" -version = "0.3.2" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f508063cc7bb32987c71511216bd5a32be15bccb6a80b52df8b9d7f01fc3aa2" +checksum = "ece97ea872ece730aed82664c424eb4c8291e1ff2480247ccf7409044bc6479f" [[package]] name = "lite-json" @@ -4743,10 +4734,11 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "matrixmultiply" -version = "0.3.2" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add85d4dd35074e6fedc608f8c8f513a3548619a9024b751949ef0e8e45a4d84" +checksum = "090126dc04f95dc0d1c1c91f61bdd474b3930ca064c1edc8a849da2c6cbe1e77" dependencies = [ + "autocfg", "rawpointer", ] @@ -4771,7 +4763,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.37.12", + "rustix 0.37.19", ] [[package]] @@ -4852,6 +4844,15 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +dependencies = [ + "adler", +] + [[package]] name = "mio" version = "0.8.6" @@ -5002,9 +5003,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" dependencies = [ "core2", - "digest 0.10.6", "multihash-derive", - "sha2 0.10.6", "unsigned-varint", ] @@ -5175,7 +5174,7 @@ name = "node-bench" version = "0.9.0-dev" dependencies = [ "array-bytes", - "clap 4.2.5", + "clap 4.2.7", "derive_more", "fs_extra", "futures", @@ -5212,7 +5211,7 @@ version = "3.0.0-dev" dependencies = [ "array-bytes", "assert_cmd", - "clap 4.2.5", + "clap 4.2.7", "clap_complete", "criterion", "frame-benchmarking-cli", @@ -5334,7 +5333,7 @@ dependencies = [ name = "node-inspect" version = "0.9.0-dev" dependencies = [ - "clap 4.2.5", + "clap 4.2.7", "parity-scale-codec", "sc-cli", "sc-client-api", @@ -5392,7 +5391,7 @@ dependencies = [ name = "node-runtime-generate-bags" version = "3.0.0" dependencies = [ - "clap 4.2.5", + "clap 4.2.7", "generate-bags", "kitchensink-runtime", ] @@ -5401,7 +5400,7 @@ dependencies = [ name = "node-template" version = "4.0.0-dev" dependencies = [ - "clap 4.2.5", + "clap 4.2.7", "frame-benchmarking", "frame-benchmarking-cli", "frame-system", @@ -7345,9 +7344,9 @@ dependencies = [ [[package]] name = "parity-db" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00bfb81cf5c90a222db2fb7b3a7cbf8cc7f38dfb6647aca4d98edf8281f56ed5" +checksum = "bd4572a52711e2ccff02b4973ec7e4a5b5c23387ebbfbd6cd42b34755714cefc" dependencies = [ "blake2", "crc32fast", @@ -7365,9 +7364,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637935964ff85a605d114591d4d2c13c5d1ba2806dae97cea6bf180238a749ac" +checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28" dependencies = [ "arrayvec 0.7.2", "bitvec", @@ -7512,9 +7511,9 @@ checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pest" -version = "2.5.7" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1403e8401ad5dedea73c626b99758535b342502f8d1e361f4a2dd952749122" +checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70" dependencies = [ "thiserror", "ucd-trie", @@ -7522,9 +7521,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.5.7" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be99c4c1d2fc2769b1d00239431d711d08f6efedcecb8b6e30707160aee99c15" +checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb" dependencies = [ "pest", "pest_generator", @@ -7532,9 +7531,9 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.5.7" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e56094789873daa36164de2e822b3888c6ae4b4f9da555a1103587658c805b1e" +checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e" dependencies = [ "pest", "pest_meta", @@ -7545,9 +7544,9 @@ dependencies = [ [[package]] name = "pest_meta" -version = "2.5.7" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6733073c7cff3d8459fda0e42f13a047870242aed8b509fe98000928975f359e" +checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411" dependencies = [ "once_cell", "pest", @@ -7618,15 +7617,15 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der 0.7.3", - "spki 0.7.1", + "der 0.7.5", + "spki 0.7.2", ] [[package]] name = "pkg-config" -version = "0.3.26" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" +checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" [[package]] name = "platforms" @@ -7670,9 +7669,9 @@ dependencies = [ [[package]] name = "polling" -version = "2.7.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be1c66a6add46bff50935c313dae30a5030cf8385c5206e8a95e9e9def974aa" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", "bitflags", @@ -8024,9 +8023,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" dependencies = [ "proc-macro2", ] @@ -8163,7 +8162,7 @@ checksum = "6413f3de1edee53342e6138e75b56d32e7bc6e332b3bd62d497b1929d4cfbcdd" dependencies = [ "pem", "ring", - "time 0.3.20", + "time 0.3.21", "x509-parser 0.13.2", "yasna", ] @@ -8176,7 +8175,7 @@ checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ "pem", "ring", - "time 0.3.20", + "time 0.3.21", "yasna", ] @@ -8243,13 +8242,13 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.3" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d" +checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" dependencies = [ - "aho-corasick", + "aho-corasick 1.0.1", "memchr", - "regex-syntax", + "regex-syntax 0.7.1", ] [[package]] @@ -8258,7 +8257,7 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" dependencies = [ - "regex-syntax", + "regex-syntax 0.6.29", ] [[package]] @@ -8267,6 +8266,12 @@ version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +[[package]] +name = "regex-syntax" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" + [[package]] name = "region" version = "3.0.0" @@ -8443,27 +8448,13 @@ dependencies = [ [[package]] name = "rustix" -version = "0.35.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" -dependencies = [ - "bitflags", - "errno 0.2.8", - "io-lifetimes 0.7.5", - "libc", - "linux-raw-sys 0.0.46", - "windows-sys 0.42.0", -] - -[[package]] -name = "rustix" -version = "0.36.12" +version = "0.36.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0af200a3324fa5bcd922e84e9b55a298ea9f431a489f01961acdebc6e908f25" +checksum = "3a38f9520be93aba504e8ca974197f46158de5dcaa9fa04b57c57cd6a679d658" dependencies = [ "bitflags", - "errno 0.3.1", - "io-lifetimes 1.0.10", + "errno", + "io-lifetimes", "libc", "linux-raw-sys 0.1.4", "windows-sys 0.45.0", @@ -8471,15 +8462,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.12" +version = "0.37.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "722529a737f5a942fdbac3a46cee213053196737c5eaa3386d52e85b786f2659" +checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ "bitflags", - "errno 0.3.1", - "io-lifetimes 1.0.10", + "errno", + "io-lifetimes", "libc", - "linux-raw-sys 0.3.2", + "linux-raw-sys 0.3.7", "windows-sys 0.48.0", ] @@ -8705,7 +8696,7 @@ version = "0.10.0-dev" dependencies = [ "array-bytes", "chrono", - "clap 4.2.5", + "clap 4.2.7", "fdlimit", "futures", "futures-timer", @@ -9243,7 +9234,7 @@ dependencies = [ "once_cell", "parity-scale-codec", "paste", - "rustix 0.36.12", + "rustix 0.36.13", "sc-allocator", "sc-executor-common", "sc-runtime-test", @@ -9819,7 +9810,7 @@ dependencies = [ name = "sc-storage-monitor" version = "0.1.0" dependencies = [ - "clap 4.2.5", + "clap 4.2.7", "fs4", "futures", "log", @@ -9991,9 +9982,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cfdffd972d76b22f3d7f81c8be34b2296afd3a25e0a547bd9abe340a4dbbe97" +checksum = "dfdef77228a4c05dc94211441595746732131ad7f6530c6c18f045da7b7ab937" dependencies = [ "bitvec", "cfg-if", @@ -10005,9 +9996,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61fa974aea2d63dd18a4ec3a49d59af9f34178c73a4f56d2f18205628d00681e" +checksum = "53012eae69e5aa5c14671942a5dd47de59d4cdcff8532a6dd0e081faf1119482" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10118,7 +10109,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" dependencies = [ "base16ct 0.2.0", - "der 0.7.3", + "der 0.7.5", "generic-array 0.14.7", "pkcs8 0.10.2", "subtle", @@ -10210,18 +10201,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.160" +version = "1.0.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" +checksum = "71b2f6e1ab5c2b98c05f0f35b236b22e8df7ead6ffbf51d7808da7f8817e7ab6" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.160" +version = "1.0.162" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" +checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6" dependencies = [ "proc-macro2", "quote", @@ -10310,9 +10301,9 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c2bb1a323307527314a36bfb73f24febb08ce2b8a554bf4ffd6f51ad15198c" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ "digest 0.10.6", "keccak", @@ -10392,9 +10383,9 @@ dependencies = [ [[package]] name = "slice-group-by" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b634d87b960ab1a38c4fe143b508576f075e7c978bfad18217645ebfdfa2ec" +checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" [[package]] name = "smallvec" @@ -10931,7 +10922,7 @@ dependencies = [ name = "sp-npos-elections-fuzzer" version = "2.0.0-alpha.5" dependencies = [ - "clap 4.2.5", + "clap 4.2.7", "honggfuzz", "parity-scale-codec", "rand 0.8.5", @@ -11306,19 +11297,19 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37a5be806ab6f127c3da44b7378837ebf01dadca8510a0e572460216b228bd0e" +checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" dependencies = [ "base64ct", - "der 0.7.3", + "der 0.7.5", ] [[package]] name = "ss58-registry" -version = "1.39.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecf0bd63593ef78eca595a7fc25e9a443ca46fe69fd472f8f09f5245cdcd769d" +checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b" dependencies = [ "Inflector", "num-format", @@ -11420,7 +11411,7 @@ dependencies = [ name = "subkey" version = "3.0.0" dependencies = [ - "clap 4.2.5", + "clap 4.2.7", "sc-cli", ] @@ -11462,7 +11453,7 @@ dependencies = [ name = "substrate-frame-cli" version = "4.0.0-dev" dependencies = [ - "clap 4.2.5", + "clap 4.2.7", "frame-support", "frame-system", "sc-cli", @@ -11784,9 +11775,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.6" +version = "0.12.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" +checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "tempfile" @@ -11797,7 +11788,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall 0.3.5", - "rustix 0.37.12", + "rustix 0.37.19", "windows-sys 0.45.0", ] @@ -11890,9 +11881,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890" +checksum = "8f3403384eaacbca9923fa06940178ac13e4edb725486d70e8e15881d0c836cc" dependencies = [ "itoa", "serde", @@ -11902,15 +11893,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36" +checksum = "372950940a5f07bf38dbe211d7283c9e6d7327df53794992d293e534c733d09b" dependencies = [ "time-core", ] @@ -11970,9 +11961,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.27.0" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" +checksum = "c3c786bf8134e5a3a166db9b29ab8f48134739014a3eca7bc6bfa95d673b136f" dependencies = [ "autocfg", "bytes", @@ -11984,14 +11975,14 @@ dependencies = [ "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a573bdc87985e9d6ddeed1b3d864e8a302c847e40d647746df2f1de209d1ce" +checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", @@ -12011,9 +12002,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite 0.2.9", @@ -12036,9 +12027,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -12148,13 +12139,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -12223,9 +12214,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" +checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" dependencies = [ "matchers 0.1.0", "nu-ansi-term", @@ -12345,7 +12336,7 @@ version = "0.10.0-dev" dependencies = [ "assert_cmd", "async-trait", - "clap 4.2.5", + "clap 4.2.7", "frame-remote-externalities", "frame-try-runtime", "hex", @@ -12546,9 +12537,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.3.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" +checksum = "4dad5567ad0cf5b760e5665964bec1b47dfd077ba8a2544b513f3556d3d239a2" dependencies = [ "getrandom 0.2.9", ] @@ -12579,9 +12570,9 @@ checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" [[package]] name = "w3f-bls" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3d08454e3583f0e45ace3b48068d2d5efd4803c7e16f769ca314cce1a6eccf" +checksum = "7335e4c132c28cc43caef6adb339789e599e39adbe78da0c4d547fad48cbc331" dependencies = [ "ark-bls12-377", "ark-bls12-381", @@ -12590,6 +12581,7 @@ dependencies = [ "ark-serialize", "ark-serialize-derive", "arrayref", + "constcat", "digest 0.10.6", "rand 0.8.5", "rand_chacha 0.3.1", @@ -12664,9 +12656,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "5b6cb788c4e39112fbe1822277ef6fb3c55cd86b95cb3d3c4c1c9597e4ac74b4" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -12674,24 +12666,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "35e522ed4105a9d626d885b35d62501b30d9666283a5c8be12c14a8bdafe7822" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "083abe15c5d88556b77bdf7aef403625be9e327ad37c62c4e4129af740168163" dependencies = [ "cfg-if", "js-sys", @@ -12701,9 +12693,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "358a79a0cb89d21db8120cbfb91392335913e4890665b1a7981d9e956903b434" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -12711,28 +12703,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "4783ce29f09b9d93134d41297aded3a712b7b979e9c6f28c32cb88c973a94869" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "a901d592cafaa4d711bc324edfaff879ac700b19c3dfd60058d2b445be2691eb" [[package]] name = "wasm-encoder" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eff853c4f09eec94d76af527eddad4e9de13b11d6286a1ef7134bc30135a2b7" +checksum = "d05d0b6fcd0aeb98adf16e7975331b3c17222aa815148f5b976370ce589d80ef" dependencies = [ "leb128", ] @@ -12943,7 +12935,7 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.12", + "rustix 0.36.13", "serde", "sha2 0.10.6", "toml 0.5.11", @@ -13023,7 +13015,7 @@ checksum = "eed41cbcbf74ce3ff6f1d07d1b707888166dc408d1a880f651268f4f7c9194b2" dependencies = [ "object 0.29.0", "once_cell", - "rustix 0.36.12", + "rustix 0.36.13", ] [[package]] @@ -13054,7 +13046,7 @@ dependencies = [ "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.36.12", + "rustix 0.36.13", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", @@ -13075,9 +13067,9 @@ dependencies = [ [[package]] name = "wast" -version = "56.0.0" +version = "57.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b54185c051d7bbe23757d50fe575880a2426a2f06d2e9f6a10fd9a4a42920c0" +checksum = "6eb0f5ed17ac4421193c7477da05892c2edafd67f9639e3c11a82086416662dc" dependencies = [ "leb128", "memchr", @@ -13087,18 +13079,18 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.62" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56681922808216ab86d96bb750f70d500b5a7800e41564290fd46bb773581299" +checksum = "ab9ab0d87337c3be2bb6fc5cd331c4ba9fd6bcb4ee85048a0dd59ed9ecf92e53" dependencies = [ "wast", ] [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "16b5f940c7edfdc6d12126d98c9ef4d1b3d470011c47c76a6581df47ad9ba721" dependencies = [ "js-sys", "wasm-bindgen", @@ -13159,7 +13151,7 @@ dependencies = [ "sha2 0.10.6", "stun", "thiserror", - "time 0.3.20", + "time 0.3.21", "tokio", "turn", "url", @@ -13269,18 +13261,15 @@ dependencies = [ [[package]] name = "webrtc-media" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee2a3c157a040324e5049bcbd644ffc9079e6738fa2cfab2bcff64e5cc4c00d7" +checksum = "f72e1650a8ae006017d1a5280efb49e2610c19ccc3c0905b03b648aee9554991" dependencies = [ "byteorder", "bytes", - "derive_builder", - "displaydoc", "rand 0.8.5", "rtp", "thiserror", - "webrtc-util", ] [[package]] @@ -13604,9 +13593,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.1" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae8970b36c66498d8ff1d66685dc86b91b29db0c7739899012f63a63814b4b28" +checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" dependencies = [ "memchr", ] @@ -13667,7 +13656,7 @@ dependencies = [ "ring", "rusticata-macros", "thiserror", - "time 0.3.20", + "time 0.3.21", ] [[package]] @@ -13685,7 +13674,7 @@ dependencies = [ "oid-registry 0.6.1", "rusticata-macros", "thiserror", - "time 0.3.20", + "time 0.3.21", ] [[package]] @@ -13714,7 +13703,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" dependencies = [ - "time 0.3.20", + "time 0.3.21", ] [[package]] diff --git a/client/keystore/Cargo.toml b/client/keystore/Cargo.toml index f98528cc74589..27f2abe3346cb 100644 --- a/client/keystore/Cargo.toml +++ b/client/keystore/Cargo.toml @@ -24,3 +24,11 @@ sp-keystore = { version = "0.13.0", path = "../../primitives/keystore" } [dev-dependencies] tempfile = "3.1.0" + +[features] +# This feature adds BLS crypto primitives. It should not be used in production since +# the BLS implementation and interface may still be subject to significant change. +bls_non_production = [ + "sp-core/bls_non_production", + "sp-keystore/bls_non_production", +] diff --git a/client/keystore/src/local.rs b/client/keystore/src/local.rs index 9bbd58f881394..efca239d79c20 100644 --- a/client/keystore/src/local.rs +++ b/client/keystore/src/local.rs @@ -20,7 +20,7 @@ use parking_lot::RwLock; use sp_application_crypto::{AppCrypto, AppPair, IsWrappedBy}; #[cfg(feature = "bls_non_production")] -use sp_core::bls381; +use sp_core::{bls377, bls381}; use sp_core::{ crypto::{ByteArray, ExposeSecret, KeyTypeId, Pair as CorePair, SecretString, VrfSigner}, ecdsa, ed25519, sr25519, @@ -238,6 +238,33 @@ impl Keystore for LocalKeystore { self.sign::(key_type, public, msg) } + #[cfg(feature = "bls_non_production")] + fn bls377_public_keys(&self, key_type: KeyTypeId) -> Vec { + self.public_keys::(key_type) + } + + #[cfg(feature = "bls_non_production")] + /// Generate a new pair compatible with the 'bls377' signature scheme. + /// + /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. + fn bls377_generate_new( + &self, + key_type: KeyTypeId, + seed: Option<&str>, + ) -> std::result::Result { + self.generate_new::(key_type, seed) + } + + #[cfg(feature = "bls_non_production")] + fn bls377_sign( + &self, + key_type: KeyTypeId, + public: &bls377::Public, + msg: &[u8], + ) -> std::result::Result, TraitError> { + self.sign::(key_type, public, msg) + } + fn insert( &self, key_type: KeyTypeId, diff --git a/primitives/application-crypto/src/bls377.rs b/primitives/application-crypto/src/bls377.rs new file mode 100644 index 0000000000000..7fbbec5466058 --- /dev/null +++ b/primitives/application-crypto/src/bls377.rs @@ -0,0 +1,28 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! BLS12-377 crypto applications. + +pub use sp_core::bls::bls377::*; + +mod app { + crate::app_crypto!(super, sp_core::testing::BLS377); +} + +#[cfg(feature = "full_crypto")] +pub use app::Pair as AppPair; +pub use app::{Public as AppPublic, Signature as AppSignature}; diff --git a/primitives/application-crypto/src/lib.rs b/primitives/application-crypto/src/lib.rs index 55c51d978ec17..26bfa14d2f71a 100644 --- a/primitives/application-crypto/src/lib.rs +++ b/primitives/application-crypto/src/lib.rs @@ -41,6 +41,8 @@ pub use serde; #[doc(hidden)] pub use sp_std::{ops::Deref, vec::Vec}; +#[cfg(feature = "bls_non_production")] +pub mod bls377; #[cfg(feature = "bls_non_production")] pub mod bls381; pub mod ecdsa; diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index b7b435c156344..7d7b9fe5902ed 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -53,7 +53,7 @@ ss58-registry = { version = "1.34.0", default-features = false } sp-core-hashing = { version = "5.0.0", path = "./hashing", default-features = false, optional = true } sp-runtime-interface = { version = "7.0.0", default-features = false, path = "../runtime-interface" } # bls crypto -w3f-bls = { version = "0.1.2", default-features = false, optional = true} +w3f-bls = { version = "0.1.3", default-features = false, optional = true} [dev-dependencies] sp-serializer = { version = "4.0.0-dev", path = "../serializer" } diff --git a/primitives/keystore/Cargo.toml b/primitives/keystore/Cargo.toml index 6b0194247219a..cdecabe556e02 100644 --- a/primitives/keystore/Cargo.toml +++ b/primitives/keystore/Cargo.toml @@ -33,3 +33,7 @@ std = [ "sp-core/std", "sp-externalities/std", ] + +# This feature adds BLS crypto primitives. It should not be used in production since +# the BLS implementation and interface may still be subject to significant change. +bls_non_production = ["sp-core/bls_non_production"] diff --git a/primitives/keystore/src/lib.rs b/primitives/keystore/src/lib.rs index fb5f25d197901..eca846d19a969 100644 --- a/primitives/keystore/src/lib.rs +++ b/primitives/keystore/src/lib.rs @@ -20,7 +20,7 @@ pub mod testing; #[cfg(feature = "bls_non_production")] -use sp_core::bls381; +use sp_core::{bls377, bls381}; use sp_core::{ crypto::{ByteArray, CryptoTypeId, KeyTypeId}, ecdsa, ed25519, sr25519, @@ -164,9 +164,13 @@ pub trait Keystore: Send + Sync { ) -> Result, Error>; #[cfg(feature = "bls_non_production")] - /// Returns all bls public keys for the given key type. + /// Returns all bls12-381 public keys for the given key type. fn bls381_public_keys(&self, id: KeyTypeId) -> Vec; + #[cfg(feature = "bls_non_production")] + /// Returns all bls12-377 public keys for the given key type. + fn bls377_public_keys(&self, id: KeyTypeId) -> Vec; + #[cfg(feature = "bls_non_production")] /// Generate a new bls381 key pair for the given key type and an optional seed. /// @@ -178,6 +182,17 @@ pub trait Keystore: Send + Sync { seed: Option<&str>, ) -> Result; + #[cfg(feature = "bls_non_production")] + /// Generate a new bls377 key pair for the given key type and an optional seed. + /// + /// Returns an `bls377::Public` key of the generated key pair or an `Err` if + /// something failed during key generation. + fn bls377_generate_new( + &self, + key_type: KeyTypeId, + seed: Option<&str>, + ) -> Result; + #[cfg(feature = "bls_non_production")] /// Generate a bls381 signature for a given message. /// @@ -194,6 +209,22 @@ pub trait Keystore: Send + Sync { msg: &[u8], ) -> Result, Error>; + #[cfg(feature = "bls_non_production")] + /// Generate a bls377 signature for a given message. + /// + /// Receives [`KeyTypeId`] and a [`bls377::Public`] key to be able to map + /// them to a private key that exists in the keystore. + /// + /// Returns an [`bls377::Signature`] or `None` in case the given `key_type` + /// and `public` combination doesn't exist in the keystore. + /// An `Err` will be returned if generating the signature itself failed. + fn bls377_sign( + &self, + key_type: KeyTypeId, + public: &bls377::Public, + msg: &[u8], + ) -> Result, Error>; + /// Insert a new secret key. fn insert(&self, key_type: KeyTypeId, suri: &str, public: &[u8]) -> Result<(), ()>; @@ -216,7 +247,8 @@ pub trait Keystore: Send + Sync { /// - sr25519 /// - ed25519 /// - ecdsa - /// - bls381. + /// - bls381 + /// - bls377 /// /// To support more schemes you can overwrite this method. /// @@ -253,6 +285,12 @@ pub trait Keystore: Send + Sync { .map_err(|_| Error::ValidationError("Invalid public key format".into()))?; self.bls381_sign(id, &public, msg)?.map(|s| s.encode()) }, + #[cfg(feature = "bls_non_production")] + bls377::CRYPTO_ID => { + let public = bls377::Public::from_slice(public) + .map_err(|_| Error::ValidationError("Invalid public key format".into()))?; + self.bls377_sign(id, &public, msg)?.map(|s| s.encode()) + }, _ => return Err(Error::KeyNotSupported(id)), }; Ok(signature) diff --git a/primitives/keystore/src/testing.rs b/primitives/keystore/src/testing.rs index 9dcd4eba3c33d..e8e5cced1b3ed 100644 --- a/primitives/keystore/src/testing.rs +++ b/primitives/keystore/src/testing.rs @@ -20,7 +20,7 @@ use crate::{Error, Keystore, KeystorePtr}; #[cfg(feature = "bls_non_production")] -use sp_core::bls12_381; +use sp_core::{bls377, bls381}; use sp_core::{ crypto::{ByteArray, KeyTypeId, Pair, VrfSigner}, ecdsa, ed25519, sr25519, @@ -219,6 +219,30 @@ impl Keystore for MemoryKeystore { self.sign::(key_type, public, msg) } + #[cfg(feature = "bls_non_production")] + fn bls377_public_keys(&self, key_type: KeyTypeId) -> Vec { + self.public_keys::(key_type) + } + + #[cfg(feature = "bls_non_production")] + fn bls377_generate_new( + &self, + key_type: KeyTypeId, + seed: Option<&str>, + ) -> Result { + self.generate_new::(key_type, seed) + } + + #[cfg(feature = "bls_non_production")] + fn bls377_sign( + &self, + key_type: KeyTypeId, + public: &bls377::Public, + msg: &[u8], + ) -> Result, Error> { + self.sign::(key_type, public, msg) + } + fn insert(&self, key_type: KeyTypeId, suri: &str, public: &[u8]) -> Result<(), ()> { self.keys .write() From 270b32e34afeda3d5998e58dfc380b8539ccbc5e Mon Sep 17 00:00:00 2001 From: Skalman Date: Tue, 9 May 2023 11:50:47 -0400 Subject: [PATCH 35/35] rename feature `bls_non_production` to `bls-experimental` --- client/keystore/Cargo.toml | 6 +++--- client/keystore/src/local.rs | 14 +++++++------- primitives/application-crypto/src/lib.rs | 4 ++-- primitives/core/Cargo.toml | 2 +- primitives/core/src/lib.rs | 4 ++-- primitives/keystore/Cargo.toml | 2 +- primitives/keystore/src/lib.rs | 19 ++++++++++--------- primitives/keystore/src/testing.rs | 14 +++++++------- 8 files changed, 33 insertions(+), 32 deletions(-) diff --git a/client/keystore/Cargo.toml b/client/keystore/Cargo.toml index 27f2abe3346cb..81e047e90ab31 100644 --- a/client/keystore/Cargo.toml +++ b/client/keystore/Cargo.toml @@ -28,7 +28,7 @@ tempfile = "3.1.0" [features] # This feature adds BLS crypto primitives. It should not be used in production since # the BLS implementation and interface may still be subject to significant change. -bls_non_production = [ - "sp-core/bls_non_production", - "sp-keystore/bls_non_production", +bls-experimental = [ + "sp-core/bls-experimental", + "sp-keystore/bls-experimental", ] diff --git a/client/keystore/src/local.rs b/client/keystore/src/local.rs index efca239d79c20..e95db0cbc3601 100644 --- a/client/keystore/src/local.rs +++ b/client/keystore/src/local.rs @@ -19,7 +19,7 @@ use parking_lot::RwLock; use sp_application_crypto::{AppCrypto, AppPair, IsWrappedBy}; -#[cfg(feature = "bls_non_production")] +#[cfg(feature = "bls-experimental")] use sp_core::{bls377, bls381}; use sp_core::{ crypto::{ByteArray, ExposeSecret, KeyTypeId, Pair as CorePair, SecretString, VrfSigner}, @@ -211,12 +211,12 @@ impl Keystore for LocalKeystore { Ok(sig) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] fn bls381_public_keys(&self, key_type: KeyTypeId) -> Vec { self.public_keys::(key_type) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] /// Generate a new pair compatible with the 'bls381' signature scheme. /// /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. @@ -228,7 +228,7 @@ impl Keystore for LocalKeystore { self.generate_new::(key_type, seed) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] fn bls381_sign( &self, key_type: KeyTypeId, @@ -238,12 +238,12 @@ impl Keystore for LocalKeystore { self.sign::(key_type, public, msg) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] fn bls377_public_keys(&self, key_type: KeyTypeId) -> Vec { self.public_keys::(key_type) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] /// Generate a new pair compatible with the 'bls377' signature scheme. /// /// If `[seed]` is `Some` then the key will be ephemeral and stored in memory. @@ -255,7 +255,7 @@ impl Keystore for LocalKeystore { self.generate_new::(key_type, seed) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] fn bls377_sign( &self, key_type: KeyTypeId, diff --git a/primitives/application-crypto/src/lib.rs b/primitives/application-crypto/src/lib.rs index 26bfa14d2f71a..812c3c85499b1 100644 --- a/primitives/application-crypto/src/lib.rs +++ b/primitives/application-crypto/src/lib.rs @@ -41,9 +41,9 @@ pub use serde; #[doc(hidden)] pub use sp_std::{ops::Deref, vec::Vec}; -#[cfg(feature = "bls_non_production")] +#[cfg(feature = "bls-experimental")] pub mod bls377; -#[cfg(feature = "bls_non_production")] +#[cfg(feature = "bls-experimental")] pub mod bls381; pub mod ecdsa; pub mod ed25519; diff --git a/primitives/core/Cargo.toml b/primitives/core/Cargo.toml index 7d7b9fe5902ed..0c203a03d904d 100644 --- a/primitives/core/Cargo.toml +++ b/primitives/core/Cargo.toml @@ -131,4 +131,4 @@ full_crypto = [ # This feature adds BLS crypto primitives. It should not be used in production since # the BLS implementation and interface may still be subject to significant change. -bls_non_production = ["w3f-bls"] +bls-experimental = ["w3f-bls"] diff --git a/primitives/core/src/lib.rs b/primitives/core/src/lib.rs index 0592dcbe3a154..f9541b02e2903 100644 --- a/primitives/core/src/lib.rs +++ b/primitives/core/src/lib.rs @@ -55,7 +55,7 @@ pub mod crypto; pub mod hexdisplay; pub use paste; -#[cfg(feature = "bls_non_production")] +#[cfg(feature = "bls-experimental")] pub mod bls; pub mod defer; pub mod ecdsa; @@ -70,7 +70,7 @@ pub mod testing; pub mod traits; pub mod uint; -#[cfg(feature = "bls_non_production")] +#[cfg(feature = "bls-experimental")] pub use bls::{bls377, bls381}; pub use self::{ diff --git a/primitives/keystore/Cargo.toml b/primitives/keystore/Cargo.toml index cdecabe556e02..a749b95a483b1 100644 --- a/primitives/keystore/Cargo.toml +++ b/primitives/keystore/Cargo.toml @@ -36,4 +36,4 @@ std = [ # This feature adds BLS crypto primitives. It should not be used in production since # the BLS implementation and interface may still be subject to significant change. -bls_non_production = ["sp-core/bls_non_production"] +bls-experimental = ["sp-core/bls-experimental"] diff --git a/primitives/keystore/src/lib.rs b/primitives/keystore/src/lib.rs index eca846d19a969..790cc9962cadc 100644 --- a/primitives/keystore/src/lib.rs +++ b/primitives/keystore/src/lib.rs @@ -19,7 +19,7 @@ pub mod testing; -#[cfg(feature = "bls_non_production")] +#[cfg(feature = "bls-experimental")] use sp_core::{bls377, bls381}; use sp_core::{ crypto::{ByteArray, CryptoTypeId, KeyTypeId}, @@ -163,15 +163,15 @@ pub trait Keystore: Send + Sync { msg: &[u8; 32], ) -> Result, Error>; - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] /// Returns all bls12-381 public keys for the given key type. fn bls381_public_keys(&self, id: KeyTypeId) -> Vec; - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] /// Returns all bls12-377 public keys for the given key type. fn bls377_public_keys(&self, id: KeyTypeId) -> Vec; - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] /// Generate a new bls381 key pair for the given key type and an optional seed. /// /// Returns an `bls381::Public` key of the generated key pair or an `Err` if @@ -182,7 +182,7 @@ pub trait Keystore: Send + Sync { seed: Option<&str>, ) -> Result; - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] /// Generate a new bls377 key pair for the given key type and an optional seed. /// /// Returns an `bls377::Public` key of the generated key pair or an `Err` if @@ -193,7 +193,7 @@ pub trait Keystore: Send + Sync { seed: Option<&str>, ) -> Result; - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] /// Generate a bls381 signature for a given message. /// /// Receives [`KeyTypeId`] and a [`bls381::Public`] key to be able to map @@ -209,7 +209,7 @@ pub trait Keystore: Send + Sync { msg: &[u8], ) -> Result, Error>; - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] /// Generate a bls377 signature for a given message. /// /// Receives [`KeyTypeId`] and a [`bls377::Public`] key to be able to map @@ -277,15 +277,16 @@ pub trait Keystore: Send + Sync { ecdsa::CRYPTO_ID => { let public = ecdsa::Public::from_slice(public) .map_err(|_| Error::ValidationError("Invalid public key format".into()))?; + self.ecdsa_sign(id, &public, msg)?.map(|s| s.encode()) }, - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] bls381::CRYPTO_ID => { let public = bls381::Public::from_slice(public) .map_err(|_| Error::ValidationError("Invalid public key format".into()))?; self.bls381_sign(id, &public, msg)?.map(|s| s.encode()) }, - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] bls377::CRYPTO_ID => { let public = bls377::Public::from_slice(public) .map_err(|_| Error::ValidationError("Invalid public key format".into()))?; diff --git a/primitives/keystore/src/testing.rs b/primitives/keystore/src/testing.rs index e8e5cced1b3ed..af545d0565997 100644 --- a/primitives/keystore/src/testing.rs +++ b/primitives/keystore/src/testing.rs @@ -19,7 +19,7 @@ use crate::{Error, Keystore, KeystorePtr}; -#[cfg(feature = "bls_non_production")] +#[cfg(feature = "bls-experimental")] use sp_core::{bls377, bls381}; use sp_core::{ crypto::{ByteArray, KeyTypeId, Pair, VrfSigner}, @@ -195,12 +195,12 @@ impl Keystore for MemoryKeystore { Ok(sig) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] fn bls381_public_keys(&self, key_type: KeyTypeId) -> Vec { self.public_keys::(key_type) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] fn bls381_generate_new( &self, key_type: KeyTypeId, @@ -209,7 +209,7 @@ impl Keystore for MemoryKeystore { self.generate_new::(key_type, seed) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] fn bls381_sign( &self, key_type: KeyTypeId, @@ -219,12 +219,12 @@ impl Keystore for MemoryKeystore { self.sign::(key_type, public, msg) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] fn bls377_public_keys(&self, key_type: KeyTypeId) -> Vec { self.public_keys::(key_type) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] fn bls377_generate_new( &self, key_type: KeyTypeId, @@ -233,7 +233,7 @@ impl Keystore for MemoryKeystore { self.generate_new::(key_type, seed) } - #[cfg(feature = "bls_non_production")] + #[cfg(feature = "bls-experimental")] fn bls377_sign( &self, key_type: KeyTypeId,