From 07d046effd0da2646f8ab891f9d3342d902cc591 Mon Sep 17 00:00:00 2001 From: driemworks Date: Tue, 14 May 2024 08:43:06 -0500 Subject: [PATCH] remove commented code --- Cargo.lock | 18 +++++++++++++++++- substrate/client/keystore/src/local.rs | 17 +++-------------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a1d3ec049255..cd87e663cbaa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5261,7 +5261,7 @@ dependencies = [ [[package]] name = "etf-crypto-primitives" version = "0.2.4" -source = "git+https://github.com/ideal-lab5/etf-sdk/?branch=w3fbls-migration#1f3f02525197f49515681887e570711e722a02cf" +source = "git+http://github.com/ideal-lab5/etf-sdk?branch=w3fbls-migration#1f3f02525197f49515681887e570711e722a02cf" dependencies = [ "aes-gcm", "ark-bls12-377", @@ -17115,7 +17115,12 @@ dependencies = [ name = "sc-keystore" version = "25.0.0" dependencies = [ +<<<<<<< HEAD "array-bytes", +======= + "ark-serialize 0.4.2", + "array-bytes 6.1.0", +>>>>>>> c84762be88 (remove commented code) "etf-crypto-primitives", "parking_lot 0.12.2", "serde_json", @@ -17124,6 +17129,7 @@ dependencies = [ "sp-keystore", "tempfile", "thiserror", + "w3f-bls", ] [[package]] @@ -19465,7 +19471,12 @@ dependencies = [ name = "sp-core" version = "28.0.0" dependencies = [ +<<<<<<< HEAD "array-bytes", +======= + "ark-serialize 0.4.2", + "array-bytes 6.1.0", +>>>>>>> c84762be88 (remove commented code) "bandersnatch_vrfs", "bitflags 1.3.2", "blake2 0.10.6", @@ -19473,7 +19484,12 @@ dependencies = [ "bs58 0.5.1", "criterion", "dyn-clonable", +<<<<<<< HEAD "ed25519-zebra", +======= + "ed25519-zebra 3.1.0", + "etf-crypto-primitives", +>>>>>>> c84762be88 (remove commented code) "futures", "hash-db", "hash256-std-hasher", diff --git a/substrate/client/keystore/src/local.rs b/substrate/client/keystore/src/local.rs index f0bfc68a5ba8..452bdc7e9323 100644 --- a/substrate/client/keystore/src/local.rs +++ b/substrate/client/keystore/src/local.rs @@ -418,6 +418,9 @@ impl Keystore for LocalKeystore { Ok(sig) } + /// Run the async committee secret sharing `recovery` algorithm using a locally stored bls377 keypair + /// and use the resulting keypair to sign the input message + /// fn acss_recover( &self, key_type: KeyTypeId, @@ -429,20 +432,6 @@ impl Keystore for LocalKeystore { if let Some(Some(etf_pair)) = self.0.read() .key_pair_by_type::(public, key_type)? .map(|pair| pair.acss_recover(pok_bytes, threshold)) { - // .map(|pair| { - // if let Ok(pok) = BatchPoK::<::PublicKeyGroup>::deserialize_compressed(&pok_bytes[..]) { - // let sk = ETFKeypair(pair.0.into_vartime()); - // if let Ok(recovered) = sk.recover(pok, threshold) { - // let secret = w3f_bls::SecretKeyVT(recovered.0).into_split_dirty(); - // let public = secret.into_public(); - // return Some(bls::Pair(w3f_bls::Keypair { - // secret, public, - // })); - // } - // } - // None - // }) { - // "IBE.Extract" Q = s*H(message) + DLEQ Proof let extract = etf_pair.sign(&message); return Ok(extract); }