Protecting Utopian-1UP against double voting and late vote

in #utopian-io7 years ago (edited)

image.png

Final piece of the backend (at least for the current version), this pull request offers protection against old messages that would have already been voted by either Utopian-1UP or the Utopian bot.

This protection was necessary for the following reasons:

  • The interest of Utopian 1UP comes from the front-running, voting after the bot as little to no interest at all.
  • If the system doesn't check for previous vote of the trail and allocate a new dynamic vote weight, the vote will be casted a second time and Voting Power will be lost as a result.

Therefore I changed the flow as follow:

  • All suggestions that have not been voted by either the trail or the bot are fetched from the database (where voted==false).
  • The server checks all of the suggestions data to see if they have been voted by either the trail or the bot since last call
  • If yes, voted is updated to true and the suggestion is removed from the list that will be displaid
  • If no, well, nothing happens

In the current version on Heroku, you can see that this is working since although I ve let some old suggestions (already upvoted), they do not show in the main page.

image.png

Next steps:

  • Implementation of SteemConnect into SteemPlus (cause ill need it for later here, I m already on it and Im super excited about it!)
  • Release the 1UP button into SteemPlus!
  • Drink champaign

@stoodkev



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

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

Thank you!

1UP-150px.png


You've got a 1UP from the @utopian-1up curation trail. Your quality contribution to the open source community has been rewarded by all Utopians following the trail.

Join 1UP for better posts and high curation rewards.

1UP is neither organized nor endorsed by Utopian.io!

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

Achievements

  • Seems like you contribute quite often. AMAZING!

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

Yay, one step closer.

We will need a ranking list were all the upvoted 1UPs will be visible. This will be one of the most interesting features: To see the best 1UP posts gathered together.

Hey, I found this post in Steem Follower. Is this a new tool?

Hello, I added the steemit plus extension for chrome and it keeps saying to check WIF when I try to upvote. I made sure I am using my private key.

Thanks

Hi @mikej, I am working on the full integration with SteemConnect, you won't need any private WIF when I push the update sometime this week, please be patient, I m working hard on it =D

OK great! I'm not getting that message anymore so maybe it just needed a little time to adjust.

Coin Marketplace

STEEM 0.16
TRX 0.13
JST 0.027
BTC 57642.15
ETH 2578.06
USDT 1.00
SBD 2.49