瀏覽代碼

daod shizo posting

narodnik 4 年之前
父節點
當前提交
aeb2da0a8e
共有 1 個文件被更改,包括 24 次插入0 次删除
  1. 24 0
      bin/daod/src/demo.rs

+ 24 - 0
bin/daod/src/demo.rs

@@ -675,5 +675,29 @@ pub async fn demo() -> Result<()> {
     debug!(target: "demo", "  amount: {}", proposal.amount);
     debug!(target: "demo", "  amount: {}", proposal.amount);
     debug!(target: "demo", "  token_id: {:?}", proposal.token_id);
     debug!(target: "demo", "  token_id: {:?}", proposal.token_id);
 
 
+    ///////////////////////////////////////////////////
+    // Proposal is accepted!
+    // Start the voting
+    ///////////////////////////////////////////////////
+
+    // Copying these schizo comments from python code:
+    // Lets the voting begin
+    // Voters have access to the proposal and dao data
+    //   vote_state = VoteState()
+    // We don't need to copy nullifier set because it is checked from gov_state
+    // in vote_state_transition() anyway
+    //
+    // TODO: what happens if voters don't unblind their vote
+    // Answer:
+    //   1. there is a time limit
+    //   2. both the MPC or users can unblind
+    //
+    // TODO: bug if I vote then send money, then we can double vote
+    // TODO: all timestamps missing
+    //       - timelock (future voting starts in 2 days)
+    // Fix: use nullifiers from money gov state only from
+    // beginning of gov period
+    // Cannot use nullifiers from before voting period
+
     Ok(())
     Ok(())
 }
 }