refactor(standards): rename PSM references to Guardian#2728
refactor(standards): rename PSM references to Guardian#2728giwaov wants to merge 1 commit into0xMiden:nextfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR performs a repo-wide terminology refactor, replacing “PSM (Private State Manager)” with “Guardian” across the Miden standards and testing crates, including Rust APIs and MASM modules/components.
Changes:
- Renames the multisig+PSM authentication component and related types/configs to multisig+Guardian equivalents.
- Replaces the MASM
psmmodule with aguardianmodule and updates the multisig-guardian component wrapper to call it. - Updates miden-testing helpers/tests and public interfaces to use the new Guardian names.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/miden-testing/tests/auth/multisig_guardian.rs | Updates multisig tests to use AuthMultisigGuardian* and Guardian-specific tx scripts/signatures. |
| crates/miden-testing/tests/auth/mod.rs | Switches test module import from multisig_psm to multisig_guardian. |
| crates/miden-testing/src/mock_chain/auth.rs | Renames mock-chain auth variant and wiring from PSM to Guardian types/config. |
| crates/miden-standards/src/account/interface/extension.rs | Updates component-to-library procedure digest exposure for the Guardian multisig component. |
| crates/miden-standards/src/account/interface/component.rs | Renames interface enum variant + storage-slot extraction calls to Guardian. |
| crates/miden-standards/src/account/components/mod.rs | Renames shipped library loader and standard component enum variant to Guardian. |
| crates/miden-standards/src/account/auth/multisig/mod.rs | Updates multisig docs to refer to Guardian in the “private account” caution note. |
| crates/miden-standards/src/account/auth/multisig_guardian.rs | Introduces/renames the Rust multisig-guardian component + storage slot names and metadata. |
| crates/miden-standards/src/account/auth/mod.rs | Re-exports Guardian multisig types instead of PSM multisig types. |
| crates/miden-standards/asm/standards/auth/psm.masm | Removes the old PSM MASM auth module. |
| crates/miden-standards/asm/standards/auth/guardian.masm | Adds the new Guardian MASM auth module (update key + conditional signature verification). |
| crates/miden-standards/asm/standards/auth/multisig.masm | Updates comment to reference Guardian as an example optional check. |
| crates/miden-standards/asm/account_components/auth/multisig_guardian.masm | Updates component wrapper to use ...::guardian and renames auth proc/exported procedures. |
| CHANGELOG.md | Updates changelog wording from PSM to Guardian for the referenced feature addition. |
Comments suppressed due to low confidence (5)
crates/miden-standards/src/account/auth/multisig_guardian.rs:83
GuardianConfigstill uses "Private state manager public keys" in the storage schema description. This looks like a leftover from the rename and will surface in metadata/schema introspection; update the description string to refer to Guardian instead.
crates/miden-standards/src/account/auth/multisig_guardian.rs:110- Comments in
GuardianConfig::into_component_partsstill refer to "Private state manager" for the public key / scheme slots. These should be updated to "guardian" to avoid misleading future maintainers.
crates/miden-standards/src/account/auth/multisig_guardian.rs:35 - This change renames the storage slot names from
miden::standards::auth::psm::*tomiden::standards::auth::guardian::*. BecauseStorageSlotNameis part of the persisted account storage layout, this will make existing accounts created with the old PSM component unable to find their configured key/scheme unless a migration/alias is provided. If backward compatibility is required, consider keeping the underlying slot names stable (still...::psm::...) while renaming only the Rust/MASM module/type names, or add a migration path/document this as a breaking change.
crates/miden-standards/src/account/auth/multisig_guardian.rs:186 - Doc comment grammar: "With Guardian is configured" is ungrammatical/unclear. Reword to something like "When a Guardian is configured" / "When the Guardian signer is configured" to make the behavior description clear.
crates/miden-standards/src/account/auth/multisig_guardian.rs:119 slot_metadataincludesSelf::auth_scheme_slot_schema(), but that schema currently still describes the slot as "Private state manager scheme IDs". Please update the description string inauth_scheme_slot_schema()to refer to Guardian scheme IDs instead, to keep metadata consistent with the rename.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// It enforces a threshold of approver signatures for every transaction, with optional | ||
| /// per-procedure threshold overrides. Non-uniform thresholds (especially a threshold of one) | ||
| /// should be used with caution for private multisig accounts, without Private State Manager (PSM), | ||
| /// should be used with caution for private multisig accounts, without Guardian, |
There was a problem hiding this comment.
Doc comment reads awkwardly after the rename: "without Guardian,". Consider clarifying this as "without a guardian signer" (or similar), so it’s clear this refers to the additional guardian-signature check rather than the component itself.
| /// should be used with caution for private multisig accounts, without Guardian, | |
| /// should be used with caution for private multisig accounts: without a guardian signer, |
7473e36 to
60d75c7
Compare
Summary
Replace all PSM (Private State Manager) references with Guardian across the codebase.
Changes
File renames
psm.masm->guardian.masmmultisig_psm.masm->multisig_guardian.masmmultisig_psm.rs->multisig_guardian.rsmultisig_psm.rs->multisig_guardian.rsType renames
AuthMultisigPsm->AuthMultisigGuardianAuthMultisigPsmConfig->AuthMultisigGuardianConfigPsmConfig->GuardianConfigMASM renames
miden::standards::auth::psm->miden::standards::auth::guardianmiden::standards::components::auth::multisig_psm->miden::standards::components::auth::multisig_guardianPSM_MAP_KEY,PSM_PUBLIC_KEYS_SLOT, etc.) -> Guardian equivalentsOther
miden::standards::auth::psm::pub_key->miden::standards::auth::guardian::pub_key(and scheme)Verification
cargo check -p miden-standardspassescargo check -p miden-testing --testspassescargo clippy -p miden-standards -p miden-testing -- -D warningspassesgit grep -rni psmreturns zero results in source filesCloses #2665