The Ultimate Guide To Ethereum Blocks

Share:
Indexes
  1. What’s within one Ethereum Block?
  2. Ethereum Mining
  3. An Ethereum Block Body — Transaction Set

Understand data within each Ethereum block on its Blockchain Network and the Cryptocurrency Mining Process .

Blocks within an Ethereum Blockchain have header info and transaction data

What’s within one Ethereum Block?

A Blockchain is just a group of blocks that are linked, or chained, to one another in some order. Each block has a unique set of header and transnational data associated.

Each Block = Header info + Transaction set.

Refer here for more info on Blockchain Networks:-
Blockchain Deciphered — Fundamentals

Ethereum Mining

Miners take the blocks submitted into a blockchain network and try to solve a mathematical puzzle to win a prize- in ETH (ether).

Miners are nodes, or collection of nodes, with enough computational power to calculate block hashes many times to solve the puzzle

In Ethereum, the mining process uses the submitted block header and an arbitrary number called a nonce (number used once).

The miner (chooses a nonce value) → which is part of the block header → calculates a hash value using a hash function (present on the block header)

Ethereum Miners take the blocks submitted into a blockchain and solve a mathematical puzzle for rewards- in ETH (ether)

The result has to match an agreed-upon pattern, which gets more difficult over time as miners get faster at mining blocks. If the first mining result doesn’t match the pattern, the miner chooses another nonce and calculates a hash on the new block header. This process continues until a miner finds a nonce that results in a hash that matches the pattern. The miner that finds the solution broadcasts that solution to the rest of the network.

Because many miners work on same blocks concurrently, it’s common for several miners to solve the hash puzzle at almost the same time. In other blockchains, these blocks are discarded as orphans. In Ethereum, these blocks are called uncle blocks. Ethereum accepts uncle blocks and even provides a reward to the miner, but one that’s smaller than the accepted block. Uncle rewards provide an incentive for smaller miners to participate. Otherwise, mining would be profitable only for large pools that could eventually take over all mining.

Within An Ethereum Block Header

An Ethereum Block header has an array of unqiue data the specify its place in the Blockchain
  1. Previous hash: The hash value of the previous block’s header on the blockchain.
  2. Nonce: A number that causes the hash value of the current block’s header to adhere to a specific pattern.
  3. Timestamp: The creation date + time of the current block.
  4. Uncles hash: The hash value of the current block’s list of uncle blocks (stale blocks).
  5. Beneficiary: The miner’s account that receives the reward for mining the block.
  6. Logs bloom: Logging info, stored in a Bloom filter (a data structure useful for quickly finding out if some element is a member of a set).
  7. Difficulty: The difficulty level for mining this block.
  8. Extra data: Any complementary used for description.
  9. Block number: The unique sequential number for this block.
  10. Mix hash: A hash value combined with the nonce value to show that the mined nonce meets the difficulty requirements. This hash makes it more difficult for attackers to modify the block.
  11. State root: The hash value of the root node of the block’s state trie.
  12. Transaction root: The hash value of the root node of the trie, which stores all transactions for this block.
  13. Receipt root: The hash value of the root node of the trie, which stores all transaction receipts for this block.

A trie is a data structure that efficiently stores data for quick retrieval. The state trie hence has info about the state of transactions in the block without having to look at the transactions.

An Ethereum Block Body — Transaction Set

Ethereum Block Body has a set of transactions with each having a unique set of properties
An Ethereum Block Body has a set of transactions — each with a unique set of properties
  1. Nonce: Each Ethereum account keeps track of the number of transactions it executes. This field is the latest transaction, based on the account’s counter. The transaction nonce is used by the network to ensure that transactions are executed in the proper order.
  2. Signature: The digital signature of the account owner.
  3. Gas price: The unit price you’re willing to pay to execute this transaction.
  4. Gas limit: The max amount you’re willing to pay to execute this transaction.
  5. To: The recipient address of this transaction.
  6. Value: The total amount of ether you want to send to the recipient.
  7. Data: The actual data submitted as the transaction body. For calling functions (Smart Contracts), the data might contain parameters.

For transfers, the To address is the account that will receive the transfer. For calling functions, the To address is the address of the smart contract.

Refer here for more info on Smart contracts :-
Blockchain Deciphered — Propelling Businesses