Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientID ¶
type ClientID string
ClientID represents the ID of a client.
func NewClientIDFromInt ¶
type RetentionIndex ¶
type RetentionIndex uint64
RetentionIndex represents an abstract notion of system progress used in garbage collection. The basic idea is to associate various parts of the system (parts of the state, even whole modules) that are subject to eventual garbage collection with a retention index. As the system progresses, the retention index monotonically increases and parts of the system associated with a lower retention index can be garbage-collected.
func (RetentionIndex) Bytes ¶
func (ri RetentionIndex) Bytes() []byte
Bytes converts a RetentionIndex to a slice of bytes (useful for serialization).
func (RetentionIndex) Pb ¶
func (ri RetentionIndex) Pb() uint64
Pb converts a RetentionIndex to its underlying native type.
type SeqNr ¶
type SeqNr uint64
SeqNr represents the sequence number of a batch as assigned by the ordering protocol.
type TxNo ¶
type TxNo uint64
TxNo represents a request number a client assigns to its requests.
type VoteWeight ¶
type VoteWeight string
VoteWeight represents the weight of a node's vote when gathering quorums. The underlying type is a string containing a decimal integer representation of the weight. This is required to support large integers that would not fit in a native data type like uint64. For example, this can occur if Trantor is used as a PoS system with cryptocurrency units as weights. We do not store the weights directly as big.Int, since that would make it harder to use them in protocol buffers. Instead, when performing mathematical operations on weights, we convert them to the big.Int type.
func (VoteWeight) BigInt ¶ added in v0.4.3
func (vw VoteWeight) BigInt() *big.Int
BigInt converts a VoteWeight (normally represented as a string) to a big.Int. BigInt panics if the underlying string is not a valid decimal representation of an integer. Thus, BigInt must not be called on received input without having validated VoteWeight by calling the IsValid method.
func (VoteWeight) Bytes ¶
func (vw VoteWeight) Bytes() []byte
func (VoteWeight) IsValid ¶ added in v0.4.3
func (vw VoteWeight) IsValid() bool
func (VoteWeight) Pb ¶ added in v0.4.3
func (vw VoteWeight) Pb() string
func (VoteWeight) String ¶ added in v0.4.3
func (vw VoteWeight) String() string