Documentation ¶
Index ¶
- Constants
- Variables
- type Blame
- type Manager
- func (m *Manager) GetAcceptShares() *sync.Map
- 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(party btss.Party, partyIDMap map[string]*btss.PartyID)
- func (m *Manager) TssMissingShareBlame(rounds int) ([]Node, bool, error)
- func (m *Manager) TssWrongShareBlame(wiredMsg *messages.WireMessage) (string, error)
- type Node
- type PartyInfo
- type RoundInfo
- type RoundMgr
- type ShareMgr
Constants ¶
const ( HashCheckFail = "hash check failed" TssTimeout = "Tss timeout" TssSyncFail = "signers fail to sync before keygen/keysign" TssBrokenMsg = "tss share verification failed" InternalError = "fail to start the join party " )
Variables ¶
var ( ErrHashFromOwner = errors.New(" hash sent from data owner") ErrNotEnoughPeer = errors.New("not enough nodes to evaluate hash") ErrNotMajority = errors.New("message we received does not match the majority") ErrTssTimeOut = errors.New("error Tss Timeout") ErrHashCheck = errors.New("error in processing hash check") ErrHashInconsistency = errors.New("fail to agree on the hash value") )
Functions ¶
This section is empty.
Types ¶
type Blame ¶
type Blame struct { FailReason string `json:"fail_reason"` IsUnicast bool `json:"is_broadcast"` BlameNodes []Node `json:"blame_peers,omitempty"` }
Blame is used to store the blame nodes and the fail reason *** Blame struct had been referenced and registered in thornode , so please don't change this structure, otherwise it will have consensus failure when trying to update thornode ***
func (*Blame) AddBlameNodes ¶
AddBlameNodes add nodes to the blame list
func (*Blame) AlreadyBlame ¶
type Manager ¶
func NewBlameManager ¶
func NewBlameManager() *Manager
func (*Manager) GetAcceptShares ¶
func (*Manager) GetBlamePubKeysLists ¶
GetBlamePubKeysNotInList returns the nodes public key who are not in the peer list
func (*Manager) GetBroadcastBlame ¶
this blame blames the node who cause the timeout in broadcast message
func (*Manager) GetLastMsg ¶
func (*Manager) GetRoundMgr ¶
func (*Manager) GetShareMgr ¶
func (*Manager) GetUnicastBlame ¶
this blame blames the node who cause the timeout in unicast message
func (*Manager) NodeSyncBlame ¶
this blame blames the node who cause the timeout in node sync
func (*Manager) SetLastMsg ¶
func (*Manager) SetLastUnicastPeer ¶
func (*Manager) SetPartyInfo ¶
func (*Manager) TssMissingShareBlame ¶
this blame blames the node fail to send the shares to the node
func (*Manager) TssWrongShareBlame ¶
func (m *Manager) TssWrongShareBlame(wiredMsg *messages.WireMessage) (string, error)
this blame blames the node who provide the wrong share
type Node ¶
type RoundMgr ¶
type RoundMgr struct {
// contains filtered or unexported fields
}
func NewTssRoundMgr ¶
func NewTssRoundMgr() *RoundMgr