Docsity

Blockchain: Consensus, Smart Contracts and Limits, Study Guides, Projects, Research of Cryptography and System Security

Toggle sidebar
bg1
Blockchain: Consensus, Smart Contracts and Limits Page 1 of 5
Blockchain: Consensus, Smart Contracts and Limits
What a distributed ledger actually guarantees, and why the guarantees are expensive
Computer Science | Undergraduate (Level 5) | December 2026
WHAT IS INSIDE
1. Core Concepts and Theoretical Frameworks
2. Structure: blocks, hashes and Merkle trees
3. Smart contracts, gas and determinism
4. Scaling, finality and interoperability
5. Where a ledger helps and where it does not
6. Case Studies
7. Comparative Summary Table
8. Common Exam Pitfalls and Essay Tips
9. Practice Exam Questions with Model Answers
10. Glossary of Exam-Ready Definitions
1. Core Concepts and Theoretical Frameworks
Blockchain is examined as a distributed systems problem with economic assumptions. The table sets the
consensus families against the fault they tolerate, because the security claim of any chain is only as strong as
its assumption about who can be malicious.
Consensus Mechanism Security assumption Trade-off
Proof of work Computational
puzzle, longest
chain rule
Majority of hash rate honest Energy, slow finality
Proof of stake Economic deposit,
slashing Majority of stake honest Plutocracy, complexity
Practical Byzantine fault
tolerance Voting rounds
among known
validators
Fewer than one third faulty Permissioned, scaling limit
Proof of authority Reputation of
known validators Trust in the validator set Centralised
Raft and Paxos Leader election and
log replication Crash faults only Not Byzantine fault tolerant
Directed acyclic graph Parallel validation
of transactions Varies by design Conflicting transaction
resolution
The examinable point is that decentralisation is purchased with throughput and latency. A system that must
reach agreement among thousands of mutually distrusting participants cannot match a centralised database,
and the justification for using one is the absence of a trusted operator, not performance.
2. Structure: blocks, hashes and Merkle trees
A block contains a header with a hash of the previous block, a timestamp, a nonce or validator signature and a
Merkle root of the transactions, plus the transaction list itself. The chained hashes give tamper evidence:
altering a past block changes its hash, which invalidates every subsequent block unless the attacker redoes the
work and outpaces the network.
A Merkle tree allows a transaction to be proved to be in a block with a logarithmic number of hashes. This is
what makes light clients possible, since they store headers rather than the full state and verify inclusion proofs
pf3
pf4
pf5

Partial preview of the text

Download Blockchain: Consensus, Smart Contracts and Limits and more Study Guides, Projects, Research Cryptography and System Security in PDF only on Docsity!

What a distributed ledger actually guarantees, and why the guarantees are expensive Computer Science | Undergraduate (Level 5) | December 2026

WHAT IS INSIDE

  1. Core Concepts and Theoretical Frameworks
  2. Structure: blocks, hashes and Merkle trees
  3. Smart contracts, gas and determinism
  4. Scaling, finality and interoperability
  5. Where a ledger helps and where it does not
  6. Case Studies
  7. Comparative Summary Table
  8. Common Exam Pitfalls and Essay Tips
  9. Practice Exam Questions with Model Answers
  10. Glossary of Exam-Ready Definitions

1. Core Concepts and Theoretical Frameworks

Blockchain is examined as a distributed systems problem with economic assumptions. The table sets the consensus families against the fault they tolerate, because the security claim of any chain is only as strong as its assumption about who can be malicious.

Consensus Mechanism Security assumption Trade-off Proof of work Computational puzzle, longest chain rule

Majority of hash rate honest Energy, slow finality

Proof of stake Economic deposit, slashing

Majority of stake honest Plutocracy, complexity

Practical Byzantine fault tolerance

Voting rounds among known validators

Fewer than one third faulty Permissioned, scaling limit

Proof of authority Reputation of known validators

Trust in the validator set Centralised

Raft and Paxos Leader election and log replication

Crash faults only Not Byzantine fault tolerant

Directed acyclic graph Parallel validation of transactions

Varies by design Conflicting transaction resolution

The examinable point is that decentralisation is purchased with throughput and latency. A system that must reach agreement among thousands of mutually distrusting participants cannot match a centralised database, and the justification for using one is the absence of a trusted operator, not performance.

2. Structure: blocks, hashes and Merkle trees

A block contains a header with a hash of the previous block, a timestamp, a nonce or validator signature and a Merkle root of the transactions, plus the transaction list itself. The chained hashes give tamper evidence: altering a past block changes its hash, which invalidates every subsequent block unless the attacker redoes the work and outpaces the network.

A Merkle tree allows a transaction to be proved to be in a block with a logarithmic number of hashes. This is what makes light clients possible, since they store headers rather than the full state and verify inclusion proofs

on demand.

Keys and addresses are the account model. A private key signs a transaction, the signature proves authorisation and the address is derived from the public key. Custody is therefore the entire security model for a user: losing the key loses the asset, and exposing it transfers the asset irreversibly.

Component Function Provides Risk Block header Links and commits to content Tamper evidence Forking at the tip Merkle root Commitment to transaction set Efficient inclusion proof None inherent Digital signature Authorises a transaction Non-repudiation Key theft Nonce Work or ordering Sybil resistance in work chains

Centralisation of mining

Smart contract Programmatic conditions Automatic execution Bugs are irreversible State root Commitment to current state Verifiability State growth

3. Smart contracts, gas and determinism

A smart contract is code deployed to the ledger, executed by every validating node, with its effects recorded in state. Execution must be deterministic, so contracts cannot call external services or use randomness without an oracle. The gas mechanism charges for computation and storage, which serves two purposes: it prices scarce block space and it bounds the work a transaction can impose, preventing denial of service by infinite loops.

Immutability is a property with two faces. It prevents tampering and it prevents repair, which is why the history of deployed contracts includes funds locked by bugs and exploits that could not be reversed. Upgradability patterns introduce an administrator, which reintroduces the trusted party the design was meant to remove.

The common vulnerability classes are well catalogued: reentrancy, where an external call allows state to be manipulated before the balance is updated; integer overflow in older compilers; access control errors where an initialisation function is callable by anyone; and oracle manipulation, where a price feed is moved to trigger a liquidation. The examinable answer names the mechanism and the mitigation, such as checks-effects-interactions and reentrancy guards.

  • Determinism forbids reliance on external state without an oracle.
  • Gas prices block space and bounds execution, which prevents denial of service.
  • Immutability prevents repair as well as tampering.
  • Upgradable contracts reintroduce an administrator and a trust assumption.
  • Reentrancy is prevented by updating state before external calls.
  • Oracle manipulation is an economic attack, not a code bug.

4. Scaling, finality and interoperability

Scalability is limited by the requirement that every node process every transaction. Layer 2 approaches move execution off the main chain and post proofs or state commitments back to it. Optimistic rollups assume validity and allow a challenge period; zero-knowledge rollups post validity proofs and achieve faster finality at higher computational cost.

Finality is probabilistic in proof of work and becomes economic in proof of stake after checkpointing. Applications that need certainty must wait for a number of confirmations or for a finality checkpoint, and the number is a judgement about the cost of reversal rather than a technical constant.

Interoperability between chains requires a bridge, and bridges have been the largest source of losses in the ecosystem because they hold assets and rely on external validation. The failure modes are key compromise,

The design is reasonable: it gives shared auditability without public energy cost, and it tolerates a known set of validators. The honest description is a replicated database with a governance process, since the committee is the trusted party and the system's security rests on it.

The rejected alternative was a public chain. It would have provided stronger tamper evidence and imposed fees, latency and a public record of commercial relationships that the participants did not want. The examinable judgement is that the choice follows from the trust model, not from fashion.

7. Comparative Summary Table

The table pairs the use case with the appropriate design.

Use case Design Why Not appropriate when Cross-border payment Public chain or layer 2 No trusted intermediary between parties

Single institution settlement Supply chain provenance Permissioned ledger Known participants, shared audit Public disclosure undesirable Digital identity Verifiable credentials Selective disclosure Central authority acceptable Internal records Traditional database Cheaper and faster Blockchain adds cost only Tokenised asset Permissioned or public depending on regulation

Transferability and audit Regulated custody absent Voting Careful design with verification

Auditability Coercion and privacy unsolved

Each row is a trust decision. The technology follows from who must be trusted, and an answer that starts with the technology has the order wrong.

8. Common Exam Pitfalls and Essay Tips

Answers fail when blockchain is described as trustless without stating the trust that replaces it.

Answer technique

  • State the trust model before the technology.
  • Name the consensus assumption: what fraction of hash rate or stake must be honest.
  • Distinguish tamper evidence from immutability of meaning.
  • Explain gas as both pricing and protection.
  • Name the reentrancy mechanism and the mitigation together.
  • Treat bridges as trusted parties unless proven otherwise.
  • Give the justification for the cost of consensus in the specific case.

A reliable structure is: problem and trust model, design, consensus and assumptions, security analysis, failure modes, and the alternative that would have been cheaper.

The commonest substantive error is claiming that smart contracts are self-enforcing. They execute automatically under their code, and enforcement against off-chain assets still requires legal process.

9. Practice Exam Questions with Model Answers

Allow eight minutes per answer before reading the model.

Question 1. Explain how proof of work resists tampering. Model answer. Each block commits to the previous block's hash, so altering history changes every subsequent hash. Producing a competing chain requires more computational work than the honest chain, and the security assumption is that an attacker

controls less than a majority of hash rate. The guarantee is probabilistic and strengthens with confirmations.

Question 2. What is reentrancy and how is it prevented? Model answer. An external call allows the recipient's code to re-enter the calling contract before the caller updates its state, so a balance check can pass repeatedly. Prevention is to update state before making the call, to use a reentrancy guard, and to prefer patterns where the recipient withdraws rather than being pushed funds.

Question 3. Why are layer 2 solutions needed and what do they trade? Model answer. Because every node validating every transaction limits throughput. Layer 2 executes transactions off the main chain and posts proofs or commitments, which increases throughput and lowers cost. The trade is additional latency for challenge periods in optimistic designs or proving cost in zero-knowledge designs, plus new trust assumptions in the bridge or sequencer.

Question 4. When would a permissioned ledger be preferable to a public chain? Model answer. When the participants are known, the data is commercially sensitive and throughput matters more than permissionless access. A permissioned ledger with known validators is faster and cheaper and can enforce governance, at the cost of trust in that validator set. The honest description is a replicated database with auditability and a consortium, and the choice depends on whether that trust is acceptable.

Question 5. Assess the claim that smart contracts remove the need for lawyers. Model answer. They automate execution where the inputs and assets are on-chain, which removes some intermediaries and some delay. They cannot interpret ambiguity, handle off-chain performance or adjust for unforeseen circumstances, and their immutability can produce unjust outcomes. Enforcement against off-chain assets still requires courts, so the realistic claim is reduced intermediation, not replacement.

10. Glossary of Exam-Ready Definitions

  • Distributed ledger: a record replicated across participants with agreed ordering.
  • Consensus mechanism: the protocol by which participants agree on the next block.
  • Proof of work: consensus through computational effort.
  • Proof of stake: consensus through economic deposits that can be slashed.
  • Byzantine fault tolerance: the ability to reach agreement despite malicious participants.
  • Merkle tree: a hash structure allowing efficient inclusion proofs.
  • Gas: the unit pricing computation and storage on a chain.
  • Smart contract: code deployed to a ledger and executed by validators.
  • Reentrancy: a vulnerability where an external call re-enters before state is updated.
  • Rollup: a layer 2 design posting proofs or commitments to the main chain.
  • Finality: the point after which a transaction cannot be reversed.
  • Oracle: a mechanism supplying external data to a contract. How to revise this document in 40 minutes 10 minutes: write the consensus families with their security assumption. 10 minutes: explain block linking and Merkle proofs. 10 minutes: describe reentrancy and its prevention. 10 minutes: answer the permissioned ledger question and check that you named the trusted party.

REFERENCES [1] Nakamoto S. Bitcoin: A Peer-to-Peer Electronic Cash System. 2008. [2] Buterin V. Ethereum White Paper: A Next-Generation Smart Contract and Decentralized Application Platform. 2014. [3] Wood G. Ethereum: a secure decentralised generalised transaction ledger. Ethereum Project Yellow Paper. 2014. [4] Narayanan A, Bonneau J, Felten E, et al. Bitcoin and Cryptocurrency Technologies. Princeton: Princeton University Press; 2016. [5] Atzei N, Bartoletti M, Cimoli T. A survey of attacks on Ethereum smart contracts. Principles of Security and Trust 2017;164-186.