Are you curious about blockchain explorers and why they’re key to the blockchain technology? Great! You’ve come to the right place. To learn blockchain development and be certified I recommend visiting Ivan on Tech Academy.
Blockchain is currently #1 ranked skill by LinkedIn. Because of that, you should definitely learn more about Ethereum to get a full-time position in crypto during 2020.
In my first and second pieces, I’ve discussed Ethereum 2.0 and the best tools for developers. In my third and fourth articles, I’ve discussed quadratic voting and open governance models. Then, in my fifth piece, I’ve looked into Swarm’s infrastructure.
In my sixth, seventh and eight ones, I’ve dove-deep into consensus algorithms and the blockchain trilemma. Lastly, I’ve looked into blockchain sharding technology, which projects are making it thrive and I’ve done an intro to Plasma and Looms. It is one of the most recent Plasma implementations in Ethereum!
Today, I’ll look into something rather known, blockchain explorers. How do they work? What information can one find? Should Ethereum developers pay attention to blockchain explorers and learn how to take advantadge of the information present?
An intro to blockchain explorers
A blockchain explorer is a browser for the blockchain, similar to how we have browsers like Mozilla or Google Chrome for web pages.
Every Bitcoin and altcoin user relies heavily on blockchain explorers to track their transactions and amounts. However, very few users really appreciate the full potential of these explorers. These browsers provide much more valuable information than just tracking of transactions. Any user has complete access to all blockchain data at the tip of their fingers.
For the purpose of this article I will discuss the two main blockchain explorers:
The way both work are very similar, even in terms of block and transaction information. However, Ethereum transactions might contain data with instructions for smart contracts living in the network. These can, sometimes, be more interesting to investigate.
The Bitcoin blockchain
The blockchain contains all transactions completed within the Bitcoin network. By looking at the blockchain explorer highlights, we can see the following information:
- Block height which chronologically arranges blockchain blocks containing transactions,
- Timestamps for the exact time the block was posted in the blockchain,
- Transactions containing the number of transactions within a block,
- ‘Mined by’ which states the miner or mining pool,
- The size of the block. Max size is set at around 1,2MB.
With all this information we can see the overall state of a blockchain in terms of how many blocks have been processed. In addition, we can check the number of transactions per block and the time-period between each. It is with these variables we can calculate the speed at which transactions transactions get processed per second (TPS). The TPS metric helps making assumptions about the scalability of a certain technology.
The more blocks there are with more transactions, the better it is for scalability. However, in terms of security, it’s best to have the opposite: smaller blocks with fewer transactions. That’s because of routing and fault tolerance, as the more information nodes need to carry and transmit, the more centralised a blockchain needs to be.
For more details on how security, decentralization and scalability interconnect, check the trilemma piece.
The Bitcoin block explorer
When we drill into a certain block, we’re able to see detailed information about each block and incorporated transactions. What we should focus on is:
- The merkle root, which contains the necessary details to validate the truthfulness of a certain block,
- The previous block information, linked by the merkle tree,
- Difficulty, which is adjusted by the number of miners mining at a certain time and the higher it is, the lower the nonce needed;
- The bits and size representing, again, the total space required by a block,
- The version containing the bitcoin protocol version on which a block was mined,
- And the nonce, which represents the number needed to mine a block. Nonces are random numbers tried by miners to find a block hash.
Regarding the transactions section of the image, you can see the transaction hash, or tx, represented by “605f6e1f991f1a1a6fd0c0d8d52fda2a7baf0ba816ddb482ce699dc7f1454b87“. Additionally, you have the information about the addresses where the coins were sent.
The transaction below represents a miner reward, which is a bit different than traditional Bitcoin transactions, as you’ll quickly grasp.
A regular transaction usually has many output addresses, simply because that is how the protocol works, in order to obfuscate and give users a bit more privacy.
In addition, you can have one input targetting multiple outputs. Meaning a single transaction can effective contain many payees.
The information a transaction contains can be easily translated into:
- Inputs: amount sent;
- Outputs: amount received;
- Fee: amount paid to miner.
The Ethereum blockchain
There are some differences in how the Bitcoin and the Ethereum blockchain operate, however, as you can see from the screenshot above, most of the logic remains identical, due to the simple fact the goal of any blockchain is to register information in a decentralised manner.
That said, because ETH has extra data fields, its blockchain becomes a bit more interesting to analyse. One can find very interesting transactions associated to the smart-contract functionality and logic.
The Ethereum block explorer
When we look into the Etheruem blockchain explorer, we can immediately see some similarities like the block height, timestamps, difficulty, reward, nonce and so on.
However, ETH transfers use GAS (just another name for the ETH fees) as the smaller unit of measurement.
Interestingly enough, the key difference between ETH and BTC transactions is the fact ETH allows for complex scripts to be executed. In Ethereum, the data column allows you to write complicated instructions, or to grant ownership of an asset to the receiver, etc. In summary, with the extra complexity, we are able to register a bunch of information, quite easily, in an immutable ledger. However, as seen with the DAO or the Parity hacks, it’s quite easy to mess-up!
- Ivan On Tech Academy,
- Ivan On Tech ETH 2.0 code review,
- Build a blockchain in SECONDS,
- Functional programming in blockchain,
- ETH 2.0 discussion,
- Ethereum projects analysis,
- Role of consensus algorithms,
- Ethereum Plasma.
This article is not financial advisement. Changes may happen that the author is unaware of. Always check the resources provided!