Block information. Definition: data/bookkeeping/block.go : Block

Hierarchy

Constructors

Properties

attribute_map: Record<string, string>
genesisHash: Uint8Array

(gh) hash to which this block belongs.

genesisId: string

(gen) ID to which this block belongs.

participationUpdates?: ParticipationUpdates

Participation account data that needs to be checked/acted on by the network.

previousBlockHash: Uint8Array

(prev) Previous block hash.

rewards?: BlockRewards

Fields relating to rewards,

round: number | bigint

(rnd) Current round on which this block was appended to the chain.

seed: Uint8Array

(seed) Sortition seed.

stateProofTracking?: StateProofTracking[]

Tracks the status of state proofs.

timestamp: number | bigint

(ts) Block creation timestamp in seconds since eposh

transactions?: indexerModels.Transaction[]

(txns) list of transactions corresponding to a given round.

transactionsRoot: Uint8Array

(txn) TransactionsRoot authenticates the set of transactions appearing in the block. More specifically, it's the root of a merkle tree whose leaves are the block's Txids, in lexicographic order. For the empty block, it's 0. Note that the TxnRoot does not authenticate the signatures on the transactions, only the transactions themselves. Two blocks with the same transactions but in a different order and with different signatures will have the same TxnRoot.

transactionsRootSha256: Uint8Array

(txn256) TransactionsRootSHA256 is an auxiliary TransactionRoot, built using a vector commitment instead of a merkle tree, and SHA256 hash function instead of the default SHA512_256. This commitment can be used on environments where only the SHA256 function exists.

txnCounter?: number | bigint

(tc) TxnCounter counts the number of transactions committed in the ledger, from the time at which support for this feature was introduced. Specifically, TxnCounter is the number of the next transaction that will be committed after this block. It is 0 when no transactions have ever been committed (since TxnCounter started being supported).

upgradeState?: BlockUpgradeState

Fields relating to a protocol upgrade.

upgradeVote?: BlockUpgradeVote

Fields relating to voting for a protocol upgrade.

Methods

  • Get an object ready for encoding to either JSON or msgpack.

    Parameters

    • binary: boolean = false

      Use true to indicate that the encoding can handle raw binary objects (Uint8Arrays). Use false to indicate that raw binary objects should be converted to base64 strings. True should be used for objects that will be encoded with msgpack, and false should be used for objects that will be encoded with JSON.

    Returns Record<string, any>

Generated using TypeDoc