Versions in this module Expand all Collapse all v1 v1.3.9 Dec 30, 2021 Changes in this version + const MaxMessageLength + const MessageLength + var CommandType_name = map[int32]string + var CommandType_value = map[string]int32 + var ErrIntOverflowGossip = fmt.Errorf("proto: integer overflow") + var ErrInvalidLengthGossip = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrKeyNotOnCurve = errors.New("the public key is not on curve") + var ErrLocalKeyAuthInit = errors.New("incorrect state for local KeyAuthInitmessage") + var ErrMessageLengthExceed = errors.New("message size exceeded maximum") + var ErrPeerAuthenticatedFailed = errors.New("public key authentication failed for peer") + var ErrPeerKeyAuthChallenge = errors.New("incorrect state for peer KeyAuthChallenge message") + var ErrPeerKeyAuthChallengeResponse = errors.New("incorrect state for peer KeyAuthChallengeResponse message") + var ErrPeerKeyAuthInit = errors.New("incorrect state for peer KeyAuthInit message") + var ErrUnexpectedEndOfGroupGossip = fmt.Errorf("proto: unexpected end of group") + func ECDH(publicKey *ecdsa.PublicKey, key *ecdsa.PrivateKey) *big.Int + type CommandType int32 + const CommandType_CONSENSUS + const CommandType_KEY_AUTH_CHALLENGE + const CommandType_KEY_AUTH_CHALLENGE_REPLY + const CommandType_KEY_AUTH_INIT + const CommandType_NOP + func (CommandType) EnumDescriptor() ([]byte, []int) + func (x CommandType) String() string + type Gossip struct + Command CommandType + Message []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*Gossip) Descriptor() ([]byte, []int) + func (*Gossip) ProtoMessage() + func (m *Gossip) GetCommand() CommandType + func (m *Gossip) GetMessage() []byte + func (m *Gossip) Marshal() (dAtA []byte, err error) + func (m *Gossip) MarshalTo(dAtA []byte) (int, error) + func (m *Gossip) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *Gossip) Reset() + func (m *Gossip) Size() (n int) + func (m *Gossip) String() string + func (m *Gossip) Unmarshal(dAtA []byte) error + func (m *Gossip) XXX_DiscardUnknown() + func (m *Gossip) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *Gossip) XXX_Merge(src proto.Message) + func (m *Gossip) XXX_Size() int + func (m *Gossip) XXX_Unmarshal(b []byte) error + type KeyAuthChallenge struct + Challenge []byte + X []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + Y []byte + func (*KeyAuthChallenge) Descriptor() ([]byte, []int) + func (*KeyAuthChallenge) ProtoMessage() + func (m *KeyAuthChallenge) GetChallenge() []byte + func (m *KeyAuthChallenge) GetX() []byte + func (m *KeyAuthChallenge) GetY() []byte + func (m *KeyAuthChallenge) Marshal() (dAtA []byte, err error) + func (m *KeyAuthChallenge) MarshalTo(dAtA []byte) (int, error) + func (m *KeyAuthChallenge) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *KeyAuthChallenge) Reset() + func (m *KeyAuthChallenge) Size() (n int) + func (m *KeyAuthChallenge) String() string + func (m *KeyAuthChallenge) Unmarshal(dAtA []byte) error + func (m *KeyAuthChallenge) XXX_DiscardUnknown() + func (m *KeyAuthChallenge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *KeyAuthChallenge) XXX_Merge(src proto.Message) + func (m *KeyAuthChallenge) XXX_Size() int + func (m *KeyAuthChallenge) XXX_Unmarshal(b []byte) error + type KeyAuthChallengeReply struct + HMAC []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*KeyAuthChallengeReply) Descriptor() ([]byte, []int) + func (*KeyAuthChallengeReply) ProtoMessage() + func (m *KeyAuthChallengeReply) GetHMAC() []byte + func (m *KeyAuthChallengeReply) Marshal() (dAtA []byte, err error) + func (m *KeyAuthChallengeReply) MarshalTo(dAtA []byte) (int, error) + func (m *KeyAuthChallengeReply) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *KeyAuthChallengeReply) Reset() + func (m *KeyAuthChallengeReply) Size() (n int) + func (m *KeyAuthChallengeReply) String() string + func (m *KeyAuthChallengeReply) Unmarshal(dAtA []byte) error + func (m *KeyAuthChallengeReply) XXX_DiscardUnknown() + func (m *KeyAuthChallengeReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *KeyAuthChallengeReply) XXX_Merge(src proto.Message) + func (m *KeyAuthChallengeReply) XXX_Size() int + func (m *KeyAuthChallengeReply) XXX_Unmarshal(b []byte) error + type KeyAuthInit struct + X []byte + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + Y []byte + func (*KeyAuthInit) Descriptor() ([]byte, []int) + func (*KeyAuthInit) ProtoMessage() + func (m *KeyAuthInit) GetX() []byte + func (m *KeyAuthInit) GetY() []byte + func (m *KeyAuthInit) Marshal() (dAtA []byte, err error) + func (m *KeyAuthInit) MarshalTo(dAtA []byte) (int, error) + func (m *KeyAuthInit) MarshalToSizedBuffer(dAtA []byte) (int, error) + func (m *KeyAuthInit) Reset() + func (m *KeyAuthInit) Size() (n int) + func (m *KeyAuthInit) String() string + func (m *KeyAuthInit) Unmarshal(dAtA []byte) error + func (m *KeyAuthInit) XXX_DiscardUnknown() + func (m *KeyAuthInit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *KeyAuthInit) XXX_Merge(src proto.Message) + func (m *KeyAuthInit) XXX_Size() int + func (m *KeyAuthInit) XXX_Unmarshal(b []byte) error + type TCPAgent struct + func NewTCPAgent(consensus *bdls.Consensus, privateKey *ecdsa.PrivateKey) *TCPAgent + func (agent *TCPAgent) AddPeer(p *TCPPeer) bool + func (agent *TCPAgent) Close() + func (agent *TCPAgent) GetLatestState() (height uint64, round uint64, data bdls.State) + func (agent *TCPAgent) Propose(s bdls.State) + func (agent *TCPAgent) RemovePeer(p *TCPPeer) bool + func (agent *TCPAgent) Update() + type TCPPeer struct + func NewTCPPeer(conn net.Conn, agent *TCPAgent) *TCPPeer + func (p *TCPPeer) Close() + func (p *TCPPeer) GetPublicKey() *ecdsa.PublicKey + func (p *TCPPeer) InitiatePublicKeyAuthentication() error + func (p *TCPPeer) RemoteAddr() net.Addr + func (p *TCPPeer) Send(out []byte) error