CBCP Ethereum 3 — Questions and Answers
Question 1: What is the role of the 'receipts trie' in an Ethereum block?
- It stores the outcome of each transaction including logs and gas used, enabling light client verification (Correct answer)
- It records all ETH transfers between EOAs
- It indexes contract bytecode for fast lookup
- It maps transaction hashes to block numbers
Correct answer: It stores the outcome of each transaction including logs and gas used, enabling light client verification
The receipts trie root is committed in the block header, letting clients verify transaction outcomes without replaying them.
Question 2: Which Solidity visibility modifier makes a function only callable from within the contract or derived contracts?
- internal (Correct answer)
- private
- external
- protected
Correct answer: internal
The 'internal' modifier restricts access to the contract itself and any contract that inherits from it.
Question 3: What attack vector does the 'checks-effects-interactions' pattern in Solidity primarily defend against?
- Reentrancy attacks (Correct answer)
- Integer overflow
- Front-running
- Signature replay
Correct answer: Reentrancy attacks
By updating state before making external calls, the pattern prevents a malicious contract from re-entering a function in an inconsistent state.
Question 4: In Ethereum's EIP-4844 (Proto-Danksharding), what new transaction type was introduced?
- Blob-carrying transactions (Correct answer)
- Access-list transactions
- Legacy type-0 transactions
- Multicall transactions
Correct answer: Blob-carrying transactions
EIP-4844 introduced type-3 blob-carrying transactions that attach temporary data blobs to reduce L2 data availability costs.
Question 5: What is 'gas stipend' in the context of Ethereum's transfer() and send() functions?
- A fixed 2300 gas forwarded to the recipient to prevent reentrancy while allowing basic logging (Correct answer)
- The maximum gas a transaction can consume
- The gas refund given after SELFDESTRUCT
- The gas allocated to precompiled contract calls
Correct answer: A fixed 2300 gas forwarded to the recipient to prevent reentrancy while allowing basic logging
transfer() and send() forward exactly 2300 gas, enough for a log event but insufficient to execute complex code or re-enter.
Question 6: What does EIP-2930 (Optional Access Lists) accomplish?
- Allows transactions to pre-declare storage keys and addresses they will access, reducing gas costs for those slots (Correct answer)
- Enables batch execution of multiple transactions in one block
- Introduces typed transaction envelopes
- Adds a new precompile for elliptic curve operations
Correct answer: Allows transactions to pre-declare storage keys and addresses they will access, reducing gas costs for those slots
EIP-2930 lets transactions specify an access list upfront, charging lower warm-access gas for those slots during execution.
Question 7: In Ethereum's beacon chain, what is an 'attestation'?
- A validator's signed vote confirming a specific block as the head of the chain and a checkpoint as finalized (Correct answer)
- A proof of stake deposit confirmation
- A slashing report submitted by a whistleblower validator
- A cryptographic proof of the validator's identity
Correct answer: A validator's signed vote confirming a specific block as the head of the chain and a checkpoint as finalized
Attestations are validators' LMD-GHOST and Casper FFG votes aggregated per slot to determine the canonical chain.
What is the role of the 'receipts trie' in an Ethereum block?