Versions in this module Expand all Collapse all v0 v0.0.3 Feb 22, 2024 v0.0.2 Feb 22, 2024 Changes in this version + var ErrCannotReorg = errors.New("can not reorg committee chain") + var ErrInvalidPeriod = errors.New("invalid update period") + var ErrInvalidUpdate = errors.New("invalid committee update") + var ErrNeedCommittee = errors.New("sync committee required") + var ErrWrongCommitteeRoot = errors.New("wrong committee root") + func GenerateTestCheckpoint(period uint64, committee *types.SerializedSyncCommittee) *types.BootstrapData + func GenerateTestCommittee() *types.SerializedSyncCommittee + func GenerateTestSignedHeader(header types.Header, config *types.ChainConfig, ...) types.SignedHeader + func GenerateTestUpdate(config *types.ChainConfig, period uint64, ...) *types.LightClientUpdate + type CommitteeChain struct + func NewCommitteeChain(db ethdb.KeyValueStore, config *types.ChainConfig, signerThreshold int, ...) *CommitteeChain + func (s *CommitteeChain) CheckpointInit(bootstrap *types.BootstrapData) error + func (s *CommitteeChain) InsertUpdate(update *types.LightClientUpdate, nextCommittee *types.SerializedSyncCommittee) error + func (s *CommitteeChain) NextSyncPeriod() (uint64, bool) + func (s *CommitteeChain) Reset() + func (s *CommitteeChain) VerifySignedHeader(head types.SignedHeader) (bool, time.Duration, error)