Skip to content
This repository was archived by the owner on Jul 27, 2022. It is now read-only.

Problem: app hash changes even if app state didn't change (CRO-526)#542

Merged
bors[bot] merged 1 commit intocrypto-com:masterfrom
tomtau:fix/app-hash
Oct 31, 2019
Merged

Problem: app hash changes even if app state didn't change (CRO-526)#542
bors[bot] merged 1 commit intocrypto-com:masterfrom
tomtau:fix/app-hash

Conversation

@tomtau
Copy link
Copy Markdown
Contributor

@tomtau tomtau commented Oct 31, 2019

Solution: added a flag to chainabci node to signal whether rewards pool was updated
in that block (either by slashing events or transaction fees -- in the future reward distribution),
so that its "last_block_height" (which denotes when it was updated last time)
is only updated when the amount changed.
TODO: perhaps move the rewards pool update logic to rewards pool code (rather than in abci)?

Solution: added a flag to chainabci node to signal whether rewards pool was updated
in that block (either by slashing events or transaction fees -- in the future reward distribution),
so that its "last_block_height" (which denotes when it was updated last time)
is only updated when the amount changed.
TODO: perhaps move the rewards pool update logic to rewards pool code (rather than in abci)?
@tomtau
Copy link
Copy Markdown
Contributor Author

tomtau commented Oct 31, 2019

bors r+

bors bot added a commit that referenced this pull request Oct 31, 2019
537: Problem: (CRO-294) Client can generate invalid transactions r=tomtau a=devashishdxt

Solution: Added balance checks when creating network ops transactions

542: Problem: app hash changes even if app state didn't change (CRO-526) r=tomtau a=tomtau

Solution: added a flag to chainabci node to signal whether rewards pool was updated
in that block (either by slashing events or transaction fees -- in the future reward distribution),
so that its "last_block_height" (which denotes when it was updated last time)
is only updated when the amount changed.
TODO: perhaps move the rewards pool update logic to rewards pool code (rather than in abci)?

Co-authored-by: Devashish Dixit <devashish@crypto.com>
Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 31, 2019

Codecov Report

Merging #542 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #542      +/-   ##
==========================================
+ Coverage   67.23%   67.24%   +0.01%     
==========================================
  Files         122      122              
  Lines       14102    14107       +5     
==========================================
+ Hits         9481     9486       +5     
  Misses       4621     4621
Impacted Files Coverage Δ
chain-abci/src/app/app_init.rs 69.4% <ø> (ø) ⬆️
chain-abci/src/app/slash_accounts.rs 98.21% <100%> (+0.03%) ⬆️
chain-abci/src/app/commit.rs 87.91% <100%> (+0.41%) ⬆️
chain-abci/src/app/mod.rs 83.73% <100%> (+0.06%) ⬆️

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Oct 31, 2019

@bors bors bot merged commit cdfd176 into crypto-com:master Oct 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants