Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #56 from ASuciuX/testing-after-dkg-merge
Browse files Browse the repository at this point in the history
Testing after dkg merge
  • Loading branch information
ASuciuX authored Feb 7, 2024
2 parents 4f175f5 + 49bf905 commit 61d04c4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ members = [

# Dependencies we want to keep the same between workspace members
[workspace.dependencies]
wsts = "7.0"
wsts = "8.0"
rand_core = "0.6"
rand = "0.8"

Expand Down
13 changes: 13 additions & 0 deletions stacks-signer/src/runloop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use stacks_common::{debug, error, info, warn};
use wsts::common::{MerkleRoot, Signature};
use wsts::curve::ecdsa;
use wsts::curve::keys::PublicKey;
use wsts::curve::point::{Compressed, Point};
use wsts::net::{Message, NonceRequest, Packet, SignatureShareRequest};
use wsts::state_machine::coordinator::fire::Coordinator as FireCoordinator;
use wsts::state_machine::coordinator::{Config as CoordinatorConfig, Coordinator};
Expand Down Expand Up @@ -833,6 +834,17 @@ impl From<&Config> for RunLoop<FireCoordinator<v2::Aggregator>> {
.iter()
.map(|(i, ids)| (*i, ids.iter().copied().collect::<HashSet<u32>>()))
.collect::<HashMap<u32, HashSet<u32>>>();
let signer_public_keys = config
.signer_ids_public_keys
.signers
.iter()
.map(|(i, ecdsa_key)| {
(
*i,
Point::try_from(&Compressed::from(ecdsa_key.to_bytes())).unwrap(),
)
})
.collect::<HashMap<u32, Point>>();

let coordinator_config = CoordinatorConfig {
threshold,
Expand All @@ -846,6 +858,7 @@ impl From<&Config> for RunLoop<FireCoordinator<v2::Aggregator>> {
nonce_timeout: config.nonce_timeout,
sign_timeout: config.sign_timeout,
signer_key_ids,
signer_public_keys,
};
let coordinator = FireCoordinator::new(coordinator_config);
let signing_round = Signer::new(
Expand Down

0 comments on commit 61d04c4

Please sign in to comment.