shard

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shard

type Shard struct {
	// Hash of the Shard, derived from the BlockHash and the sharding PRF.
	Hash sig.Hash
	// BlockHeader and BlockHeight on Ethereum when the Shard was formed.
	BlockHeader sig.Hash
	BlockHeight block.Height

	// Signatories maintaining the Shard. A Signatory is allowed to appear multiple times in the same Shard.
	Signatories sig.Signatories
}

func (Shard) ConsensusThreshold

func (shard Shard) ConsensusThreshold() int

ConsensusThreshold returns the number of honest Signatories that are required to reach consensus.

func (Shard) Includes

func (shard Shard) Includes(signatory sig.Signatory) bool

Includes returns whether or not a given Signatory is one of the Signatories maintaining the Shard.

func (Shard) Leader

func (shard Shard) Leader(round block.Round) sig.Signatory

Leader returns the Signatory that leads the Shard for a given Round.

func (Shard) Size

func (shard Shard) Size() int

Size returns the number of Signatories in the Shard.

Jump to

Keyboard shortcuts

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