Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jesse committed Aug 30, 2023
1 parent 9379acf commit 1fb4064
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions crypto/server/src/helpers/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ pub async fn do_dkg(
Ok(result)
}

/// Send's user key share to other members of signing subgroup
pub async fn send_key(
api: &OnlineClient<EntropyConfig>,
stash_address: &subxtAccountId32,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ pub(super) async fn execute_protocol(
}
}

/// execute threshold signing protocol.
/// Execute dkg.
#[instrument(skip(chans, threshold_signer))]
pub async fn execute_dkg(
mut chans: Channels,
Expand Down
1 change: 0 additions & 1 deletion crypto/server/src/signing_client/protocol_transport/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use crate::{
AppState, SignerState, SUBSCRIBE_TIMEOUT_SECONDS,
};

// TODO remove ctx and pass only needed info
/// Set up websocket connections to other members of the signing committee
pub async fn open_protocol_connections(
validators_info: &[ValidatorInfo],
Expand Down
12 changes: 6 additions & 6 deletions crypto/server/src/user/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,13 @@ pub struct UserTransactionRequest {
pub validators_info: Vec<ValidatorInfo>,
}

/// Type for validators to send user key's back and forth
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
#[derive(Debug, Clone, PartialEq)]
pub struct UserRegistrationInfo {
/// Signing request key (also kvdb key)
pub key: String,
/// User threshold signing key
pub value: Vec<u8>,
}
/// Called by a user to initiate the signing process for a message
Expand Down Expand Up @@ -157,12 +160,9 @@ pub async fn sign_tx(
}
}

/// HTTP POST endoint called by the user when registering.
///
/// This adds a new Keyshare to this node's set of known Keyshares and stores the it in the [kvdb].
///
/// The http request takes a [SignedMessage] containing a bincode-encoded
/// [KeyShare](synedrion::KeyShare).
/// HTTP POST endpoint called by the off-chain worker (propagation pallet) during user registration.
/// The http request takes a parity scale encoded [OCWMessage] which tells us which validators are
/// in the registration group and will perform a DKG.
pub async fn new_user(
State(app_state): State<AppState>,
encoded_data: Bytes,
Expand Down

0 comments on commit 1fb4064

Please sign in to comment.