Skip to content

Block Explorers

Block Explorers

A block explorer is used to view transactions and block information on a blockchain. It allows users to search for specific transactions, blocks, addresses, and more, and to view detailed transaction histories, balances, and block information.

Block explorer information typically includes: ChainInfo, BlockInfo, TransactionInfo, ContractInfo (TokenInfo, ScriptInfo), AddressInfo, and more.

ChainInfo

ChainInfo generally provides a high-level overview of the blockchain and is usually displayed on the explorer's homepage. Its function is to allow users to quickly understand the overall operational status of the blockchain. In a sense, the aggregate information on a block explorer can fundamentally reflect the basic state of the blockchain.

Key metrics include:

  • Security Metrics: Hash rate, mining difficulty, mining rewards, hash rate concentration, etc.
  • Activity Metrics: Transaction count, transaction pool, active accounts, contracts and tokens, etc.
  • Price Metrics: Market price, market capitalization, etc.
  • Special Metrics: Staking in PoS consensus systems, Cell information in the Nervos ecosystem, etc.

BlockInfo

BlockInfo refers to block-level information on the blockchain and generally includes a block list page and a block detail page. This involves blockchain data structure considerations. We can look at Bitcoin's Block data structure as an example: Bitcoin's data structure is typically composed of certain data fields, and the task is usually to determine information priority and arrange it in an orderly manner. Through this approach, we can outline the basic BlockInfo information.

However, this is clearly not sufficient. BlockInfo contains much more information to uncover, rich with characteristics specific to each blockchain. Using Bitcoin as an example:

  • Confirmation Count: The confirmation count refers to the number of times a block has been confirmed, which can also be understood as the block height difference between the current block and the latest block. Due to the inevitable forking situation in the Bitcoin network, it is generally considered that after 6 blocks, a block is immutable. Therefore, the confirmation count provides the following value: informing users that after 6 blocks, the transaction is considered immutable.
  • Transaction Fees: As we know, Bitcoin transaction fees are calculated as Input minus Output, and each transaction fee must be computed by the explorer. What is more worth displaying here is the transaction fee per byte. Additionally, the Coinbase reward and total transaction fees also need to be shown, as they represent the incentives for miners.

TransactionInfo

TransactionInfo refers to transaction information, and generally includes a latest transactions list page, a block transaction list page, a transaction detail page, and more. In explorer development, raw transaction data should not be displayed directly to users -- certain data needs to be processed and formatted.

ContractInfo

ContractInfo is another type of transaction information, primarily representing the display of various smart contract details. With the emergence of Turing-complete blockchain platforms like Ethereum, the display of smart contract information has become increasingly important.

ContractInfo is essentially a special type of transaction. At the same time, token contracts follow fixed formats. Therefore, by using transaction information and token contract information as raw data sources, we can prioritize and display data accordingly. One important note: not all smart contracts are general-purpose, and as a result, in most cases there is no need to design specialized contract displays for non-general or low-impact smart contracts. We only need to provide a decoding tool in the transaction's Data field.

AddressInfo

AddressInfo primarily focuses on giving users an "account" concept. In Bitcoin, a so-called account is the collection of all UTXOs under a given address; in Ethereum, the Account concept exists natively. However, for users, there is always an address concept. AddressInfo focuses on displaying all information for a given address, mainly including basic information and transaction information, which is fairly straightforward.

Bitcoin Explorer

https://btc.com/

Ethereum Explorer

https://etherscan.io/


Reference: https://www.zhihu.com/question/293505338/answer/699048450