0xMiden / 0xMiden/protocol

Introduce procedure_policies replacing proc_thresholds for AuthMultisig

Aperta
#2,669 2 commenti 2 reazioni 1 assegnatario Rivendicata da @onurinanc Vedi su GitHub
standards
Lingua principale
Rust
Stelle
132
Fork
167
Merge medio
1g 23h
PR unite (30g)
110

Descrizione

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")
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.