-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Insufficient Outstanding Rewards Simulation Edge Case #3735
Comments
reference command: |
Is there a copy of the logs? |
jaekwon [21 minutes ago]
|
Update the test is failing on guess it's not a part of CI because CI is passing? I'm going to re-trigger the CI additionally - develop fails if we simply include the new updates to |
More specifically - I believe this bug is caused by the large presence of "undelegate max share" transactions (with this non-fixing change, the tests don't fail https://github.com/cosmos/cosmos-sdk/pull/3737/files#diff-5b2524ac49f8371d55e5d76aeef9b618R158). I think that somehow an edge case within the distribution PR has come about through this test introduction - I suspect maybe a bug in the distr-hooks being called in distribution by the staking undelegate function edit:
|
Debugging more in #3746...
delegation 247 of 248
outstanding: 454560506.432459005262762026stake, rewards: 482536446.922005148438991902stake |
Well this is possibly interesting: rewards for final period (startingPeriod 177, endingPeriod 198) with stake 245062318940.226838227693785761: 9862.295748815299289701stake
D[2019-02-26|19:35:00.363] Commit synced commit=436F6D6D697449447B5B32303120313834203139332032303920323237203132382034322034312032353220313730203135342032353120313737203631203133352031353520323136203436203232352032313220313431203135392031333420343720313620323235203137352031383520393920313338203334203230375D3A33357D
allocating tokens: sumPrecommitPower 2425321, totalPower 3437104, previousProposer FEBDC6079DE334E695E3673F3391C18AC6E4E31A, votes [{{[107 109 87 172 245 246 64 66 112 217 111 242 215 216 81 239 217 106 201 140] 593263 {} [] 0} true {} [] 0} {{[51 53 198 104 78 148 62 99 166 114 226 114 57 213 213 243 189 198 136 161] 593263 {} [] 0} true {} [] 0} {{[67 156 141 101 153 123 176 233 186 71 233 134 151 110 191 4 255 255 85 98] 140574 {} [] 0} true {} [] 0} {{[57 178 135 219 182 202 201 227 198 148 87 150 23 11 149 23 241 126 39 25] 1011783 {} [] 0} false {} [] 0} {{[32 136 51 194 44 138 21 169 0 70 89 189 24 13 233 206 138 113 138 217] 1098221 {} [] 0} true {} [] 0}]
allocate to validator: val Validator
Operator Address: cosmosvaloper1l67uvpuauv6wd90rvuln8ywp3trwfcc6csx0hn
Validator Consensus Pubkey: cosmosvalconspub1zcjduepqt2gf45pv33fls7c4n5ukzugj3r68z8jqpzhha0rd0qfepnetyxgs3ltmn7
Jailed: true
Status: Unbonding
Tokens: 978435872116
Delegator Shares: 1074040715314.427507160608908083
Description: {mtKhGaArLP LZpHzksjbf iStyxpeFQq bZAnuFTQvl}
Unbonding Height: 52
Unbonding Completion Time: 3130-05-17 08:19:00 +0000 UTC
Minimum Self Delegation: 1
Commission: rate: 0.000000000000000000, maxRate: 0.000000000000000000, maxChangeRate: 0.000000000000000000, updateTime: 3130-05-13 20:58:16 +0000 UTC, tokens 1926535755.026056324633364950stake
remaining after: 250438521.500000008495388462stake
I[2019-02-26|19:35:00.364] Absent validator 39B287DBB6CAC9E3C6945796170B9517F17E2719 (PubKeySecp256k1{02012C55A53D783C97F0206807C05D1376887FEAED896CE536CB045E5E680F33EE}) at height 54, 19 missed, threshold 197 module=x/slashing
I[2019-02-26|19:35:00.364] Confirmed double sign from 439C8D65997BB0E9BA47E986976EBF04FFFF5562 at height 39, age of 103385000000000 module=x/slashing
I[2019-02-26|19:35:00.367] validator cosmosvaloper1gwwg6eve0wcwnwj8axrfwm4lqnll74tz43my0d slashed by slash factor of 0.166666666666666667; burned 0 tokens module=x/staking
I[2019-02-26|19:35:00.367] validator cosmosvalcons1gwwg6eve0wcwnwj8axrfwm4lqnll74tzpzgcrv jailed module=x/staking
rewards for final period (startingPeriod 177, endingPeriod 198) with stake 245062318940.226838227693785761: 482536446.922005148438991902stake Did the validator get tokens on just the most recent block - could those be calculated incorrectly? It seems like we should be iterating over a slash, for this final block on which we just allocated rewards, since those rewards would have been allocated after this validator was slashed. |
The validator withdrew their self-delegation rewards at block 52, just after being slashed, so we now start iterating over slashes in block 53 (as intended)... |
I wonder if there's an off-by-one bug somewhere. |
For one, this situation is really weird, a validator was tombstoned and then keeps receiving rewards for two blocks after ( |
Some progress in #3750 (comment) |
Fixed by #3750 |
Not then but it is now! |
Rige edit:
the situation which causes this bug has been narrowed down within the (#3737) branch testing with
make test_sim_gaia_fast
Just making a record... after merging the latest PRs from the weekend (see my branch jae/launch-rc-jae branch), I got a sim failure:
The text was updated successfully, but these errors were encountered: