Skip to main content
Schema: near.core Table: fact_blocks Type: View

Description

This table contains all finalized blocks on the NEAR Protocol blockchain, providing comprehensive block-level metadata including block height, timestamp, author (validator), cryptographic hashes, and protocol-specific header fields. Each record represents a unique block, capturing the full context of NEAR’s sharded architecture, including chunk and epoch data, validator proposals, and protocol versioning. The table is sourced from the final, canonical chain state and is foundational for all temporal, transactional, and consensus analytics on NEAR. It exposes both raw and parsed header fields, supporting deep analysis of block production, validator behavior, and protocol evolution.

Key Use Cases

  • Block production analysis and validator performance tracking
  • Network activity monitoring and chain growth analysis
  • Temporal alignment for transactions, receipts, and logs
  • Consensus and protocol upgrade tracking
  • Sharding and chunk distribution analysis
  • Economic analysis of total supply, gas price, and validator rewards
  • Cross-referencing with transaction, receipt, and event tables for full blockchain context

Important Relationships

  • Links to core.fact_transactions and core.fact_receipts through block_id for temporal and execution context
  • Provides block context for core.fact_logs, core.fact_token_transfers, and all downstream analytics tables
  • Supports stats.ez_core_metrics_hourly for aggregated block and network metrics
  • Enables sharding and chunk analysis via chunk-related fields and relationships to chunk-level tables
  • Serves as the temporal backbone for all gold layer models in the NEAR analytics suite

Commonly-used Fields

  • block_id: Essential for unique block identification and joining with all transactional tables
  • block_timestamp: Primary field for time-series analysis and trend detection
  • block_hash: Critical for block verification and chain integrity
  • block_author: Important for validator analysis and block production tracking
  • tx_count: Key for network activity and throughput analysis
  • header, chunks, and chunk-related fields: Support sharding, chunk distribution, and protocol-level analytics
  • total_supply, gas_price, validator_proposals, validator_reward: Important for economic and protocol analysis
  • inserted_timestamp, modified_timestamp: Useful for data freshness and ETL monitoring

Columns

Column NameData TypeDescription
BLOCK_IDNUMBERThe height of the chain this block corresponds with.
BLOCK_TIMESTAMPTIMESTAMP_NTZThe date and time at which the block began.
BLOCK_HASHTEXTUnique identifier (hash) of this block.
BLOCK_AUTHORTEXTThe block_author taken from block headers. Validators of the blockchain.
HEADEROBJECTA json column containing header information from the object: block or chunk.
BLOCK_CHALLENGES_RESULTARRAYThe block_challenges_result taken from block headers.
BLOCK_CHALLENGES_ROOTTEXTThe block_challenges_root taken from block headers.
CHUNK_HEADERS_ROOTTEXTThe chunk_headers_root taken from block headers.
CHUNK_TX_ROOTTEXTThe chunk_tx_root taken from block headers.
CHUNK_MASKARRAYThe chunk_mask taken from block headers.
CHUNK_RECEIPTS_ROOTTEXTThe chunk_receipts_root taken from block headers.
CHUNKSARRAYThe chunks taken from block headers. Chunk is an aggregation of transactions which are executed within a particular shard.
CHUNKS_INCLUDEDNUMBERThe chunks_included taken from block headers.
EPOCH_IDTEXTThe epoch_id taken from block headers.
EPOCH_SYNC_DATA_HASHTEXTThe epoch_sync_data_hash taken from block headers, if available.
GAS_PRICEFLOATThe gas_price taken from block headers, number is not decimal adjusted.
LAST_DS_FINAL_BLOCKTEXTThe last_ds_final_block taken from block headers.
LAST_FINAL_BLOCKTEXTThe last_final_block taken from block headers.
LATEST_PROTOCOL_VERSIONNUMBERThe latest_protocol_version taken from block headers.
NEXT_BP_HASHTEXTThe next_bp_hash taken from block headers.
NEXT_EPOCH_IDTEXTThe next_epoch_id taken from block headers.
OUTCOME_ROOTTEXTThe outcome_root taken from block headers.
PREV_HASHTEXTThe prev_hash taken from block headers.
PREV_HEIGHTNUMBERThe prev_height taken from block headers.
PREV_STATE_ROOTTEXTThe prev_state_root taken from block headers.
RANDOM_VALUETEXTThe random_value taken from block headers.
RENT_PAIDFLOATThe rent_paid taken from block headers.
SIGNATURETEXTThe signature taken from block headers.
TOTAL_SUPPLYFLOATThe total_supply taken from block headers.
VALIDATOR_PROPOSALSARRAYThe validator_proposals taken from block headers.
VALIDATOR_REWARDFLOATThe validator_reward taken from block headers.
FACT_BLOCKS_IDTEXTA unique identifier for the record.
INSERTED_TIMESTAMPTIMESTAMP_NTZThe timestamp at which the record was initially created and inserted into this table.
MODIFIED_TIMESTAMPTIMESTAMP_NTZThe timestamp at which this record was last modified by an internal process.