L05: Ethereum I Flashcards

1
Q

Introduction to Ethereum
* Origin of philosophy: Proposed by Vitalik Buterin in 2014, Ethereum builds upon the blockchain concept pioneered by Bitcoin but extends its capabilities with … It aims to be a decentralized platform that enables anyone to …
* Key innovation: …, allowing the development of complex applications and protocols directly on the blockchain.
* Challenges: Ethereum faces different challenges, such as …, which it is addressing through upgrades like Ethereum 2.0.

A

smart contracts and a Turing-complete scripting language; deploy permanent and immutable decentralized applications (dApps).

Introduces smart contracts, self-executing contracts with the terms directly written into code, …

network scalability and gas fees

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

EOAs vs Contract accounts

EOAs:
- by whom are these accounts controlled?
- what do they do?
- What’s the purpose of the nonce for EOAs?

Contract accounts
- what are those?
- What do they contain?
- by whom are they controlled?
- what’s the purpose of the nonce here?

A

EOAs:
-by individuals using private keys
- create and sign TXs: ether transfers, creation of smart contracts, function calls within a contract
- nonce for EOAs increments w/ each transactions ensuring transactions are processed once and in the correct order.

Contract accounts:
- accounts governed by their contract code: smart contracts deployed on the blockchain.
- Ether balances, code, data storage
- Controlled not by a user but by the logic defined within the contract code itself.
- represents the number of contracts creating by it. helps to keep track of deployed contracts and maintain order.

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

Ethereum account types
* Account state: An EOA contains the following fields:
◦ Nonce (to …)
◦ ETH balance
◦ …
◦ Storage (empty by default) – only contract accounts can have their own storage.
* The state is …
* When transactions occur, they can either transfer Ether between EOAs, from EOAs to Contract Accounts, or …. Contract Accounts can also interact with other contracts through message calls.

A

make sure each transaction can only be processed once

Contract code (empty for EOAs)

not static but changes with every block, reflecting the results of transactions and contract executions.

trigger contract executions

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

Types of Transactions
* There are three primary types of transactions:
◦ Direct Ether transfers: These transactions simply …. They are processed by the EVM to ensure …(such as signature verification, nonce checks, and balance sufficiency) are met.

◦ Smart contract executions: These involve … This can include functions that alter the contract’s
.., generate events, or even create additional smart contracts.

◦ Smart contract deployment: This specific type of transaction is used to …

A

adjust the Ether balances of the sender and receiver
all basic validation checks

executing code stored in contract accounts
when transactions are sent to them; stored data

create and deploy a new smart contract onto the Ethereum blockchain.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
  • Special case of message calls: Message calls are a type of …
    They are not standalone transactions on the blockchain but …
  • Execution environment: The Ethereum Virtual Machine (EVM) …, whether they involve simple Ether transfers between EOAs or complex operations in smart contracts.
A

internal transaction within smart contracts
occur when one contract calls another contract directly through its code, typically triggered during the execution of a smart contract function.

processes all transactions on the Ethereum network

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

Information content of transactions:
Explain Nonce, Sender’s address, Recipient’s address, Signature of Sender.

A
  1. Nonce: Used to ensure transactions are processed once and in the order they were sent. It prevents the replay of transactions.
  2. Sender’s address: Implicitly derived from the digital signature; identifies who initiated the transaction.
  3. Recipient’s address: For Ether transfers, this is the address of the recipient EOA or contract. For contract creations, this field is left empty.
  4. Signature of the sender: Verifies that the transaction was indeed sent by the owner of the sender’s address and provides the authentication.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Information content of transactions:
Explain Amt of ETH to transfer, Startgas(gas limit), Gasprice, Data field

A
  1. Amount of ETH to transfer: This specifies how much Ether is being sent. For non-Ether transferring transactions (like certain smart contract executions), this could be zero.
  2. STARTGAS (Gas limit): The maximum amount of gas the sender is willing to use for the transaction, covering computational steps and storage operations. It acts as a cap, preventing runaway transaction costs.
  3. GASPRICE: The amount of Ether the sender is willing to pay per unit of gas, typically measured in Gwei (one billionth of an Ether). This price influences how quickly a transaction is processed by validators.
  4. DATA: Field containing the input data of the transaction. For transactions to contracts, this could be a function identifier and its arguments. For contract creations, this includes the contract’s initialization bytecode.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Ethereum virtual machine
* The EVM can be considered the operating system of Ethereum, …
* Every Ethereum node runs an EVM implementation, which… recorded on the Ethereum blockchain.
* It ensures the security and integrity of the network by … — no direct access to the network or the rest of the node logic.
* One limitation is that …, a method for distributing the computational and storage workload across multiple groups (or shards) to scale the network.

This absence means that …, , leading to potential bottlenecks and scalability issues.

A

executing smart contracts and managing state.

enables the decentralized network to agree on the state of all information

maintaining an isolated environment

EVM does not implement sharding

all computations need to be processed by every node in the network…

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

Gas in Ethereum
* Gas is a unit that measures the amount of … on the Ethereum network.
* The actual amount of gas used depends on the …. Simple transfers use less gas, while complex contract interactions use more.
* Transaction fee = gas price x gas used Q: How to calculate a tx fee in EUR?
◦ If the gas limit is set too low for a transaction, it can …
◦ During times of high demand, gas prices can increase, leading to higher transaction fees. This mechanism helps …
◦ Users need to balance the gas limit and gas price based on …

A

computational effort required to execute operations like transactions and smart contracts

transaction’s complexity

fail, and the user will lose the gas spent.

manage the network’s computational load.

how quickly they need their transactions processed and how much they are willing to pay.

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

Consensus
* Initially, Ethereum used Proof of Work, similar to Bitcoin, where miners solve complex mathematical problems to …
* On Sep 15, 2022, Ethereum moved to a Proof of Stake model with its Ethereum 2.0 upgrade, known as The Merge, aiming to improve …
* How Proof of Stake works:
1.
2.

A

validate transactions and create new blocks.

scalability, security, and energy efficiency.

◦ Staking Ether: Users lock up (stake) their Ether to become validators instead of miners. The size of their stake influences their chances of being chosen to validate new blocks.
◦ Validation process: Validators are randomly selected to propose new blocks and vote on block validity. A block is finalized based on the consensus of validator votes.

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

Consensus
* Benefits of Proof of Stake:
◦ …: PoS consumes significantly less power than PoW as it eliminates the need for energy-intensive computational tasks.
◦ …: PoS offers better security guarantees over PoW, particularly against 51% attacks, as it would require a majority of ETH to be staked by a malicious actor.
◦ …: Unlike PoW, which requires substantial computational power, PoS allows more users to participate in the consensus process by staking Ether, democratizing the validation process.
* Rewards and penalties: Validators receive … Conversely, penalties, known as slashing, are imposed for behaviors that undermine network security, such as …

A

Energy efficiency; Increased security; Lower barrier to entry

transaction fees and block rewards for their efforts.

going offline (inactivity leak) or attempting to corrupt the consensus.

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