Skip to content
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

R4R: distribution accum invariants #2597

Merged
merged 26 commits into from
Oct 26, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
076011a
add GetAccum for validator and fee pool
rigelrozanski Oct 23, 2018
6755ec7
refactor accum
rigelrozanski Oct 24, 2018
25cbbd5
refactoring working
rigelrozanski Oct 25, 2018
d93a44f
refactor WIP
rigelrozanski Oct 25, 2018
631215a
Estimate -> Current, wip refactor
rigelrozanski Oct 25, 2018
eda3463
core code compiling
rigelrozanski Oct 25, 2018
dc2e430
tests compiling/passing
rigelrozanski Oct 25, 2018
4b2c76e
wip val accum invar
rigelrozanski Oct 25, 2018
d4a1cf6
add header to dim iterator
rigelrozanski Oct 25, 2018
bad97f2
fix invarience output
rigelrozanski Oct 25, 2018
e23054f
Rename Pool -> DelRewards; PoolCommission -> ValCommision
jaekwon Oct 25, 2018
93d5437
FeePool.Pool -> FeePool.ValPool
jaekwon Oct 26, 2018
33521b0
WithdrawalHeight->DelPoolWithdrawalHeight
jaekwon Oct 26, 2018
1143c93
OnValidatorBeginUnbonding
jaekwon Oct 26, 2018
c17f425
Caught the bug's tail
jaekwon Oct 26, 2018
ce0528f
unbonding fix
rigelrozanski Oct 26, 2018
79be652
output cleanup
rigelrozanski Oct 26, 2018
b97a076
Update vi.FeePoolWithdrawalHeight upon bonding
jaekwon Oct 26, 2018
aba5c95
use jae fix instead
rigelrozanski Oct 26, 2018
99efde2
Fix staking slashUnbondingDelegation bug; fixes simulator failure #9
jaekwon Oct 26, 2018
19d5f28
Merge remote-tracking branch 'origin/jae/dist_refactor' into rigel/di…
rigelrozanski Oct 26, 2018
a62dcad
compile fixes for jae merge
rigelrozanski Oct 26, 2018
306d1b2
...
rigelrozanski Oct 26, 2018
78b8c2d
changelog
rigelrozanski Oct 26, 2018
0d1adfe
address @jawkwon comment
rigelrozanski Oct 26, 2018
9b477f4
Merge branch 'develop' into rigel/distr-accum-invar
cwgoes Oct 26, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix staking slashUnbondingDelegation bug; fixes simulator failure #9
  • Loading branch information
jaekwon committed Oct 26, 2018
commit 99efde2b525a5efa8a22a0814ef4d1469b35540f
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ test_sim_gaia_nondeterminism:

test_sim_gaia_fast:
@echo "Running quick Gaia simulation. This may take several minutes..."
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=400 -SimulationBlockSize=200 -SimulationCommit=true -SimulationSeed=1 -v -timeout 24h
@go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=400 -SimulationBlockSize=200 -SimulationCommit=true -SimulationSeed=9 -v -timeout 24h

test_sim_gaia_multi_seed:
@echo "Running multi-seed Gaia simulation. This may take awhile!"
Expand Down
2 changes: 1 addition & 1 deletion x/stake/keeper/slash.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (k Keeper) slashUnbondingDelegation(ctx sdk.Context, unbondingDelegation ty

// Burn loose tokens
// Ref https://github.com/cosmos/cosmos-sdk/pull/1278#discussion_r198657760
pool.LooseTokens = pool.LooseTokens.Sub(slashAmount)
pool.LooseTokens = pool.LooseTokens.Sub(sdk.NewDecFromInt(unbondingSlashAmount))
k.SetPool(ctx, pool)
}

Expand Down