Ethereum Flashcards
What are Proof-of-work and proof-of-stake
- Not consensus protocols
- They are actually Sybil resistance mechanisms and block author selectors; they are a way to decide who is the author of the latest block.
What is Sybil resistance and sybil attack
Sybil attacks are when one user or group pretends to be many users.
What is Ommer block
- Ommer blocks were valid blocks created by a miner practically at the same time as another miner created the canonical block, which was ultimately determined by which chain was built on top of first.
- Miner of the ommer block was also rewarded (with smaller amount of eth).
Transaction Finality in PoW
- It’s possible that a user could see a successful transaction included in a block, only to see that block promptly orphaned and replaced with a different block (due to temporary forks).
- You must wait for chain to get longer. Cryptocurrency exchanges will wait for up to 50 blocks for a transaction to be treated as “confirmed”
How does PoW work
Miners must find combination and order of transactions, and find some value nonce, that combined calculates hash that satisfy an arbitrary, difficult condition.
Condition example: block must start with 6 zeros.
What is the name of ethereum consensus mechanism
Gasper
What is attestation
PoS
The validator then sends a vote (called an attestation) in favor of that block across the network.
How does PoS work
- In every slot a validator is randomly selected to be the block proposer. They bundle transactions together, execute them and determine a new ‘state’ and send new block.
- In every slot, a committee of validators is randomly chosen, whose votes are used to determine the validity of the block being proposed.
What is PoS chain selection rule
The algorithm that measures the ‘weight’ of the chain.
The weight is the accumulated sum of validator votes, weighted by validator staked-ether balances.
Transaction Finality in PoS
- On proof-of-stake Ethereum, this is managed using “checkpoint” blocks
- Validators vote for pairs of checkpoint epochs that it considers to be valid.
- If a pair of checkpoints attracts votes representing at least two-thirds of the total staked ETH, the checkpoints are upgraded.
- The more recent of the two (target) becomes “justified”. The earlier of the two is already justified because it was the “target” in the previous epoch. Now it is upgraded to “finalized”.
What is the inactivity leak
PoS
The inactivity leak bleeds away the staked ETH from validators voting against the majority, allowing the majority to regain a two-thirds majority and finalize the chain.
What is correlation penalty
PoS
The amount of ETH slashed depends on how many validators are also being slashed at around the same time. This is known as the “correlation penalty”.
What is temporary fork
When two blocks are created at the same time by two different nodes, the respective peers of those diverging nodes will be operating on two different versions of the blockchain.
What is Hard Fork
When community disagrees on blockchain rule, part can use old chain, and part can use new chain (i.e. with new consensus or some security patch).
How much ether is creating with each block (in PoS)
- The total amount issued depends on the number of validators and how much ether they have staked.
About 1/8 of the total issuance goes to the block proposer; the remainder is distributed across the other validators.
How much is Wei in ether
10^-18
How much is Gwei in ether
10^-9
What are bootnodes
- These are well-known, relatively reliable IP addresses that can be used to create a sufficiently large pool of network peer connections.
- Every major Ethereum node software has a hardcoded list of bootnodes.
How is time divided in ethereum (what is block time).
Name of interval and how many seconds.
PoS
In Ethereum, time is divided up into twelve second units called ‘slots’.
Assuming all validators are online and fully functional there will be a block in every slot, meaning the block time is 12s.
1 Epoch = 32 Slots