Consider adding Validator signatures threshold to Block Header
- Langage dominant
- Rust
- Étoiles
- 132
- Forks
- 167
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 110
Description
> Is this not sufficient as a commitment to the number of validators
yes this commits to the total number of validators authorized to sign the block.
But it says nothing about the threshold which is currently implicit in `verify_against`: it requires `self.signatures.len()` equals `validator_keys.len()`, i.e. implicitly setting the threshold to `n-of-n`. See also @bobbinth's comment:
> I guess we could encode the threshold in the header and for now always set it to n. This way, we could avoid header format change if/when we decide to go to m-of-n setup.
Regarding timing:
> But I also think that we could do this later as we'll probably change the header format a few times after mainnet.
My preference would be to already encode the threshold **explicitly** in the `ValidatorKeys` struct (even if an explicit `n-of-n`), and thereby adapt `verify_against` to check only the required number of signatures. Unless I'm missing something, it's a simple change.
But sure, we _could_ also start with an **implicit** `n-of-n` for now, merge this PR and open an issue to track support for `m-of-n`. The current state of this PR works and I don't want to consider it a blocker
_Originally posted by @mmagician in https://github.com/0xMiden/protocol/pull/3174#discussion_r3527758884_
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.