poanetwork / poa-dapps-voting

POA Network Governance Dapp
https://voting.poa.network
GNU General Public License v3.0
26 stars 54 forks source link

Unable to finalize ballot - apparently no associated mining key to voting key ballot #161

Closed 6proof closed 6 years ago

6proof commented 6 years ago

We are getting following MetaMask error trying to finalized Voting Keys Ballot #35 on POA Core: "Transaction Error. Exception thrown in contract code." Trying to increase Gas or anything else, we get: "Warning! Your transaction was failed. Make sure you don't have Transaction Error. Exception thrown in contract code message in Metamask before you sign it."

It looks like the associated mining key is blank - I don't know how ballot could have been created with blank mining key, and I am confident (or at least WAS confident) that the associated mining key had been entered during ballot creation. Here is info from Keys ballot #35 It would seem the problem with finalizing the voting ballot is that it was not linked to the mining key at the time of creation. add KEY TYPE voting AFFECTED KEY 0x1Eeb293f4Cf75Af7DA0C9F9Da7d1708CE1d2E67d VALIDATOR KEY 0x0000000000000000000000000000000000000000 <---- this should show new Validator Mining key - obviously that key is not valid until after initial vote. Actual mining key is: 0x66C9343C7e8CA673A1FEdf9Dbf2CD7936dBBf7e3

Can this be corrected so ballot can be finalized, or do we need to create new ballot? I believe safeguard used to exist so ballot creation could not begin without associated mining key. How was ballot able to created if associated mining key didn't exist?

varasev commented 6 years ago

The reason is that the current VotingToChangeKey contract allows creating a ballot for adding voting or payout key with 0x0 mining key. That issue will be fixed in the new set of contracts we're working on now.

Please clear your browser cache and create a new ballot again but make sure you've inserted mining key in the "Mining Key" field and pressed ENTER (or just select the key from the drop-down list if the mining key is added), so that you see the mining key in that field instead of "New Mining Key" (or something else).

varasev commented 6 years ago

Fixed in https://github.com/poanetwork/poa-network-consensus-contracts/pull/147 and https://github.com/poanetwork/poa-dapps-voting/pull/162.