blockproposal

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 (
	ErrBlockProposalIsNil = errors.New("block proposal is nil")
	ErrTrustBaseIsNil     = errors.New("trust base is nil")
	ErrSignerIsNil        = errors.New("signer is nil")
	ErrNodeVerifierIsNil  = errors.New("node signature verifier is nil")
	ErrInvalidPartitionID = errors.New("invalid partition identifier")
)

Functions

This section is empty.

Types

type BlockProposal

type BlockProposal struct {
	PartitionID        types.PartitionID
	ShardID            types.ShardID
	NodeID             peer.ID
	UnicityCertificate *types.UnicityCertificate
	Technical          certification.TechnicalRecord
	Transactions       []*types.TransactionRecord
	Signature          []byte
	// contains filtered or unexported fields
}

func (*BlockProposal) Hash

func (x *BlockProposal) Hash(algorithm gocrypto.Hash) ([]byte, error)

func (*BlockProposal) IsValid

func (x *BlockProposal) IsValid(nodeSignatureVerifier crypto.Verifier, tb types.RootTrustBase, algorithm gocrypto.Hash, partitionID types.PartitionID, shardConfHash []byte) error

func (*BlockProposal) Sign

func (x *BlockProposal) Sign(algorithm gocrypto.Hash, signer crypto.Signer) error

func (*BlockProposal) Verify

func (x *BlockProposal) Verify(algorithm gocrypto.Hash, nodeSignatureVerifier crypto.Verifier) error

Jump to

Keyboard shortcuts

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