Documentation ¶
Index ¶
Constants ¶
View Source
const ( Namespace = "spacemesh" Subsystem = "consensus" )
View Source
const ( Window = 25 LocalThreshold = 0.8 //ThetaL GlobalThreshold = 0.6 //ThetaG Genesis = 0 )
Variables ¶
View Source
var ( //Opinion Support = vec{1, 0} Against = vec{0, 1} Abstain = vec{0, 0} ZeroPattern = votingPattern{} )
Functions ¶
Types ¶
type BlockIDLayerTuple ¶
func (BlockIDLayerTuple) Id ¶
func (blt BlockIDLayerTuple) Id() types.BlockID
func (BlockIDLayerTuple) Layer ¶
func (blt BlockIDLayerTuple) Layer() types.LayerID
type Mesh ¶
type Mesh interface { GetBlock(id types.BlockID) (*types.Block, error) LayerBlockIds(id types.LayerID) ([]types.BlockID, error) ForBlockInView(view map[types.BlockID]struct{}, layer types.LayerID, foo func(block *types.Block) (bool, error)) error SaveContextualValidity(id types.BlockID, valid bool) error Persist(key []byte, v interface{}) error Retrieve(key []byte, v interface{}) (interface{}, error) }
type NinjaTortoise ¶
todo memory optimizations
func NewNinjaTortoise ¶
func (*NinjaTortoise) LatestComplete ¶
func (ni *NinjaTortoise) LatestComplete() types.LayerID
func (*NinjaTortoise) PersistTortoise ¶
func (ni *NinjaTortoise) PersistTortoise() error
func (*NinjaTortoise) RecoverTortoise ¶
func (ni *NinjaTortoise) RecoverTortoise() (interface{}, error)
Click to show internal directories.
Click to hide internal directories.