bosagora / agora

POC Node implementation for CoinNet
https://bosagora.io
MIT License
37 stars 23 forks source link

Nominator: Purge externalized SCP slots #3242

Closed omerfirmak closed 2 years ago

omerfirmak commented 2 years ago

SCP holds state for each height and needs them to be explicitly cleared. This was probably the reason of our ever growing memory consumption.

codecov[bot] commented 2 years ago

Codecov Report

Merging #3242 (a4ff3dc) into v0.x.x (235375d) will increase coverage by 24.79%. The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           v0.x.x    #3242       +/-   ##
===========================================
+ Coverage   29.96%   54.76%   +24.79%     
===========================================
  Files         266      332       +66     
  Lines       27082    35815     +8733     
===========================================
+ Hits         8115    19613    +11498     
+ Misses      18967    16202     -2765     
Flag Coverage Δ
integration 30.31% <100.00%> (+0.34%) :arrow_up:
unittests 87.53% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
source/agora/consensus/protocol/Nominator.d 91.41% <100.00%> (+13.87%) :arrow_up:
source/scpd/scp/SCPDriver.d 60.00% <0.00%> (-15.00%) :arrow_down:
source/agora/node/Runner.d 55.55% <0.00%> (-0.37%) :arrow_down:
source/agora/consensus/Quorum.d 97.09% <0.00%> (-0.28%) :arrow_down:
source/scpd/scp/SCP.d 100.00% <0.00%> (ø)
source/agora/crypto/Crc16.d 100.00% <0.00%> (ø)
source/agora/consensus/data/UTXO.d 100.00% <0.00%> (ø)
source/agora/consensus/data/Enrollment.d 100.00% <0.00%> (ø)
source/agora/consensus/data/PreImageInfo.d 100.00% <0.00%> (ø)
source/agora/test/EnrollmentManager.d 93.54% <0.00%> (ø)
... and 150 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 235375d...a4ff3dc. Read the comment docs.

omerfirmak commented 2 years ago

Memory usage is still increasing tho, it will need more investigation.