Documentation ¶
Index ¶
- func BytesFromTimeoutVote(t *Timeout, author string, vote *TimeoutVote) []byte
- type BlockData
- type IRChangeReason
- type IRChangeReq
- type Payload
- type QuorumCert
- type RoundInfo
- type Timeout
- type TimeoutCert
- func (x *TimeoutCert) Add(author string, timeout *Timeout, signature []byte) error
- func (x *TimeoutCert) GetAuthors() []string
- func (x *TimeoutCert) GetHqcRound() uint64
- func (x *TimeoutCert) GetRound() uint64
- func (x *TimeoutCert) IsValid() error
- func (x *TimeoutCert) Verify(tb types.RootTrustBase) error
- type TimeoutVote
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesFromTimeoutVote ¶
func BytesFromTimeoutVote(t *Timeout, author string, vote *TimeoutVote) []byte
Types ¶
type BlockData ¶
type BlockData struct { Author string `json:"author,omitempty"` // NodeIdentifier of the proposer Round uint64 `json:"round,omitempty"` // Root round number Epoch uint64 `json:"epoch,omitempty"` // Epoch to establish valid configuration Timestamp uint64 `json:"timestamp,omitempty"` Payload *Payload `json:"payload,omitempty"` // Payload that will trigger changes to the state // quorum certificate for ancestor // before payload can be applied check that local state matches state in qc // qc.vote_info.proposed.state_hash == h(UC[]) Qc *QuorumCert `json:"qc,omitempty"` // contains filtered or unexported fields }
func (*BlockData) GetParentRound ¶
type IRChangeReason ¶
type IRChangeReason uint8
const ( Quorum IRChangeReason = iota QuorumNotPossible T2Timeout )
func (IRChangeReason) String ¶
func (r IRChangeReason) String() string
type IRChangeReq ¶
type IRChangeReq struct { Partition types.SystemID Shard types.ShardID CertReason IRChangeReason // IR change (quorum or no quorum possible of block certification requests) Requests []*certification.BlockCertificationRequest Technical certification.TechnicalRecord // contains filtered or unexported fields }
func (*IRChangeReq) IsValid ¶
func (x *IRChangeReq) IsValid() error
func (*IRChangeReq) String ¶
func (x *IRChangeReq) String() string
func (*IRChangeReq) Verify ¶
func (x *IRChangeReq) Verify(tb partitions.PartitionTrustBase, luc *types.UnicityCertificate, round, t2InRounds uint64) (*types.InputRecord, error)
type Payload ¶
type Payload struct { Requests []*IRChangeReq `json:"requests,omitempty"` // IR change requests with quorum or no quorum possible // contains filtered or unexported fields }
type QuorumCert ¶
type QuorumCert struct { VoteInfo *RoundInfo `json:"vote_info,omitempty"` // Consensus data LedgerCommitInfo *types.UnicitySeal `json:"ledger_commit_info,omitempty"` // Commit info Signatures map[string][]byte `json:"signatures,omitempty"` // Node identifier to signature map (NB! aggregated signature schema in spec) // contains filtered or unexported fields }
func NewQuorumCertificate ¶
func NewQuorumCertificate(voteInfo *RoundInfo, commitHash []byte) *QuorumCert
func NewQuorumCertificateFromVote ¶
func NewQuorumCertificateFromVote(voteInfo *RoundInfo, commitInfo *types.UnicitySeal, signatures map[string][]byte) *QuorumCert
func (*QuorumCert) GetCommitRound ¶
func (x *QuorumCert) GetCommitRound() uint64
func (*QuorumCert) GetParentRound ¶
func (x *QuorumCert) GetParentRound() uint64
func (*QuorumCert) GetRound ¶
func (x *QuorumCert) GetRound() uint64
func (*QuorumCert) IsValid ¶
func (x *QuorumCert) IsValid() error
func (*QuorumCert) SignatureBytes ¶
func (x *QuorumCert) SignatureBytes() []byte
SignatureBytes serializes signatures.
func (*QuorumCert) Verify ¶
func (x *QuorumCert) Verify(tb types.RootTrustBase) error
type RoundInfo ¶
type RoundInfo struct { RoundNumber uint64 `json:"root_chain_round_number,omitempty"` Epoch uint64 `json:"root_epoch,omitempty"` Timestamp uint64 `json:"timestamp,omitempty"` ParentRoundNumber uint64 `json:"root_chain_parent_round_number,omitempty"` CurrentRootHash []byte `json:"current_root_hash,omitempty"` // contains filtered or unexported fields }
func (*RoundInfo) GetParentRound ¶
type Timeout ¶
type Timeout struct { Epoch uint64 `json:"epoch,omitempty"` // Epoch to establish valid configuration Round uint64 `json:"round,omitempty"` // Root round number HighQc *QuorumCert `json:"high_qc,omitempty"` // Highest quorum certificate of the validator LastTC *TimeoutCert `json:"last_tc,omitempty"` // TC for Round−1 if HighQC.Round != Round−1 (nil otherwise) // contains filtered or unexported fields }
func NewTimeout ¶
func NewTimeout(round, epoch uint64, hqc *QuorumCert, lastTC *TimeoutCert) *Timeout
NewTimeout creates new Timeout for round (epoch) and highest QC seen
func (*Timeout) GetHqcRound ¶
type TimeoutCert ¶
type TimeoutCert struct { Timeout *Timeout `json:"timeout,omitempty"` // Round and epoch of the timeout event Signatures map[string]*TimeoutVote `json:"signatures,omitempty"` // 2f+1 signatures from nodes confirming TC // contains filtered or unexported fields }
func (*TimeoutCert) Add ¶
func (x *TimeoutCert) Add(author string, timeout *Timeout, signature []byte) error
func (*TimeoutCert) GetAuthors ¶
func (x *TimeoutCert) GetAuthors() []string
func (*TimeoutCert) GetHqcRound ¶
func (x *TimeoutCert) GetHqcRound() uint64
func (*TimeoutCert) GetRound ¶
func (x *TimeoutCert) GetRound() uint64
func (*TimeoutCert) IsValid ¶
func (x *TimeoutCert) IsValid() error
func (*TimeoutCert) Verify ¶
func (x *TimeoutCert) Verify(tb types.RootTrustBase) error
type TimeoutVote ¶
Click to show internal directories.
Click to hide internal directories.