julien/lovepublic Fork
⑂ main
Commits
⬇ Clone ▾
git clone https://git.rickub.com/julien/love.git
git clone ssh://git@rickub.com/julien/love.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP

Fix secretHash zero overload in claim #8

Closed@julien opened this issue Sep 18, 2026 · 1 comment
  • @julien opened this issue · Sep 18, 2026

    The privacy `deposit(bytes32,uint256)` overload accepts any `secretHash`, including `bytes32(0)`. `claim` uses `envelope.secretHash == bytes32(0)` as its "does not exist" sentinel (`UnknownDeposit`), so a zero-hash envelope becomes permanently unclaimable — no revert at deposit time, and no way to distinguish "never existed" from "exists with hash zero" at claim time.

    Found in docs/notes/impl-review-sept-18-2026.md. Root cause: Love.sol deposit(bytes32,uint256) and claim.

    Done: `deposit(bytes32,uint256)` reverts when `secretHash == bytes32(0)`, and a `test_RevertWhen_SecretHashIsZero` test covers it.

  • @julien · Sep 18, 2026

    Closed via 7 — merged 7d97bbb4e3405a72813c6effd1dcdc163c58322b into main.

Sign in to comment.