Entry Subscriptions

Stream ledger entries as they are produced by the validator. Each entry represents a segment of the Proof of History (PoH) chain and contains the hash, the number of hashing ticks, the transactions executed within that entry, and its position within the slot.

Entry subscriptions provide the most granular view of block construction. They are useful for understanding how transactions are ordered within a slot, building detailed PoH analytics, and implementing advanced MEV strategies that depend on intra-slot transaction ordering.

Filter Parameters

This subscription type accepts no filter parameters. All entries are streamed for the specified commitment level.

Update Payload

FieldTypeDescription
slotuint64The slot this entry belongs to
indexuint64The index of this entry within the slot
num_hashesuint64Number of PoH hashes since the previous entry
hashbytesThe PoH hash of this entry
executed_transaction_countuint64Number of transactions executed in this entry
starting_transaction_indexuint64The index of the first transaction in this entry within the block

Code Examples

Stream Ledger Entries (Node.js)

1stream.write({
2  accounts: {},
3  slots: {},
4  transactions: {},
5  transactionsStatus: {},
6  blocks: {},
7  blocksMeta: {},
8  commitment: 0,
9  entry: {
10    allEntries: {}  // No filter params -- receives all entries
11  },
12  accountsDataSlice: [],
13  ping: null
14});
15
16stream.on('data', (update) => {
17  if (update.entry) {
18    const entry = update.entry;
19    console.log('Slot ' + entry.slot + ' | Entry #' + entry.index);
20    console.log('  PoH hashes: ' + entry.num_hashes);
21    console.log('  Transactions: ' + entry.executed_transaction_count);
22    console.log('  Starting tx index: ' + entry.starting_transaction_index);
23    console.log('  Hash: ' + Buffer.from(entry.hash).toString('hex'));
24  }
25});

Analyze PoH Entry Structure (Rust)

1use yellowstone_grpc_client::GeyserGrpcClient;
2use yellowstone_grpc_proto::prelude::*;
3use std::collections::HashMap;
4use futures::StreamExt;
5
6#[tokio::main]
7async fn main() -> anyhow::Result<()> {
8    let mut client = GeyserGrpcClient::build_from_uri("http://[IP_ADDRESS]:[PORT]")
9        .connect()
10        .await?;
11
12    let mut entry = HashMap::new();
13    entry.insert("allEntries".to_string(), SubscribeRequestFilterEntry {});
14
15    let request = SubscribeRequest {
16        accounts: HashMap::new(),
17        slots: HashMap::new(),
18        transactions: HashMap::new(),
19        transactions_status: HashMap::new(),
20        blocks: HashMap::new(),
21        blocks_meta: HashMap::new(),
22        commitment: Some(CommitmentLevel::Processed as i32),
23        entry,
24        accounts_data_slice: vec![],
25        ping: None,
26        from_slot: None,
27    };
28
29    let (_, mut stream) = client.subscribe_with_request(Some(request)).await?;
30
31    while let Some(msg) = stream.next().await {
32        match msg?.update_oneof {
33            Some(UpdateOneof::Entry(entry)) => {
34                println!("Slot {} | Entry #{} | {} hashes | {} txns (starting at {})",
35                    entry.slot,
36                    entry.index,
37                    entry.num_hashes,
38                    entry.executed_transaction_count,
39                    entry.starting_transaction_index.unwrap_or_default());
40            }
41            _ => {}
42        }
43    }
44
45    Ok(())
46}

Common Use Cases

Use CaseFilter Configuration
PoH analyticsDefault (no filters) -- analyze hash rates and entry sizes
Transaction ordering analysisTrack starting_transaction_index to understand intra-slot ordering
MEV researchCorrelate entry positions with transaction profitability
Validator performanceMeasure entry production rate and PoH hash counts
Block reconstructionCombine entries with block data for complete block assembly