Documentation
¶
Index ¶
- func DefaultTreePos(size int) []hotstuff.ID
- func DefaultTreePosUint32(size int) []uint32
- func Shuffle(treePositions []uint32)
- type Tree
- func (t Tree) ChildrenOf(replicaID hotstuff.ID) []hotstuff.ID
- func (t Tree) IsRoot(replicaID hotstuff.ID) bool
- func (t Tree) Parent() (hotstuff.ID, bool)
- func (t Tree) PeersOf() []hotstuff.ID
- func (t Tree) ReplicaChildren() []hotstuff.ID
- func (t Tree) ReplicaHeight() int
- func (t Tree) Root() hotstuff.ID
- func (t *Tree) SetAggregationWaitTime(lm latency.Matrix, delta time.Duration)
- func (t *Tree) SetTreeHeightWaitTime(delta time.Duration)
- func (t Tree) SubTree() []hotstuff.ID
- func (t Tree) TreeHeight() int
- func (t *Tree) WaitTime() time.Duration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultTreePos ¶
DefaultTreePos returns the tree positions of the replicas.
func DefaultTreePosUint32 ¶
DefaultTreePosUint32 returns the tree positions of the replicas.
Types ¶
type Tree ¶
type Tree struct {
// contains filtered or unexported fields
}
Tree contains the local replica's ID which must be part of the tree. Once created, the tree is immutable.
func CreateTree ¶
CreateTree creates the tree configuration.
func (Tree) ChildrenOf ¶
ChildrenOf returns the children of a specific replica.
func (Tree) Parent ¶
Parent returns the ID of the parent of this tree's replica and true. If this tree's replica is the root, the root's ID is returned and false to indicate it does not have a parent.
func (Tree) PeersOf ¶
PeersOf returns the sibling peers of the tree's replica, unless the replica is the root, in which case there are no siblings.
func (Tree) ReplicaChildren ¶
ReplicaChildren returns the children of this tree's replica, if any.
func (Tree) ReplicaHeight ¶
ReplicaHeight returns the height of this tree's replica.
func (*Tree) SetAggregationWaitTime ¶
SetAggregationWaitTime sets the wait time for the aggregation of votes based on the highest latency path from node id to its leaf nodes. Only one of SetAggregationWaitTime or SetTreeHeightWaitTime should be called.
func (*Tree) SetTreeHeightWaitTime ¶
SetTreeHeightWaitTime sets the wait time for the aggregation of votes based on the height of the tree. Only one of SetAggregationWaitTime or SetTreeHeightWaitTime should be called.
func (Tree) TreeHeight ¶
TreeHeight returns the height of the full tree.