Fix secretHash zero overload in claim #8
- @julien opened this issue · Sep 18, 2026edited
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, 2026edited
Closed via 7 — merged 7d97bbb4e3405a72813c6effd1dcdc163c58322b into main.
Sign in to comment.