mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Update schnorrkel to 0.11.4 (#2524)
This commit is contained in:
@@ -24,7 +24,7 @@ codec = { package = "parity-scale-codec", version = "3.6.1", default-features =
|
||||
futures = "0.3.21"
|
||||
futures-timer = "3.0.1"
|
||||
ip_network = "0.4.1"
|
||||
libp2p = { version = "0.51.3", features = ["ed25519", "kad"] }
|
||||
libp2p = { version = "0.51.4", features = ["ed25519", "kad"] }
|
||||
multihash = { version = "0.18.1", default-features = false, features = [
|
||||
"sha2",
|
||||
"std",
|
||||
|
||||
@@ -20,7 +20,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
ahash = "0.8.2"
|
||||
futures = "0.3.21"
|
||||
futures-timer = "3.0.1"
|
||||
libp2p = "0.51.3"
|
||||
libp2p = "0.51.4"
|
||||
log = "0.4.17"
|
||||
schnellru = "0.2.1"
|
||||
tracing = "0.1.29"
|
||||
|
||||
@@ -28,7 +28,7 @@ fnv = "1.0.6"
|
||||
futures = "0.3.21"
|
||||
futures-timer = "3.0.2"
|
||||
ip_network = "0.4.1"
|
||||
libp2p = { version = "0.51.3", features = ["dns", "identify", "kad", "macros", "mdns", "noise", "ping", "request-response", "tcp", "tokio", "websocket", "yamux"] }
|
||||
libp2p = { version = "0.51.4", features = ["dns", "identify", "kad", "macros", "mdns", "noise", "ping", "request-response", "tcp", "tokio", "websocket", "yamux"] }
|
||||
linked_hash_set = "0.1.3"
|
||||
log = "0.4.17"
|
||||
mockall = "0.11.3"
|
||||
|
||||
@@ -20,7 +20,7 @@ array-bytes = "6.1"
|
||||
async-channel = "1.8.0"
|
||||
codec = { package = "parity-scale-codec", version = "3.6.1", features = ["derive"] }
|
||||
futures = "0.3.21"
|
||||
libp2p = "0.51.3"
|
||||
libp2p = "0.51.4"
|
||||
log = "0.4.17"
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus" }
|
||||
sc-network-common = { path = "../common" }
|
||||
|
||||
@@ -25,7 +25,7 @@ async-trait = "0.1.74"
|
||||
codec = { package = "parity-scale-codec", version = "3.6.1", features = ["derive"] }
|
||||
futures = "0.3.21"
|
||||
futures-timer = "3.0.2"
|
||||
libp2p = "0.51.3"
|
||||
libp2p = "0.51.4"
|
||||
log = "0.4.17"
|
||||
mockall = "0.11.3"
|
||||
prost = "0.11"
|
||||
|
||||
@@ -20,7 +20,7 @@ tokio = "1.22.0"
|
||||
async-trait = "0.1.74"
|
||||
futures = "0.3.21"
|
||||
futures-timer = "3.0.1"
|
||||
libp2p = "0.51.3"
|
||||
libp2p = "0.51.4"
|
||||
log = "0.4.17"
|
||||
parking_lot = "0.12.1"
|
||||
rand = "0.8.5"
|
||||
|
||||
@@ -19,7 +19,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
array-bytes = "6.1"
|
||||
codec = { package = "parity-scale-codec", version = "3.6.1", features = ["derive"] }
|
||||
futures = "0.3.21"
|
||||
libp2p = "0.51.3"
|
||||
libp2p = "0.51.4"
|
||||
log = "0.4.17"
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus" }
|
||||
sc-network = { path = ".." }
|
||||
|
||||
@@ -24,7 +24,7 @@ futures = "0.3.21"
|
||||
futures-timer = "3.0.2"
|
||||
hyper = { version = "0.14.16", features = ["http2", "stream"] }
|
||||
hyper-rustls = { version = "0.24.0", features = ["http2"] }
|
||||
libp2p = "0.51.3"
|
||||
libp2p = "0.51.4"
|
||||
num_cpus = "1.13"
|
||||
once_cell = "1.8"
|
||||
parking_lot = "0.12.1"
|
||||
|
||||
@@ -19,7 +19,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
chrono = "0.4.27"
|
||||
futures = "0.3.21"
|
||||
libp2p = { version = "0.51.3", features = ["dns", "tcp", "tokio", "wasm-ext", "websocket"] }
|
||||
libp2p = { version = "0.51.4", features = ["dns", "tcp", "tokio", "wasm-ext", "websocket"] }
|
||||
log = "0.4.17"
|
||||
parking_lot = "0.12.1"
|
||||
pin-project = "1.0.12"
|
||||
|
||||
@@ -50,8 +50,8 @@ array-bytes = { version = "6.1", optional = true }
|
||||
ed25519-zebra = { version = "3.1.0", default-features = false, optional = true }
|
||||
blake2 = { version = "0.10.4", default-features = false, optional = true }
|
||||
libsecp256k1 = { version = "0.7", default-features = false, features = ["static-context"], optional = true }
|
||||
schnorrkel = { version = "0.9.1", features = ["preaudit_deprecated", "u64_backend"], default-features = false }
|
||||
merlin = { version = "2.0", default-features = false }
|
||||
schnorrkel = { version = "0.11.4", features = ["preaudit_deprecated"], default-features = false }
|
||||
merlin = { version = "3.0", default-features = false }
|
||||
secp256k1 = { version = "0.28.0", default-features = false, features = ["alloc", "recovery"], optional = true }
|
||||
sp-core-hashing = { path = "hashing", default-features = false, optional = true }
|
||||
sp-runtime-interface = { path = "../runtime-interface", default-features = false }
|
||||
|
||||
@@ -555,7 +555,7 @@ pub mod vrf {
|
||||
use crate::crypto::{VrfCrypto, VrfPublic};
|
||||
use schnorrkel::{
|
||||
errors::MultiSignatureStage,
|
||||
vrf::{VRF_OUTPUT_LENGTH, VRF_PROOF_LENGTH},
|
||||
vrf::{VRF_PREOUT_LENGTH, VRF_PROOF_LENGTH},
|
||||
SignatureError,
|
||||
};
|
||||
|
||||
@@ -636,7 +636,7 @@ pub mod vrf {
|
||||
|
||||
/// VRF pre-output type suitable for schnorrkel operations.
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub struct VrfPreOutput(pub schnorrkel::vrf::VRFOutput);
|
||||
pub struct VrfPreOutput(pub schnorrkel::vrf::VRFPreOut);
|
||||
|
||||
impl Encode for VrfPreOutput {
|
||||
fn encode(&self) -> Vec<u8> {
|
||||
@@ -646,19 +646,19 @@ pub mod vrf {
|
||||
|
||||
impl Decode for VrfPreOutput {
|
||||
fn decode<R: codec::Input>(i: &mut R) -> Result<Self, codec::Error> {
|
||||
let decoded = <[u8; VRF_OUTPUT_LENGTH]>::decode(i)?;
|
||||
Ok(Self(schnorrkel::vrf::VRFOutput::from_bytes(&decoded).map_err(convert_error)?))
|
||||
let decoded = <[u8; VRF_PREOUT_LENGTH]>::decode(i)?;
|
||||
Ok(Self(schnorrkel::vrf::VRFPreOut::from_bytes(&decoded).map_err(convert_error)?))
|
||||
}
|
||||
}
|
||||
|
||||
impl MaxEncodedLen for VrfPreOutput {
|
||||
fn max_encoded_len() -> usize {
|
||||
<[u8; VRF_OUTPUT_LENGTH]>::max_encoded_len()
|
||||
<[u8; VRF_PREOUT_LENGTH]>::max_encoded_len()
|
||||
}
|
||||
}
|
||||
|
||||
impl TypeInfo for VrfPreOutput {
|
||||
type Identity = [u8; VRF_OUTPUT_LENGTH];
|
||||
type Identity = [u8; VRF_PREOUT_LENGTH];
|
||||
|
||||
fn type_info() -> scale_info::Type {
|
||||
Self::Identity::type_info()
|
||||
@@ -717,11 +717,11 @@ pub mod vrf {
|
||||
|
||||
let proof = self.0.dleq_proove(extra, &inout, true).0;
|
||||
|
||||
VrfSignature { pre_output: VrfPreOutput(inout.to_output()), proof: VrfProof(proof) }
|
||||
VrfSignature { pre_output: VrfPreOutput(inout.to_preout()), proof: VrfProof(proof) }
|
||||
}
|
||||
|
||||
fn vrf_pre_output(&self, input: &Self::VrfInput) -> Self::VrfPreOutput {
|
||||
let pre_output = self.0.vrf_create_hash(input.0.clone()).to_output();
|
||||
let pre_output = self.0.vrf_create_hash(input.0.clone()).to_preout();
|
||||
VrfPreOutput(pre_output)
|
||||
}
|
||||
}
|
||||
@@ -762,6 +762,7 @@ pub mod vrf {
|
||||
ScalarFormatError => "Signature error: `ScalarFormatError`".into(),
|
||||
NotMarkedSchnorrkel => "Signature error: `NotMarkedSchnorrkel`".into(),
|
||||
BytesLengthError { .. } => "Signature error: `BytesLengthError`".into(),
|
||||
InvalidKey => "Signature error: `InvalidKey`".into(),
|
||||
MuSigAbsent { musig_stage: Commitment } =>
|
||||
"Signature error: `MuSigAbsent` at stage `Commitment`".into(),
|
||||
MuSigAbsent { musig_stage: Reveal } =>
|
||||
@@ -1141,7 +1142,7 @@ mod tests {
|
||||
})
|
||||
.unwrap();
|
||||
let signature2 =
|
||||
VrfSignature { pre_output: VrfPreOutput(inout.to_output()), proof: VrfProof(proof) };
|
||||
VrfSignature { pre_output: VrfPreOutput(inout.to_preout()), proof: VrfProof(proof) };
|
||||
|
||||
assert!(public.vrf_verify(&data, &signature2));
|
||||
assert_eq!(signature.pre_output, signature2.pre_output);
|
||||
|
||||
@@ -36,7 +36,7 @@ tracing = { version = "0.1.29", default-features = false }
|
||||
tracing-core = { version = "0.1.32", default-features = false }
|
||||
|
||||
# Required for backwards compatibility reason, but only used for verifying when `UseDalekExt` is set.
|
||||
ed25519-dalek = { version = "2.0", default-features = false, optional = true }
|
||||
ed25519-dalek = { version = "2.1", default-features = false, optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
rustversion = "1.0.6"
|
||||
|
||||
@@ -28,9 +28,9 @@ sp-externalities = { path = "../externalities", default-features = false }
|
||||
thiserror = { version = "1.0", optional = true }
|
||||
|
||||
# ECIES dependencies
|
||||
ed25519-dalek = { version = "2.0.0", optional = true }
|
||||
x25519-dalek = { version = "2.0.0", optional = true, features = ["static_secrets"] }
|
||||
curve25519-dalek = { version = "4.0.0", optional = true }
|
||||
ed25519-dalek = { version = "2.1", optional = true }
|
||||
x25519-dalek = { version = "2.0", optional = true, features = ["static_secrets"] }
|
||||
curve25519-dalek = { version = "4.1.1", optional = true }
|
||||
aes-gcm = { version = "0.10", optional = true }
|
||||
hkdf = { version = "0.12.0", optional = true }
|
||||
sha2 = { version = "0.10.7", optional = true }
|
||||
|
||||
Reference in New Issue
Block a user