L6 - Ethereum Basics Flashcards

1
Q

Who invented Ethereum?

A

Vitalik Buterin

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

Since when does Ethereum exist?

A

2014

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

What is the yellow paper?

A

technical specifications of Ethereum

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

How many more Ethereum transactions are there per day compared to Bitcoin?

A

6x more

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

How many wallets are there in Ethereum and in Bitcoin with at least 1 incoming or outgoing transaction?

A

Ethereum 188m

Bitcoin 81m

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

Is the world computer owned by a single entity?

A

No

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

q

A

q

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

What is a virtual machine?

A

VMs are mechanisms for creating instances of software that imitate real machines.

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

What is stored on the EVM?

A

All Ethereum accounts and smart contracts are stored on this virtual machine.

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

How can an EVM be specified?

A

By the tuple:

block_state, transaction, message, code, memory, stack, pc, gas

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

What is block_state?

A

block_state represents the global state of the whole blockchain including all accounts (controlled by private key), smart contracts and their storage

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

Does Ethereum use an account-based ledger?

A

Yes. Each distinct address represents a separate unique account

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

Two types of Ethereum accounts and what they are controlled by.

A
  1. Accounts that are controlled by private keys and owned externally
  2. Smart contract accounts which are controlled by their code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How are the accounts called that are controlled by a private key?

A

Externally Owned Accounts (EOA)

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

What is always the origin of a transaction?

A

An EOA

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

properties of EOA

A
  • do not have any code stored on the blockchain.
  • the default wallet of a user. It can :
  • sign transactions
  • issue smart contract
  • function calls
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are the properties of smart contracts?

A
  • treated as account entities with their own, unique address
  • can send messages to other accounts, both externally controlled and smart contracts
  • can’t issue a transaction themselves
  • they have persistent internal storage for reading and writing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

4-tuple account properties

A

(nonce, balance, contract_code, storage)

nonce = an increasing number that is attached to any transaction to prevent replay attacks
balance = the current account balance of the account in Ether
contract_code = bytecode representation of the account. If no contract code is present, then the account is externally controlled (EOA).
storage =  only contract accounts can have their own storage
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is a transaction in Ethereum?

A

signed data package that is always sent by a EOA

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

What does a transaction contain?

A
  • recipient of the transaction
  • signature identifying the sender
  • amount of ether to be transferred
  • optional data field - used for function call arguments
  • GASLIMIT
  • GASPRICE
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the GASLIMT

A

representing the maximum amount of gas you are willing to consume on a transaction

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

GASPRICE

A

represents the fee the sender pays per computational step

23
Q

Two types of transactions

A

From EOA to EOA & from EOA to smart contract

24
Q

What is the difference between a message and a transaction?

A

Messages are only sent by contracts and exist only virtually. i.e. they are not minted into a block like transactions are.

Whenever a contract calls a method on another contract, a virtual message is sent.

25
Q

What does a message contain?

A
  • sender of the message (implicit)
  • recipient of the message
  • amount of ether to transfer
  • optional data field
  • GASLIMIT
26
Q

What is send when an EOA calls a method on a contract?

A

A transaction is sent.

27
Q

How does bytecode look like? (code representing the contract in EVM)

A

For the EVM a smart contract is a sequence of opcodes similar to assembly code

28
Q

what is memory in EVM like?

A

an infinitely expandable byte array that is non-persistent and used as temporal storage during execution

29
Q

what is stack in EVM like?

A

The stack is also used as a fast, non-persistent buffer to which 32 byte values can be pushed and popped during execution.

30
Q

what is pc in EVM like?

A

the program counter is always initialized with 0 and points to the position of the current opcode instruction.

31
Q

how to free up space from the blockchain?

A

By using the opcode selfdestruct (address). Negative gas is used because it frees up space from the blockchain.

32
Q

Is the size of a block limited in Ethereum?

A

No. Instead the miner sets the gaslimit that defines how much computational resources he is willing to provide for each block.

33
Q

According to the new EIP-1559 Transaction how is the gas price calculated?

A

It is now divided into two parts:

  • base fee: calculated by the network based on the demand level (burnt)
  • priority fee (tip): determined by the transaction sender (received by the miner)

transaction fee = gas * (basefee + tip)

34
Q

How high is the transaction fee round about in %?

A

1%

35
Q

What does ASIC resistancy mean?

A

The mining algorithm the coin is using does not have an ASIC solution that is superior to the traditional CPU and graphics card solution for mining.

36
Q

How is the PoW algorithm called in Ethereum?

A

Ethash

37
Q

How high is the mining reward in Ethereum?

A

2 ether (ETH). The reward is a digital token called ether. The block reward is the transaction fee + mining reward.

38
Q

When is the mining difficulty adjusted?

A

After each block

39
Q

Are blocks orphaned in Ethereum?

A

No. Correctly mined blocks that are outpaced by a block of another miner are not orphaned like in Bitcoin but added as uncle blocks.

  • The idea behind this is to counter mining centralization because miners who mine a correct block are still rewarded
  • transactions in the uncle block are invalid
40
Q

Average block time in Ethereum?

A

12-14 seconds

41
Q

Does each smart contract have its own address?

A

Yes. It is an account holding object.

42
Q

What information is publicly accessible from a smart contract?

A
  • Address of the smart contract
  • OPCODE
  • Number of public functions and their hash signature
  • whole transaction history is accessible (function calls + actual arguments)
  • cannot be patched once deployed
43
Q

Can smart contracts access data from outside the blockchain themselves?

A

No. This is on purpose to prevent non-deterministic behavior.

44
Q

How can smart contracts use external data?

A

By using oracles.

45
Q

What is an oracle?

A

Third-party service that verifies data from web services and writes data via a special smart contract to the blockchain. Other smart contracts can now call the oracle to get the data.

46
Q

Is the oracle contract on chain?

A

Yes. The oracle service which is connected to an external web API however is off-chain. The oracle service writes data to the oracle contract.

47
Q

4 use cases for smart contracts

A
  • Fungible token systems
  • non-fungible tokens (NFTs)
  • Play-to-Earn Games
  • Decentralized Autonomous Organization (DAO)
48
Q

What is a DAO?

A
  • non-hierarchical business models that are collectively owned by a group of members. Like a generalization of multi-sig wallets.
49
Q

Full node

A

Full nodes are the foundation of the Ethereum network. Each full node holds a copy of the entire blockchain and syncs with other nodes. Transactions must be sent to a full node which distributes it among the network participants.

50
Q

Light node

A

A light node is a client connected to a full node for the sake of not having to sync and download the entire blockchain. For most private people, light nodes are the most comfortable way to interact with the blockchain.

51
Q

Solo miner

A

Entity that tries to mine a block on its own. At the current hash rate it is practically impossible.

52
Q

Do all nodes use the same code base in Ethereum?

A

No, since the specification for an Ethereum node is open source.

53
Q

What are the two major Ethereum implementations?

A

Geth:
- most commonly used implementation. Implemented in Go
OpenEthereum:
- browser based

54
Q

How does peer discovery work in Geth and OpenEthereum?

A
  • They both have a maintained list of default peers hardcoded into their source code. Otherwise, it would be possible that no nodes are found.