Repository: tangle-network/gadget (language: rust)

Issue:
[BUG] During Key rotation, we should use the correct signature scheme
here:
https://github.com/webb-tools/gadget/blob/ed1b318eccd186f4703c1d5b9085ca3abe4b55fa/protocols/dfns-cggmp21/src/protocols/key_rotate.rs#L267


Discussion / hints:

Fix patch:
diff --git a/Cargo.lock b/Cargo.lock
index 31c65640e..4cfffda74 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -2269,7 +2269,6 @@ dependencies = [
  "platforms",
  "rand_core 0.6.4",
  "rustc_version",
- "serde",
  "subtle 2.5.0",
  "zeroize",
 ]
diff --git a/protocols/dfns-cggmp21/src/protocols/key_rotate.rs b/protocols/dfns-cggmp21/src/protocols/key_rotate.rs
index b6f9f8460..8541ccf0c 100644
--- a/protocols/dfns-cggmp21/src/protocols/key_rotate.rs
+++ b/protocols/dfns-cggmp21/src/protocols/key_rotate.rs
@@ -259,7 +259,7 @@ pub async fn generate_protocol_from<C: ClientWithApi, KBE: KeystoreBackend, N: N
         .post(async move {
             // Submit the protocol output to the blockchain
             if let Some(signature) = protocol_output_clone.lock().await.take() {
-                validate_dfns_signature_by_role(
+                let (signature_scheme, _) = validate_dfns_signature_by_role(
                     &additional_params.role_type,
                     &signature,
                     &new_public_key,
@@ -267,7 +267,7 @@ pub async fn generate_protocol_from<C: ClientWithApi, KBE: KeystoreBackend, N: N
                 )?;
                 let job_result =
                     jobs::JobResult::DKGPhaseFour(jobs::tss::DKGTSSKeyRotationResult {
-                        signature_scheme: jobs::tss::DigitalSignatureScheme::EcdsaSecp256k1,
+                        signature_scheme,
                         derivation_path: None,
                         signature: BoundedVec(signature),
                         phase_one_id,


Test patch: