Skip to content

Commit

Permalink
chore: remove and reuse upstream network delivery wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
drewstone committed Nov 29, 2024
1 parent dcfe35d commit d4b0653
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 238 deletions.
140 changes: 129 additions & 11 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 @@ -57,7 +57,7 @@ round-based = { version = "0.3.0", default-features = false, features = ["derive


[dependencies.gadget-sdk]
version = "0.4"
version = "0.5.1"
default-features = false
features = ["getrandom"]

Expand Down
5 changes: 3 additions & 2 deletions src/keygen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use api::services::events::JobCalled;
use frost_core::keys::{KeyPackage, PublicKeyPackage};
use frost_core::{Ciphersuite, VerifyingKey};
use gadget_sdk::futures::TryFutureExt;
use gadget_sdk::network::round_based_compat::NetworkDeliveryWrapper;
use gadget_sdk::network::Network;
use gadget_sdk::subxt_core::ext::sp_core::{ecdsa, Pair};
use gadget_sdk::subxt_core::utils::AccountId32;
Expand All @@ -14,7 +15,7 @@ use sdk::event_listener::tangle::{
};
use sdk::tangle_subxt::tangle_testnet_runtime::api;

use crate::rounds::{delivery, keygen as keygen_protocol};
use crate::rounds::keygen as keygen_protocol;
use crate::FrostContext;

#[derive(Debug, thiserror::Error)]
Expand Down Expand Up @@ -167,7 +168,7 @@ where
.enumerate()
.map(|(j, (_, ecdsa))| (j as u16, ecdsa))
.collect();
let delivery = delivery::NetworkDeliveryWrapper::new(net, i, parties);
let delivery = NetworkDeliveryWrapper::new(net, i, parties);
let party = round_based::MpcParty::connected(delivery);
let (key_package, public_key_package) =
keygen_protocol::run::<R, C, _>(&mut rng, t, n, i, party, None).await?;
Expand Down
Loading

0 comments on commit d4b0653

Please sign in to comment.