HotStuffCanonicalEncoding

org.sigilaris.node.jvm.runtime.consensus.hotstuff.HotStuffCanonicalEncoding

Canonical encoding and hashing operations for HotStuff consensus artifacts.

Attributes

Source
Artifacts.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def hashEncoded[A : ByteEncoder](value: A): UInt256

Hashes the byte-encoded form of a value using Keccak-256.

Hashes the byte-encoded form of a value using Keccak-256.

Type parameters

A

the value type, which must be byte-encodable

Value parameters

value

the value to hash

Attributes

Returns

the 256-bit hash

Source
Artifacts.scala
def proposalId(window: HotStuffWindow, proposer: ValidatorId, targetBlockId: BlockId, block: BlockHeader, txSet: ProposalTxSet, justify: QuorumCertificate, signature: Signature): UInt256

Computes a deterministic proposal ID from all proposal fields.

Computes a deterministic proposal ID from all proposal fields.

Attributes

Source
Artifacts.scala
def proposalSignBytes(unsigned: UnsignedProposal): ByteVector

Computes the canonical bytes to be signed for a proposal.

Computes the canonical bytes to be signed for a proposal.

Attributes

Source
Artifacts.scala
def sign(signBytes: ByteVector, keyPair: KeyPair): Either[HotStuffValidationFailure, Signature]

Signs the given bytes using the key pair and returns the signature.

Signs the given bytes using the key pair and returns the signature.

Attributes

Source
Artifacts.scala
def validatorSetHash(validatorSet: ValidatorSet): UInt256

Computes the canonical hash of a validator set.

Computes the canonical hash of a validator set.

Attributes

Source
Artifacts.scala
def voteId(window: HotStuffWindow, voter: ValidatorId, targetProposalId: ProposalId, signature: Signature): UInt256

Computes a deterministic vote ID from all vote fields.

Computes a deterministic vote ID from all vote fields.

Attributes

Source
Artifacts.scala
def voteSignBytes(unsigned: UnsignedVote): ByteVector

Computes the canonical bytes to be signed for a vote.

Computes the canonical bytes to be signed for a vote.

Attributes

Source
Artifacts.scala