0xMiden / 0xMiden/protocol

Introduce procedure_policies replacing proc_thresholds for AuthMultisig

Offen
#2,669 2 Kommentare 2 Reaktionen 1 zugewiesene Person Beansprucht von @onurinanc Auf GitHub ansehen
standards
Vorherrschende Sprache
Rust
Sterne
132
Forks
167
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
110

Beschreibung

Introduce a shared `ProcedurePolicy` abstraction for multisig-based auth components.

This is meant to become the canonical per-procedure policy model for multisig variants, instead of treating per-procedure authorization as a plain `proc_root -> threshold` map.

In the initial step, base `AuthMultisig` will only accept the immediate-only, while future components such as `AuthMultisigSmart` will be able to use delayed policies.

Before opening the `AuthMultisigSmart` PR, I would like to include `ProcedurePolicy` logic into a smaller PR, where per-procedure policy needs to express more such as:

- whether a procedure can execute immediately
- whether it is delayed-only
- whether both immediate and delayed lanes are available
- whether the transaction must be isolated
- whether input/output notes must be forbidden

I would like to propose to add a `ProcedurePolicy` model under the multisig auth module.

The policy should encode:

- `immediate_threshold`
- `delay_threshold`
- `isolated_tx`
- `no_input_output_notes`

where the storage slot is now:

```masm
# The slot in this component's storage layout where procedure policies are stored.
# Map entries: PROC_ROOT => [immediate_threshold, delayed_threshold, requires_isolated_tx, requires_no_input_output_notes]
const PROC_POLICY_ROOTS_SLOT = word("miden::standards::auth::multisig::procedure_policies")
```

instead of the current

```masm
# The slot in this component's storage layout where procedure thresholds are stored.
# Map entries: PROC_ROOT => [proc_threshold, 0, 0, 0]
const PROC_THRESHOLD_ROOTS_SLOT = word("miden::standards::auth::multisig::procedure_thresholds")
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.