Fintech Blockchain and Cryptocurrency

Lab wrapper

L1 — Break a tiny chain (due end of Week 2)

In one sentence. Run our lab notebook: hash a receipt, mine three blocks, quietly change a payment, re-mine. The PDF is the write-up.

DueEnd of Week 2 (with A2)
WhoIndividual (talking with a teammate is OK; written answers must be yours)
TimeAbout 60–75 minutes
Turn inPDF: Q1–Q5 + three PNGs from notebooks/labs/lab_output/ named L1-hash.png, L1-mine.png, L1-tamper.png
Points20 (one-third of the 20% lab bucket)

Stuck? Open the handbook → Session 3, then the notebook. Same words: hash, nonce, prev_hash, verify.

You will actually do this

  1. Clone the course repo if you have not: https://github.com/salihtutun/intro-to-blockchain-and-cryptocurrency
  2. Open notebooks/labs/L1_proof_of_work.ipynb in Jupyter.
  3. Run All. Stay at difficulty = 3.
  4. Check that notebooks/labs/lab_output/ now has the three PNGs.
  5. Write Q1–Q5 in a short PDF in your words. Attach the three PNGs.

You do not have to finish Naranjo’s notebooks to get the points. They are optional extra (same verbs, different file):
https://www.lorenzonaranjo.com/class-materials/fintech/notebooks.html

Questions (20 points)

Each question is one section of the notebook. Quote a print if it helps; do not paste the whole file.

Q1 (4). The notebook hashed a receipt, changed one character, and hashed again. In finance language, what did you just show (a tamper-evident seal)? 2–4 sentences. Attach L1-hash.png.

Q2 (4). In your own words: what is a nonce, what is difficulty, and when does a block pass? At most 8 sentences. Attach L1-mine.png.

Q3 (4). You changed a payment in an early block and ran the verifier without re-mining. What fails first, and why? Paste True/False plus two sentences. Attach L1-tamper.png.

Q4 (4). You re-mined from the tampered block forward until the chain verified. How many blocks did you re-mine? Why is that expensive on a long public chain? Four sentences.

Q5 (4). Name two Bitcoin pieces you used in this notebook (hash, nonce, prev_hash, verify, …) and two you did not need to issue a class ERC-20 (P2P gossip, energy market, native coin, mining pools, …). That is the unbundle. Tie one sentence to your A2 coin.

You will not

  • paste Naranjo’s (or our) notebook as the PDF
  • raise difficulty above 3 “to be more realistic”
  • claim you re-mined one block and the rest magically worked