Tutorial 4: Ethereum Flashcards

1
Q
  1. What was one of the primary motivations for Ethereum’s transition to Proof of Stake (PoS)?
    A) To increase transaction fees
    B) To improve energy efficiency and scalability
    C) To reduce the number of validators
    D) To eliminate the need for smart contracts
  2. What type of accounts does Ethereum support?
    A) Regular accounts and multisig accounts
    B) Wallet accounts and transaction accounts
    C) Externally Owned Accounts (EOAs) and Contract Accounts
    D) Personal accounts and business accounts
A

B) To improve energy efficiency and scalability

C) Externally Owned Accounts (EOAs) and Contract Accounts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
  1. Which of the following best describes how Ethereum’s EIP-1559 aims to improve transaction fee predictability and network efficiency?
    A) By introducing a fixed gas fee that applies to all transactions regardless of network congestion.
    B) By implementing a dynamic base fee that adjusts based on network demand, coupled with a priority fee (tip) to incentivize miners.
    C) By allowing users to pay transaction fees directly in stablecoins to reduce volatility.
    D) By replacing gas fees with a flat transaction fee to simplify the fee structure.
  2. Which of the following is a significant challenge that Ethereum faces, which has prompted the development of Ethereum 2.0?
    A) Limited ability to process smart contracts in parallel
    B) Inefficient handling of large transaction volumes leading to high gas fees
    C) Slow block propagation speed due to network latency
    D) Inadequate support for cross-chain interoperability
A

B) By implementing a dynamic base fee that adjusts based on network demand, coupled with a priority fee (tip) to incentivize miners.

B) Inefficient handling of large transaction volumes leading to high gas fees

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Question 2: True or False
State whether the following statement is true or false and provide a brief explanation for your answer.
1. “Ethereum’s consensus mechanism transitioned from Proof of Work to Proof of Stake with the Ethereum 2.0 upgrade.”

  1. “In Ethereum, gas is a measure of the amount of computational effort required to execute operations like transactions and smart contracts.”
  2. “The EVM (Ethereum Virtual Machine) uses sharding to distribute the computational load across multiple nodes, enhancing scalability and reducing transaction costs.”
A

True. Ethereum transitioned to PoS with the Ethereum 2.0 upgrade to address scalability and energy efficiency.

True. Gas measures the computational effort required for operations on the Ethereum network.

False. Sharding is a technique planned for Ethereum 2.0 to enhance scalability, but the EVM itself does not use sharding.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Explain the concept of gas in Ethereum.

A

Gas in Ethereum is a unit that measures the amount of computational effort required to perform operations such as transactions and smart contract executions. It acts as a fee mechanism to prevent network abuse and allocate resources efficiently. Users pay gas fees to miners to incentivize them to process and validate transactions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What happens to the unused gas if a transaction is provided with more gas than necessary?

A

If a transaction is provided with more gas than necessary, the unused gas is refunded to the sender. This ensures that users do not overpay for their transactions. However, the gas price (Gwei) paid for the executed portion of the transaction is not refunded.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Unlike Bitcoin’s transaction-based ledger, Ethereum maintains the world state using an account-based ledger. In Bitcoin, double spending is prevented by using UTXOs, where a spent UTXO cannot be reused. How does Ethereum prevent double spending?

A

In Ethereum’s account-based ledger, double spending is prevented by maintaining a global state of accounts, which includes each account’s balance and nonce. Each transaction includes the sender’s nonce, which must be equal to the nonce stored in the global state. This ensures that each transaction is processed sequentially, and once a transaction is processed, the nonce is incremented, preventing the same transaction from being replayed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Name four reasons why a transaction sent to the Ethereum network might not get validated.

A

Insufficient Gas: The provided gas is not enough to cover the transaction’s computational requirements.

Low Gas Price: The gas price is set too low, making it less attractive for miners to include the transaction in a block.

Incorrect Nonce: The transaction nonce does not match the sender’s account nonce.

Network Congestion: High network activity can cause delays in transaction validation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Explain one reason why a validated transaction can fail and why it still costs gas when it does.

A

A validated transaction can fail if it runs out of gas during execution. This happens when the transaction’s gas limit is insufficient to complete all operations. Even though the transaction fails, it still costs gas because miners must execute and validate the transaction up to the point of failure, consuming computational resources.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In Ethereum, transactions are explicitly recorded on the blockchain, but message calls are stored “virtually.” Explain why messages are not written to the blockchain and how the blockchain ensures that all nodes remain in the same state without storing these messages.

A

Message Calls in Ethereum are internal contract-to-contract interactions that do not result in direct changes to the blockchain state. They are not written to the blockchain to save space and computational resources. The Ethereum blockchain ensures consistency across nodes by using the EVM to process these calls during transaction execution, updating the state accordingly and recording the final state changes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are hard and soft forks in blockchain technology? Use the DAO event to illustrate the concept of a hard fork.

A

Hard Fork: A radical change to the protocol that makes previously invalid blocks/transactions valid (or vice-versa). It requires all nodes to upgrade to the new version. If some nodes do not upgrade, it results in a split, creating two separate chains.

Soft Fork: A backward-compatible protocol upgrade. Only miners need to upgrade, and non-upgraded nodes can still participate in the network but might miss some new features.

DAO Event Hard Fork Example: The DAO event involved a vulnerability in a smart contract that led to a significant loss of funds. The Ethereum community decided to implement a hard fork to restore the lost funds by creating a new chain that reversed the malicious transactions. This resulted in two chains: Ethereum (ETH) and Ethereum Classic (ETC), with Ethereum Classic continuing on the original chain without the rollback.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

However, with the introduction of Ethereum Improvement Proposal 1559 (EIP-1559), the actual calculation for gas price is slightly more complex and is calculated as:
𝑇𝑟𝑎𝑛𝑠𝑎𝑐𝑡𝑖𝑜𝑛 𝑓𝑒𝑒 = min(𝑏𝑎𝑠𝑒 𝑓𝑒𝑒 + 𝑝𝑟𝑖𝑜𝑟𝑡𝑖𝑦 𝑓𝑒𝑒, 𝑚𝑎𝑥 𝑓𝑒𝑒) ∗ 𝑔𝑎𝑠 𝑢𝑠𝑒𝑑
EIP-1559 aims to make transaction fees more predictable and introduces a mechanism to burn a portion of the fees, reducing the overall supply of Ether.
Key components of EIP-1559 transactions:
* Base Fee: A mandatory fee per gas unit burned by the network, which adjusts dynamically based on network demand.
* Priority Fee (Tip): An optional fee paid to validators to incentivize them to prioritize the transaction.
* Max Fee per Gas: The maximum amount the sender is willing to pay per gas unit, encompassing both the base fee and the priority fee.

A

SEE TUTORIALS AND DO THIS ONE :)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly