Refactoring and enhancements for SNARK-friendly STM

Aperta
#3,066 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@leepl37 ci sta già lavorando.

Dal 10/3/2026.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
32/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
rust

Direzione di ricerca

Inizia da mithril-stm/src/protocol/participant/signer.rs alle righe di gestione di RNG indicate, quindi esamina la struttura della libreria STM e i relativi test di compatibilità CPU/circuit. L’issue comprende diverse iterazioni, tra cui refactoring delle voci di registrazione, gestione degli errori, opzioni per le chiavi di verifica e le firme e calcolo del target della lottery; è completata quando gli elementi selezionati della checklist sono implementati e coperti dai test pertinenti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

cryptography :closed_lock_with_key: refactoring :hammer_and_wrench: stale :calendar: to-groom :thinking:

Why

The STM library has accumulated structural debt as SNARK support was introduced alongside the existing concatenation proof system.

What

Perform targeted refactorings and enhancements across the STM library to improve separation of concerns, test efficiency, API readiness for SNARK signing, and overall code hygiene.

How

Current iteration

Following iteration

  • Enhance error handling with Midnight zk library (need new version of Midnight zk released)
  • Refactor RegistrationEntry into struct with fields
  • Refactoring ClosedRegistrationEntry (To avoid having double options for vk and stake/lottery target value, use a ClosedRegistrationEntryForConcatenation and a Option<ClosedRegistrationEntryForSnark>)
  • Refactor tests for CPU/circuit compatibility (Create a dedicated module for CPU/non-recursive circuit compatibility tests)

Later

  • Get rid of Options for SNARK verification keys and signatures
  • Optimize computation of Lottery Target Value with Binomial Series?

(1-phi_f)^w = 1 - w * phi_f + w(w-1) * (phi_f^2) / 2! - w(w-1)(w-2) * (phi_f^3) / 3! + ...

Lingua principale
Rust
Stelle
155
Fork
52
Merge medio
2g 17h
PR unite (30g)
37

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di IntersectMBO/mithril

Tutte le issue di IntersectMBO/mithril

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.