Skip to content

weizhongyao

wzysdu edited this page Dec 19, 2018 · 3 revisions

Test 1:


启动A、B、C、D四个节点,A与B、C、D相连,A只挖矿:

(1)B 执行mint ,结果:Verifying mint proof successfully!!!;

(2)B 执行send给C ,结果:Verifying send proof successfully!!!;

(3)B 执行update ,结果:Verifying update proof successfully!!!;

(4)B 执行send给D ,结果:Verifying send proof successfully!!!;

(5)B 执行update ,结果:Verifying update proof successfully!!!;


Test 2:


启动A、B、C、D四个节点,A与B、C、D相连,A只挖矿:

(1)B、C 都执行mint ,结果:Verifying mint proof successfully!!!;

(2)B、C 都执行send给D ,结果:Verifying send proof successfully!!!;

(3)D 执行两次deposit ,结果:Verifying deposit proof successfully!!!;


Test 3:


启动A、B、C、D四个节点,A与B、C、D相连,A只挖矿:

(1)B、C、D 都执行mint ,结果:Verifying mint proof successfully!!!;

(2)B 执行send给C、C 执行send给D、D 执行send给C ,结果:Verifying send proof successfully!!!;

(3)B、C、D 都进行update ,结果:Verifying update proof successfully!!!;

若不执行update,
          C、D直接执行deposit会失败 :cannot send DepositTx after sendTx

          B若再执行send给D也会失败  :cannot send sendTX after sendTX

(4)C 执行两次deposit ,结果:Verifying deposit proof successfully!!!;

(5)D 执行deposit ,结果:Verifying deposit proof successfully!!!;

(6)B 执行send给D ,结果:Verifying send proof successfully!!!;

(7)D 执行deposit ,结果:Verifying deposit proof successfully!!!;


Test 4:


启动A、B、C三个节点,(A、B)和C处于不同ip下,A只挖矿:

(1)B、C 都执行mint ,结果:Verifying mint proof successfully!!!;

(2)B、C 互相send ,结果:Verifying send proof successfully!!!;

(3)B、C 都执行update ,结果:Verifying update proof successfully!!!;

(4)B、C 都执行deposit ,结果:Verifying deposit proof successfully!!!;

(5)B、C 都执行redeem ,结果:Verifying redeeem proof successfully!!!;


1. 方案设计

VNT零知识设计方案

方案设计图

2. 方案实现

实现细节思考

2.1 libsnark模块实现

2.2 ethereum模块实现

2.3 cgo模块实现

3. 方案测试

部分问题

整体测试出的问题

3.1 libsnark模块测试

3.2 整体测试

4. 修改汇总

4.1 libsnark模块修改汇总

4.2 ethereum模块修改汇总

4.3 cgo模块修改汇总

5. 开发技巧

修改并编译web3.js文件

libsnark遇到的大“坑”

FZQA

CGO

MPT trie

transaction 部分修改

简易以太坊测试

Clone this wiki locally