Changing vote weight shouldn't create two transactions

in #utopian-io9 years ago (edited)

Hello,

Currently (If you hold more than 500 SP) if you change your mind and change the vote weight
on a already voted post, steemit interface creates two transactions.

  1. Reset vote to zero
  2. Set another weight

However, this is also possible with just one transaction. That extra transaction to set it zero is not necessarily needed.

This change will help to keep the steem network optimized and stable.


What I see when I want to change my vote weight on a already voted post.

Current Flow


  1. Vote on a post with %100 weight.
  2. Decided to change it with %50.
  3. Steem interface want a reset first. (%0 weight)
  4. Than re-vote again with %50.

This flow creates 2 transactions.

My suggestions to reduce the network usage


Do not reset the vote immediately.

Suggested flow:

  1. Vote on a post with %100 weight.
  2. Decided to change it with %50.
  3. Clicked the vote button and vote with the slider as %50.

This flow creates 1 transaction.

Does it worth it?

Premature optimization is the root of all evil -- DonaldKnuth

Even though, this looks like an edge case, I parsed last 1000 blocks with the zero weighted vote transactions and here is the result.

Between blocks 18216100 and 18217100, there was 78 zero-weighted vote operations broadcasted. And this is just for 50 minutes of data. If you calculate from the genesis block and consider the future operations, optimization here looks like a good thing for reducing unnecessary operations.


Code snippet I used to track zero-weighted votes.


Steem's chain data is huge for obvious reasons. I actually don't know what will happen when the traditional hard disks will not be enough to store the data in one physical place. We might need partial nodes, sharding solutions in the future.

However, before that, we should optimize the network as soon as we can.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  
Qurator
Your Quality Content Curator
This post has been upvoted and given the stamp of authenticity by @qurator. To join the quality content creators and receive daily upvotes click here for more info.

Qurator's exclusive support bot is now live. For more info click HERE or send some SBD and your link to @qustodian to get even more support.

Congratulations! This post has been randomly Resteemed! To join the ResteemSupport network and be entered into the lottery please upvote this post and see the following rules.

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @emrebeyler I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Suggestions

  • Contribute more often to get higher and higher rewards. I wish to see you often!
  • Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!

Get Noticed!

  • Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.093
BTC 63643.15
ETH 1790.33
USDT 1.00
SBD 0.39