Open ghost opened 6 years ago
if the creator of a private poll index sends the address of somebody else then it means only polls sent by that address should be showed on that index.
As far as I know I am using the same version of sha that nem-sdk uses, but I will check
Whitelist polls are limited by the amount of addresses that you can put in a nem message, it is rarelly used and it is going to be deprecated once that historical info about mosaics is abailable and POW mosaic voting can be implemented.
maybe in a future version we can make it so that the message is optional, but the message is a feature that was asked for by some users for clarity. It is possible to check this information for a transaction every time, but for example in nanowallet there is no way to know if a transaction is a vote, so it would have to be checked for every 0xem transaction.
I have thought about this. The information could be serialized much more efficiently. In future versions it may be changed if we find a good solution. The advantage of a format like json is that it is human readable. When somebody creates a poll they want to know which address pertains to which option, so that they can announce the addresses of the poll. In the future if we implement a more compact format then we need to give to the creator all the information they need for announcing the transaction when they create the poll.
private polls
When the poll is private, you specify the poll creator,
pollIndex:{"private":true,"creator":"TATWKUGFW5RABZZGHP3AXMISRHTTCZI643VFMA62"}
What happens if someone hardcodes other address? which are the implications?
address A creates => index poll B and specifies as creator address C.
address generation
I suggest use Keccak hash algorithm instead of SHA3 in the public net to maintain the coherence.
whitelist (only for whitelist polls):
whitelist:["TCCXQPJNPXAZFKV2IZHIFLAGTSN42WPNAQI6XGK3"]
have you a limit of
whitelist
address? in case it's split in multiple transactions, how is it solved?multisig voting
Is it worth? Using a multisig transaction is expensier, should it be solved in the application side to share the cosigners which poll are you voing to instead? or should it be optional? in case I'm the owner of the multisig, I already know what I'm doing.
Attacks
I am not sure that all of them have that restriction, but seems possible. We have to check it.
Doesn't the security relay in the client side? I mean, that the clients that implement the
voting-system
agrees in the checking before announcing?message structure
not important nor critial, the message schema has redundant characters if we use a library to read from the polls.
poll:{"title":"title","type":0,"doe":1607772120000,"address":"TBR6KPJ2PMUXVWIDLYAUAY52XBU7KDOVTWYLBTUN"}
the
JSON
format adds the object key for each attribute required, adding a fee for the creator, which it's not desirable.For now it's OK, but we should take care about this in the next upgrade.