steem icon indicating copy to clipboard operation
steem copied to clipboard

Feature suggestion: add memo/json to vote operation

Open skzap opened this issue 6 years ago • 9 comments

Just like how we can add a short memo inside a transfer operation, I believe we should also be able to do that on a vote operation. My argument will be short:

1- It's probably very easy to do 2- It enables a lot of possibilities for steem projects. This memo on vote could be used for identifying the UI casting the vote, or tagging the content, or identifying a sub-item inside the content you want to vote on (dpoll?), and probably many more things I'm not even thinking about.

skzap avatar Feb 15 '19 16:02 skzap

Other than keeping the size of the transaction down and perhaps a slight bit of uniformity, is there some other advantage to adding a memo vs. including a custom_json with the vote in the same transaction?

inertia186 avatar Feb 15 '19 17:02 inertia186

No, in fact a json field (just like on the comment operation) would be more flexible. Comment and Transfer have already two different 'custom ways' to write information on the chain, so who cares about uniformity? :)

skzap avatar Feb 15 '19 18:02 skzap

Actually, what I mean is including both a vote_operation and a custom_json_operation in the same transaction rather than add a new field to vote_operation. We can already do this. Wise Team has implemented this kind of transaction to solve certain problems, for example:

image

This vote_operation by @blocktrades was in the same transaction as a custom_json_operation that contains extra data to help audit specific voting behavior.

inertia186 avatar Feb 15 '19 20:02 inertia186

Okay that's actually cool. This solution works for identifying the UI casting the vote example I listed earlier.

But for the two other use cases, where I want to use this extra vote data on the content page itself, I wouldn't be able to fetch this json from the get_content, right? I would need to look up the full transation and the corresponding custom_json operation FOR EACH vote of the content, which would end up being a lot of calls on the node for popular contents.

I guess the properly formulated request would be to have an optional memo / json field associated with the vote operation, and to have this memo easily retrievable through the existing get_content api (maybe get_discussions_by_x too)

skzap avatar Feb 15 '19 21:02 skzap

It might be possible to fetch the custom_json and transfer operation together, if you use hivemind.

syvb avatar Feb 15 '19 23:02 syvb

IMHO, it would be more consistent to have related information in the same operation rather than split it in 2 different transactions/operations.

Unfortunately, there is no extensions field in operations. That would have made things easier to implement.

VIM-Arcange avatar Feb 16 '19 09:02 VIM-Arcange

SMTs are adding a vote2_operation that allows voting directly with rshares rather than percentages. Would adding a json field to that operation be valuable?

mvandeberg avatar Nov 19 '19 19:11 mvandeberg

@mvandeberg I think SMTs votes should function like the normal votes in order to keep things simple. However I really believe it would add value, similarly to why having a memo on transfers is valuable.

skzap avatar Dec 01 '19 16:12 skzap

The new vote2_operation is intended as a complete replacement to the existing vote_operation. The old operation cannot address SMTs, so any UI that wants to provide access to SMTs will implement the new vote operation. It will be easier for developers to change STEEM voting to using the new operation as well and it should become the new standard relatively quickly after release of SMTs. Ideally, the old operation would be deprecated and removed from consensus in a later fork.

mvandeberg avatar Dec 02 '19 16:12 mvandeberg