Documentation ¶
Index ¶
- Variables
- type ChangeRoundData
- func (*ChangeRoundData) Descriptor() ([]byte, []int)deprecated
- func (x *ChangeRoundData) GetJustificationMsg() *Message
- func (x *ChangeRoundData) GetJustificationSig() []byte
- func (x *ChangeRoundData) GetPreparedRound() uint64
- func (x *ChangeRoundData) GetPreparedValue() []byte
- func (x *ChangeRoundData) GetSignerIds() []uint64
- func (*ChangeRoundData) ProtoMessage()
- func (x *ChangeRoundData) ProtoReflect() protoreflect.Message
- func (x *ChangeRoundData) Reset()
- func (x *ChangeRoundData) String() string
- func (d *ChangeRoundData) VerifySig(pk bls.PublicKey) (bool, error)
- type InputValue
- func (*InputValue) Descriptor() ([]byte, []int)deprecated
- func (x *InputValue) GetAggregation() *v1alpha1.SignedAggregateAttestationAndProof
- func (x *InputValue) GetAggregationData() *v1alpha1.AggregateAttestationAndProof
- func (x *InputValue) GetAttestation() *v1alpha1.Attestation
- func (x *InputValue) GetAttestationData() *v1alpha1.AttestationData
- func (x *InputValue) GetBeaconBlock() *v1alpha1.BeaconBlock
- func (x *InputValue) GetBlock() *v1alpha1.SignedBeaconBlock
- func (m *InputValue) GetData() isInputValue_Data
- func (m *InputValue) GetSignedData() isInputValue_SignedData
- func (*InputValue) ProtoMessage()
- func (x *InputValue) ProtoReflect() protoreflect.Message
- func (x *InputValue) Reset()
- func (x *InputValue) String() string
- type InputValue_Aggregation
- type InputValue_AggregationData
- type InputValue_Attestation
- type InputValue_AttestationData
- type InputValue_BeaconBlock
- type InputValue_Block
- type InstanceConfig
- func (*InstanceConfig) Descriptor() ([]byte, []int)deprecated
- func (x *InstanceConfig) GetLeaderPreprepareDelaySeconds() float32
- func (x *InstanceConfig) GetRoundChangeDurationSeconds() float32
- func (*InstanceConfig) ProtoMessage()
- func (x *InstanceConfig) ProtoReflect() protoreflect.Message
- func (x *InstanceConfig) Reset()
- func (x *InstanceConfig) String() string
- type Message
- func (msg *Message) Compare(other *Message) bool
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetLambda() []byte
- func (x *Message) GetRound() uint64
- func (x *Message) GetSeqNumber() uint64
- func (x *Message) GetType() RoundState
- func (x *Message) GetValue() []byte
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (msg *Message) Sign(sk *bls.SecretKey) (*bls.Sign, error)
- func (msg *Message) SigningRoot() ([]byte, error)
- func (x *Message) String() string
- type Node
- type RoundState
- type SignedMessage
- func (msg *SignedMessage) Aggregate(other *SignedMessage) error
- func (msg *SignedMessage) DeepCopy() (*SignedMessage, error)
- func (*SignedMessage) Descriptor() ([]byte, []int)deprecated
- func (x *SignedMessage) GetMessage() *Message
- func (x *SignedMessage) GetSignature() []byte
- func (x *SignedMessage) GetSignerIds() []uint64
- func (*SignedMessage) ProtoMessage()
- func (x *SignedMessage) ProtoReflect() protoreflect.Message
- func (x *SignedMessage) Reset()
- func (msg *SignedMessage) SignersIDString() string
- func (x *SignedMessage) String() string
- func (msg *SignedMessage) VerifyAggregatedSig(pks []*bls.PublicKey) (bool, error)
- func (msg *SignedMessage) VerifySig(pk *bls.PublicKey) (bool, error)
- type State
- func (*State) Descriptor() ([]byte, []int)deprecated
- func (x *State) GetDecidedMsg() *SignedMessage
- func (x *State) GetInputValue() []byte
- func (x *State) GetLambda() []byte
- func (x *State) GetPreparedRound() uint64
- func (x *State) GetPreparedValue() []byte
- func (x *State) GetRound() uint64
- func (x *State) GetSeqNumber() uint64
- func (x *State) GetStage() RoundState
- func (*State) ProtoMessage()
- func (x *State) ProtoReflect() protoreflect.Message
- func (x *State) Reset()
- func (x *State) String() string
Constants ¶
This section is empty.
Variables ¶
var ( RoundState_name = map[int32]string{ 0: "NotStarted", 1: "PrePrepare", 2: "Prepare", 3: "Commit", 4: "ChangeRound", 5: "Decided", 6: "Stopped", } RoundState_value = map[string]int32{ "NotStarted": 0, "PrePrepare": 1, "Prepare": 2, "Commit": 3, "ChangeRound": 4, "Decided": 5, "Stopped": 6, } )
Enum value maps for RoundState.
var File_beacon_proto protoreflect.FileDescriptor
var File_msgs_proto protoreflect.FileDescriptor
var File_params_proto protoreflect.FileDescriptor
var File_state_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ChangeRoundData ¶
type ChangeRoundData struct { PreparedRound uint64 `protobuf:"varint,1,opt,name=prepared_round,json=preparedRound,proto3" json:"prepared_round,omitempty"` PreparedValue []byte `protobuf:"bytes,2,opt,name=prepared_value,json=preparedValue,proto3" json:"prepared_value,omitempty"` JustificationMsg *Message `protobuf:"bytes,3,opt,name=justification_msg,json=justificationMsg,proto3" json:"justification_msg,omitempty"` JustificationSig []byte `protobuf:"bytes,4,opt,name=justification_sig,json=justificationSig,proto3" json:"justification_sig,omitempty"` SignerIds []uint64 `protobuf:"varint,5,rep,packed,name=signer_ids,json=signerIds,proto3" json:"signer_ids,omitempty"` // contains filtered or unexported fields }
func (*ChangeRoundData) Descriptor
deprecated
func (*ChangeRoundData) Descriptor() ([]byte, []int)
Deprecated: Use ChangeRoundData.ProtoReflect.Descriptor instead.
func (*ChangeRoundData) GetJustificationMsg ¶
func (x *ChangeRoundData) GetJustificationMsg() *Message
func (*ChangeRoundData) GetJustificationSig ¶
func (x *ChangeRoundData) GetJustificationSig() []byte
func (*ChangeRoundData) GetPreparedRound ¶
func (x *ChangeRoundData) GetPreparedRound() uint64
func (*ChangeRoundData) GetPreparedValue ¶
func (x *ChangeRoundData) GetPreparedValue() []byte
func (*ChangeRoundData) GetSignerIds ¶
func (x *ChangeRoundData) GetSignerIds() []uint64
func (*ChangeRoundData) ProtoMessage ¶
func (*ChangeRoundData) ProtoMessage()
func (*ChangeRoundData) ProtoReflect ¶ added in v0.0.4
func (x *ChangeRoundData) ProtoReflect() protoreflect.Message
func (*ChangeRoundData) Reset ¶
func (x *ChangeRoundData) Reset()
func (*ChangeRoundData) String ¶
func (x *ChangeRoundData) String() string
type InputValue ¶
type InputValue struct { // Types that are assignable to Data: // *InputValue_AttestationData // *InputValue_AggregationData // *InputValue_BeaconBlock Data isInputValue_Data `protobuf_oneof:"data"` // Types that are assignable to SignedData: // *InputValue_Attestation // *InputValue_Aggregation // *InputValue_Block SignedData isInputValue_SignedData `protobuf_oneof:"signed_data"` // contains filtered or unexported fields }
func (*InputValue) Descriptor
deprecated
func (*InputValue) Descriptor() ([]byte, []int)
Deprecated: Use InputValue.ProtoReflect.Descriptor instead.
func (*InputValue) GetAggregation ¶
func (x *InputValue) GetAggregation() *v1alpha1.SignedAggregateAttestationAndProof
func (*InputValue) GetAggregationData ¶
func (x *InputValue) GetAggregationData() *v1alpha1.AggregateAttestationAndProof
func (*InputValue) GetAttestation ¶
func (x *InputValue) GetAttestation() *v1alpha1.Attestation
func (*InputValue) GetAttestationData ¶
func (x *InputValue) GetAttestationData() *v1alpha1.AttestationData
func (*InputValue) GetBeaconBlock ¶
func (x *InputValue) GetBeaconBlock() *v1alpha1.BeaconBlock
func (*InputValue) GetBlock ¶
func (x *InputValue) GetBlock() *v1alpha1.SignedBeaconBlock
func (*InputValue) GetData ¶
func (m *InputValue) GetData() isInputValue_Data
func (*InputValue) GetSignedData ¶
func (m *InputValue) GetSignedData() isInputValue_SignedData
func (*InputValue) ProtoMessage ¶
func (*InputValue) ProtoMessage()
func (*InputValue) ProtoReflect ¶ added in v0.0.13
func (x *InputValue) ProtoReflect() protoreflect.Message
func (*InputValue) Reset ¶
func (x *InputValue) Reset()
func (*InputValue) String ¶
func (x *InputValue) String() string
type InputValue_Aggregation ¶
type InputValue_Aggregation struct {
Aggregation *v1alpha1.SignedAggregateAttestationAndProof `protobuf:"bytes,6,opt,name=aggregation,proto3,oneof"`
}
type InputValue_AggregationData ¶
type InputValue_AggregationData struct {
AggregationData *v1alpha1.AggregateAttestationAndProof `protobuf:"bytes,3,opt,name=aggregation_data,json=aggregationData,proto3,oneof"`
}
type InputValue_Attestation ¶
type InputValue_Attestation struct {
Attestation *v1alpha1.Attestation `protobuf:"bytes,5,opt,name=attestation,proto3,oneof"`
}
type InputValue_AttestationData ¶
type InputValue_AttestationData struct {
AttestationData *v1alpha1.AttestationData `protobuf:"bytes,2,opt,name=attestation_data,json=attestationData,proto3,oneof"`
}
type InputValue_BeaconBlock ¶
type InputValue_BeaconBlock struct {
BeaconBlock *v1alpha1.BeaconBlock `protobuf:"bytes,4,opt,name=beacon_block,json=beaconBlock,proto3,oneof"`
}
type InputValue_Block ¶
type InputValue_Block struct {
Block *v1alpha1.SignedBeaconBlock `protobuf:"bytes,7,opt,name=block,proto3,oneof"`
}
type InstanceConfig ¶
type InstanceConfig struct { RoundChangeDurationSeconds float32 `` /* 145-byte string literal not displayed */ LeaderPreprepareDelaySeconds float32 `` // The time a round leader waits before broadcasting pre-prepare message /* 151-byte string literal not displayed */ // contains filtered or unexported fields }
func DefaultConsensusParams ¶
func DefaultConsensusParams() *InstanceConfig
DefaultConsensusParams returns the default round change duration time
func (*InstanceConfig) Descriptor
deprecated
func (*InstanceConfig) Descriptor() ([]byte, []int)
Deprecated: Use InstanceConfig.ProtoReflect.Descriptor instead.
func (*InstanceConfig) GetLeaderPreprepareDelaySeconds ¶ added in v0.0.5
func (x *InstanceConfig) GetLeaderPreprepareDelaySeconds() float32
func (*InstanceConfig) GetRoundChangeDurationSeconds ¶ added in v0.0.5
func (x *InstanceConfig) GetRoundChangeDurationSeconds() float32
func (*InstanceConfig) ProtoMessage ¶
func (*InstanceConfig) ProtoMessage()
func (*InstanceConfig) ProtoReflect ¶ added in v0.0.13
func (x *InstanceConfig) ProtoReflect() protoreflect.Message
func (*InstanceConfig) Reset ¶
func (x *InstanceConfig) Reset()
func (*InstanceConfig) String ¶
func (x *InstanceConfig) String() string
type Message ¶
type Message struct { Type RoundState `protobuf:"varint,1,opt,name=type,proto3,enum=proto.RoundState" json:"type,omitempty"` Round uint64 `protobuf:"varint,2,opt,name=round,proto3" json:"round,omitempty"` Lambda []byte `protobuf:"bytes,3,opt,name=lambda,proto3" json:"lambda,omitempty"` // sequence number is an incremental number for each instance, much like a block number would be in a blockchain SeqNumber uint64 `protobuf:"varint,4,opt,name=seq_number,json=seqNumber,proto3" json:"seq_number,omitempty"` Value []byte `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Message) Compare ¶
Compare returns true if both messages are equal. DOES NOT compare signatures
func (*Message) Descriptor
deprecated
func (*Message) GetSeqNumber ¶
func (*Message) GetType ¶
func (x *Message) GetType() RoundState
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶ added in v0.0.4
func (x *Message) ProtoReflect() protoreflect.Message
func (*Message) SigningRoot ¶
SigningRoot returns a signing root (bytes)
type Node ¶
type Node struct { IbftId uint64 `protobuf:"varint,1,opt,name=ibft_id,json=ibftId,proto3" json:"ibft_id,omitempty"` Pk []byte `protobuf:"bytes,2,opt,name=pk,proto3" json:"pk,omitempty"` Sk []byte `protobuf:"bytes,3,opt,name=sk,proto3" json:"sk,omitempty"` // contains filtered or unexported fields }
func (*Node) Descriptor
deprecated
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶ added in v0.0.13
func (x *Node) ProtoReflect() protoreflect.Message
type RoundState ¶
type RoundState int32
const ( RoundState_NotStarted RoundState = 0 RoundState_PrePrepare RoundState = 1 RoundState_Prepare RoundState = 2 RoundState_Commit RoundState = 3 // Commit is when an instance receives a qualified quorum of prepare msgs, then sends a commit msg. RoundState_ChangeRound RoundState = 4 RoundState_Decided RoundState = 5 // Decided is when an instance receives a qualified quorum of commit msgs RoundState_Stopped RoundState = 6 )
func (RoundState) Descriptor ¶ added in v0.0.4
func (RoundState) Descriptor() protoreflect.EnumDescriptor
func (RoundState) Enum ¶ added in v0.0.4
func (x RoundState) Enum() *RoundState
func (RoundState) EnumDescriptor
deprecated
func (RoundState) EnumDescriptor() ([]byte, []int)
Deprecated: Use RoundState.Descriptor instead.
func (RoundState) Number ¶ added in v0.0.4
func (x RoundState) Number() protoreflect.EnumNumber
func (RoundState) String ¶
func (x RoundState) String() string
func (RoundState) Type ¶ added in v0.0.4
func (RoundState) Type() protoreflect.EnumType
type SignedMessage ¶
type SignedMessage struct { Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` SignerIds []uint64 `protobuf:"varint,3,rep,packed,name=signer_ids,json=signerIds,proto3" json:"signer_ids,omitempty"` // contains filtered or unexported fields }
func (*SignedMessage) Aggregate ¶
func (msg *SignedMessage) Aggregate(other *SignedMessage) error
Aggregate serialize and aggregates signature and signer ID to signed message
func (*SignedMessage) DeepCopy ¶
func (msg *SignedMessage) DeepCopy() (*SignedMessage, error)
DeepCopy checks marshalling of SignedMessage and returns it
func (*SignedMessage) Descriptor
deprecated
func (*SignedMessage) Descriptor() ([]byte, []int)
Deprecated: Use SignedMessage.ProtoReflect.Descriptor instead.
func (*SignedMessage) GetMessage ¶
func (x *SignedMessage) GetMessage() *Message
func (*SignedMessage) GetSignature ¶
func (x *SignedMessage) GetSignature() []byte
func (*SignedMessage) GetSignerIds ¶
func (x *SignedMessage) GetSignerIds() []uint64
func (*SignedMessage) ProtoMessage ¶
func (*SignedMessage) ProtoMessage()
func (*SignedMessage) ProtoReflect ¶ added in v0.0.4
func (x *SignedMessage) ProtoReflect() protoreflect.Message
func (*SignedMessage) Reset ¶
func (x *SignedMessage) Reset()
func (*SignedMessage) SignersIDString ¶
func (msg *SignedMessage) SignersIDString() string
SignersIDString returns all Signer's Ids as string
func (*SignedMessage) String ¶
func (x *SignedMessage) String() string
func (*SignedMessage) VerifyAggregatedSig ¶
func (msg *SignedMessage) VerifyAggregatedSig(pks []*bls.PublicKey) (bool, error)
VerifyAggregatedSig returns true if the signed msg verifies against the public keys, false if otherwise
type State ¶
type State struct { Stage RoundState `protobuf:"varint,1,opt,name=stage,proto3,enum=proto.RoundState" json:"stage,omitempty"` // lambda is an instance unique identifier, much like a block hash in a blockchain Lambda []byte `protobuf:"bytes,2,opt,name=lambda,proto3" json:"lambda,omitempty"` // sequence number is an incremental number for each instance, much like a block number would be in a blockchain SeqNumber uint64 `protobuf:"varint,3,opt,name=seq_number,json=seqNumber,proto3" json:"seq_number,omitempty"` InputValue []byte `protobuf:"bytes,4,opt,name=input_value,json=inputValue,proto3" json:"input_value,omitempty"` Round uint64 `protobuf:"varint,5,opt,name=round,proto3" json:"round,omitempty"` PreparedRound uint64 `protobuf:"varint,6,opt,name=prepared_round,json=preparedRound,proto3" json:"prepared_round,omitempty"` PreparedValue []byte `protobuf:"bytes,7,opt,name=prepared_value,json=preparedValue,proto3" json:"prepared_value,omitempty"` DecidedMsg *SignedMessage `protobuf:"bytes,8,opt,name=decided_msg,json=decidedMsg,proto3" json:"decided_msg,omitempty"` // contains filtered or unexported fields }
func (*State) Descriptor
deprecated
func (*State) GetDecidedMsg ¶ added in v0.0.13
func (x *State) GetDecidedMsg() *SignedMessage
func (*State) GetInputValue ¶
func (*State) GetPreparedRound ¶
func (*State) GetPreparedValue ¶
func (*State) GetSeqNumber ¶
func (*State) GetStage ¶
func (x *State) GetStage() RoundState
func (*State) ProtoMessage ¶
func (*State) ProtoMessage()
func (*State) ProtoReflect ¶ added in v0.0.13
func (x *State) ProtoReflect() protoreflect.Message