certification

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBlockCertificationRequestIsNil = errors.New("block certification request is nil")
)

Functions

This section is empty.

Types

type BlockCertificationRequest

type BlockCertificationRequest struct {
	PartitionID types.PartitionID  `json:"partitionId"`
	ShardID     types.ShardID      `json:"shardId"`
	NodeID      string             `json:"nodeId"`
	InputRecord *types.InputRecord `json:"inputRecord"`
	BlockSize   uint64             `json:"blockSize"`
	StateSize   uint64             `json:"stateSize"`
	Signature   hex.Bytes          `json:"signature"`
	// contains filtered or unexported fields
}

func (BlockCertificationRequest) Bytes

func (x BlockCertificationRequest) Bytes() ([]byte, error)

func (*BlockCertificationRequest) IRPreviousHash

func (x *BlockCertificationRequest) IRPreviousHash() []byte

func (*BlockCertificationRequest) IRRound

func (x *BlockCertificationRequest) IRRound() uint64

func (*BlockCertificationRequest) IsValid

func (*BlockCertificationRequest) Sign

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

type CertificationResponse

type CertificationResponse struct {
	Partition types.PartitionID
	Shard     types.ShardID
	Technical TechnicalRecord
	UC        types.UnicityCertificate
	// contains filtered or unexported fields
}

Certification response is sent by the root partition to validators of a shard of a partition as a response to a certification request message.

func (*CertificationResponse) IsValid

func (cr *CertificationResponse) IsValid() error

func (*CertificationResponse) SetTechnicalRecord

func (cr *CertificationResponse) SetTechnicalRecord(tr TechnicalRecord) error

type StatisticalRecord

type StatisticalRecord struct {
	Blocks       uint64 // number of non-empty blocks in the epoch
	BlockFees    uint64 // total block fees of the epoch
	BlockSize    uint64 // the sum of all block sizes of the epoch
	StateSize    uint64 // the sum of all state sizes of the epoch
	MaxFee       uint64 // maximum block fee of the epoch
	MaxBlockSize uint64 // maximum block size of the epoch
	MaxStateSize uint64 // maximum state size of the epoch
	// contains filtered or unexported fields
}

There is one Statistical Record of current epoch, and one Statistical Record of previous epoch of every shard of every public partition.

type TechnicalRecord

type TechnicalRecord struct {
	Round    uint64
	Epoch    uint64
	Leader   string    // identifier of the round leader
	StatHash hex.Bytes // hash of statistical records
	FeeHash  hex.Bytes // hash of validator fee records
	// contains filtered or unexported fields
}

There is one Technical Record for every shard of every partition, providing synchronization for the next block production attempt.

func (*TechnicalRecord) Hash

func (tr *TechnicalRecord) Hash() ([]byte, error)

func (*TechnicalRecord) HashMatches

func (tr *TechnicalRecord) HashMatches(trh []byte) error

func (*TechnicalRecord) IsValid

func (tr *TechnicalRecord) IsValid() error

Jump to

Keyboard shortcuts

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