From 169c3c3e4d218800e8377a75b70398016e3f2291 Mon Sep 17 00:00:00 2001 From: shekohex Date: Thu, 4 Apr 2024 22:14:25 +0200 Subject: [PATCH] fix: taproot on-chain verification (#596) --- pallets/dkg/src/functions.rs | 2 +- primitives/src/jobs/tss.rs | 3 - primitives/src/roles/mod.rs | 1 + .../metadata/tangle-testnet-runtime.scale | Bin 219418 -> 219398 bytes tangle-subxt/src/tangle_testnet_runtime.rs | 201 +++++++++--------- 5 files changed, 100 insertions(+), 107 deletions(-) diff --git a/pallets/dkg/src/functions.rs b/pallets/dkg/src/functions.rs index 833595a18..689a13581 100644 --- a/pallets/dkg/src/functions.rs +++ b/pallets/dkg/src/functions.rs @@ -186,13 +186,13 @@ impl Pallet { | DigitalSignatureScheme::SchnorrP256 | DigitalSignatureScheme::SchnorrP384 | DigitalSignatureScheme::SchnorrSecp256k1 + | DigitalSignatureScheme::SchnorrTaproot | DigitalSignatureScheme::SchnorrRistretto255 => verify_dkg_signature_schnorr_frost::( data.signature_scheme, &data.data, &data.signature, &data.verifying_key, ), - _ => Err(Error::::InvalidSignature.into()), } } diff --git a/primitives/src/jobs/tss.rs b/primitives/src/jobs/tss.rs index 6ba85cdcc..c50c57f7e 100644 --- a/primitives/src/jobs/tss.rs +++ b/primitives/src/jobs/tss.rs @@ -199,9 +199,6 @@ pub enum DigitalSignatureScheme { /// Schnorr signature scheme over the Ristretto255 curve / sr25519. SchnorrRistretto255, - /// Schnorr signature scheme over the JubJub curve. - SchnorrRedJubJub, - /// Schnorr signature scheme over the Ed25519 curve. SchnorrEd25519, diff --git a/primitives/src/roles/mod.rs b/primitives/src/roles/mod.rs index a65eeb0c4..46605ab02 100644 --- a/primitives/src/roles/mod.rs +++ b/primitives/src/roles/mod.rs @@ -62,6 +62,7 @@ impl TryFrom for RoleType { 0x0025 => Ok(RoleType::Tss(ThresholdSignatureRoleType::ZcashFrostEd25519)), 0x0026 => Ok(RoleType::Tss(ThresholdSignatureRoleType::ZcashFrostEd448)), 0x0031 => Ok(RoleType::Tss(ThresholdSignatureRoleType::GennaroDKGBls381)), + 0x0032 => Ok(RoleType::Tss(ThresholdSignatureRoleType::WstsV2)), 0x0041 => Ok(RoleType::ZkSaaS(ZeroKnowledgeRoleType::ZkSaaSGroth16)), 0x0042 => Ok(RoleType::ZkSaaS(ZeroKnowledgeRoleType::ZkSaaSMarlin)), 0x0100 => Ok(RoleType::LightClientRelaying), diff --git a/tangle-subxt/metadata/tangle-testnet-runtime.scale b/tangle-subxt/metadata/tangle-testnet-runtime.scale index 06dfab8d63f96cd513ccc983e281290c63329091..e9ac28cb791236c01549d9d27a1c9f94c0b92c73 100644 GIT binary patch delta 90 zcmbQWiMMSNZ^IVG53!5}(?7;C_S#wmCuij47Ztgt7@3+HS~74j7{EnLOe`2U8DJ_x h5(|p*^Gg`G7$lr>ij6G{8Mxce$1!d{AIIeV3jlrl9s2+P delta 118 zcmZqM#5-#fZ^IVG53!6U(?7;C_J%qHCuij47ZnAirg)Vm0TBZSg9TK~HO0u()X