waves_logo Docs
  • Why Waves
    Why Waves
  • Waves Basics
    Waves Basics
  • Account
    • Creating Account
      Creating Account
    • Address
      Address
    • Account Balance
      Account Balance
    • Account Data Storage
      Account Data Storage
    • Alias
      Alias
    • dApp and Smart Account
      dApp and Smart Account
    Account
  • Token (Asset)
    • Non-Fungible Token
      Non-Fungible Token
    • Smart Asset
      Smart Asset
    • Token ID
      Token ID
    • WAVES
      WAVES
    Token (Asset)
  • Transaction
    • Transaction Fee
      • Sponsored Fee
        Sponsored Fee
      Transaction Fee
    • Signature and Proofs
      Signature and Proofs
    • Transaction Types
      • Burn Transaction
        Burn Transaction
      • Create Alias Transaction
        Create Alias Transaction
      • Data Transaction
        Data Transaction
      • Exchange Transaction
        • Order
          Order
        Exchange Transaction
      • Genesis Transaction
        Genesis Transaction
      • Invoke Script Transaction
        Invoke Script Transaction
      • Issue Transaction
        Issue Transaction
      • Lease Cancel Transaction
        Lease Cancel Transaction
      • Lease Transaction
        Lease Transaction
      • Mass Transfer Transaction
        Mass Transfer Transaction
      • Reissue Transaction
        Reissue Transaction
      • Set Asset Script Transaction
        Set Asset Script Transaction
      • Set Script Transaction
        Set Script Transaction
      • Sponsor Fee Transaction
        Sponsor Fee Transaction
      • Transfer Transaction
        Transfer Transaction
      • Update Asset Info Transaction
        Update Asset Info Transaction
      • Ethereum-like Transaction
        Ethereum-like Transaction
      Transaction Types
    • Transaction Validation
      Transaction Validation
    Transaction
  • Block
    • Transactions Root Hash
      Transactions Root Hash
    • Genesis Block
      Genesis Block
    Block
  • Node
    • Leasing
      Leasing
    • Generator’s Income
      Generator’s Income
    • Monetary Policy
      Monetary Policy
    Node
  • Mainnet, Testnet, Stagenet
    Mainnet, Testnet, Stagenet
  • Unit Zero
    Unit Zero
  • Oracle
    Oracle
  • Protocols & Data formats
    • Cryptographic Practical Details
      Cryptographic Practical Details
    • Leased Proof of Stake
      Leased Proof of Stake
    • Waves-NG Solution
      Waves-NG Solution
    • Waves-NG Protocol
      Waves-NG Protocol
    • Waves 1.5
      Waves 1.5
    • Blockchain Data Types
      Blockchain Data Types
    • Binary Format
      • Address Binary Format
        Address Binary Format
      • Alias Binary Format
        Alias Binary Format
      • Block Binary Format
        Block Binary Format
      • Network Message Binary Format
        • Block Message Binary Format
          Block Message Binary Format
        • Checkpoint Message Binary Format
          Checkpoint Message Binary Format
        • Get Block Message Binary Format
          Get Block Message Binary Format
        • Get Peers Message Binary Format
          Get Peers Message Binary Format
        • Get Signatures Message Binary Format
          Get Signatures Message Binary Format
        • Handshake Message Binary Format
          Handshake Message Binary Format
        • Peers Message Binary Format
          Peers Message Binary Format
        • Score Message Binary Format
          Score Message Binary Format
        • Signatures Message Binary Format
          Signatures Message Binary Format
        • Transaction Message Message Binary Format
          Transaction Message Message Binary Format
        Network Message Binary Format
      • Order Binary Format
        Order Binary Format
      • Transaction Binary Format
        • Burn Transaction Binary Format
          Burn Transaction Binary Format
        • Create Alias Transaction Binary Format
          Create Alias Transaction Binary Format
        • Data Transaction Binary Format
          Data Transaction Binary Format
        • Exchange Transaction Binary Format
          Exchange Transaction Binary Format
        • Genesis Transaction Binary Format
          Genesis Transaction Binary Format
        • Invoke Script Transaction Binary Format
          Invoke Script Transaction Binary Format
        • Issue Transaction Binary Format
          Issue Transaction Binary Format
        • Lease Cancel Transaction Binary Format
          Lease Cancel Transaction Binary Format
        • Lease Transaction Binary Format
          Lease Transaction Binary Format
        • Mass Transfer Transaction Binary Format
          Mass Transfer Transaction Binary Format
        • Reissue Transaction Binary Format
          Reissue Transaction Binary Format
        • Set Asset Script Transaction Binary Format
          Set Asset Script Transaction Binary Format
        • Set Script Transaction Binary Format
          Set Script Transaction Binary Format
        • Sponsor Fee Transaction Binary Format
          Sponsor Fee Transaction Binary Format
        • Transfer Transaction Binary Format
          Transfer Transaction Binary Format
        • Update Asset Info Transaction Binary Format
          Update Asset Info Transaction Binary Format
        • Ethereum-like Transaction Binary Format
          Ethereum-like Transaction Binary Format
        Transaction Binary Format
      • Transaction Proof Binary Format
        Transaction Proof Binary Format
      Binary Format
    • Validation Rules
      Validation Rules
    Protocols & Data formats
  • Glossary
    Glossary
      • English
      • Русский
      On this page
        • Block Generation
        • Limitations
        • JSON Representation
        • Obtain Block Data
        • Binary Format
      waves_logo Docs

          # Block

          Block is a unit of a blockchain. The block contains transactions and the header that includes fields related to the block as a whole.

          The block header contains transactions root hash, which is a proof that the block includes all its transactions in the proper order. The block header also contains the hash of header of the previous block in the chain. Thus, all blocks in the chain are linked by cryptographic hashes. This guarantees the integrity of blockchain data: changing the data in any block in the history would invalidate all subsequent blocks, so the nodes in the blockchain network will reject the change.

          # Block Generation

          Any Waves node with a balance of 1000 WAVES or more, either owned or leased, can become a block generator. The next block generator is selected by the Leased Proof of Stake (LPoS) consensus algorithm.

          New blocks appear on the Waves blockchain on average once a minute. However, the transaction hit the blockchain on average after 2 seconds thanks to the unique Waves-NG mechanism. The current block generator continues adding transactions to the block from the UTX pool — that is a pool of waiting transactions — until the next block appears (or a limitation on block size or complexity is reached).

          # Limitations

          The maximum block size is 1 MB.

          The maximum total complexity of scripts in transactions of the block is 2,500,000. The complexity of all executed scripts is taken into account: dApp scripts, account scripts, and asset scripts. (Before activation of feature #16 “Ride V5, dApp-to-dApp invocations”, the maximum total complexity of scripts was 1,000,000.)

          # JSON Representation

          Node REST API provides block data in JSON.

          Here is an example of JSON representation:

          {
            "version": 5,
            "timestamp": 1684931016547,
            "reference": "7sG6CU6ZS38V9VEDW5bgrCVcPeF9zFpoC6PNV7guRfp1",
            "nxt-consensus": {
              "base-target": 167,
              "generation-signature": "qm7dYre31XLfQtnKiF5PL2MYmyYvn3ZrqcdH94TkUkfBdVgTW5BxMAiwfHmywXX9yMhZE7H67snGiXq4LQaezPt5JV291Z9MTvPbNEDjtyHBxG216Xv69PcEug2Wpao7KyT"
            },
            "transactionsRoot": "6dxKpvH6mSXAXuyd2we3BhDoqDWRn7jpyP8kt1JcwncT",
            "id": "27b4mbGgxYe8bcqPQy1ddwcg2DoYKaeX356QpZjkrhAM",
            "features": [],
            "desiredReward": -1,
            "generator": "3PA1KvFfq9VuJjg45p2ytGgaNjrgnLSgf4r",
            "generatorPublicKey": "EFgn12TgFqn3cRthHnLAPr11g7urqchXEpjGspgLYskc",
            "stateHash": "Diz914FQYj6QUUhUoWByUyLrQKE8BaKCmtoiNZBzvbUu",
            "signature": "22m2xEzPgh1E29nKJJwJ6h7hoRxoLEQnE4Eh4Mcfyx4sTn3DEeBHMZ4Rda7jhGeTBUgcnNdtUmm3dzzMXb8aVsMg",
            "blocksize": 15265,
            "transactionCount": 25,
            "height": 3657525,
            "totalFee": 8900000,
            "reward": 600000000,
            "rewardShares": {
              "3PA1KvFfq9VuJjg45p2ytGgaNjrgnLSgf4r": 600000000
            },
            "VRF": "9YyxDdJdzGJ3aSPSZ2BP3HXU3JAj2wR2B9znGT7g5rre",
            "fee": 8900000,
            "transactions": [
                ...
             ]
            ]
          }
          
          Field Description
          version Block version: 5 for all the blocks since activation of feature #15 “Ride V4, VRF, Protobuf, Failed transactions”
          timestamp Block timestamp: Unix time in milliseconds.
          When receiving a new block from a peer, each node verifies that the block timestamp does not outpace the current time by more than 100 milliseconds
          reference ID of the previous block
          nxt-consensus.base-target Parameter that adjusts the average block generation time to 60 seconds. See details in the Leased Proof-of-Stake article
          nxt-consensus.generation-signature Parameter used in calculating the time delay the generator must have waited after the previous block before being eligible to release the next one. See details in the Leased Proof-of-Stake article
          transactionsRoot Root hash of the Merkle tree of transactions of the block. The root hash is the proof that the block includes all its transactions in the proper order, so it is enough to sign only the block header. See details in the Transactions Root Hash article
          id Block ID: BLAKE2b-256 hash of the block header
          features List of node features supported by the block generator. See details in the Activation Protocol article
          desiredReward Desired block reward size specified by the block generator, in WAVELETs. If the value is greater than the current reward size, then the block generator votes for the reward size increase; if the value is smaller — for the decrease. Default value of -1 is equivalent to a vote to keep the current reward size. See details in the Community-Driven Monetary Policy article
          generator Address of the block generator: base58 encoded byte array
          generatorPublicKey Public key of the block generator: base58 encoded byte array
          signature Digital signature of the block header bytes with the block generator private key
          blocksize Block size in bytes
          transactionCount Number of transactions in the block
          height Sequence number of the block
          totalFee The total fees for transactions in the block, including the sponsored fees in terms of WAVELETs
          reward Block reward in WAVELETs
          rewardShares Block reward beneficiary addresses and the amounts in WAVELET they receive
          VRF Parameter used in calculating the time delay the generator must have waited after the previous block before being eligible to release the next one. See details in the Leased Proof-of-Stake article
          fee The total fees for transactions in the block, excluding the sponsored fees
          transactions Transactions added to the block. See the Transaction article for the fields description
          stateHash Hash of the blockchain state changes resulting from the block's transactions. See details in the Waves 1.5: Light Node article.
          The field is enabled by feature #22 “Light Node”
          challenged_header Header fields of the block being challenged, in case the current block challenges another one. See details in the Waves 1.5: Light Node article.
          The field is enabled by feature #22 “Light Node”

          # Obtain Block Data

          You can get the block header or the entire block by its ID or height:

          • In Waves Explorer .
          • Using Node REST API endpoints .

          # Binary Format

          See the Block binary format article.

          Transaction Validation
          Transactions Root Hash
          Transaction Validation
          Transactions Root Hash