abdrc

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommittedBlock

type CommittedBlock struct {
	Block    *drctypes.BlockData
	Ir       []*InputData
	Qc       *drctypes.QuorumCert // block's quorum certificate (from next view)
	CommitQc *drctypes.QuorumCert // commit certificate
	// contains filtered or unexported fields
}

func (*CommittedBlock) GetRound

func (r *CommittedBlock) GetRound() uint64

func (*CommittedBlock) IsValid

func (r *CommittedBlock) IsValid() error

type GetStateMsg

type GetStateMsg struct {

	// ID of the node which requested the state, ie response should
	// be sent to that node
	NodeId string
	// contains filtered or unexported fields
}

type InputData

type InputData struct {
	SysID types.SystemID
	Ir    *types.InputRecord
	Sdrh  []byte
	// contains filtered or unexported fields
}

func (*InputData) IsValid

func (i *InputData) IsValid() error

type IrChangeReqMsg

type IrChangeReqMsg struct {
	Author      string             `json:"author,omitempty"`
	IrChangeReq *abdrc.IRChangeReq `json:"ir_change_req,omitempty"`
	Signature   []byte             `json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*IrChangeReqMsg) IsValid

func (x *IrChangeReqMsg) IsValid() error

func (*IrChangeReqMsg) Sign

func (x *IrChangeReqMsg) Sign(signer crypto.Signer) error

func (*IrChangeReqMsg) Verify

func (x *IrChangeReqMsg) Verify(rootTrust map[string]crypto.Verifier) error

type ProposalMsg

type ProposalMsg struct {
	Block       *types.BlockData   `json:"block,omitempty"`         // Proposed change
	LastRoundTc *types.TimeoutCert `json:"last_round_tc,omitempty"` // Last timeout certificate for block.round - 1 if block.qc.round != block.round - 1
	Signature   []byte             `json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*ProposalMsg) IsValid

func (x *ProposalMsg) IsValid() error

func (*ProposalMsg) Sign

func (x *ProposalMsg) Sign(signer crypto.Signer) error

func (*ProposalMsg) Verify

func (x *ProposalMsg) Verify(quorum uint32, rootTrust map[string]crypto.Verifier) error

type StateMsg

type StateMsg struct {
	Certificates  []*types.UnicityCertificate
	CommittedHead *CommittedBlock
	BlockData     []*drctypes.BlockData
	// contains filtered or unexported fields
}

func (*StateMsg) CanRecoverToRound

func (sm *StateMsg) CanRecoverToRound(round uint64) error

CanRecoverToRound returns non-nil error when the state message is not suitable for recovery into round "round".

func (*StateMsg) Verify

func (sm *StateMsg) Verify(hashAlgorithm crypto.Hash, quorum uint32, verifiers map[string]abcrypto.Verifier) error

type TimeoutMsg

type TimeoutMsg struct {
	Timeout   *abdrc.Timeout `json:"timeout,omitempty"`
	Author    string         `json:"author,omitempty"`
	Signature []byte         `json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func NewTimeoutMsg

func NewTimeoutMsg(timeout *abdrc.Timeout, author string) *TimeoutMsg

NewTimeoutMsg constructs a new atomic broadcast timeout message

func (*TimeoutMsg) Bytes

func (x *TimeoutMsg) Bytes() []byte

func (*TimeoutMsg) GetRound

func (x *TimeoutMsg) GetRound() uint64

func (*TimeoutMsg) IsValid

func (x *TimeoutMsg) IsValid() error

func (*TimeoutMsg) Sign

func (x *TimeoutMsg) Sign(s crypto.Signer) error

func (*TimeoutMsg) Verify

func (x *TimeoutMsg) Verify(quorum uint32, rootTrust map[string]crypto.Verifier) error

type VoteMsg

type VoteMsg struct {
	VoteInfo         *drctypes.RoundInfo  `json:"vote_info,omitempty"`          // Proposed block hash and resulting state hash
	LedgerCommitInfo *types.UnicitySeal   `json:"ledger_commit_info,omitempty"` // Commit info
	HighQc           *drctypes.QuorumCert `json:"high_qc,omitempty"`            // Sync with highest QC
	Author           string               `json:"author,omitempty"`             // Voter node identifier
	Signature        []byte               `json:"signature,omitempty"`          // Vote signature on hash of consensus info
	// contains filtered or unexported fields
}

func (*VoteMsg) Sign

func (x *VoteMsg) Sign(signer crypto.Signer) error

func (*VoteMsg) Verify

func (x *VoteMsg) Verify(quorum uint32, rootTrust map[string]crypto.Verifier) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL