Open maltekliemann opened 11 months ago
So the salt is a secret to the user when voting. Meaning its generated and stored on the client and used to create the commitment hash of the vote. When the user then reveals their vote; the salt is included in the extrinsic so that the chain can confirm that the revealed vote is indeed the same vote.
But if the user sends the reveal extrinsic(including their secret salt) before the aggregation period starts, it can be picked up by other parties on the network, in polkadot js or other tools. Or they could leak it manually in some way. If this happens another user can then use that users salt to denounce their vote.
I dont think this can be made any simpler since using this feature does require some knowledge about the court system and how it works.
Thoughts @Chralt98 ?
I understand how the court works. My concern was that the box has a greyed out "0x" written in it, which makes it seem like its expecting a hexstring. On the other hand, the salt is specified as seed phrase when I back it up. Seems like the box is not expecting a seed phrase. Which means unless I know exactly how to convert a seed phrase into a hex string, I'm screwed.
I would expect to be able to input both. Primarily the seed phase that will be converted on this popup as salt hex string or the user should be able to directly input the hex string salt. The question is, if the user ever knows what their salt hash string is, if not, just let the denouncer input the seed phrase. Problem here is, if we were not allowing to input the salt hash string, a juror can still expose their secret, but the nooby wouldn't be able to denounce, because the the leaked information was the hex string salt, but only the seed phrase can be used to denounce on the front end. So better allow both ways (hex string and seed phrase mnemonic).
I guess Im inferring that the denouncer knows the hex salt since the way they would be revealing it most likely would be by sending a extrinsic to reveal before aggregation starts, that could be picked up by someone monitoring the chain. But yeah they could also be posting their backup somewhere public so I think having the field take both make sense.
I was expecting to enter my seed phrase, but it seems like it's expecting a hexstring.