Fix clippy, update old dependencies

This commit is contained in:
Luke Parker
2025-08-25 09:17:29 -04:00
parent c24b694fb2
commit 9dddfd91c8
93 changed files with 637 additions and 663 deletions

View File

@@ -1,5 +1,5 @@
use ciphersuite::{Ciphersuite, Secp256k1};
use dkg::ThresholdKeys;
use ciphersuite::Ciphersuite;
use dkg::{ThresholdKeys, Curves, Secp256k1};
use ethereum_schnorr::PublicKey;
@@ -9,17 +9,23 @@ impl key_gen::KeyGenParams for KeyGenParams {
type ExternalNetworkCiphersuite = Secp256k1;
fn tweak_keys(keys: &mut ThresholdKeys<Self::ExternalNetworkCiphersuite>) {
fn tweak_keys(
keys: &mut ThresholdKeys<<Self::ExternalNetworkCiphersuite as Curves>::ToweringCurve>,
) {
while PublicKey::new(keys.group_key()).is_none() {
*keys = keys.offset(<Secp256k1 as Ciphersuite>::F::ONE);
*keys = keys.clone().offset(<<Secp256k1 as Curves>::ToweringCurve as Ciphersuite>::F::ONE);
}
}
fn encode_key(key: <Self::ExternalNetworkCiphersuite as Ciphersuite>::G) -> Vec<u8> {
fn encode_key(
key: <<Self::ExternalNetworkCiphersuite as Curves>::ToweringCurve as Ciphersuite>::G,
) -> Vec<u8> {
PublicKey::new(key).unwrap().eth_repr().to_vec()
}
fn decode_key(key: &[u8]) -> Option<<Self::ExternalNetworkCiphersuite as Ciphersuite>::G> {
fn decode_key(
key: &[u8],
) -> Option<<<Self::ExternalNetworkCiphersuite as Curves>::ToweringCurve as Ciphersuite>::G> {
PublicKey::from_eth_repr(key.try_into().ok()?).map(|key| key.point())
}
}

View File

@@ -1,6 +1,7 @@
use std::collections::HashMap;
use ciphersuite::{Ciphersuite, Secp256k1};
use ciphersuite::Ciphersuite;
use ciphersuite_kp256::Secp256k1;
use serai_client::networks::ethereum::Address;

View File

@@ -2,7 +2,8 @@ use std::{io, collections::HashMap};
use rand_core::{RngCore, CryptoRng};
use ciphersuite::{Ciphersuite, Secp256k1};
use ciphersuite::Ciphersuite;
use ciphersuite_kp256::Secp256k1;
use frost::{
dkg::{Participant, ThresholdKeys},
FrostError,

View File

@@ -1,6 +1,7 @@
use std::io;
use ciphersuite::{group::GroupEncoding, Ciphersuite, Secp256k1};
use ciphersuite::{group::GroupEncoding, Ciphersuite};
use ciphersuite_kp256::Secp256k1;
use alloy_core::primitives::U256;

View File

@@ -1,6 +1,6 @@
use std::io;
use ciphersuite::Secp256k1;
use ciphersuite_kp256::Secp256k1;
use frost::dkg::ThresholdKeys;
use alloy_core::primitives::{U256, Address as EthereumAddress};