Blockchain System Testing Flashcards
7 cards from real CBSE practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Blockchain System Testing flashcards as text
A QA engineer wants to test that a smart contract's time-lock mechanism cannot be bypassed using block timestamp manipulation. Which test setup is required?
Answer: Use a local testnet where block timestamps can be manually set to future values
A local testnet with controllable timestamps lets testers simulate miner timestamp manipulation to verify that the time-lock cannot be bypassed.
Which of the following is the correct test to check for an 'uninitialized storage pointer' vulnerability in a Solidity contract?
Answer: Deploy the contract and read storage slot 0 before any initialization occurs
Reading storage slot 0 before initialization reveals whether an uninitialized pointer aliases it, potentially allowing unintended state overwrites.
During a blockchain network partition test, a 5-node PoA network splits into groups of 3 and 2. What is the expected correct behavior?
Answer: The minority partition (2 nodes) halts; the majority (3 nodes) continues
In a correctly implemented PoA network, only the majority partition meeting the quorum threshold continues producing blocks to prevent double-finalization.
What does a 'storage collision' test in upgradeable proxy contracts verify?
Answer: That the proxy and implementation contracts do not declare state variables at the same storage slots
Storage collision testing ensures that proxy and implementation storage layouts do not overlap, which would cause one contract to corrupt the other's state.
A blockchain security tester observes that a contract's fallback function consumes more than 2300 gas. Why is this a security concern in a test report?
Answer: It prevents the contract from receiving ETH via transfer()/send()
The transfer() and send() functions forward only 2300 gas; if the recipient's fallback exceeds that, the transfer reverts, causing funds to be stuck.
In a permissioned blockchain (e.g., Hyperledger Fabric), which test validates that endorsement policies are correctly enforced?
Answer: Submit a transaction endorsed by fewer peers than the policy requires and confirm it is rejected
Submitting an under-endorsed transaction directly tests whether the ordering service and committing peers enforce the minimum endorsement policy.
What is the main purpose of 'invariant testing' (property-based testing) in smart contract security?
Answer: To confirm that certain system-wide properties always hold true regardless of the sequence of operations performed
Invariant testing defines global properties (e.g., total supply never changes) and uses random operation sequences to try to violate them.