BBM - 25 02 2020
BBM - 25 02 2020
and Management
A.K. Swain
IIM Kozhikode
Ethereum
What is Ethereum ?
Ethereum is a global decentralized platform that runs smart
contracts: applications that run exactly as programmed without
any downtime, fraud or any sort of regulations.
Block Metadata:
parentHash
• Keccak 256-bit hash of the parent block’s header, like that of
Bitcoin’s style.
timestamp
• The Unix timestamp current block.
Number
• Block number of the current block
Beneficiary
• The 160-bit address of “author” account responsible for creating
the current block to which all the fees from successfully mining a
block are collected.
Ethereum Blockchain: Block Header
Data Reference:
• transactionsRoot:
• The Keccak 256-bit root hash (Merkle root) of the
transactions trie populated with all the transactions in
this block
• ommersHash:
• It is otherwise known as uncleHash. It is the hash of the
uncles segment of the block, i.e., Keccak 256-bit hash
of the ommers list portion of this block (blocks that are
known to have a parent equal to the present block’s
parent’s parent).
• extraData:
• Arbitrary byte array containing data relevant to this
block. The size of this data is limited to 32 bytes.
Ethereum Blockchain: Block Header
Transaction Execution Information:
• stateRoot:
• The Keccak 256-bit root hash (Merkle root) of the final state after
validating and executing all transactions of this block.
• receiptsRoot:
• The Keccak 256-bit root hash (Merkle root) of the receipts trie
populated with the recipients of each transaction in this block.
• logBloom:
• The accumulated Bloom filter for each of the transactions’ receipts
Blooms, i.e., the “OR” of all of the Blooms for the transactions in the
block.
• gasUsed:
• The total amount of gas used through each of the transactions in
this block.
• gasLimit:
• The maximum amount of gas that this block may utilise
Ethereum Blockchain: Block Header
Consensus-Subsystem Information:
• difficulty:
• The difficulty limit for this block calculated from the previous
block’s difficulty and timestamp
• mixHash:
• The 256-bits mix hash combined with the ‘nonce’ for the PoW of
this block
• nonce:
• The nonce is a 64-bit hash that is combined with mixHash and
can be used as a PoW verification.
Ethereum Accounts
Bitcoin System
• Bitcoin is a state transition system where “state” refers to
the collection of all UTXOs.
• Every time a block is mined, a state change happens
because each block contains a bunch of transactions
where each transaction cosumes UTXO(s) and
produces UTXO(s).
• There is no notion of an account balance as such in
Bitcoin’s design. Because, the state is not encoded
inside the blocks.
Ethereum Accounts
Ethereum System
• Ethereum is stateful, and its basic unit is the account.
• Each account has a state associated with it.
• Each account has a 20-byte (160 bits) address through
which it gets identified and referenced.
• The purpose of blockchain in Ethereum is to keep track
of the state changes.
Ethereum Accounts: Types
• Externally Owned Accounts (EOAs):
• These accounts are also known as “simple accounts” owned by
users or devices who control these accounts using Private Keys.
• The EOAs can send transactions to other EOAs or Contract
Accounts by signing with a private key. The transaction between two
EOAs is usually to transfer any form of value.
• An EOA can also initiate a transaction to a Contract Account, where
the purpose is to activate the “code” inside the Contract Account.
• Contract Accounts:
• are controlled only by the code contained in them, which are
referred to as smart contracts.
• are usually activated when a transaction is sent to the Contract
Account by the EOAs or by other Contract Accounts.
• can’t initiate new transactions on their own and always depend on
the EOAs.
• All they can do is respond to other transactions as per the logic
coded in their “code.”
Ethereum Accounts: Advantages
IIM Kozhikode