Post
Topic
Board Announcements (Altcoins)
Re: [LAUNCHED][POW]⚡ELECTRONEUM⚡Official Moderated Thread
by
vicsoftware
on 01/06/2018, 17:29:29 UTC
Please fix me if I'm wrong.
I just investigating the sources of new Electroneum update.

In src\cryptonote_basic\difficulty.cpp there is a function next_difficulty() which calculates the difficulty for new block.

According that function algorithm is the next:

1. take previous DIFFICULTY_WINDOW_V6 = 360 blocks.
2. sort them according to time found (timestamp)
3. throw out first DIFFICULTY_CUT = 60 and DIFFICULTY_CUT = 60 last blocks and keep only 240 blocks.
4. calculate the work (difficulty) done during the time of these blocks and according to that calculate new difficulty.

I see some problem in this algo.
1. Last 8 blocks (307500-307507) are the last current blocks. They will be in the end of sorted list and will be thrown out away!
So the next 52 blocks for sure will be last blocks in list too and their time will not be even taken in account during the difficulty calculations.
This means the difficulty will start to fall down only on block 307560!

2. To calculate the work done by the last 240 median blocks function next_difficulty() use the target_seconds variable:
    mul(total_work, target_seconds, low, high);
BUT! Variable target_seconds now is set to 120 seconds in function get_difficulty_target() instead of 60 before fork.
This doubles the hashrate of the network and the result difficulty for the block 307500 and next!

What thats means? We are now in 3 (!!!) GH/s network and next 52 blocks will not even change the difficulty. The difficulty will go down only
after block 307560.