Skip to content

Rename psm to guardian#2666

Open
MCarlomagno wants to merge 9 commits into0xMiden:nextfrom
MCarlomagno:rename-psm-to-guardian
Open

Rename psm to guardian#2666
MCarlomagno wants to merge 9 commits into0xMiden:nextfrom
MCarlomagno:rename-psm-to-guardian

Conversation

@MCarlomagno
Copy link
Copy Markdown

Summary

This PR renames the multisig psm auth surface to guardian

related to #2665

@@ -1,19 +1,19 @@
# The MASM code of the Multi-Signature Authentication Component with Private State Manager.
# The MASM code of the Multi-Signature Authentication Component with Guardian.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to the above comment, I'd probably write this as: "The MASM code of the Multi-Signature Authentication component integrated with a state guardian."

In general, I think when we use the term in conversational context, I'd use "state guardian" as I think this makes the concept a bit more self-explanatory. But in the code, for brevity, using guardian is probably fine.

cc @Dominik1999 @guelowrd @BrianSeong99, in case you guys disagree.

Copy link
Copy Markdown
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thank you! I left some comments inline - but these are mostly comment nits.

@@ -0,0 +1,157 @@
# Guardian account component.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would say "State Guardian account component" here.

# This component is composed into account auth flows especially for multisig and adds
# an extra signature check by a dedicated guardian signer.
#
# A guardian can help coordinate state availability for private accounts.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar nit here: I'd say "A state guardian can help ..."

Comment on lines +18 to +19
# - `update_guardian_public_key` rotates the guardian public key and corresponding scheme id using the fixed
# map key `GUARDIAN_MAP_KEY`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we usually wrap comments after 100 chars.

# Map entries: [GUARDIAN_MAP_KEY] => [GUARDIAN_PUBLIC_KEY]
const GUARDIAN_PUBLIC_KEYS_SLOT = word("miden::standards::auth::guardian::pub_key")

# The slot in this component's storage layout where the scheme id for the corresponding guardian public key map is stored.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we usually wrap comments after 100 chars.

CHANGELOG.md Outdated
Comment on lines +52 to +61
- [BREAKING] Renamed the multisig PSM auth component, procedures, storage paths, and related APIs from `psm` to `guardian`.
- [BREAKING] Renamed the guarded multisig component-facing APIs from `multisig_guardian` / `AuthMultisigGuardian` to `guarded_multisig` / `AuthGuardedMultisig`, while retaining the `guardian` auth namespace and guardian-specific procedures.
- Migrated to miden-vm v0.22 and miden-crypto v0.23 ([#2644](https://github.com/0xMiden/protocol/pull/2644)).
- [BREAKING] Renamed `AccountComponent::get_procedures()` to `procedures()`, returning `impl Iterator<Item = (AccountProcedureRoot, bool)>` ([#2597](https://github.com/0xMiden/protocol/pull/2597)).
- [BREAKING] Removed `NoteAssets::add_asset`; `OutputNoteBuilder` now accumulates assets in a `Vec` and computes the commitment only when `build()` is called, avoiding rehashing on every asset addition. ([#2577](https://github.com/0xMiden/protocol/pull/2577))
- [BREAKING] Made `supported_types` a required parameter of `AccountComponentMetadata::new()`; removed `with_supported_type`, `with_supported_types`, `with_supports_all_types`, and `with_supports_regular_types` builder methods; added `AccountType::all()` and `AccountType::regular()` helpers ([#2554](https://github.com/0xMiden/protocol/pull/2554)).
- [BREAKING] Migrated to miden-vm 0.21 and miden-crypto 0.22 ([#2508](https://github.com/0xMiden/miden-base/pull/2508)).
- [BREAKING] The stack orientation changed from big-endian to little-endian - see PR description ([#2508](https://github.com/0xMiden/miden-base/pull/2508)).
- [BREAKING] The native hash function changed from RPO256 to Poseidon2 - see PR description ([#2508](https://github.com/0xMiden/miden-base/pull/2508)).
- Introduced `StorageMapKey` and `StorageMapKeyHash` Word wrappers for type-safe storage map key handling ([#2431](https://github.com/0xMiden/miden-base/pull/2431)).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some of these are not relevant to this PR. The relevant entries should be moved into the v0.15.0 section.

}

/// An [`AccountComponent`] implementing a multisig authentication with a private state manager.
/// An [`AccountComponent`] implementing guarded multisig authentication with a guardian.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd write this as: "An [AccountComponent] implementing multisig authentication integrated with a state guardian."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants