All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sigmastate.eval.CHeader.scala Maven / Gradle / Ivy

The newest version!
package sigmastate.eval

import sigma.data.SigmaConstants
import sigma.{AvlTree, BigInt, Coll, GroupElement, Header}

/** A default implementation of [[Header]] interface.
  *
  * @see [[Header]] for detailed descriptions
  */
case class CHeader(
    id: Coll[Byte],
    version: Byte,
    parentId: Coll[Byte],
    ADProofsRoot: Coll[Byte],
    stateRoot: AvlTree,
    transactionsRoot: Coll[Byte],
    timestamp: Long,
    nBits: Long,
    height: Int,
    extensionRoot: Coll[Byte],
    minerPk: GroupElement,
    powOnetimePk: GroupElement,
    powNonce: Coll[Byte],
    powDistance: BigInt,
    votes: Coll[Byte]
) extends Header

object CHeader {
  /** Size of of Header.votes array. */
  val VotesSize: Int = SigmaConstants.VotesArraySize.value

  /** Size of nonce array from Autolykos POW solution in Header.powNonce array. */
  val NonceSize: Int = SigmaConstants.AutolykosPowSolutionNonceArraySize.value
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy