فهرست منبع

crypto: add TODO note for ProvingKey/VerifyingKey about duplicates

narodnik 4 سال پیش
والد
کامیت
2168403ed2
1فایلهای تغییر یافته به همراه7 افزوده شده و 0 حذف شده
  1. 7 0
      src/crypto/proof.rs

+ 7 - 0
src/crypto/proof.rs

@@ -15,6 +15,13 @@ use crate::{
     Result,
 };
 
+// TODO: this API needs rework. It's not very good.
+// keygen_pk() takes a VerifyingKey by value,
+// yet ProvingKey also provides get_vk() -> &VerifyingKey
+//
+// Maybe we should just use the native halo2 types instead of wrapping them.
+// We can avoid double creating the vk when we call VerifyingKey::build(), ProvingKey::build()
+
 #[derive(Clone, Debug)]
 pub struct VerifyingKey {
     pub params: Params<vesta::Affine>,