Skip to content

fix: address Miden Bank tutorial feedback from review #180

@Keinberger

Description

@Keinberger

Context

Consolidates Miden Bank tutorial feedback from two reviewers:

Blockers (tests that don't compile)

  1. Part 3: Test references deposit-note which doesn't exist until Part 4
  2. Part 4: Test references init-tx-script which doesn't exist until Part 6
  3. Part 6: Possible no field 'dep' compiler error (needs verification)

Security concerns

  1. Withdraw note passes sender explicitly as depositor param, an attacker could pass a victim's ID
  2. No overflow check on current_balance + deposit_amount in deposit
  3. No validation that asset is fungible before accessing inner[0]

Important accuracy fixes

  1. Part 0 Step 4 Cargo.toml update is a no-op
  2. Part 1 re-adds balances: StorageMap already present from Part 0
  3. Part 5 WIT file listing shows wrong filenames
  4. "Auto-assigns slot numbers based on field order" is outdated
  5. StorageMap::get return type claimed as Felt but returns any type convertible from Word
  6. "Called by other contracts" should be "Called by other components"
  7. Part 7 re-introduces withdraw() already in Part 3
  8. Cross-component explanation (Part 5) comes AFTER Part 4 already uses it
  9. Key layout should use little-endian for 0.14 compatibility

Minor / cosmetic

  1. Part 2 test description mismatch (says "verifies deposit without init fails" but never calls deposit)
  2. require_initialized introduced too early (Part 1, not called until Part 2)
  3. Cargo.toml updates in Parts 4, 6, 7 are all no-ops
  4. Trace log spam not shown in expected output
  5. Typo "from outside" -> "from the outside"
  6. Part 5 bindings visualization arrow unclear
  7. No IDE support note for contracts excluded from workspace
  8. Part 1 MockChain claim but no MockChain created

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions