Ethereum Flashcards
Ethereum protocols are sometimes referred to as
peer-to-contract systems
These are similar to a peer-to-peer systems, but with immutable, persistent programs known as smart contracts taking the place of a peer.
**what determines how much gas a transaction takes? What are typical gas usages for transactions?
.
a simple ETH transaction (to send ETH) takes how many bytes?
~110
an ETH transfer on a rollup takes how many bytes?
~12
What is associated with every operation on the Ethereum blockchain, or to be precise on the Ethereum Virtual Machine (EVM)?
an associated gas cost
adding two numbers costs how much gas?
3 gas
getting the balance of an account costs how much gas?
400
sending a transaction costs how much gas?
21000
at high level what should be known about the gas cost of smart contracts?
Smart contracts usually consist of multiple operations that together can cost even hundreds of thousands of gas.
transaction fee formula
gas cost (for each operation fixed defined amount) * gas price (variable, defined by the auction process)
gwei to ETH
1 bil gwei per ETH
what is the downside of the EVM being a Turing complete machine?
while this is one of the reasons the EVM is so powerful, this makes it vulnerable to the halting problem
the halting problem is what?
is the problem of determining, from a description of an arbitrary computer program and an input, whether the program will finish running, or continue to run forever.
how does ethereum derisk the halting problem? e.g. ensure a user can’t execute a program that never stops?
by introducing a gas cost associated with every operation
what does the EVM do before executing each operation in a transaction?
checks if there is enough gas left for that operation. In case there is not enough gas left, the whole transaction is reverted with “out of gas” exception and all state changes are rolled back. The user would still pay the transaction fee for the amount of work that has been done by the miner even if the transaction fails. This is again to avoid attacks on the network.
what happens if If the transaction consumes less gas than initially anticipated?
the remaining amount of gas is converted to ETH and refunded to the sender.
what does Metamask (and other ETH popular wallets) do in helping you choose gas price?
estimates the necessary gas prices to allow your transaction to be processed at fast, medium, or slow confirmation speed
list the gas costs of three common operations
- 21000: Paid for every transaction
- 68: Paid for every non-zero byte of data or code for a transaction
- 20000: Paid for an SSTORE operation when the storage value is set to non-zero from zero
What is Ethereum’s Proof of Stake algorithm implementation called?
Casper
** explain coinage in PoS
Where the tendency to be elected as the leader with time reduces or the coin which is the validator which has staked tokens the longest time becomes the leader.
Görli
a public ethereum testnet
Erigon
Erigon is an implementation of Ethereum (aka “Ethereum client”), on the efficiency frontier, written in Go.
I think efficient frontier just means somewhat optimized for performance and or lack of heavy RAM/CPU .idk something
In two words ethereum is a:
decentralized computer
High level how to implement ethereum
1) Define a smart contract language. 2) Build a blockchain. 3) Create the network 4) Support accounts and transactions 5) Craft the state manager
Geth
Go Ethereum (or geth) is one of the three original implementations (along with C++ and Python) of the ethereum protocol. It is written in Go, fully open source and licensed under the GNU LGPL v3. Go Ethereum is available either as a standalone client called geth that you can install on pretty much any operating system, or as a library that you can embed in your Go, Android or iOS projects.
When was the ethereum genesis block minted?
July 20, 2015
Two types of ethereum accounts
Externally Owned Accounts (EOAs)
What are EOAs controlled by?
Users with private keys
Contract accounts are owned by?
Smart contracts
What is the result of contract accounts being controlled by private keys?
They cannot initiate transactions