bosagora / agora

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

Coinbase: reset cache if signature is added #3189

Closed hewison-chris closed 2 years ago

hewison-chris commented 2 years ago

It can happen that the nodes do not all have the same signatures in the blocks for the payout period. In the case where a signature is added to the block header of a block within the payout period we should reset the cached version of the Coinbase so that it can be re-calculated later.

codecov[bot] commented 2 years ago

Codecov Report

Merging #3189 (0522ac8) into v0.x.x (6e3a0e7) will decrease coverage by 8.14%. The diff coverage is 87.50%.

@@            Coverage Diff             @@
##           v0.x.x    #3189      +/-   ##
==========================================
- Coverage   87.32%   79.18%   -8.15%     
==========================================
  Files         163      209      +46     
  Lines       16760    18969    +2209     
==========================================
+ Hits        14636    15020     +384     
- Misses       2124     3949    +1825     
Flag Coverage Δ
integration 20.27% <ø> (?)
unittests 87.35% <87.50%> (+0.02%) :arrow_up:

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

Impacted Files Coverage Δ
source/agora/consensus/protocol/Nominator.d 92.45% <0.00%> (+0.20%) :arrow_up:
source/agora/consensus/state/Ledger.d 90.90% <90.90%> (+0.51%) :arrow_up:
source/agora/consensus/Ledger.d 97.48% <100.00%> (-0.01%) :arrow_down:
source/agora/test/NetworkDiscovery.d 84.09% <0.00%> (-4.55%) :arrow_down:
source/agora/script/Engine.d 97.59% <0.00%> (-0.16%) :arrow_down:
agora/submodules/ocean/src/ocean/text/Ascii.d 0.00% <0.00%> (ø)
...submodules/ocean/src/ocean/time/chrono/Gregorian.d 2.56% <0.00%> (ø)
agora/submodules/ocean/src/ocean/time/WallClock.d 50.00% <0.00%> (ø)
...gora/submodules/ocean/src/ocean/core/TypeConvert.d 100.00% <0.00%> (ø)
agora/submodules/ocean/src/ocean/core/ByteSwap.d 0.00% <0.00%> (ø)
... and 47 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 6e3a0e7...0522ac8. Read the comment docs.

hewison-chris commented 2 years ago

Green

hewison-chris commented 2 years ago

LGTM but some requests. Why don't you merge two commits?

They could have been merged but not sure it does any harm to have them separate either.

linked0 commented 2 years ago

They could have been merged but not sure it does any harm to have them separate either.

Not a big deal. Just meant it looks that the second commit is tightly related to the first one. Go for it.