User-friendly block explorer

What are the best practices when it comes to blockchain ledgers? In this article by Igor Barinov, learn about the importance of block explorers and how to use BlockScout to your best advantage. This open source tool was created with the needs of developers in mind.

The importance of block explorers

It’s no surprise that blockchain ledgers can be difficult to access and read. These ledgers contain complex, encrypted data that is constantly evolving as new blocks (containing validated transactions) are added to the chain.

To organize and make sense of this immense amount of data, we use a block explorer. A block explorer allows us to view information contained in any block in the chain, from the genesis block all the way up to the most recently created block. We can check transactions from any address, look at transaction history, and view and verify the contents of smart contracts. It is an essential part of the blockchain ecosystem.

Etherscan is by far the most widely used block explorer in the Ethereum community. While it is a useful tool, it is closed-source, and its limitations, such as a lack of multi-chain support, inability to customize, and a lack of transparency and verifiability, have created the need for an open-source alternative.

Along with other community members, ETHPrize recognized the lack of an open-source block explorer as “one the most critical issues facing the Ethereum ecosystem today.” They organized a bounty to solve this issue, and POA Network was granted the award. The result is a new open-source block explorer called BlockScout.

SEE ALSO: “For blockchain technology to be useful, it must be enabled by APIs first”

An open-source universal block explorer

BlockScout is an open-source universal block explorer designed for Ethereum based blockchains. Universal means it can be configured for different chains that use the Ethereum Virtual Machine (EVM), such as private chains, sidechains, and forks like Ethereum Classic.

BlockScout provides similar functionality to Etherscan, along with an improved user interface, the ability to sync with different chains, and the transparency and configurability inherent to an open-source project. Developers can customize BlockScout for different use cases and different EVM based chains. Most importantly, it provides a way to verify correct transaction tracking. Diversity in tooling is vital to the overall health and transparency of the blockchain, and BlockScout provides a needed choice in block explorers.

BlockScout data processing

BlockScout is written in Elixir, a fault-tolerant language that runs on the Erlang Virtual Machine. Erlang was originally created for large distributed networks (telecommunication systems) and is known for its reliability, scalability, and speed. BlockScout uses concurrent indexing to capture and display all blockchain data. There are two indexers; one for real-time data and another for historical data.

BlockScout enhancements

BlockScout offers several enhancements that provide additional efficiency and customization options.

Memory shrinking: This process is configurable by the user, and keeps the memory requirements below a set threshold. Every minute, the application checks on potential fetching processes it can shrink (such as coin, token, block, or receipts fetching).

SEE ALSO: “Anyone who needs a modular cryptographic library for blockchain might find Hyperledger Ursa useful”

Node timeout checks: A rolling timeout setting checks for node timeouts and pauses fetching processes for `n` seconds based on the number of timeouts within a certain window. This protects the node from performing too many process requests, which can impact functionality.

Customization and themability: BlockScout is easily customizable. The indexer can be directed to different RPC endpoints to sync with different chains. The UI can be customized using CSS file templates to match the branding associated with the synced chain.

Designed for developers and users

Because it is open source, BlockScout was created with developers in mind. There are many contributors to the project, the API is well documented, and improvements are made on a consistent basis. BlockScout is usable by any EVM chain, so private chains and side chains can configure it for their own unique needs.

BlockScout is also user-friendly. The real-time UI provides updates as they happen on the chain. Support for ERC-721 non-fungible (unique) tokens and smart contract verification allows users to explore and verify many different types of transactions.

As blockchain technology continues to mature, it is vital to develop and use decentralized, transparent tools that work in tandem with the decentralized blockchain. Open source applications like BlockScout introduce diversity and encourage collaboration and innovation within the entire blockchain community.

If you would like to incorporate your project into BlockScout, or use BlockScout with your EVM chain instance, simply open an issue on the BlockScout GitHub repository to get started.