Documentation ¶
Overview ¶
Package eligibility defines fixed size oracle used for node testing
Index ¶
- type FixedRolacle
- func (fo *FixedRolacle) Eligible(layer types.LayerID, round int32, committeeSize int, id types.NodeID, ...) (bool, error)
- func (fo *FixedRolacle) Export(id uint32, committeeSize int) map[string]struct{}
- func (fo *FixedRolacle) IsIdentityActiveOnConsensusView(edID string, layer types.LayerID) (bool, error)
- func (fo *FixedRolacle) Proof(layer types.LayerID, round int32) ([]byte, error)
- func (fo *FixedRolacle) Register(isHonest bool, client string)
- func (fo *FixedRolacle) Unregister(isHonest bool, client string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FixedRolacle ¶
type FixedRolacle struct {
// contains filtered or unexported fields
}
FixedRolacle is an eligibility simulator with pre-determined honest and faulty participants.
func (*FixedRolacle) Eligible ¶
func (fo *FixedRolacle) Eligible(layer types.LayerID, round int32, committeeSize int, id types.NodeID, sig []byte) (bool, error)
Eligible returns whether the specific NodeID is eligible for layer in roudn and committee size.
func (*FixedRolacle) Export ¶
func (fo *FixedRolacle) Export(id uint32, committeeSize int) map[string]struct{}
Export creates a map with the eligible participants for id and committee size.
func (*FixedRolacle) IsIdentityActiveOnConsensusView ¶
func (fo *FixedRolacle) IsIdentityActiveOnConsensusView(edID string, layer types.LayerID) (bool, error)
IsIdentityActiveOnConsensusView is use to satisfy the API, currently always returns true.
func (*FixedRolacle) Register ¶
func (fo *FixedRolacle) Register(isHonest bool, client string)
Register adds a participant to the eligibility map. can be honest or faulty.
func (*FixedRolacle) Unregister ¶
func (fo *FixedRolacle) Unregister(isHonest bool, client string)
Unregister removes a participant from the eligibility map. can be honest or faulty. TODO: just remove from both instead of specifying.