项目作者: KimiWu123

项目描述 :
Roll up ballots of zkvote
高级语言: JavaScript
项目地址: git://github.com/KimiWu123/zkvote-rollup.git
创建时间: 2020-02-12T02:38:47Z
项目社区:https://github.com/KimiWu123/zkvote-rollup

开源协议:

下载


zkvote-rollup

Roll up ballots of zkvote

The idea of zkvote-rollup is from zk-rollup. Here, we rollup the ballot results of zkvote.

In zk-rollup, registration is required to insert your account info(balance, public key, nonce… etc.) into a merkle tree and transactions will update the state of the accounts.

In zkvote-rollup, the tree leaves are proofs (zkvote proofs) so we don’t ‘update’ the leaves, we just insert new proofs into the tree (just like registration in zk-rollup). In this PoC, we only aggregate proofs and update ballot results of a single subject (for now, there is no way to check the relationship between a subject and a proof). We roll up the ballots adn generate the proof by each single subject.
Operator signs every individual hash(proof) and aggregates new proofs from the network. Operator needs to deposit first, if any operator is doing anything unexpected, he/she will be punished. The design of deposit/punishment will be in the next phase.

Data structure

  • proof : (external_proof, opinion)
    • external_proof : hash of zkvote proof
    • opinion : hash of string, “YES” or “NO”
  • ballot : [num of Yes, num of No]