1/300
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What does a hash function do?
It turns any input into a fixed-length output called a hash.
What is the input to a hash function?
Any data like text, a file, transaction data, or a block header.
What is the output of a hash function?
A fixed-length hash.
What happens to a hash output if the input changes slightly?
The whole output changes completely and unpredictably. This is the avalanche effect.
Can you find a hash's input from its output?
No. Hashing only goes one way, so you would have to brute force it.
Why are hashes important for blockchain?
They link blocks together, summarize transaction data, expose tampering, and power proof of work.
What is a public key?
A key you can share. It is used to encrypt messages or verify signatures.
What is a private key?
A secret key you keep. It is used to decrypt messages or sign things.
What are RSA keys made of?
Two large prime numbers, p and q. The public key uses N which equals p times q.
Which key encrypts an RSA message?
The recipient's public key.
Which key decrypts an RSA message?
The recipient's private key.
Why is RSA secure?
Because factoring N back into p and q is really hard. Factoring is a trapdoor function.
How do you create a digital signature?
You hash the message, then sign that hash with your private key.
Which key creates a digital signature?
The sender's private key.
Which key verifies a digital signature?
The sender's public key.
What does a valid signature prove about the sender?
It proves the real key holder signed it. This is authenticity.
What does a valid signature prove about the message?
It proves nobody changed the message after signing. This is integrity.
What is elliptic curve cryptography (ECC)?
A type of asymmetric crypto that uses elliptic curve math to make key pairs.
What do ECC and RSA have in common?
Both use public and private key pairs and both rely on trapdoor math.
What does ECC do better than RSA?
It gives the same security with much smaller keys, so it is more efficient.
What is in a block header?
The previous block hash, the nonce, a block number or timestamp, and the Merkle root.
What is in block data?
The actual transactions.
What is a transaction?
A signed instruction that changes the state, like sending coins or calling a contract.
How do you confirm a transaction's sender?
You verify its signature using the sender's public key.
How are Merkle trees built?
You hash each transaction, pair them up and hash again, and repeat until one root is left.
What is the Merkle root?
The single hash at the top that summarizes all the transaction data.
Why are Merkle trees useful for blockchains?
They let you prove a transaction was included without downloading every transaction.
How do you prove a tx is in a Merkle tree?
You give the transaction hash plus the sibling hashes needed to rebuild the root.
What happens to the Merkle root if a leaf changes?
The change ripples up the tree and the root changes.
What constraint is there on a new block's hash?
It has to be below the target difficulty.
What is that constraint called?
The target difficulty.
How does a miner change a block's hash?
They change the nonce and hash the block again.
Why is finding a valid block hash hard?
Hash outputs are unpredictable, so miners just have to keep guessing.
What are miners?
Nodes that build candidate blocks and search for valid proof of work.
What does mining a block mean?
Finding valid proof of work for that block.
Why are miners incentivized to mine?
They earn the block reward plus transaction fees.
How long does a Bitcoin block take?
About 10 minutes on average.
How does block time relate to difficulty?
Difficulty adjusts every 2016 blocks to keep blocks around 10 minutes apart.
What is Proof of Work?
A consensus method where miners prove they spent computation to find a valid hash.
What is the "work" being proven?
Hashing the header over and over with new nonces until one meets the target.
What happens to later blocks if an old block's data changes?
That block's hash changes, which breaks the link to every block after it.
Why is changing old data hard?
You would have to redo the proof of work for that block and all the ones after.
What is a Sybil attack?
When one attacker makes many fake identities to gain influence.
Why does Proof of Work defend against Sybil attacks?
Influence comes from hash power, not from how many identities you have.
What are the parts of a transaction?
Sender, recipient, amount or data, nonce, fee, and signature.
Where does a transaction go after submission?
Into the mempool.
How does a transaction get into a block?
A miner or validator picks it from the mempool.
How do nodes communicate blocks?
They gossip them across the peer-to-peer network.
Which chain do nodes consider correct?
The canonical chain, which is the longest or heaviest valid chain with the most proof of work.
How does a node endorse the canonical chain?
By mining or building on top of it.
Why do nodes endorse the canonical chain?
Because rewards on losing forks become worthless.
What happens with two chains of equal length?
They split for a bit until one gets extended and becomes canonical.
Why wait 6 blocks for confirmation?
Because finality is probabilistic. More blocks make a reversal far less likely.
What assumptions do we make about Bitcoin nodes?
Some may be malicious or offline, but honest miners are assumed to hold most hash power.
How does a 51% attack work?
With most of the hash power you can build a longer chain faster than everyone else.
What can a 51% attacker do?
Reorder recent transactions, censor them, and double-spend their own coins.
What can't a 51% attacker do?
Steal coins without keys or make invalid transactions count as valid.
What are the three layers of blockchain?
Consensus, execution, and data availability.
What is Bitcoin's consensus layer?
Its proof of work Nakamoto consensus.
What is Bitcoin's execution layer?
Transaction validation and UTXO state updates.
What is Bitcoin's data layer?
The block and transaction data that nodes store and share.
What is a distributed system?
A group of independent computers working together toward one goal.
What is state machine replication?
Every node applies the same ordered transactions to reach the same state.
How does state machine replication relate to blockchains?
A blockchain is basically a replicated state machine.
What is a Byzantine environment?
One where nodes can fail in any way, including acting maliciously.
What does it mean for a node to fail?
It can crash, go offline, delay or ignore messages, or lie.
Can the system work with faulty machines?
Yes, as long as the faults stay under a threshold, usually under one third.
What is the CAP theorem?
You cannot fully guarantee consistency, availability, and partition tolerance all at once.
What is consistency in CAP?
Every read gives you the most recent write or an error.
What is availability in CAP?
Every request gets a real, non-error response.
What is partition tolerance in CAP?
The system keeps running even when messages are dropped or delayed.
Why can't you have all three CAP properties?
During a partition you have to drop one. You either stay available and risk stale data, or stay consistent and reject requests.
What is liveness?
The system keeps making progress and keeps producing blocks.
What is safety?
Honest nodes never finalize two conflicting histories.
Why are liveness and safety incompatible in async systems?
You cannot tell a crashed node from a slow one, so you cannot promise both. This is the FLP result.
What is a liveness-focused system?
One that keeps producing blocks even when finality is not certain, like Proof of Work.
What is a safety-focused system?
One that halts instead of risking conflicting finality, like BFT chains.
What is fast finality?
Once a block is committed it cannot be reverted unless many validators get slashed.
Which systems have fast finality?
Proof of Stake BFT chains like Tendermint.
What is probabilistic finality?
A block gets safer the more blocks stack on top of it.
Which systems have probabilistic finality?
Proof of Work chains like Bitcoin.
What is the Byzantine Generals problem?
Getting everyone to agree on one action even when some players are malicious.
What happens if 1/3 of PBFT participants are faulty?
The guarantees break. It needs fewer than one third faulty to work.
Three generals, one malicious (not you), what's the problem?
The traitor can tell each honest general something different, so you cannot guarantee agreement.
What's the difference between Proof of Stake and Proof of Work?
Proof of Work uses mining and compute. Proof of Stake uses locked-up stake and incentives.
What happens to malicious validators in Proof of Stake?
They get slashed and lose some or all of their stake.
What are the four steps of Tendermint?
Propose, prevote, precommit, and commit.
What happens in Tendermint propose?
The chosen proposer offers a block for that round.
What happens in Tendermint prevote?
Validators vote if they saw and accept the block.
What happens in Tendermint precommit?
Once over two thirds prevote, validators precommit.
What happens in Tendermint commit?
Once over two thirds precommit, the block is finalized.
What happens if a validator goes offline in Tendermint?
The chain keeps going if over two thirds are still online. That validator just misses rewards.
How many validators offline before Tendermint breaks?
If one third or more of the voting power drops, the chain halts.
In Tendermint, what happens when 1/3 or more of voting power goes offline?
The chain can't reach the 2/3 quorum needed to finalize, so it halts.
What is Solidity?
The language you use to write smart contracts.
What is the EVM?
The runtime that actually executes smart contracts.
How is a smart contract different from a normal code library?
It lives on-chain, is public, is permanent, runs deterministically, and can control assets.
Why can't Solidity have random numbers?
Every node has to compute the same result, so execution must be deterministic.
Why can't Solidity use decimals?
The EVM only does integers, so decimals are faked with scaled integers.
What are other limitations of smart contracts?
They are expensive, public, hard to upgrade, and cannot reach off-chain data on their own.