Skip to main content

Overview

Block messages contain information about newly produced blocks on the Solana blockchain. Yellowstone provides both full block updates (with transactions and accounts) and lightweight block metadata updates.

SubscribeUpdateBlock

Full block update containing block metadata, transactions, accounts, and entries.
message SubscribeUpdateBlock {
  uint64 slot = 1;
  string blockhash = 2;
  solana.storage.ConfirmedBlock.Rewards rewards = 3;
  solana.storage.ConfirmedBlock.UnixTimestamp block_time = 4;
  solana.storage.ConfirmedBlock.BlockHeight block_height = 5;
  uint64 parent_slot = 7;
  string parent_blockhash = 8;
  uint64 executed_transaction_count = 9;
  repeated SubscribeUpdateTransactionInfo transactions = 6;
  uint64 updated_account_count = 10;
  repeated SubscribeUpdateAccountInfo accounts = 11;
  uint64 entries_count = 12;
  repeated SubscribeUpdateEntry entries = 13;
}

Fields

slot
uint64
required
The slot number of this block.
blockhash
string
required
The blockhash for this block, in base58 format.
rewards
Rewards
Block rewards information.
block_time
UnixTimestamp
Unix timestamp when the block was produced.
block_height
BlockHeight
The block height (number of blocks since genesis).
parent_slot
uint64
required
The slot number of the parent block.
parent_blockhash
string
required
The blockhash of the parent block, in base58 format.
executed_transaction_count
uint64
required
Total number of transactions executed in this block.
transactions
repeated SubscribeUpdateTransactionInfo
Array of transactions included in this block. Only populated if include_transactions is true in your block filter. See Transaction Messages for structure details.
updated_account_count
uint64
required
Total number of accounts updated in this block.
accounts
repeated SubscribeUpdateAccountInfo
Array of accounts updated in this block. Only populated if include_accounts is true in your block filter. See Account Messages for structure details.
entries_count
uint64
required
Total number of entries in this block.
entries
repeated SubscribeUpdateEntry
Array of Proof of History entries in this block. Only populated if include_entries is true in your block filter. See SubscribeUpdateEntry below for structure details.

Example: Basic Block Update

{
  "slot": 250000000,
  "blockhash": "3Uxv5kZX8xJLtFUV4wQPjZBFJKMKBdJqKDJpqQnqJe3X",
  "rewards": {
    "rewards": []
  },
  "block_time": {
    "timestamp": 1709901234
  },
  "block_height": {
    "block_height": 235000000
  },
  "parent_slot": 249999999,
  "parent_blockhash": "7hGzZJfFxqFqB9ZNdJN8f1NJHvZ8xJLtFUV4wQPjZBFJ",
  "executed_transaction_count": 150,
  "updated_account_count": 300,
  "entries_count": 64
}

Example: Block with Transactions

{
  "slot": 250000000,
  "blockhash": "3Uxv5kZX8xJLtFUV4wQPjZBFJKMKBdJqKDJpqQnqJe3X",
  "block_time": { "timestamp": 1709901234 },
  "block_height": { "block_height": 235000000 },
  "parent_slot": 249999999,
  "parent_blockhash": "7hGzZJfFxqFqB9ZNdJN8f1NJHvZ8xJLtFUV4wQPjZBFJ",
  "executed_transaction_count": 2,
  "transactions": [
    {
      "signature": "5j7s6NiJS3JAkvgkoc18WVAsiSaci2pxB2A6ueCJP4tprA2TFg9wSyTLeYouxPBJEMzJinENTkpA52YStRW5Dia7",
      "is_vote": false,
      "transaction": { },
      "meta": { },
      "index": 0
    }
  ],
  "updated_account_count": 5,
  "entries_count": 64
}

SubscribeUpdateBlockMeta

Lightweight block metadata update without full transaction or account data. Useful for reducing bandwidth when you only need block-level information.
message SubscribeUpdateBlockMeta {
  uint64 slot = 1;
  string blockhash = 2;
  solana.storage.ConfirmedBlock.Rewards rewards = 3;
  solana.storage.ConfirmedBlock.UnixTimestamp block_time = 4;
  solana.storage.ConfirmedBlock.BlockHeight block_height = 5;
  uint64 parent_slot = 6;
  string parent_blockhash = 7;
  uint64 executed_transaction_count = 8;
  uint64 entries_count = 9;
}

Fields

slot
uint64
required
The slot number of this block.
blockhash
string
required
The blockhash for this block, in base58 format.
rewards
Rewards
Block rewards information.
block_time
UnixTimestamp
Unix timestamp when the block was produced.
block_height
BlockHeight
The block height (number of blocks since genesis).
parent_slot
uint64
required
The slot number of the parent block.
parent_blockhash
string
required
The blockhash of the parent block.
executed_transaction_count
uint64
required
Total number of transactions executed in this block.
entries_count
uint64
required
Total number of entries in this block.

Example

{
  "slot": 250000000,
  "blockhash": "3Uxv5kZX8xJLtFUV4wQPjZBFJKMKBdJqKDJpqQnqJe3X",
  "rewards": {
    "rewards": []
  },
  "block_time": {
    "timestamp": 1709901234
  },
  "block_height": {
    "block_height": 235000000
  },
  "parent_slot": 249999999,
  "parent_blockhash": "7hGzZJfFxqFqB9ZNdJN8f1NJHvZ8xJLtFUV4wQPjZBFJ",
  "executed_transaction_count": 150,
  "entries_count": 64
}

SubscribeUpdateEntry

Proof of History entry information. Entries represent PoH hashes that establish the passage of time on the Solana blockchain.
message SubscribeUpdateEntry {
  uint64 slot = 1;
  uint64 index = 2;
  uint64 num_hashes = 3;
  bytes hash = 4;
  uint64 executed_transaction_count = 5;
  uint64 starting_transaction_index = 6;
}

Fields

slot
uint64
required
The slot containing this entry.
index
uint64
required
The index of this entry within the slot.
num_hashes
uint64
required
Number of PoH hashes in this entry. Represents the amount of time that passed.
hash
bytes
required
The entry hash (32 bytes).
executed_transaction_count
uint64
required
Number of transactions executed in this entry.
starting_transaction_index
uint64
required
The index of the first transaction in this entry within the block. Added in v1.18. For Solana 1.17, this value is always 0.

Example

{
  "slot": 250000000,
  "index": 5,
  "num_hashes": 12500,
  "hash": "AbCdEf1234567890...",
  "executed_transaction_count": 3,
  "starting_transaction_index": 10
}

Reward Information

Reward

Information about a single reward distributed in a block.
message Reward {
  string pubkey = 1;
  int64 lamports = 2;
  uint64 post_balance = 3;
  RewardType reward_type = 4;
  string commission = 5;
}
pubkey
string
required
Public key of the account receiving the reward, in base58 format.
lamports
int64
required
Number of lamports rewarded (can be negative for rent collection).
post_balance
uint64
required
Account balance after the reward was applied.
reward_type
RewardType
required
Type of reward:
  • Unspecified (0)
  • Fee (1) - Transaction fee reward
  • Rent (2) - Rent collection
  • Staking (3) - Staking reward
  • Voting (4) - Voting reward
commission
string
Commission percentage as a string (for voting/staking rewards).

Example: Staking Reward

{
  "pubkey": "7xLk17EQQ5KLDLDe44wCmupJKJjTGd8hs3eSVVhCx932",
  "lamports": 5000000,
  "post_balance": 10005000000,
  "reward_type": "Staking",
  "commission": "10"
}

Use Cases

Block Monitoring

Subscribe to block metadata to monitor chain progress:
{
  "blocks_meta": {
    "all_blocks": {}
  },
  "commitment": "CONFIRMED"
}

Full Block Data

Subscribe to complete block data including all transactions:
{
  "blocks": {
    "full_blocks": {
      "include_transactions": true,
      "include_accounts": true,
      "include_entries": false
    }
  }
}

Filtered Block Data

Subscribe to blocks containing transactions for specific accounts:
{
  "blocks": {
    "program_blocks": {
      "account_include": ["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
      "include_transactions": true
    }
  }
}

Processing Blocks

Tracking Block Production

if (update.block_meta) {
  const block = update.block_meta;
  console.log(`Block ${block.slot} produced at ${block.block_time.timestamp}`);
  console.log(`Contains ${block.executed_transaction_count} transactions`);
}

Analyzing Block Contents

if (update.block && update.block.transactions) {
  const block = update.block;
  console.log(`Block ${block.slot}:`);
  console.log(`- Transactions: ${block.transactions.length}`);
  console.log(`- Accounts updated: ${block.updated_account_count}`);
  console.log(`- Entries: ${block.entries_count}`);
  
  // Process each transaction
  block.transactions.forEach(tx => {
    const isSuccess = !tx.meta.err || !tx.meta.err.err;
    console.log(`  TX ${base58.encode(tx.signature)}: ${isSuccess ? 'SUCCESS' : 'FAILED'}`);
  });
}

Build docs developers (and LLMs) love