OpenZeppelin / OpenZeppelin/compact-contracts
dev: trim ShieldedMultiSig preset getters to a deployable set
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 55
- Forks
- 29
- Avg merge
- 5d 7h
- Merged PRs (30d)
- 25
Description
Context
The ShieldedMultiSig preset's getter surface, combined with its state-changing circuits, sits at or over the local-node deploy block limit. Some getters were already dropped to fit (getProposalRecipient/getProposalAmount/getProposalColor, getReceivedMinusSent), and #673 removed the simulator wrappers that faked them so nothing masquerades as a circuit the preset does not expose.
Problem
- The preset is undeployable / at the ceiling as circuits grow.
- Some getters are trivial derivations that arguably should not be circuits at all:
getReceivedMinusSentis justgetReceivedTotal - getSentTotal.
Proposal
- Trim the preset getter surface to the minimum needed for on-chain checks; derive the rest off-chain (the TS ledger reader /
getProposal). - Drop
getReceivedMinusSentas a circuit in the preset and theShieldedTreasurymodule. - Once removed from the treasury module, drop the
receivedMinusSent-equals-balance section inShieldedTreasury.test.ts(kept in #673 because the module circuit still exists there).
Acceptance
- The preset deploys on the local node within the block limit.
- Derived values are read off-chain, not via faked circuit wrappers.
Origin
Split from #673 review (Andrew's comments on the simulator getter wrappers, https://github.com/OpenZeppelin/compact-contracts/pull/673#discussion_r3592239540 and https://github.com/OpenZeppelin/compact-contracts/pull/673#discussion_r3592280056).
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 the ShieldedMultiSig preset and the ShieldedTreasury module, then inspect ShieldedTreasury.test.ts and the TS ledger reader's getProposal path. Verify which getters remain needed for on-chain checks and run the preset deployment and treasury tests. Done means the preset deploys within the local-node block limit, derived values are read off-chain, and the obsolete receivedMinusSent assertion is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain, testing
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100