BlockHeader

org.plasmalabs.consensus.models.BlockHeader
See theBlockHeader companion object
final case class BlockHeader(headerId: Option[BlockId], parentHeaderId: BlockId, parentSlot: Long, txRoot: ByteString, bloomFilter: ByteString, timestamp: Long, height: Long, slot: Long, eligibilityCertificate: EligibilityCertificate, operationalCertificate: OperationalCertificate, metadata: ByteString, address: StakingAddress, version: ProtocolVersion, unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[BlockHeader]

Captures a block producer's consensus-commitment to a new block

Value parameters

address

The operator's staking address

bloomFilter

A fuzzy search for addresses associated with this block length = 256

eligibilityCertificate

A certificate indicating that the block producer was eligible to make this block

headerId

The ID of this block header. This value is optional and its contents are not included in the signable or identifiable data. Clients which can verify this value should verify this value, but some clients may not be able to or need to, in which case this field acts as a convenience.

height

The 1-based index of this block in the blockchain

metadata

Optional metadata stamped by the operator. Must be latin-1 encoded, and must be at most 32 bytes in length. optional

operationalCertificate

A certificate indicating the operator's commitment to this block

parentHeaderId

The parent block's ID. Each header builds from a single parent.

parentSlot

The slot of the parent block

slot

The time-slot in which the block producer created the block

timestamp

The UTC UNIX timestamp (ms) when the block was created

txRoot

The commitment/accumulator of the block body length = 32

version

Protocol Version

Attributes

Companion
object
Graph
Supertypes
trait Updatable[BlockHeader]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def getField(`__field`: FieldDescriptor): PValue
def getFieldByNumber(`__fieldNumber`: Int): Any
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

def withBloomFilter(`__v`: ByteString): BlockHeader
def withHeight(`__v`: Long): BlockHeader
def withMetadata(`__v`: ByteString): BlockHeader
def withParentSlot(`__v`: Long): BlockHeader
def withSlot(`__v`: Long): BlockHeader
def withTimestamp(`__v`: Long): BlockHeader
def withTxRoot(`__v`: ByteString): BlockHeader
def withUnknownFields(`__v`: UnknownFieldSet): BlockHeader
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
def update(ms: (Lens[BlockHeader, BlockHeader]) => () => BlockHeader*): BlockHeader

Attributes

Inherited from:
Updatable
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage