0xMiden / 0xMiden/protocol

Introduce procedure_policies replacing proc_thresholds for AuthMultisig

Aberta
#2,669 2 comentários 2 reações 1 responsável Reivindicada por @onurinanc Ver no GitHub
standards
Linguagem predominante
Rust
Estrelas
132
Forks
167
Merge médio
1d 23h
PRs com merge (30d)
110

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.