feat(multisig): merge post-release suite to main - #593
Closed
0xisk wants to merge 6 commits into
Closed
Conversation
Co-authored-by: 0xisk <iskander.andrews@openzeppelin.com> Co-authored-by: 0xisk <0xisk@proton.me>
Signed-off-by: 0xisk <0xisk@proton.me> Co-authored-by: andrew <fleming-andrew@protonmail.com> Co-authored-by: 0xisk <iskander.andrews@openzeppelin.com>
Bring the self-contained multisig contract suite from `post-release` into `main`: the M-of-N `Signer` / `SignerManager` registry, `ProposalManager`, stateful `ShieldedTreasury` and `ShieldedTreasuryStateless`, `UnshieldedTreasury`, the `Forwarder` / `ForwarderPrivate` modules with per-recipient presets, and the `ShieldedMultiSig` / `ShieldedMultiSigV2` presets. The suite imports only other multisig modules plus the standard library, so it is unaffected by main's per-module Initializable split (#562), the pk->sk refactor, and the witness relocation. Conflicts were limited to shared infra files and resolved in favour of main's conventions while preserving the multisig additions: * .gitignore, CHANGELOG.md: keep both sides' entries. * contracts/package.json: keep main's hierarchical build, SKIP_ZK test scripts, and modern dep versions; re-add fast-check. * contracts/vitest.config.ts: keep main's per-`.ts` 95% coverage gate. * contracts/src/utils/test/utils.test.ts: keep both describe blocks. * yarn.lock: regenerated via yarn install. All 21 multisig `.compact` modules compile cleanly. Supersedes #577.
Contributor
|
Caution Review failedPull request was closed or merged during review WalkthroughThis PR adds a multisig contract suite under ChangesMultisig contract suite
Sequence Diagram(s)sequenceDiagram
participant Signer
participant ShieldedMultiSig
participant ProposalManager
participant ShieldedTreasury
Signer->>ShieldedMultiSig: createShieldedProposal(...)
ShieldedMultiSig->>ProposalManager: _createProposal(...)
Signer->>ShieldedMultiSig: approveProposal(id)
ShieldedMultiSig->>ProposalManager: assertProposalActive(id)
Signer->>ShieldedMultiSig: executeShieldedProposal(id)
ShieldedMultiSig->>ShieldedTreasury: _send(recipient, color, amount)
ShieldedMultiSig->>ProposalManager: _markExecuted(id)
sequenceDiagram
participant Relayer
participant ShieldedMultiSigV2
participant SignerSet
participant ShieldedTreasuryStateless
Relayer->>ShieldedMultiSigV2: execute(to, amount, coin, pubkeys, signatures)
ShieldedMultiSigV2->>ShieldedMultiSigV2: compute nonce-bound message hash
ShieldedMultiSigV2->>SignerSet: verify commitments and threshold
ShieldedMultiSigV2->>ShieldedTreasuryStateless: _send(coin, recipient, amount)
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
8 tasks
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of changes
What types of changes does your code introduce to OpenZeppelin Midnight Contracts?
Closes #471
Closes #476
Closes #477
Closes #478
Closes #479
Closes #480
Closes #481
Closes #474
Merges the self-contained multisig contract suite from
post-releaseintomain. The suite was developed and reviewed onpost-releaseacross #378, #424, and #526; this PR brings it forward onto the currentmain.What lands
Signer/SignerManager— configurable M-of-N signer registryProposalManagerShieldedTreasury(stateful)ShieldedTreasuryStatelessUnshieldedTreasuryShieldedMultiSigpreset (ledger-backed)ShieldedMultiSigV2preset (stateless vault)Forwarder/ForwarderPrivate+ per-recipient presetsPlus supporting
Utilsadditions (selfAsRecipient,isContractAddress,UINT128_MAX) and their tests.Explicitly out of scope (left open)
ShieldedMultiSigTokenpreset (stateless mint/burn) #482 —ShieldedMultiSigTokenpreset is not present onpost-release; not delivered here.ECDSA+Keccakprimitives — replacestubVerifySignature#475 / Multisig contract suite #470 — signature verification is still stubbed pending ECDSA + Keccak primitives. The umbrella (Multisig contract suite #470) stays open until those land.Merge mechanics
The multisig modules import only other multisig modules plus the Compact standard library, so they are unaffected by
main's per-moduleInitializablesplit (#562), thepk→skrefactor, and the witness relocation. Conflicts were limited to shared infra files and resolved in favour ofmain's conventions while preserving the multisig additions:.gitignore,CHANGELOG.md: keep both sides' entries.contracts/package.json: keepmain's hierarchical build +SKIP_ZKtest scripts and modern dependency versions; re-addfast-check.contracts/vitest.config.ts: keepmain's per-.ts95% coverage gate.contracts/src/utils/test/utils.test.ts: keep bothdescribeblocks.yarn.lock: regenerated viayarn install.All 21 multisig
.compactmodules compile cleanly.Supersedes #577, which is now stale/conflicting against the current
main.PR Checklist
Further comments
This is a forward-merge of already-reviewed work, so the diff is dominated by the new
multisig/tree (new files, no conflicts) and the witnesses currently sit undersrc/multisig/witnesses/rather thanmain's newertest/witnesses/layout (#528). Aligning that layout can be a follow-up alongside #565.Summary by CodeRabbit
New Features
Chores