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. Traditional email services
B. Physical currency printing
C. Programmable smart contracts
D. Centralized database hosting

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 centralized cloud network operated by one organization
B. A local offline network
C. A public blockchain network
D. A private banking network

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

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

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

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

6 What does gas measure in an Ethereum transaction?

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

7 What is a smart contract?

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

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

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

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

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

10 What does an Ethereum block contain?

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

11 Which item must a wallet owner keep secret?

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

12 Which of the following is an Ethereum execution client?

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

13 What is a basic function of an Ethereum node?

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

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

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

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

APIs Easy
A. JSON-RPC
B. Bluetooth
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. A website whose entire operation must be controlled by one central administrator
B. A program used only to create paper records
C. An application stored only on one laptop
D. An application that uses smart contracts

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

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

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

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

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

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

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

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

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 decentralized storage account
C. A validator deposit contract
D. An externally owned 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 contract bytecode
B. The block gas limit
C. The network chain ID
D. The recipient balance

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. The block header
B. A complete archive containing every historical Ethereum state and transaction receipt
C. The contract ABI
D. The validator key

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 is reverted, but the spent gas is not refunded
B. The state change remains, but the transaction is removed from the block
C. The state change is reverted, and the sender receives the full gas fee
D. The state change remains, and all unused gas is returned

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. Hash collision
B. Replay across chains
C. Block size overflow
D. Reentrancy

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 production validator configured to synchronize and retain the complete history of mainnet
C. A local development blockchain
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. Contract compilation failure
B. Temporary chain reorganization
C. Private-key generation failure
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. Calculating the latest block number
B. Downloading every historical block
C. Compiling the contract source code
D. Signing with the user's private key

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

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

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_estimateGas
C. eth_getTransactionReceipt
D. eth_call

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. Validator withdrawal credentials
C. Account private keys
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. Place the complete file inside each block header
B. Convert the file into a wallet seed phrase
C. Store the file in every transaction's input and repeatedly submit it
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. Private key and mnemonic
B. Block hash and state root
C. EVM bytecode and ABI
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 reverts and no usable contract is created
B. Deployment pauses until another transaction completes
C. Deployment creates a contract whose constructor is automatically executed again in the next block
D. Deployment succeeds with an empty contract balance

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. admin.nodeInfo.id
B. personal.listWallets
C. eth.accounts.length
D. eth.blockNumber

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.getCode(address, "earliest")
D. web3.eth.getBlockNumber()

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 peer discovery table
B. The sender's public key only
C. The compiler's source map
D. The transaction receipt and its status

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 EVM cannot directly retrieve external real-world data
D. The validator must manually rewrite the deployed bytecode whenever new weather measurements become available

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_sendRawTransaction
B. eth_getStorageAt
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 queues until becomes executable, after which both may execute in nonce order.
B. The node includes both transactions in arrival order because nonces only prevent cross-chain replay.
C. The node executes immediately and permanently rejects as stale.
D. The node rewrites the nonce of to and treats as a replacement.

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. Their execution clients will reject all transactions because the network IDs differ.
C. A transaction on either network will automatically update the account nonce on the other.
D. A signed transaction may be replayable across both networks if its other validity conditions hold.

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 independently follow the proof-of-stake canonical head and finalized checkpoints.
B. It cannot verify account signatures because signature recovery belongs to consensus clients.
C. It cannot execute EVM bytecode contained in already downloaded transaction payloads.
D. It cannot store contract state because state tries are maintained only by validator clients.

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. Calldata remains immutable, while copying and nonlinear memory expansion both contribute gas costs.
B. Calldata becomes mutable after copying, while memory expansion has a constant gas cost.
C. Hashing reads calldata directly, so copying into memory cannot affect total gas consumption.
D. The copied bytes enter persistent storage and remain available in later transactions.

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. Replace call with delegatecall so that the recipient executes in the sender's context.
B. Emit the withdrawal event before the call so reentrant invocations can be detected on-chain.
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 runs implementation code against proxy storage, so incompatible layouts reinterpret existing slots.
C. DELEGATECALL copies implementation storage into proxy storage before each external invocation.
D. DELEGATECALL uses the implementation's storage but replaces msg.sender with the proxy address.

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

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 the per-block adjustment is bounded.
B. It remains unchanged because the block did not exceed its maximum gas limit.
C. It increases by because gas usage is twice the target.
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 receipt belonged to a former canonical branch and must be rechecked on the new chain.
B. The receipt remains canonical because successful EVM execution cannot be reorganized.
C. The transaction must remain final, although its event may move to a different log index.
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. The transaction with the lower value executes first, and the other receives a new nonce.
B. Both transactions can execute because their recipients and calldata differ.
C. Validators combine both transactions into one operation using the larger priority fee.
D. At most one can execute; the accepted replacement competes for that nonce and supersedes the other.

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. Send the private key to the node over TLS and ask the node to erase it after signing.
B. Construct and sign locally, verify transaction fields on the device, and submit only the raw signed transaction.
C. Unlock the account permanently on the remote node but require a password for each RPC request.
D. Ask the node to sign the transaction and verify the resulting transaction hash on the device.

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

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

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

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 obtain only the string's indexed hash and generally cannot recover the original value.
B. It can recover the string by removing the event signature bytes from the first topic.
C. It can ABI-decode the original string directly from the indexed topic.
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. Treat every websocket log as final because subscriptions are emitted only after consensus finalization.
B. Use transaction hashes alone because a transaction always appears in the same block after reorganization.
C. Store block hashes with logs, delay final decisions, and reconcile records when the canonical chain changes.
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 still identifies the content, but content addressing alone does not guarantee availability.
C. The CID changes automatically to reference the nearest available replica.
D. The contract can derive the original file from the CID because the hash is reversible.

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 hashes the sender and current block hash; redeployment is possible after every new block.
D. It uses the sender, salt, and hash of initialization code; encoded constructor arguments affect the address.

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. Use different chain IDs for the services so both transactions can consume nonce independently.
B. Increase both gas limits because nonce collisions occur only when intrinsic gas is insufficient.
C. Coordinate nonce allocation with a shared manager and reconcile it against pending and confirmed transactions.
D. Query the latest nonce instead because it atomically reserves the next nonce for the requesting service.