Versions in this module Expand all Collapse all v0 v0.0.1 Nov 7, 2024 Changes in this version + const BlsConsensusType + var ErrIntOverflowMessage = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthMessage = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrUnexpectedEndOfGroupMessage = fmt.Errorf("proto: unexpected end of group") + type BroadcastMessenger interface + BroadcastBlock func(data.BodyHandler, data.HeaderHandler) error + BroadcastBlockDataLeader func(header data.HeaderHandler, miniBlocks map[uint32][]byte, ...) error + BroadcastConsensusMessage func(*Message) error + BroadcastHeader func(data.HeaderHandler, []byte) error + BroadcastMiniBlocks func(map[uint32][]byte, []byte) error + BroadcastTransactions func(map[string][][]byte, []byte) error + IsInterfaceNil func() bool + PrepareBroadcastBlockDataValidator func(header data.HeaderHandler, miniBlocks map[uint32][]byte, ...) + PrepareBroadcastHeaderValidator func(header data.HeaderHandler, miniBlocks map[uint32][]byte, ...) + type ChronologyHandler interface + AddSubround func(SubroundHandler) + Close func() error + IsInterfaceNil func() bool + RemoveAllSubrounds func() + StartRounds func() + type FallbackHeaderValidator interface + IsInterfaceNil func() bool + ShouldApplyFallbackValidation func(headerHandler data.HeaderHandler) bool + type HeaderSigVerifier interface + IsInterfaceNil func() bool + VerifyLeaderSignature func(header data.HeaderHandler) error + VerifyRandSeed func(header data.HeaderHandler) error + VerifySignature func(header data.HeaderHandler) error + type HeadersPoolSubscriber interface + IsInterfaceNil func() bool + RegisterHandler func(handler func(headerHandler data.HeaderHandler, headerHash []byte)) + type InterceptorSubscriber interface + IsInterfaceNil func() bool + RegisterHandler func(handler func(toShard uint32, data []byte)) + type KeysHandler interface + GetAssociatedPid func(pkBytes []byte) core.PeerID + GetHandledPrivateKey func(pkBytes []byte) crypto.PrivateKey + GetP2PIdentity func(pkBytes []byte) ([]byte, core.PeerID, error) + GetRedundancyStepInReason func() string + IncrementRoundsWithoutReceivedMessages func(pkBytes []byte) + IsInterfaceNil func() bool + IsKeyManagedByCurrentNode func(pkBytes []byte) bool + IsOriginalPublicKeyOfTheNode func(pkBytes []byte) bool + ResetRoundsWithoutReceivedMessages func(pkBytes []byte, pid core.PeerID) + type Message struct + AggregateSignature []byte + BlockHeaderHash []byte + Body []byte + ChainID []byte + Header []byte + InvalidSigners []byte + LeaderSignature []byte + MsgType int64 + OriginatorPid []byte + PubKey []byte + PubKeysBitmap []byte + RoundIndex int64 + Signature []byte + SignatureShare []byte + func NewConsensusMessage(blHeaderHash []byte, signatureShare []byte, body []byte, header []byte, ...) *Message + func (*Message) Descriptor() ([]byte, []int) + func (*Message) ProtoMessage() + func (m *Message) GetAggregateSignature() []byte + func (m *Message) GetBlockHeaderHash() []byte + func (m *Message) GetBody() []byte + func (m *Message) GetChainID() []byte + func (m *Message) GetHeader() []byte + func (m *Message) GetInvalidSigners() []byte + func (m *Message) GetLeaderSignature() []byte + func (m *Message) GetMsgType() int64 + func (m *Message) GetOriginatorPid() []byte + func (m *Message) GetPubKey() []byte + func (m *Message) GetPubKeysBitmap() []byte + func (m *Message) GetRoundIndex() int64 + func (m *Message) GetSignature() []byte + func (m *Message) GetSignatureShare() []byte + func (m *Message) Marshal() (dAtA []byte, err error) + func (m *Message) MarshalTo(dAtA []byte) (int, error) + func (m *Message) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Message) Reset() + func (m *Message) Size() (n int) + func (m *Message) Unmarshal(dAtA []byte) error + func (m *Message) XXX_DiscardUnknown() + func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Message) XXX_Merge(src proto.Message) + func (m *Message) XXX_Size() int + func (m *Message) XXX_Unmarshal(b []byte) error + func (this *Message) Equal(that interface{}) bool + func (this *Message) GoString() string + func (this *Message) String() string + type MessageType int + type NetworkShardingCollector interface + GetPeerInfo func(pid core.PeerID) core.P2PPeerInfo + IsInterfaceNil func() bool + PutPeerIdSubType func(pid core.PeerID, peerSubType core.P2PPeerSubType) + UpdatePeerIDInfo func(pid core.PeerID, pk []byte, shardID uint32) + type NodeRedundancyHandler interface + AdjustInactivityIfNeeded func(selfPubKey string, consensusPubKeys []string, roundIndex int64) + IsInterfaceNil func() bool + IsMainMachineActive func() bool + IsRedundancyNode func() bool + ObserverPrivateKey func() crypto.PrivateKey + ResetInactivityIfNeeded func(selfPubKey string, consensusMsgPubKey string, consensusMsgPeerID core.PeerID) + type P2PAntifloodHandler interface + BlacklistPeer func(peer core.PeerID, reason string, duration time.Duration) + CanProcessMessage func(message p2p.MessageP2P, fromConnectedPeer core.PeerID) error + CanProcessMessagesOnTopic func(peer core.PeerID, topic string, numMessages uint32, totalSize uint64, ...) error + IsInterfaceNil func() bool + ResetForTopic func(topic string) + SetMaxMessagesForTopic func(topic string, maxNum uint32) + type P2PMessenger interface + Broadcast func(topic string, buff []byte) + BroadcastUsingPrivateKey func(topic string, buff []byte, pid core.PeerID, skBytes []byte) + IsInterfaceNil func() bool + type P2PSigningHandler interface + Deserialize func(messagesBytes []byte) ([]p2p.MessageP2P, error) + IsInterfaceNil func() bool + Serialize func(messages []p2p.MessageP2P) ([]byte, error) + Verify func(message p2p.MessageP2P) error + type PeerBlacklistHandler interface + BlacklistPeer func(peer core.PeerID, duration time.Duration) + Close func() error + IsInterfaceNil func() bool + IsPeerBlacklisted func(peer core.PeerID) bool + type PeerHonestyHandler interface + ChangeScore func(pk string, topic string, units int) + Close func() error + IsInterfaceNil func() bool + type RoundHandler interface + BeforeGenesis func() bool + Index func() int64 + IsInterfaceNil func() bool + RemainingTime func(startTime time.Time, maxTime time.Duration) time.Duration + TimeDuration func() time.Duration + TimeStamp func() time.Time + UpdateRound func(time.Time, time.Time) + type ScheduledProcessor interface + ForceStopScheduledExecutionBlocking func() + IsInterfaceNil func() bool + IsProcessedOKWithTimeout func() bool + StartScheduledProcessing func(header data.HeaderHandler, body data.BodyHandler, startTime time.Time) + type SigningHandler interface + AggregateSigs func(bitmap []byte, epoch uint32) ([]byte, error) + CreateSignatureForPublicKey func(message []byte, publicKeyBytes []byte) ([]byte, error) + CreateSignatureShareForPublicKey func(message []byte, index uint16, epoch uint32, publicKeyBytes []byte) ([]byte, error) + IsInterfaceNil func() bool + Reset func(pubKeys []string) error + SetAggregatedSig func([]byte) error + SignatureShare func(index uint16) ([]byte, error) + StoreSignatureShare func(index uint16, sig []byte) error + Verify func(msg []byte, bitmap []byte, epoch uint32) error + VerifySignatureShare func(index uint16, sig []byte, msg []byte, epoch uint32) error + VerifySingleSignature func(publicKeyBytes []byte, message []byte, signature []byte) error + type SubroundHandler interface + ConsensusChannel func() chan bool + Current func() int + DoWork func(ctx context.Context, roundHandler RoundHandler) bool + EndTime func() int64 + IsInterfaceNil func() bool + Name func() string + Next func() int + Previous func() int + StartTime func() int64