abdrc

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: Apache-2.0 Imports: 12 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     *rctypes.BlockData
	ShardInfo []ShardInfo
	Qc        *rctypes.QuorumCert // block's quorum certificate (from next view)
	CommitQc  *rctypes.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 IrChangeReqMsg

type IrChangeReqMsg struct {
	Author      string             `json:"author"`
	IrChangeReq *abdrc.IRChangeReq `json:"irChangeReq"`
	Signature   hex.Bytes          `json:"signature"`
	// 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(tb types.RootTrustBase) error

type ProposalMsg

type ProposalMsg struct {
	Block       *abdrc.BlockData   `json:"block"`       // Proposed change
	LastRoundTc *abdrc.TimeoutCert `json:"lastRoundTc"` // Last timeout certificate for block.round - 1 if block.qc.round != block.round - 1
	Signature   hex.Bytes          `json:"signature"`
	// 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(tb types.RootTrustBase) error

type ShardInfo

type ShardInfo struct {
	Partition types.PartitionID
	Shard     types.ShardID
	T2Timeout time.Duration
	RootHash  []byte // last certified root hash

	// statistical record of the previous epoch. As we only need
	// it for hashing we keep it in serialized representation
	PrevEpochStat []byte

	// statistical record of the current epoch
	Stat certification.StatisticalRecord

	// per validator total, invariant fees of the previous epoch
	// but as with statistical record of the previous epoch we need it
	// for hashing so we keep it in serialized representation
	PrevEpochFees []byte

	Fees map[string]uint64 // per validator summary fees of the current epoch

	// last CertificationResponse
	UC *types.UnicityCertificate
	TR *certification.TechnicalRecord

	// input data of the block
	IR            *types.InputRecord
	IRTR          certification.TechnicalRecord
	ShardConfHash []byte
	// contains filtered or unexported fields
}

func (*ShardInfo) IsValid

func (si *ShardInfo) IsValid() error

type StateMsg

type StateMsg struct {
	CommittedHead *CommittedBlock
	Pending       []*rctypes.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, tb types.RootTrustBase) error

type StateRequestMsg

type StateRequestMsg 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 TimeoutMsg

type TimeoutMsg struct {
	Timeout   *abdrc.Timeout     `json:"timeout"`
	Author    string             `json:"author"`
	Signature hex.Bytes          `json:"signature"`
	LastTC    *abdrc.TimeoutCert `json:"lastTc,omitempty"` // TC for Timeout.Round−1 if Timeout.HighQC.Round != Timeout.Round−1 (nil otherwise)
	// contains filtered or unexported fields
}

func NewTimeoutMsg

func NewTimeoutMsg(timeout *abdrc.Timeout, author string, lastTC *abdrc.TimeoutCert) *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(tb types.RootTrustBase) error

type VoteMsg

type VoteMsg struct {
	VoteInfo         *drctypes.RoundInfo  `json:"voteInfo"`         // Proposed block hash and resulting state hash
	LedgerCommitInfo *types.UnicitySeal   `json:"ledgerCommitInfo"` // Commit info
	HighQc           *drctypes.QuorumCert `json:"highQc"`           // Sync with highest QC
	Author           string               `json:"author"`           // Voter node identifier
	Signature        hex.Bytes            `json:"signature"`        // 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(tb types.RootTrustBase) error

Jump to

Keyboard shortcuts

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