Harden the SRS download of `TrustedSetupProvider`

Abierto
#3,425 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Refactorización
Claridad
Necesita aclaración
Estado de actividad
Tranquilo
Stack tecnológico
rust, wasm
Área
cryptography

Línea de trabajo

Comienza con circuits/trusted_setup.rs y luego inventaría cada llamador de TrustedSetupProvider y los parámetros que cada uno tendría que proporcionar. Evalúa el wasm target y los mithril-stm feature flags antes de decidir si la adquisición de SRS se mueve fuera. Se considera terminado cuando la ubicación de destino y la interfaz de parámetros del proveedor están registradas, el comportamiento de streaming y reintentos está definido, los datos almacenados en caché se vuelven a verificar y los errores de red y de hash son distintos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

cryptography :closed_lock_with_key: to-groom :thinking:

Why

The SRS is downloaded in a single blocking request, fully buffered in memory before being hashed, with no retry. A transient network error fails the whole startup, and the memory peak is proportional to the SRS size.

The same code pulls reqwest and a TLS backend into a cryptographic library, which drives the feature complexity of mithril-stm and its wasm story. Deciding where the SRS acquisition belongs shapes how the hardening is done, so both are handled together.

What

Make the download resilient and bounded in memory, re-verify what is served from the cache, and settle whether the SRS acquisition stays in mithril-stm.

How

  • Inventory the callers of TrustedSetupProvider and what they would need to provide instead
  • Assess the impact on the wasm target and on the feature flags of mithril-stm
  • Decide whether the SRS acquisition moves out of mithril-stm, and record the decision with a target location and an interface for the parameters provider
  • Stream the download and compute the SHA-256 hash incrementally (circuits/trusted_setup.rs)
  • Add bounded retries with backoff on a transient download error
  • Re-verify the hash of a cached SRS file, if the cost is acceptable, and decide whether it is done on every load or on a schedule
  • Report a clear error distinguishing a network failure from a hash mismatch
Lenguaje dominante
Rust
Estrellas
155
Forks
52
Merge medio
2 d 17 h
PR fusionados (30 d)
37

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de IntersectMBO/mithril

Todos los issues de IntersectMBO/mithril

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.