github.com/algorand/go-algorand-sdk@v1.24.0/client/v2/common/models/block.go (about)

     1  package models
     2  
     3  // Block block information.
     4  // Definition:
     5  // data/bookkeeping/block.go : Block
     6  type Block struct {
     7  	// GenesisHash (gh) hash to which this block belongs.
     8  	GenesisHash []byte `json:"genesis-hash"`
     9  
    10  	// GenesisId (gen) ID to which this block belongs.
    11  	GenesisId string `json:"genesis-id"`
    12  
    13  	// ParticipationUpdates participation account data that needs to be checked/acted
    14  	// on by the network.
    15  	ParticipationUpdates ParticipationUpdates `json:"participation-updates,omitempty"`
    16  
    17  	// PreviousBlockHash (prev) Previous block hash.
    18  	PreviousBlockHash []byte `json:"previous-block-hash"`
    19  
    20  	// Rewards fields relating to rewards,
    21  	Rewards BlockRewards `json:"rewards,omitempty"`
    22  
    23  	// Round (rnd) Current round on which this block was appended to the chain.
    24  	Round uint64 `json:"round"`
    25  
    26  	// Seed (seed) Sortition seed.
    27  	Seed []byte `json:"seed"`
    28  
    29  	// StateProofTracking tracks the status of state proofs.
    30  	StateProofTracking []StateProofTracking `json:"state-proof-tracking,omitempty"`
    31  
    32  	// Timestamp (ts) Block creation timestamp in seconds since eposh
    33  	Timestamp uint64 `json:"timestamp"`
    34  
    35  	// Transactions (txns) list of transactions corresponding to a given round.
    36  	Transactions []Transaction `json:"transactions,omitempty"`
    37  
    38  	// TransactionsRoot (txn) TransactionsRoot authenticates the set of transactions
    39  	// appearing in the block. More specifically, it's the root of a merkle tree whose
    40  	// leaves are the block's Txids, in lexicographic order. For the empty block, it's
    41  	// 0. Note that the TxnRoot does not authenticate the signatures on the
    42  	// transactions, only the transactions themselves. Two blocks with the same
    43  	// transactions but in a different order and with different signatures will have
    44  	// the same TxnRoot.
    45  	TransactionsRoot []byte `json:"transactions-root"`
    46  
    47  	// TransactionsRootSha256 (txn256) TransactionsRootSHA256 is an auxiliary
    48  	// TransactionRoot, built using a vector commitment instead of a merkle tree, and
    49  	// SHA256 hash function instead of the default SHA512_256. This commitment can be
    50  	// used on environments where only the SHA256 function exists.
    51  	TransactionsRootSha256 []byte `json:"transactions-root-sha256"`
    52  
    53  	// TxnCounter (tc) TxnCounter counts the number of transactions committed in the
    54  	// ledger, from the time at which support for this feature was introduced.
    55  	// Specifically, TxnCounter is the number of the next transaction that will be
    56  	// committed after this block. It is 0 when no transactions have ever been
    57  	// committed (since TxnCounter started being supported).
    58  	TxnCounter uint64 `json:"txn-counter,omitempty"`
    59  
    60  	// UpgradeState fields relating to a protocol upgrade.
    61  	UpgradeState BlockUpgradeState `json:"upgrade-state,omitempty"`
    62  
    63  	// UpgradeVote fields relating to voting for a protocol upgrade.
    64  	UpgradeVote BlockUpgradeVote `json:"upgrade-vote,omitempty"`
    65  }