Pinax Logo/Datasets
Beacon ChainBlocks

Column Descriptions

for eth_cl.blocks

14 rows
NameTypeDescription
proposer_indexNUMBERIndex of the validator that proposed this block
parent_slotNUMBERSlot number of the parent block directly preceding this block
slotNUMBERSlot number of the block, representing its position in the beacon chain
state_rootTEXTRoot hash of the state after processing this block
versionNUMBERVersion of the block as defined by the consensus specification
specTEXTSpecification or protocol version associated with this block
rootTEXTRoot hash of the block, representing its state in the chain
body_rootTEXTRoot hash of the block body, representing the transactions and other data
timeTIMESTAMP_NTZTimestamp indicating when this block was created
hashTEXTUnique identifier (hash) of the block
parent_rootTEXTRoot hash of the parent block, linking this block to its predecessor
numberNUMBERSequential number of the block in the blockchain
dateDATECalendar date associated with the block
signatureTEXTSignature of the block, used for validation by the proposer

Sample Queries

Latest Block Number
Retrieves the most recent block number in the blockchain.
SELECT
  MAX(number) AS latest_block_number
FROM
  eth_cl.blocks;
Blocks Proposed by a Specific Validator
Finds all blocks proposed by a particular validator index.
SELECT
  number,
  hash,
  slot
FROM
  eth_cl.blocks
WHERE
  proposer_index = 12345;
Average Slot Time
Calculates the average time difference between consecutive slots.
WITH
  SlotTimes AS (
    SELECT
      slot,
      time,
      LAG (time, 1, time) OVER (
        ORDER BY
          slot
      ) as prev_time
    FROM
      eth_cl.blocks
  )
SELECT
  AVG(datediff ('second', prev_time, time)) as avg_slot_time
FROM
  SlotTimes;