OpenZeppelin / OpenZeppelin/compact-contracts
Add multi-input spend (note consolidation) to the note token core
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
🧐 Motivation
The biggest practical hole in the family. Every spend consumes exactly one input note, so nothing larger than the holder's biggest note is payable and balances fragment forever with no way to consolidate.
📝 Details
- Needs a
_join/ two-input_consumeNotein the core — it requires the commitment tree and the nullifier set, so it is not expressible as an extension. - Two nullifiers per spend, two membership proofs; value conservation extends to the multi-input sum.
- Watch the cost:
_consumeNoteis already k=14 / ~12.2k rows and the Regulatedtransferis k=18 / ~136k rows. - Transaction-shape leakage changes: input count becomes a visible fact unless outputs/inputs are padded to a fixed shape.
Planned, not in #679 (confidential-note-token.md §0).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with confidential-note-token.md §0 and compare the planned work with issue #679. Then locate the core _consumeNote implementation and its commitment-tree and nullifier-set handling. Done means the core supports multi-input spends while covering the stated proof, value-conservation, cost, and transaction-shape considerations.
Written by the indexing model from the issue text.
Assessment
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100