CityOfZion / neo-sharp

Neo-sharp is a new core and node implementation of NEO focused on modular design, best coding practices and testability.
MIT License
35 stars 24 forks source link

Testing Sync Algorithm #518

Closed aboimpinto closed 6 years ago

aboimpinto commented 6 years ago

Testing last Sync Algorithm deployed by @osmirnov on 21.10.2018

aboimpinto commented 6 years ago

After +/- 390.000 blocks the system start to degrade and create more and more thread (reach a total of 41) and when reach 600.000 blocks processed the process was using 15G of memory

shargon commented 6 years ago

image

Something doesn't match

shargon commented 6 years ago

image

This method is consuming a lot of memory, is wrong, i will patch this

shargon commented 6 years ago

@aboimpinto Your tests was very helpful to find and fix this issue, thanks!

osmirnov commented 6 years ago

This is for sure a bug. The second param for Range is count. So it should be toHeight - fromHeight.

aboimpinto commented 6 years ago

I left the sync run for some hours and the result is that is stuck in the Block 1.271.699. I already experience this happen when the block persistence try to persist the transactions. I don't know witch transaction is blowing up but it's a miner transaction or a claim transactions

image

The memory consummation is stable now but the number of the open thread is a little bit high at this point (22)

the nodes outputs image

shargon commented 6 years ago

This is other bug, @aboimpinto the chain was synchronized without problems

image

The problem here was a memory issue.