You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the first set of demos we implemented socket based communications between the coordinator and participants with the coordinator demo acting as a server. In real world usage, the coordinator will not always be the server. Even in a restricted scenario like a single user using multiple devices, it’s unlikely that one device will be able to act as a server and the others will be able to connect to it. Thus, it makes sense to decouple the server from the coordinator.
Specifications
The server will need to implement the following operations:
CreateNewSession
Input: signers identifiers
Output: session ID
SendCommitment
Input: session ID, identifier, SigningCommitments
Output: acknowledgement
GetSessionState
Input: session ID
Output: session state (WaitingForCommitments, CommitmentsReady, WaitingForSignatureShares, SignatureSharesReady)
GetCommitments
Input: session ID
Output: list of commitments
SendSigningPackage
Input: session ID, SigningPackage
Output: acknowledgement
GetSigningPackage
Input: session ID
Output: SigningPackage
SendSignatureShare
Input: session ID, identifier, SignatureShare
Output: acknowledgement
GetSignatureShares
Input: session ID
Output: list of signature shares
The server will behave as follows:
On CreateNewSession, generate random session ID, insert a new state into a map keyed by it.
State = WaitingForCommitments
On SendCommitment, add commitment into list.
If list is complete, set State = CommitmentsReady
On GetCommitments, send commitment list
On SendSigningPackage, cache the package into the state
set State = WaitingForSignatureShares
On GetSigningPackage, send the cached package
On SendSignatureShare, add signature share into list.
If list is complete, set State = SignatureSharesReady
On GetSignatureShares, send signature share list. Destroy session.
Implementation
The server can be an HTTP server which should make it easy for clients to integrate with.
Hyper could be used but it’s more low-level, it recommends axum or warp. Axum seems a bit easier and it integrates with tower which we use on Zebra.
The text was updated successfully, but these errors were encountered:
Motivation
During the first set of demos we implemented socket based communications between the coordinator and participants with the coordinator demo acting as a server. In real world usage, the coordinator will not always be the server. Even in a restricted scenario like a single user using multiple devices, it’s unlikely that one device will be able to act as a server and the others will be able to connect to it. Thus, it makes sense to decouple the server from the coordinator.
Specifications
The server will need to implement the following operations:
CreateNewSession
SendCommitment
GetSessionState
GetCommitments
SendSigningPackage
GetSigningPackage
SendSignatureShare
GetSignatureShares
The server will behave as follows:
CreateNewSession
, generate random session ID, insert a new state into a map keyed by it.SendCommitment
, add commitment into list.GetCommitments
, send commitment listSendSigningPackage
, cache the package into the stateGetSigningPackage
, send the cached packageSendSignatureShare
, add signature share into list.GetSignatureShares
, send signature share list. Destroy session.Implementation
The server can be an HTTP server which should make it easy for clients to integrate with.
Hyper could be used but it’s more low-level, it recommends axum or warp. Axum seems a bit easier and it integrates with tower which we use on Zebra.
The text was updated successfully, but these errors were encountered: