Documentation ¶
Index ¶
Constants ¶
View Source
const ( MpcGPKLeader = iota + 0 MpcGPKPeer MpcSignLeader MpcSignPeer )
View Source
const ( StatusCode = iota + 10 // used by storeman protocol KeepaliveCode KeepaliveOkCode MPCError RequestMPC // ask for a new mpc Context MPCMessage // get a message for a Context RequestMPCNonce KeepaliveCycle CheckAllPeerConnected BuildStoremanGroup AllPeersInfo GetPeersInfo NumberOfMessageCodes //MPCTimeOut = time.Second * 100 //MPCTimeOut = time.Second * 10 MPCTimeOut = time.Second * 20 PName = "storeman" PVer = uint64(10) PVerStr = "1.1" )
View Source
const ( MpcContextResult = "MpcContextResult" PublicKeyResult = "PublicKeyResult" // gpk RPublicKeyResult = "RPublicKeyResult" // R: rpk MpcM = "MpcM" // M MpcS = "MpcS" // S: s MpcExt = "MpcExtern" // extern MpcByApprove = "MpcByApprove" // by approve MpcTxHash = "MpcTxHash" MpcAddress = "MpcAddress" MPCAction = "MPCAction" )
View Source
const ( MpcApproving = "MpcApproving" MpcApproved = "MpcApproved" MpcApprovingKeys = "MpcApprovingKeys" // key : MpcApprovingKeys, value: array of the key of the data. )
Variables ¶
View Source
var ( ErrQuit = errors.New("quit") ErrMpcResultExist = errors.New("mpc Result is not exist") ErrContextType = errors.New("err Context Type is error") ErrTimeOut = errors.New("mpc Request is TimeOut") ErrPointZero = errors.New("mpc Point is zero") ErrMpcSeedOutRange = errors.New("mpc seeds are out range") ErrMpcSeedDuplicate = errors.New("mpc seeds have duplicate") ErrTooLessStoreman = errors.New("mpc alive Storeman is not enough") ErrFailedDataVerify = errors.New("mpc signing data validate failed") ErrFailedAddApproving = errors.New("mpc add approving data failed") ErrMpcContextExist = errors.New("mpc Context ID is already exist") ErrInvalidMPCAddr = errors.New("invalid mpc account address") ErrInvalidMPCR = errors.New("invalid signed data(R)") ErrInvalidMPCS = errors.New("invalid signed data(S)") ErrVerifyFailed = errors.New("verify failed") ErrGetDb = errors.New("get database failed") ErrWaitApproved = errors.New("wait for being approved failed") ErrGetApproved = errors.New("get being approved failed") ErrMarshal = errors.New("marshal data failed") ErrApprovedNotConsistent = errors.New("not equal,received data and approved data in DB") ErrTooLessDataCollected = errors.New("not enough data collected") )
View Source
var ( MpcSchnrThr = 26 // MpcSchnrThr >= number(storeman )/2 +1 MPCDegree = MpcSchnrThr - 1 MpcSchnrNodeNumber = 50 // At least MpcSchnrNodeNumber MPC nodes )
Functions ¶
This section is empty.
Types ¶
type GetMessageInterface ¶
type GetMessageInterface interface {
HandleMessage(*StepMessage) bool
}
type MpcMessage ¶
type MpcResultInterface ¶
type SendData ¶
type SignedResult ¶
type SliceStoremanGroup ¶
func (SliceStoremanGroup) Len ¶
func (s SliceStoremanGroup) Len() int
func (SliceStoremanGroup) Less ¶
func (s SliceStoremanGroup) Less(i, j int) bool
func (SliceStoremanGroup) Swap ¶
func (s SliceStoremanGroup) Swap(i, j int)
type StepMessage ¶
type StoremanManager ¶
Click to show internal directories.
Click to hide internal directories.