sei-chain icon indicating copy to clipboard operation
sei-chain copied to clipboard

Add light total supply invariance check

Open codchen opened this issue 9 months ago • 1 comments

Describe your changes and provide context

Add a lightweight check that checks the following invariance every block:

  • The total balance of all addresses who have seen any change to their usei/wei balance in the current block should equal to their total balance as of the last block, after adjusting for any burning/minting (as reflected in changes in the TotalSupply state)

Testing performed to validate your change

WIP trying to make SC store work in unit tests

codchen avatar May 13 '24 11:05 codchen

Codecov Report

Attention: Patch coverage is 52.00000% with 120 lines in your changes are missing coverage. Please review.

Project coverage is 60.44%. Comparing base (e8e4b3b) to head (934a170). Report is 63 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1660      +/-   ##
==========================================
- Coverage   61.64%   60.44%   -1.21%     
==========================================
  Files         365      370       +5     
  Lines       26178    27279    +1101     
==========================================
+ Hits        16138    16488     +350     
- Misses       8967     9659     +692     
- Partials     1073     1132      +59     
Files Coverage Δ
app/app.go 64.97% <50.00%> (+0.04%) :arrow_up:
app/test_helpers.go 58.29% <92.59%> (+9.44%) :arrow_up:
app/invariance.go 40.42% <40.42%> (ø)

... and 15 files with indirect coverage changes

codecov-commenter avatar May 14 '24 03:05 codecov-commenter