stonecoldpat / anonymousvoting

Anonymous voting on Ethereum without a tally authority. Protocol from this paper http://homepages.cs.ncl.ac.uk/feng.hao/files/OpenVote_IET.pdf
340 stars 88 forks source link

anonymousvotingAddr.owner() always "0x" #20

Closed CalldiDoctor closed 6 years ago

CalldiDoctor commented 6 years ago

Hello,

I'm trying to deploy the Open Vote system in my private Ethereum network, but I'm facing a problem which is blocking me at the first step.

When I open the Admin page I'm always getting the following message:

Modifying the admin.html in order to print some debug logs I've realized that the anonymousvotingAddr.owner() is always 0x. Thus, when it compares the owner address with the addresses in my node, it always fail.

I'm deploying the contract with remix using the compiler version "0.4.23+commit.124ca40d.Emscripten.clang". When I create the contract I try to pass both the gap and the charity address arguments. But maybe I'm doing something wrong since when I try to get the gap or charity values I always get 0 or 0x.

I've also tried to deploy it using the Ethereum wallet with the same result.

Is there anything that I'm missing or could it be related with the compiler that I'm using? Thanks!

CalldiDoctor commented 6 years ago

Problem solved. It was an issue with Remix. When deploying the AnonymousVoting.sol contract with Remix the gas limit was never enough. Using the Ethereum wallet I've been able to deploy it successfully.

However, I'm not able to compile it using the latest wallet release since I'm getting this compilation error: "throw" is deprecated in favour of "revert()", "require()" and "assert()". throw; I did it using Release 0.8.10.

Closing this issue.

stonecoldpat commented 6 years ago

Hey awesome!

Sorry I've been held up. Hoping to get back onto this soon. Glad it worked out

stonecoldpat commented 6 years ago

Also Solidity upgrades have broken a lot of this code. (I recently demoed it at FC'18). Which is a shame. I've been using Geth 1.7.2 to get around it. A good revamp of the code is going to be required at some point :(

CalldiDoctor commented 6 years ago

Sorry I've been held up. Hoping to get back onto this soon. Glad it worked out

No worries.

This voting protocol looks really interesting. :+1: I started to play a bit with Solidity and cryptographic operations, but I found the problem of operating Big integers. I'm curious to know how did you solve it, because I've seen that you are using "uint" only. I will check the smart contracts code soon :)