Documentation
¶
Index ¶
- Variables
- func AllNodeIDs() []int32
- func ClientPubKey(clID int32) interface{}
- func CorrectPeers() []int32
- func Faults() int
- func GetHtn() int32
- func Init()
- func InitNodeIdentities(identities []*pb.NodeIdentity)
- func NodeIdentity(nodeID int32) *pb.NodeIdentity
- func NumNodes() int
- func Quorum() int
- func SetHtn(newHtn int32)
- func SimulatesCrash(peerID int32) bool
- func WeakQuorum() int
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ID of this peer. Initialized by the main program. // OwnID is only used by peers, not clients. // There is only one global OwnID, but potentially several clients that can run in one process. OwnID int32 = -1 // Peer own private key // TODO convert this to interface{} so it is decode form bytes only once on peer registration // TODO and not all the time OwnPrivKey []byte TBLSPrivKeyShare *crypto.TBLSPrivKeyShare // Public key of the BLS threshold cryptosystem TBLSPublicKey *crypto.TBLSPubKey SimulatedCrashes map[int32]*pb.NodeIdentity // Ladon: Simulate Straggler setting SimulatedStraggler map[int32]int32 )
Functions ¶
func AllNodeIDs ¶
func AllNodeIDs() []int32
Return an ordered list of IDs of all known nodes. Every node has a consistent view of this. (At least for now. This might change if we start experimenting with dynamic membership.)
func ClientPubKey ¶
func ClientPubKey(clID int32) interface{}
TODO: Implement proper client public keys, instead of this hard-coded one.
func CorrectPeers ¶
func CorrectPeers() []int32
func Init ¶
func Init()
Initializes the Client key (to be changed at some point). Cannot be part of the init() function, as the configuration file is not yet loaded when init() is executed.
func InitNodeIdentities ¶
func InitNodeIdentities(identities []*pb.NodeIdentity)
Initializes the known node identities.
func SimulatesCrash ¶
func WeakQuorum ¶
func WeakQuorum() int
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.