CBC CBC Blockchain Architecture & Design 2 — Questions and Answers
Question 1: What distinguishes an 'on-chain' transaction from an 'off-chain' transaction?
- On-chain transactions are free; off-chain are paid
- On-chain transactions are recorded directly on the blockchain; off-chain occur outside it (Correct answer)
- On-chain transactions require smart contracts; off-chain do not
- On-chain transactions are private; off-chain are public
Correct answer: On-chain transactions are recorded directly on the blockchain; off-chain occur outside it
On-chain transactions are validated and permanently recorded on the distributed ledger, while off-chain transactions occur outside the main blockchain and are settled later.
Question 2: Which design pattern separates the data layer from the logic layer in upgradeable smart contract architecture?
- Singleton pattern
- Proxy-delegate pattern (Correct answer)
- Observer pattern
- Factory pattern
Correct answer: Proxy-delegate pattern
The proxy-delegate pattern keeps data in a permanent storage contract while routing logic calls to an upgradeable implementation contract.
Question 3: What is the purpose of a blockchain 'oracle' in system design?
- To validate consensus among nodes
- To store private keys securely
- To provide smart contracts with verified real-world external data (Correct answer)
- To manage blockchain governance votes
Correct answer: To provide smart contracts with verified real-world external data
Oracles bridge the gap between blockchains and the real world by feeding verified off-chain data (prices, weather, events) into smart contracts.
Question 4: In designing a blockchain solution, which factor primarily determines the choice between UTXO and account-based models?
- Transaction speed requirements
- Storage capacity limits
- Whether parallelism or state simplicity is prioritized (Correct answer)
- The number of network nodes
Correct answer: Whether parallelism or state simplicity is prioritized
UTXO models enable parallelism and privacy but are complex for stateful apps, while account models simplify state management for smart contracts.
Question 5: What is a 'hard fork' in blockchain architecture?
- A temporary network slowdown during high traffic
- A backwards-incompatible protocol change that creates a permanent chain split (Correct answer)
- A scheduled software upgrade with no chain impact
- A security patch applied without node restarts
Correct answer: A backwards-incompatible protocol change that creates a permanent chain split
A hard fork introduces protocol changes that are not backwards-compatible, requiring all nodes to upgrade or risk operating on a diverging chain.
Question 6: Which scalability solution processes transactions off the main chain and periodically settles batched results on-chain?
- Sidechains
- Layer 2 rollups (Correct answer)
- State channels only
- Increased block size
Correct answer: Layer 2 rollups
Layer 2 rollups bundle many transactions off-chain into a single proof or batch, then post the compressed result to the main chain, reducing fees and increasing throughput.
What distinguishes an 'on-chain' transaction from an 'off-chain' transaction?