-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write back account changes after tracking delegation/undelegation for vesting accounts #8865
Conversation
Benchmark finished. See the result: https://github.orijtech.com/benchmark/result?id=77b29c7ccdb94f5bad28f727ac5d6a04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like we got this, thank you! A test case is required though
Do we have a test? IIRC only some vesting account types were failing, and if I'm not mistaken we run tests on vesting accounts delegatio/undelegation tracking (in x/bank I suppose). Could we add a test here? On a side note... It feels weird that bank has to update (and test) the vesting accounts types on behalf of auth. Linking this for context: #8528 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK, pending changelog
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, is there anyway to add a regression test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking this as we need to introduce a few test cases (and we should not accidentally merge this until that work is done)
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=af5b275bfb9e5e8e8c20bff726c61db836ea74b3 |
Added a test case in |
good find. |
Benchmark finished. See the result: https://github.orijtech.com/benchmark/result?id=468365d12c554104a2092360c0f0c6ef |
Codecov Report
@@ Coverage Diff @@
## master #8865 +/- ##
==========================================
+ Coverage 58.95% 58.97% +0.01%
==========================================
Files 574 576 +2
Lines 32220 32377 +157
==========================================
+ Hits 18996 19095 +99
- Misses 11004 11041 +37
- Partials 2220 2241 +21
|
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Benchmark beginning. Status page: https://github.orijtech.com/benchmark/status?commit=58c1b725e5165e59eeb5e7b94dcaaaa8fa402b0b |
So was this a regression? What are the repercussions of this on the hub's mainnet? |
I think @gsora identified this by going through |
I also suspect this change could be state-breaking. Thus the hub would need to go through an automated upgrade. |
It must be because it worked on hub 1-3. Specifically, I mean how does this currently affect vesting accounts on the hub right now? EDIT: |
IIUC @gsora managed to reproduce #8812 - I'm unsure about #8601 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I scanned through this PR again, imo it's ready to be merged. @robert-zaremba proposed some changes #8865 (comment), but we can make them in a follow-up.
@gsora Could you fix the lint errors?
The interfacer linter has been deprecated.
@robert-zaremba are you ok with that?
I took care of the errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we tried as much edge cases as we could, I would merge it. Thanks @gsora
Hey all sorry for the delay, got caught up in other issues. I'd say we can merge this right now and work something out as soon as we have an infra-package communication framework. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the ABCI use, I created an issue to track it and highlight the motivation. So won't block on it.
However, it seams that unbonding is still not handled: https://github.com/cosmos/cosmos-sdk/pull/8865/files#r600474696
cc: @boz
} | ||
} | ||
|
||
func getDelegatorDelegationsSum(ctx sdk.Context, address string, queryServer grpc.Server) (sdk.Coins, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seams this is still not done.
Looks like it was addressed in fef2d00 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
good |
… vesting accounts (cosmos#8865) Delegations and undelegations calculations performed during accounting operations for vesting accounts were correct but were not written back to the account store. (cherry picked from commit 93965e0)
Description
Before this PR, delegation and undelegation calculations made during accounting operations for vesting accounts were made correct but not written back to the account store.
This PR fixes that behavior.
closes: #8601
closes: #8812
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes