Common use of Timing Analysis Clause in Contracts

Timing Analysis. Table 2 outlines the timing analysis measurements for tasks in the Open Vote Network. All measurements were performed on a MacBook Pro running OS X 10.10.5 equipped with 4 cores, 2.3GHz Intel Core i7 and 16 GB DDR3 RAM. All time measurements are rounded up to the next whole millisecond. We use the Web3 framework to facilitate communication between the web browser and the Ethereum daemon. All tasks are executed using .call() that allows us to measure the code’s computation time on the local daemon. The cryptography smart contract is responsible for creating the zero knowl- edge proofs for the voter. The time required to create the proofs is 81 ms for the ▇▇▇▇▇▇▇ proof and 461 ms for the one-out-of-two zero knowledge proof. These actions are always executed using .call() as this contract should never receive transactions. The voting smart contract is responsible for enforcing the election process. Registering a vote involves verifying the ▇▇▇▇▇▇▇ zero knowledge proof and in total requires 142 ms. To begin the election requires computing the reconstructed public keys which takes 277 ms in total for forty voters. Casting a vote involves verifying the one-out-of-two zero knowledge proof which requires 573 ▇▇. ▇▇▇▇▇- ing involves summing all cast votes and brute-forcing the discrete logarithm of the result and on average takes around 132 ms. We decided to distribute the cryptography code using the Ethereum blockchain to allow all voters to use the same code. Running the code on the voter’s local daemon is significantly slower than using a seperate library such as OpenSSL. For example, creating a ▇▇▇▇▇▇▇ signature using OpenSSL on a comparable machine requires 0.69 ms [27]. This slowness is mostly due to the lack of native support for elliptic curve math in Ethereum smart contracts. The Ethereum Foundation Action Avg. Time (ms) Create ZKP(x) 81 Register voting key 142 Begin election 277 Create 1-out-of-2 ZKP 461 Cast vote 573 Tally 132 has plans to include native support and we expect this to significantly improve our reported times.

Appears in 3 contracts

Sources: Smart Contract for Boardroom Voting, Smart Contract for Boardroom Voting, Smart Contract for Boardroom Voting