mohab metwally 4 лет назад
Родитель
Сommit
45ff3f63d2
1 измененных файлов с 3 добавлено и 9 удалено
  1. 3 9
      example/lead.rs

+ 3 - 9
example/lead.rs

@@ -22,10 +22,9 @@ use darkfi::{
     zk::circuit::lead_contract::LeadContract,
 };
 
-
 fn main() {
     let k: u32 = 13;
-
+    //
     //let lead_pk = ProvingKey::build(k, &LeadContract::default());
     //let lead_vk = VerifyingKey::build(k, &LeadContract::default());
     //
@@ -33,12 +32,7 @@ fn main() {
     let epoch_item = EpochItem {
         value: 0,  //static stake value
     };
-
-    //TODO to read eta you need an access to the blockchain proof transaction.
-    //need an emulation of the stakeholder as a node
-    //TODO who should have view of the blockchain if not the stakeholder?
-    // or should the blockchain be a node in itself?
-    // but that doesn't make sense, since each stakeholder might end up with different view of it.
+    //
     let genesis_data = blake3::hash(b"");
     let db = sled::open("/tmp/darkfi.db").unwrap();
     let oc = Blockchain::new(&db, Timestamp::current_time(), genesis_data).unwrap();
@@ -60,7 +54,7 @@ fn main() {
 
     // calculate public inputs
     let public_inputs = coin.public_inputs();
-
+    //
     let prover = MockProver::run(k, &contract, vec![public_inputs]).unwrap();
     //
     assert_eq!(prover.verify(), Ok(()));