blame

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	PartyIDtoP2PID map[string]peer.ID
	// contains filtered or unexported fields
}

Manager deal with monero keygen / keysign related blame

func NewBlameManager

func NewBlameManager() *Manager

NewBlameManager create a new instance of blame manager

func (*Manager) GetAcceptShares

func (m *Manager) GetAcceptShares() *sync.Map

func (*Manager) GetBlame

func (m *Manager) GetBlame() *b.Blame

func (*Manager) GetBlamePubKeysLists

func (m *Manager) GetBlamePubKeysLists(peer []string) ([]string, []string, error)

GetBlamePubKeysLists returns the nodes public key who are not in the peer list

func (*Manager) GetBroadcastBlame

func (m *Manager) GetBroadcastBlame(lastMessageType string) ([]b.Node, error)

GetBroadcastBlame blame the node who cause the timeout in broadcast message

func (*Manager) GetLastMsg

func (m *Manager) GetLastMsg() string

func (*Manager) GetRoundMgr

func (m *Manager) GetRoundMgr() *b.RoundMgr

func (*Manager) GetShareMgr

func (m *Manager) GetShareMgr() *b.ShareMgr

func (*Manager) GetUnicastBlame

func (m *Manager) GetUnicastBlame(lastMsgType string) ([]b.Node, error)

GetUnicastBlame blame the node who cause the timeout in unicast message

func (*Manager) NodeSyncBlame

func (m *Manager) NodeSyncBlame(keys []string, onlinePeers []peer.ID) (b.Blame, error)

NodeSyncBlame blame the node who cause the timeout in node sync

func (*Manager) SetLastMsg

func (m *Manager) SetLastMsg(lastMsg string)

func (*Manager) SetLastUnicastPeer

func (m *Manager) SetLastUnicastPeer(peerID peer.ID, roundInfo string)

func (*Manager) SetPartyInfo

func (m *Manager) SetPartyInfo(party *btss.PartyID, partyIDMap map[string]*btss.PartyID)

func (*Manager) TssMissingShareBlame

func (m *Manager) TssMissingShareBlame(rounds int) ([]b.Node, bool, error)

TssMissingShareBlame blame the node fail to send the shares to the node

func (*Manager) TssWrongShareBlame

func (m *Manager) TssWrongShareBlame(wiredMsg *messages.WireMessage) (string, error)

TssWrongShareBlame blame the node who provide the wrong share

type PartyInfo

type PartyInfo struct {
	Party      *btss.PartyID
	PartyIDMap map[string]*btss.PartyID
}

PartyInfo the information used by tss key gen and key sign

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL