0xMiden / 0xMiden/protocol

Sort approver public keys in multisig

オープン
#3,280 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
standards
主要言語
Rust
スター
132
フォーク
167
平均マージ
1日 23時間
マージ済み PR(30日)
110

説明

Consider making approver public keys in the multisig sorted, so the duplicates check in `assert_unique_approver_public_keys` becomes simpler (single loop instead of double loop). Afaict, there is no reliance on approver indices in the public key array, since each approver has the same weight.

Additionally, consider refactoring `AuthMultisigConfig::with_proc_thresholds` to take procedure thresholds as `BTreeMap` rather than `Vec` which avoids the explicit duplicate check and allows moving the setter threshold check from `AuthMultisig::new` to the config, to make invalid configs unrepresentable.

Context:
- https://github.com/0xMiden/protocol/pull/3246#discussion_r3569073672
- https://github.com/0xMiden/protocol/pull/3246#discussion_r3569102219

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。