Steem - Reduce the minimum comment interval

in #utopian-io6 years ago

https://github.com/steemit/steem

The current minimum time interval allowed between comments is 20 seconds. This was firstly designed in order to make it harder for people to spam the Steem blockchain. Right now, because a malicious user could make multiple accounts, it can spam as many comments as he wants, being limited only by the bandwidth that he has, which is determined by the amount of Steem power that the corresponding accounts posses at the moment of the spam. In this case, having the comment limit interval of 20 seconds became irrelevant, as it has only the effect of making it harder for people to communicate.

Reducing the minimum comment interval from 20 seconds to 3 seconds was requested in this issue and it was included in the development section for the Hard Fork 20.

The number of 3 seconds was chosen as a lower limit of seconds between comments, because it is the time at which blocks are produced on the Steem blockchain, and it was not desired for one author to have two or more comments included in the same block.

The development of this feature was made on the branch with the name 2019-removal-of-20s-comment-limit which was successfully merged on the pull request with the number 2439 and it will be live with the Hard Fork 20.

Sort:  

Thank you for your contribution. This is great, I think even 3 seconds is a bit longer for some fast typists or for really short comments. I am also curious that how do you unit test this kind of changes?

Your contribution has been evaluated according to Utopian rules and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post,Click here


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Hi! Sincerely I don't even think there are unit tests written for this kind of code since it involves asserts from static methods and things that can not be mocked, but I may be wrong also. I am at the beginning with developments on the Steem blockchain, so I am still getting used with the project.

From my experience with other projects (from which I had worked on a few with more than 90% code coverage) I don't think that this method was ever designed to be tested within a unit test. Maybe a set of integration tests would do the job, but I am not that sure about them also.

Thanks so much for the review!

Hey @mejustandrew
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!