Harden the SRS download of `TrustedSetupProvider`

Đang mở
#3,425 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
rust, wasm
Lĩnh vực
cryptography

Hướng nghiên cứu

Bắt đầu với circuits/trusted_setup.rs, sau đó kiểm kê mọi caller của TrustedSetupProvider và các tham số mà mỗi caller cần cung cấp. Đánh giá wasm target và mithril-stm feature flags trước khi quyết định có đưa việc thu nhận SRS ra bên ngoài hay không. Được xem là hoàn tất khi vị trí đích và interface của các tham số của provider được ghi lại, hành vi streaming và retry được định nghĩa, dữ liệu đã lưu trong cache được xác minh lại, và các lỗi mạng và lỗi hash được phân biệt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Rust
Star
155
Fork
52
Merge trung bình
2 ngày 17 giờ
Pull request đã merge (30 ngày)
37

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của IntersectMBO/mithril

Tất cả issue của IntersectMBO/mithril

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.