Procházet zdrojové kódy

crypto: add TODO note for ProvingKey/VerifyingKey about duplicates

narodnik před 4 roky
rodič
revize
2168403ed2
1 změnil soubory, kde provedl 7 přidání a 0 odebrání
  1. 7 0
      src/crypto/proof.rs

+ 7 - 0
src/crypto/proof.rs

@@ -15,6 +15,13 @@ use crate::{
     Result,
     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)]
 #[derive(Clone, Debug)]
 pub struct VerifyingKey {
 pub struct VerifyingKey {
     pub params: Params<vesta::Affine>,
     pub params: Params<vesta::Affine>,