Unit 6: Ethereum, Web3 and Decentralized Applications - Practice Quiz

CSE436 — Blockchain 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is Ethereum primarily designed to support?

Ethereum—an overview Easy
A. Physical currency printing
B. Traditional email services
C. Centralized database hosting
D. Programmable smart contracts

2 What is the native cryptocurrency of Ethereum?

Ethereum—an overview Easy
A. Tether
B. Solana
C. Ether
D. Bitcoin

3 What type of network is the Ethereum mainnet?

The Ethereum network Easy
A. A local offline network
B. A private banking network
C. A centralized cloud network operated by one organization
D. A public blockchain network

4 Which component allows a user to manage Ethereum accounts and sign transactions?

Components of the Ethereum ecosystem Easy
A. Wallet
B. Compiler
C. Validator
D. Block

5 What is the main purpose of the Ethereum Virtual Machine (EVM)?

Ethereum Virtual Machine (EVM) Easy
A. Designing website images
B. Storing physical documents
C. Executing smart contract code
D. Replacing all blockchain nodes with a single central server

6 What does gas measure in an Ethereum transaction?

Ethereum Virtual Machine (EVM) Easy
A. Network distance
B. Block storage age
C. Computational work
D. Wallet balance

7 What is a smart contract?

Smart contracts Easy
A. A centralized application maintained only by a bank
B. A password used to unlock a node
C. A paper agreement scanned into a wallet
D. A program executed on a blockchain

8 What usually triggers the execution of an Ethereum smart contract function?

Smart contracts Easy
A. A computer shutdown
B. A printed legal notice
C. A transaction or message call
D. A request sent only to a centralized database administrator

9 Which tool provides a browser-based environment for writing and testing Solidity contracts?

Ethereum development environment Easy
A. MetaMask
B. Ethereum Name Service
C. Etherscan
D. Remix IDE

10 What does an Ethereum block contain?

Blocks and blockchain Easy
A. A collection of transactions
B. A single wallet password
C. A complete copy of every website hosted on the internet
D. A list of email accounts

11 Which item must a wallet owner keep secret?

Wallets and client software Easy
A. Transaction hash
B. Private key
C. Block number
D. Public address

12 Which of the following is an Ethereum execution client?

Wallets and client software Easy
A. Geth
B. OpenZeppelin
C. Ether
D. Solidity

13 What is a basic function of an Ethereum node?

Nodes and miners Easy
A. Creating internet domain names
B. Storing all transactions in one privately controlled spreadsheet
C. Printing cryptocurrency coins
D. Verifying blockchain data

14 Who proposes blocks on Ethereum mainnet after its transition to proof of stake?

Nodes and miners Easy
A. Validators
B. Wallet users
C. Contract compilers
D. Miners

15 Which API style is commonly used to communicate with an Ethereum node?

APIs Easy
A. Bluetooth
B. JSON-RPC
C. A proprietary interface that can be accessed only by cryptocurrency exchanges
D. SMTP

16 What is a decentralized application (DApp)?

Tools and DApps Easy
A. An application that uses smart contracts
B. A program used only to create paper records
C. An application stored only on one laptop
D. A website whose entire operation must be controlled by one central administrator

17 What does the Ethereum Name Service (ENS) provide?

Supporting protocols Easy
A. Free Ether for new users
B. Automatic smart contract auditing
C. A centralized password database maintained by Ethereum validators
D. Human-readable names for addresses

18 Which programming language is widely used to write Ethereum smart contracts?

Programming languages Easy
A. HTML
B. SQL
C. Solidity
D. Bash

19 What is created when a smart contract is successfully deployed to Ethereum?

Contract deployment Easy
A. A permanent administrator account that can freely modify every Ethereum block
B. A new private network
C. A physical security token
D. A contract address

20 Which Geth command is commonly used to connect a console to a running Geth node?

Exploring Web3 with Geth Easy
A. geth attach
B. geth compile
C. geth wallet
D. geth replace-blockchain-with-database

21 A user wants an Ethereum account that can initiate transactions directly using a private key. Which type of account should be used?

Ethereum—an overview Medium
A. A smart contract account
B. A validator deposit contract
C. An externally owned account
D. A decentralized storage account

22 A signed transaction intended for one Ethereum-compatible network should not be replayed on another network. Which transaction field primarily provides this protection?

The Ethereum network Medium
A. The network chain ID
B. The contract bytecode
C. The recipient balance
D. The block gas limit

23 A frontend application has a deployed contract address but cannot correctly encode calls to its functions. Which additional artifact does it most directly need?

Components of the Ethereum ecosystem Medium
A. A complete archive containing every historical Ethereum state and transaction receipt
B. The block header
C. The validator key
D. The contract ABI

24 A contract function runs out of gas after changing a state variable but before execution completes. What is the expected result?

Ethereum Virtual Machine (EVM) Medium
A. The state change remains, and all unused gas is returned
B. The state change is reverted, but the spent gas is not refunded
C. The state change is reverted, and the sender receives the full gas fee
D. The state change remains, but the transaction is removed from the block

25 A withdrawal function sends Ether to a user before reducing the user's recorded balance. Which vulnerability is most likely?

Smart contracts Medium
A. Block size overflow
B. Replay across chains
C. Reentrancy
D. Hash collision

26 A developer needs fast, repeatable contract tests with controllable accounts and no real transaction fees. Which environment is most suitable?

Ethereum development environment Medium
A. The Ethereum mainnet
B. A local development blockchain
C. A production validator configured to synchronize and retain the complete history of mainnet
D. A public block explorer

27 A DApp waits for several additional blocks after a transaction is included before treating it as reliable. What risk is this practice mainly intended to reduce?

Blocks and blockchain Medium
A. Private-key generation failure
B. Contract compilation failure
C. Temporary chain reorganization
D. ABI encoding mismatch

28 A DApp asks a browser wallet to send a transaction. Which operation should normally remain inside the wallet?

Wallets and client software Medium
A. Compiling the contract source code
B. Downloading every historical block
C. Signing with the user's private key
D. Calculating the latest block number

29 On Ethereum's current proof-of-stake network, which participant is responsible for proposing blocks in assigned slots?

Nodes and miners Medium
A. A selected validator
B. A contract compiler
C. An RPC-only wallet
D. A proof-of-work miner

30 A DApp needs to read a contract's current value without creating a transaction or changing blockchain state. Which JSON-RPC method is most appropriate?

APIs Medium
A. eth_sendRawTransaction
B. eth_call
C. eth_estimateGas
D. eth_getTransactionReceipt

31 A DApp dashboard must update when a contract emits a Transfer event. Which data source should the frontend monitor?

Tools and DApps Medium
A. Compiler warnings
B. Account private keys
C. Validator withdrawal credentials
D. Contract event logs

32 A DApp must distribute a large document without storing the entire file in expensive contract storage. Which approach is most appropriate?

Supporting protocols Medium
A. Store the file in every transaction's input and repeatedly submit it
B. Place the complete file inside each block header
C. Convert the file into a wallet seed phrase
D. Store the file in IPFS and keep its content identifier on-chain

33 After compiling a Solidity contract, which pair of outputs is most useful for deployment and frontend interaction?

Programming languages Medium
A. EVM bytecode and ABI
B. Block hash and state root
C. Private key and mnemonic
D. Nonce and gas refund

34 A contract constructor fails a require condition during deployment. What should the developer expect?

Contract deployment Medium
A. Deployment pauses until another transaction completes
B. Deployment creates a contract whose constructor is automatically executed again in the next block
C. Deployment succeeds with an empty contract balance
D. Deployment reverts and no usable contract is created

35 After attaching to a running Geth JavaScript console, which expression can be used to inspect the latest block number known to the node?

Exploring Web3 with Geth Medium
A. eth.blockNumber
B. eth.accounts.length
C. admin.nodeInfo.id
D. personal.listWallets

36 A script is preparing several transactions from the same account. Which Web3 query best helps choose a nonce that includes already pending transactions?

Exploring Web3 with Geth Medium
A. web3.eth.getBalance(address, "latest")
B. web3.eth.getTransactionCount(address, "pending")
C. web3.eth.getBlockNumber()
D. web3.eth.getCode(address, "earliest")

37 A client receives a transaction hash immediately after broadcasting a transaction. What should it check to confirm that the transaction was included and whether execution succeeded?

Blocks and blockchain Medium
A. The sender's public key only
B. The peer discovery table
C. The transaction receipt and its status
D. The compiler's source map

38 A Solidity function needs a temporary array only while the current external call is executing. Which EVM data area is generally appropriate?

Ethereum Virtual Machine (EVM) Medium
A. Event logs
B. Storage
C. Memory
D. Contract bytecode

39 A contract must settle an insurance claim using rainfall measured in the physical world. Why is an oracle needed?

Smart contracts Medium
A. The contract cannot store numeric values
B. The EVM cannot perform conditional statements
C. The validator must manually rewrite the deployed bytecode whenever new weather measurements become available
D. The EVM cannot directly retrieve external real-world data

40 An offline wallet has already signed and serialized an Ethereum transaction. Which JSON-RPC method should be used to broadcast it?

APIs Medium
A. eth_getStorageAt
B. eth_sendRawTransaction
C. eth_call
D. eth_getCode

41 An EOA has confirmed nonce . It broadcasts two otherwise valid transactions: transaction with nonce reaches a node before transaction with nonce . What is the most accurate expected behavior?

Ethereum—an overview Hard
A. The node includes both transactions in arrival order because nonces only prevent cross-chain replay.
B. The node rewrites the nonce of to and treats as a replacement.
C. The node queues until becomes executable, after which both may execute in nonce order.
D. The node executes immediately and permanently rejects as stale.

42 Two EVM-compatible networks accidentally use the same EIP-155 chain ID. An account has matching nonce and sufficient funds on both networks. Which consequence is most relevant?

The Ethereum network Hard
A. Their validators will automatically merge both networks into a single canonical chain.
B. A signed transaction may be replayable across both networks if its other validity conditions hold.
C. Their execution clients will reject all transactions because the network IDs differ.
D. A transaction on either network will automatically update the account nonce on the other.

43 After Ethereum's transition to proof of stake, a non-validating full node runs only an execution client and has no consensus client connected through the Engine API. What critical capability is missing?

Components of the Ethereum ecosystem Hard
A. It cannot verify account signatures because signature recovery belongs to consensus clients.
B. It cannot execute EVM bytecode contained in already downloaded transaction payloads.
C. It cannot store contract state because state tries are maintained only by validator clients.
D. It cannot independently follow the proof-of-stake canonical head and finalized checkpoints.

44 A contract copies a large slice of transaction calldata into previously unused memory and then hashes it. Which statement best describes the EVM effects?

Ethereum Virtual Machine (EVM) Hard
A. The copied bytes enter persistent storage and remain available in later transactions.
B. Calldata remains immutable, while copying and nonlinear memory expansion both contribute gas costs.
C. Calldata becomes mutable after copying, while memory expansion has a constant gas cost.
D. Hashing reads calldata directly, so copying into memory cannot affect total gas consumption.

45 Contract changes its own storage and then makes a low-level call to contract . Contract changes storage but executes REVERT; checks the returned status and continues successfully. What is the resulting state?

Ethereum Virtual Machine (EVM) Hard
A. Both contracts retain their changes because a low-level call isolates all reverts.
B. retains its changes, loses its changes, and unused call gas is returned to .
C. loses its changes, retains its changes, and the entire gas allocation is consumed.
D. Both contracts lose their changes because any nested REVERT must revert the outer transaction.

46 A withdrawal function reads balances[msg.sender], sends Ether using call, and only afterward sets the balance to zero. Which modification most directly addresses the reentrancy vulnerability without relying solely on gas stipends?

Smart contracts Hard
A. Emit the withdrawal event before the call so reentrant invocations can be detected on-chain.
B. Replace call with delegatecall so that the recipient executes in the sender's context.
C. Check tx.origin before sending and retain the existing order of state updates.
D. Set the balance to zero before the external call and optionally add a reentrancy guard.

47 An upgradeable proxy uses DELEGATECALL. A new implementation changes the order and types of state variables, after which balances appear corrupted. Which EVM property explains this result?

Smart contracts Hard
A. DELEGATECALL resets the proxy's storage root whenever implementation bytecode changes.
B. DELEGATECALL copies implementation storage into proxy storage before each external invocation.
C. DELEGATECALL uses the implementation's storage but replaces msg.sender with the proxy address.
D. DELEGATECALL runs implementation code against proxy storage, so incompatible layouts reinterpret existing slots.

48 A test suite forks Ethereum at a fixed historical block and all integration tests pass. The deployed DApp later fails because an oracle's current state differs from its state at the fork block. What conclusion is justified?

Ethereum development environment Hard
A. Historical forks automatically replay pending transactions and future oracle updates.
B. Fork-based testing proves compatibility with all states descended from the selected block.
C. The failure demonstrates that the fork node used a different EVM instruction set from mainnet.
D. A pinned fork reproduces historical state, not every later state transition or external dependency condition.

49 Under EIP-1559, suppose a block uses exactly twice its gas target, which is also the protocol's maximum block gas usage. Ignoring integer rounding, how does the next block's base fee change?

Blocks and blockchain Hard
A. It increases by because gas usage is twice the target.
B. It increases by because the per-block adjustment is bounded.
C. It remains unchanged because the block did not exceed its maximum gas limit.
D. It increases by because only gas above the target affects the fee.

50 A DApp observes a successful receipt and immediately treats its event as irreversible. A short chain reorganization then removes the containing block. Which interpretation is correct?

Blocks and blockchain Hard
A. The transaction must remain final, although its event may move to a different log index.
B. The receipt belonged to a former canonical branch and must be rechecked on the new chain.
C. The receipt remains canonical because successful EVM execution cannot be reorganized.
D. The transaction is automatically replayed with the same block hash on the replacement branch.

51 A user broadcasts two EIP-1559 transactions from one account with the same nonce but different recipients. The second satisfies the client's replacement-fee rules. What outcome should the wallet expect?

Wallets and client software Hard
A. Both transactions can execute because their recipients and calldata differ.
B. At most one can execute; the accepted replacement competes for that nonce and supersedes the other.
C. The transaction with the lower value executes first, and the other receives a new nonce.
D. Validators combine both transactions into one operation using the larger priority fee.

52 A hardware wallet is used with an untrusted remote Ethereum node. Which workflow best preserves the wallet's key-isolation guarantee?

Wallets and client software Hard
A. Ask the node to sign the transaction and verify the resulting transaction hash on the device.
B. Unlock the account permanently on the remote node but require a password for each RPC request.
C. Send the private key to the node over TLS and ask the node to erase it after signing.
D. Construct and sign locally, verify transaction fields on the device, and submit only the raw signed transaction.

53 Which description accurately reflects block production on post-merge Ethereum?

Nodes and miners Hard
A. Execution-layer miners select the canonical chain, while validators only calculate transaction gas.
B. A selected validator proposes a block, the execution client builds or validates its payload, and attesters vote.
C. Proof-of-work miners construct execution payloads, while validators merely finalize their block rewards.
D. Consensus clients execute every opcode, while execution clients only broadcast validator signatures.

54 A write operation simulated with eth_call at the latest block returns success, but the same signed transaction later reverts after inclusion. Which explanation is most accurate?

APIs Hard
A. eth_call ignores EVM reverts and always reports successful return data.
B. eth_call executes under consensus finality, whereas transactions execute without consensus rules.
C. The simulation used a particular state and context; intervening state changes can invalidate its assumptions.
D. eth_call permanently reserves the simulated nonce but not the simulated contract state.

55 Solidity emits event Registered(string indexed name, uint256 value). A client receives only the log topics and data. What can it determine about name without an external candidate set?

APIs Hard
A. It can recover the string by removing the event signature bytes from the first topic.
B. It can ABI-decode the original string directly from the indexed topic.
C. It can obtain only the string's indexed hash and generally cannot recover the original value.
D. It can read the string from log data because all event arguments are duplicated there.

56 A DApp indexes logs and must remain correct across short reorganizations. Which design is most robust?

Tools and DApps Hard
A. Store block hashes with logs, delay final decisions, and reconcile records when the canonical chain changes.
B. Treat every websocket log as final because subscriptions are emitted only after consensus finalization.
C. Use transaction hashes alone because a transaction always appears in the same block after reorganization.
D. Index only log positions because block number and log index remain invariant across competing branches.

57 A smart contract stores an IPFS CID for a DApp asset. Months later, no IPFS node retains the corresponding content. Which statement is correct?

Supporting protocols Hard
A. Ethereum validators reconstruct the missing file from the CID during contract execution.
B. The CID changes automatically to reference the nearest available replica.
C. The contract can derive the original file from the CID because the hash is reversible.
D. The CID still identifies the content, but content addressing alone does not guarantee availability.

58 A Solidity contract authorizes operations using keccak256(abi.encodePacked(a, b)), where both a and b are user-controlled strings. What is the main risk and appropriate correction?

Programming languages Hard
A. Different string pairs can have identical packed bytes; use abi.encode or unambiguous delimiters.
B. The hash is limited to 160 bits; cast it to bytes32 before checking authorization.
C. String hashing exposes private data; encrypt both values and continue using packed encoding.
D. Packed encoding adds random padding; use inline assembly to remove the padding before hashing.

59 A factory deploys contracts with CREATE2. Which expression determines the deployed address, and what implication follows for constructor arguments?

Contract deployment Hard
A. It uses the transaction origin and storage root; proxy initialization determines the final address.
B. It hashes the deployer's nonce and runtime code; constructor arguments never influence the result.
C. It uses the sender, salt, and hash of initialization code; encoded constructor arguments affect the address.
D. It hashes the sender and current block hash; redeployment is possible after every new block.

60 Two independent services connected to the same Geth node each query eth_getTransactionCount(address, "pending") simultaneously and receive nonce . Both then sign different transactions with nonce . What is the best remedy?

Exploring Web3 with Geth Hard
A. Increase both gas limits because nonce collisions occur only when intrinsic gas is insufficient.
B. Query the latest nonce instead because it atomically reserves the next nonce for the requesting service.
C. Coordinate nonce allocation with a shared manager and reconcile it against pending and confirmed transactions.
D. Use different chain IDs for the services so both transactions can consume nonce independently.