ZK Circuits

Use make bench. For more info, see the Criterion docs.

Verify DAO::vote() Input Proof

Comparison nullifier (red) and SMT (blue)

Desktop

Test#
Nullifier9.3899 ms
SMT14.551 ms
Change (%)+54.969%

Laptop

Test#
Nullifier40.638 ms
SMT69.919 ms
Change (%)+72.052%

Verify DAO::propose() Input Proof

Comparison nullifier (red) and SMT (blue)

Desktop

Test#
Nullifier9.0842 ms
SMT14.274 ms
Change (%)+57.126%

Laptop

Test#
Nullifier39.598 ms
SMT70.908 ms
Change (%)+79.068%

WASM

Times are in micro-seconds. To replicate these tests simply uncomment the line in src/contract/dao/tests/integration.rs which is wallet.bench_wasm = true;. Then do the following lines:

cd src/contract/dao/
make test

Note if you get an error about wasm bincodes not existing, try cd'ing to all directories in the parent, running make in them, then returning back to this directory and repeating the steps again.

Desktop

calltx-hashcall-idxmeta()process()update()
dao::mintf5f170b8d6104cbfb9fb4cdd80ea3e47e8628403ff94915cc654d43e857690040582953162
money::genesis_mint25d164d78d6581fed6a9509712a3ea20d13a60505e33ab1217d9ffd94d14f175074335923311
money::token_mint6e410bd320bad9754c06e9b0e4aa4627f04c6add0f17e45e7dfe2e68bc9837790304363285
money::token_mint6e410bd320bad9754c06e9b0e4aa4627f04c6add0f17e45e7dfe2e68bc98377918952269
money::token_mint96f3b679eda6ff33f48fd23029462593536719aad3cd3d1e940c04e02b2649400293283250
money::token_mint96f3b679eda6ff33f48fd23029462593536719aad3cd3d1e940c04e02b26494018882289
money::token_mint33887c0a08f384118178826240efc89b5464eb0aaf39005310a2798703f81c6f0301283389
money::token_mint33887c0a08f384118178826240efc89b5464eb0aaf39005310a2798703f81c6f192023210
dao::propose29c8bf860566977dcae00a13eafcf4442b3674462732783950d19e8474e055d50881767172
dao::vote2957ec3b8d22541b0181ae75b9f486e7d0f21c16af52678aaaa27e1d3a515b9a011551126316
dao::vote567b49f00c4e1e59dcb3e6e6fdd660324a81d013ea4fc52a2f6cd1cbe09b4ace014801184344
dao::vote74b9e7669126328255bae8aed3be08530e835971f88fa70114803f05c7eab01e011341124316
dao::exec304d95c75850c837059cb94b4dafbdf5bb06711f31e79ec2ffecc9cb3101193f0223611439
dao::exec304d95c75850c837059cb94b4dafbdf5bb06711f31e79ec2ffecc9cb3101193f1144048011331
dao::exec304d95c75850c837059cb94b4dafbdf5bb06711f31e79ec2ffecc9cb3101193f2135038114

Laptop

calltx-hashcall-idxmeta()process()update()
dao::mint3cabaf7b2c959e18ec504bf94a6b5251fb74bf38864b50e817229738290b703c013952396509
money::genesis_mint2b8060fac7ab25487c956292a82c16d7bd7684f5f8927d9364a64ecdbda3daa70189392987981
money::token_mint66c0a9719254579144fe0d66d11d9f2a25b2fda1fd6e8e84b0b986ebfb69af760711566529
money::token_mint66c0a9719254579144fe0d66d11d9f2a25b2fda1fd6e8e84b0b986ebfb69af761255863622
money::token_mint03542927d0650c1dd5bb5d87af340e6adb3ce8e05934a3fd2d5333acf3e59e1d0716606238
money::token_mint03542927d0650c1dd5bb5d87af340e6adb3ce8e05934a3fd2d5333acf3e59e1d1275482118
money::token_mintcec5ffa55a802d093be3827a2f5bef400352b777111b26a443432dd7c66837070731616765
money::token_mintcec5ffa55a802d093be3827a2f5bef400352b777111b26a443432dd7c66837071358765314
dao::propose1502ffa4e6ab3ca452f73a4e76a919f8fe822319e7d75a713af3228c03834f7b022912064470
dao::voteea62167a013d5e5c040b9f9c00b41f3d336c3d24060a2c641adaa98d5fdea83b028703030841
dao::vote8a76ecfe209fd6283fa4543dba72d2988dc9587a761357224b1a835f0f936c3c030383164854
dao::vote698478f1c5eb283233fb8688fff5ae5c77719ac0aa40b9a5850b64ab5e139fbf029743066818
dao::execad68c7059d529adb8d4dbc2a511dd2a4f473aa1d088c97258bb04f396801bc5c05944302214
dao::execad68c7059d529adb8d4dbc2a511dd2a4f473aa1d088c97258bb04f396801bc5c13843135826049
dao::execad68c7059d529adb8d4dbc2a511dd2a4f473aa1d088c97258bb04f396801bc5c22954110044