Review the fairness of the single signature selection algorithm for the non-recursive SNARK

Open
#3,427 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust

Research direction

Read proof_system/halo2_snark/clerk.rs and the existing tests for select_valid_signatures_for_k_indices first. Model and simulate selection probabilities across stake and won lotteries, then assess signer influence. Done means a fairness report, an adjustment if bias is found, and property tests covering the result.

Written by the indexing model from the issue text.

Description

cryptography :closed_lock_with_key: to-groom :thinking:

Why

select_valid_signatures_for_k_indices picks the signatures that enter the proof by hash priority, then deduplicates by keeping the smallest hash per index. The algorithm is deterministic and tested, but its fairness across signers over many epochs has not been analyzed.

What

Analyze the selection algorithm for fairness and for manipulability, and adjust it if the analysis calls for it.

How

  • Model the selection probability per signer as a function of the stake and of the number of won lotteries
  • Check whether a signer can influence its own selection odds
  • Simulate the selection over many epochs and report the distribution
  • Propose an adjustment if a bias is found, and cover it with property tests (proof_system/halo2_snark/clerk.rs)

Later

Dominant language
Rust
Stars
155
Forks
52
Avg merge
2d 17h
Merged PRs (30d)
37

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from IntersectMBO/mithril

All issues in IntersectMBO/mithril

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.