Versions in this module Expand all Collapse all v1 v1.4.0 Oct 1, 2021 Changes in this version + const HashCheckFail + const InternalError + const TssBrokenMsg + const TssSyncFail + const TssTimeout + var ErrHashCheck = errors.New("error in processing hash check") + var ErrHashFromOwner = errors.New(" hash sent from data owner") + var ErrHashInconsistency = errors.New("fail to agree on the hash value") + var ErrNotEnoughPeer = errors.New("not enough nodes to evaluate hash") + var ErrNotMajority = errors.New("message we received does not match the majority") + var ErrTssTimeOut = errors.New("error Tss Timeout") + type Blame struct + BlameNodes []Node + FailReason string + IsUnicast bool + func NewBlame(reason string, blameNodes []Node) Blame + func (b *Blame) AddBlameNodes(newBlameNodes ...Node) + func (b *Blame) AlreadyBlame() bool + func (b *Blame) SetBlame(reason string, nodes []Node, isUnicast bool) + func (b Blame) String() string + type Manager struct + PartyIDtoP2PID map[string]peer.ID + func NewBlameManager() *Manager + func (m *Manager) CheckMsgDuplication(round RoundInfo, id string) bool + func (m *Manager) GetBlame() *Blame + func (m *Manager) GetBlamePubKeysLists(peer []string) ([]string, []string, error) + func (m *Manager) GetBroadcastBlame(lastMessageType string) ([]Node, error) + func (m *Manager) GetLastMsg() btss.Message + func (m *Manager) GetRoundMgr() *RoundMgr + func (m *Manager) GetShareMgr() *ShareMgr + func (m *Manager) GetUnicastBlame(lastMsgType string) ([]Node, error) + func (m *Manager) NodeSyncBlame(keys []string, onlinePeers []peer.ID) (Blame, error) + func (m *Manager) SetLastMsg(lastMsg btss.Message) + func (m *Manager) SetLastUnicastPeer(peerID peer.ID, roundInfo string) + func (m *Manager) SetPartyInfo(partyMap *sync.Map, partyIDMap map[string]*btss.PartyID) + func (m *Manager) TssMissingShareBlame(rounds int) ([]Node, bool, error) + func (m *Manager) TssWrongShareBlame(wiredMsg *messages.WireMessage) (string, error) + func (m *Manager) UpdateAcceptShare(round RoundInfo, id string) + type Node struct + BlameData []byte + BlameSignature []byte + Pubkey string + func NewNode(pk string, blameData, blameSig []byte) Node + func (bn *Node) Equal(node Node) bool + type PartyInfo struct + PartyIDMap map[string]*btss.PartyID + PartyMap *sync.Map + type RoundInfo struct + Index int + MsgIdentifier string + RoundMsg string + type RoundMgr struct + func NewTssRoundMgr() *RoundMgr + func (tr *RoundMgr) Get(key string) *messages.WireMessage + func (tr *RoundMgr) GetByRound(roundInfo string) []string + func (tr *RoundMgr) Set(key string, msg *messages.WireMessage) + type ShareMgr struct + func NewTssShareMgr() *ShareMgr + func (sm *ShareMgr) QueryAndDelete(key string) bool + func (sm *ShareMgr) Set(key string)